@cling-se/widget 0.19.7 → 0.19.9

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 (128) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{AddClientCallout-BdGevuQo.js → AddClientCallout-C400wpa7.js} +19 -19
  3. package/dist/{AnswerModal-DfjF-RVP.js → AnswerModal-C_vekdpA.js} +80 -80
  4. package/dist/{AttachmentItem-BEd3qVAo.js → AttachmentItem-CYeH1VVw.js} +14 -14
  5. package/dist/{BaseUpload-Zm4EX8ir.js → BaseUpload-DGLogqK4.js} +256 -256
  6. package/dist/{BlockMedia-ZHaA4OMV.js → BlockMedia-Hbm0GWNw.js} +33 -32
  7. package/dist/{CCallout-BlglVZrm.js → CCallout-BPCwr3uM.js} +15 -15
  8. package/dist/{CCurrencyDropdown-BzvKsm1N.js → CCurrencyDropdown-CZXWH0mA.js} +13 -13
  9. package/dist/{CDropdownItem-B5rgSee7.js → CDropdownItem-B9dja0RC.js} +11 -11
  10. package/dist/{CFormField.vue_vue_type_script_setup_true_lang-CVy64zGe.js → CFormField.vue_vue_type_script_setup_true_lang-HLxgkrxm.js} +17 -17
  11. package/dist/{CPhoneFormat-DaDNMlmK.js → CPhoneFormat-C1cjsMVZ.js} +1 -1
  12. package/dist/{CPhoneInput-BUogm59J.js → CPhoneInput-DwcIFaqz.js} +23 -23
  13. package/dist/{CPriceInput-Cd5OHMJS.js → CPriceInput-C_PfAhRb.js} +12 -12
  14. package/dist/{CSelect-CmoAbVkP.js → CSelect-D4A_clvT.js} +15 -15
  15. package/dist/{CSkeleton-BF6EYj8H.js → CSkeleton-h81Vudx0.js} +16 -16
  16. package/dist/{ClientAutocomplete-CHfp4YiV.js → ClientAutocomplete-B_R7zgvM.js} +24 -24
  17. package/dist/{ClientModal-Com23Qgc.js → ClientModal-CBJgrb_y.js} +44 -44
  18. package/dist/{ColorPicker-BzdHtZep.js → ColorPicker-a5yTVc0q.js} +66 -66
  19. package/dist/{CompanyModal-CGjSgTEJ.js → CompanyModal-sRTrUPOY.js} +18 -18
  20. package/dist/{ContentWrapper-CS-Bh4Bk.js → ContentWrapper-Cwd6t51-.js} +16 -16
  21. package/dist/{CoverBlockSettings-DDHQzLdc.js → CoverBlockSettings-8tjji9f1.js} +39 -39
  22. package/dist/{DocAnswer-Cmdsw_CW.js → DocAnswer-D1ZIH1Hn.js} +4 -4
  23. package/dist/{DocDetails-C5Vzh550.js → DocDetails-B5_hBzC-.js} +56 -56
  24. package/dist/{DocForm-DEUVV11n.js → DocForm-BKQvY0Ie.js} +821 -829
  25. package/dist/{DocFormSend-Dt7N3wCz.js → DocFormSend-z0W-xRJP.js} +11 -11
  26. package/dist/{DocLinks-C6-Er0rk.js → DocLinks-BgbDU24h.js} +6 -6
  27. package/dist/{DocModalBase-DbuJwHXi.js → DocModalBase-CNo1u8TK.js} +1 -1
  28. package/dist/{DocPrint-D_uxg7qD.js → DocPrint--UV846r0.js} +15 -15
  29. package/dist/{DocReceipt-D6LP9UAa.js → DocReceipt-BAkWIKbC.js} +23 -23
  30. package/dist/{DocSendReminder-DopLhyjz.js → DocSendReminder-Bk6IVg0R.js} +10 -10
  31. package/dist/{DocTextEditor-DeZtzbgm.js → DocTextEditor-D5zDbbXV.js} +4499 -4438
  32. package/dist/{DocTimeline-DAWZu_KT.js → DocTimeline-KG4zJJOW.js} +16 -16
  33. package/dist/{DocumentClient-kxnT6k9s.js → DocumentClient-CXSxwjOt.js} +12 -12
  34. package/dist/DocumentLayout-C-V_5p3r.js +595 -0
  35. package/dist/{DocumentLogotype-G-a7gBIC.js → DocumentLogotype-H0f7bO0E.js} +18 -18
  36. package/dist/{DocumentVoided-SG_ShMmc.js → DocumentVoided-3F7DChD4.js} +4 -4
  37. package/dist/{EmbedInput-CJL5y3Zj.js → EmbedInput-iG-cDNzZ.js} +8 -8
  38. package/dist/{EmbedSettings-B0X6A9Uy.js → EmbedSettings-DhwFGdKH.js} +12 -12
  39. package/dist/{ErrorCallout-xCSfpQWV.js → ErrorCallout-CyqQ9iRV.js} +10 -10
  40. package/dist/{FilePreviewModal-Da_pMUoO.js → FilePreviewModal-CEUhUuh4.js} +7 -7
  41. package/dist/{Flag-wXawyyMO.js → Flag-Bza5Ltob.js} +4 -4
  42. package/dist/{HeaderSettings-CD3y6-uY.js → HeaderSettings-kEbuiv0n.js} +36 -36
  43. package/dist/{ImageSelectModal-DatnXHH1.js → ImageSelectModal-MDduQIdS.js} +16 -16
  44. package/dist/{ImageUploadWrapper-CwKe3Iq7.js → ImageUploadWrapper-CKJXUAkn.js} +72 -72
  45. package/dist/{Index-BbVHxVFJ.js → Index--_tbiloB.js} +33 -33
  46. package/dist/{Index-y_AJP61r.js → Index-437smvNJ.js} +11 -11
  47. package/dist/{Index-ezY0DbcB.js → Index-8CyLDQv2.js} +5 -5
  48. package/dist/{Index-Cjg3X74T.js → Index-B1tFrOfN.js} +7 -7
  49. package/dist/{Index-Ct735UtM.js → Index-BFwz1G_7.js} +2 -2
  50. package/dist/{Index-BlownK7_.js → Index-BXqNV8F_.js} +7 -7
  51. package/dist/{Index-B53eUt7Y.js → Index-Bege0Vce.js} +15 -15
  52. package/dist/{Index-BTDQax0X.js → Index-Bg1kzWCp.js} +60 -59
  53. package/dist/{Index-9ZFW8Ka7.js → Index-C46cWm4W.js} +7 -7
  54. package/dist/{Index-C2-s62x7.js → Index-CGhWvSf9.js} +11 -11
  55. package/dist/{Index-D-gJQEAD.js → Index-CHIQWumi.js} +6 -6
  56. package/dist/{Index-CQboLS2e.js → Index-CNQhKXtr.js} +8 -8
  57. package/dist/{Index-COF0evH4.js → Index-CUDi4SEx.js} +6 -6
  58. package/dist/{Index-Bb6JZC8l.js → Index-ClA923dR.js} +11 -11
  59. package/dist/{Index-1WPEpaVr.js → Index-D2A8evjo.js} +7 -7
  60. package/dist/{Index-BvAqglwa.js → Index-D4XDugcf.js} +27 -27
  61. package/dist/{Index-GPliVrhC.js → Index-DB3keB-X.js} +7 -7
  62. package/dist/{Index-BJf4YdYB.js → Index-DQLLCnjH.js} +29 -29
  63. package/dist/{Index-Dfy0PsiW.js → Index-DUM-3B1l.js} +29 -29
  64. package/dist/{Index-Ck-_9woY.js → Index-DdZo8evS.js} +456 -461
  65. package/dist/{Index-CTrX3VRa.js → Index-Doc7K3kL.js} +5 -5
  66. package/dist/{Index-DfuzxXzD.js → Index-Dqfwe7SG.js} +2 -2
  67. package/dist/{Index-NnBwJv9v.js → Index-DtCuzght.js} +9 -9
  68. package/dist/{Index-DOeHci16.js → Index-DtDRffCY.js} +7 -7
  69. package/dist/{Index-C-EUJjuk.js → Index-DzKdZg0G.js} +2 -2
  70. package/dist/{Index-yS5OPrJJ.js → Index-DzugmOmj.js} +2 -2
  71. package/dist/{Index-DjfbgA_7.js → Index-E7OzmtR_.js} +30 -27
  72. package/dist/{Index-DkQ8_VkX.js → Index-MmvJQvLm.js} +194 -218
  73. package/dist/{Index-Dxg4gEKd.js → Index-Rb5n5XoO.js} +18 -18
  74. package/dist/{Index-DAkq_7Ws.js → Index-dTgmxz_A.js} +18 -18
  75. package/dist/{Index-Ciy9lnhS.js → Index-eJiQmHhr.js} +2 -2
  76. package/dist/Index-jQsYOOC3.js +4 -0
  77. package/dist/{Index-DzdEqsZB.js → Index-rINXTjpt.js} +16 -16
  78. package/dist/Index-zRXdiRpy.js +49 -0
  79. package/dist/{Index.vue_vue_type_script_lang-B3RoDZmC.js → Index.vue_vue_type_script_lang-B9979oeS.js} +2 -2
  80. package/dist/{InputToggleRow-D5rvQpAw.js → InputToggleRow-CO4fZnAC.js} +15 -15
  81. package/dist/{ManualPopover-Bd-GsLGT.js → ManualPopover-DT4iXoSI.js} +6 -6
  82. package/dist/{MediaWrapper-Ci0XPCcb.js → MediaWrapper-CP_1JzGI.js} +4 -4
  83. package/dist/{NotBindingText-DhndGZE3.js → NotBindingText-D9Um3Agp.js} +2 -2
  84. package/dist/{PackageGroup-4Jt9ClVO.js → PackageGroup-BtH12jVM.js} +103 -103
  85. package/dist/{PdfTerms-CGeJDJpQ.js → PdfTerms-sQh93Xit.js} +9 -9
  86. package/dist/{PdfViewer-o2vb6Fya.js → PdfViewer-DMAcTVND.js} +71 -71
  87. package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-BtnMqKcE.js → PlainHtml.vue_vue_type_script_setup_true_lang-tY-SurWr.js} +2 -2
  88. package/dist/{PriceHeader-BsObxLHK.js → PriceHeader-CG6el7O_.js} +31 -31
  89. package/dist/{SearchApi-ZczKsBb7.js → SearchApi-B39mMGKy.js} +6 -6
  90. package/dist/{SendForm-D5jqkofo.js → SendForm-F5aQPz8w.js} +780 -778
  91. package/dist/{Setup-CdZzn0qW.js → Setup-DuHU2eHC.js} +4 -4
  92. package/dist/{SmartList-B36ffGAZ.js → SmartList-myMj6QGe.js} +1 -1
  93. package/dist/{Sortable.vue_vue_type_script_setup_true_lang-Di1urzqu.js → Sortable.vue_vue_type_script_setup_true_lang-Bb2Nqdsz.js} +118 -118
  94. package/dist/{TermsSettings-CmAHVOuX.js → TermsSettings-Cb6Xms3f.js} +16 -16
  95. package/dist/{ThemeColorRow-CScTIcPB.js → ThemeColorRow-oW3xS1pa.js} +13 -13
  96. package/dist/{ToggleBinding-CVZZlpBR.js → ToggleBinding-B-F9_nAf.js} +7 -7
  97. package/dist/{UploadModal-2tXsmGMM.js → UploadModal-eBx4Vqyo.js} +19 -19
  98. package/dist/{VideoPlayerInput-BDzjZ2St.js → VideoPlayerInput-CtTe4JW4.js} +10 -10
  99. package/dist/{VideoPlayerSettings-BLAEZw4C.js → VideoPlayerSettings-Cvz5B4JX.js} +9 -9
  100. package/dist/{VideoSelectModal-iqgmg85K.js → VideoSelectModal-CXI0aN4g.js} +19 -19
  101. package/dist/{focusDrawerMixin-BmyahQiE.js → focusDrawerMixin-DlcYhFw8.js} +1 -1
  102. package/dist/{formDrawerState-B7ASfNsk.js → formDrawerState-Cf6Q5cuR.js} +1 -1
  103. package/dist/{helpers-BVP2Pul1.js → helpers-Cf9wqfZh.js} +4 -4
  104. package/dist/{index-D0Qee2OX.js → index-BSCAjn53.js} +31 -31
  105. package/dist/{index-Cd4S4J-L.js → index-BStFMzD9.js} +56 -56
  106. package/dist/{index-BDb4bM0D.js → index-BytsFarx.js} +24 -24
  107. package/dist/{index-DXNrJnEc.js → index-Co_PpOtI.js} +10 -10
  108. package/dist/{index-BH5vwOzR.js → index-DPlBYqKB.js} +9 -9
  109. package/dist/{index-B86TZXOh.js → index-DsvlNA3Q.js} +94 -94
  110. package/dist/{index-CsbYpQqP.js → index-r5v1Gv17.js} +57 -57
  111. package/dist/index.es.js +2 -2
  112. package/dist/index.umd.js +153 -158
  113. package/dist/{main-C2Q8_T2Y.js → main-BkjAGG46.js} +14298 -14373
  114. package/dist/{mapFormMixin-CjfqZnmd.js → mapFormMixin-DLFNPgNO.js} +34 -40
  115. package/dist/omit-CvOSNZN7.js +56 -0
  116. package/dist/{publicSenderState-C3ELW8Cw.js → publicSenderState-DeC1m0ps.js} +4 -4
  117. package/dist/{splitpanes-CuxtOZyV.js → splitpanes-CsJipBiG.js} +6 -6
  118. package/dist/{template-DzrGrOEa.js → template-Cvzvayl5.js} +6 -6
  119. package/dist/{tippy.esm-Bf86qEue.js → tippy.esm-JEjGtE5F.js} +273 -275
  120. package/dist/{useTermsModal-Be4HLDDm.js → useTermsModal-D2gYy-TP.js} +7 -7
  121. package/dist/{utils-a_Odlqb5.js → utils-DarTPA8c.js} +1 -1
  122. package/dist/{validation-38muBV6x.js → validation-K11g55ZB.js} +4 -4
  123. package/dist/widget.css +1 -1
  124. package/package.json +2 -2
  125. package/dist/DocumentLayout-DaVz9SGF.js +0 -1434
  126. package/dist/Index-CXjLkK_n.js +0 -49
  127. package/dist/Index-qFx0G3fC.js +0 -4
  128. package/dist/omit-DzlbtNCX.js +0 -56
