@cling-se/widget 0.15.3 → 0.15.6

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 (134) hide show
  1. package/README.md +43 -43
  2. package/dist/{AddClientCallout-8s5a1_CZ.js → AddClientCallout-BpWCvb7A.js} +15 -13
  3. package/dist/{AnswerModal-Cnp43tGo.js → AnswerModal-0JXov7oA.js} +71 -71
  4. package/dist/{AttachmentItem-BP85gcjP.js → AttachmentItem-C93ndWhI.js} +17 -12
  5. package/dist/{BaseDatePicker-C27CsTzy.js → BaseDatePicker-BaUxrKlN.js} +2 -2
  6. package/dist/{BaseUpload-DnhS3hGx.js → BaseUpload-CACi6tYY.js} +3 -3
  7. package/dist/{BlockMedia-D4nhek2s.js → BlockMedia-Dlv23tgo.js} +2 -2
  8. package/dist/{CCallout-CQjRcxpC.js → CCallout-jnIpJu5U.js} +4 -5
  9. package/dist/{CCurrencyDropdown-BT01qBGg.js → CCurrencyDropdown-BQLDbp9J.js} +4 -4
  10. package/dist/{CDropdownItem-BSPNul90.js → CDropdownItem-CNUf29O4.js} +139 -37
  11. package/dist/{CFormField-Cz_jNazS.js → CFormField-qy_STCgm.js} +3 -4
  12. package/dist/{CPhoneFormat-C017AoM0.js → CPhoneFormat-BZd_xftN.js} +1 -1
  13. package/dist/CPhoneInput-j4Zuah8p.js +138 -0
  14. package/dist/{CPriceInput-jktMjvwx.js → CPriceInput-CXGw4w0R.js} +2 -2
  15. package/dist/CSelect-CSwTYXae.js +91 -0
  16. package/dist/CSkeleton-B5J9cKAm.js +55 -0
  17. package/dist/ClientAutocomplete-CjaUEuHJ.js +438 -0
  18. package/dist/{ClientModal-DLtFhJya.js → ClientModal-Cn40dzh3.js} +77 -42
  19. package/dist/{ColorPicker-MQmVGbvm.js → ColorPicker-wUW8hJ8i.js} +2 -2
  20. package/dist/{CompanyModal-Qx5xMku0.js → CompanyModal-CbcusrDu.js} +25 -19
  21. package/dist/{ContentWrapper-B9NQqp2q.js → ContentWrapper-Bad8dXOX.js} +11 -11
  22. package/dist/CoverBlockSettings-DX390gBU.js +659 -0
  23. package/dist/{DocAnswer-BlxFv_Gc.js → DocAnswer-BESzyKCO.js} +2 -2
  24. package/dist/{DocDetails-dGcYGJpp.js → DocDetails-1rMbwwY3.js} +10 -10
  25. package/dist/{DocForm-C6o_XBcW.js → DocForm-B3IxEK4j.js} +512 -498
  26. package/dist/{DocFormSend-_prtxNIf.js → DocFormSend-sm8Hu8Be.js} +14 -15
  27. package/dist/{DocLinks-Dp495SCS.js → DocLinks-CyXFaNcq.js} +2 -2
  28. package/dist/{DocModalBase-B0wYq3ft.js → DocModalBase-CSh4Lkzq.js} +2 -2
  29. package/dist/{DocPrint-CURxofeU.js → DocPrint-BQ-M-3OC.js} +3 -3
  30. package/dist/{DocReceipt-DgGcBRVH.js → DocReceipt-OoEOv4bh.js} +25 -20
  31. package/dist/{DocSendReminder-CPty4svi.js → DocSendReminder-dQcAFIdw.js} +19 -16
  32. package/dist/{DocTextEditor-BYsXFRLg.js → DocTextEditor-Ckfx6Hj5.js} +13 -15
  33. package/dist/{DocTimeline-CHg1QykR.js → DocTimeline-DDaN8k9R.js} +36 -34
  34. package/dist/{DocumentClient-CZ6N73pQ.js → DocumentClient-DBA3AQQG.js} +5 -5
  35. package/dist/{DocumentLayout-CiszuoQc.js → DocumentLayout-D42e3G51.js} +1503 -1539
  36. package/dist/{DocumentLogotype-BgFCWcwC.js → DocumentLogotype-ngySb8g4.js} +18 -15
  37. package/dist/{DocumentVoided-DT2hhHk2.js → DocumentVoided-Dtj2XpOI.js} +1 -1
  38. package/dist/{EmbedInput-aLmvzK1I.js → EmbedInput-CxqpXi4D.js} +25 -21
  39. package/dist/{EmbedSettings-BZipciy9.js → EmbedSettings-B4ejIQIJ.js} +13 -11
  40. package/dist/{ErrorCallout-CNxSDsr_.js → ErrorCallout-BiCmogrM.js} +6 -6
  41. package/dist/{FilePreviewModal-DxdksQiy.js → FilePreviewModal-CpSfuR9V.js} +3 -3
  42. package/dist/Flag-B9CEVlmX.js +46 -0
  43. package/dist/{HeaderSettings-DeoSRi6O.js → HeaderSettings-CowCzINW.js} +155 -110
  44. package/dist/{ImageSelectModal-DvQz2VPi.js → ImageSelectModal-DdzcxIMp.js} +6 -6
  45. package/dist/{ImageUploadWrapper-CNQRdHF9.js → ImageUploadWrapper-CWCF8Dlc.js} +3 -3
  46. package/dist/{Index-CPjAXBMU.js → Index-07hqDjA-.js} +5 -5
  47. package/dist/{Index-CDKq7Fx6.js → Index-4_K-mW5b.js} +4 -4
  48. package/dist/Index-B4PLiPUX.js +28 -0
  49. package/dist/{Index-CjfCyQlB.js → Index-B4imH9tr.js} +5 -5
  50. package/dist/{Index-CJeSVpRh.js → Index-BGXkhXYw.js} +2 -2
  51. package/dist/{Index-BjdxeF4C.js → Index-BLK2yfMF.js} +2 -2
  52. package/dist/{Index-w5DWfGOc.js → Index-BS2bqI3s.js} +4 -4
  53. package/dist/{Index-CWj2vDHc.js → Index-BXm5pjk3.js} +49 -44
  54. package/dist/{Index-B3Q09phm.js → Index-BY9jJJk1.js} +4 -4
  55. package/dist/{Index-BEpKb8IR.js → Index-BeAySORd.js} +4 -4
  56. package/dist/{Index-BIv8flFB.js → Index-BguXp1xd.js} +9 -9
  57. package/dist/{Index-CTqdaykO.js → Index-CEQgPBnH.js} +18 -12
  58. package/dist/{Index-q04Dwxrr.js → Index-CWRkkwfa.js} +7 -7
  59. package/dist/{Index-3bD76d9q.js → Index-CaRFixxe.js} +7 -7
  60. package/dist/{Index-D-l3i9vY.js → Index-ClP8s9kZ.js} +3 -3
  61. package/dist/{Index-BDCgilFk.js → Index-Cmu_M3TM.js} +2 -2
  62. package/dist/{Index-BglKAnNq.js → Index-Cnyk_-IC.js} +7 -7
  63. package/dist/{Index-CvRNeJ4U.js → Index-CpLsMmCx.js} +124 -123
  64. package/dist/{Index-CXibuEkU.js → Index-D7WQe9WH.js} +15 -15
  65. package/dist/{Index-CTk6Nh-I.js → Index-DAsAy5JF.js} +7 -7
  66. package/dist/{Index-BiVwDgqW.js → Index-DEcCSixa.js} +2 -2
  67. package/dist/{Index-PUFeH_1z.js → Index-DMy3kJ7T.js} +4 -4
  68. package/dist/{Index-Cfc0Q0AG.js → Index-DWC0ggkj.js} +6 -6
  69. package/dist/{Index-B0n1UOOA.js → Index-DZ59IAyR.js} +6 -6
  70. package/dist/{Index-S3LqU0A0.js → Index-DdJbi1AO.js} +12 -10
  71. package/dist/{Index-B9_POjpY.js → Index-Df9ct4wb.js} +23 -21
  72. package/dist/{Index-D1NwTUs-.js → Index-DhrjL3IY.js} +5 -5
  73. package/dist/{Index-FC1UsElU.js → Index-Dm0Fzc6C.js} +7 -7
  74. package/dist/{Index-Ch5j2tqD.js → Index-DqSikIZB.js} +2 -2
  75. package/dist/{Index-BeMeWDIf.js → Index-DtSf7JJt.js} +6 -6
  76. package/dist/{Index-BNJ2KHKc.js → Index-FfBNBm3w.js} +3 -3
  77. package/dist/{Index-jIIHHGh3.js → Index-SN7H4PM1.js} +489 -471
  78. package/dist/{Index-CePHdKi2.js → Index-U_PvsI4Y.js} +5 -5
  79. package/dist/{Index-C-CE21WK.js → Index-sFiPn5zO.js} +5 -5
  80. package/dist/{InputToggleRow-CvHvRdsn.js → InputToggleRow-CRC8ievQ.js} +2 -2
  81. package/dist/{ManualPopover-DxE-6-Sp.js → ManualPopover-15SKAS2F.js} +1 -1
  82. package/dist/{MediaWrapper-DNi80fbw.js → MediaWrapper-CihDdp6P.js} +3 -3
  83. package/dist/{NotBindingText-D2rYFVxr.js → NotBindingText-nUBihSic.js} +2 -2
  84. package/dist/{PackageGroup-6ar8HjPo.js → PackageGroup-Bk0UeRqr.js} +26 -20
  85. package/dist/PdfTerms-Cy2kB_Zo.js +31 -0
  86. package/dist/{PdfViewer-B5qbLLtd.js → PdfViewer-BMcMfsRH.js} +5 -5
  87. package/dist/{PlainHtml-CIMtcn2F.js → PlainHtml-BDvPNe17.js} +1 -1
  88. package/dist/{PriceHeader-BSpj_-5M.js → PriceHeader-DzvUaY9O.js} +15 -15
  89. package/dist/{SearchApi-Cwgf52EV.js → SearchApi-BPJpYWWz.js} +2 -2
  90. package/dist/SendForm-DWVu8jq8.js +1023 -0
  91. package/dist/{Setup-CRmiH9lD.js → Setup-DjxGq4d9.js} +1 -1
  92. package/dist/{SmartList-D6AvxfSL.js → SmartList-Bh10ojB0.js} +1 -1
  93. package/dist/{TermsSettings-DEO1O460.js → TermsSettings-Cg8TYiLL.js} +17 -12
  94. package/dist/{ThemeColorRow-Cy1NKEIG.js → ThemeColorRow-BeNhoFSI.js} +4 -4
  95. package/dist/{ToggleBinding-BvIUt1Jx.js → ToggleBinding-KmMUK5gz.js} +12 -10
  96. package/dist/{UploadModal-C1j-GeMD.js → UploadModal-DTmPPCz3.js} +6 -6
  97. package/dist/{VideoPlayerInput-BmbrquN6.js → VideoPlayerInput-Z5j6JzLW.js} +15 -11
  98. package/dist/{VideoPlayerSettings-B7HpBoWX.js → VideoPlayerSettings-C7GjuMAw.js} +3 -3
  99. package/dist/{VideoSelectModal-CeaG2tME.js → VideoSelectModal-DMIdcoOE.js} +4 -4
  100. package/dist/{answerDocumentMixin-AcDG8Byi.js → answerDocumentMixin-DulmofDA.js} +3 -3
  101. package/dist/{debounce-HJoaSvIY.js → debounce-nohaKn7u.js} +16 -16
  102. package/dist/{focusDrawerMixin-CBYjpEGL.js → focusDrawerMixin-BsYcC4qG.js} +1 -1
  103. package/dist/{formDrawerState-DYSBcjo4.js → formDrawerState-Bpcaq429.js} +1 -1
  104. package/dist/{formValidationMixin-Dqlhg0R2.js → formValidationMixin-DYGNCEbq.js} +1 -1
  105. package/dist/{index-CLOsPxCh.js → index-BUGMJTF2.js} +35 -33
  106. package/dist/{index-CKZmpLr6.js → index-BVOHCIHl.js} +781 -2021
  107. package/dist/{index-CFe1BJZJ.js → index-CtA6LmXt.js} +1 -1
  108. package/dist/{index-zzCfHTf8.js → index-CxitjuY3.js} +2 -2
  109. package/dist/{index-CFx0cpeM.js → index-CySeSzas.js} +1 -1
  110. package/dist/{index-CFwLDxbi.js → index-zBWldKKX.js} +18 -17
  111. package/dist/index.es.js +10 -10
  112. package/dist/index.umd.js +177 -173
  113. package/dist/{main-BIwKzAN8.js → main-CfSVOXu-.js} +12995 -11349
  114. package/dist/{mapFormMixin-e2PJ431T.js → mapFormMixin-BTZaIaQ8.js} +1 -1
  115. package/dist/omit-DIEW6Th9.js +31 -0
  116. package/dist/{publicSenderState-D-_7UwjT.js → publicSenderState-B4TdI-yD.js} +1 -1
  117. package/dist/regions-BdZt9Srn.js +1250 -0
  118. package/dist/simplebar.min-BZ0EEeAp.js +71 -0
  119. package/dist/style.css +2 -2
  120. package/dist/{throttle-B2yMLA5N.js → throttle-JENEyCY1.js} +2 -2
  121. package/dist/{tinycolor-vIxz4Xgi.js → tinycolor-79beE8BV.js} +1 -1
  122. package/dist/{tippy.esm-DiOYviyf.js → tippy.esm-CR28gOMM.js} +208 -206
  123. package/dist/{utils-CFXqaEy7.js → utils-CD2k1yv3.js} +1 -1
  124. package/dist/{vuedraggable.umd-DDT8qZBI.js → vuedraggable.umd-IXGjMCUG.js} +1 -1
  125. package/package.json +2 -11
  126. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  127. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  128. package/dist/ClientAutocomplete-B3z6RPXr.js +0 -82
  129. package/dist/CoverBlockSettings-Bcz_W5I3.js +0 -275
  130. package/dist/Flag-3OyFDPsP.js +0 -114
  131. package/dist/Index-Cr6DlYGN.js +0 -21
  132. package/dist/PdfTerms-B-lbU_6H.js +0 -36
  133. package/dist/formComponentsInstall-DMoWrprH.js +0 -2505
  134. package/dist/omit-CpamclWf.js +0 -31
@@ -1,16 +1,18 @@
1
- import { m as y } from "./mapFormMixin-e2PJ431T.js";
2
- import { E as S } from "./ErrorCallout-CNxSDsr_.js";
3
- import { aJ as L, aK as P, aL as E, aM as z, aN as B, aO as W, k as j, aP as F, n as u, g as p, w as k, aG as N, aQ as w, aR as H, r as C, ar as f, ai as q, aS as U, as as G, aT as K, aU as Y, aV as T, p as Z, b as o, Y as g, z as J, B as Q, aW as X, t as ee, aa as te } from "./main-BIwKzAN8.js";
1
+ import { m as y } from "./mapFormMixin-BTZaIaQ8.js";
2
+ import { C as W } from "./CCallout-jnIpJu5U.js";
3
+ import { C as x, a as b, w as B } from "./CDropdownItem-CNUf29O4.js";
4
+ import { E as V } from "./ErrorCallout-BiCmogrM.js";
5
+ import { aL as F, aM as R, aN as j, aO as N, aP as H, aQ as q, l as U, aR as G, n as u, g as p, D as k, aE as K, aS as T, aT as Y, r as I, av as f, $ as Z, aU as J, aw as Q, aV as X, aW as ee, aX as A, p as te, b as o, v as ie, Z as g, H as se, K as ae, aY as ne, z as re, ae as oe } from "./main-CfSVOXu-.js";
4
6
  import { m as h, a as v } from "./vuex.esm-DKGl8mcw.js";
