This entity survived until 1795 when its remnants were partitioned by surrounding countries .