@cling-se/widget 1.0.0-beta.1 → 1.0.0-beta.3

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 (241) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.internal.md +82 -0
  3. package/README.md +14 -40
  4. package/README.public.md +14 -0
  5. package/dist/AddClientCallout-DRcy9Dqb.js +101 -0
  6. package/dist/AnswerModal-Dc3cgkap.js +3291 -0
  7. package/dist/AttachmentItem-Bef5zdHr.js +171 -0
  8. package/dist/BaseUpload--paElAyr.js +2472 -0
  9. package/dist/BlockMedia-DbVE3vsb.js +103 -0
  10. package/dist/CCallout-81NkOge7.js +104 -0
  11. package/dist/{CCurrencyDropdown-qH-3m2eP.js → CCurrencyDropdown-M3hi1VVi.js} +91 -49
  12. package/dist/CDropdownItem-DvaU14-V.js +749 -0
  13. package/dist/CFormField.vue_vue_type_script_setup_true_lang-B4s_Zfsp.js +292 -0
  14. package/dist/{CPhoneFormat-CfQayFxw.js → CPhoneFormat-BBQ_UIc_.js} +13 -21
  15. package/dist/CPhoneInput-Dw_LJDgc.js +207 -0
  16. package/dist/CPriceInput-BfWZZv0f.js +140 -0
  17. package/dist/CSelect-B1AAIFbK.js +98 -0
  18. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D56L_PYT.js +51 -0
  19. package/dist/ClientAutocomplete-D5veIKyZ.js +532 -0
  20. package/dist/ClientModal-D8_TPzkv.js +1181 -0
  21. package/dist/ColorPicker-C0OahiVg.js +1408 -0
  22. package/dist/CompanyModal-CjzwQU4B.js +250 -0
  23. package/dist/ContentWrapper-DrmiaFOz.js +265 -0
  24. package/dist/CoverBlockSettings-C9DWvA-C.js +861 -0
  25. package/dist/DocAnswer-BEsvAMEp.js +33 -0
  26. package/dist/DocDetails--LO0-S5d.js +448 -0
  27. package/dist/DocForm-D6_tGw06.js +6748 -0
  28. package/dist/DocFormSend-CdFL6rOD.js +171 -0
  29. package/dist/DocLinks-CIQFUh7c.js +36 -0
  30. package/dist/DocModalBase-DtPJK9sp.js +29 -0
  31. package/dist/DocPrint-qX88Ue2I.js +399 -0
  32. package/dist/DocReceipt-BbXoCmpz.js +341 -0
  33. package/dist/DocSendReminder-DZqOkd63.js +181 -0
  34. package/dist/DocTextEditor-Cw-Skmd4.js +19413 -0
  35. package/dist/DocTimeline-CdbSOVD1.js +537 -0
  36. package/dist/DocumentClient-DtTv7gkF.js +90 -0
  37. package/dist/DocumentLayout-BRfEjoYq.js +1368 -0
  38. package/dist/DocumentLogotype-CUNzyewq.js +162 -0
  39. package/dist/DocumentVoided-CgDt-JFI.js +33 -0
  40. package/dist/EmbedInput-rPvTnpXn.js +157 -0
  41. package/dist/EmbedSettings-BtmFxYGB.js +103 -0
  42. package/dist/ErrorCallout-B6YrdUsG.js +34 -0
  43. package/dist/FilePreviewModal-BfIqIIbb.js +202 -0
  44. package/dist/Flag-CE3K7-8a.js +41 -0
  45. package/dist/HeaderSettings-5QR7MmVf.js +720 -0
  46. package/dist/ImageSelectModal-E3hGi8ty.js +119 -0
  47. package/dist/ImageUploadWrapper-BaexFAAh.js +1585 -0
  48. package/dist/Index--gv5fH24.js +201 -0
  49. package/dist/{Index-D4XgxmbD.js → Index-B3ycPjAI.js} +10 -18
  50. package/dist/Index-B7ECpXAa.js +28 -0
  51. package/dist/Index-BIXfUsHH.js +52 -0
  52. package/dist/Index-BM658CCq.js +93 -0
  53. package/dist/{Index--qPMWUMT.js → Index-B_DCM_bL.js} +48 -61
  54. package/dist/Index-BcMATT2_.js +47 -0
  55. package/dist/Index-BpWFU3Td.js +68 -0
  56. package/dist/Index-BulSI5iO.js +38 -0
  57. package/dist/Index-CHInIRw5.js +228 -0
  58. package/dist/Index-COYqsxs9.js +25 -0
  59. package/dist/Index-CSGk060H.js +1098 -0
  60. package/dist/Index-CV2O2fWT.js +21 -0
  61. package/dist/{Index-Bu0MGrj6.js → Index-CXqdBSZ3.js} +313 -206
  62. package/dist/Index-CavttI66.js +126 -0
  63. package/dist/Index-CbZ65-O3.js +629 -0
  64. package/dist/Index-CqrTij2j.js +70 -0
  65. package/dist/Index-CrsGxDWC.js +16 -0
  66. package/dist/Index-CxY5Ii6K.js +49 -0
  67. package/dist/Index-D7Z2w9cd.js +163 -0
  68. package/dist/Index-D7ixmzBH.js +76 -0
  69. package/dist/Index-D7pzv-AR.js +74 -0
  70. package/dist/Index-D9keESQi.js +159 -0
  71. package/dist/Index-Dd6ueeUc.js +136 -0
  72. package/dist/{Index-DIOiMm9f.js → Index-DexIUz3R.js} +10 -18
  73. package/dist/Index-Dnmt6W0u.js +140 -0
  74. package/dist/Index-DtcV6rl1.js +4 -0
  75. package/dist/Index-DuDVafLn.js +3452 -0
  76. package/dist/Index-L913X8Ly.js +102 -0
  77. package/dist/Index-Mdn0niR_.js +28 -0
  78. package/dist/Index-_ellB2fs.js +363 -0
  79. package/dist/{Index-DcQbh-z2.js → Index-baSB5tPv.js} +9 -17
  80. package/dist/Index-bgKndj-l.js +39 -0
  81. package/dist/Index-lNYXAFUH.js +87 -0
  82. package/dist/Index.vue_vue_type_script_lang-DLogex2i.js +671 -0
  83. package/dist/InputToggleRow-BCvMVbW-.js +99 -0
  84. package/dist/ManualPopover-BzBvSl_x.js +57 -0
  85. package/dist/MediaWrapper-_LPau2Ks.js +18 -0
  86. package/dist/{NotBindingText-CNV2Wmdx.js → NotBindingText-DgcOjUmQ.js} +13 -17
  87. package/dist/PackageGroup-1X3jUipj.js +1058 -0
  88. package/dist/PdfTerms-Bf4TlzP5.js +34 -0
  89. package/dist/PdfViewer-BdhwFfc6.js +392 -0
  90. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-BgsfquR_.js +17 -0
  91. package/dist/PriceHeader-DyC8xssf.js +488 -0
  92. package/dist/SearchApi-C__orGkO.js +137 -0
  93. package/dist/SendForm-Be8uiuaJ.js +7031 -0
  94. package/dist/Setup-DbXs2Zar.js +47 -0
  95. package/dist/{SmartList-Qgu0rMrI.js → SmartList-BmmtZoZ0.js} +16 -24
  96. package/dist/Sortable.vue_vue_type_script_setup_true_lang-D0mloJIN.js +1303 -0
  97. package/dist/{TermsSettings-CE3h_xkm.js → TermsSettings-DsN6v5yj.js} +169 -49
  98. package/dist/ThemeColorRow-BL6p09pN.js +108 -0
  99. package/dist/ToggleBinding-B-tVioQ9.js +44 -0
  100. package/dist/UploadModal-BnA1xLMy.js +134 -0
  101. package/dist/VideoPlayerInput-D38S1IDH.js +135 -0
  102. package/dist/VideoPlayerSettings-B5iXoj5E.js +78 -0
  103. package/dist/VideoSelectModal-BNCoMFKU.js +217 -0
  104. package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
  105. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  106. package/dist/{debounce-C1AuSpOZ.js → debounce-CBRJalZI.js} +7 -7
  107. package/dist/dom-CkTGWrfu.js +69 -0
  108. package/dist/{focusDrawerMixin-Be6BAK8-.js → focusDrawerMixin-T94b2Y6F.js} +1 -1
  109. package/dist/{formDrawerState-DRbg5rVI.js → formDrawerState-jssoGOce.js} +2 -2
  110. package/dist/helpers-Vo_6Zz3M.js +44 -0
  111. package/dist/index-8g2jwLJx.js +513 -0
  112. package/dist/index-B0udVHyo.js +125 -0
  113. package/dist/index-D63IJVsJ.js +3525 -0
  114. package/dist/index-DCYCN_FR.js +508 -0
  115. package/dist/index-FRHGChx1.js +149 -0
  116. package/dist/index-HXiq8Yxs.js +270 -0
  117. package/dist/index-jOufDnZ8.js +188 -0
  118. package/dist/index.es.js +2 -5
  119. package/dist/index.umd.js +306 -1505
  120. package/dist/{main-WKzC-Dnu.js → main-C4OdoeS2.js} +36750 -37369
  121. package/dist/mapFormMixin-v-nbaWcx.js +1544 -0
  122. package/dist/omit-GuxX6Zt-.js +31 -0
  123. package/dist/{publicSenderState-BujjYsZZ.js → publicSenderState-C-7OMKKW.js} +4 -4
  124. package/dist/regions-BdZt9Srn.js +1250 -0
  125. package/dist/splitpanes-DChJiJ8d.js +342 -0
  126. package/dist/style.css +1 -4
  127. package/dist/template-m1V22cUt.js +1493 -0
  128. package/dist/{throttle-CWPJmFid.js → throttle-WWMDZKby.js} +2 -2
  129. package/dist/tippy.esm-Dz-faEsS.js +1994 -0
  130. package/dist/useTermsModal-C_eLdGLi.js +87 -0
  131. package/dist/{utils-CA_Zy6u1.js → utils-vnvZGRwQ.js} +8 -11
  132. package/dist/validation-C-dQpENM.js +40 -0
  133. package/package.json +25 -31
  134. package/.eslintrc.cjs +0 -4
  135. package/dist/AddClientCallout-BWnvyBcK.js +0 -46
  136. package/dist/AnswerModal-CLGRdSnK.js +0 -3874
  137. package/dist/AttachmentItem-BPS0-wyc.js +0 -78
  138. package/dist/BaseDatePicker-BbmV_GdD.js +0 -3183
  139. package/dist/BaseUpload-9gPgI7r6.js +0 -1977
  140. package/dist/BlockMedia-DkPFWiYL.js +0 -76
  141. package/dist/CCallout-T26jwUby.js +0 -59
  142. package/dist/CDropdownItem-BE8BAMD1.js +0 -636
  143. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  144. package/dist/CFormField-DECEfoVq.js +0 -241
  145. package/dist/CPriceInput-C4SOB-P5.js +0 -112
  146. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  147. package/dist/ClientAutocomplete-DSebA1Mx.js +0 -78
  148. package/dist/ClientModal-BXFYvYCF.js +0 -625
  149. package/dist/ColorPicker-CZ_bJabP.js +0 -2879
  150. package/dist/CompanyModal-CDr3t28n.js +0 -141
  151. package/dist/ContentWrapper-BwmMoe4W.js +0 -183
  152. package/dist/CoverBlockSettings-_F11-DGc.js +0 -275
  153. package/dist/DocAnswer-BR59xzkT.js +0 -36
  154. package/dist/DocDetails-D1qbCbps.js +0 -259
  155. package/dist/DocForm-DBc2a7z5.js +0 -7272
  156. package/dist/DocFormSend-Casix-yG.js +0 -144
  157. package/dist/DocLinks-DGTaewyX.js +0 -38
  158. package/dist/DocModalBase-BbS_qvSv.js +0 -28
  159. package/dist/DocPrint-0PqX3mbJ.js +0 -240
  160. package/dist/DocReceipt-CU3VD5pt.js +0 -210
  161. package/dist/DocSendReminder-CuycBspr.js +0 -137
  162. package/dist/DocTextEditor-CntS2Bd-.js +0 -17180
  163. package/dist/DocTimeline-DJuv3yBe.js +0 -481
  164. package/dist/DocumentClient-C25XXzz6.js +0 -136
  165. package/dist/DocumentLayout-B7afHRMr.js +0 -4909
  166. package/dist/DocumentLogotype-sqI51wvM.js +0 -87
  167. package/dist/DocumentVoided-TahdTSMn.js +0 -25
  168. package/dist/EmbedInput-BY-wHSfc.js +0 -113
  169. package/dist/EmbedSettings-8pfjk4NP.js +0 -72
  170. package/dist/ErrorCallout-Dsr8PNsU.js +0 -28
  171. package/dist/FilePreviewModal-CcEinEFg.js +0 -81
  172. package/dist/Flag-PJKrghi9.js +0 -114
  173. package/dist/HeaderSettings-BqczIOsG.js +0 -392
  174. package/dist/ImageSelectModal-Cd-HhKnH.js +0 -84
  175. package/dist/ImageUploadWrapper-Dv43rGdb.js +0 -1604
  176. package/dist/Index-6b5VBKE-.js +0 -107
  177. package/dist/Index-B4pRJnbw.js +0 -84
  178. package/dist/Index-B69f8qgZ.js +0 -62
  179. package/dist/Index-B79YN9RO.js +0 -25
  180. package/dist/Index-BBrlPoe8.js +0 -58
  181. package/dist/Index-BXfWJCuq.js +0 -52
  182. package/dist/Index-Bd76vb37.js +0 -55
  183. package/dist/Index-BmbtQO5F.js +0 -150
  184. package/dist/Index-ByV_kJaH.js +0 -77
  185. package/dist/Index-CDV5rhWS.js +0 -49
  186. package/dist/Index-CIx4OOK-.js +0 -144
  187. package/dist/Index-CL1OWLt6.js +0 -223
  188. package/dist/Index-Caow0eZu.js +0 -31
  189. package/dist/Index-Cd3-3PEK.js +0 -2402
  190. package/dist/Index-CdpZBEKU.js +0 -98
  191. package/dist/Index-CmU3Sys-.js +0 -754
  192. package/dist/Index-CtRtgnpm.js +0 -32
  193. package/dist/Index-Cukkr33D.js +0 -140
  194. package/dist/Index-Cuqw0ios.js +0 -57
  195. package/dist/Index-Czm_WdqC.js +0 -25
  196. package/dist/Index-DNdYXHgr.js +0 -33
  197. package/dist/Index-DcuBxutp.js +0 -642
  198. package/dist/Index-DpWNWiyY.js +0 -291
  199. package/dist/Index-DzS1rZdF.js +0 -24
  200. package/dist/Index-N6s5pZxv.js +0 -26
  201. package/dist/Index-g_DNu4mt.js +0 -69
  202. package/dist/Index-mJ8F41GY.js +0 -154
  203. package/dist/Index-q7W9KA8m.js +0 -21
  204. package/dist/Index-rtzblZp4.js +0 -70
  205. package/dist/InputToggleRow-CZjxsDOQ.js +0 -57
  206. package/dist/ManualPopover-CZrWiT-P.js +0 -58
  207. package/dist/MediaWrapper-D37qK4KR.js +0 -23
  208. package/dist/PackageGroup-Heo_s8ct.js +0 -699
  209. package/dist/PdfTerms-AB9tXAtU.js +0 -36
  210. package/dist/PdfViewer-CIVkvOBr.js +0 -373
  211. package/dist/PlainHtml-CPmIebjY.js +0 -20
  212. package/dist/PriceHeader-DhDAruwX.js +0 -339
  213. package/dist/SearchApi-BMgdaI4s.js +0 -161
  214. package/dist/Setup-VIaIV9uT.js +0 -50
  215. package/dist/ThemeColorRow-DYJNgk6S.js +0 -67
  216. package/dist/ToggleBinding-CuwCeYpO.js +0 -38
  217. package/dist/UploadModal-BITcxG-J.js +0 -95
  218. package/dist/VideoPlayerInput-8szEX_8L.js +0 -93
  219. package/dist/VideoPlayerSettings-BIPytm6w.js +0 -61
  220. package/dist/VideoSelectModal-B-Pe34nb.js +0 -100
  221. package/dist/answerDocumentMixin-W7vE1Gp4.js +0 -51
  222. package/dist/formComponentsInstall-Bm3VMOh6.js +0 -2507
  223. package/dist/formValidationMixin-COkY8COk.js +0 -49
  224. package/dist/index-BFvjENMH.js +0 -81
  225. package/dist/index-BV2nGWay.js +0 -492
  226. package/dist/index-BgJ05dYc.js +0 -165
  227. package/dist/index-CMPAXxzs.js +0 -347
  228. package/dist/index-DNDjI5uI.js +0 -3916
  229. package/dist/index-aoff9oUi.js +0 -102
  230. package/dist/mapFormMixin-QbevCwJK.js +0 -72
  231. package/dist/omit-CTp9CXoU.js +0 -31
  232. package/dist/splitpanes-BHUVsCZF.js +0 -382
  233. package/dist/tinycolor-kTl0yxzz.js +0 -633
  234. package/dist/tippy.esm-sS5koDSU.js +0 -1799
  235. package/dist/vuedraggable.umd-BA3ZDRAp.js +0 -3161
  236. package/dist/vuex.esm-DKGl8mcw.js +0 -467
  237. package/public/favicon.ico +0 -0
  238. package/tsconfig.json +0 -26
  239. package/tsconfig.node.json +0 -10
  240. package/tsconfig.paths.json +0 -17
  241. package/vite.config.ts +0 -60