5
- import { T as ie } from "./DocTextEditor-BYsXFRLg.js";
6
- import { W as ae } from "./DocumentLayout-CiszuoQc.js";
7
- import { o as V } from "./omit-CpamclWf.js";
8
- import { d as se } from "./vuedraggable.umd-DDT8qZBI.js";
9
- import { C as x } from "./CPriceInput-jktMjvwx.js";
10
- import { S as ne } from "./SearchApi-Cwgf52EV.js";
11
- import { v as re } from "./index-CFx0cpeM.js";
12
- import { w as oe } from "./CDropdownItem-BSPNul90.js";
13
- const ce = [
7
+ import { T as ce } from "./DocTextEditor-Ckfx6Hj5.js";
8
+ import { W as le } from "./DocumentLayout-D42e3G51.js";
9
+ import { o as D } from "./omit-DIEW6Th9.js";
10
+ import { d as ue } from "./vuedraggable.umd-IXGjMCUG.js";
11
+ import { C as w } from "./CPriceInput-CXGw4w0R.js";
12
+ import { S as de } from "./SearchApi-BPJpYWWz.js";
13
+ import { v as pe } from "./index-CySeSzas.js";
14
+ import { C as O } from "./CFormField-qy_STCgm.js";
15
+ const he = [
14
16
  "unit",
15
17
  "m2",
16
18
  "hour",
@@ -27,28 +29,28 @@ const ce = [
27
29
  "year",
28
30
  "kWh"
29
31
  ];
30
- function le() {
32
+ function me() {
31
33
  }
32
- var ue = le, b = L, de = ue, pe = P, he = 1 / 0, me = b && 1 / pe(new b([, -0]))[1] == he ? function(a) {
33
- return new b(a);
34
- } : de, fe = me, ve = E, ge = z, ye = B, _e = W, ke = fe, $e = P, xe = 200;
35
- function be(a, e, t) {
36
- var i = -1, n = ge, s = a.length, r = !0, c = [], l = c;
34
+ var fe = me, C = F, ve = fe, ge = R, ye = 1 / 0, _e = C && 1 / ge(new C([, -0]))[1] == ye ? function(s) {
35
+ return new C(s);
36
+ } : ve, ke = _e, $e = j, xe = N, be = H, we = q, Ce = ke, Te = R, Ie = 200;
37
+ function Ae(s, e, t) {
38
+ var i = -1, n = xe, a = s.length, r = !0, c = [], l = c;
37
39
  if (t)
38
- r = !1, n = ye;
39
- else if (s >= xe) {
40
- var _ = e ? null : ke(a);
40
+ r = !1, n = be;
41
+ else if (a >= Ie) {
42
+ var _ = e ? null : Ce(s);
41
43
  if (_)
42
- return $e(_);
43
- r = !1, n = _e, l = new ve();
44
+ return Te(_);
45
+ r = !1, n = we, l = new $e();
44
46
  } else
45
47
  l = e ? [] : c;
46
48
  e:
47
- for (; ++i < s; ) {
48
- var d = a[i], m = e ? e(d) : d;
49
+ for (; ++i < a; ) {
50
+ var d = s[i], m = e ? e(d) : d;
49
51
  if (d = t || d !== 0 ? d : 0, r && m === m) {
50
- for (var I = l.length; I--; )
51
- if (l[I] === m)
52
+ for (var S = l.length; S--; )
53
+ if (l[S] === m)
52
54
  continue e;
53
55
  e && l.push(m), c.push(d);
54
56
  } else
@@ -56,12 +58,12 @@ function be(a, e, t) {
56
58
  }
57
59
  return c;
58
60
  }
59
- var we = be, Ce = F, Te = we;
60
- function Ie(a, e) {
61
- return a && a.length ? Te(a, Ce(e)) : [];
61
+ var Se = Ae, Pe = G, Ve = Se;
62
+ function Re(s, e) {
63
+ return s && s.length ? Ve(s, Pe(e)) : [];
62
64
  }
63
- var Ae = Ie;
64
- const Se = /* @__PURE__ */ j(Ae), Pe = {
65
+ var De = Re;
66
+ const Oe = /* @__PURE__ */ U(De), Me = {
65
67
  name: "PackageGroupSelect",
66
68
  i18nOptions: {
67
69
  namespaces: "PackageGroupSelect",
@@ -128,41 +130,41 @@ const Se = /* @__PURE__ */ j(Ae), Pe = {
128
130
  };
129
131
  }
130
132
  };
131
- var Ve = function() {
133
+ var Le = function() {
132
134
  var e = this, t = e._self._c;
133
135
  return t("div", { staticClass: "font-inter", staticStyle: { padding: "calc(2 * var(--rem)) 0 calc(1 * var(--rem)) 0", color: "#111" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", [t("div", { staticClass: "options", class: { "is-700-or-less": e.parentSize.width <= 700 } }, e._l(e.options, function(i, n) {
134
- return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: i.background }, on: { click: function(s) {
136
+ return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: i.background }, on: { click: function(a) {
135
137
  return e.$emit("input", i.value);
136
- } } }, [t("div", { staticClass: "package-group-option__illustration" }, [i.value === "single" ? t("div", { staticClass: "package-group-option__illustration-card animate" }, [e._m(0, !0)]) : e._e(), i.value === "radio" ? e._l(3, function(s) {
137
- return t("div", { key: s, staticClass: "package-group-option__illustration-card", class: { animate: s === 2 } }, [t("div", { staticStyle: { width: "8px", height: "8px", "border-radius": "50%", "margin-right": "10px" }, style: s === 2 && {
138
+ } } }, [t("div", { staticClass: "package-group-option__illustration" }, [i.value === "single" ? t("div", { staticClass: "package-group-option__illustration-card animate" }, [e._m(0, !0)]) : e._e(), i.value === "radio" ? e._l(3, function(a) {
139
+ return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a === 2 } }, [t("div", { staticStyle: { width: "8px", height: "8px", "border-radius": "50%", "margin-right": "10px" }, style: a === 2 && {
138
140
  boxShadow: `0 0 0 1px white, 0 0 0 2px ${i.background}`,
139
141
  backgroundColor: i.background
140
142
  } }), e._m(1, !0)]);
141
- }) : e._e(), i.value === "checkbox" ? e._l(3, function(s) {
142
- return t("div", { key: s, staticClass: "package-group-option__illustration-card", class: { animate: s !== 3 } }, [t("div", { staticStyle: { height: "12px", width: "12px", "border-radius": "2px", "background-color": "hsl(0, 0%, 76%)", "margin-right": "10px", color: "white", padding: "1px", display: "inline-flex", "align-items": "center", "justify-content": "center" }, style: s !== 3 && { backgroundColor: i.background } }, [t("CIcon", { attrs: { type: s !== 3 ? "check" : "empty", "stroke-width": "5", size: "8" } })], 1), e._m(2, !0)]);
143
+ }) : e._e(), i.value === "checkbox" ? e._l(3, function(a) {
144
+ return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a !== 3 } }, [t("div", { staticStyle: { height: "12px", width: "12px", "border-radius": "2px", "background-color": "hsl(0, 0%, 76%)", "margin-right": "10px", color: "white", padding: "1px", display: "inline-flex", "align-items": "center", "justify-content": "center" }, style: a !== 3 && { backgroundColor: i.background } }, [t("CIcon", { attrs: { type: a !== 3 ? "check" : "empty", "stroke-width": "5", size: "8" } })], 1), e._m(2, !0)]);
143
145
  }) : e._e()], 2), t("div", [t("div", { staticClass: "package-group-option__title" }, [e._v(" " + e._s(i.title) + " ")]), t("div", { staticClass: "package-group-option__subtitle", domProps: { innerHTML: e._s(i.subTitle) } })])]);
144
146
  }), 0)])]);
145
- }, Re = [function() {
146
- var a = this, e = a._self._c;
147
+ }, Ee = [function() {
148
+ var s = this, e = s._self._c;
147
149
  return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
148
150
  }, function() {
149
- var a = this, e = a._self._c;
151
+ var s = this, e = s._self._c;
150
152
  return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
151
153
  }, function() {
152
- var a = this, e = a._self._c;
154
+ var s = this, e = s._self._c;
153
155
  return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
154
- }], De = /* @__PURE__ */ u(
155
- Pe,
156
- Ve,
157
- Re,
156
+ }], ze = /* @__PURE__ */ u(
157
+ Me,
158
+ Le,
159
+ Ee,
158
160
  !1,
159
161
  null,
160
- "b67c5afd"
162
+ "38a3147b"
161
163
  );
162
- const Oe = De.exports, Me = {
164
+ const We = ze.exports, Be = {
163
165
  name: "ArticleAutocomplete",
164
166
  components: {
165
- SearchApi: ne
167
+ SearchApi: de
166
168
  },
167
169
  mixins: [y([])],
168
170
  props: {
@@ -193,23 +195,23 @@ const Oe = De.exports, Me = {
193
195
  ids: "articles/articleIdList"
194
196
  }),
195
197
  whiteList() {
196
- const a = [];
198
+ const s = [];
197
199
  if (this.$refs.dropdown !== void 0) {
198
200
  const e = this.$refs.dropdown.querySelectorAll("*");
199
201
  for (const t of e)
200
- a.push(t);
202
+ s.push(t);
201
203
  }
202
204
  if (this.$refs.input !== void 0) {
203
205
  const e = this.$refs.input.$el.querySelectorAll("*");
204
206
  for (const t of e)
205
- a.push(t);
207
+ s.push(t);
206
208
  }
207
- return a;
209
+ return s;
208
210
  }
209
211
  },
210
212
  watch: {
211
- searchResults(a, e) {
212
- a.length !== e.length && (this.selectedIndex = 0);
213
+ searchResults(s, e) {
214
+ s.length !== e.length && (this.selectedIndex = 0);
213
215
  }
214
216
  },
215
217
  created() {
@@ -225,12 +227,12 @@ const Oe = De.exports, Me = {
225
227
  loadArticles: p.LOAD_ARTICLES
226
228
  }),
227
229
  priceFormat: k,
228
- search(a, e) {
229
- this.$emit("input", e), !this.viewSettings.isPublicForm && a({
230
+ search(s, e) {
231
+ this.$emit("input", e), !this.viewSettings.isPublicForm && s({
230
232
  q: e,
231
233
  cb: ({ article: t = [], extensionArticle: i = [] }) => {
232
234
  this.searchResults = [
233
- ...t.sort((n, s) => n.usedTimes > s.usedTimes ? -1 : 1),
235
+ ...t.sort((n, a) => n.usedTimes > a.usedTimes ? -1 : 1),
234
236
  ...i
235
237
  ], !this.isOpen && this.searchResults.length && this.showResults();
236
238
  }
@@ -240,11 +242,11 @@ const Oe = De.exports, Me = {
240
242
  focus() {
241
243
  this.$refs.input.focus();
242
244
  },
243
- onFocus(a) {
244
- this.isFocus = !0, this.$emit("focus", a);
245
+ onFocus(s) {
246
+ this.isFocus = !0, this.$emit("focus", s);
245
247
  },
246
- onBlur(a) {
247
- this.isFocus = !1, this.$emit("blur", a);
248
+ onBlur(s) {
249
+ this.isFocus = !1, this.$emit("blur", s);
248
250
  },
249
251
  showResults() {
250
252
  this.isOpen = !0;
@@ -252,15 +254,15 @@ const Oe = De.exports, Me = {
252
254
  hideResults() {
253
255
  this.isOpen = !1;
254
256
  },
255
- onSelect(a) {
256
- this.$emit("select", a), this.hideResults(), this.$refs.input && this.$refs.input.blur();
257
+ onSelect(s) {
258
+ this.$emit("select", s), this.hideResults(), this.$refs.input && this.$refs.input.blur();
257
259
  },
258
- onClickOutside(a) {
259
- this.whiteList.indexOf(a.target) < 0 && this.hideResults();
260
+ onClickOutside(s) {
261
+ this.whiteList.indexOf(s.target) < 0 && this.hideResults();
260
262
  },
261
- onKeydown({ keyCode: a }) {
263
+ onKeydown({ keyCode: s }) {
262
264
  if (this.isOpen) {
263
- switch (a) {
265
+ switch (s) {
264
266
  case 38:
265
267
  this.selectedIndex > 0 && this.selectedIndex--;
266
268
  break;
@@ -281,7 +283,7 @@ const Oe = De.exports, Me = {
281
283
  }
282
284
  }
283
285
  };
284
- var Le = function() {
286
+ var Fe = function() {
285
287
  var e = this, t = e._self._c;
286
288
  return t("div", { class: { "is-open": e.isOpen }, staticStyle: { position: "relative" }, on: { "&keydown": function(i) {
287
289
  return e.onKeydown.apply(null, arguments);
@@ -306,52 +308,52 @@ var Le = function() {
306
308
  ...e.$props
307
309
  }, !1))];
308
310
  } }]) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(i, n) {
309
- return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(s) {
310
- return s.stopPropagation(), e.onSelect(i);
311
+ return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(a) {
312
+ return a.stopPropagation(), e.onSelect(i);
311
313
  } } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(i.name))]), t("div", { staticClass: "r-item-details" }, [i.externalReference && i.externalReference.service ? t("div", { staticStyle: { width: "18px", height: "18px", "border-radius": "2px", "background-color": "hsl(0, 0%, 60%)", display: "inline-flex", "justify-content": "center", "align-items": "center" } }, [t("CIcon", { staticStyle: { color: "white" }, attrs: { type: i.externalReference.service, size: "14" } })], 1) : e._e(), i.article_no ? t("div", [e._v(e._s(i.article_no))]) : e._e(), i.price ? t("div", [e._v(" " + e._s(e.priceFormat(i.price, { currency: i.currency })) + " ")]) : e._e(), i.vat ? t("div", [e._v(" " + e._s(e.$t("vat.sharedTitle").capitalize()) + " " + e._s(i.vat) + "% ")]) : e._e()]), e.selectedIndex === n ? t("div", { staticClass: "r-item-icon" }, [t("CIcon", { attrs: { type: "corner-down-left", size: "16" } })], 1) : e._e()]);
312
314
  }), 0) : e._e()], 1);
313
- }, Ee = [], ze = /* @__PURE__ */ u(
314
- Me,
315
- Le,
316
- Ee,
315
+ }, je = [], Ne = /* @__PURE__ */ u(
316
+ Be,
317
+ Fe,
318
+ je,
317
319
  !1,
318
320
  null,
319
- "aa485cb9"
321
+ "ac5122d0"
320
322
  );
321
- const R = ze.exports, A = {
323
+ const M = Ne.exports, P = {
322
324
  isDeductable: !1,
323
325
  isRut: !1,
324
326
  greenRot15: !1,
325
327
  greenRot20: !1,
326
328
  greenRot50: !1
327
- }, $ = (a, e = "", t) => {
329
+ }, $ = (s, e = "", t) => {
328
330
  let i = {
329
- ...a,
331
+ ...s,
330
332
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
331
333
  // Trigger updatedAt as it us used to decide which houseWork to prioritize
332
334
  };
333
- return typeof t < "u" && (i[t] = e), Object.keys(A).includes(t) && e && (i = {
335
+ return typeof t < "u" && (i[t] = e), Object.keys(P).includes(t) && e && (i = {
334
336
  ...i,
335
- ...A,
337
+ ...P,
336
338
  [t]: !0
337
- }), N(i.quantity) !== "number" && (i.quantity = 0), w(i);
338
- }, D = ({
339
- stored: a,
339
+ }), K(i.quantity) !== "number" && (i.quantity = 0), T(i);
340
+ }, L = ({
341
+ stored: s,
340
342
  current: e,
341
343
  hidePrice: t = !1,
342
344
  activeHouseWorkType: i
343
345
  }) => {
344
- let n = H({
345
- ...a,
346
+ let n = Y({
347
+ ...s,
346
348
  quantity: 1,
347
349
  showPrice: !t,
348
350
  id: null,
349
- ArticleId: a.id,
351
+ ArticleId: s.id,
350
352
  packageId: e.packageId
351
353
  });
352
354
  if (i) {
353
- const s = (l = []) => l.reduce((_, d) => ({ ..._, [d]: !1 }), {}), c = Object.values(
354
- V({
355
+ const a = (l = []) => l.reduce((_, d) => ({ ..._, [d]: !1 }), {}), c = Object.values(
356
+ D({
355
357
  rot: "isDeductable",
356
358
  rut: "isRut",
357
359
  greenRot15: "greenRot15",
@@ -359,22 +361,22 @@ const R = ze.exports, A = {
359
361
  greenRot50: "greenRot50"
360
362
  }, [i])
361
363
  );
362
- c.some((l) => !!n[l]) && (n = { ...n, ...s(c) });
364
+ c.some((l) => !!n[l]) && (n = { ...n, ...a(c) });
363
365
  }
364
366
  return n;
365
- }, Be = (a, e = null) => {
366
- const t = C(a.currency, e);
367
- switch (a.priceType) {
367
+ }, He = (s, e = null) => {
368
+ const t = I(s.currency, e);
369
+ switch (s.priceType) {
368
370
  case "approx":
369
- return `${q.t("_common:approx")} ${t}`;
371
+ return `${Z.t("_common:approx")} ${t}`;
370
372
  case "openAcc":
371
- return `${t}/${f(a.unitType)}`;
373
+ return `${t}/${f(s.unitType)}`;
372
374
  case "markup":
373
375
  return "%";
374
376
  default:
375
377
  return t;
376
378
  }
377
- }, O = {
379
+ }, E = {
378
380
  en: {
379
381
  namePlaceholder: "Service or product name",
380
382
  openModalTooltip: "Edit amount and unit",
@@ -419,23 +421,23 @@ const R = ze.exports, A = {
419
421
  }
420
422
  }
421
423
  }
422
- }, M = {
424
+ }, z = {
423
425
  article: {
424
426
  name: {
425
- maxLength: re.maxLength(255)
427
+ maxLength: pe.maxLength(255)
426
428
  }
427
429
  }
428
- }, We = {
430
+ }, qe = {
429
431
  // eslint-disable-next-line vue/no-reserved-component-names
430
432
  name: "Article",
431
433
  i18nOptions: {
432
434
  namespaces: "Article",
433
- messages: O
435
+ messages: E
434
436
  },
435
437
  components: {
436
- ErrorCallout: S,
437
- ArticleAutocomplete: R,
438
- CPriceInput: x
438
+ ErrorCallout: V,
439
+ ArticleAutocomplete: M,
440
+ CPriceInput: w
439
441
  },
440
442
  props: {
441
443
  // Article object
@@ -478,11 +480,11 @@ const R = ze.exports, A = {
478
480
  default: null
479
481
  }
480
482
  },
481
- validations: M,
483
+ validations: z,
482
484
  data() {
483
485
  return {
484
486
  updateData: $,
485
- addSavedArticle: D,
487
+ addSavedArticle: L,
486
488
  articleUnitLabel: f,
487
489
  widthCompact: 580,
488
490
  visualDisable: !1
@@ -493,27 +495,27 @@ const R = ze.exports, A = {
493
495
  get() {
494
496
  return this.value || {};
495
497
  },
496
- set(a) {
497
- this.$emit("input", a);
498
+ set(s) {
499
+ this.$emit("input", s);
498
500
  }
499
501
  },
500
502
  details() {
501
- const a = [], {
503
+ const s = [], {
502
504
  priceType: e,
503
505
  quantity: t,
504
506
  unitType: i,
505
507
  price: n,
506
- vat: s,
508
+ vat: a,
507
509
  discount: r,
508
510
  discountType: c
509
511
  } = this.article;
510
- if (e !== "fixed" && a.push({ title: this.$t(`priceTypeShort.${e}`) }), U(this.article)) {
511
- const l = G(this.article);
512
- a.push({
512
+ if (e !== "fixed" && s.push({ title: this.$t(`priceTypeShort.${e}`) }), J(this.article)) {
513
+ const l = Q(this.article);
514
+ s.push({
513
515
  title: this.$t(`_common:deduction.${l}_percentage`)
514
516
  });
515
517
  }
516
- return t && ["fixed", "approx"].includes(e) && (i !== "unit" || t > 1) && a.push({
518
+ return t && ["fixed", "approx"].includes(e) && (i !== "unit" || t > 1) && s.push({
517
519
  title: f(this.article.unitType, {
518
520
  count: t,
519
521
  includeCount: !0
@@ -522,24 +524,24 @@ const R = ze.exports, A = {
522
524
  icon: '<svg style="margin: 0 4px;" width="6" height="6" viewBox="0 0 148 141" xmlns="http://www.w3.org/2000/svg"><path d="M73.742787 92.65535l-34.444359 47.40859-18.607391-13.51906 34.060775-46.88064L0 61.8743 7.107391 40 62 57.83569V0h23v57.99346L140.378182 40l7.107391 21.8743-54.751812 17.78994 34.060775 46.88064-18.607391 13.51906-34.444358-47.40859z" fill="currentColor" fill-rule="evenodd"/></svg>',
523
525
  subTitle: k(n, {
524
526
  showZero: !0,
525
- withVat: this.isIncVat ? s : !1,
527
+ withVat: this.isIncVat ? a : !1,
526
528
  currency: this.article.currency,
527
529
  decimals: 2,
528
530
  hideZeroDecimals: !0
529
531
  })
530
532
  }
531
- }), r && a.push({
533
+ }), r && s.push({
532
534
  title: "-" + (c === "fixed" ? k(r, {
533
- withVat: this.isIncVat ? s : !1,
535
+ withVat: this.isIncVat ? a : !1,
534
536
  currency: this.article.currency
535
537
  }) : `${r / 100} %`),
536
538
  detailClass: "discount"
537
- }), a;
539
+ }), s;
538
540
  }
539
541
  },
540
542
  methods: {
541
- updateArticle(a, e) {
542
- this.article = $(this.article, a, e);
543
+ updateArticle(s, e) {
544
+ this.article = $(this.article, s, e);
543
545
  },
544
546
  onTotalPriceInputFocus() {
545
547
  (this.article.discount || this.article.quantity !== 1) && this.$emit("open-modal", { focusEl: "priceInput" });
@@ -547,12 +549,12 @@ const R = ze.exports, A = {
547
549
  focusName() {
548
550
  this.$refs.name.focus();
549
551
  },
550
- errorMessage(a) {
551
- return a.$error && a.article.name.$error && !a.article.name.maxLength ? this.$t("validations.name.maxLength") : null;
552
+ errorMessage(s) {
553
+ return s.$error && s.article.name.$error && !s.article.name.maxLength ? this.$t("validations.name.maxLength") : null;
552
554
  }
553
555
  }
554
556
  };
555
- var je = function() {
557
+ var Ue = function() {
556
558
  var e = this, t = e._self._c;
557
559
  return t("div", { staticClass: "article-wrapper", class: {
558
560
  "has-details": e.details.length,
@@ -596,18 +598,18 @@ var je = function() {
596
598
  e.enableRemove && e.$emit("remove");
597
599
  } } }), t("CIcon", { staticClass: "a-control-button fade-in move-button article-draggable-handle", class: { "c-hidden": !e.enableRemove }, attrs: { circle: "", type: "handle", size: "18" } })]], 2), e.details.length ? t("div", { staticClass: "article-details-wrapper", staticStyle: { cursor: "pointer" }, on: { click: function(i) {
598
600
  return e.$emit("open-modal");
599
- } } }, e._l(e.details, function({ title: i, icon: n, subTitle: s = "", detailClass: r = "" }, c) {
600
- return t("div", { key: c, staticClass: "article-details-item", class: [r] }, [e._v(" " + e._s(i) + " "), n ? t("div", { domProps: { innerHTML: e._s(n) } }) : e._e(), e._v(" " + e._s(s) + " ")]);
601
+ } } }, e._l(e.details, function({ title: i, icon: n, subTitle: a = "", detailClass: r = "" }, c) {
602
+ return t("div", { key: c, staticClass: "article-details-item", class: [r] }, [e._v(" " + e._s(i) + " "), n ? t("div", { domProps: { innerHTML: e._s(n) } }) : e._e(), e._v(" " + e._s(a) + " ")]);
601
603
  }), 0) : e._e(), e.$v.$invalid && e.$v.$dirty ? t("ErrorCallout", { attrs: { message: e.errorMessage(e.$v) } }) : e._e()], 1);
602
- }, Fe = [], Ne = /* @__PURE__ */ u(
603
- We,
604
- je,
605
- Fe,
604
+ }, Ge = [], Ke = /* @__PURE__ */ u(
605
+ qe,
606
+ Ue,
607
+ Ge,
606
608
  !1,
607
609
  null,
608
- "417bbfef"
610
+ "1da5cd26"
609
611
  );
610
- const He = Ne.exports, qe = {
612
+ const Ye = Ke.exports, Ze = {
611
613
  props: {
612
614
  canForward: {
613
615
  type: Boolean,
@@ -625,8 +627,8 @@ const He = Ne.exports, qe = {
625
627
  this.removeKeyHandler();
626
628
  },
627
629
  methods: {
628
- getNavTooltip(a) {
629
- return a === -1 ? {
630
+ getNavTooltip(s) {
631
+ return s === -1 ? {
630
632
  content: `
631
633
  <div style='margin-bottom: 0.6em;'>
632
634
  ${this.$t("show", { thing: this.$t("previous") })}
@@ -638,7 +640,7 @@ const He = Ne.exports, qe = {
638
640
  </div>
639
641
  `,
640
642
  html: !0
641
- } : a === 1 ? {
643
+ } : s === 1 ? {
642
644
  content: `
643
645
  <div style='margin-bottom: 0.6em;'>
644
646
  ${this.$t("show", { thing: this.$t("next") })}
@@ -650,18 +652,18 @@ const He = Ne.exports, qe = {
650
652
  </div>
651
653
  `,
652
654
  html: !0
653
- } : a === "close" ? {
655
+ } : s === "close" ? {
654
656
  content: '<div style="margin-bottom: 0.6em;">Stäng</div><div style="text-align: center; opacity: 0.85;"><svg width="30" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="17 0 105.5 72" style="enable-background:new 17 0 105.5 72"><path d="M103.3 70.3H36.2c-9.6 0-17.5-7.9-17.5-17.5V19.2c0-9.6 7.9-17.5 17.5-17.5h67.1c9.6 0 17.5 7.9 17.5 17.5v33.6c0 9.6-7.9 17.5-17.5 17.5z" style="fill:none;stroke:currentColor;stroke-width:3;stroke-miterlimit:10"/><path style="fill:none" d="M17 17.8h105.5V49H17z"/><path fill="currentColor" d="M46.6 38.2c.1 5 3.3 7.1 7 7.1 2.6 0 4.2-.5 5.6-1l.6 2.6c-1.3.6-3.5 1.3-6.8 1.3-6.3 0-10-4.1-10-10.2s3.6-11 9.5-11c6.6 0 8.4 5.8 8.4 9.6 0 .8-.1 1.3-.1 1.7l-14.2-.1zm10.9-2.7c0-2.4-1-6-5.1-6-3.7 0-5.4 3.4-5.7 6h10.8zM65.1 43.9c1.1.7 3 1.5 4.9 1.5 2.7 0 3.9-1.3 3.9-3 0-1.8-1-2.7-3.8-3.7-3.7-1.3-5.4-3.3-5.4-5.8 0-3.3 2.6-6 7-6 2.1 0 3.9.6 5 1.3l-.9 2.7c-.8-.5-2.3-1.2-4.2-1.2-2.2 0-3.4 1.3-3.4 2.8 0 1.7 1.2 2.4 3.9 3.4 3.5 1.3 5.3 3.1 5.3 6.1 0 3.6-2.8 6.1-7.6 6.1-2.2 0-4.3-.5-5.7-1.4l1-2.8zM96.7 46.9c-1 .5-3.1 1.2-5.8 1.2-6.1 0-10.1-4.2-10.1-10.4 0-6.3 4.3-10.8 10.9-10.8 2.2 0 4.1.5 5.1 1l-.8 2.9c-.9-.5-2.3-1-4.3-1-4.7 0-7.2 3.4-7.2 7.7 0 4.7 3 7.6 7.1 7.6 2.1 0 3.5-.5 4.5-1l.6 2.8z"/></svg></div>',
655
657
  html: !0
656
658
  } : null;
657
659
  },
658
- onKeyUp(a) {
660
+ onKeyUp(s) {
659
661
  const e = document.activeElement;
660
- !(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(a.keyCode, 10) === 37 && this.$emit("go", -1), parseInt(a.keyCode, 10) === 39 && this.$emit("go", 1));
661
- const i = a.key || a.keyCode;
662
+ !(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(s.keyCode, 10) === 37 && this.$emit("go", -1), parseInt(s.keyCode, 10) === 39 && this.$emit("go", 1));
663
+ const i = s.key || s.keyCode;
662
664
  if (i === "Escape" || i === "Esc" || i === 27) {
663
665
  const n = this.$modal.getOpenInstances();
664
- if (a.defaultPrevented || n.length)
666
+ if (s.defaultPrevented || n.length)
665
667
  return;
666
668
  this.$emit("close");
667
669
  }
@@ -678,22 +680,22 @@ const He = Ne.exports, qe = {
678
680
  });
679
681
  }
680
682
  };
681
- var Ue = function() {
683
+ var Je = function() {
682
684
  var e = this, t = e._self._c;
683
685
  return t("div", { staticClass: "l-root" }, [t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(-1), expression: "getNavTooltip(-1)" }], staticClass: "l-button", class: { disabled: !e.canBackward }, staticStyle: { left: "calc(-4 * var(--rem))" }, on: { click: function(i) {
684
686
  return e.$emit("go", -1);
685
687
  } } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M15 18l-6-6 6-6" } })])]), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(1), expression: "getNavTooltip(1)" }], staticClass: "l-button", class: { disabled: !e.canForward }, staticStyle: { right: "calc(-4 * var(--rem))" }, on: { click: function(i) {
686
688
  return e.$emit("go", 1);
687
689
  } } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M9 18l6-6-6-6" } })])])]);
688
- }, Ge = [], Ke = /* @__PURE__ */ u(
689
- qe,
690
- Ue,
691
- Ge,
690
+ }, Qe = [], Xe = /* @__PURE__ */ u(
691
+ Ze,
692
+ Je,
693
+ Qe,
692
694
  !1,
693
695
  null,
694
- "226f5608"
696
+ "5985de8a"
695
697
  );
696
- const Ye = Ke.exports, Ze = {
698
+ const et = Xe.exports, tt = {
697
699
  name: "ArticleUnitEditModal",
698
700
  i18nOptions: {
699
701
  namespaces: "ArticleUnitEditModal",
@@ -721,8 +723,9 @@ const Ye = Ke.exports, Ze = {
721
723
  }
722
724
  },
723
725
  components: {
724
- DragList: K,
725
- DragItem: Y
726
+ DragList: X,
727
+ DragItem: ee,
728
+ CField: O
726
729
  },
727
730
  data() {
728
731
  return {
@@ -742,8 +745,8 @@ const Ye = Ke.exports, Ze = {
742
745
  unitById: "unitTypes/byId"
743
746
  }),
744
747
  unitItems() {
745
- return (this.idList || []).map((a) => {
746
- const e = this.unitById(a), t = f(e.value);
748
+ return (this.idList || []).map((s) => {
749
+ const e = this.unitById(s), t = f(e.value);
747
750
  return {
748
751
  ...e,
749
752
  label: t,
@@ -757,8 +760,8 @@ const Ye = Ke.exports, Ze = {
757
760
  watch: {
758
761
  stateUnitIds: {
759
762
  immediate: !0,
760
- handler(a) {
761
- this.idList = a || [];
763
+ handler(s) {
764
+ this.idList = s || [];
762
765
  }
763
766
  }
764
767
  },
@@ -769,22 +772,22 @@ const Ye = Ke.exports, Ze = {
769
772
  updateUnit: p.UPDATE_UNIT_TYPE,
770
773
  deleteUnit: p.DELETE_UNIT_TYPE
771
774
  }),
772
- onEdit(a) {
773
- this.selectedValue = { ...a }, this.$refs.unitInput && this.$refs.unitInput.focus();
775
+ onEdit(s) {
776
+ this.selectedValue = { ...s }, this.$refs.unitInput && this.$refs.unitInput.focus();
774
777
  },
775
778
  async submit() {
776
- const { id: a, value: e } = this.selectedValue || {};
779
+ const { id: s, value: e } = this.selectedValue || {};
777
780
  if (!e)
778
781
  throw new Error("New unitTypes need truthy value!");
779
782
  const t = `$${e}`;
780
- a ? await this.updateUnit({ id: a, body: { value: t } }) : await this.createUnit({ body: { value: t } }), this.reset(), this.$parent.$emit("select", t), this.close();
783
+ s ? await this.updateUnit({ id: s, body: { value: t } }) : await this.createUnit({ body: { value: t } }), this.reset(), this.$parent.$emit("select", t), this.close();
781
784
  },
782
- async remove(a, e) {
785
+ async remove(s, e) {
783
786
  if (this.removeConfirmIndex !== e) {
784
787
  this.removeConfirmIndex = e;
785
788
  return;
786
789
  }
787
- await this.deleteUnit({ id: a }), this.reset(), this.removeConfirmIndex = null;
790
+ await this.deleteUnit({ id: s }), this.reset(), this.removeConfirmIndex = null;
788
791
  },
789
792
  reset() {
790
793
  this.selectedValue = { id: null, value: "" };
@@ -792,8 +795,8 @@ const Ye = Ke.exports, Ze = {
792
795
  close() {
793
796
  this.$emit("close");
794
797
  },
795
- async onDrop({ removedIndex: a, addedIndex: e }) {
796
- a === null && e === null || a !== e && (this.idList = T(this.idList, a, e), await Z(
798
+ async onDrop({ removedIndex: s, addedIndex: e }) {
799
+ s === null && e === null || s !== e && (this.idList = A(this.idList, s, e), await te(
797
800
  "/unitType/setPositions",
798
801
  { ids: this.idList },
799
802
  { invalidateCache: { type: "unitType" } }
@@ -801,7 +804,7 @@ const Ye = Ke.exports, Ze = {
801
804
  }
802
805
  }
803
806
  };
804
- var Je = function() {
807
+ var it = function() {
805
808
  var e = this, t = e._self._c;
806
809
  return t("div", { staticClass: "modal-overlay font-inter", on: { "&click": function(i) {
807
810
  return i.target !== i.currentTarget ? null : e.close.apply(null, arguments);
@@ -810,28 +813,32 @@ var Je = function() {
810
813
  }, proxy: !0 } : null], null, !0), model: { value: e.selectedValue.value, callback: function(i) {
811
814
  e.$set(e.selectedValue, "value", typeof i == "string" ? i.trim() : i);
812
815
  }, expression: "selectedValue.value" } }), t("div", { staticClass: "control" }, [t("CButton", { attrs: { loading: e.isPosting, disabled: !e.selectedValue.value, type: "secondary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.selectedValue.id ? e.$t("_common:save") : e.$t("_common:add")) + " ")])], 1)], 1)], 1), t("div", { staticStyle: { "border-top": "1px solid hsl(0, 0%, 88%)", overflow: "auto", "max-height": "360px" } }, [t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "14px", padding: "calc(1 * var(--rem)) calc(1.5 * var(--rem)) 0", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("_common:unit_plural").capitalize()) + " ")]), t("div", { staticClass: "unit-modal-list" }, [e.unitItems.length ? e._e() : t("div", { staticClass: "unit-modal-list-empty" }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("_common:unit_plural") })) + " ")]), t("DragList", { attrs: { "drop-placeholder": { className: "drag-drop-placeholder" }, "drag-class": "is-dragged", "lock-axis": "y", "drag-handle-selector": ".drag-handle" }, on: { drop: e.onDrop } }, e._l(e.unitItems, function(i, n) {
813
- return t("DragItem", { key: i.id }, [t("div", { staticClass: "unit-modal-list-item", class: { "is-editing": e.selectedValue.id === i.id }, on: { "&mouseover": function(s) {
816
+ return t("DragItem", { key: i.id }, [t("div", { staticClass: "unit-modal-list-item", class: { "is-editing": e.selectedValue.id === i.id }, on: { "&mouseover": function(a) {
814
817
  e.hoverIndex = n;
815
- }, "&mouseleave": function(s) {
818
+ }, "&mouseleave": function(a) {
816
819
  e.hoverIndex = null;
817
- }, click: function(s) {
820
+ }, click: function(a) {
818
821
  return e.onEdit(i);
819
- } } }, [t("div", { staticClass: "drag-handle" }, [t("CIcon", { staticClass: "text-gray-300", attrs: { type: "handle", size: "16" } })], 1), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(i.label) + " ")]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.removeConfirmIndex === n, expression: "removeConfirmIndex === i" }], staticClass: "delete-confirm" }, [e._v(" " + e._s(e.$t("_common:remove")) + "? ")]), t("div", { staticClass: "unittype-buttons" }, [e.hoverIndex === n || e.removeConfirmIndex === n ? t("CButton", { attrs: { type: e.removeConfirmIndex === n ? "danger" : "none", pattern: e.removeConfirmIndex === n ? "primary" : "tertiary", circle: "", icon: "x", size: "small" }, on: { click: function(s) {
820
- return s.stopPropagation(), s.preventDefault(), e.remove(i.id, n);
821
- }, blur: function(s) {
822
+ } } }, [t("div", { staticClass: "drag-handle" }, [t("CIcon", { staticClass: "text-gray-300", attrs: { type: "handle", size: "16" } })], 1), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(i.label) + " ")]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.removeConfirmIndex === n, expression: "removeConfirmIndex === i" }], staticClass: "delete-confirm" }, [e._v(" " + e._s(e.$t("_common:remove")) + "? ")]), t("div", { staticClass: "unittype-buttons" }, [e.hoverIndex === n || e.removeConfirmIndex === n ? t("CButton", { attrs: { type: e.removeConfirmIndex === n ? "danger" : "none", pattern: e.removeConfirmIndex === n ? "primary" : "tertiary", circle: "", icon: "x", size: "small" }, on: { click: function(a) {
823
+ return a.stopPropagation(), a.preventDefault(), e.remove(i.id, n);
824
+ }, blur: function(a) {
822
825
  e.removeConfirmIndex = null;
823
826
  } } }) : e._e(), t("CButton", { attrs: { icon: "edit", size: "small", type: "none", pattern: "tertiary", circle: "" } })], 1)])]);
824
827
  }), 1)], 1)])])]);
825
- }, Qe = [], Xe = /* @__PURE__ */ u(
826
- Ze,
827
- Je,
828
- Qe,
828
+ }, st = [], at = /* @__PURE__ */ u(
829
+ tt,
830
+ it,
831
+ st,
829
832
  !1,
830
833
  null,
831
- "e5a5ef4e"
834
+ "7a4d1468"
832
835
  );
833
- const et = Xe.exports, tt = {
836
+ const nt = at.exports, rt = {
834
837
  name: "ArticleUnitSelect",
838
+ components: {
839
+ CDropdown: x,
840
+ CDropdownItem: b
841
+ },
835
842
  props: {
836
843
  value: {
837
844
  type: String,
@@ -853,7 +860,7 @@ const et = Xe.exports, tt = {
853
860
  unitById: "unitTypes/byId"
854
861
  }),
855
862
  unitItems() {
856
- return this.isPublicForm ? ce : (this.unitIds || []).map((a) => this.unitById(a)).map(({ value: a }) => a);
863
+ return this.isPublicForm ? he : (this.unitIds || []).map((s) => this.unitById(s)).map(({ value: s }) => s);
857
864
  }
858
865
  },
859
866
  created() {
@@ -866,17 +873,17 @@ const et = Xe.exports, tt = {
866
873
  }),
867
874
  openEditModal() {
868
875
  this.$modal.show(
869
- et,
876
+ nt,
870
877
  {},
871
878
  {},
872
879
  {
873
- select: (a) => this.$emit("input", a)
880
+ select: (s) => this.$emit("input", s)
874
881
  }
875
882
  );
876
883
  }
877
884
  }
878
885
  };
879
- var it = function() {
886
+ var ot = function() {
880
887
  var e = this, t = e._self._c;
881
888
  return t("CDropdown", e._b({ attrs: { value: e.value, scrollable: "" }, on: { input: function(i) {
882
889
  return e.$emit("input", i);
@@ -893,27 +900,28 @@ var it = function() {
893
900
  }, !1), e._l(e.unitItems, function(i, n) {
894
901
  return t("CDropdownItem", { key: `${i}-${n}`, attrs: { value: i } }, [e._v(" " + e._s(e.articleUnitLabel(i)) + " ")]);
895
902
  }), 1);
896
- }, at = [], st = /* @__PURE__ */ u(
897
- tt,
898
- it,
899
- at,
903
+ }, ct = [], lt = /* @__PURE__ */ u(
904
+ rt,
905
+ ot,
906
+ ct,
900
907
  !1,
901
908
  null,
902
- "cf05a2ff"
909
+ "ab757fc1"
903
910
  );
904
- const nt = st.exports, rt = {
911
+ const ut = lt.exports, dt = {
905
912
  name: "ArticleModal",
906
913
  i18nOptions: {
907
914
  namespaces: "ArticleModal",
908
- messages: O
915
+ messages: E
909
916
  },
910
917
  components: {
911
- ArticleAutocomplete: R,
912
- ArticleUnitSelect: nt,
913
- ListModalButtons: Ye,
914
- CPriceInput: x
918
+ ArticleAutocomplete: M,
919
+ ArticleUnitSelect: ut,
920
+ ListModalButtons: et,
921
+ CPriceInput: w,
922
+ CField: O
915
923
  },
916
- mixins: [oe],
924
+ mixins: [B],
917
925
  props: {
918
926
  _document: {
919
927
  type: Object,
@@ -968,12 +976,12 @@ const nt = st.exports, rt = {
968
976
  })
969
977
  }
970
978
  },
971
- validations: M,
979
+ validations: z,
972
980
  data() {
973
981
  return {
974
- priceSuffix: Be,
982
+ priceSuffix: He,
975
983
  updateData: $,
976
- addSavedArticle: D,
984
+ addSavedArticle: L,
977
985
  vatOptions: [
978
986
  { value: 25, translation: "25%" },
979
987
  { value: 12, translation: "12%" },
@@ -982,7 +990,7 @@ const nt = st.exports, rt = {
982
990
  ],
983
991
  showDiscountInput: !1,
984
992
  setPricesIncVat: !1,
985
- getCurrencySymbol: C,
993
+ getCurrencySymbol: I,
986
994
  articleUnitLabel: f
987
995
  };
988
996
  },
@@ -996,8 +1004,8 @@ const nt = st.exports, rt = {
996
1004
  get() {
997
1005
  return this.articleList[this.index] || {};
998
1006
  },
999
- set(a) {
1000
- this.$emit("input", a);
1007
+ set(s) {
1008
+ this.$emit("input", s);
1001
1009
  }
1002
1010
  },
1003
1011
  useVat() {
@@ -1007,52 +1015,52 @@ const nt = st.exports, rt = {
1007
1015
  return o(this, "_document.vatType") || "";
1008
1016
  },
1009
1017
  checkboxItems() {
1010
- const { article: a } = this || {}, { priceType: e } = this.article || {}, t = [
1018
+ const { article: s } = this || {}, { priceType: e } = this.article || {}, t = [
1011
1019
  ...e !== "markup" ? [
1012
1020
  {
1013
1021
  label: this.$t("discount").capitalize(),
1014
- value: a.discount || this.showDiscountInput,
1022
+ value: s.discount || this.showDiscountInput,
1015
1023
  onClick: () => {
1016
1024
  this.showDiscountInput || this.focusEl("discountInput"), this.showDiscountInput = !this.showDiscountInput;
1017
1025
  }
1018
1026
  }
1019
1027
  ] : [],
1020
- ...this.getCompanySetting("showRot") || a.isDeductable ? [
1028
+ ...this.getCompanySetting("showRot") || s.isDeductable ? [
1021
1029
  {
1022
1030
  label: this.$t("_common:deduction.rot"),
1023
1031
  value: this.article.isDeductable,
1024
- onClick: () => this.updateArticle(!a.isDeductable, "isDeductable")
1032
+ onClick: () => this.updateArticle(!s.isDeductable, "isDeductable")
1025
1033
  }
1026
1034
  ] : [],
1027
- ...this.getCompanySetting("showRut") || a.isRut ? [
1035
+ ...this.getCompanySetting("showRut") || s.isRut ? [
1028
1036
  {
1029
1037
  label: this.$t("_common:deduction.rut"),
1030
- value: a.isRut,
1031
- onClick: () => this.updateArticle(!a.isRut, "isRut")
1038
+ value: s.isRut,
1039
+ onClick: () => this.updateArticle(!s.isRut, "isRut")
1032
1040
  }
1033
1041
  ] : [],
1034
- ...a.greenRot15 ? [
1042
+ ...s.greenRot15 ? [
1035
1043
  {
1036
1044
  label: this.$t("_common:deduction.greenRot15_percentage"),
1037
- value: a.greenRot15,
1038
- onClick: () => this.updateArticle(!a.greenRot15, "greenRot15")
1045
+ value: s.greenRot15,
1046
+ onClick: () => this.updateArticle(!s.greenRot15, "greenRot15")
1039
1047
  }
1040
1048
  ] : [],
1041
- ...this.getCompanySetting("showGreenRot") || a.greenRot20 || a.greenRot50 ? [
1049
+ ...this.getCompanySetting("showGreenRot") || s.greenRot20 || s.greenRot50 ? [
1042
1050
  {
1043
1051
  label: this.$t("_common:deduction.greenRot20_percentage"),
1044
- value: a.greenRot20,
1045
- onClick: () => this.updateArticle(!a.greenRot20, "greenRot20")
1052
+ value: s.greenRot20,
1053
+ onClick: () => this.updateArticle(!s.greenRot20, "greenRot20")
1046
1054
  },
1047
1055
  {
1048
1056
  label: this.$t("_common:deduction.greenRot50_percentage"),
1049
- value: a.greenRot50,
1050
- onClick: () => this.updateArticle(!a.greenRot50, "greenRot50")
1057
+ value: s.greenRot50,
1058
+ onClick: () => this.updateArticle(!s.greenRot50, "greenRot50")
1051
1059
  }
1052
1060
  ] : []
1053
1061
  ];
1054
1062
  if (this.allowHidePrice) {
1055
- const { showPrice: i } = a || {};
1063
+ const { showPrice: i } = s || {};
1056
1064
  t.push({
1057
1065
  label: this.$t("hidePriceLabel"),
1058
1066
  value: !i,
@@ -1064,28 +1072,28 @@ const nt = st.exports, rt = {
1064
1072
  priceTypeOptions() {
1065
1073
  if (!this.enablePriceTypes || this.rootPriceType === "fixed")
1066
1074
  return [];
1067
- const { priceType: a } = this.article, e = (i) => this.$t(`priceTypeTooltips.${i}`), t = [
1075
+ const { priceType: s } = this.article, e = (i) => this.$t(`priceTypeTooltips.${i}`), t = [
1068
1076
  {
1069
1077
  label: this.$t("price.fixed"),
1070
1078
  tooltip: e("fixed"),
1071
- value: a === "fixed",
1079
+ value: s === "fixed",
1072
1080
  onClick: () => this.updateArticle("fixed", "priceType")
1073
1081
  }
1074
1082
  ];
1075
1083
  return this.rootPriceType === "approx" && t.push({
1076
1084
  label: this.$t("price.approx"),
1077
1085
  tooltip: e("approx"),
1078
- value: a === "approx",
1086
+ value: s === "approx",
1079
1087
  onClick: () => this.updateArticle("approx", "priceType")
1080
1088
  }), this.rootPriceType.startsWith("openAcc") && (t.push({
1081
1089
  label: this.$t("price.openAcc"),
1082
1090
  tooltip: e("openAcc"),
1083
- value: a === "openAcc",
1091
+ value: s === "openAcc",
1084
1092
  onClick: () => this.updateArticle("openAcc", "priceType")
1085
1093
  }), t.push({
1086
1094
  label: this.$t("price.markup"),
1087
1095
  tooltip: e("markup"),
1088
- value: a === "markup",
1096
+ value: s === "markup",
1089
1097
  onClick: () => this.updateArticle("markup", "priceType")
1090
1098
  })), t;
1091
1099
  }
@@ -1093,29 +1101,29 @@ const nt = st.exports, rt = {
1093
1101
  watch: {
1094
1102
  index: {
1095
1103
  immediate: !0,
1096
- handler(a, e) {
1097
- a !== e && (this.showDiscountInput = !1);
1104
+ handler(s, e) {
1105
+ s !== e && (this.showDiscountInput = !1);
1098
1106
  }
1099
1107
  },
1100
1108
  isIncVat: {
1101
1109
  immediate: !0,
1102
- handler(a) {
1103
- this.setPricesIncVat = !!a;
1110
+ handler(s) {
1111
+ this.setPricesIncVat = !!s;
1104
1112
  }
1105
1113
  },
1106
1114
  "article.discount": {
1107
1115
  immediate: !0,
1108
- handler(a) {
1109
- a && (this.showDiscountInput = !0);
1116
+ handler(s) {
1117
+ s && (this.showDiscountInput = !0);
1110
1118
  }
1111
1119
  },
1112
1120
  "article.priceType": {
1113
- handler(a) {
1114
- a === "markup" && (this.showDiscountInput = !1), ["openAcc", "markup"].includes(a) && this.updateArticle(1, "quantity");
1121
+ handler(s) {
1122
+ s === "markup" && (this.showDiscountInput = !1), ["openAcc", "markup"].includes(s) && this.updateArticle(1, "quantity");
1115
1123
  }
1116
1124
  },
1117
- showDiscountInput(a) {
1118
- a || this.updateArticle(0, "discount");
1125
+ showDiscountInput(s) {
1126
+ s || this.updateArticle(0, "discount");
1119
1127
  }
1120
1128
  },
1121
1129
  mounted() {
@@ -1128,36 +1136,36 @@ const nt = st.exports, rt = {
1128
1136
  ...v({
1129
1137
  createArticle: p.DO_CREATE_ARTICLE
1130
1138
  }),
1131
- onCustomVatBlur(a) {
1132
- o(a, "target.value") || "" || this.updateArticle(0, "vat");
1139
+ onCustomVatBlur(s) {
1140
+ o(s, "target.value") || "" || this.updateArticle(0, "vat");
1133
1141
  },
1134
- onCustomVatInput(a) {
1135
- const e = o(a, "target.value") || "";
1142
+ onCustomVatInput(s) {
1143
+ const e = o(s, "target.value") || "";
1136
1144
  if (!e)
1137
1145
  return;
1138
1146
  let t = e > 100 ? e.slice(0, e.length - 1) : e;
1139
1147
  t < 0 && (t = 0), this.updateArticle(Number.parseFloat(t), "vat");
1140
1148
  },
1141
- updateArticle(a, e) {
1142
- this.article = $(this.article, a, e);
1149
+ updateArticle(s, e) {
1150
+ this.article = $(this.article, s, e);
1143
1151
  },
1144
1152
  close() {
1145
1153
  this.$emit("close");
1146
1154
  },
1147
- onKeydown(a) {
1148
- a.keyCode === 13 && a.shiftKey && (a.preventDefault(), this.addNewArticle());
1155
+ onKeydown(s) {
1156
+ s.keyCode === 13 && s.shiftKey && (s.preventDefault(), this.addNewArticle());
1149
1157
  },
1150
- onGo(a) {
1151
- const e = this.index + a;
1158
+ onGo(s) {
1159
+ const e = this.index + s;
1152
1160
  this.articleList[e] && (this.close(), this.$emit("open-modal", e));
1153
1161
  },
1154
1162
  async addNewArticle() {
1155
1163
  this.$v.$invalid || await this.saveArticle(), this.$emit("add", { openModal: !0 }), this.close();
1156
1164
  },
1157
- focusEl(a) {
1165
+ focusEl(s) {
1158
1166
  this.$nextTick(() => {
1159
1167
  this.$nextTick(() => {
1160
- this.$refs[a] && this.$refs[a].focus && this.$refs[a].focus();
1168
+ this.$refs[s] && this.$refs[s].focus && this.$refs[s].focus();
1161
1169
  });
1162
1170
  });
1163
1171
  },
@@ -1167,8 +1175,8 @@ const nt = st.exports, rt = {
1167
1175
  });
1168
1176
  },
1169
1177
  toggleDiscountType() {
1170
- let a = "fixed";
1171
- this.article.discountType === "fixed" && (a = "percentage"), this.updateArticle(a, "discountType");
1178
+ let s = "fixed";
1179
+ this.article.discountType === "fixed" && (s = "percentage"), this.updateArticle(s, "discountType");
1172
1180
  },
1173
1181
  async onSaveArticle() {
1174
1182
  if (this.$v.$invalid) {
@@ -1180,15 +1188,15 @@ const nt = st.exports, rt = {
1180
1188
  async saveArticle() {
1181
1189
  if (this.viewSettings.isPublicForm)
1182
1190
  return;
1183
- let { ArticleId: a } = this.article;
1184
- !a && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (a = await this.createArticle({
1191
+ let { ArticleId: s } = this.article;
1192
+ !s && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (s = await this.createArticle({
1185
1193
  body: this.article,
1186
1194
  showMessage: !1
1187
- }), this.article = { ...this.article, ArticleId: a });
1195
+ }), this.article = { ...this.article, ArticleId: s });
1188
1196
  }
1189
1197
  }
1190
1198
  };
1191
- var ot = function() {
1199
+ var pt = function() {
1192
1200
  var e = this, t = e._self._c;
1193
1201
  return t("div", { staticClass: "font-inter", class: {
1194
1202
  "full-screen": e.mq === "sm",
@@ -1234,18 +1242,18 @@ var ot = function() {
1234
1242
  );
1235
1243
  } } }, [e._v(" " + e._s(e.article.discountType === "percentage" ? "%" : e.getCurrencySymbol(e.article.currency)) + " ")])], 1) : e._e()], t("div", { staticStyle: { margin: "calc(1 * var(--rem)) calc(-0.5 * var(--rem))" } }, [e.useVat ? [e.feature("regionSE") && Number.isInteger(e.article.vat) ? t("select", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, domProps: { value: e.article.vat }, on: { input: function(i) {
1236
1244
  e.updateArticle(Number.parseFloat(i.target.value), "vat");
1237
- } } }, e._l(e.vatOptions, function({ translation: i, value: n }, s) {
1238
- return t("option", { key: s, domProps: { value: n } }, [e._v(" " + e._s(e.$t(`vat.${e.vatType}`)) + " " + e._s(i) + " ")]);
1239
- }), 0) : t("span", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" } }, [e._v(" " + e._s(e._document.$t("vat").capitalize()) + " "), t("input", { staticStyle: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, attrs: { type: "number" }, domProps: { value: e.article.vat || 0 }, on: { blur: e.onCustomVatBlur, input: e.onCustomVatInput } }), e._v(" % ")])] : e._e(), e.priceTypeOptions.length ? t("div", { staticClass: "tag-group", staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.priceTypeOptions, function({ label: i, value: n, onClick: s, tooltip: r }, c) {
1245
+ } } }, e._l(e.vatOptions, function({ translation: i, value: n }, a) {
1246
+ return t("option", { key: a, domProps: { value: n } }, [e._v(" " + e._s(e.$t(`vat.${e.vatType}`)) + " " + e._s(i) + " ")]);
1247
+ }), 0) : t("span", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" } }, [e._v(" " + e._s(e._document.$t("vat").capitalize()) + " "), t("input", { staticStyle: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, attrs: { type: "number" }, domProps: { value: e.article.vat || 0 }, on: { blur: e.onCustomVatBlur, input: e.onCustomVatInput } }), e._v(" % ")])] : e._e(), e.priceTypeOptions.length ? t("div", { staticClass: "tag-group", staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.priceTypeOptions, function({ label: i, value: n, onClick: a, tooltip: r }, c) {
1240
1248
  return t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
1241
1249
  content: r,
1242
1250
  delay: { show: 300, hide: 0 }
1243
1251
  }, expression: `{
1244
1252
  content: tooltip,
1245
1253
  delay: { show: 300, hide: 0 }
1246
- }` }], key: i + c, staticClass: "tag-item", class: { active: n }, on: { click: s } }, [e._v(" " + e._s(i) + " ")]);
1247
- }), 0) : e._e(), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.checkboxItems, function({ label: i, value: n, onClick: s }, r) {
1248
- return t("div", { key: i + r, staticClass: "tag-item", class: { active: n }, on: { click: s } }, [e._v(" " + e._s(i) + " ")]);
1254
+ }` }], key: i + c, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(i) + " ")]);
1255
+ }), 0) : e._e(), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.checkboxItems, function({ label: i, value: n, onClick: a }, r) {
1256
+ return t("div", { key: i + r, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(i) + " ")]);
1249
1257
  }), 0)], 2)], 2)]), t("div", { staticClass: "flex space-x-4 overflow-hidden p-4 md:p-9" }, [t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
1250
1258
  offset: 7,
1251
1259
  html: !0,
@@ -1279,15 +1287,15 @@ var ot = function() {
1279
1287
  </div>
1280
1288
  \`
1281
1289
  }` }], staticStyle: { padding: "1.75em", height: "4em", "font-size": "16px", "background-color": "hsl(231, 4%, 20%)", "border-color": "hsl(231, 4%, 20%)" }, attrs: { type: "primary", tabindex: "0", size: "large" }, on: { click: e.addNewArticle } }, [t("CIcon", { staticStyle: { margin: "-3px" }, attrs: { type: "zap", size: "21" } })], 1), t("CButton", { staticClass: "flex-grow", staticStyle: { padding: "1.75em", height: "4em", "font-size": "16px" }, attrs: { size: "large", type: "secondary", "full-width": "", tabindex: "0" }, on: { click: e.onSaveArticle } }, [e._v(" " + e._s(e.$t("save")) + " ")])], 1)], 1)]);
1282
- }, ct = [], lt = /* @__PURE__ */ u(
1283
- rt,
1284
- ot,
1285
- ct,
1290
+ }, ht = [], mt = /* @__PURE__ */ u(
1291
+ dt,
1292
+ pt,
1293
+ ht,
1286
1294
  !1,
1287
1295
  null,
1288
- "06421912"
1296
+ "5d132488"
1289
1297
  );
1290
- const ut = lt.exports, dt = {
1298
+ const ft = mt.exports, vt = {
1291
1299
  i18nOptions: {
1292
1300
  name: "ArticleListEdit",
1293
1301
  namespaces: "ArticleListEdit",
@@ -1308,10 +1316,10 @@ const ut = lt.exports, dt = {
1308
1316
  },
1309
1317
  components: {
1310
1318
  // eslint-disable-next-line vue/no-reserved-component-names
1311
- Article: He,
1312
- ArticleModal: ut,
1313
- WithDimensions: ae,
1314
- draggable: se
1319
+ Article: Ye,
1320
+ ArticleModal: ft,
1321
+ WithDimensions: le,
1322
+ draggable: ue
1315
1323
  },
1316
1324
  mixins: [y([])],
1317
1325
  props: {
@@ -1348,7 +1356,7 @@ const ut = lt.exports, dt = {
1348
1356
  hidePriceOnNew: "settings/hidePriceOnNewlyAddedArticles"
1349
1357
  }),
1350
1358
  articlesWithTotal() {
1351
- return w(this.articles);
1359
+ return T(this.articles);
1352
1360
  },
1353
1361
  isIndivid() {
1354
1362
  return o(this._document, "prices.helpers.isIndivid", !0);
@@ -1366,28 +1374,27 @@ const ut = lt.exports, dt = {
1366
1374
  return o(this, "_document.vatType");
1367
1375
  },
1368
1376
  showVatToggle() {
1369
- return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat: a }) => a !== null));
1377
+ return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat: s }) => s !== null));
1370
1378
  }
1371
1379
  },
1372
1380
  watch: {
1373
1381
  activeHouseWorkType: {
1374
1382
  immediate: !0,
1375
- handler(a) {
1376
- this.toggleDeductions(a);
1383
+ handler(s) {
1384
+ this.toggleDeductions(s);
1377
1385
  }
1378
1386
  },
1379
- isIndivid(a) {
1380
- a || this.toggleDeductions(!1);
1387
+ isIndivid(s) {
1388
+ s || this.toggleDeductions(!1);
1381
1389
  },
1382
- setPricesIncVat(a) {
1383
- this.updateArticlesVatOption(), this.showMessage({
1390
+ setPricesIncVat(s) {
1391
+ this.updateArticlesVatOption(), ["extension", "widget"].includes(ie.value) || this.showMessage({
1384
1392
  type: "info",
1385
1393
  message: this.$t("vatOption.message", {
1386
- vatOption: this.$t(`_common:vat.${a ? "incVat" : "exVat"}`, {
1394
+ vatOption: this.$t(`_common:vat.${s ? "incVat" : "exVat"}`, {
1387
1395
  thing: this.$t("_common:vat.sharedTitle")
1388
1396
  })
1389
- }),
1390
- omit: "$view:extension,$view:widget"
1397
+ })
1391
1398
  });
1392
1399
  }
1393
1400
  },
@@ -1395,38 +1402,38 @@ const ut = lt.exports, dt = {
1395
1402
  ...v({
1396
1403
  showMessage: p.SHOW_MESSAGE
1397
1404
  }),
1398
- openModal(a, { focusEl: e = "" } = {}) {
1399
- this.selectedIndex = a, this.showModal = !0, e && this.$nextTick(() => {
1405
+ openModal(s, { focusEl: e = "" } = {}) {
1406
+ this.selectedIndex = s, this.showModal = !0, e && this.$nextTick(() => {
1400
1407
  this.$nextTick(() => {
1401
1408
  this.$refs.articleModal && this.$refs.articleModal.focusEl(e);
1402
1409
  });
1403
1410
  });
1404
1411
  },
1405
- updateArticleObject(a, e) {
1412
+ updateArticleObject(s, e) {
1406
1413
  const t = e;
1407
- this.isIndivid || (t.isDeductable = !1, t.isRut = !1, t.greenRot15 = !1, t.greenRot20 = !1, t.greenRot50 = !1), this.$emit("input", { index: a, value: t });
1414
+ this.isIndivid || (t.isDeductable = !1, t.isRut = !1, t.greenRot15 = !1, t.greenRot20 = !1, t.greenRot50 = !1), this.$emit("input", { index: s, value: t });
1408
1415
  },
1409
- onRemoveArticle(a) {
1410
- this.$emit("remove", a);
1416
+ onRemoveArticle(s) {
1417
+ this.$emit("remove", s);
1411
1418
  },
1412
- onEsc(a, e) {
1413
- a === this.articles.length - 1 && ["name", "price", "discount"].every((t) => !e[t]) && this.onRemoveArticle(a);
1419
+ onEsc(s, e) {
1420
+ s === this.articles.length - 1 && ["name", "price", "discount"].every((t) => !e[t]) && this.onRemoveArticle(s);
1414
1421
  },
1415
1422
  changeVat() {
1416
1423
  this.$emit("update:setPricesIncVat", !this.setPricesIncVat);
1417
1424
  },
1418
1425
  updateArticlesVatOption() {
1419
- this.articles.forEach((a, e) => {
1420
- if (a.priceType === "markup")
1426
+ this.articles.forEach((s, e) => {
1427
+ if (s.priceType === "markup")
1421
1428
  return;
1422
- let t = g({ amount: a.price }).divide(
1423
- (100 + a.vat) * 0.01
1429
+ let t = g({ amount: s.price }).divide(
1430
+ (100 + s.vat) * 0.01
1424
1431
  );
1425
- this.setPricesIncVat || (t = g({ amount: a.price }).multiply(
1426
- (100 + a.vat) * 0.01
1432
+ this.setPricesIncVat || (t = g({ amount: s.price }).multiply(
1433
+ (100 + s.vat) * 0.01
1427
1434
  )), this.updateArticleObject(
1428
1435
  e,
1429
- w({ ...a, price: t.getAmount() })
1436
+ T({ ...s, price: t.getAmount() })
1430
1437
  );
1431
1438
  });
1432
1439
  },
@@ -1439,35 +1446,35 @@ const ut = lt.exports, dt = {
1439
1446
  openLastArticle() {
1440
1447
  this.$nextTick(() => this.openModal(this.articles.length - 1));
1441
1448
  },
1442
- toggleDeductions(a) {
1449
+ toggleDeductions(s) {
1443
1450
  const e = {
1444
1451
  rot: "isDeductable",
1445
1452
  rut: "isRut",
1446
1453
  greenRot15: "greenRot15",
1447
1454
  greenRot20: "greenRot20",
1448
1455
  greenRot50: "greenRot50"
1449
- }, t = (i = []) => i.reduce((n, s) => ({ ...n, [s]: !1 }), {});
1450
- e[a] ? this.articles.forEach((i, n) => {
1451
- const s = Object.values(V(e, [a]));
1452
- if (s.some((r) => !!i[r])) {
1453
- const r = { ...i, ...t(s) };
1456
+ }, t = (i = []) => i.reduce((n, a) => ({ ...n, [a]: !1 }), {});
1457
+ e[s] ? this.articles.forEach((i, n) => {
1458
+ const a = Object.values(D(e, [s]));
1459
+ if (a.some((r) => !!i[r])) {
1460
+ const r = { ...i, ...t(a) };
1454
1461
  this.$emit("input", { index: n, value: r });
1455
1462
  }
1456
- }) : a === !1 && this.articles.forEach((i, n) => {
1457
- const s = Object.values(e);
1458
- if (s.some((r) => !!i[r])) {
1459
- const r = { ...i, ...t(s) };
1463
+ }) : s === !1 && this.articles.forEach((i, n) => {
1464
+ const a = Object.values(e);
1465
+ if (a.some((r) => !!i[r])) {
1466
+ const r = { ...i, ...t(a) };
1460
1467
  this.$emit("input", { index: n, value: r });
1461
1468
  }
1462
1469
  });
1463
1470
  },
1464
- onChange(a) {
1465
- const { added: e, moved: t, removed: i } = a;
1471
+ onChange(s) {
1472
+ const { added: e, moved: t, removed: i } = s;
1466
1473
  if (e) {
1467
- const { newIndex: n, element: s } = e;
1468
- this.$emit("insert", { index: n, value: s });
1474
+ const { newIndex: n, element: a } = e;
1475
+ this.$emit("insert", { index: n, value: a });
1469
1476
  } else if (t) {
1470
- const n = T(
1477
+ const n = A(
1471
1478
  this.articles,
1472
1479
  t.oldIndex,
1473
1480
  t.newIndex
@@ -1480,7 +1487,7 @@ const ut = lt.exports, dt = {
1480
1487
  }
1481
1488
  }
1482
1489
  };
1483
- var pt = function() {
1490
+ var gt = function() {
1484
1491
  var e = this, t = e._self._c;
1485
1492
  return t("div", [e.showVatToggle ? t("div", { staticClass: "label-text" }, [e._v(" " + e._s(e.$t("vatOption.label")) + " "), t("span", { on: { click: function(i) {
1486
1493
  return e.changeVat();
@@ -1490,23 +1497,23 @@ var pt = function() {
1490
1497
  animation: 150,
1491
1498
  ghostClass: "article-ghost",
1492
1499
  handle: ".article-draggable-handle"
1493
- }, !1), [t("transition-group", { staticStyle: { position: "relative", transition: "100ms" }, attrs: { name: "article-list" } }, e._l(e.articlesWithTotal, function(n, s) {
1500
+ }, !1), [t("transition-group", { staticStyle: { position: "relative", transition: "100ms" }, attrs: { name: "article-list" } }, e._l(e.articlesWithTotal, function(n, a) {
1494
1501
  return t("Article", { key: n._uniqueId || 0, ref: "articleItem", refInFor: !0, staticClass: "article-item", attrs: { value: n, width: i, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "hide-controls": e.hideControls, "root-price-type": e.rootPriceType, "active-house-work-type": e.activeHouseWorkType }, on: { "update:currency": function(r) {
1495
1502
  return e.$emit("update:currency", r);
1496
1503
  }, input: function(r) {
1497
- return e.updateArticleObject(s, r);
1504
+ return e.updateArticleObject(a, r);
1498
1505
  }, focus: function(r) {
1499
1506
  return e.$emit("focus");
1500
1507
  }, remove: function(r) {
1501
- return e.onRemoveArticle(s);
1508
+ return e.onRemoveArticle(a);
1502
1509
  }, "open-modal": function(r) {
1503
- return e.openModal(s, r);
1510
+ return e.openModal(a, r);
1504
1511
  }, add: function(r) {
1505
- s === e.articlesWithTotal.length - 1 && e.$emit("add");
1512
+ a === e.articlesWithTotal.length - 1 && e.$emit("add");
1506
1513
  }, select: function(r) {
1507
- s === e.articlesWithTotal.length - 1 && e.$emit("add");
1514
+ a === e.articlesWithTotal.length - 1 && e.$emit("add");
1508
1515
  }, esc: function(r) {
1509
- return e.onEsc(s, n);
1516
+ return e.onEsc(a, n);
1510
1517
  } } });
1511
1518
  }), 1)], 1)];
1512
1519
  } }]) }), t("Portal", { attrs: { to: "modal" } }, [e.showModal && e.articlesWithTotal[e.selectedIndex] ? t("ArticleModal", { ref: "articleModal", attrs: { _document: e._document, index: e.selectedIndex, "article-list": e.articlesWithTotal, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "root-price-type": e.rootPriceType, currency: e.currency, "active-house-work-type": e.activeHouseWorkType, "view-settings": e.viewSettings }, on: { "update:currency": function(i) {
@@ -1518,15 +1525,15 @@ var pt = function() {
1518
1525
  }, "open-modal": e.openModal, close: function(i) {
1519
1526
  e.showModal = !1;
1520
1527
  } } }) : e._e()], 1)], 1);
1521
- }, ht = [], mt = /* @__PURE__ */ u(
1522
- dt,
1523
- pt,
1524
- ht,
1528
+ }, yt = [], _t = /* @__PURE__ */ u(
1529
+ vt,
1530
+ gt,
1531
+ yt,
1525
1532
  !1,
1526
1533
  null,
1527
- "3e63aac7"
1534
+ "6cdba96e"
1528
1535
  );
1529
- const ft = mt.exports, vt = {
1536
+ const kt = _t.exports, $t = {
1530
1537
  name: "MaxTotalInput",
1531
1538
  i18nOptions: {
1532
1539
  namespaces: "MaxTotalInput",
@@ -1540,7 +1547,7 @@ const ft = mt.exports, vt = {
1540
1547
  }
1541
1548
  },
1542
1549
  components: {
1543
- CPriceInput: x
1550
+ CPriceInput: w
1544
1551
  },
1545
1552
  props: {
1546
1553
  value: {
@@ -1558,7 +1565,7 @@ const ft = mt.exports, vt = {
1558
1565
  },
1559
1566
  data() {
1560
1567
  return {
1561
- getCurrencySymbol: C
1568
+ getCurrencySymbol: I
1562
1569
  };
1563
1570
  },
1564
1571
  computed: {
@@ -1567,13 +1574,13 @@ const ft = mt.exports, vt = {
1567
1574
  })
1568
1575
  },
1569
1576
  watch: {
1570
- isIncVat(a) {
1577
+ isIncVat(s) {
1571
1578
  let e = g({ amount: this.value }).divide(1.25);
1572
- a || (e = g({ amount: this.value }).multiply(125 * 0.01)), this.$emit("input", e.getAmount());
1579
+ s || (e = g({ amount: this.value }).multiply(125 * 0.01)), this.$emit("input", e.getAmount());
1573
1580
  }
1574
1581
  }
1575
1582
  };
1576
- var gt = function() {
1583
+ var xt = function() {
1577
1584
  var e = this, t = e._self._c;
1578
1585
  return t("div", { staticClass: "flex w-full justify-end" }, [t("CPriceInput", { staticClass: "mt-4 max-w-[275px] text-sm", attrs: { value: e.value, currency: e.currency, "is-inc-vat": e.isIncVat, vat: 25, placeholder: e.$t("maxTotalLabel"), min: "0", "prefix-class": "text-gray-400", "suffix-class": "text-gray-400" }, on: { input: function(i) {
1579
1586
  return e.$emit("input", i);
@@ -1582,15 +1589,19 @@ var gt = function() {
1582
1589
  }, proxy: !0 }, { key: "suffix", fn: function() {
1583
1590
  return [t("span", [e._v(" " + e._s(e.getCurrencySymbol(e.currency)) + " " + e._s(e.$t(`vat.${e.isIncVat ? "incVat" : "exVat"}`, { thing: e.$t(`vat.${e.vatType}`) })) + " ")])];
1584
1591
  }, proxy: !0 }]) })], 1);
1585
- }, yt = [], _t = /* @__PURE__ */ u(
1586
- vt,
1587
- gt,
1588
- yt,
1592
+ }, bt = [], wt = /* @__PURE__ */ u(
1593
+ $t,
1594
+ xt,
1595
+ bt,
1589
1596
  !1,
1590
1597
  null,
1591
1598
  null
1592
1599
  );
1593
- const kt = _t.exports, $t = {
1600
+ const Ct = wt.exports, Tt = {
1601
+ components: {
1602
+ CDropdown: x,
1603
+ CDropdownItem: b
1604
+ },
1594
1605
  props: {
1595
1606
  value: {
1596
1607
  type: String,
@@ -1603,7 +1614,7 @@ const kt = _t.exports, $t = {
1603
1614
  };
1604
1615
  }
1605
1616
  };
1606
- var xt = function() {
1617
+ var It = function() {
1607
1618
  var e = this, t = e._self._c;
1608
1619
  return t("div", { staticClass: "flex justify-end" }, [t("CDropdown", { attrs: { value: e.value }, scopedSlots: e._u([{ key: "trigger", fn: function() {
1609
1620
  return [t("CButton", { staticClass: "price-type-button" }, [e._v(" " + e._s(e.$t("price.pricing").capitalize()) + ": "), t("span", [e._v(e._s(e.$t(`price.${e.value}`)))])])];
@@ -1612,18 +1623,18 @@ var xt = function() {
1612
1623
  return e.$emit("input", i);
1613
1624
  } } }, [e._v(" " + e._s(e.$t(`price.${i}`)) + " ")]);
1614
1625
  }), 1)], 1);
1615
- }, bt = [], wt = /* @__PURE__ */ u(
1616
- $t,
1617
- xt,
1618
- bt,
1626
+ }, At = [], St = /* @__PURE__ */ u(
1627
+ Tt,
1628
+ It,
1629
+ At,
1619
1630
  !1,
1620
1631
  null,
1621
- "413621dd"
1632
+ "5e314414"
1622
1633
  );
1623
- const Ct = wt.exports, Tt = {
1634
+ const Pt = St.exports, Vt = {
1624
1635
  name: "EditDeduction",
1625
1636
  components: {
1626
- CPriceInput: x
1637
+ CPriceInput: w
1627
1638
  },
1628
1639
  mixins: [y(["houseWorkManualAmount"])],
1629
1640
  props: {
@@ -1651,20 +1662,20 @@ const Ct = wt.exports, Tt = {
1651
1662
  };
1652
1663
  },
1653
1664
  watch: {
1654
- houseWorkType(a) {
1655
- a || (this.houseWorkManualAmount = null);
1665
+ houseWorkType(s) {
1666
+ s || (this.houseWorkManualAmount = null);
1656
1667
  }
1657
1668
  },
1658
1669
  methods: {
1659
- setDeduction(a) {
1660
- this.internalValue = g({ amount: this.total }).multiply(a).getAmount();
1670
+ setDeduction(s) {
1671
+ this.internalValue = g({ amount: this.total }).multiply(s).getAmount();
1661
1672
  },
1662
1673
  showModal() {
1663
1674
  this.internalValue = this.houseWorkAmount, this.$modal.show(`deduction-modal-${this._uid}`);
1664
1675
  }
1665
1676
  }
1666
1677
  };
1667
- var It = function() {
1678
+ var Rt = function() {
1668
1679
  var e = this, t = e._self._c;
1669
1680
  return t("div", [t("modal", e._b({ attrs: { name: `deduction-modal-${e._uid}` } }, "modal", {
1670
1681
  adaptive: !0,
@@ -1672,7 +1683,7 @@ var It = function() {
1672
1683
  width: "90%",
1673
1684
  maxWidth: 420,
1674
1685
  classes: "primary"
1675
- }, !1), [t("div", { staticClass: "deduction-modal flex w-full flex-col items-center justify-between rounded-lg" }, [t("div", { staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 2px)", "font-weight": "800", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " ")]), t("div", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))", width: "100%" } }, [t("CPriceInput", { attrs: { currency: "SEK", placeholder: e.$t("enterThing", { thing: e.$t("deduction.deduction") }), min: "0", size: "medium", "suffix-class": "text-gray-400" }, scopedSlots: e._u([{ key: "suffix", fn: function() {
1686
+ }, !1), [t("div", { staticClass: "deduction-modal flex w-full flex-col items-center justify-between rounded-lg" }, [t("div", { staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 2px)", "font-weight": "800", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("deduction.manualType", { type: e.$t(`deduction.${e.houseWorkType}`) })) + " ")]), t("div", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))", width: "100%" } }, [t("CPriceInput", { attrs: { currency: "SEK", placeholder: e.$t("enterThing", { thing: e.$t("deduction.deduction") }), min: "0", size: "medium", "suffix-class": "text-gray-400" }, scopedSlots: e._u([{ key: "suffix", fn: function() {
1676
1687
  return [e._v(e._s(e.$t("currency.SEK")))];
1677
1688
  }, proxy: !0 }]), model: { value: e.internalValue, callback: function(i) {
1678
1689
  e.internalValue = e._n(i);
@@ -1696,19 +1707,19 @@ var It = function() {
1696
1707
  e.houseWorkManualAmount = null, e.$modal.hide(`deduction-modal-${e._uid}`);
1697
1708
  } } }, [e._v(" " + e._s(e.$t("reset")) + " ")])], 1)]), e.houseWorkManualAmount ? t("portal", { attrs: { order: 2, to: "document-nav-bottom" } }, [t("div", { staticClass: "housework-manual-nav", on: { click: function(i) {
1698
1709
  return e.$modal.show(`deduction-modal-${e._uid}`);
1699
- } } }, [t("svg", { staticClass: "css-i6dzq1", staticStyle: { "margin-right": "0.5em" }, attrs: { viewBox: "0 0 24 24", width: "12", height: "12", stroke: "currentColor", "stroke-width": "2", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" } }), t("line", { attrs: { x1: "12", y1: "9", x2: "12", y2: "13" } }), t("line", { attrs: { x1: "12", y1: "17", x2: "12.01", y2: "17" } })]), e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " " + e._s(e.$t("using")) + " ")])]) : e._e()], 1);
1700
- }, At = [], St = /* @__PURE__ */ u(
1701
- Tt,
1702
- It,
1703
- At,
1710
+ } } }, [t("svg", { staticClass: "css-i6dzq1", staticStyle: { "margin-right": "0.5em" }, attrs: { viewBox: "0 0 24 24", width: "12", height: "12", stroke: "currentColor", "stroke-width": "2", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" } }), t("line", { attrs: { x1: "12", y1: "9", x2: "12", y2: "13" } }), t("line", { attrs: { x1: "12", y1: "17", x2: "12.01", y2: "17" } })]), e._v(" " + e._s(e.$t("deduction.manualType", { type: e.$t(`deduction.${e.houseWorkType}`) })) + " " + e._s(e.$t("using")) + " ")])]) : e._e()], 1);
1711
+ }, Dt = [], Ot = /* @__PURE__ */ u(
1712
+ Vt,
1713
+ Rt,
1714
+ Dt,
1704
1715
  !1,
1705
1716
  null,
1706
- "f3ba2092"
1717
+ "1e846fc7"
1707
1718
  );
1708
- const Pt = St.exports, Vt = {
1719
+ const Mt = Ot.exports, Lt = {
1709
1720
  name: "Pricing",
1710
1721
  components: {
1711
- EditDeduction: Pt
1722
+ EditDeduction: Mt
1712
1723
  },
1713
1724
  props: {
1714
1725
  _document: {
@@ -1748,7 +1759,9 @@ const Pt = St.exports, Vt = {
1748
1759
  ...this.showHouseWork ? [
1749
1760
  {
1750
1761
  label: this._document.$t("deduction.type", {
1751
- type: `${this.prices.region.houseWorkType}${this.prices.region.houseWorkManualAmount === null ? "_percentage" : ""}`
1762
+ type: this._document.$t(
1763
+ `deduction.${this.prices.region.houseWorkType}${this.prices.region.houseWorkManualAmount === null ? "_percentage" : ""}`
1764
+ )
1752
1765
  }),
1753
1766
  value: -this.prices.region.houseWorkAmount,
1754
1767
  action: () => this.$refs.deduction.showModal()
@@ -1794,34 +1807,34 @@ const Pt = St.exports, Vt = {
1794
1807
  }));
1795
1808
  },
1796
1809
  prices() {
1797
- const { prices: a } = this._document.packageGroups.getPackageById(
1810
+ const { prices: s } = this._document.packageGroups.getPackageById(
1798
1811
  this.packageId
1799
1812
  );
1800
- return a;
1813
+ return s;
1801
1814
  },
1802
1815
  showHouseWork() {
1803
1816
  return !!o(this.prices, "region.houseWorkType", !1) || !!o(this.prices, "region.houseWorkManualAmount", !1);
1804
1817
  }
1805
1818
  }
1806
1819
  };
1807
- var Rt = function() {
1820
+ var Et = function() {
1808
1821
  var e = this, t = e._self._c;
1809
1822
  return t("div", { staticClass: "price-bubble" }, [t("div", { staticClass: "flex w-full items-center justify-between" }, [e.showHouseWork ? t("EditDeduction", e._g({ ref: "deduction", attrs: { disabled: !e.get(e.prices, "region.houseWorkType", !1), _document: e._document, _value: {
1810
1823
  houseWorkManualAmount: `${e.basePath}.data.prices.region.houseWorkManualAmount`
1811
1824
  }, "house-work-type": e.prices.region.houseWorkType, "house-work-amount": e.prices.region.houseWorkAmount, total: e.prices.subTotal + e.prices.taxAmount } }, e.$listeners)) : e._e()], 1), t("div", e._l(e.priceArray, function(i, n) {
1812
- return t("div", { key: n, staticClass: "price-row flex w-full justify-between", class: [i.classList || ""] }, [t("div", { staticClass: "price-label" }, [e._v(" " + e._s(i.label.capitalize()) + " "), i.subLabel ? t("span", { staticClass: "pricing-sub-label" }, [e._v(" " + e._s(i.subLabel) + " ")]) : e._e(), i.action ? t("span", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("edit", { thing: e.$t("deduction.deduction") }), expression: "$t('edit', { thing: $t('deduction.deduction') })" }], staticClass: "pricing-action", on: { click: function(s) {
1825
+ return t("div", { key: n, staticClass: "price-row flex w-full justify-between", class: [i.classList || ""] }, [t("div", { staticClass: "price-label" }, [e._v(" " + e._s(i.label.capitalize()) + " "), i.subLabel ? t("span", { staticClass: "pricing-sub-label" }, [e._v(" " + e._s(i.subLabel) + " ")]) : e._e(), i.action ? t("span", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("edit", { thing: e.$t("deduction.deduction") }), expression: "$t('edit', { thing: $t('deduction.deduction') })" }], staticClass: "pricing-action", on: { click: function(a) {
1813
1826
  i.action && i.action();
1814
1827
  } } }, [t("svg", { attrs: { viewBox: "0 0 24 24", width: "15", height: "15", stroke: "currentColor", "stroke-width": "2.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" } }), t("path", { attrs: { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" } })])]) : e._e()]), t("div", { staticClass: "price-value" }, [e._v(" " + e._s(i.prefix) + " " + e._s(i.value) + " ")])]);
1815
1828
  }), 0)]);
1816
- }, Dt = [], Ot = /* @__PURE__ */ u(
1817
- Vt,
1818
- Rt,
1819
- Dt,
1829
+ }, zt = [], Wt = /* @__PURE__ */ u(
1830
+ Lt,
1831
+ Et,
1832
+ zt,
1820
1833
  !1,
1821
1834
  null,
1822
- "d22ef0b4"
1835
+ "8a96a1f0"
1823
1836
  );
1824
- const Mt = Ot.exports, Lt = {
1837
+ const Bt = Wt.exports, Ft = {
1825
1838
  name: "PackageItemEdit",
1826
1839
  i18nOptions: {
1827
1840
  namespaces: "PackageItemEdit",
@@ -1849,11 +1862,13 @@ const Mt = Ot.exports, Lt = {
1849
1862
  }
1850
1863
  },
1851
1864
  components: {
1852
- ArticleList: ft,
1853
- PriceFormAlternatives: Ct,
1854
- MaxTotalInput: kt,
1855
- Pricing: Mt,
1856
- TextEditor: ie
1865
+ ArticleList: kt,
1866
+ PriceFormAlternatives: Pt,
1867
+ MaxTotalInput: Ct,
1868
+ Pricing: Bt,
1869
+ TextEditor: ce,
1870
+ CDropdown: x,
1871
+ CDropdownItem: b
1857
1872
  },
1858
1873
  mixins: [
1859
1874
  y([
@@ -1903,26 +1918,26 @@ const Mt = Ot.exports, Lt = {
1903
1918
  return this._document.allArticles;
1904
1919
  },
1905
1920
  mappedPackageArticles() {
1906
- return (this.articles || []).map((a, e) => ({ ...a, i: e })).filter(({ packageId: a }) => a === this.packageId);
1921
+ return (this.articles || []).map((s, e) => ({ ...s, i: e })).filter(({ packageId: s }) => s === this.packageId);
1907
1922
  },
1908
1923
  internalDescription: {
1909
1924
  get() {
1910
- return J(
1925
+ return se(
1911
1926
  this.description,
1912
1927
  this._document.textTemplateMap,
1913
1928
  this._document._doc
1914
1929
  );
1915
1930
  },
1916
- set(a) {
1917
- this.description = Q(a);
1931
+ set(s) {
1932
+ this.description = ae(s);
1918
1933
  }
1919
1934
  }
1920
1935
  },
1921
1936
  watch: {
1922
- priceType(a, e) {
1923
- if (!(a && a.startsWith("open") && e && e.startsWith("open"))) {
1924
- if (a) {
1925
- const t = a.startsWith("open") ? "openAcc" : a;
1937
+ priceType(s, e) {
1938
+ if (!(s && s.startsWith("open") && e && e.startsWith("open"))) {
1939
+ if (s) {
1940
+ const t = s.startsWith("open") ? "openAcc" : s;
1926
1941
  this.mappedPackageArticles.forEach((i, n) => {
1927
1942
  this.onArticleInput({
1928
1943
  index: n,
@@ -1935,7 +1950,7 @@ const Mt = Ot.exports, Lt = {
1935
1950
  });
1936
1951
  }
1937
1952
  }
1938
- a !== "openAccMaxPrice" && (this.maxTotal = null);
1953
+ s !== "openAccMaxPrice" && (this.maxTotal = null);
1939
1954
  }
1940
1955
  },
1941
1956
  methods: {
@@ -1944,18 +1959,18 @@ const Mt = Ot.exports, Lt = {
1944
1959
  },
1945
1960
  // Article Methods
1946
1961
  createEmptyArticle() {
1947
- const a = this.newArticle({
1962
+ const s = this.newArticle({
1948
1963
  priceType: this.priceType.startsWith("open") ? "openAcc" : this.priceType,
1949
1964
  packageId: this.packageId,
1950
1965
  currency: this.currency
1951
1966
  });
1952
1967
  this.$emit("input", {
1953
1968
  key: "articles",
1954
- value: [...this.articles, a]
1969
+ value: [...this.articles, s]
1955
1970
  });
1956
1971
  },
1957
- onArticleInput({ index: a, value: e }) {
1958
- const { i: t } = this.mappedPackageArticles[a], i = X(e, [
1972
+ onArticleInput({ index: s, value: e }) {
1973
+ const { i: t } = this.mappedPackageArticles[s], i = ne(e, [
1959
1974
  "allowRot",
1960
1975
  "allowRut",
1961
1976
  "isIncVat",
@@ -1964,13 +1979,13 @@ const Mt = Ot.exports, Lt = {
1964
1979
  ]);
1965
1980
  i.currency = this.currency, this.$emit("input", { key: `articles[${[t]}]`, value: i });
1966
1981
  },
1967
- onArticleAdd({ openModal: a = !1 } = {}) {
1968
- this.createEmptyArticle(), a ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
1982
+ onArticleAdd({ openModal: s = !1 } = {}) {
1983
+ this.createEmptyArticle(), s ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
1969
1984
  },
1970
- onInsert({ index: a, value: e }) {
1971
- const t = ee(this.mappedPackageArticles).add(
1985
+ onInsert({ index: s, value: e }) {
1986
+ const t = re(this.mappedPackageArticles).add(
1972
1987
  { ...e, packageId: this.packageId },
1973
- a
1988
+ s
1974
1989
  );
1975
1990
  this.$emit("input", {
1976
1991
  key: "articles",
@@ -1982,24 +1997,24 @@ const Mt = Ot.exports, Lt = {
1982
1997
  ]
1983
1998
  });
1984
1999
  },
1985
- onArticleRemove(a) {
1986
- const { i: e } = this.mappedPackageArticles[a];
2000
+ onArticleRemove(s) {
2001
+ const { i: e } = this.mappedPackageArticles[s];
1987
2002
  this.$emit("remove", { key: `articles[${[e]}]` });
1988
2003
  },
1989
- onArticleMove(a) {
2004
+ onArticleMove(s) {
1990
2005
  this.$emit("input", {
1991
2006
  key: "articles",
1992
2007
  value: [
1993
2008
  ...this.articles.filter(
1994
2009
  ({ packageId: e }) => e !== this.packageId
1995
2010
  ),
1996
- ...a
2011
+ ...s
1997
2012
  ]
1998
2013
  });
1999
2014
  }
2000
2015
  }
2001
2016
  };
2002
- var Et = function() {
2017
+ var jt = function() {
2003
2018
  var e = this, t = e._self._c;
2004
2019
  return t("div", { staticClass: "min-h-0 rounded-md border border-gray-200 bg-white text-black" }, [t("div", { staticClass: "flex w-full items-center justify-between bg-gray-100 py-1 pl-4 pr-1 text-sm font-medium text-gray-600" }, [t("div", [e._v(" " + e._s(e.type === "single" ? e.$t("single") : e.type === "radio" || e.toggable ? e.$t("option") : e.$t("base")) + " ")]), e.type !== "single" ? t("CDropdown", { staticClass: "ml-4", scopedSlots: e._u([{ key: "trigger", fn: function() {
2005
2020
  return [t("CButton", { staticClass: "is-thinner opacity-70", attrs: { size: "small", type: "text", pattern: "secondary" } }, [e._v(" " + e._s(e.$t("_common:change")) + " ")])];
@@ -2051,22 +2066,22 @@ var Et = function() {
2051
2066
  }` }], staticClass: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white", on: { click: function(i) {
2052
2067
  return e.onArticleAdd({ openModal: !0 });
2053
2068
  } } }, [t("CIcon", { attrs: { type: "zap", size: "16", "stroke-width": "2.5" } })], 1)]), t("Pricing", e._g({ attrs: { _document: e._document, "base-path": `${e._value.basePath}`, "package-id": e.packageId } }, e.$listeners))], 1)], 1)]);
2054
- }, zt = [], Bt = /* @__PURE__ */ u(
2055
- Lt,
2056
- Et,
2057
- zt,
2069
+ }, Nt = [], Ht = /* @__PURE__ */ u(
2070
+ Ft,
2071
+ jt,
2072
+ Nt,
2058
2073
  !1,
2059
2074
  null,
2060
- "d34c5127"
2075
+ "51ec9229"
2061
2076
  );
2062
- const Wt = Bt.exports, jt = (a) => (a || []).slice(0, 1).map((e) => ({
2077
+ const qt = Ht.exports, Ut = (s) => (s || []).slice(0, 1).map((e) => ({
2063
2078
  ...e,
2064
2079
  isSelected: !0,
2065
2080
  isSelectedDefault: !0,
2066
2081
  toggable: !1
2067
- })), Ft = (a) => {
2068
- const e = o(a, "0.data.prices.type") || "fixed";
2069
- return (a || []).map((t, i) => ({
2082
+ })), Gt = (s) => {
2083
+ const e = o(s, "0.data.prices.type") || "fixed";
2084
+ return (s || []).map((t, i) => ({
2070
2085
  ...t,
2071
2086
  toggable: !0,
2072
2087
  ...i === 0 ? {
@@ -2082,9 +2097,9 @@ const Wt = Bt.exports, jt = (a) => (a || []).slice(0, 1).map((e) => ({
2082
2097
  }
2083
2098
  }
2084
2099
  }));
2085
- }, Nt = (a = []) => {
2100
+ }, Kt = (s = []) => {
2086
2101
  let e = !1;
2087
- return a.map((t) => {
2102
+ return s.map((t) => {
2088
2103
  const i = {
2089
2104
  ...t,
2090
2105
  // if any earlier pkg is selected, deselect pkg, otherwise keep as is
@@ -2097,16 +2112,16 @@ const Wt = Bt.exports, jt = (a) => (a || []).slice(0, 1).map((e) => ({
2097
2112
  return (i.isSelected || i.isSelectedDefault) && (e = !0), i;
2098
2113
  }, []);
2099
2114
  };
2100
- function Ht(a, ...e) {
2101
- if (a === "single")
2102
- return jt(...e);
2103
- if (a === "checkbox")
2104
- return Ft(...e);
2105
- if (a === "radio")
2106
- return Nt(...e);
2107
- throw new Error(`Package filter type '${a}' is not implemented`);
2115
+ function Yt(s, ...e) {
2116
+ if (s === "single")
2117
+ return Ut(...e);
2118
+ if (s === "checkbox")
2119
+ return Gt(...e);
2120
+ if (s === "radio")
2121
+ return Kt(...e);
2122
+ throw new Error(`Package filter type '${s}' is not implemented`);
2108
2123
  }
2109
- const qt = {
2124
+ const Zt = {
2110
2125
  name: "PackageGroupEdit",
2111
2126
  i18nOptions: {
2112
2127
  namespaces: "PackageGroupEdit",
@@ -2144,9 +2159,12 @@ const qt = {
2144
2159
  }
2145
2160
  },
2146
2161
  components: {
2147
- ErrorCallout: S,
2148
- PackageItem: Wt,
2149
- PackageGroupSelect: Oe
2162
+ ErrorCallout: V,
2163
+ PackageItem: qt,
2164
+ PackageGroupSelect: We,
2165
+ CCallout: W,
2166
+ CDropdown: x,
2167
+ CDropdownItem: b
2150
2168
  },
2151
2169
  mixins: [
2152
2170
  y([
@@ -2179,13 +2197,13 @@ const qt = {
2179
2197
  newArticle: "articles/getNewArticle"
2180
2198
  }),
2181
2199
  internalPackages() {
2182
- return this.packages.map((a, e) => ({ ...a, index: e }));
2200
+ return this.packages.map((s, e) => ({ ...s, index: e }));
2183
2201
  },
2184
2202
  topRowPackages() {
2185
- return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: a }) => a === !1) : this.internalPackages;
2203
+ return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !1) : this.internalPackages;
2186
2204
  },
2187
2205
  bottomRowPackages() {
2188
- return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: a }) => a === !0) : [];
2206
+ return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !0) : [];
2189
2207
  },
2190
2208
  group() {
2191
2209
  return this._document.packageGroups.getPackageGroupUniqId(
@@ -2220,18 +2238,18 @@ const qt = {
2220
2238
  ...v({
2221
2239
  showMessage: p.SHOW_MESSAGE
2222
2240
  }),
2223
- setPricesIncVatAsDefault(a = {}) {
2241
+ setPricesIncVatAsDefault(s = {}) {
2224
2242
  this.$emit("input", {
2225
2243
  key: "data.formSettings.setPricesIncVat",
2226
2244
  value: this.defaultVatInput === "incVat",
2227
- options: a
2245
+ options: s
2228
2246
  });
2229
2247
  },
2230
- onSelectType(a) {
2231
- this.type = a;
2248
+ onSelectType(s) {
2249
+ this.type = s;
2232
2250
  const { type: e, packages: t } = this.persistedGroup || {};
2233
2251
  if (e && t && t.length)
2234
- this.addPersistedGroup(a), a !== e && this.showMessage({
2252
+ this.addPersistedGroup(s), s !== e && this.showMessage({
2235
2253
  type: "info",
2236
2254
  message: this.$t("reset.message"),
2237
2255
  actions: {
@@ -2244,29 +2262,29 @@ const qt = {
2244
2262
  }
2245
2263
  });
2246
2264
  else {
2247
- if (a === "checkbox")
2265
+ if (s === "checkbox")
2248
2266
  return;
2249
2267
  this.addPackage({});
2250
2268
  }
2251
2269
  },
2252
- addPersistedGroup(a) {
2270
+ addPersistedGroup(s) {
2253
2271
  if (!this.persistedGroup || !this.persistedGroup.type)
2254
2272
  return;
2255
2273
  let { packages: e, articles: t } = this.persistedGroup;
2256
2274
  if (!e.length)
2257
2275
  return;
2258
- if (a !== this.persistedGroup.type && (e = Ht(a, e)), a === "single" && t.length) {
2276
+ if (s !== this.persistedGroup.type && (e = Yt(s, e)), s === "single" && t.length) {
2259
2277
  const [{ packageId: n }] = e;
2260
- t = t.filter((s) => s.packageId === n);
2278
+ t = t.filter((a) => a.packageId === n);
2261
2279
  }
2262
- const i = Se(
2280
+ const i = Oe(
2263
2281
  [...this._document.allArticles || [], ...t || []],
2264
2282
  (n) => n._uniqueId
2265
2283
  );
2266
2284
  this.$emit("input", { key: "articles", value: i }), this.$emit("input", { key: `${[this._value.packages]}`, value: e });
2267
2285
  },
2268
- addPackage(a = {}) {
2269
- const e = te(), t = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", i = this.currency || this.defaultCurrency, n = {
2286
+ addPackage(s = {}) {
2287
+ const e = oe(), t = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", i = this.currency || this.defaultCurrency, n = {
2270
2288
  isSelected: this.type === "single",
2271
2289
  isSelectedDefault: this.type === "single",
2272
2290
  toggable: !0,
@@ -2279,7 +2297,7 @@ const qt = {
2279
2297
  currency: i
2280
2298
  }
2281
2299
  },
2282
- ...a
2300
+ ...s
2283
2301
  };
2284
2302
  this.$emit("input", { key: this._value.packages, value: n }), this.$emit("input", {
2285
2303
  key: "articles",
@@ -2289,21 +2307,21 @@ const qt = {
2289
2307
  currency: i
2290
2308
  })
2291
2309
  }), this.$nextTick(() => {
2292
- const s = document.getElementById(`package-name-${e}`);
2293
- s && s.focus();
2310
+ const a = document.getElementById(`package-name-${e}`);
2311
+ a && a.focus();
2294
2312
  });
2295
2313
  },
2296
- onInputPriceType(a, e) {
2314
+ onInputPriceType(s, e) {
2297
2315
  this.type === "checkbox" && this.packages.forEach((t, i) => {
2298
- i !== a && this.$emit("input", {
2316
+ i !== s && this.$emit("input", {
2299
2317
  key: `${[this._value.packages]}[${[i]}].data.prices.type`,
2300
2318
  value: e
2301
2319
  });
2302
2320
  });
2303
2321
  },
2304
- onInputSelectedDefault(a, e) {
2322
+ onInputSelectedDefault(s, e) {
2305
2323
  this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t, i) => {
2306
- i !== a && (this.$emit("input", {
2324
+ i !== s && (this.$emit("input", {
2307
2325
  key: `${[this._value.packages]}[${[i]}].isSelectedDefault`,
2308
2326
  value: !1
2309
2327
  }), this.$emit("input", {
@@ -2311,22 +2329,22 @@ const qt = {
2311
2329
  value: !1
2312
2330
  }));
2313
2331
  }), this.$emit("input", {
2314
- key: `${[this._value.packages]}[${[a]}].isSelectedDefault`,
2332
+ key: `${[this._value.packages]}[${[s]}].isSelectedDefault`,
2315
2333
  value: e
2316
2334
  }), this.$emit("input", {
2317
- key: `${[this._value.packages]}[${[a]}].isSelected`,
2335
+ key: `${[this._value.packages]}[${[s]}].isSelected`,
2318
2336
  value: e
2319
2337
  }));
2320
2338
  },
2321
- removeByIndex(a) {
2322
- const { packageId: e } = this.packages[a], t = this._document.allArticles.filter(
2339
+ removeByIndex(s) {
2340
+ const { packageId: e } = this.packages[s], t = this._document.allArticles.filter(
2323
2341
  ({ packageId: i }) => i !== e
2324
2342
  );
2325
- this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[a]}]` });
2343
+ this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[s]}]` });
2326
2344
  },
2327
2345
  async onResetType() {
2328
- const a = this.packages.map((i) => i.packageId), [e, t] = this._document.allArticles.reduce(
2329
- ([i, n], s) => a.includes(s.packageId) ? [[...i, s], n] : [i, [...n, s]],
2346
+ const s = this.packages.map((i) => i.packageId), [e, t] = this._document.allArticles.reduce(
2347
+ ([i, n], a) => s.includes(a.packageId) ? [[...i, a], n] : [i, [...n, a]],
2330
2348
  [[], []]
2331
2349
  );
2332
2350
  this.$emit("update:persisted-group", {
@@ -2335,17 +2353,17 @@ const qt = {
2335
2353
  articles: e
2336
2354
  }), this.$emit("input", { key: "articles", value: t }), this.$emit("input", { key: `${[this._value.packages]}`, value: [] }), this.type = "";
2337
2355
  },
2338
- moveOptions(a, e) {
2356
+ moveOptions(s, e) {
2339
2357
  const t = { up: !1, down: !1 };
2340
- return a > 0 && (t.up = !0), a < e - 1 && (t.down = !0), t;
2358
+ return s > 0 && (t.up = !0), s < e - 1 && (t.down = !0), t;
2341
2359
  },
2342
- moveItem(a, e) {
2343
- const t = T(this.packages, a, e);
2360
+ moveItem(s, e) {
2361
+ const t = A(this.packages, s, e);
2344
2362
  this.$emit("input", { key: this._value.packages, value: t });
2345
2363
  }
2346
2364
  }
2347
2365
  };
2348
- var Ut = function() {
2366
+ var Jt = function() {
2349
2367
  var e = this, t = e._self._c;
2350
2368
  return t("div", { staticClass: "package-group-root font-inter" }, [e.type ? [t("div", { staticStyle: { position: "absolute", right: "0", top: "-10px", transform: "translateY(-100%)", "z-index": "2" } }, [t("CDropdown", { scopedSlots: e._u([{ key: "trigger", fn: function() {
2351
2369
  return [t("CButton", { attrs: { type: "none", size: "normal", pattern: "secondary", icon: "more-horizontal", circle: "" } })];
@@ -2367,21 +2385,21 @@ var Ut = function() {
2367
2385
  maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
2368
2386
  basePath: `${e._value.packages}[${i.index}]`,
2369
2387
  currency: `${e._value.packages}[${i.index}].data.prices.currency`
2370
- }, type: e.type, "active-house-work-type": e.houseWorkType, toggable: i.toggable, "package-id": i.packageId, "move-options": e.moveOptions(n, e.topRowPackages.length) }, on: { input: function(s) {
2371
- return e.$emit("input", s);
2372
- }, add: function(s) {
2373
- return e.$emit("add", s);
2374
- }, "update:isSelectedDefault": (s) => e.onInputSelectedDefault(i.index, s), "update:priceType": (s) => e.onInputPriceType(i.index, s), "update:setPricesIncVat": (s) => {
2388
+ }, type: e.type, "active-house-work-type": e.houseWorkType, toggable: i.toggable, "package-id": i.packageId, "move-options": e.moveOptions(n, e.topRowPackages.length) }, on: { input: function(a) {
2389
+ return e.$emit("input", a);
2390
+ }, add: function(a) {
2391
+ return e.$emit("add", a);
2392
+ }, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
2375
2393
  e.$emit("input", {
2376
2394
  key: "data.formSettings.setPricesIncVat",
2377
- value: s
2395
+ value: a
2378
2396
  }), e.setPricesDirty = !0;
2379
- }, "update:currency": (s) => e.$emit("input", { key: "currency", value: s }), remove: function(s) {
2380
- return e.$emit("remove", s);
2381
- }, "remove-package": function(s) {
2397
+ }, "update:currency": (a) => e.$emit("input", { key: "currency", value: a }), remove: function(a) {
2398
+ return e.$emit("remove", a);
2399
+ }, "remove-package": function(a) {
2382
2400
  return e.removeByIndex(i.index);
2383
- }, move: function(s) {
2384
- return e.moveItem(i.index, e.topRowPackages[n + s].index);
2401
+ }, move: function(a) {
2402
+ return e.moveItem(i.index, e.topRowPackages[n + a].index);
2385
2403
  } } })], 1);
2386
2404
  }), 0), e.type === "checkbox" && e.topRowPackages.length && e.bottomRowPackages.length ? t("div", { staticStyle: { width: "calc(5 * var(--rem))", height: "1px", "margin-left": "calc(50% - calc(2.5 * var(--rem)))", "border-top": "2px dashed hsl(0, 0%, 85%)" } }) : e._e(), e.type === "checkbox" ? [t("transition-group", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { name: "section-list", tag: "div" } }, e._l(e.bottomRowPackages, function(i, n) {
2387
2405
  return t("div", { key: i.packageId, staticClass: "section-item", staticStyle: { padding: "calc(1 * var(--rem)) 0" } }, [t("PackageItem", { staticClass: "package-item", attrs: { _document: e._document, _value: {
@@ -2393,36 +2411,36 @@ var Ut = function() {
2393
2411
  maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
2394
2412
  basePath: `${e._value.packages}[${i.index}]`,
2395
2413
  currency: `${e._value.packages}[${i.index}].data.prices.currency`
2396
- }, type: e.type, "active-house-work-type": e.houseWorkType, "package-id": i.packageId, "move-options": e.moveOptions(n, e.bottomRowPackages.length) }, on: { input: function(s) {
2397
- return e.$emit("input", s);
2398
- }, add: function(s) {
2399
- return e.$emit("add", s);
2400
- }, "update:isSelectedDefault": (s) => e.onInputSelectedDefault(i.index, s), "update:priceType": (s) => e.onInputPriceType(i.index, s), "update:setPricesIncVat": (s) => {
2414
+ }, type: e.type, "active-house-work-type": e.houseWorkType, "package-id": i.packageId, "move-options": e.moveOptions(n, e.bottomRowPackages.length) }, on: { input: function(a) {
2415
+ return e.$emit("input", a);
2416
+ }, add: function(a) {
2417
+ return e.$emit("add", a);
2418
+ }, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
2401
2419
  e.$emit("input", {
2402
2420
  key: "data.formSettings.setPricesIncVat",
2403
- value: s
2421
+ value: a
2404
2422
  }), e.setPricesDirty = !0;
2405
- }, remove: function(s) {
2406
- return e.$emit("remove", s);
2407
- }, "remove-package": function(s) {
2423
+ }, remove: function(a) {
2424
+ return e.$emit("remove", a);
2425
+ }, "remove-package": function(a) {
2408
2426
  return e.removeByIndex(i.index);
2409
- }, move: function(s) {
2410
- return e.moveItem(i.index, e.bottomRowPackages[n + s].index);
2427
+ }, move: function(a) {
2428
+ return e.moveItem(i.index, e.bottomRowPackages[n + a].index);
2411
2429
  } } })], 1);
2412
2430
  }), 0)] : e._e(), e.type !== "single" || !e.packages.length ? t("div", { staticClass: "flex w-full flex-col items-center justify-center" }, [t("div", { staticStyle: { width: "100%" } }, [e.type === "radio" && !e.packages.length ? t("div", { staticClass: "package-placeholder bg-gray-100", staticStyle: { color: "hsl(0, 0%, 24%)", "font-weight": "500" } }, [t("svg", { staticStyle: { "vertical-align": "text-bottom", "margin-right": "3px" }, attrs: { width: "16", height: "16", viewBox: "0 0 18 14", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { d: "M8.03.22c.3.3.3.77 0 1.06L5.56 3.75h6.88L9.97 1.28A.75.75 0 1111.03.21l3.53 3.54h2.69a.75.75 0 010 1.5h-.12l-1.17 6.4a2.25 2.25 0 01-2.21 1.85h-9.5a2.25 2.25 0 01-2.21-1.84L.87 5.26H.75a.75.75 0 010-1.5h2.69L6.97.21c.3-.3.77-.3 1.06 0zM2.4 5.25L3.5 11.4c.07.35.38.61.74.61h9.5c.36 0 .67-.26.74-.61l1.11-6.14H2.4zm3.1 1.5c.41-.06.8.22.86.63l.38 2.25a.75.75 0 11-1.48.24l-.37-2.25c-.07-.4.2-.8.61-.86zm7 0c.4.08.68.47.61.87l-.37 2.25a.75.75 0 11-1.48-.24l.38-2.25a.75.75 0 01.86-.62zm-3.5 0c.41 0 .75.34.75.75v2.25a.75.75 0 01-1.5 0V7.5c0-.41.34-.75.75-.75z", fill: "#000", "fill-rule": "evenodd" } })]), e._v(" " + e._s(e.$t("selectablePlaceholder")) + " ")]) : e._e()]), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { margin: "calc(1 * var(--rem)) 0 calc(1 * var(--rem)) 0" }, attrs: { message: e.$t("error.minOnePackage") } }) : e._e(), t("div", { staticClass: "flex w-full" }, [t("CButton", { staticStyle: { "border-color": "hsl(0, 0%, 82%)" }, attrs: { type: "secondary", outlined: "", "icon-left": "plus" }, on: { click: function(i) {
2413
2431
  return e.addPackage();
2414
2432
  } } }, [e._v(" " + e._s(e.$t("add")) + " ")])], 1)], 1) : e._e()] : t("div", [t("PackageGroupSelect", { on: { input: function(i) {
2415
2433
  return e.onSelectType(i);
2416
2434
  } } }), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { "padding-bottom": "calc(1.5 * var(--rem))" }, attrs: { message: e.$t("error.selectType") } }) : e._e()], 1)], 2);
2417
- }, Gt = [], Kt = /* @__PURE__ */ u(
2418
- qt,
2419
- Ut,
2420
- Gt,
2435
+ }, Qt = [], Xt = /* @__PURE__ */ u(
2436
+ Zt,
2437
+ Jt,
2438
+ Qt,
2421
2439
  !1,
2422
2440
  null,
2423
- "1cbab1d2"
2441
+ "c254d910"
2424
2442
  );
2425
- const oi = Kt.exports;
2443
+ const mi = Xt.exports;
2426
2444
  export {
2427
- oi as default
2445
+ mi as default
2428
2446
  };