@@ -0,0 +1,595 @@
1
+ import { a7 as S, A as x, d as g, o as u, j as B, W as w, _ as I, p as X, J as N, b_ as Y, l as W, b$ as A, b, c as v, e as L, w as y, F, n as V, R as $, ap as O, i as Z, z as ee, a3 as te, D as R, I as k, q as P, t as p, r as oe, a5 as ne, az as ae, H as _, c0 as se, c1 as le, T as j, by as re, bz as ie, X as ce, a1 as ue, f as C, c2 as de, c3 as me, a2 as pe, x as fe } from "./main-BkjAGG46.js";
2
+ import "./template-Cvzvayl5.js";
3
+ import { C as ye, a as he } from "./CDropdownItem-B9dja0RC.js";
4
+ import "./helpers-Cf9wqfZh.js";
5
+ const ve = (e, t, o) => {
6
+ const n = e[t];
7
+ return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((s, a) => {
8
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
9
+ a.bind(
10
+ null,
11
+ new Error(
12
+ "Unknown variable dynamic import: " + t + (t.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
13
+ )
14
+ )
15
+ );
16
+ });
17
+ }, ge = { class: "c-loading" }, be = /* @__PURE__ */ S({
18
+ __name: "LoadingBlock",
19
+ setup(e) {
20
+ const t = x(`${Math.floor(Math.random() * 56 + 25)}%`);
21
+ return (o, n) => (u(), g("div", ge, [
22
+ B("div", {
23
+ style: w({ width: t.value }),
24
+ class: "c-loading-title"
25
+ }, null, 4),
26
+ n[0] || (n[0] = B("div", { class: "c-loading-body" }, null, -1))
27
+ ]));
28
+ }
29
+ }), E = /* @__PURE__ */ I(be, [["__scopeId", "data-v-70f204ee"]]), q = (e) => {
30
+ const t = Symbol(e);
31
+ return [(s) => X(t, s), (s) => N(t, s), t];
32
+ }, [_e, ke] = q("DocumentWidth"), [xe, tt] = q("DocumentHeight");
33
+ function we(e) {
34
+ const { width: t, height: o } = Y(e);
35
+ return _e(t), xe(o), { width: t, height: o };
36
+ }
37
+ function Ie() {
38
+ return ke(x(window.innerWidth));
39
+ }
40
+ const Ce = {
41
+ name: "DynamicChapter",
42
+ components: {
43
+ DynamicChapter: W(() => Promise.resolve().then(() => Pe)),
44
+ LoadingBlock: E
45
+ },
46
+ provide() {
47
+ return this.level !== 0 ? {} : {
48
+ _firstBlock: this._firstBlock,
49
+ _lastBlock: this._lastBlock
50
+ };
51
+ },
52
+ inject: {
53
+ isPdf: {
54
+ default: !1
55
+ }
56
+ },
57
+ props: {
58
+ componentProps: {
59
+ type: Object,
60
+ default: () => ({})
61
+ },
62
+ componentName: {
63
+ type: String,
64
+ required: !0
65
+ },
66
+ level: {
67
+ type: Number,
68
+ default: 0
69
+ },
70
+ isVisible: {
71
+ type: [Boolean, Object],
72
+ default: !0
73
+ },
74
+ _firstBlock: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ _lastBlock: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ children: {
83
+ type: Array,
84
+ default: () => []
85
+ },
86
+ onInput: {
87
+ type: Function,
88
+ default: () => {
89
+ }
90
+ },
91
+ onRemove: {
92
+ type: Function,
93
+ default: () => {
94
+ }
95
+ },
96
+ onMount: {
97
+ type: Function,
98
+ default: () => {
99
+ }
100
+ }
101
+ },
102
+ setup() {
103
+ return { docWidth: Ie() };
104
+ },
105
+ data() {
106
+ return {
107
+ component: A(E)
108
+ };
109
+ },
110
+ computed: {
111
+ loader() {
112
+ return () => ve(/* @__PURE__ */ Object.assign({ "../blocks/answer/Index.vue": () => import("./Index--_tbiloB.js"), "../blocks/attachments/Index.vue": () => import("./Index-E7OzmtR_.js"), "../blocks/coverBlock/Index.vue": () => import("./Index-Rb5n5XoO.js"), "../blocks/custom/Index.vue": () => import("./Index-MmvJQvLm.js"), "../blocks/docChapter/Index.vue": () => import("./Index-rINXTjpt.js"), "../blocks/docChapterSub/Index.vue": () => import("./Index-zRXdiRpy.js"), "../blocks/docParties/Index.vue": () => import("./Index-DUM-3B1l.js"), "../blocks/embed/Index.vue": () => import("./Index-8CyLDQv2.js"), "../blocks/estimatedTimeToCompleteText/Index.vue": () => import("./Index-DB3keB-X.js"), "../blocks/estimatedWorkStartAndEndAtText/Index.vue": () => import("./Index-B1tFrOfN.js"), "../blocks/extraWorkConstructionPricingList/Index.vue": () => import("./Index-C46cWm4W.js"), "../blocks/extraWorkTimeImpactText/Index.vue": () => import("./Index-DtDRffCY.js"), "../blocks/header/Index.vue": () => import("./Index-Bg1kzWCp.js"), "../blocks/multiGroupPricing/Index.vue": () => import("./Index-BXqNV8F_.js"), "../blocks/notBinding/Index.vue": () => import("./Index-D2A8evjo.js"), "../blocks/packageGroup/Index.vue": () => import("./Index-CNQhKXtr.js"), "../blocks/pdf/Index.vue": () => import("./Index-DQLLCnjH.js"), "../blocks/presentation/Index.vue": () => import("./Index-D4XDugcf.js"), "../blocks/terms/Index.vue": () => import("./Index-CGhWvSf9.js"), "../blocks/textContent/Index.vue": () => import("./Index-DtCuzght.js"), "../blocks/videoPlayer/Index.vue": () => import("./Index-dTgmxz_A.js"), "../blocks/workAddressText/Index.vue": () => import("./Index-Doc7K3kL.js") }), `../blocks/${this.componentName}/Index.vue`, 4);
113
+ },
114
+ isPdfPrintAndPdfBlock() {
115
+ var e, t;
116
+ return !!(this.isPdf && ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf");
117
+ },
118
+ isPdfBlock() {
119
+ var e, t;
120
+ return ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf";
121
+ }
122
+ },
123
+ mounted() {
124
+ this.loader().then(() => {
125
+ this.component = A(W(() => this.loader()));
126
+ }).catch((e) => {
127
+ console.log(e);
128
+ });
129
+ }
130
+ };
131
+ function Se(e, t, o, n, s, a) {
132
+ const l = b("DynamicChapter", !0);
133
+ return s.component ? (u(), v(O(s.component), $({ key: 0 }, o.componentProps, {
134
+ class: o.level === 0 && [
135
+ {
136
+ "is-mobile": n.docWidth <= 640,
137
+ "is-tablet": n.docWidth > 640 && n.docWidth <= 1024,
138
+ "is-desktop": n.docWidth > 1024
139
+ },
140
+ o.componentProps && o.componentProps.classList ? o.componentProps.classList : ""
141
+ ],
142
+ "enable-spacing-x": !a.isPdfPrintAndPdfBlock,
143
+ "pdf-spacing-x": a.isPdfBlock,
144
+ "enable-spacing-y": !!(!a.isPdfPrintAndPdfBlock && o.isVisible),
145
+ onInput: o.onInput,
146
+ onRemove: o.onRemove,
147
+ onVnodeMounted: t[0] || (t[0] = (i) => o.onMount(e.$el))
148
+ }), {
149
+ default: y(() => [
150
+ o.children.length ? (u(!0), g(F, { key: 0 }, V(o.children, (i, r) => (u(), v(l, {
151
+ key: i.itemId + `${r}`,
152
+ "component-name": i.componentName,
153
+ "component-props": {
154
+ ...i.props,
155
+ _document: o.componentProps._document,
156
+ _value: i._value,
157
+ _nodeId: i.nodeId
158
+ },
159
+ children: i.children,
160
+ level: o.level + 1,
161
+ "on-input": o.onInput,
162
+ "on-remove": o.onRemove,
163
+ "on-mount": o.onMount
164
+ }, null, 8, ["component-name", "component-props", "children", "level", "on-input", "on-remove", "on-mount"]))), 128)) : L("", !0)
165
+ ]),
166
+ _: 1
167
+ }, 16, ["class", "enable-spacing-x", "pdf-spacing-x", "enable-spacing-y", "onInput", "onRemove"])) : L("", !0);
168
+ }
169
+ const z = /* @__PURE__ */ I(Ce, [["render", Se]]), Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
170
+ __proto__: null,
171
+ default: z
172
+ }, Symbol.toStringTag, { value: "Module" })), G = "data-is-preview", De = Z.google.fontsKey, Be = "https://www.googleapis.com/webfonts/v1/webfonts", Le = "https://fonts.googleapis.com/css", M = {
173
+ 100: { label: "Thin", value: "100" },
174
+ 200: { label: "Extra Light", value: "200" },
175
+ 300: { label: "Light", value: "300" },
176
+ regular: { label: "Normal", value: "400" },
177
+ 500: { label: "Medium", value: "500" },
178
+ 600: { label: "Semi Bold", value: "600" },
179
+ 700: { label: "Bold", value: "700" },
180
+ 800: { label: "Extra Bold", value: "800" },
181
+ 900: { label: "Black", value: "900" }
182
+ }, Q = (e) => `font-${e.replace(/\s+/g, "-").toLowerCase()}`, Fe = (e, t = !1) => {
183
+ const o = document.getElementById(Q(e));
184
+ return o !== null && o.getAttribute(G) === t.toString();
185
+ }, Ve = (e, t = !1) => {
186
+ const o = document.head || document.getElementsByTagName("head")[0], n = document.createElement("link");
187
+ n.id = Q(e), n.setAttribute("rel", "stylesheet"), n.setAttribute(G, t.toString());
188
+ let s = `${Le}?family=${e.replace(/\s/gi, "+")}`;
189
+ 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), o.appendChild(n), n;
190
+ }, U = (e, t = !1) => {
191
+ e && !Fe(e, t) && Ve(e, t);
192
+ }, H = (e = {}) => {
193
+ if (!(typeof e != "object" || !e))
194
+ for (const t in e)
195
+ t === "fontFamily" ? U(e[t]) : typeof e[t] == "object" && H(e[t]);
196
+ }, K = /* @__PURE__ */ S({
197
+ __name: "FontDropdownItem",
198
+ props: {
199
+ source: {}
200
+ },
201
+ setup(e) {
202
+ const t = e, o = x(null), n = (l, i) => {
203
+ let r = l, c = r.$options.name;
204
+ for (; r && (!c || c !== i); )
205
+ r = r.$parent, r && ({ name: c } = r.$options);
206
+ return r || null;
207
+ }, s = x({
208
+ paddingRight: "calc(0.5 * var(--rem))",
209
+ fontFamily: `'${t.source.family}'`
210
+ }), a = ee();
211
+ return a && (o.value = n(a.proxy, "CDropdown")), te(() => {
212
+ U(t.source.family, !0);
213
+ }), R(
214
+ () => t.source,
215
+ (l) => {
216
+ s.value.fontFamily = `'${l.family}'`;
217
+ }
218
+ ), (l, i) => (u(), v(k(ye), {
219
+ value: l.source,
220
+ "custom-parent": o.value,
221
+ class: "!truncate",
222
+ style: w(s.value)
223
+ }, {
224
+ default: y(() => [
225
+ P(p(l.source.family), 1)
226
+ ]),
227
+ _: 1
228
+ }, 8, ["value", "custom-parent", "style"]));
229
+ }
230
+ }), $e = 1e3 * 60 * 60 * 24 * 14, m = oe({
231
+ list: [],
232
+ fetchedAt: null,
233
+ error: "",
234
+ loading: !1
235
+ }), Oe = async (e = "popularity") => {
236
+ let t = [];
237
+ try {
238
+ const { data: o } = await ne.get(Be, {
239
+ params: {
240
+ sort: e,
241
+ key: De
242
+ }
243
+ });
244
+ t = o.items || [];
245
+ } catch (o) {
246
+ m.error = o;
247
+ }
248
+ return t;
249
+ };
250
+ m.load = async () => {
251
+ if (m.loading) {
252
+ await m.loading;
253
+ return;
254
+ }
255
+ (!m.fetchedAt || m.fetchedAt < Date.now() - $e) && (m.loading = new Promise(async (e) => {
256
+ m.list = await Oe(), m.fetchedAt = Date.now(), e(!1);
257
+ }), await m.loading);
258
+ };
259
+ const J = (e = []) => (e || []).filter((t) => !!M[t]).map((t) => M[t]), ot = async (e) => {
260
+ if (!e || typeof e != "string") return {};
261
+ !m.list.length && !m.error && await m.load();
262
+ const { variants: t } = m.list.find((o) => o.family === e) || {};
263
+ return J(t || []);
264
+ }, je = /* @__PURE__ */ S({
265
+ __name: "VirtualFontsList",
266
+ props: {
267
+ items: {}
268
+ },
269
+ setup(e) {
270
+ const t = e, o = x([...t.items]);
271
+ R(
272
+ () => t.items,
273
+ (c) => {
274
+ o.value = [...c];
275
+ }
276
+ );
277
+ const n = ae(), s = _(() => n.style), a = _(() => ({
278
+ "overflow-y": "auto",
279
+ height: "250px",
280
+ width: "240px",
281
+ ...s
282
+ })), { list: l, containerProps: i, wrapperProps: r } = se(o, {
283
+ itemHeight: 35
284
+ });
285
+ return (c, f) => (u(), g("div", $(k(i), { style: a.value }), [
286
+ B("div", re(ie(k(r))), [
287
+ (u(!0), g(F, null, V(k(l), (d) => (u(), v(K, {
288
+ key: d.index,
289
+ source: d.data
290
+ }, le({ _: 2 }, [
291
+ c.$slots.footer ? {
292
+ name: "footer",
293
+ fn: y(() => [
294
+ j(c.$slots, "footer")
295
+ ]),
296
+ key: "0"
297
+ } : void 0
298
+ ]), 1032, ["source"]))), 128))
299
+ ], 16)
300
+ ], 16));
301
+ }
302
+ }), Te = {
303
+ name: "FontPickerDropdown",
304
+ components: {
305
+ CInput: ue,
306
+ CDropdown: he,
307
+ VirtualFontsList: je
308
+ },
309
+ props: {
310
+ modelValue: {
311
+ type: Object,
312
+ default: null
313
+ },
314
+ height: {
315
+ type: String,
316
+ default: "250px"
317
+ }
318
+ },
319
+ emits: ["update:modelValue"],
320
+ data() {
321
+ return {
322
+ FontDropdownItem: K,
323
+ visualQuery: "",
324
+ // string visual to user
325
+ activeQuery: ""
326
+ // query used for filtering results, hidden behind debounce
327
+ };
328
+ },
329
+ computed: {
330
+ selectedValue: {
331
+ get() {
332
+ return {
333
+ family: "Inter",
334
+ weight: "400",
335
+ ...this.modelValue
336
+ };
337
+ },
338
+ set(e) {
339
+ const { family: t, variants: o = [] } = e || {};
340
+ let { weight: n = "400" } = this.modelValue || {};
341
+ const s = J(o), a = s.map((l) => l.value);
342
+ a.length && !a.includes(`${n}`) && (n = a.reduce(
343
+ (l, i) => Math.abs(i - n) < Math.abs(l - n) ? i : l
344
+ )), this.$emit("update:modelValue", {
345
+ family: t,
346
+ weight: n,
347
+ options: s
348
+ });
349
+ }
350
+ },
351
+ fontsList() {
352
+ const e = m.list || [];
353
+ if (this.activeQuery) {
354
+ const t = new RegExp(this.activeQuery, "i");
355
+ return e.filter((o) => t.test(o.family));
356
+ }
357
+ return e;
358
+ }
359
+ },
360
+ watch: {
361
+ visualQuery: ce(function(t) {
362
+ this.activeQuery = t;
363
+ }, 300)
364
+ },
365
+ created() {
366
+ m.load();
367
+ }
368
+ };
369
+ function We(e, t, o, n, s, a) {
370
+ const l = b("CButton"), i = b("CInput"), r = b("VirtualFontsList"), c = b("CDropdown");
371
+ return u(), v(c, $({
372
+ position: "is-bottom-left",
373
+ ...e.$attrs,
374
+ ...e.$props
375
+ }, {
376
+ ref: "dropdown",
377
+ modelValue: a.selectedValue,
378
+ "onUpdate:modelValue": t[1] || (t[1] = (f) => a.selectedValue = f),
379
+ size: e.$attrs.size,
380
+ disabled: e.$attrs.disabled,
381
+ "menu-styling": {
382
+ minWidth: "250px",
383
+ maxWidth: "300px"
384
+ },
385
+ "max-height": o.height,
386
+ scrollable: !0,
387
+ class: "control"
388
+ }), {
389
+ trigger: y(() => [
390
+ j(e.$slots, "default", {
391
+ selectedFamily: a.selectedValue.family
392
+ }, () => [
393
+ C(l, {
394
+ style: w([{ fontFamily: a.selectedValue.family }, { width: "100%", "text-align": "left", "min-width": "7em" }]),
395
+ class: "is-left"
396
+ }, {
397
+ default: y(() => [
398
+ P(p(a.selectedValue.family), 1)
399
+ ]),
400
+ _: 1
401
+ }, 8, ["style"])
402
+ ])
403
+ ]),
404
+ header: y(() => [
405
+ C(i, {
406
+ modelValue: s.visualQuery,
407
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => s.visualQuery = f),
408
+ placeholder: e.$t("_common:search"),
409
+ filled: "",
410
+ style: { "margin-bottom": "0.25em" }
411
+ }, null, 8, ["modelValue", "placeholder"])
412
+ ]),
413
+ default: y(() => [
414
+ a.fontsList.length ? (u(), v(r, {
415
+ key: 0,
416
+ items: a.fontsList
417
+ }, null, 8, ["items"])) : (u(), g("div", {
418
+ key: 1,
419
+ style: w([{ height: "250px", width: "240px", display: "flex", "justify-content": "center", "align-items": "center" }, { height: o.height }])
420
+ }, p(e.$t("_common:noResults")), 5))
421
+ ]),
422
+ _: 3
423
+ }, 16, ["modelValue", "size", "disabled", "max-height"]);
424
+ }
425
+ const nt = /* @__PURE__ */ I(Te, [["render", We]]), T = de(me), at = T.smallerOrEqual("sm"), Ae = T.between("md", "lg"), Ee = T.greaterOrEqual("lg");
426
+ _(
427
+ () => Ae.value || Ee.value
428
+ );
429
+ function Me({
430
+ minWidthPx: e,
431
+ maxWidthPx: t,
432
+ minFontSize: o,
433
+ maxFontSize: n
434
+ }) {
435
+ const s = e, a = t, l = (n - o) / (a - s), i = -375 * l + o, r = (c) => Math.round(c * 1e3) / 1e3;
436
+ return `clamp(${r(o)}px, ${r(
437
+ i
438
+ )}px + calc(${r(l) * 100} * var(--vw, 1vw)), ${r(
439
+ n
440
+ )}px)`;
441
+ }
442
+ function Ne({ size: e }) {
443
+ let t = e * 0.9;
444
+ return e > 30 && (t = e * 0.8), e > 40 && (t = e * 0.725), e > 50 && (t = e * 0.675), Me({
445
+ minWidthPx: 375,
446
+ maxWidthPx: 1200,
447
+ minFontSize: t,
448
+ maxFontSize: e
449
+ });
450
+ }
451
+ const Re = ({ json: e, prefix: t = "" } = {}) => Object.keys(e || {}).map((o) => {
452
+ const n = e[o], a = Object.keys(n).map((l) => {
453
+ const i = l.startsWith("--") ? l : l.split(/(?=[A-Z])/).join("-").toLowerCase(), r = n[l];
454
+ let c = `${i}:${r}`;
455
+ return i === "font-size" && (c += `; font-size: ${Ne({
456
+ size: parseInt(r, 10)
457
+ })}`), c;
458
+ }).join(";");
459
+ return `${t}${o}{${a}}`;
460
+ }).join(`
461
+ `), qe = {
462
+ name: "DynamicStyle",
463
+ props: {
464
+ json: {
465
+ type: Object,
466
+ default: null
467
+ },
468
+ prefix: {
469
+ type: String,
470
+ default: ""
471
+ }
472
+ },
473
+ created() {
474
+ H(this.json);
475
+ },
476
+ methods: {
477
+ jsonToCss: Re
478
+ }
479
+ };
480
+ function ze(e, t, o, n, s, a) {
481
+ return o.json ? (u(), v(O("style"), { key: 0 }, {
482
+ default: y(() => [
483
+ P(p(a.jsonToCss({ json: o.json, prefix: o.prefix })), 1)
484
+ ]),
485
+ _: 1
486
+ })) : L("", !0);
487
+ }
488
+ const Ge = /* @__PURE__ */ I(qe, [["render", ze]]), Qe = /* @__PURE__ */ S({
489
+ __name: "DocumentStyleContainer",
490
+ props: {
491
+ inputStyle: {}
492
+ },
493
+ setup(e) {
494
+ const t = e, { canEdit: o, isForm: n } = N("viewSettings", {
495
+ canEdit: !1,
496
+ isForm: !1
497
+ }), s = pe("container"), { width: a, height: l } = we(s), i = _(() => ({
498
+ "--vw": `${a.value / 100}px`,
499
+ "--vh": `clamp(7.5px, ${l.value / 100}px, ${o ? 7.5 : 9}px)`
500
+ })), r = _(
501
+ () => `document-base-style-${Math.random().toString(36).substr(2, 9)}`
502
+ ), c = {
503
+ '[data-typography="title"]': "title",
504
+ h1: "h1",
505
+ h2: "h2",
506
+ h3: "h3",
507
+ p: "p",
508
+ blockquote: "blockquote",
509
+ ".chapter": "section"
510
+ }, f = _(() => Object.keys(c).filter((h) => !(t.inputStyle || {})[h]).map((h) => `document-legacy-style-${c[h]}`)), d = _(
511
+ () => {
512
+ var h, D;
513
+ return (D = (h = t.inputStyle) == null ? void 0 : h[".chapter"]) == null ? void 0 : D["--accentColor"];
514
+ }
515
+ );
516
+ return (h, D) => (u(), g("div", {
517
+ ref_key: "container",
518
+ ref: s,
519
+ class: fe([...f.value, r.value]),
520
+ style: w(k(n) && i.value)
521
+ }, [
522
+ (u(), v(O("style"), null, {
523
+ default: y(() => [
524
+ P(" .primary-text-color { color: " + p(d.value) + " !important } .primary-background-color, quill-format ul li::before { background-color: " + p(d.value) + " !important } .primary-box-shadow-left-color { box-shadow: inset 4px 0 " + p(d.value) + " !important } .primary-border-left-color { border-left-color: " + p(d.value) + " !important } .primary-pseudo-background::after { background-color: " + p(d.value) + " !important } .primary-svg-fill { fill: " + p(d.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 " + p(d.value ? d.value.replace(/[^,]+(?=\))/, "0.08") : "") + " !important} .quill-format ul li::before { background-color: " + p(d.value) + " !important } ", 1)
525
+ ]),
526
+ _: 1
527
+ })),
528
+ C(Ge, {
529
+ json: h.inputStyle,
530
+ prefix: `.${r.value}.${r.value}.${r.value} `
531
+ }, null, 8, ["json", "prefix"]),
532
+ j(h.$slots, "default")
533
+ ], 6));
534
+ }
535
+ }), Ue = {
536
+ name: "DocumentLayout",
537
+ components: {
538
+ DynamicChapter: z,
539
+ DocumentStyleContainer: Qe
540
+ },
541
+ props: {
542
+ document: {
543
+ type: Object,
544
+ required: !0
545
+ }
546
+ },
547
+ computed: {
548
+ layout() {
549
+ var e;
550
+ return ((e = this.document) == null ? void 0 : e.readLayout) || [];
551
+ }
552
+ }
553
+ }, He = { class: "font-family-default h-full w-full" };
554
+ function Ke(e, t, o, n, s, a) {
555
+ var r, c;
556
+ const l = b("DynamicChapter"), i = b("DocumentStyleContainer");
557
+ return u(), g("div", He, [
558
+ C(i, {
559
+ "input-style": (c = (r = o.document) == null ? void 0 : r.data) == null ? void 0 : c.css,
560
+ style: { flex: "1 0 auto" },
561
+ class: "h-full w-full"
562
+ }, {
563
+ default: y(() => [
564
+ (u(!0), g(F, null, V(a.layout, (f, d) => (u(), v(l, {
565
+ key: d,
566
+ "component-name": f.componentName,
567
+ "component-props": {
568
+ ...f.props,
569
+ _document: o.document,
570
+ _value: f.value
571
+ },
572
+ children: f.children,
573
+ "_first-block": d === 0,
574
+ "_last-block": d === a.layout.length - 1
575
+ }, null, 8, ["component-name", "component-props", "children", "_first-block", "_last-block"]))), 128))
576
+ ]),
577
+ _: 1
578
+ }, 8, ["input-style"])
579
+ ]);
580
+ }
581
+ const Je = /* @__PURE__ */ I(Ue, [["render", Ke]]), st = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
582
+ __proto__: null,
583
+ default: Je
584
+ }, Symbol.toStringTag, { value: "Module" }));
585
+ export {
586
+ Je as D,
587
+ nt as F,
588
+ Qe as _,
589
+ z as a,
590
+ st as b,
591
+ ot as g,
592
+ at as i,
593
+ U as l,
594
+ Ie as u
595
+ };
@@ -1,13 +1,13 @@
1
- import { a as _ } from "./publicSenderState-C3ELW8Cw.js";
2
- import { C as w, a as C } from "./CDropdownItem-B5rgSee7.js";
3
- import { _ as v, l as b, m as k, a as L, g as D, e as d, o as i, b as p, d as n, w as s, j as u, c as I, Y as P, x as r, t as m, F as V, f as g } from "./main-C2Q8_T2Y.js";
1
+ import { s as _ } from "./publicSenderState-DeC1m0ps.js";
2
+ import { C as w, a as C } from "./CDropdownItem-B9dja0RC.js";
3
+ import { _ as v, m as b, a as k, l as L, b as d, d as p, e as u, o as i, f as n, w as s, q as r, t as m, F as D, c as I, j as g, W as P, g as V } from "./main-BkjAGG46.js";
4
4
  const B = {
5
5
  name: "DocumentLogotype",
6
6
  components: {
7
- CDropdown: w,
8
- CDropdownItem: C,
9
- ImageUploadWrapper: b(
10
- () => import("./ImageUploadWrapper-CwKe3Iq7.js")
7
+ CDropdown: C,
8
+ CDropdownItem: w,
9
+ ImageUploadWrapper: L(
10
+ () => import("./ImageUploadWrapper-CKJXUAkn.js")
11
11
  )
12
12
  },
13
13
  inject: {
@@ -46,8 +46,8 @@ const B = {
46
46
  }
47
47
  },
48
48
  methods: {
49
- ...L({
50
- updateCompany: D.DO_UPDATE_CURRENT_COMPANY
49
+ ...b({
50
+ updateCompany: V.DO_UPDATE_CURRENT_COMPANY
51
51
  }),
52
52
  initUpload() {
53
53
  this.$refs.uploadWrapper && this.$refs.uploadWrapper.onClick();
@@ -65,11 +65,11 @@ const B = {
65
65
  }, S = {
66
66
  key: 0,
67
67
  style: { display: "inline-block", width: "fit-content", "will-change": "opacity", "z-index": "3" }
68
- }, U = {
68
+ }, W = {
69
69
  key: 0,
70
70
  class: "logo",
71
71
  style: { "min-height": "35px" }
72
- }, W = ["src"], E = {
72
+ }, U = ["src"], E = {
73
73
  key: 1,
74
74
  style: { display: "inline-block" }
75
75
  }, N = ["src"];
@@ -78,13 +78,13 @@ function z(o, e, t, A, F, a) {
78
78
  return a.viewSettings.canEdit ? (i(), p("div", S, [
79
79
  n(h, { position: "is-bottom-right" }, {
80
80
  trigger: s(() => [
81
- a.logotype && t.showLogo ? (i(), p("div", U, [
82
- u("img", {
81
+ a.logotype && t.showLogo ? (i(), p("div", W, [
82
+ g("img", {
83
83
  src: a.logotype,
84
84
  alt: "",
85
85
  width: "150",
86
86
  class: "hover:outline-primary-500 hover:outline hover:outline-2"
87
- }, null, 8, W)
87
+ }, null, 8, U)
88
88
  ])) : (i(), I(y, {
89
89
  key: 1,
90
90
  style: P(!t.hasHover && { visibility: "hidden", pointerEvents: "none" }),
@@ -112,7 +112,7 @@ function z(o, e, t, A, F, a) {
112
112
  ]),
113
113
  _: 1
114
114
  }, 8, ["value"]),
115
- t.showLogo ? (i(), p(V, { key: 0 }, [
115
+ t.showLogo ? (i(), p(D, { key: 0 }, [
116
116
  n(l, { separator: !0 }),
117
117
  n(l, { onClick: a.initUpload }, {
118
118
  default: s(() => [
@@ -129,7 +129,7 @@ function z(o, e, t, A, F, a) {
129
129
  ]),
130
130
  _: 1
131
131
  }, 8, ["disabled"])
132
- ], 64)) : g("", !0)
132
+ ], 64)) : u("", !0)
133
133
  ]),
134
134
  _: 1
135
135
  }),
@@ -139,12 +139,12 @@ function z(o, e, t, A, F, a) {
139
139
  "upload-options": { maxWidth: 500, maxHeight: 300 }
140
140
  }, null, 8, ["on-image-upload"])
141
141
  ])) : t.showLogo ? (i(), p("div", E, [
142
- u("img", {
142
+ g("img", {
143
143
  src: a.logotype,
144
144
  alt: "",
145
145
  width: "150"
146
146
  }, null, 8, N)
147
- ])) : g("", !0);
147
+ ])) : u("", !0);
148
148
  }
149
149
  const j = /* @__PURE__ */ v(B, [["render", z], ["__scopeId", "data-v-0a4d2733"]]);
150
150
  export {