@@ -0,0 +1,1368 @@
1
+ import { h as we, I as Z, o as P, d as J, s as be, l as ue, _ as he, x as Ke, P as Ye, dQ as kt, z as Me, c7 as Ne, b as Y, c as G, w as N, k as Ee, F as Ce, f as _e, Z as De, aq as Ie, p as St, a0 as Ze, K as Le, B as xe, v as M, j as de, H as _t, r as Et, a4 as Ct, u as Dt, i as re, dR as It, ca as Lt, bV as Pt, bE as Tt, S as ke, X as At, e as fe, dS as Ot, dT as jt, $ as zt, n as Ht, a1 as Bt, dU as Wt, cj as Mt } from "./main-C4OdoeS2.js";
2
+ import "./template-m1V22cUt.js";
3
+ import { a as Nt, C as Ft } from "./CDropdownItem-DvaU14-V.js";
4
+ import { d as $t } from "./debounce-CBRJalZI.js";
5
+ import "./helpers-Vo_6Zz3M.js";
6
+ const Rt = (e, t, r) => {
7
+ const n = e[t];
8
+ return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((s, c) => {
9
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
10
+ c.bind(
11
+ null,
12
+ new Error(
13
+ "Unknown variable dynamic import: " + t + (t.split("/").length !== r ? ". Note that variables only represent file names one level deep." : "")
14
+ )
15
+ )
16
+ );
17
+ });
18
+ }, Vt = { class: "c-loading" }, qt = /* @__PURE__ */ we({
19
+ __name: "LoadingBlock",
20
+ setup(e) {
21
+ const t = Z(`${Math.floor(Math.random() * 56 + 25)}%`);
22
+ return (r, n) => (P(), J("div", Vt, [
23
+ be("div", {
24
+ style: ue({ width: t.value }),
25
+ class: "c-loading-title"
26
+ }, null, 4),
27
+ n[0] || (n[0] = be("div", { class: "c-loading-body" }, null, -1))
28
+ ]));
29
+ }
30
+ }), Fe = /* @__PURE__ */ he(qt, [["__scopeId", "data-v-70f204ee"]]), Je = (e) => {
31
+ const t = Symbol(e);
32
+ return [(s) => Ke(t, s), (s) => Ye(t, s), t];
33
+ }, [Ut, Gt] = Je("DocumentWidth"), [Qt, nr] = Je("DocumentHeight");
34
+ function Kt(e) {
35
+ const { width: t, height: r } = kt(e);
36
+ return Ut(t), Qt(r), { width: t, height: r };
37
+ }
38
+ function Yt() {
39
+ return Gt(Z(window.innerWidth));
40
+ }
41
+ const Zt = {
42
+ name: "DynamicChapter",
43
+ components: {
44
+ DynamicChapter: Me(() => Promise.resolve().then(() => Xt)),
45
+ LoadingBlock: Fe
46
+ },
47
+ provide() {
48
+ return this.level !== 0 ? {} : {
49
+ _firstBlock: this._firstBlock,
50
+ _lastBlock: this._lastBlock
51
+ };
52
+ },
53
+ inject: {
54
+ isPdf: {
55
+ default: !1
56
+ }
57
+ },
58
+ props: {
59
+ componentProps: {
60
+ type: Object,
61
+ default: () => ({})
62
+ },
63
+ componentName: {
64
+ type: String,
65
+ required: !0
66
+ },
67
+ level: {
68
+ type: Number,
69
+ default: 0
70
+ },
71
+ isVisible: {
72
+ type: [Boolean, Object],
73
+ default: !0
74
+ },
75
+ _firstBlock: {
76
+ type: Boolean,
77
+ default: !1
78
+ },
79
+ _lastBlock: {
80
+ type: Boolean,
81
+ default: !1
82
+ },
83
+ children: {
84
+ type: Array,
85
+ default: () => []
86
+ },
87
+ onInput: {
88
+ type: Function,
89
+ default: () => {
90
+ }
91
+ },
92
+ onRemove: {
93
+ type: Function,
94
+ default: () => {
95
+ }
96
+ },
97
+ onMount: {
98
+ type: Function,
99
+ default: () => {
100
+ }
101
+ }
102
+ },
103
+ setup() {
104
+ return { docWidth: Yt() };
105
+ },
106
+ data() {
107
+ return {
108
+ component: Ne(Fe)
109
+ };
110
+ },
111
+ computed: {
112
+ loader() {
113
+ return () => Rt(/* @__PURE__ */ Object.assign({ "../blocks/answer/Index.vue": () => import("./Index-CbZ65-O3.js"), "../blocks/attachments/Index.vue": () => import("./Index-D7Z2w9cd.js"), "../blocks/coverBlock/Index.vue": () => import("./Index-CavttI66.js"), "../blocks/custom/Index.vue": () => import("./Index-CXqdBSZ3.js"), "../blocks/docChapter/Index.vue": () => import("./Index-BpWFU3Td.js"), "../blocks/docChapterSub/Index.vue": () => import("./Index-CxY5Ii6K.js"), "../blocks/docParties/Index.vue": () => import("./Index-_ellB2fs.js"), "../blocks/embed/Index.vue": () => import("./Index-L913X8Ly.js"), "../blocks/estimatedTimeToCompleteText/Index.vue": () => import("./Index-B7ECpXAa.js"), "../blocks/estimatedWorkStartAndEndAtText/Index.vue": () => import("./Index-Mdn0niR_.js"), "../blocks/extraWorkConstructionPricingList/Index.vue": () => import("./Index-BulSI5iO.js"), "../blocks/extraWorkTimeImpactText/Index.vue": () => import("./Index-bgKndj-l.js"), "../blocks/header/Index.vue": () => import("./Index--gv5fH24.js"), "../blocks/multiGroupPricing/Index.vue": () => import("./Index-BM658CCq.js"), "../blocks/notBinding/Index.vue": () => import("./Index-COYqsxs9.js"), "../blocks/packageGroup/Index.vue": () => import("./Index-D7pzv-AR.js"), "../blocks/pdf/Index.vue": () => import("./Index-D9keESQi.js"), "../blocks/presentation/Index.vue": () => import("./Index-CSGk060H.js"), "../blocks/terms/Index.vue": () => import("./Index-lNYXAFUH.js"), "../blocks/textContent/Index.vue": () => import("./Index-BcMATT2_.js"), "../blocks/videoPlayer/Index.vue": () => import("./Index-Dd6ueeUc.js"), "../blocks/workAddressText/Index.vue": () => import("./Index-CV2O2fWT.js") }), `../blocks/${this.componentName}/Index.vue`, 4);
114
+ },
115
+ isPdfPrintAndPdfBlock() {
116
+ var e, t;
117
+ return !!(this.isPdf && ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf");
118
+ },
119
+ isPdfBlock() {
120
+ var e, t;
121
+ return ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf";
122
+ }
123
+ },
124
+ mounted() {
125
+ this.loader().then(() => {
126
+ this.component = Ne(Me(() => this.loader()));
127
+ }).catch((e) => {
128
+ console.log(e);
129
+ });
130
+ }
131
+ };
132
+ function Jt(e, t, r, n, s, c) {
133
+ const l = Y("DynamicChapter", !0);
134
+ return s.component ? (P(), G(Ie(s.component), De({ key: 0 }, r.componentProps, {
135
+ class: r.level === 0 && [
136
+ {
137
+ "is-mobile": n.docWidth <= 640,
138
+ "is-tablet": n.docWidth > 640 && n.docWidth <= 1024,
139
+ "is-desktop": n.docWidth > 1024
140
+ },
141
+ r.componentProps && r.componentProps.classList ? r.componentProps.classList : ""
142
+ ],
143
+ "enable-spacing-x": !c.isPdfPrintAndPdfBlock,
144
+ "pdf-spacing-x": c.isPdfBlock,
145
+ "enable-spacing-y": !!(!c.isPdfPrintAndPdfBlock && r.isVisible),
146
+ onInput: r.onInput,
147
+ onRemove: r.onRemove,
148
+ onVnodeMounted: t[0] || (t[0] = (a) => r.onMount(e.$el))
149
+ }), {
150
+ default: N(() => [
151
+ r.children.length ? (P(!0), J(Ce, { key: 0 }, Ee(r.children, (a, d) => (P(), G(l, {
152
+ key: a.itemId + `${d}`,
153
+ "component-name": a.componentName,
154
+ "component-props": {
155
+ ...a.props,
156
+ _document: r.componentProps._document,
157
+ _value: a._value,
158
+ _nodeId: a.nodeId
159
+ },
160
+ children: a.children,
161
+ level: r.level + 1,
162
+ "on-input": r.onInput,
163
+ "on-remove": r.onRemove,
164
+ "on-mount": r.onMount
165
+ }, null, 8, ["component-name", "component-props", "children", "level", "on-input", "on-remove", "on-mount"]))), 128)) : _e("", !0)
166
+ ]),
167
+ _: 1
168
+ }, 16, ["class", "enable-spacing-x", "pdf-spacing-x", "enable-spacing-y", "onInput", "onRemove"])) : _e("", !0);
169
+ }
170
+ const Xe = /* @__PURE__ */ he(Zt, [["render", Jt]]), Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
171
+ __proto__: null,
172
+ default: Xe
173
+ }, Symbol.toStringTag, { value: "Module" })), et = "data-is-preview", en = St.google.fontsKey, tn = "https://www.googleapis.com/webfonts/v1/webfonts", nn = "https://fonts.googleapis.com/css", $e = {
174
+ 100: { label: "Thin", value: "100" },
175
+ 200: { label: "Extra Light", value: "200" },
176
+ 300: { label: "Light", value: "300" },
177
+ regular: { label: "Normal", value: "400" },
178
+ 500: { label: "Medium", value: "500" },
179
+ 600: { label: "Semi Bold", value: "600" },
180
+ 700: { label: "Bold", value: "700" },
181
+ 800: { label: "Extra Bold", value: "800" },
182
+ 900: { label: "Black", value: "900" }
183
+ }, tt = (e) => `font-${e.replace(/\s+/g, "-").toLowerCase()}`, rn = (e, t = !1) => {
184
+ const r = document.getElementById(tt(e));
185
+ return r !== null && r.getAttribute(et) === t.toString();
186
+ }, on = (e, t = !1) => {
187
+ const r = document.head || document.getElementsByTagName("head")[0], n = document.createElement("link");
188
+ n.id = tt(e), n.setAttribute("rel", "stylesheet"), n.setAttribute(et, t.toString());
189
+ let s = `${nn}?family=${e.replace(/\s/gi, "+")}`;
190
+ return t ? s += `&text=${e}` : s += ":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic", s += "&display=swap", n.setAttribute("href", s), r.appendChild(n), n;
191
+ }, nt = (e, t = !1) => {
192
+ e && !rn(e, t) && on(e, t);
193
+ }, rt = (e = {}) => {
194
+ if (!(typeof e != "object" || !e))
195
+ for (const t in e)
196
+ t === "fontFamily" ? nt(e[t]) : typeof e[t] == "object" && rt(e[t]);
197
+ }, it = /* @__PURE__ */ we({
198
+ __name: "FontDropdownItem",
199
+ props: {
200
+ source: {}
201
+ },
202
+ setup(e) {
203
+ const t = e, r = Z(null), n = (l, a) => {
204
+ let d = l, o = d.$options.name;
205
+ for (; d && (!o || o !== a); )
206
+ d = d.$parent, d && ({ name: o } = d.$options);
207
+ return d || null;
208
+ }, s = Z({
209
+ paddingRight: "calc(0.5 * var(--rem))",
210
+ fontFamily: `'${t.source.family}'`
211
+ }), c = _t();
212
+ return c && (r.value = n(c.proxy, "CDropdown")), Ze(() => {
213
+ nt(t.source.family, !0);
214
+ }), Le(
215
+ () => t.source,
216
+ (l) => {
217
+ s.value.fontFamily = `'${l.family}'`;
218
+ }
219
+ ), (l, a) => (P(), G(de(Nt), {
220
+ value: l.source,
221
+ "custom-parent": r.value,
222
+ class: "!truncate",
223
+ style: ue(s.value)
224
+ }, {
225
+ default: N(() => [
226
+ xe(M(l.source.family), 1)
227
+ ]),
228
+ _: 1
229
+ }, 8, ["value", "custom-parent", "style"]));
230
+ }
231
+ }), an = 1e3 * 60 * 60 * 24 * 14, A = Et({
232
+ list: [],
233
+ fetchedAt: null,
234
+ error: "",
235
+ loading: !1
236
+ }), sn = async (e = "popularity") => {
237
+ let t = [];
238
+ try {
239
+ const { data: r } = await Ct.get(tn, {
240
+ params: {
241
+ sort: e,
242
+ key: en
243
+ }
244
+ });
245
+ t = r.items || [];
246
+ } catch (r) {
247
+ A.error = r;
248
+ }
249
+ return t;
250
+ };
251
+ A.load = async () => {
252
+ if (A.loading) {
253
+ await A.loading;
254
+ return;
255
+ }
256
+ (!A.fetchedAt || A.fetchedAt < Date.now() - an) && (A.loading = new Promise(async (e) => {
257
+ A.list = await sn(), A.fetchedAt = Date.now(), e(!1);
258
+ }), await A.loading);
259
+ };
260
+ const ot = (e = []) => (e || []).filter((t) => !!$e[t]).map((t) => $e[t]), rr = async (e) => {
261
+ if (!e || typeof e != "string") return {};
262
+ !A.list.length && !A.error && await A.load();
263
+ const { variants: t } = A.list.find((r) => r.family === e) || {};
264
+ return ot(t || []);
265
+ }, ln = /* @__PURE__ */ we({
266
+ __name: "VirtualFontsList",
267
+ props: {
268
+ items: {}
269
+ },
270
+ setup(e) {
271
+ const t = e, r = Z([...t.items]);
272
+ Le(
273
+ () => t.items,
274
+ (o) => {
275
+ r.value = [...o];
276
+ }
277
+ );
278
+ const n = Dt(), s = re(() => n.style), c = re(() => ({
279
+ "overflow-y": "auto",
280
+ height: "250px",
281
+ width: "240px",
282
+ ...s
283
+ })), { list: l, containerProps: a, wrapperProps: d } = It(r, {
284
+ itemHeight: 35
285
+ });
286
+ return (o, p) => (P(), J("div", De(de(a), { style: c.value }), [
287
+ be("div", Lt(Pt(de(d))), [
288
+ (P(!0), J(Ce, null, Ee(de(l), (v) => (P(), G(it, {
289
+ key: v.index,
290
+ source: v.data
291
+ }, Tt({ _: 2 }, [
292
+ o.$slots.footer ? {
293
+ name: "footer",
294
+ fn: N(() => [
295
+ ke(o.$slots, "footer")
296
+ ]),
297
+ key: "0"
298
+ } : void 0
299
+ ]), 1032, ["source"]))), 128))
300
+ ], 16)
301
+ ], 16));
302
+ }
303
+ }), cn = {
304
+ name: "FontPickerDropdown",
305
+ components: {
306
+ CInput: At,
307
+ CDropdown: Ft,
308
+ VirtualFontsList: ln
309
+ },
310
+ props: {
311
+ modelValue: {
312
+ type: Object,
313
+ default: null
314
+ },
315
+ height: {
316
+ type: String,
317
+ default: "250px"
318
+ }
319
+ },
320
+ emits: ["update:modelValue"],
321
+ data() {
322
+ return {
323
+ FontDropdownItem: it,
324
+ visualQuery: "",
325
+ // string visual to user
326
+ activeQuery: ""
327
+ // query used for filtering results, hidden behind debounce
328
+ };
329
+ },
330
+ computed: {
331
+ selectedValue: {
332
+ get() {
333
+ return {
334
+ family: "Inter",
335
+ weight: "400",
336
+ ...this.modelValue
337
+ };
338
+ },
339
+ set(e) {
340
+ const { family: t, variants: r = [] } = e || {};
341
+ let { weight: n = "400" } = this.modelValue || {};
342
+ const s = ot(r), c = s.map((l) => l.value);
343
+ c.length && !c.includes(`${n}`) && (n = c.reduce(
344
+ (l, a) => Math.abs(a - n) < Math.abs(l - n) ? a : l
345
+ )), this.$emit("update:modelValue", {
346
+ family: t,
347
+ weight: n,
348
+ options: s
349
+ });
350
+ }
351
+ },
352
+ fontsList() {
353
+ const e = A.list || [];
354
+ if (this.activeQuery) {
355
+ const t = new RegExp(this.activeQuery, "i");
356
+ return e.filter((r) => t.test(r.family));
357
+ }
358
+ return e;
359
+ }
360
+ },
361
+ watch: {
362
+ visualQuery: $t(function(t) {
363
+ this.activeQuery = t;
364
+ }, 300)
365
+ },
366
+ created() {
367
+ A.load();
368
+ }
369
+ };
370
+ function dn(e, t, r, n, s, c) {
371
+ const l = Y("CButton"), a = Y("CInput"), d = Y("VirtualFontsList"), o = Y("CDropdown");
372
+ return P(), G(o, De({
373
+ position: "is-bottom-left",
374
+ ...e.$attrs,
375
+ ...e.$props
376
+ }, {
377
+ ref: "dropdown",
378
+ modelValue: c.selectedValue,
379
+ "onUpdate:modelValue": t[1] || (t[1] = (p) => c.selectedValue = p),
380
+ size: e.$attrs.size,
381
+ disabled: e.$attrs.disabled,
382
+ "menu-styling": {
383
+ minWidth: "250px",
384
+ maxWidth: "300px"
385
+ },
386
+ "max-height": r.height,
387
+ scrollable: !0,
388
+ class: "control"
389
+ }), {
390
+ trigger: N(() => [
391
+ ke(e.$slots, "default", {
392
+ selectedFamily: c.selectedValue.family
393
+ }, () => [
394
+ fe(l, {
395
+ style: ue([{ fontFamily: c.selectedValue.family }, { width: "100%", "text-align": "left", "min-width": "7em" }]),
396
+ class: "is-left"
397
+ }, {
398
+ default: N(() => [
399
+ xe(M(c.selectedValue.family), 1)
400
+ ]),
401
+ _: 1
402
+ }, 8, ["style"])
403
+ ])
404
+ ]),
405
+ header: N(() => [
406
+ fe(a, {
407
+ modelValue: s.visualQuery,
408
+ "onUpdate:modelValue": t[0] || (t[0] = (p) => s.visualQuery = p),
409
+ placeholder: e.$t("_common:search"),
410
+ filled: "",
411
+ style: { "margin-bottom": "0.25em" }
412
+ }, null, 8, ["modelValue", "placeholder"])
413
+ ]),
414
+ default: N(() => [
415
+ c.fontsList.length ? (P(), G(d, {
416
+ key: 0,
417
+ items: c.fontsList
418
+ }, null, 8, ["items"])) : (P(), J("div", {
419
+ key: 1,
420
+ style: ue([{ height: "250px", width: "240px", display: "flex", "justify-content": "center", "align-items": "center" }, { height: r.height }])
421
+ }, M(e.$t("_common:noResults")), 5))
422
+ ]),
423
+ _: 3
424
+ }, 16, ["modelValue", "size", "disabled", "max-height"]);
425
+ }
426
+ const ir = /* @__PURE__ */ he(cn, [["render", dn]]), Pe = Ot(jt), or = Pe.smallerOrEqual("sm"), un = Pe.between("md", "lg"), fn = Pe.greaterOrEqual("lg");
427
+ re(
428
+ () => un.value || fn.value
429
+ );
430
+ function hn({
431
+ minWidthPx: e,
432
+ maxWidthPx: t,
433
+ minFontSize: r,
434
+ maxFontSize: n
435
+ }) {
436
+ const s = e, c = t, l = (n - r) / (c - s), a = -s * l + r, d = (o) => Math.round(o * 1e3) / 1e3;
437
+ return `clamp(${d(r)}px, ${d(
438
+ a
439
+ )}px + calc(${d(l) * 100} * var(--vw, 1vw)), ${d(
440
+ n
441
+ )}px)`;
442
+ }
443
+ function pn({ size: e }) {
444
+ let t = e * 0.9;
445
+ return e > 30 && (t = e * 0.8), e > 40 && (t = e * 0.725), e > 50 && (t = e * 0.675), hn({
446
+ minWidthPx: 375,
447
+ maxWidthPx: 1200,
448
+ minFontSize: t,
449
+ maxFontSize: e
450
+ });
451
+ }
452
+ const vn = ({ json: e, prefix: t = "" } = {}) => Object.keys(e || {}).map((r) => {
453
+ const n = e[r], c = Object.keys(n).map((l) => {
454
+ const a = l.startsWith("--") ? l : l.split(/(?=[A-Z])/).join("-").toLowerCase(), d = n[l];
455
+ let o = `${a}:${d}`;
456
+ return a === "font-size" && (o += `; font-size: ${pn({
457
+ size: parseInt(d, 10)
458
+ })}`), o;
459
+ }).join(";");
460
+ return `${t}${r}{${c}}`;
461
+ }).join(`
462
+ `), mn = {
463
+ name: "DynamicStyle",
464
+ props: {
465
+ json: {
466
+ type: Object,
467
+ default: null
468
+ },
469
+ prefix: {
470
+ type: String,
471
+ default: ""
472
+ }
473
+ },
474
+ created() {
475
+ rt(this.json);
476
+ },
477
+ methods: {
478
+ jsonToCss: vn
479
+ }
480
+ };
481
+ function gn(e, t, r, n, s, c) {
482
+ return r.json ? (P(), G(Ie("style"), { key: 0 }, {
483
+ default: N(() => [
484
+ xe(M(c.jsonToCss({ json: r.json, prefix: r.prefix })), 1)
485
+ ]),
486
+ _: 1
487
+ })) : _e("", !0);
488
+ }
489
+ const yn = /* @__PURE__ */ he(mn, [["render", gn]]), bn = /* @__PURE__ */ we({
490
+ __name: "DocumentStyleContainer",
491
+ props: {
492
+ inputStyle: {}
493
+ },
494
+ setup(e) {
495
+ const t = e, { canEdit: r, isForm: n } = Ye("viewSettings", {
496
+ canEdit: !1,
497
+ isForm: !1
498
+ }), s = zt("container"), { width: c, height: l } = Kt(s), a = re(() => ({
499
+ "--vw": `${c.value / 100}px`,
500
+ "--vh": `clamp(7.5px, ${l.value / 100}px, ${r ? 7.5 : 9}px)`
501
+ })), d = re(
502
+ () => `document-base-style-${Math.random().toString(36).substr(2, 9)}`
503
+ ), o = {
504
+ '[data-typography="title"]': "title",
505
+ h1: "h1",
506
+ h2: "h2",
507
+ h3: "h3",
508
+ p: "p",
509
+ blockquote: "blockquote",
510
+ ".chapter": "section"
511
+ }, p = re(() => Object.keys(o).filter((k) => !(t.inputStyle || {})[k]).map((k) => `document-legacy-style-${o[k]}`)), v = re(
512
+ () => {
513
+ var k, w;
514
+ return (w = (k = t.inputStyle) == null ? void 0 : k[".chapter"]) == null ? void 0 : w["--accentColor"];
515
+ }
516
+ );
517
+ return (k, w) => (P(), J("div", {
518
+ ref_key: "container",
519
+ ref: s,
520
+ class: Ht([...p.value, d.value]),
521
+ style: ue(de(n) && a.value)
522
+ }, [
523
+ (P(), G(Ie("style"), null, {
524
+ default: N(() => [
525
+ xe(" .primary-text-color { color: " + M(v.value) + " !important } .primary-background-color, quill-format ul li::before { background-color: " + M(v.value) + " !important } .primary-box-shadow-left-color { box-shadow: inset 4px 0 " + M(v.value) + " !important } .primary-border-left-color { border-left-color: " + M(v.value) + " !important } .primary-pseudo-background::after { background-color: " + M(v.value) + " !important } .primary-svg-fill { fill: " + M(v.value) + " !important } .primary-light-background { background-color: hsla(0, 0%, 0%, 0.05) !important} .primary-light-box-shadow-left-color { box-shadow: inset 4px 0 " + M(v.value ? v.value.replace(/[^,]+(?=\))/, "0.08") : "") + " !important} .quill-format ul li::before { background-color: " + M(v.value) + " !important } ", 1)
526
+ ]),
527
+ _: 1
528
+ })),
529
+ fe(yn, {
530
+ json: k.inputStyle,
531
+ prefix: `.${d.value}.${d.value}.${d.value} `
532
+ }, null, 8, ["json", "prefix"]),
533
+ be("p", null, [
534
+ ke(k.$slots, "default")
535
+ ])
536
+ ], 6));
537
+ }
538
+ });
539
+ var at = { exports: {} }, wn = at.exports = {};
540
+ wn.forEach = function(e, t) {
541
+ for (var r = 0; r < e.length; r++) {
542
+ var n = t(e[r]);
543
+ if (n)
544
+ return n;
545
+ }
546
+ };
547
+ var st = at.exports, xn = function(e) {
548
+ var t = e.stateHandler.getState;
549
+ function r(l) {
550
+ var a = t(l);
551
+ return a && !!a.isDetectable;
552
+ }
553
+ function n(l) {
554
+ t(l).isDetectable = !0;
555
+ }
556
+ function s(l) {
557
+ return !!t(l).busy;
558
+ }
559
+ function c(l, a) {
560
+ t(l).busy = !!a;
561
+ }
562
+ return {
563
+ isDetectable: r,
564
+ markAsDetectable: n,
565
+ isBusy: s,
566
+ markBusy: c
567
+ };
568
+ }, kn = function(e) {
569
+ var t = {};
570
+ function r(l) {
571
+ var a = e.get(l);
572
+ return a === void 0 ? [] : t[a] || [];
573
+ }
574
+ function n(l, a) {
575
+ var d = e.get(l);
576
+ t[d] || (t[d] = []), t[d].push(a);
577
+ }
578
+ function s(l, a) {
579
+ for (var d = r(l), o = 0, p = d.length; o < p; ++o)
580
+ if (d[o] === a) {
581
+ d.splice(o, 1);
582
+ break;
583
+ }
584
+ }
585
+ function c(l) {
586
+ var a = r(l);
587
+ a && (a.length = 0);
588
+ }
589
+ return {
590
+ get: r,
591
+ add: n,
592
+ removeListener: s,
593
+ removeAllListeners: c
594
+ };
595
+ }, Sn = function() {
596
+ var e = 1;
597
+ function t() {
598
+ return e++;
599
+ }
600
+ return {
601
+ generate: t
602
+ };
603
+ }, _n = function(e) {
604
+ var t = e.idGenerator, r = e.stateHandler.getState;
605
+ function n(c) {
606
+ var l = r(c);
607
+ return l && l.id !== void 0 ? l.id : null;
608
+ }
609
+ function s(c) {
610
+ var l = r(c);
611
+ if (!l)
612
+ throw new Error("setId required the element to have a resize detection state.");
613
+ var a = t.generate();
614
+ return l.id = a, a;
615
+ }
616
+ return {
617
+ get: n,
618
+ set: s
619
+ };
620
+ }, En = function(e) {
621
+ function t() {
622
+ }
623
+ var r = {
624
+ log: t,
625
+ warn: t,
626
+ error: t
627
+ };
628
+ if (!e && window.console) {
629
+ var n = function(s, c) {
630
+ s[c] = function() {
631
+ var a = console[c];
632
+ if (a.apply)
633
+ a.apply(console, arguments);
634
+ else
635
+ for (var d = 0; d < arguments.length; d++)
636
+ a(arguments[d]);
637
+ };
638
+ };
639
+ n(r, "log"), n(r, "warn"), n(r, "error");
640
+ }
641
+ return r;
642
+ }, lt = { exports: {} }, ct = lt.exports = {};
643
+ ct.isIE = function(e) {
644
+ function t() {
645
+ var n = navigator.userAgent.toLowerCase();
646
+ return n.indexOf("msie") !== -1 || n.indexOf("trident") !== -1 || n.indexOf(" edge/") !== -1;
647
+ }
648
+ if (!t())
649
+ return !1;
650
+ if (!e)
651
+ return !0;
652
+ var r = function() {
653
+ var n, s = 3, c = document.createElement("div"), l = c.getElementsByTagName("i");
654
+ do
655
+ c.innerHTML = "<!--[if gt IE " + ++s + "]><i></i><![endif]-->";
656
+ while (l[0]);
657
+ return s > 4 ? s : n;
658
+ }();
659
+ return e === r;
660
+ };
661
+ ct.isLegacyOpera = function() {
662
+ return !!window.opera;
663
+ };
664
+ var dt = lt.exports, ut = { exports: {} }, Cn = ut.exports = {};
665
+ Cn.getOption = Dn;
666
+ function Dn(e, t, r) {
667
+ var n = e[t];
668
+ return n == null && r !== void 0 ? r : n;
669
+ }
670
+ var In = ut.exports, Re = In, Ln = function(t) {
671
+ t = t || {};
672
+ var r = t.reporter, n = Re.getOption(t, "async", !0), s = Re.getOption(t, "auto", !0);
673
+ s && !n && (r && r.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."), n = !0);
674
+ var c = Ve(), l, a = !1;
675
+ function d(S, O) {
676
+ !a && s && n && c.size() === 0 && v(), c.add(S, O);
677
+ }
678
+ function o() {
679
+ for (a = !0; c.size(); ) {
680
+ var S = c;
681
+ c = Ve(), S.process();
682
+ }
683
+ a = !1;
684
+ }
685
+ function p(S) {
686
+ a || (S === void 0 && (S = n), l && (k(l), l = null), S ? v() : o());
687
+ }
688
+ function v() {
689
+ l = w(o);
690
+ }
691
+ function k(S) {
692
+ var O = clearTimeout;
693
+ return O(S);
694
+ }
695
+ function w(S) {
696
+ var O = function(F) {
697
+ return setTimeout(F, 0);
698
+ };
699
+ return O(S);
700
+ }
701
+ return {
702
+ add: d,
703
+ force: p
704
+ };
705
+ };
706
+ function Ve() {
707
+ var e = {}, t = 0, r = 0, n = 0;
708
+ function s(a, d) {
709
+ d || (d = a, a = 0), a > r ? r = a : a < n && (n = a), e[a] || (e[a] = []), e[a].push(d), t++;
710
+ }
711
+ function c() {
712
+ for (var a = n; a <= r; a++)
713
+ for (var d = e[a], o = 0; o < d.length; o++) {
714
+ var p = d[o];
715
+ p();
716
+ }
717
+ }
718
+ function l() {
719
+ return t;
720
+ }
721
+ return {
722
+ add: s,
723
+ process: c,
724
+ size: l
725
+ };
726
+ }
727
+ var Te = "_erd";
728
+ function Pn(e) {
729
+ return e[Te] = {}, ft(e);
730
+ }
731
+ function ft(e) {
732
+ return e[Te];
733
+ }
734
+ function Tn(e) {
735
+ delete e[Te];
736
+ }
737
+ var An = {
738
+ initState: Pn,
739
+ getState: ft,
740
+ cleanState: Tn
741
+ }, le = dt, On = function(e) {
742
+ e = e || {};
743
+ var t = e.reporter, r = e.batchProcessor, n = e.stateHandler.getState;
744
+ if (!t)
745
+ throw new Error("Missing required dependency: reporter.");
746
+ function s(o, p) {
747
+ function v() {
748
+ p(o);
749
+ }
750
+ if (le.isIE(8))
751
+ n(o).object = {
752
+ proxy: v
753
+ }, o.attachEvent("onresize", v);
754
+ else {
755
+ var k = a(o);
756
+ if (!k)
757
+ throw new Error("Element is not detectable by this strategy.");
758
+ k.contentDocument.defaultView.addEventListener("resize", v);
759
+ }
760
+ }
761
+ function c(o) {
762
+ var p = e.important ? " !important; " : "; ";
763
+ return (o.join(p) + p).trim();
764
+ }
765
+ function l(o, p, v) {
766
+ v || (v = p, p = o, o = null), o = o || {}, o.debug;
767
+ function k(w, S) {
768
+ var O = c(["display: block", "position: absolute", "top: 0", "left: 0", "width: 100%", "height: 100%", "border: none", "padding: 0", "margin: 0", "opacity: 0", "z-index: -1000", "pointer-events: none"]), F = !1, $ = window.getComputedStyle(w), C = w.offsetWidth, D = w.offsetHeight;
769
+ n(w).startSize = {
770
+ width: C,
771
+ height: D
772
+ };
773
+ function h() {
774
+ function i() {
775
+ if ($.position === "static") {
776
+ w.style.setProperty("position", "relative", o.important ? "important" : "");
777
+ var I = function(j, x, T, m) {
778
+ function b(z) {
779
+ return z.replace(/[^-\d\.]/g, "");
780
+ }
781
+ var B = T[m];
782
+ B !== "auto" && b(B) !== "0" && (j.warn("An element that is positioned static has style." + m + "=" + B + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + m + " will be set to 0. Element: ", x), x.style.setProperty(m, "0", o.important ? "important" : ""));
783
+ };
784
+ I(t, w, $, "top"), I(t, w, $, "right"), I(t, w, $, "bottom"), I(t, w, $, "left");
785
+ }
786
+ }
787
+ function _() {
788
+ F || i();
789
+ function I(x, T) {
790
+ if (!x.contentDocument) {
791
+ var m = n(x);
792
+ m.checkForObjectDocumentTimeoutId && window.clearTimeout(m.checkForObjectDocumentTimeoutId), m.checkForObjectDocumentTimeoutId = setTimeout(function() {
793
+ m.checkForObjectDocumentTimeoutId = 0, I(x, T);
794
+ }, 100);
795
+ return;
796
+ }
797
+ T(x.contentDocument);
798
+ }
799
+ var j = this;
800
+ I(j, function(T) {
801
+ S(w);
802
+ });
803
+ }
804
+ $.position !== "" && (i(), F = !0);
805
+ var u = document.createElement("object");
806
+ u.style.cssText = O, u.tabIndex = -1, u.type = "text/html", u.setAttribute("aria-hidden", "true"), u.onload = _, le.isIE() || (u.data = "about:blank"), n(w) && (w.appendChild(u), n(w).object = u, le.isIE() && (u.data = "about:blank"));
807
+ }
808
+ r ? r.add(h) : h();
809
+ }
810
+ le.isIE(8) ? v(p) : k(p, v);
811
+ }
812
+ function a(o) {
813
+ return n(o).object;
814
+ }
815
+ function d(o) {
816
+ if (n(o)) {
817
+ var p = a(o);
818
+ p && (le.isIE(8) ? o.detachEvent("onresize", p.proxy) : o.removeChild(p), n(o).checkForObjectDocumentTimeoutId && window.clearTimeout(n(o).checkForObjectDocumentTimeoutId), delete n(o).object);
819
+ }
820
+ }
821
+ return {
822
+ makeDetectable: l,
823
+ addListener: s,
824
+ uninstall: d
825
+ };
826
+ }, jn = st.forEach, zn = function(e) {
827
+ e = e || {};
828
+ var t = e.reporter, r = e.batchProcessor, n = e.stateHandler.getState;
829
+ e.stateHandler.hasState;
830
+ var s = e.idHandler;
831
+ if (!r)
832
+ throw new Error("Missing required dependency: batchProcessor");
833
+ if (!t)
834
+ throw new Error("Missing required dependency: reporter.");
835
+ var c = p(), l = "erd_scroll_detection_scrollbar_style", a = "erd_scroll_detection_container";
836
+ function d(h) {
837
+ v(h, l, a);
838
+ }
839
+ d(window.document);
840
+ function o(h) {
841
+ var i = e.important ? " !important; " : "; ";
842
+ return (h.join(i) + i).trim();
843
+ }
844
+ function p() {
845
+ var h = 500, i = 500, _ = document.createElement("div");
846
+ _.style.cssText = o(["position: absolute", "width: " + h * 2 + "px", "height: " + i * 2 + "px", "visibility: hidden", "margin: 0", "padding: 0"]);
847
+ var u = document.createElement("div");
848
+ u.style.cssText = o(["position: absolute", "width: " + h + "px", "height: " + i + "px", "overflow: scroll", "visibility: none", "top: " + -h * 3 + "px", "left: " + -i * 3 + "px", "visibility: hidden", "margin: 0", "padding: 0"]), u.appendChild(_), document.body.insertBefore(u, document.body.firstChild);
849
+ var I = h - u.clientWidth, j = i - u.clientHeight;
850
+ return document.body.removeChild(u), {
851
+ width: I,
852
+ height: j
853
+ };
854
+ }
855
+ function v(h, i, _) {
856
+ function u(T, m) {
857
+ m = m || function(B) {
858
+ h.head.appendChild(B);
859
+ };
860
+ var b = h.createElement("style");
861
+ return b.innerHTML = T, b.id = i, m(b), b;
862
+ }
863
+ if (!h.getElementById(i)) {
864
+ var I = _ + "_animation", j = _ + "_animation_active", x = `/* Created by the element-resize-detector library. */
865
+ `;
866
+ x += "." + _ + " > div::-webkit-scrollbar { " + o(["display: none"]) + ` }
867
+
868
+ `, x += "." + j + " { " + o(["-webkit-animation-duration: 0.1s", "animation-duration: 0.1s", "-webkit-animation-name: " + I, "animation-name: " + I]) + ` }
869
+ `, x += "@-webkit-keyframes " + I + ` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
870
+ `, x += "@keyframes " + I + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }", u(x);
871
+ }
872
+ }
873
+ function k(h) {
874
+ h.className += " " + a + "_animation_active";
875
+ }
876
+ function w(h, i, _) {
877
+ if (h.addEventListener)
878
+ h.addEventListener(i, _);
879
+ else if (h.attachEvent)
880
+ h.attachEvent("on" + i, _);
881
+ else
882
+ return t.error("[scroll] Don't know how to add event listeners.");
883
+ }
884
+ function S(h, i, _) {
885
+ if (h.removeEventListener)
886
+ h.removeEventListener(i, _);
887
+ else if (h.detachEvent)
888
+ h.detachEvent("on" + i, _);
889
+ else
890
+ return t.error("[scroll] Don't know how to remove event listeners.");
891
+ }
892
+ function O(h) {
893
+ return n(h).container.childNodes[0].childNodes[0].childNodes[0];
894
+ }
895
+ function F(h) {
896
+ return n(h).container.childNodes[0].childNodes[0].childNodes[1];
897
+ }
898
+ function $(h, i) {
899
+ var _ = n(h).listeners;
900
+ if (!_.push)
901
+ throw new Error("Cannot add listener to an element that is not detectable.");
902
+ n(h).listeners.push(i);
903
+ }
904
+ function C(h, i, _) {
905
+ _ || (_ = i, i = h, h = null), h = h || {};
906
+ function u() {
907
+ if (h.debug) {
908
+ var f = Array.prototype.slice.call(arguments);
909
+ if (f.unshift(s.get(i), "Scroll: "), t.log.apply)
910
+ t.log.apply(null, f);
911
+ else
912
+ for (var g = 0; g < f.length; g++)
913
+ t.log(f[g]);
914
+ }
915
+ }
916
+ function I(f) {
917
+ function g(E) {
918
+ var R = E.getRootNode && E.getRootNode().contains(E);
919
+ return E === E.ownerDocument.body || E.ownerDocument.body.contains(E) || R;
920
+ }
921
+ return !g(f) || window.getComputedStyle(f) === null;
922
+ }
923
+ function j(f) {
924
+ var g = n(f).container.childNodes[0], E = window.getComputedStyle(g);
925
+ return !E.width || E.width.indexOf("px") === -1;
926
+ }
927
+ function x() {
928
+ var f = window.getComputedStyle(i), g = {};
929
+ return g.position = f.position, g.width = i.offsetWidth, g.height = i.offsetHeight, g.top = f.top, g.right = f.right, g.bottom = f.bottom, g.left = f.left, g.widthCSS = f.width, g.heightCSS = f.height, g;
930
+ }
931
+ function T() {
932
+ var f = x();
933
+ n(i).startSize = {
934
+ width: f.width,
935
+ height: f.height
936
+ }, u("Element start size", n(i).startSize);
937
+ }
938
+ function m() {
939
+ n(i).listeners = [];
940
+ }
941
+ function b() {
942
+ if (u("storeStyle invoked."), !n(i)) {
943
+ u("Aborting because element has been uninstalled");
944
+ return;
945
+ }
946
+ var f = x();
947
+ n(i).style = f;
948
+ }
949
+ function B(f, g, E) {
950
+ n(f).lastWidth = g, n(f).lastHeight = E;
951
+ }
952
+ function z(f) {
953
+ return O(f).childNodes[0];
954
+ }
955
+ function X() {
956
+ return 2 * c.width + 1;
957
+ }
958
+ function pe() {
959
+ return 2 * c.height + 1;
960
+ }
961
+ function ve(f) {
962
+ return f + 10 + X();
963
+ }
964
+ function me(f) {
965
+ return f + 10 + pe();
966
+ }
967
+ function ht(f) {
968
+ return f * 2 + X();
969
+ }
970
+ function pt(f) {
971
+ return f * 2 + pe();
972
+ }
973
+ function Ae(f, g, E) {
974
+ var R = O(f), ee = F(f), ie = ve(g), oe = me(E), H = ht(g), y = pt(E);
975
+ R.scrollLeft = ie, R.scrollTop = oe, ee.scrollLeft = H, ee.scrollTop = y;
976
+ }
977
+ function Oe() {
978
+ var f = n(i).container;
979
+ if (!f) {
980
+ f = document.createElement("div"), f.className = a, f.style.cssText = o(["visibility: hidden", "display: inline", "width: 0px", "height: 0px", "z-index: -1", "overflow: hidden", "margin: 0", "padding: 0"]), n(i).container = f, k(f), i.appendChild(f);
981
+ var g = function() {
982
+ n(i).onRendered && n(i).onRendered();
983
+ };
984
+ w(f, "animationstart", g), n(i).onAnimationStart = g;
985
+ }
986
+ return f;
987
+ }
988
+ function vt() {
989
+ function f() {
990
+ var L = n(i).style;
991
+ if (L.position === "static") {
992
+ i.style.setProperty("position", "relative", h.important ? "important" : "");
993
+ var U = function(se, ne, bt, ye) {
994
+ function wt(xt) {
995
+ return xt.replace(/[^-\d\.]/g, "");
996
+ }
997
+ var Se = bt[ye];
998
+ Se !== "auto" && wt(Se) !== "0" && (se.warn("An element that is positioned static has style." + ye + "=" + Se + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + ye + " will be set to 0. Element: ", ne), ne.style[ye] = 0);
999
+ };
1000
+ U(t, i, L, "top"), U(t, i, L, "right"), U(t, i, L, "bottom"), U(t, i, L, "left");
1001
+ }
1002
+ }
1003
+ function g(L, U, se, ne) {
1004
+ return L = L ? L + "px" : "0", U = U ? U + "px" : "0", se = se ? se + "px" : "0", ne = ne ? ne + "px" : "0", ["left: " + L, "top: " + U, "right: " + ne, "bottom: " + se];
1005
+ }
1006
+ if (u("Injecting elements"), !n(i)) {
1007
+ u("Aborting because element has been uninstalled");
1008
+ return;
1009
+ }
1010
+ f();
1011
+ var E = n(i).container;
1012
+ E || (E = Oe());
1013
+ var R = c.width, ee = c.height, ie = o(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%", "left: 0px", "top: 0px"]), oe = o(["position: absolute", "flex: none", "overflow: hidden", "z-index: -1", "visibility: hidden"].concat(g(-(1 + R), -(1 + ee), -ee, -R))), H = o(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]), y = o(["position: absolute", "flex: none", "overflow: scroll", "z-index: -1", "visibility: hidden", "width: 100%", "height: 100%"]), W = o(["position: absolute", "left: 0", "top: 0"]), te = o(["position: absolute", "width: 200%", "height: 200%"]), V = document.createElement("div"), q = document.createElement("div"), ae = document.createElement("div"), ze = document.createElement("div"), ge = document.createElement("div"), He = document.createElement("div");
1014
+ V.dir = "ltr", V.style.cssText = ie, V.className = a, q.className = a, q.style.cssText = oe, ae.style.cssText = H, ze.style.cssText = W, ge.style.cssText = y, He.style.cssText = te, ae.appendChild(ze), ge.appendChild(He), q.appendChild(ae), q.appendChild(ge), V.appendChild(q), E.appendChild(V);
1015
+ function Be() {
1016
+ var L = n(i);
1017
+ L && L.onExpand ? L.onExpand() : u("Aborting expand scroll handler: element has been uninstalled");
1018
+ }
1019
+ function We() {
1020
+ var L = n(i);
1021
+ L && L.onShrink ? L.onShrink() : u("Aborting shrink scroll handler: element has been uninstalled");
1022
+ }
1023
+ w(ae, "scroll", Be), w(ge, "scroll", We), n(i).onExpandScroll = Be, n(i).onShrinkScroll = We;
1024
+ }
1025
+ function mt() {
1026
+ function f(H, y, W) {
1027
+ var te = z(H), V = ve(y), q = me(W);
1028
+ te.style.setProperty("width", V + "px", h.important ? "important" : ""), te.style.setProperty("height", q + "px", h.important ? "important" : "");
1029
+ }
1030
+ function g(H) {
1031
+ var y = i.offsetWidth, W = i.offsetHeight, te = y !== n(i).lastWidth || W !== n(i).lastHeight;
1032
+ u("Storing current size", y, W), B(i, y, W), r.add(0, function() {
1033
+ if (te) {
1034
+ if (!n(i)) {
1035
+ u("Aborting because element has been uninstalled");
1036
+ return;
1037
+ }
1038
+ if (!E()) {
1039
+ u("Aborting because element container has not been initialized");
1040
+ return;
1041
+ }
1042
+ if (h.debug) {
1043
+ var q = i.offsetWidth, ae = i.offsetHeight;
1044
+ (q !== y || ae !== W) && t.warn(s.get(i), "Scroll: Size changed before updating detector elements.");
1045
+ }
1046
+ f(i, y, W);
1047
+ }
1048
+ }), r.add(1, function() {
1049
+ if (!n(i)) {
1050
+ u("Aborting because element has been uninstalled");
1051
+ return;
1052
+ }
1053
+ if (!E()) {
1054
+ u("Aborting because element container has not been initialized");
1055
+ return;
1056
+ }
1057
+ Ae(i, y, W);
1058
+ }), te && H && r.add(2, function() {
1059
+ if (!n(i)) {
1060
+ u("Aborting because element has been uninstalled");
1061
+ return;
1062
+ }
1063
+ if (!E()) {
1064
+ u("Aborting because element container has not been initialized");
1065
+ return;
1066
+ }
1067
+ H();
1068
+ });
1069
+ }
1070
+ function E() {
1071
+ return !!n(i).container;
1072
+ }
1073
+ function R() {
1074
+ function H() {
1075
+ return n(i).lastNotifiedWidth === void 0;
1076
+ }
1077
+ u("notifyListenersIfNeeded invoked");
1078
+ var y = n(i);
1079
+ if (H() && y.lastWidth === y.startSize.width && y.lastHeight === y.startSize.height)
1080
+ return u("Not notifying: Size is the same as the start size, and there has been no notification yet.");
1081
+ if (y.lastWidth === y.lastNotifiedWidth && y.lastHeight === y.lastNotifiedHeight)
1082
+ return u("Not notifying: Size already notified");
1083
+ u("Current size not notified, notifying..."), y.lastNotifiedWidth = y.lastWidth, y.lastNotifiedHeight = y.lastHeight, jn(n(i).listeners, function(W) {
1084
+ W(i);
1085
+ });
1086
+ }
1087
+ function ee() {
1088
+ if (u("startanimation triggered."), j(i)) {
1089
+ u("Ignoring since element is still unrendered...");
1090
+ return;
1091
+ }
1092
+ u("Element rendered.");
1093
+ var H = O(i), y = F(i);
1094
+ (H.scrollLeft === 0 || H.scrollTop === 0 || y.scrollLeft === 0 || y.scrollTop === 0) && (u("Scrollbars out of sync. Updating detector elements..."), g(R));
1095
+ }
1096
+ function ie() {
1097
+ if (u("Scroll detected."), j(i)) {
1098
+ u("Scroll event fired while unrendered. Ignoring...");
1099
+ return;
1100
+ }
1101
+ g(R);
1102
+ }
1103
+ if (u("registerListenersAndPositionElements invoked."), !n(i)) {
1104
+ u("Aborting because element has been uninstalled");
1105
+ return;
1106
+ }
1107
+ n(i).onRendered = ee, n(i).onExpand = ie, n(i).onShrink = ie;
1108
+ var oe = n(i).style;
1109
+ f(i, oe.width, oe.height);
1110
+ }
1111
+ function gt() {
1112
+ if (u("finalizeDomMutation invoked."), !n(i)) {
1113
+ u("Aborting because element has been uninstalled");
1114
+ return;
1115
+ }
1116
+ var f = n(i).style;
1117
+ B(i, f.width, f.height), Ae(i, f.width, f.height);
1118
+ }
1119
+ function yt() {
1120
+ _(i);
1121
+ }
1122
+ function je() {
1123
+ u("Installing..."), m(), T(), r.add(0, b), r.add(1, vt), r.add(2, mt), r.add(3, gt), r.add(4, yt);
1124
+ }
1125
+ u("Making detectable..."), I(i) ? (u("Element is detached"), Oe(), u("Waiting until element is attached..."), n(i).onRendered = function() {
1126
+ u("Element is now attached"), je();
1127
+ }) : je();
1128
+ }
1129
+ function D(h) {
1130
+ var i = n(h);
1131
+ i && (i.onExpandScroll && S(O(h), "scroll", i.onExpandScroll), i.onShrinkScroll && S(F(h), "scroll", i.onShrinkScroll), i.onAnimationStart && S(i.container, "animationstart", i.onAnimationStart), i.container && h.removeChild(i.container));
1132
+ }
1133
+ return {
1134
+ makeDetectable: C,
1135
+ addListener: $,
1136
+ uninstall: D,
1137
+ initDocument: d
1138
+ };
1139
+ }, ce = st.forEach, Hn = xn, Bn = kn, Wn = Sn, Mn = _n, Nn = En, qe = dt, Fn = Ln, Q = An, $n = On, Rn = zn;
1140
+ function Ue(e) {
1141
+ return Array.isArray(e) || e.length !== void 0;
1142
+ }
1143
+ function Ge(e) {
1144
+ if (Array.isArray(e))
1145
+ return e;
1146
+ var t = [];
1147
+ return ce(e, function(r) {
1148
+ t.push(r);
1149
+ }), t;
1150
+ }
1151
+ function Qe(e) {
1152
+ return e && e.nodeType === 1;
1153
+ }
1154
+ var Vn = function(e) {
1155
+ e = e || {};
1156
+ var t;
1157
+ if (e.idHandler)
1158
+ t = {
1159
+ get: function(C) {
1160
+ return e.idHandler.get(C, !0);
1161
+ },
1162
+ set: e.idHandler.set
1163
+ };
1164
+ else {
1165
+ var r = Wn(), n = Mn({
1166
+ idGenerator: r,
1167
+ stateHandler: Q
1168
+ });
1169
+ t = n;
1170
+ }
1171
+ var s = e.reporter;
1172
+ if (!s) {
1173
+ var c = s === !1;
1174
+ s = Nn(c);
1175
+ }
1176
+ var l = K(e, "batchProcessor", Fn({ reporter: s })), a = {};
1177
+ a.callOnAdd = !!K(e, "callOnAdd", !0), a.debug = !!K(e, "debug", !1);
1178
+ var d = Bn(t), o = Hn({
1179
+ stateHandler: Q
1180
+ }), p, v = K(e, "strategy", "object"), k = K(e, "important", !1), w = {
1181
+ reporter: s,
1182
+ batchProcessor: l,
1183
+ stateHandler: Q,
1184
+ idHandler: t,
1185
+ important: k
1186
+ };
1187
+ if (v === "scroll" && (qe.isLegacyOpera() ? (s.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."), v = "object") : qe.isIE(9) && (s.warn("Scroll strategy is not supported on IE9. Changing to object strategy."), v = "object")), v === "scroll")
1188
+ p = Rn(w);
1189
+ else if (v === "object")
1190
+ p = $n(w);
1191
+ else
1192
+ throw new Error("Invalid strategy name: " + v);
1193
+ var S = {};
1194
+ function O(C, D, h) {
1195
+ function i(T) {
1196
+ var m = d.get(T);
1197
+ ce(m, function(B) {
1198
+ B(T);
1199
+ });
1200
+ }
1201
+ function _(T, m, b) {
1202
+ d.add(m, b), T && b(m);
1203
+ }
1204
+ if (h || (h = D, D = C, C = {}), !D)
1205
+ throw new Error("At least one element required.");
1206
+ if (!h)
1207
+ throw new Error("Listener required.");
1208
+ if (Qe(D))
1209
+ D = [D];
1210
+ else if (Ue(D))
1211
+ D = Ge(D);
1212
+ else
1213
+ return s.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
1214
+ var u = 0, I = K(C, "callOnAdd", a.callOnAdd), j = K(C, "onReady", function() {
1215
+ }), x = K(C, "debug", a.debug);
1216
+ ce(D, function(m) {
1217
+ Q.getState(m) || (Q.initState(m), t.set(m));
1218
+ var b = t.get(m);
1219
+ if (x && s.log("Attaching listener to element", b, m), !o.isDetectable(m)) {
1220
+ if (x && s.log(b, "Not detectable."), o.isBusy(m)) {
1221
+ x && s.log(b, "System busy making it detectable"), _(I, m, h), S[b] = S[b] || [], S[b].push(function() {
1222
+ u++, u === D.length && j();
1223
+ });
1224
+ return;
1225
+ }
1226
+ return x && s.log(b, "Making detectable..."), o.markBusy(m, !0), p.makeDetectable({ debug: x, important: k }, m, function(z) {
1227
+ if (x && s.log(b, "onElementDetectable"), Q.getState(z)) {
1228
+ o.markAsDetectable(z), o.markBusy(z, !1), p.addListener(z, i), _(I, z, h);
1229
+ var X = Q.getState(z);
1230
+ if (X && X.startSize) {
1231
+ var pe = z.offsetWidth, ve = z.offsetHeight;
1232
+ (X.startSize.width !== pe || X.startSize.height !== ve) && i(z);
1233
+ }
1234
+ S[b] && ce(S[b], function(me) {
1235
+ me();
1236
+ });
1237
+ } else
1238
+ x && s.log(b, "Element uninstalled before being detectable.");
1239
+ delete S[b], u++, u === D.length && j();
1240
+ });
1241
+ }
1242
+ x && s.log(b, "Already detecable, adding listener."), _(I, m, h), u++;
1243
+ }), u === D.length && j();
1244
+ }
1245
+ function F(C) {
1246
+ if (!C)
1247
+ return s.error("At least one element is required.");
1248
+ if (Qe(C))
1249
+ C = [C];
1250
+ else if (Ue(C))
1251
+ C = Ge(C);
1252
+ else
1253
+ return s.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");
1254
+ ce(C, function(D) {
1255
+ d.removeAllListeners(D), p.uninstall(D), Q.cleanState(D);
1256
+ });
1257
+ }
1258
+ function $(C) {
1259
+ p.initDocument && p.initDocument(C);
1260
+ }
1261
+ return {
1262
+ listenTo: O,
1263
+ removeListener: d.removeListener,
1264
+ removeAllListeners: d.removeAllListeners,
1265
+ uninstall: F,
1266
+ initDocument: $
1267
+ };
1268
+ };
1269
+ function K(e, t, r) {
1270
+ var n = e[t];
1271
+ return n == null && r !== void 0 ? r : n;
1272
+ }
1273
+ const qn = /* @__PURE__ */ Bt(Vn), Un = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1274
+ __name: "WithDimensions",
1275
+ props: { provideDevice: Boolean },
1276
+ emits: ["width", "height", "resize"],
1277
+ setup(e, { emit: t }) {
1278
+ window.elementResizeDetectorMaker || (window.elementResizeDetectorMaker = qn({
1279
+ strategy: "scroll"
1280
+ }));
1281
+ const r = e, n = t, s = (o) => o <= 640 ? "mobile" : o <= 1024 ? "tablet" : "desktop", c = Z(null), l = Z(null), a = Z({ device: "desktop" }), d = Wt();
1282
+ return r.provideDevice && (Ke("containerType", a), Le(c, (o) => {
1283
+ a.value.device = s(o);
1284
+ })), Ze(() => {
1285
+ var v;
1286
+ const o = (v = d.value) == null ? void 0 : v.nextElementSibling;
1287
+ if (!o) return;
1288
+ const p = () => {
1289
+ c.value = o.offsetWidth, l.value = o.offsetHeight, n("width", o.offsetWidth), n("height", o.offsetHeight), n("resize");
1290
+ };
1291
+ window.elementResizeDetectorMaker.listenTo(o, p), c.value = o.offsetWidth, l.value = o.offsetHeight, Mt(() => {
1292
+ window.elementResizeDetectorMaker.uninstall(o);
1293
+ });
1294
+ }), (o, p) => ke(o.$slots, "default", {
1295
+ width: c.value,
1296
+ height: l.value
1297
+ });
1298
+ }
1299
+ }), Gn = {
1300
+ name: "DocumentLayout",
1301
+ components: {
1302
+ DynamicChapter: Xe,
1303
+ DocumentStyleContainer: bn,
1304
+ WithDimensions: Un
1305
+ },
1306
+ props: {
1307
+ document: {
1308
+ type: Object,
1309
+ required: !0
1310
+ }
1311
+ },
1312
+ computed: {
1313
+ layout() {
1314
+ var e;
1315
+ return ((e = this.document) == null ? void 0 : e.readLayout) || [];
1316
+ }
1317
+ }
1318
+ }, Qn = { class: "font-family-default h-full w-full" };
1319
+ function Kn(e, t, r, n, s, c) {
1320
+ const l = Y("DynamicChapter"), a = Y("DocumentStyleContainer"), d = Y("WithDimensions");
1321
+ return P(), J("div", Qn, [
1322
+ fe(d, { "provide-device": !0 }, {
1323
+ default: N(() => {
1324
+ var o, p;
1325
+ return [
1326
+ fe(a, {
1327
+ "input-style": (p = (o = r.document) == null ? void 0 : o.data) == null ? void 0 : p.css,
1328
+ style: { flex: "1 0 auto" },
1329
+ class: "h-full w-full"
1330
+ }, {
1331
+ default: N(() => [
1332
+ (P(!0), J(Ce, null, Ee(c.layout, (v, k) => (P(), G(l, {
1333
+ key: k,
1334
+ "component-name": v.componentName,
1335
+ "component-props": {
1336
+ ...v.props,
1337
+ _document: r.document,
1338
+ _value: v.value
1339
+ },
1340
+ children: v.children,
1341
+ "_first-block": k === 0,
1342
+ "_last-block": k === c.layout.length - 1
1343
+ }, null, 8, ["component-name", "component-props", "children", "_first-block", "_last-block"]))), 128))
1344
+ ]),
1345
+ _: 1
1346
+ }, 8, ["input-style"])
1347
+ ];
1348
+ }),
1349
+ _: 1
1350
+ })
1351
+ ]);
1352
+ }
1353
+ const Yn = /* @__PURE__ */ he(Gn, [["render", Kn]]), ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1354
+ __proto__: null,
1355
+ default: Yn
1356
+ }, Symbol.toStringTag, { value: "Module" }));
1357
+ export {
1358
+ Yn as D,
1359
+ ir as F,
1360
+ bn as _,
1361
+ Un as a,
1362
+ Xe as b,
1363
+ ar as c,
1364
+ rr as g,
1365
+ or as i,
1366
+ nt as l,
1367
+ Yt as u
1368
+ };