@webwriter/geogebra 1.1.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/README.md +280 -124
  2. package/custom-elements.json +2255 -1259
  3. package/dist/chunks/af-35CD6HFH.js +12 -0
  4. package/dist/chunks/am-JMDT5LI7.js +12 -0
  5. package/dist/chunks/ar-JL4QKYYL.js +12 -0
  6. package/dist/chunks/az-3SZS6WCY.js +12 -0
  7. package/dist/chunks/be-C4GWVHR2.js +12 -0
  8. package/dist/chunks/bg-6QGE5EQ4.js +12 -0
  9. package/dist/chunks/bn-UM2BV46R.js +12 -0
  10. package/dist/chunks/bs-XE2PWKCS.js +12 -0
  11. package/dist/chunks/ca-ZO2BQKPZ.js +12 -0
  12. package/dist/chunks/ca-balear-GJKWY5R7.js +12 -0
  13. package/dist/chunks/ca-valencia-CNQYSJSJ.js +12 -0
  14. package/dist/chunks/chunk-ACU6XINJ.js +781 -0
  15. package/dist/chunks/chunk-ANJTU3IB.js +203 -0
  16. package/dist/chunks/chunk-BSUFUO7E.js +65 -0
  17. package/dist/chunks/cnr-MCZGASOD.js +12 -0
  18. package/dist/chunks/cs-4Q7FRISG.js +12 -0
  19. package/dist/chunks/cy-7VXG3AYH.js +12 -0
  20. package/dist/chunks/da-VDMHGBXD.js +12 -0
  21. package/dist/chunks/de-AT-YM5GCI75.js +12 -0
  22. package/dist/chunks/de-CH-LQNHTGYT.js +12 -0
  23. package/dist/chunks/de-GJT7RSHT.js +12 -0
  24. package/dist/chunks/el-ZVUVWEQ3.js +12 -0
  25. package/dist/chunks/en-AU-PCIYYC4M.js +12 -0
  26. package/dist/chunks/en-CA-37T7YUIL.js +12 -0
  27. package/dist/chunks/en-GB-ZYCA2CIZ.js +12 -0
  28. package/dist/chunks/en-IN-EPHXLNO6.js +12 -0
  29. package/dist/chunks/en-US-ECSJ5HDL.js +12 -0
  30. package/dist/chunks/es-5VBYK2HE.js +12 -0
  31. package/dist/chunks/et-OFQRRTW6.js +12 -0
  32. package/dist/chunks/eu-7TNOYFB7.js +12 -0
  33. package/dist/chunks/fa-KZU6GKWU.js +12 -0
  34. package/dist/chunks/fi-THJEKJPW.js +12 -0
  35. package/dist/chunks/fr-MUVVTBQZ.js +12 -0
  36. package/dist/chunks/ga-UWUVCWOT.js +12 -0
  37. package/dist/chunks/gl-NHQ52YCN.js +12 -0
  38. package/dist/chunks/gu-HVDD4QHO.js +12 -0
  39. package/dist/chunks/ha-2BPTATOZ.js +12 -0
  40. package/dist/chunks/he-MDESCUHJ.js +12 -0
  41. package/dist/chunks/hi-C6BGPR4Y.js +12 -0
  42. package/dist/chunks/hr-77MP3ELT.js +12 -0
  43. package/dist/chunks/hu-7PRNX6NB.js +12 -0
  44. package/dist/chunks/hy-R3VEL63L.js +12 -0
  45. package/dist/chunks/id-O6B2T3Y2.js +12 -0
  46. package/dist/chunks/is-XLNS5CAZ.js +12 -0
  47. package/dist/chunks/it-NZODUGUP.js +12 -0
  48. package/dist/chunks/ja-FFK5WXSB.js +12 -0
  49. package/dist/chunks/jv-GS3IRAIB.js +12 -0
  50. package/dist/chunks/ka-NWIJAO54.js +12 -0
  51. package/dist/chunks/kk-WQFRFG44.js +12 -0
  52. package/dist/chunks/km-AUKBN3YT.js +12 -0
  53. package/dist/chunks/kn-PKZFPECM.js +12 -0
  54. package/dist/chunks/ko-XNGAWKQ4.js +12 -0
  55. package/dist/chunks/ky-AQTYDJIL.js +12 -0
  56. package/dist/chunks/la-ERS7V4N4.js +12 -0
  57. package/dist/chunks/lb-KU3DVPI4.js +12 -0
  58. package/dist/chunks/locale-codes-TGY5LMYX.js +11 -0
  59. package/dist/chunks/lt-6RI4HSG3.js +12 -0
  60. package/dist/chunks/lv-RGIUQVA7.js +12 -0
  61. package/dist/chunks/mk-JMAYXTCL.js +12 -0
  62. package/dist/chunks/ml-5ZAIPAYV.js +12 -0
  63. package/dist/chunks/mn-N2GZBVDP.js +12 -0
  64. package/dist/chunks/mr-2SRCJIBC.js +12 -0
  65. package/dist/chunks/ms-WHD5PUQM.js +12 -0
  66. package/dist/chunks/mt-EXRK5UO6.js +12 -0
  67. package/dist/chunks/my-D2COGDRI.js +12 -0
  68. package/dist/chunks/nb-3XNBS2DU.js +12 -0
  69. package/dist/chunks/ne-PA4KUBGU.js +12 -0
  70. package/dist/chunks/nl-QMM3PBPM.js +12 -0
  71. package/dist/chunks/nn-CLFEMF2K.js +12 -0
  72. package/dist/chunks/no-CV376NZG.js +12 -0
  73. package/dist/chunks/or-KP7CET7X.js +12 -0
  74. package/dist/chunks/pa-CH5JYVXT.js +12 -0
  75. package/dist/chunks/pl-DDW4HT7M.js +12 -0
  76. package/dist/chunks/pt-BR-CVNA2MRU.js +12 -0
  77. package/dist/chunks/pt-CRTRYTDJ.js +12 -0
  78. package/dist/chunks/pt-PT-IZMPF3BY.js +12 -0
  79. package/dist/chunks/ro-FUOGHWJA.js +12 -0
  80. package/dist/chunks/ru-KAT4X5EC.js +12 -0
  81. package/dist/chunks/si-GDAXEOBK.js +12 -0
  82. package/dist/chunks/sk-CDSK6MY5.js +12 -0
  83. package/dist/chunks/sl-TFJQYNA4.js +12 -0
  84. package/dist/chunks/so-TXI6JJPW.js +12 -0
  85. package/dist/chunks/sq-KMM2QIRU.js +12 -0
  86. package/dist/chunks/sr-OTZNEL5Z.js +12 -0
  87. package/dist/chunks/sv-7CANJ6CF.js +12 -0
  88. package/dist/chunks/sw-5JDMTJ5K.js +12 -0
  89. package/dist/chunks/ta-HT4SO7PD.js +12 -0
  90. package/dist/chunks/te-FECCLHOI.js +12 -0
  91. package/dist/chunks/tg-FJWFJWF2.js +12 -0
  92. package/dist/chunks/th-JEP434LN.js +12 -0
  93. package/dist/chunks/tl-GN35ZR2F.js +12 -0
  94. package/dist/chunks/tr-IPVLQUE4.js +12 -0
  95. package/dist/chunks/uk-LHWPGFRV.js +12 -0
  96. package/dist/chunks/ur-7FU4XRAY.js +12 -0
  97. package/dist/chunks/uz-RO7XCKFE.js +12 -0
  98. package/dist/chunks/vi-5PHPTVV4.js +12 -0
  99. package/dist/chunks/zh-Hans-UM7MUEDB.js +12 -0
  100. package/dist/chunks/zh-Hant-7M2P4G7R.js +12 -0
  101. package/dist/chunks/zh-LHCPWZN2.js +12 -0
  102. package/dist/widgets/webwriter-geogebra-3d.js +19 -25827
  103. package/dist/widgets/webwriter-geogebra-classic.js +18 -25826
  104. package/dist/widgets/webwriter-geogebra-geometry.js +18 -25826
  105. package/dist/widgets/webwriter-geogebra-notes.js +18 -25826
  106. package/dist/widgets/webwriter-geogebra-scientific.js +18 -25826
  107. package/dist/widgets/webwriter-geogebra.js +20 -25830
  108. package/editing-config.json +839 -20
  109. package/lit-localize.json +73 -9
  110. package/localization/af.xlf +290 -0
  111. package/localization/am.xlf +290 -0
  112. package/localization/ar.xlf +271 -6
  113. package/localization/az.xlf +290 -0
  114. package/localization/be.xlf +290 -0
  115. package/localization/bg.xlf +271 -6
  116. package/localization/bn.xlf +290 -0
  117. package/localization/bs.xlf +290 -0
  118. package/localization/ca-balear.xlf +290 -0
  119. package/localization/ca-valencia.xlf +290 -0
  120. package/localization/ca.xlf +290 -0
  121. package/localization/cnr.xlf +290 -0
  122. package/localization/cs.xlf +271 -6
  123. package/localization/cy.xlf +290 -0
  124. package/localization/da.xlf +271 -6
  125. package/localization/de-AT.xlf +294 -0
  126. package/localization/de-CH.xlf +294 -0
  127. package/localization/de.xlf +271 -6
  128. package/localization/el.xlf +271 -6
  129. package/localization/es.xlf +271 -6
  130. package/localization/et.xlf +271 -6
  131. package/localization/eu.xlf +290 -0
  132. package/localization/fa.xlf +290 -0
  133. package/localization/fi.xlf +271 -6
  134. package/localization/fr.xlf +271 -6
  135. package/localization/ga.xlf +290 -0
  136. package/localization/generated/af.ts +16 -0
  137. package/localization/generated/am.ts +16 -0
  138. package/localization/generated/ar.ts +6 -12
  139. package/localization/generated/az.ts +16 -0
  140. package/localization/generated/be.ts +16 -0
  141. package/localization/generated/bg.ts +6 -12
  142. package/localization/generated/bn.ts +16 -0
  143. package/localization/generated/bs.ts +16 -0
  144. package/localization/generated/ca-balear.ts +16 -0
  145. package/localization/generated/ca-valencia.ts +16 -0
  146. package/localization/generated/ca.ts +16 -0
  147. package/localization/generated/cnr.ts +16 -0
  148. package/localization/generated/cs.ts +6 -12
  149. package/localization/generated/cy.ts +16 -0
  150. package/localization/generated/da.ts +6 -12
  151. package/localization/generated/de-AT.ts +16 -0
  152. package/localization/generated/de-CH.ts +16 -0
  153. package/localization/generated/de.ts +6 -11
  154. package/localization/generated/el.ts +6 -12
  155. package/localization/generated/en-AU.ts +16 -0
  156. package/localization/generated/en-CA.ts +16 -0
  157. package/localization/generated/en-GB.ts +16 -0
  158. package/localization/generated/en-IN.ts +16 -0
  159. package/localization/generated/en-US.ts +16 -0
  160. package/localization/generated/es.ts +6 -12
  161. package/localization/generated/et.ts +6 -12
  162. package/localization/generated/eu.ts +16 -0
  163. package/localization/generated/fa.ts +16 -0
  164. package/localization/generated/fi.ts +6 -12
  165. package/localization/generated/fr.ts +6 -12
  166. package/localization/generated/ga.ts +16 -0
  167. package/localization/generated/gl.ts +16 -0
  168. package/localization/generated/gu.ts +16 -0
  169. package/localization/generated/ha.ts +16 -0
  170. package/localization/generated/he.ts +16 -0
  171. package/localization/generated/hi.ts +16 -0
  172. package/localization/generated/hr.ts +16 -0
  173. package/localization/generated/hu.ts +6 -12
  174. package/localization/generated/hy.ts +16 -0
  175. package/localization/generated/id.ts +6 -12
  176. package/localization/generated/is.ts +16 -0
  177. package/localization/generated/it.ts +6 -12
  178. package/localization/generated/ja.ts +6 -12
  179. package/localization/generated/jv.ts +16 -0
  180. package/localization/generated/ka.ts +16 -0
  181. package/localization/generated/kk.ts +16 -0
  182. package/localization/generated/km.ts +16 -0
  183. package/localization/generated/kn.ts +16 -0
  184. package/localization/generated/ko.ts +6 -12
  185. package/localization/generated/ky.ts +16 -0
  186. package/localization/generated/la.ts +16 -0
  187. package/localization/generated/lb.ts +16 -0
  188. package/localization/generated/locale-codes.ts +211 -0
  189. package/localization/generated/lt.ts +6 -12
  190. package/localization/generated/lv.ts +6 -12
  191. package/localization/generated/mk.ts +16 -0
  192. package/localization/generated/ml.ts +16 -0
  193. package/localization/generated/mn.ts +16 -0
  194. package/localization/generated/mr.ts +16 -0
  195. package/localization/generated/ms.ts +16 -0
  196. package/localization/generated/mt.ts +16 -0
  197. package/localization/generated/my.ts +16 -0
  198. package/localization/generated/nb.ts +6 -12
  199. package/localization/generated/ne.ts +16 -0
  200. package/localization/generated/nl.ts +6 -12
  201. package/localization/generated/nn.ts +16 -0
  202. package/localization/generated/no.ts +16 -0
  203. package/localization/generated/or.ts +16 -0
  204. package/localization/generated/pa.ts +16 -0
  205. package/localization/generated/pl.ts +6 -12
  206. package/localization/generated/pt-BR.ts +6 -12
  207. package/localization/generated/pt-PT.ts +6 -12
  208. package/localization/generated/pt.ts +16 -0
  209. package/localization/generated/ro.ts +6 -12
  210. package/localization/generated/ru.ts +6 -12
  211. package/localization/generated/si.ts +16 -0
  212. package/localization/generated/sk.ts +6 -12
  213. package/localization/generated/sl.ts +6 -12
  214. package/localization/generated/so.ts +16 -0
  215. package/localization/generated/sq.ts +16 -0
  216. package/localization/generated/sr.ts +16 -0
  217. package/localization/generated/sv.ts +6 -12
  218. package/localization/generated/sw.ts +16 -0
  219. package/localization/generated/ta.ts +16 -0
  220. package/localization/generated/te.ts +16 -0
  221. package/localization/generated/tg.ts +16 -0
  222. package/localization/generated/th.ts +16 -0
  223. package/localization/generated/tl.ts +16 -0
  224. package/localization/generated/tr.ts +6 -12
  225. package/localization/generated/uk.ts +6 -12
  226. package/localization/generated/ur.ts +16 -0
  227. package/localization/generated/uz.ts +16 -0
  228. package/localization/generated/vi.ts +16 -0
  229. package/localization/generated/zh-Hans.ts +16 -0
  230. package/localization/generated/zh-Hant.ts +16 -0
  231. package/localization/generated/zh.ts +16 -0
  232. package/localization/gl.xlf +290 -0
  233. package/localization/gu.xlf +290 -0
  234. package/localization/ha.xlf +290 -0
  235. package/localization/he.xlf +290 -0
  236. package/localization/hi.xlf +290 -0
  237. package/localization/hr.xlf +290 -0
  238. package/localization/hu.xlf +271 -6
  239. package/localization/hy.xlf +290 -0
  240. package/localization/id.xlf +271 -6
  241. package/localization/is.xlf +290 -0
  242. package/localization/it.xlf +271 -6
  243. package/localization/ja.xlf +271 -6
  244. package/localization/jv.xlf +290 -0
  245. package/localization/ka.xlf +290 -0
  246. package/localization/kk.xlf +290 -0
  247. package/localization/km.xlf +290 -0
  248. package/localization/kn.xlf +290 -0
  249. package/localization/ko.xlf +271 -6
  250. package/localization/ky.xlf +290 -0
  251. package/localization/la.xlf +290 -0
  252. package/localization/lb.xlf +290 -0
  253. package/localization/lt.xlf +271 -6
  254. package/localization/lv.xlf +271 -6
  255. package/localization/mk.xlf +290 -0
  256. package/localization/ml.xlf +290 -0
  257. package/localization/mn.xlf +290 -0
  258. package/localization/mr.xlf +290 -0
  259. package/localization/ms.xlf +290 -0
  260. package/localization/mt.xlf +290 -0
  261. package/localization/my.xlf +290 -0
  262. package/localization/nb.xlf +271 -6
  263. package/localization/ne.xlf +290 -0
  264. package/localization/nl.xlf +271 -6
  265. package/localization/nn.xlf +290 -0
  266. package/localization/no.xlf +295 -0
  267. package/localization/or.xlf +290 -0
  268. package/localization/pa.xlf +290 -0
  269. package/localization/pl.xlf +271 -6
  270. package/localization/pt-BR.xlf +271 -6
  271. package/localization/pt-PT.xlf +271 -6
  272. package/localization/pt.xlf +295 -0
  273. package/localization/ro.xlf +271 -6
  274. package/localization/ru.xlf +271 -6
  275. package/localization/si.xlf +290 -0
  276. package/localization/sk.xlf +271 -6
  277. package/localization/sl.xlf +271 -6
  278. package/localization/so.xlf +290 -0
  279. package/localization/sq.xlf +290 -0
  280. package/localization/sr.xlf +290 -0
  281. package/localization/sv.xlf +271 -6
  282. package/localization/sw.xlf +290 -0
  283. package/localization/ta.xlf +290 -0
  284. package/localization/te.xlf +290 -0
  285. package/localization/tg.xlf +290 -0
  286. package/localization/th.xlf +290 -0
  287. package/localization/tl.xlf +290 -0
  288. package/localization/tr.xlf +271 -6
  289. package/localization/uk.xlf +271 -6
  290. package/localization/ur.xlf +290 -0
  291. package/localization/uz.xlf +290 -0
  292. package/localization/vi.xlf +290 -0
  293. package/localization/zh-Hans.xlf +295 -0
  294. package/localization/zh-Hant.xlf +295 -0
  295. package/localization/zh.xlf +295 -0
  296. package/package.json +194 -86
  297. package/src/components/geogebra-app.styles.ts +47 -0
  298. package/{components → src/components}/geogebra-app.ts +229 -330
  299. package/src/model/geogebra-api.ts +148 -0
  300. package/src/model/geogebra-options.ts +72 -0
  301. package/src/model/geogebra-parameters.ts +53 -0
  302. package/src/model/ggb-file.ts +30 -0
  303. package/src/types.d.ts +3 -0
  304. package/{widgets → src/widgets}/webwriter-geogebra-3d.ts +1 -1
  305. package/{widgets → src/widgets}/webwriter-geogebra.ts +1 -2
  306. package/tests/conversions.test.ts +80 -0
  307. package/tests/data-block.test.ts +72 -0
  308. package/tests/helpers.ts +48 -0
  309. package/tests/language.test.ts +49 -0
  310. package/tests/presentation.test.ts +80 -0
  311. package/tsconfig.json +3 -7
  312. package/assets/icons/file-earmark-arrow-up.svg +0 -4
  313. package/components/geogebra-app.styles.ts +0 -10
  314. package/components/geogebra-options.styles.ts +0 -37
  315. package/components/geogebra-options.ts +0 -187
  316. package/custom.d.ts +0 -180
  317. package/dist/widgets/webwriter-geogebra-3d.css +0 -444
  318. package/dist/widgets/webwriter-geogebra-classic.css +0 -444
  319. package/dist/widgets/webwriter-geogebra-geometry.css +0 -444
  320. package/dist/widgets/webwriter-geogebra-notes.css +0 -444
  321. package/dist/widgets/webwriter-geogebra-scientific.css +0 -444
  322. package/dist/widgets/webwriter-geogebra.css +0 -444
  323. package/localization/generated/locale-codes.js +0 -83
  324. package/localization/generated/zh-hans.ts +0 -20
  325. package/localization/generated/zh-hant.ts +0 -20
  326. package/localization/zh-hans.xlf +0 -30
  327. package/localization/zh-hant.xlf +0 -30
  328. package/widgets/webwriter-geogebra-evaluator.ts +0 -15
  329. /package/.github/workflows/{main.yml → publish.yml} +0 -0
  330. /package/localization/pkg/{zh-hans.xliff → zh-Hans.xliff} +0 -0
  331. /package/localization/pkg/{zh-hant.xliff → zh-Hant.xliff} +0 -0
  332. /package/localization/snippets/{zh-hans.xliff → zh-Hans.xliff} +0 -0
  333. /package/localization/snippets/{zh-hant.xliff → zh-Hant.xliff} +0 -0
  334. /package/{utils → src/model}/boolean-attribute-converter.ts +0 -0
  335. /package/{widgets → src/widgets}/webwriter-geogebra-classic.ts +0 -0
  336. /package/{widgets → src/widgets}/webwriter-geogebra-geometry.ts +0 -0
  337. /package/{widgets → src/widgets}/webwriter-geogebra-notes.ts +0 -0
  338. /package/{widgets → src/widgets}/webwriter-geogebra-scientific.ts +0 -0
