Can someone please provide an early reference to the use of the continued fraction expansion of $\frac{1+\sqrt D}2$ to solve the Diophantine equation $x^2 - D y^2 = 4$ for a positive integer $D$ congruent to $1$ modulo $4$, $D$ not a square? Or some method equivalent to the use of the continued fraction expansion of $\frac{1+\sqrt D}2$. An 18th century reference? 17th century? Modern references are easy to find—20th and 21st century.
An equivalent method might involve use of binary quadratic forms, even if the terminology “binary quadratic form” is not used. For example Brouncker's (maybe it's Wallis') method for solving $x^2 - D y^2 = 1$ (see André Weil, Number Theory, An approach through history from Hammurapi to Legendre, Birkhäuser, 2001, pp. 92 ff) essentially uses binary quadratic forms and is equivalent to computing the continued fraction of $\sqrt D$.
I have been searching for a source for this for a few weeks, and have not found anything. I've looked at Weil, Edwards, Mollin, Jacobson and Williams, Dickson's History (especially Vol II, pp. 351 to 353), Whitford, Fermat's Oeuvres (but I haven't read every page!), Lenstra's 2002 Notices article, Williams's millennial talk, Mahoney, Ribenboim, countless websites, and more.