@@ -0,0 +1,781 @@
1
+ import {
2
+ sourceLocale,
3
+ targetLocales
4
+ } from "./chunk-ANJTU3IB.js";
5
+ import {
6
+ __decorateElement,
7
+ __decoratorMetadata,
8
+ __decoratorStart,
9
+ __glob,
10
+ __privateAdd,
11
+ __privateGet,
12
+ __publicField,
13
+ __runInitializers
14
+ } from "./chunk-BSUFUO7E.js";
15
+
16
+ // src/components/geogebra-app.ts
17
+ import { LitElementWw } from "@webwriter/lit";
18
+ import { localizer } from "@webwriter/lit/localize";
19
+ import { jsonData } from "@webwriter/lit/data";
20
+ import { html, css as css2 } from "lit";
21
+ import { property, state } from "lit/decorators.js";
22
+ import { keyed } from "lit/directives/keyed.js";
23
+
24
+ // src/components/geogebra-app.styles.ts
25
+ import { css } from "lit";
26
+ var geogebraAppStyles = css`
27
+ :host {
28
+ display: block;
29
+ box-sizing: border-box;
30
+ min-width: 300px;
31
+ max-width: 2100px;
32
+ min-height: 18rem;
33
+ color: var(--ww-text-color, inherit);
34
+ font-family: var(--ww-font-family, inherit);
35
+ }
36
+
37
+ iframe {
38
+ display: block;
39
+ border: none;
40
+ width: 100%;
41
+ aspect-ratio: 16/9;
42
+ min-height: 18rem;
43
+ }
44
+
45
+ iframe:focus-visible {
46
+ outline: 2px solid var(--ww-link-color, currentColor);
47
+ outline-offset: -2px;
48
+ }
49
+
50
+ .print-note {
51
+ display: none;
52
+ }
53
+
54
+ @media print {
55
+ :host {
56
+ max-width: 100%;
57
+ break-inside: avoid;
58
+ }
59
+
60
+ .applet:not([data-ready]) iframe {
61
+ display: none;
62
+ }
63
+
64
+ .applet:not([data-ready]) .print-note {
65
+ display: block;
66
+ padding: 0.75rem;
67
+ border: 1px solid currentColor;
68
+ }
69
+ }
70
+ `;
71
+
72
+ // src/model/boolean-attribute-converter.ts
73
+ var booleanAttributeConverter = {
74
+ fromAttribute(value) {
75
+ return value === "true";
76
+ },
77
+ toAttribute(value) {
78
+ return value ? "true" : "false";
79
+ }
80
+ };
81
+
82
+ // src/model/geogebra-options.ts
83
+ var geogebraOptions = {
84
+ type: { type: "select", control: "select", label: (widget) => ({ _: widget.msg("Type") }), options: [
85
+ { value: "classic", label: (widget) => ({ _: widget.msg("Classic") }) },
86
+ { value: "geometry", label: (widget) => ({ _: widget.msg("Geometry") }) },
87
+ { value: "3d", label: (widget) => ({ _: widget.msg("3D") }) },
88
+ { value: "suite", label: (widget) => ({ _: widget.msg("Calculator Suite") }) },
89
+ { value: "evaluator", label: (widget) => ({ _: widget.msg("Evaluator") }) },
90
+ { value: "scientific", label: (widget) => ({ _: widget.msg("Scientific") }) },
91
+ { value: "notes", label: (widget) => ({ _: widget.msg("Notes") }) }
92
+ ] },
93
+ borderColor: { type: String, label: (widget) => ({ _: widget.msg("Border color") }) },
94
+ borderRadius: { type: Number, label: (widget) => ({ _: widget.msg("Border radius") }) },
95
+ enableRightClick: { type: Boolean, label: (widget) => ({ _: widget.msg("Enable right click") }) },
96
+ enableLabelDrags: { type: Boolean, label: (widget) => ({ _: widget.msg("Allow dragging labels") }) },
97
+ enableShiftDragZoom: { type: Boolean, label: (widget) => ({ _: widget.msg("Enable Shift-drag zoom") }) },
98
+ showZoomButtons: { type: Boolean, label: (widget) => ({ _: widget.msg("Show zoom buttons") }) },
99
+ errorDialogsActive: { type: Boolean, label: (widget) => ({ _: widget.msg("Show error dialogs") }) },
100
+ showMenuBar: { type: Boolean, label: (widget) => ({ _: widget.msg("Show menu bar") }) },
101
+ showToolBar: { type: Boolean, label: (widget) => ({ _: widget.msg("Show toolbar") }) },
102
+ showToolBarHelp: { type: Boolean, label: (widget) => ({ _: widget.msg("Show toolbar help") }) },
103
+ customToolBar: { type: String, label: (widget) => ({ _: widget.msg("Custom toolbar") }) },
104
+ showAlgebraInput: { type: Boolean, label: (widget) => ({ _: widget.msg("Show algebra input") }) },
105
+ showResetIcon: { type: Boolean, label: (widget) => ({ _: widget.msg("Show reset icon") }) },
106
+ language: { type: String, label: (widget) => ({ _: widget.msg("Language") }) },
107
+ country: { type: String, label: (widget) => ({ _: widget.msg("Country") }) },
108
+ appletId: { type: String, label: (widget) => ({ _: widget.msg("Applet ID") }) },
109
+ allowStyleBar: { type: Boolean, label: (widget) => ({ _: widget.msg("Allow style bar") }) },
110
+ randomize: { type: Boolean, label: (widget) => ({ _: widget.msg("Randomize") }) },
111
+ randomSeed: { type: Number, label: (widget) => ({ _: widget.msg("Random seed") }) },
112
+ useBrowserForJs: { type: Boolean, label: (widget) => ({ _: widget.msg("Use browser for JavaScript") }) },
113
+ showLogging: { type: Boolean, label: (widget) => ({ _: widget.msg("Show log messages") }) },
114
+ capturingThreshold: { type: Number, label: (widget) => ({ _: widget.msg("Point capture threshold") }) },
115
+ enableFileFeatures: { type: Boolean, label: (widget) => ({ _: widget.msg("Enable file features") }) },
116
+ enableUndoRedo: { type: Boolean, label: (widget) => ({ _: widget.msg("Enable undo and redo") }) },
117
+ perspective: { type: String, label: (widget) => ({ _: widget.msg("Perspective") }) },
118
+ enable3d: { type: Boolean, label: (widget) => ({ _: widget.msg("Enable 3D") }) },
119
+ enableCAS: { type: Boolean, label: (widget) => ({ _: widget.msg("Enable CAS") }) },
120
+ algebraInputPosition: { type: "select", label: (widget) => ({ _: widget.msg("Algebra input position") }), options: [
121
+ { value: "algebra", label: (widget) => ({ _: widget.msg("Algebra") }) },
122
+ { value: "top", label: (widget) => ({ _: widget.msg("Top") }) },
123
+ { value: "bottom", label: (widget) => ({ _: widget.msg("Bottom") }) }
124
+ ] },
125
+ preventFocus: { type: Boolean, label: (widget) => ({ _: widget.msg("Prevent focus") }) },
126
+ scaleContainerClass: { type: String, label: (widget) => ({ _: widget.msg("Scale container CSS class") }) },
127
+ autoHeight: { type: Boolean, label: (widget) => ({ _: widget.msg("Automatic height") }) },
128
+ allowUpscale: { type: Boolean, label: (widget) => ({ _: widget.msg("Allow upscaling") }) },
129
+ playButton: { type: Boolean, label: (widget) => ({ _: widget.msg("Play button") }) },
130
+ scale: { type: Number, label: (widget) => ({ _: widget.msg("Scale") }) },
131
+ showAnimationButton: { type: Boolean, label: (widget) => ({ _: widget.msg("Show animation button") }) },
132
+ showFullscreenButton: { type: Boolean, label: (widget) => ({ _: widget.msg("Show fullscreen button") }) },
133
+ showSuggestionButtons: { type: Boolean, label: (widget) => ({ _: widget.msg("Show suggestion buttons") }) },
134
+ showStartTooltip: { type: Boolean, label: (widget) => ({ _: widget.msg("Show startup tooltip") }) },
135
+ rounding: { type: String, label: (widget) => ({ _: widget.msg("Rounding") }) },
136
+ buttonShadows: { type: Boolean, label: (widget) => ({ _: widget.msg("Button shadows") }) },
137
+ buttonRounding: { type: Number, label: (widget) => ({ _: widget.msg("Button corner rounding") }) },
138
+ buttonBorderColor: { type: String, label: (widget) => ({ _: widget.msg("Button border color") }) },
139
+ editorBackgroundColor: { type: String, label: (widget) => ({ _: widget.msg("Editor background color") }) },
140
+ editorForegroundColor: { type: String, label: (widget) => ({ _: widget.msg("Editor foreground color") }) },
141
+ textmode: { type: Boolean, label: (widget) => ({ _: widget.msg("Text mode") }) },
142
+ showKeyboardOnFocus: { type: Boolean, label: (widget) => ({ _: widget.msg("Show keyboard on focus") }) },
143
+ keyboardType: { type: "select", label: (widget) => ({ _: widget.msg("Keyboard type") }), options: [
144
+ { value: "scientific", label: (widget) => ({ _: widget.msg("Scientific") }) },
145
+ { value: "normal", label: (widget) => ({ _: widget.msg("Normal") }) },
146
+ { value: "notes", label: (widget) => ({ _: widget.msg("Notes") }) }
147
+ ] },
148
+ transparentGraphics: { type: Boolean, label: (widget) => ({ _: widget.msg("Transparent graphics") }) },
149
+ disabledJavaScript: { type: Boolean, label: (widget) => ({ _: widget.msg("Disable JavaScript") }) },
150
+ detachedKeyboardParent: { type: String, label: (widget) => ({ _: widget.msg("Detached keyboard parent") }) }
151
+ };
152
+
153
+ // src/model/geogebra-parameters.ts
154
+ var passThroughParameters = [
155
+ "width",
156
+ "height",
157
+ "borderColor",
158
+ "borderRadius",
159
+ "enableRightClick",
160
+ "enableLabelDrags",
161
+ "enableShiftDragZoom",
162
+ "showZoomButtons",
163
+ "errorDialogsActive",
164
+ "showMenuBar",
165
+ "showToolBar",
166
+ "showToolBarHelp",
167
+ "customToolBar",
168
+ "showAlgebraInput",
169
+ "showResetIcon"
170
+ ];
171
+ var passThroughParametersAfterLocale = [
172
+ "allowStyleBar",
173
+ "randomize",
174
+ "randomSeed",
175
+ "useBrowserForJs",
176
+ "showLogging",
177
+ "capturingThreshold",
178
+ "enableFileFeatures",
179
+ "perspective",
180
+ "enable3d",
181
+ "enableCAS",
182
+ "algebraInputPosition",
183
+ "preventFocus",
184
+ "scaleContainerClass",
185
+ "autoHeight",
186
+ "allowUpscale",
187
+ "playButton",
188
+ "scale",
189
+ "showAnimationButton",
190
+ "showFullscreenButton",
191
+ "showSuggestionButtons",
192
+ "showStartTooltip",
193
+ "rounding",
194
+ "buttonShadows",
195
+ "buttonRounding",
196
+ "buttonBorderColor",
197
+ "editorBackgroundColor",
198
+ "editorForegroundColor",
199
+ "textmode",
200
+ "showKeyboardOnFocus",
201
+ "keyboardType",
202
+ "transparentGraphics",
203
+ "disabledJavaScript",
204
+ "detachedKeyboardParent"
205
+ ];
206
+ function appletParameters(source, lang, sourceLocale2) {
207
+ let locale;
208
+ try {
209
+ locale = new Intl.Locale(lang.trim() || sourceLocale2);
210
+ } catch (error) {
211
+ if (!(error instanceof RangeError)) throw error;
212
+ locale = new Intl.Locale(sourceLocale2);
213
+ }
214
+ let filename, material_id, ggbBase64;
215
+ const { src, language } = source;
216
+ if (src?.startsWith("data:")) ggbBase64 = src.split(",").at(-1);
217
+ else if (src?.startsWith("ggbid:")) material_id = src.slice("ggbid:".length);
218
+ else if (src) filename = src;
219
+ const pick = (keys) => Object.fromEntries(keys.map((key) => [key, source[key]]));
220
+ return {
221
+ id: source.appletId,
222
+ appName: source.type,
223
+ filename,
224
+ material_id,
225
+ ggbBase64,
226
+ ...pick(passThroughParameters),
227
+ language: language ?? locale.language,
228
+ country: source.country ?? (language ? void 0 : locale.region ?? (locale.script ? locale.maximize().region : void 0)),
229
+ ...pick(passThroughParametersAfterLocale)
230
+ };
231
+ }
232
+
233
+ // src/model/ggb-file.ts
234
+ var GGB_MEDIA_TYPE = "application/vnd.geogebra.file";
235
+ var ZIP_MAGIC = [80, 75, 3, 4];
236
+ function isGgbArchive(bytes) {
237
+ return bytes.length > ZIP_MAGIC.length && ZIP_MAGIC.every((value, index) => bytes[index] === value);
238
+ }
239
+ function bytesToBase64(bytes) {
240
+ let binary = "";
241
+ for (let index = 0; index < bytes.length; index += 32768) {
242
+ binary += String.fromCharCode(...bytes.subarray(index, index + 32768));
243
+ }
244
+ return btoa(binary);
245
+ }
246
+ function base64ToBytes(base64) {
247
+ const binary = atob(base64);
248
+ const bytes = new Uint8Array(binary.length);
249
+ for (let index = 0; index < binary.length; index++) bytes[index] = binary.charCodeAt(index);
250
+ return bytes;
251
+ }
252
+ var ggbDataUrl = (base64) => `data:${GGB_MEDIA_TYPE};base64,${base64}`;
253
+ function dataUrlPayload(src) {
254
+ return src?.startsWith("data:") ? src.split(",").at(-1) : void 0;
255
+ }
256
+
257
+ // import("../../localization/generated/**/*.ts") in src/components/geogebra-app.ts
258
+ var globImport_localization_generated_ts = __glob({
259
+ "../../localization/generated/af.ts": () => import("./af-35CD6HFH.js"),
260
+ "../../localization/generated/am.ts": () => import("./am-JMDT5LI7.js"),
261
+ "../../localization/generated/ar.ts": () => import("./ar-JL4QKYYL.js"),
262
+ "../../localization/generated/az.ts": () => import("./az-3SZS6WCY.js"),
263
+ "../../localization/generated/be.ts": () => import("./be-C4GWVHR2.js"),
264
+ "../../localization/generated/bg.ts": () => import("./bg-6QGE5EQ4.js"),
265
+ "../../localization/generated/bn.ts": () => import("./bn-UM2BV46R.js"),
266
+ "../../localization/generated/bs.ts": () => import("./bs-XE2PWKCS.js"),
267
+ "../../localization/generated/ca-balear.ts": () => import("./ca-balear-GJKWY5R7.js"),
268
+ "../../localization/generated/ca-valencia.ts": () => import("./ca-valencia-CNQYSJSJ.js"),
269
+ "../../localization/generated/ca.ts": () => import("./ca-ZO2BQKPZ.js"),
270
+ "../../localization/generated/cnr.ts": () => import("./cnr-MCZGASOD.js"),
271
+ "../../localization/generated/cs.ts": () => import("./cs-4Q7FRISG.js"),
272
+ "../../localization/generated/cy.ts": () => import("./cy-7VXG3AYH.js"),
273
+ "../../localization/generated/da.ts": () => import("./da-VDMHGBXD.js"),
274
+ "../../localization/generated/de-AT.ts": () => import("./de-AT-YM5GCI75.js"),
275
+ "../../localization/generated/de-CH.ts": () => import("./de-CH-LQNHTGYT.js"),
276
+ "../../localization/generated/de.ts": () => import("./de-GJT7RSHT.js"),
277
+ "../../localization/generated/el.ts": () => import("./el-ZVUVWEQ3.js"),
278
+ "../../localization/generated/en-AU.ts": () => import("./en-AU-PCIYYC4M.js"),
279
+ "../../localization/generated/en-CA.ts": () => import("./en-CA-37T7YUIL.js"),
280
+ "../../localization/generated/en-GB.ts": () => import("./en-GB-ZYCA2CIZ.js"),
281
+ "../../localization/generated/en-IN.ts": () => import("./en-IN-EPHXLNO6.js"),
282
+ "../../localization/generated/en-US.ts": () => import("./en-US-ECSJ5HDL.js"),
283
+ "../../localization/generated/es.ts": () => import("./es-5VBYK2HE.js"),
284
+ "../../localization/generated/et.ts": () => import("./et-OFQRRTW6.js"),
285
+ "../../localization/generated/eu.ts": () => import("./eu-7TNOYFB7.js"),
286
+ "../../localization/generated/fa.ts": () => import("./fa-KZU6GKWU.js"),
287
+ "../../localization/generated/fi.ts": () => import("./fi-THJEKJPW.js"),
288
+ "../../localization/generated/fr.ts": () => import("./fr-MUVVTBQZ.js"),
289
+ "../../localization/generated/ga.ts": () => import("./ga-UWUVCWOT.js"),
290
+ "../../localization/generated/gl.ts": () => import("./gl-NHQ52YCN.js"),
291
+ "../../localization/generated/gu.ts": () => import("./gu-HVDD4QHO.js"),
292
+ "../../localization/generated/ha.ts": () => import("./ha-2BPTATOZ.js"),
293
+ "../../localization/generated/he.ts": () => import("./he-MDESCUHJ.js"),
294
+ "../../localization/generated/hi.ts": () => import("./hi-C6BGPR4Y.js"),
295
+ "../../localization/generated/hr.ts": () => import("./hr-77MP3ELT.js"),
296
+ "../../localization/generated/hu.ts": () => import("./hu-7PRNX6NB.js"),
297
+ "../../localization/generated/hy.ts": () => import("./hy-R3VEL63L.js"),
298
+ "../../localization/generated/id.ts": () => import("./id-O6B2T3Y2.js"),
299
+ "../../localization/generated/is.ts": () => import("./is-XLNS5CAZ.js"),
300
+ "../../localization/generated/it.ts": () => import("./it-NZODUGUP.js"),
301
+ "../../localization/generated/ja.ts": () => import("./ja-FFK5WXSB.js"),
302
+ "../../localization/generated/jv.ts": () => import("./jv-GS3IRAIB.js"),
303
+ "../../localization/generated/ka.ts": () => import("./ka-NWIJAO54.js"),
304
+ "../../localization/generated/kk.ts": () => import("./kk-WQFRFG44.js"),
305
+ "../../localization/generated/km.ts": () => import("./km-AUKBN3YT.js"),
306
+ "../../localization/generated/kn.ts": () => import("./kn-PKZFPECM.js"),
307
+ "../../localization/generated/ko.ts": () => import("./ko-XNGAWKQ4.js"),
308
+ "../../localization/generated/ky.ts": () => import("./ky-AQTYDJIL.js"),
309
+ "../../localization/generated/la.ts": () => import("./la-ERS7V4N4.js"),
310
+ "../../localization/generated/lb.ts": () => import("./lb-KU3DVPI4.js"),
311
+ "../../localization/generated/locale-codes.ts": () => import("./locale-codes-TGY5LMYX.js"),
312
+ "../../localization/generated/lt.ts": () => import("./lt-6RI4HSG3.js"),
313
+ "../../localization/generated/lv.ts": () => import("./lv-RGIUQVA7.js"),
314
+ "../../localization/generated/mk.ts": () => import("./mk-JMAYXTCL.js"),
315
+ "../../localization/generated/ml.ts": () => import("./ml-5ZAIPAYV.js"),
316
+ "../../localization/generated/mn.ts": () => import("./mn-N2GZBVDP.js"),
317
+ "../../localization/generated/mr.ts": () => import("./mr-2SRCJIBC.js"),
318
+ "../../localization/generated/ms.ts": () => import("./ms-WHD5PUQM.js"),
319
+ "../../localization/generated/mt.ts": () => import("./mt-EXRK5UO6.js"),
320
+ "../../localization/generated/my.ts": () => import("./my-D2COGDRI.js"),
321
+ "../../localization/generated/nb.ts": () => import("./nb-3XNBS2DU.js"),
322
+ "../../localization/generated/ne.ts": () => import("./ne-PA4KUBGU.js"),
323
+ "../../localization/generated/nl.ts": () => import("./nl-QMM3PBPM.js"),
324
+ "../../localization/generated/nn.ts": () => import("./nn-CLFEMF2K.js"),
325
+ "../../localization/generated/no.ts": () => import("./no-CV376NZG.js"),
326
+ "../../localization/generated/or.ts": () => import("./or-KP7CET7X.js"),
327
+ "../../localization/generated/pa.ts": () => import("./pa-CH5JYVXT.js"),
328
+ "../../localization/generated/pl.ts": () => import("./pl-DDW4HT7M.js"),
329
+ "../../localization/generated/pt-BR.ts": () => import("./pt-BR-CVNA2MRU.js"),
330
+ "../../localization/generated/pt-PT.ts": () => import("./pt-PT-IZMPF3BY.js"),
331
+ "../../localization/generated/pt.ts": () => import("./pt-CRTRYTDJ.js"),
332
+ "../../localization/generated/ro.ts": () => import("./ro-FUOGHWJA.js"),
333
+ "../../localization/generated/ru.ts": () => import("./ru-KAT4X5EC.js"),
334
+ "../../localization/generated/si.ts": () => import("./si-GDAXEOBK.js"),
335
+ "../../localization/generated/sk.ts": () => import("./sk-CDSK6MY5.js"),
336
+ "../../localization/generated/sl.ts": () => import("./sl-TFJQYNA4.js"),
337
+ "../../localization/generated/so.ts": () => import("./so-TXI6JJPW.js"),
338
+ "../../localization/generated/sq.ts": () => import("./sq-KMM2QIRU.js"),
339
+ "../../localization/generated/sr.ts": () => import("./sr-OTZNEL5Z.js"),
340
+ "../../localization/generated/sv.ts": () => import("./sv-7CANJ6CF.js"),
341
+ "../../localization/generated/sw.ts": () => import("./sw-5JDMTJ5K.js"),
342
+ "../../localization/generated/ta.ts": () => import("./ta-HT4SO7PD.js"),
343
+ "../../localization/generated/te.ts": () => import("./te-FECCLHOI.js"),
344
+ "../../localization/generated/tg.ts": () => import("./tg-FJWFJWF2.js"),
345
+ "../../localization/generated/th.ts": () => import("./th-JEP434LN.js"),
346
+ "../../localization/generated/tl.ts": () => import("./tl-GN35ZR2F.js"),
347
+ "../../localization/generated/tr.ts": () => import("./tr-IPVLQUE4.js"),
348
+ "../../localization/generated/uk.ts": () => import("./uk-LHWPGFRV.js"),
349
+ "../../localization/generated/ur.ts": () => import("./ur-7FU4XRAY.js"),
350
+ "../../localization/generated/uz.ts": () => import("./uz-RO7XCKFE.js"),
351
+ "../../localization/generated/vi.ts": () => import("./vi-5PHPTVV4.js"),
352
+ "../../localization/generated/zh-Hans.ts": () => import("./zh-Hans-UM7MUEDB.js"),
353
+ "../../localization/generated/zh-Hant.ts": () => import("./zh-Hant-7M2P4G7R.js"),
354
+ "../../localization/generated/zh.ts": () => import("./zh-LHCPWZN2.js")
355
+ });
356
+
357
+ // src/components/geogebra-app.ts
358
+ var _ready_dec, _resetKey_dec, _detachedKeyboardParent_dec, _disabledJavaScript_dec, _transparentGraphics_dec, _keyboardType_dec, _showKeyboardOnFocus_dec, _textmode_dec, _editorForegroundColor_dec, _editorBackgroundColor_dec, _buttonBorderColor_dec, _buttonRounding_dec, _buttonShadows_dec, _rounding_dec, _showStartTooltip_dec, _showSuggestionButtons_dec, _showFullscreenButton_dec, _showAnimationButton_dec, _scale_dec, _playButton_dec, _allowUpscale_dec, _autoHeight_dec, _scaleContainerClass_dec, _preventFocus_dec, _algebraInputPosition_dec, _enableCAS_dec, _enable3d_dec, _perspective_dec, _enableUndoRedo_dec, _enableFileFeatures_dec, _capturingThreshold_dec, _showLogging_dec, _useBrowserForJs_dec, _randomSeed_dec, _randomize_dec, _allowStyleBar_dec, _appletId_dec, _country_dec, _language_dec, _showResetIcon_dec, _showAlgebraInput_dec, _customToolBar_dec, _showToolBarHelp_dec, _showToolBar_dec, _showMenuBar_dec, _errorDialogsActive_dec, _showZoomButtons_dec, _enableShiftDragZoom_dec, _enableLabelDrags_dec, _enableRightClick_dec, _borderRadius_dec, _borderColor_dec, _src_dec, _height_dec, _width_dec, _type_dec, _ggbStyles_dec, _a, _data, _init, _ggbStyles, _type, _width, _height, _src, _borderColor, _borderRadius, _enableRightClick, _enableLabelDrags, _enableShiftDragZoom, _showZoomButtons, _errorDialogsActive, _showMenuBar, _showToolBar, _showToolBarHelp, _customToolBar, _showAlgebraInput, _showResetIcon, _language, _country, _appletId, _allowStyleBar, _randomize, _randomSeed, _useBrowserForJs, _showLogging, _capturingThreshold, _enableFileFeatures, _enableUndoRedo, _perspective, _enable3d, _enableCAS, _algebraInputPosition, _preventFocus, _scaleContainerClass, _autoHeight, _allowUpscale, _playButton, _scale, _showAnimationButton, _showFullscreenButton, _showSuggestionButtons, _showStartTooltip, _rounding, _buttonShadows, _buttonRounding, _buttonBorderColor, _editorBackgroundColor, _editorForegroundColor, _textmode, _showKeyboardOnFocus, _keyboardType, _transparentGraphics, _disabledJavaScript, _detachedKeyboardParent, _resetKey, _ready;
359
+ var GeogebraApp = class extends (_a = LitElementWw, _ggbStyles_dec = [property({ type: String })], _type_dec = [property({ type: String, attribute: true, reflect: true })], _width_dec = [property({ type: Number, attribute: true, reflect: true })], _height_dec = [property({ type: Number, attribute: true, reflect: true })], _src_dec = [property({ type: String, attribute: true, reflect: true, converter: {
360
+ fromAttribute: (value) => value,
361
+ toAttribute: (value) => value?.startsWith("data:") ? null : value
362
+ } })], _borderColor_dec = [property({ type: String, attribute: true, reflect: true })], _borderRadius_dec = [property({ type: Number, attribute: true, reflect: true })], _enableRightClick_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _enableLabelDrags_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _enableShiftDragZoom_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showZoomButtons_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _errorDialogsActive_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showMenuBar_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showToolBar_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showToolBarHelp_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _customToolBar_dec = [property({ type: String, attribute: true, reflect: true })], _showAlgebraInput_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showResetIcon_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _language_dec = [property({ type: String, attribute: true, reflect: true })], _country_dec = [property({ type: String, attribute: true, reflect: true })], _appletId_dec = [property({ type: String, attribute: true, reflect: true })], _allowStyleBar_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _randomize_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _randomSeed_dec = [property({ type: Number, attribute: true, reflect: true })], _useBrowserForJs_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showLogging_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _capturingThreshold_dec = [property({ type: Number, attribute: true, reflect: true })], _enableFileFeatures_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _enableUndoRedo_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _perspective_dec = [property({ type: String, attribute: true, reflect: true })], _enable3d_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _enableCAS_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _algebraInputPosition_dec = [property({ type: String, attribute: true, reflect: true })], _preventFocus_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _scaleContainerClass_dec = [property({ type: String, attribute: true, reflect: true })], _autoHeight_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _allowUpscale_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _playButton_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _scale_dec = [property({ type: Number, attribute: true, reflect: true })], _showAnimationButton_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showFullscreenButton_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showSuggestionButtons_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showStartTooltip_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _rounding_dec = [property({ type: String, attribute: true, reflect: true })], _buttonShadows_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _buttonRounding_dec = [property({ type: Number, attribute: true, reflect: true })], _buttonBorderColor_dec = [property({ type: String, attribute: true, reflect: true })], _editorBackgroundColor_dec = [property({ type: String, attribute: true, reflect: true })], _editorForegroundColor_dec = [property({ type: String, attribute: true, reflect: true })], _textmode_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _showKeyboardOnFocus_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _keyboardType_dec = [property({ type: String, attribute: true, reflect: true })], _transparentGraphics_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _disabledJavaScript_dec = [property({ type: Boolean, attribute: true, reflect: true, converter: booleanAttributeConverter })], _detachedKeyboardParent_dec = [property({ type: String, attribute: true, reflect: true })], _resetKey_dec = [property({ type: Number })], _ready_dec = [state()], _a) {
363
+ constructor() {
364
+ super(...arguments);
365
+ // The labels of the options are computed with msg, so the editor reads them again after a language change.
366
+ __publicField(this, "localize", localizer(this, {
367
+ sourceLocale,
368
+ targetLocales,
369
+ load: (locale) => globImport_localization_generated_ts(`../../localization/generated/${locale}.ts`),
370
+ drawer: true
371
+ }));
372
+ __publicField(this, "msg", this.localize.msg);
373
+ // The embedded construction is the "src" key of the JSON data block.
374
+ __privateAdd(this, _data, jsonData(this, {
375
+ defaults: {},
376
+ changed: ({ src }) => {
377
+ if (typeof src === "string" && src.startsWith("data:")) this.src = src;
378
+ }
379
+ }));
380
+ __privateAdd(this, _ggbStyles, __runInitializers(_init, 8, this, css2`
381
+ .GeoGebraFrame .toolbar .header-open-landscape .center, .GeoGebraFrame .toolbar .header-close-landscape .center {
382
+ top: 0 !important;
383
+ }
384
+ `.cssText)), __runInitializers(_init, 11, this);
385
+ __privateAdd(this, _type, __runInitializers(_init, 12, this, "classic")), __runInitializers(_init, 15, this);
386
+ __privateAdd(this, _width, __runInitializers(_init, 16, this, 800)), __runInitializers(_init, 19, this);
387
+ __privateAdd(this, _height, __runInitializers(_init, 20, this, 450)), __runInitializers(_init, 23, this);
388
+ __privateAdd(this, _src, __runInitializers(_init, 24, this)), __runInitializers(_init, 27, this);
389
+ __privateAdd(this, _borderColor, __runInitializers(_init, 28, this, "gray")), __runInitializers(_init, 31, this);
390
+ __privateAdd(this, _borderRadius, __runInitializers(_init, 32, this, 1)), __runInitializers(_init, 35, this);
391
+ __privateAdd(this, _enableRightClick, __runInitializers(_init, 36, this, true)), __runInitializers(_init, 39, this);
392
+ __privateAdd(this, _enableLabelDrags, __runInitializers(_init, 40, this, true)), __runInitializers(_init, 43, this);
393
+ __privateAdd(this, _enableShiftDragZoom, __runInitializers(_init, 44, this, true)), __runInitializers(_init, 47, this);
394
+ __privateAdd(this, _showZoomButtons, __runInitializers(_init, 48, this, false)), __runInitializers(_init, 51, this);
395
+ __privateAdd(this, _errorDialogsActive, __runInitializers(_init, 52, this, true)), __runInitializers(_init, 55, this);
396
+ __privateAdd(this, _showMenuBar, __runInitializers(_init, 56, this, false)), __runInitializers(_init, 59, this);
397
+ __privateAdd(this, _showToolBar, __runInitializers(_init, 60, this, true)), __runInitializers(_init, 63, this);
398
+ __privateAdd(this, _showToolBarHelp, __runInitializers(_init, 64, this, false)), __runInitializers(_init, 67, this);
399
+ __privateAdd(this, _customToolBar, __runInitializers(_init, 68, this)), __runInitializers(_init, 71, this);
400
+ __privateAdd(this, _showAlgebraInput, __runInitializers(_init, 72, this, true)), __runInitializers(_init, 75, this);
401
+ __privateAdd(this, _showResetIcon, __runInitializers(_init, 76, this, false)), __runInitializers(_init, 79, this);
402
+ __privateAdd(this, _language, __runInitializers(_init, 80, this)), __runInitializers(_init, 83, this);
403
+ __privateAdd(this, _country, __runInitializers(_init, 84, this)), __runInitializers(_init, 87, this);
404
+ __privateAdd(this, _appletId, __runInitializers(_init, 88, this)), __runInitializers(_init, 91, this);
405
+ __privateAdd(this, _allowStyleBar, __runInitializers(_init, 92, this, false)), __runInitializers(_init, 95, this);
406
+ __privateAdd(this, _randomize, __runInitializers(_init, 96, this, true)), __runInitializers(_init, 99, this);
407
+ __privateAdd(this, _randomSeed, __runInitializers(_init, 100, this)), __runInitializers(_init, 103, this);
408
+ __privateAdd(this, _useBrowserForJs, __runInitializers(_init, 104, this, false)), __runInitializers(_init, 107, this);
409
+ __privateAdd(this, _showLogging, __runInitializers(_init, 108, this, false)), __runInitializers(_init, 111, this);
410
+ __privateAdd(this, _capturingThreshold, __runInitializers(_init, 112, this, 3)), __runInitializers(_init, 115, this);
411
+ __privateAdd(this, _enableFileFeatures, __runInitializers(_init, 116, this, true)), __runInitializers(_init, 119, this);
412
+ __privateAdd(this, _enableUndoRedo, __runInitializers(_init, 120, this, true)), __runInitializers(_init, 123, this);
413
+ __privateAdd(this, _perspective, __runInitializers(_init, 124, this)), __runInitializers(_init, 127, this);
414
+ __privateAdd(this, _enable3d, __runInitializers(_init, 128, this)), __runInitializers(_init, 131, this);
415
+ __privateAdd(this, _enableCAS, __runInitializers(_init, 132, this)), __runInitializers(_init, 135, this);
416
+ __privateAdd(this, _algebraInputPosition, __runInitializers(_init, 136, this)), __runInitializers(_init, 139, this);
417
+ __privateAdd(this, _preventFocus, __runInitializers(_init, 140, this, false)), __runInitializers(_init, 143, this);
418
+ __privateAdd(this, _scaleContainerClass, __runInitializers(_init, 144, this)), __runInitializers(_init, 147, this);
419
+ __privateAdd(this, _autoHeight, __runInitializers(_init, 148, this, true)), __runInitializers(_init, 151, this);
420
+ __privateAdd(this, _allowUpscale, __runInitializers(_init, 152, this, false)), __runInitializers(_init, 155, this);
421
+ __privateAdd(this, _playButton, __runInitializers(_init, 156, this, false)), __runInitializers(_init, 159, this);
422
+ __privateAdd(this, _scale, __runInitializers(_init, 160, this, 1)), __runInitializers(_init, 163, this);
423
+ __privateAdd(this, _showAnimationButton, __runInitializers(_init, 164, this, false)), __runInitializers(_init, 167, this);
424
+ __privateAdd(this, _showFullscreenButton, __runInitializers(_init, 168, this, false)), __runInitializers(_init, 171, this);
425
+ __privateAdd(this, _showSuggestionButtons, __runInitializers(_init, 172, this, false)), __runInitializers(_init, 175, this);
426
+ __privateAdd(this, _showStartTooltip, __runInitializers(_init, 176, this, false)), __runInitializers(_init, 179, this);
427
+ __privateAdd(this, _rounding, __runInitializers(_init, 180, this)), __runInitializers(_init, 183, this);
428
+ __privateAdd(this, _buttonShadows, __runInitializers(_init, 184, this, false)), __runInitializers(_init, 187, this);
429
+ __privateAdd(this, _buttonRounding, __runInitializers(_init, 188, this, 0.2)), __runInitializers(_init, 191, this);
430
+ __privateAdd(this, _buttonBorderColor, __runInitializers(_init, 192, this)), __runInitializers(_init, 195, this);
431
+ __privateAdd(this, _editorBackgroundColor, __runInitializers(_init, 196, this)), __runInitializers(_init, 199, this);
432
+ __privateAdd(this, _editorForegroundColor, __runInitializers(_init, 200, this)), __runInitializers(_init, 203, this);
433
+ __privateAdd(this, _textmode, __runInitializers(_init, 204, this, false)), __runInitializers(_init, 207, this);
434
+ __privateAdd(this, _showKeyboardOnFocus, __runInitializers(_init, 208, this)), __runInitializers(_init, 211, this);
435
+ __privateAdd(this, _keyboardType, __runInitializers(_init, 212, this)), __runInitializers(_init, 215, this);
436
+ __privateAdd(this, _transparentGraphics, __runInitializers(_init, 216, this, false)), __runInitializers(_init, 219, this);
437
+ __privateAdd(this, _disabledJavaScript, __runInitializers(_init, 220, this, false)), __runInitializers(_init, 223, this);
438
+ __privateAdd(this, _detachedKeyboardParent, __runInitializers(_init, 224, this)), __runInitializers(_init, 227, this);
439
+ __privateAdd(this, _resetKey, __runInitializers(_init, 228, this, 0)), __runInitializers(_init, 231, this);
440
+ // A map of parameter names to their corresponding update functions in the GeoGebra API
441
+ __publicField(this, "paramUpdateMap");
442
+ __publicField(this, "api");
443
+ __publicField(this, "listeners");
444
+ __publicField(this, "srcFrame", 0);
445
+ __privateAdd(this, _ready, __runInitializers(_init, 232, this, false)), __runInitializers(_init, 235, this);
446
+ __publicField(this, "resizer");
447
+ __publicField(this, "resizeFrame", 0);
448
+ __publicField(this, "updatingGgb", false);
449
+ // Serializing the construction is costly and the applet reports every change of a drag, so it runs once per frame.
450
+ __publicField(this, "updateSrc", () => {
451
+ if (this.updatingGgb || !this.api || this.srcFrame) return;
452
+ this.srcFrame = requestAnimationFrame(this.writeSrc);
453
+ });
454
+ __publicField(this, "writeSrc", () => {
455
+ this.srcFrame = 0;
456
+ if (!this.updatingGgb && this.api) {
457
+ this.src = `data:application/vnd.geogebra.file;base64,${this.api.getBase64()}`;
458
+ }
459
+ });
460
+ }
461
+ get ggbProperties() {
462
+ return appletParameters(this, this.lang, sourceLocale);
463
+ }
464
+ connectedCallback() {
465
+ super.connectedCallback();
466
+ this.listeners = new AbortController();
467
+ this.addEventListener("ggb-load", (e) => {
468
+ const api = e.detail.api;
469
+ this.api = api;
470
+ this.ready = true;
471
+ this.observeSize();
472
+ api.registerAddListener(this.updateSrc);
473
+ api.registerClearListener(this.updateSrc);
474
+ api.registerUpdateListener(this.updateSrc);
475
+ api.registerRenameListener(this.updateSrc);
476
+ api.registerRemoveListener(this.updateSrc);
477
+ this.paramUpdateMap = /* @__PURE__ */ new Map([
478
+ ["width", api.setWidth],
479
+ ["height", api.setHeight],
480
+ ["enableRightClick", api.enableRightClick],
481
+ ["enableLabelDrags", api.enableLabelDrags],
482
+ ["enableShiftDragZoom", api.enableShiftDragZoom],
483
+ ["errorDialogsActive", api.setErrorDialogsActive],
484
+ ["showToolBar", api.showToolBar],
485
+ ["customToolBar", api.setCustomToolBar],
486
+ ["showAlgebraInput", api.showAlgebraInput],
487
+ ["showResetIcon", api.showResetIcon],
488
+ ["perspective", api.setPerspective],
489
+ ["enable3d", api.enable3D],
490
+ ["enableCAS", api.enableCAS],
491
+ ["rounding", api.setRounding]
492
+ ]);
493
+ }, { signal: this.listeners.signal });
494
+ }
495
+ disconnectedCallback() {
496
+ super.disconnectedCallback();
497
+ this.listeners?.abort();
498
+ this.resizer?.disconnect();
499
+ this.resizer = void 0;
500
+ cancelAnimationFrame(this.resizeFrame);
501
+ this.resizeFrame = 0;
502
+ this.ready = false;
503
+ if (this.srcFrame) {
504
+ cancelAnimationFrame(this.srcFrame);
505
+ this.writeSrc();
506
+ }
507
+ this.api = void 0;
508
+ }
509
+ updated(changed) {
510
+ super.updated(changed);
511
+ if (changed.has("src")) __privateGet(this, _data).set({ src: this.src?.startsWith("data:") ? this.src : void 0 });
512
+ const api = this.api;
513
+ if (!api) {
514
+ this.resetIFrame();
515
+ return;
516
+ }
517
+ if (this.paramUpdateMap) {
518
+ let needFullReload = false;
519
+ changed.forEach((_, key) => {
520
+ if (key === "src" || key === "ready") {
521
+ return;
522
+ }
523
+ const updateFunc = this.paramUpdateMap?.get(key.toString());
524
+ if (updateFunc) {
525
+ updateFunc.call(api, this[key]);
526
+ } else {
527
+ needFullReload = true;
528
+ }
529
+ });
530
+ if (needFullReload) {
531
+ this.resetIFrame();
532
+ return;
533
+ }
534
+ }
535
+ if (!changed.has("src")) {
536
+ return;
537
+ }
538
+ const base64 = this.src?.split(",").at(-1);
539
+ if (this.src && base64 !== api.getBase64()) {
540
+ this.updatingGgb = true;
541
+ api.setBase64(base64 ?? "", () => {
542
+ this.updatingGgb = false;
543
+ });
544
+ } else if (!this.src) {
545
+ this.updatingGgb = true;
546
+ api.setBase64("", () => {
547
+ this.updatingGgb = false;
548
+ });
549
+ }
550
+ }
551
+ async importConstruction(files) {
552
+ const file = files[0];
553
+ if (!file || !this.isConnected) return;
554
+ this.src = ggbDataUrl(bytesToBase64(new Uint8Array(await file.arrayBuffer())));
555
+ }
556
+ async importGgb(file) {
557
+ const bytes = new Uint8Array(await file.arrayBuffer());
558
+ if (!isGgbArchive(bytes)) throw new Error(this.msg("The file is not a GeoGebra construction (.ggb)."));
559
+ const src = ggbDataUrl(bytesToBase64(bytes));
560
+ return () => {
561
+ this.src = src;
562
+ };
563
+ }
564
+ exportGgb() {
565
+ const base64 = this.api?.getBase64() || dataUrlPayload(this.src);
566
+ if (!base64) return null;
567
+ return new File([base64ToBytes(base64)], "construction.ggb", { type: GGB_MEDIA_TYPE });
568
+ }
569
+ exportPng() {
570
+ const base64 = this.api?.getPNGBase64(1, false, 72);
571
+ if (!base64) return null;
572
+ return new File([base64ToBytes(base64)], "construction.png", { type: "image/png" });
573
+ }
574
+ exportSvg() {
575
+ const api = this.api;
576
+ if (!api) return null;
577
+ return new Promise((resolve) => {
578
+ const timeout = setTimeout(() => resolve(null), 8e3);
579
+ api.exportSVG((svg) => {
580
+ clearTimeout(timeout);
581
+ resolve(svg ? new File([svg], "construction.svg", { type: "image/svg+xml" }) : null);
582
+ });
583
+ });
584
+ }
585
+ initializeIFrame(iframe) {
586
+ const doc = iframe.contentDocument;
587
+ if (!doc || doc.getElementById("ggb-element")) {
588
+ return;
589
+ }
590
+ doc.body.style.margin = "0";
591
+ if (this.ggbStyles) {
592
+ const style = doc.createElement("style");
593
+ style.textContent = this.ggbStyles;
594
+ doc.head.append(style);
595
+ }
596
+ doc.body.addEventListener("focusin", () => this.dispatchEvent(new FocusEvent("focus", { bubbles: true, composed: true })));
597
+ const ggbEl = doc.createElement("div");
598
+ ggbEl.id = "ggb-element";
599
+ doc.body.append(ggbEl);
600
+ const deployScript = doc.createElement("script");
601
+ deployScript.src = "https://www.geogebra.org/apps/deployggb.js";
602
+ deployScript.addEventListener("load", () => {
603
+ const createScript = doc.createElement("script");
604
+ createScript.textContent = `
605
+ const applet = new GGBApplet({${JSON.stringify(this.ggbProperties).slice(1, -1)}, appletOnLoad: api => document.dispatchEvent(new CustomEvent("ggb-load", {bubbles: true, composed: true, detail: {api}}))})
606
+ applet.inject("ggb-element")
607
+ `;
608
+ doc.addEventListener("ggb-load", (e) => this.dispatchEvent(new CustomEvent("ggb-load", { bubbles: true, composed: true, detail: e.detail })));
609
+ doc.body.append(createScript);
610
+ });
611
+ doc.body.append(deployScript);
612
+ }
613
+ // The applet follows the size of the iframe, which follows the container; one resize per frame avoids loops.
614
+ observeSize() {
615
+ const iframe = this.renderRoot.querySelector("iframe");
616
+ if (!iframe) return;
617
+ this.resizer?.disconnect();
618
+ let last = "";
619
+ this.resizer = new ResizeObserver(() => {
620
+ cancelAnimationFrame(this.resizeFrame);
621
+ this.resizeFrame = requestAnimationFrame(() => {
622
+ const { width, height } = iframe.getBoundingClientRect();
623
+ const size = `${Math.round(width)}x${Math.round(height)}`;
624
+ if (!this.api || !iframe.isConnected || width < 1 || size === last) return;
625
+ last = size;
626
+ this.api.setSize(Math.round(width), Math.round(height));
627
+ });
628
+ });
629
+ this.resizer.observe(iframe);
630
+ }
631
+ focus(options) {
632
+ this.renderRoot.querySelector("iframe")?.focus(options);
633
+ }
634
+ resetIFrame() {
635
+ if (!this.api) {
636
+ return;
637
+ }
638
+ this.api = void 0;
639
+ this.ready = false;
640
+ this.resetKey++;
641
+ }
642
+ render() {
643
+ return html`
644
+ <div class="applet" ?data-ready=${this.ready}>
645
+ ${keyed(this.resetKey, html`<iframe id="ggb" part="applet" title=${this.msg("GeoGebra applet")} @load=${(e) => this.initializeIFrame(e.target)}></iframe>`)}
646
+ <p class="print-note">${this.msg("Interactive content: open the document online to use the GeoGebra applet.")}</p>
647
+ </div>
648
+ `;
649
+ }
650
+ };
651
+ _init = __decoratorStart(_a);
652
+ _data = new WeakMap();
653
+ _ggbStyles = new WeakMap();
654
+ _type = new WeakMap();
655
+ _width = new WeakMap();
656
+ _height = new WeakMap();
657
+ _src = new WeakMap();
658
+ _borderColor = new WeakMap();
659
+ _borderRadius = new WeakMap();
660
+ _enableRightClick = new WeakMap();
661
+ _enableLabelDrags = new WeakMap();
662
+ _enableShiftDragZoom = new WeakMap();
663
+ _showZoomButtons = new WeakMap();
664
+ _errorDialogsActive = new WeakMap();
665
+ _showMenuBar = new WeakMap();
666
+ _showToolBar = new WeakMap();
667
+ _showToolBarHelp = new WeakMap();
668
+ _customToolBar = new WeakMap();
669
+ _showAlgebraInput = new WeakMap();
670
+ _showResetIcon = new WeakMap();
671
+ _language = new WeakMap();
672
+ _country = new WeakMap();
673
+ _appletId = new WeakMap();
674
+ _allowStyleBar = new WeakMap();
675
+ _randomize = new WeakMap();
676
+ _randomSeed = new WeakMap();
677
+ _useBrowserForJs = new WeakMap();
678
+ _showLogging = new WeakMap();
679
+ _capturingThreshold = new WeakMap();
680
+ _enableFileFeatures = new WeakMap();
681
+ _enableUndoRedo = new WeakMap();
682
+ _perspective = new WeakMap();
683
+ _enable3d = new WeakMap();
684
+ _enableCAS = new WeakMap();
685
+ _algebraInputPosition = new WeakMap();
686
+ _preventFocus = new WeakMap();
687
+ _scaleContainerClass = new WeakMap();
688
+ _autoHeight = new WeakMap();
689
+ _allowUpscale = new WeakMap();
690
+ _playButton = new WeakMap();
691
+ _scale = new WeakMap();
692
+ _showAnimationButton = new WeakMap();
693
+ _showFullscreenButton = new WeakMap();
694
+ _showSuggestionButtons = new WeakMap();
695
+ _showStartTooltip = new WeakMap();
696
+ _rounding = new WeakMap();
697
+ _buttonShadows = new WeakMap();
698
+ _buttonRounding = new WeakMap();
699
+ _buttonBorderColor = new WeakMap();
700
+ _editorBackgroundColor = new WeakMap();
701
+ _editorForegroundColor = new WeakMap();
702
+ _textmode = new WeakMap();
703
+ _showKeyboardOnFocus = new WeakMap();
704
+ _keyboardType = new WeakMap();
705
+ _transparentGraphics = new WeakMap();
706
+ _disabledJavaScript = new WeakMap();
707
+ _detachedKeyboardParent = new WeakMap();
708
+ _resetKey = new WeakMap();
709
+ _ready = new WeakMap();
710
+ __decorateElement(_init, 4, "ggbStyles", _ggbStyles_dec, GeogebraApp, _ggbStyles);
711
+ __decorateElement(_init, 4, "type", _type_dec, GeogebraApp, _type);
712
+ __decorateElement(_init, 4, "width", _width_dec, GeogebraApp, _width);
713
+ __decorateElement(_init, 4, "height", _height_dec, GeogebraApp, _height);
714
+ __decorateElement(_init, 4, "src", _src_dec, GeogebraApp, _src);
715
+ __decorateElement(_init, 4, "borderColor", _borderColor_dec, GeogebraApp, _borderColor);
716
+ __decorateElement(_init, 4, "borderRadius", _borderRadius_dec, GeogebraApp, _borderRadius);
717
+ __decorateElement(_init, 4, "enableRightClick", _enableRightClick_dec, GeogebraApp, _enableRightClick);
718
+ __decorateElement(_init, 4, "enableLabelDrags", _enableLabelDrags_dec, GeogebraApp, _enableLabelDrags);
719
+ __decorateElement(_init, 4, "enableShiftDragZoom", _enableShiftDragZoom_dec, GeogebraApp, _enableShiftDragZoom);
720
+ __decorateElement(_init, 4, "showZoomButtons", _showZoomButtons_dec, GeogebraApp, _showZoomButtons);
721
+ __decorateElement(_init, 4, "errorDialogsActive", _errorDialogsActive_dec, GeogebraApp, _errorDialogsActive);
722
+ __decorateElement(_init, 4, "showMenuBar", _showMenuBar_dec, GeogebraApp, _showMenuBar);
723
+ __decorateElement(_init, 4, "showToolBar", _showToolBar_dec, GeogebraApp, _showToolBar);
724
+ __decorateElement(_init, 4, "showToolBarHelp", _showToolBarHelp_dec, GeogebraApp, _showToolBarHelp);
725
+ __decorateElement(_init, 4, "customToolBar", _customToolBar_dec, GeogebraApp, _customToolBar);
726
+ __decorateElement(_init, 4, "showAlgebraInput", _showAlgebraInput_dec, GeogebraApp, _showAlgebraInput);
727
+ __decorateElement(_init, 4, "showResetIcon", _showResetIcon_dec, GeogebraApp, _showResetIcon);
728
+ __decorateElement(_init, 4, "language", _language_dec, GeogebraApp, _language);
729
+ __decorateElement(_init, 4, "country", _country_dec, GeogebraApp, _country);
730
+ __decorateElement(_init, 4, "appletId", _appletId_dec, GeogebraApp, _appletId);
731
+ __decorateElement(_init, 4, "allowStyleBar", _allowStyleBar_dec, GeogebraApp, _allowStyleBar);
732
+ __decorateElement(_init, 4, "randomize", _randomize_dec, GeogebraApp, _randomize);
733
+ __decorateElement(_init, 4, "randomSeed", _randomSeed_dec, GeogebraApp, _randomSeed);
734
+ __decorateElement(_init, 4, "useBrowserForJs", _useBrowserForJs_dec, GeogebraApp, _useBrowserForJs);
735
+ __decorateElement(_init, 4, "showLogging", _showLogging_dec, GeogebraApp, _showLogging);
736
+ __decorateElement(_init, 4, "capturingThreshold", _capturingThreshold_dec, GeogebraApp, _capturingThreshold);
737
+ __decorateElement(_init, 4, "enableFileFeatures", _enableFileFeatures_dec, GeogebraApp, _enableFileFeatures);
738
+ __decorateElement(_init, 4, "enableUndoRedo", _enableUndoRedo_dec, GeogebraApp, _enableUndoRedo);
739
+ __decorateElement(_init, 4, "perspective", _perspective_dec, GeogebraApp, _perspective);
740
+ __decorateElement(_init, 4, "enable3d", _enable3d_dec, GeogebraApp, _enable3d);
741
+ __decorateElement(_init, 4, "enableCAS", _enableCAS_dec, GeogebraApp, _enableCAS);
742
+ __decorateElement(_init, 4, "algebraInputPosition", _algebraInputPosition_dec, GeogebraApp, _algebraInputPosition);
743
+ __decorateElement(_init, 4, "preventFocus", _preventFocus_dec, GeogebraApp, _preventFocus);
744
+ __decorateElement(_init, 4, "scaleContainerClass", _scaleContainerClass_dec, GeogebraApp, _scaleContainerClass);
745
+ __decorateElement(_init, 4, "autoHeight", _autoHeight_dec, GeogebraApp, _autoHeight);
746
+ __decorateElement(_init, 4, "allowUpscale", _allowUpscale_dec, GeogebraApp, _allowUpscale);
747
+ __decorateElement(_init, 4, "playButton", _playButton_dec, GeogebraApp, _playButton);
748
+ __decorateElement(_init, 4, "scale", _scale_dec, GeogebraApp, _scale);
749
+ __decorateElement(_init, 4, "showAnimationButton", _showAnimationButton_dec, GeogebraApp, _showAnimationButton);
750
+ __decorateElement(_init, 4, "showFullscreenButton", _showFullscreenButton_dec, GeogebraApp, _showFullscreenButton);
751
+ __decorateElement(_init, 4, "showSuggestionButtons", _showSuggestionButtons_dec, GeogebraApp, _showSuggestionButtons);
752
+ __decorateElement(_init, 4, "showStartTooltip", _showStartTooltip_dec, GeogebraApp, _showStartTooltip);
753
+ __decorateElement(_init, 4, "rounding", _rounding_dec, GeogebraApp, _rounding);
754
+ __decorateElement(_init, 4, "buttonShadows", _buttonShadows_dec, GeogebraApp, _buttonShadows);
755
+ __decorateElement(_init, 4, "buttonRounding", _buttonRounding_dec, GeogebraApp, _buttonRounding);
756
+ __decorateElement(_init, 4, "buttonBorderColor", _buttonBorderColor_dec, GeogebraApp, _buttonBorderColor);
757
+ __decorateElement(_init, 4, "editorBackgroundColor", _editorBackgroundColor_dec, GeogebraApp, _editorBackgroundColor);
758
+ __decorateElement(_init, 4, "editorForegroundColor", _editorForegroundColor_dec, GeogebraApp, _editorForegroundColor);
759
+ __decorateElement(_init, 4, "textmode", _textmode_dec, GeogebraApp, _textmode);
760
+ __decorateElement(_init, 4, "showKeyboardOnFocus", _showKeyboardOnFocus_dec, GeogebraApp, _showKeyboardOnFocus);
761
+ __decorateElement(_init, 4, "keyboardType", _keyboardType_dec, GeogebraApp, _keyboardType);
762
+ __decorateElement(_init, 4, "transparentGraphics", _transparentGraphics_dec, GeogebraApp, _transparentGraphics);
763
+ __decorateElement(_init, 4, "disabledJavaScript", _disabledJavaScript_dec, GeogebraApp, _disabledJavaScript);
764
+ __decorateElement(_init, 4, "detachedKeyboardParent", _detachedKeyboardParent_dec, GeogebraApp, _detachedKeyboardParent);
765
+ __decorateElement(_init, 4, "resetKey", _resetKey_dec, GeogebraApp, _resetKey);
766
+ __decorateElement(_init, 4, "ready", _ready_dec, GeogebraApp, _ready);
767
+ __decoratorMetadata(_init, GeogebraApp);
768
+ __publicField(GeogebraApp, "styles", geogebraAppStyles);
769
+ __publicField(GeogebraApp, "options", geogebraOptions);
770
+ __publicField(GeogebraApp, "actions", {
771
+ importConstruction: {
772
+ label: (widget) => ({ _: widget.msg("Import construction") }),
773
+ input: { type: "file", accept: ".ggb", multiple: false }
774
+ }
775
+ });
776
+ __publicField(GeogebraApp, "convertFrom", { ".ggb": "importGgb" });
777
+ __publicField(GeogebraApp, "convertTo", { ".ggb": "exportGgb", "image/png": "exportPng", "image/svg+xml": "exportSvg" });
778
+
779
+ export {
780
+ GeogebraApp
781
+ };