@wikicasa-dev/components 2.1.27 → 2.1.28-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/UIKit/AccessibleSelect.js +1 -1
  2. package/dist/UIKit/Accordion/BaseAccordion.js +1 -1
  3. package/dist/UIKit/Accordion/BaseAccordionBtn.js +1 -1
  4. package/dist/UIKit/Accordion/BaseAccordionContent.js +1 -1
  5. package/dist/UIKit/Accordion/BaseAccordionItem.js +1 -1
  6. package/dist/UIKit/BaseAlert.d.ts +1 -1
  7. package/dist/UIKit/BaseAlert.js +2 -2
  8. package/dist/UIKit/BaseAutocomplete.js +1 -1
  9. package/dist/UIKit/BaseBadge.js +2 -2
  10. package/dist/UIKit/BaseBreadcrumb.js +1 -1
  11. package/dist/UIKit/BaseButton.js +1 -1
  12. package/dist/UIKit/BaseCard.js +2 -2
  13. package/dist/UIKit/BaseComplexToggle.d.ts +1 -1
  14. package/dist/UIKit/BaseComplexToggle.js +5 -5
  15. package/dist/UIKit/BaseDropDown.js +1 -1
  16. package/dist/UIKit/BaseFloatingLabel.js +2 -2
  17. package/dist/UIKit/BaseIcon.js +2 -2
  18. package/dist/UIKit/BaseInput.js +2 -2
  19. package/dist/UIKit/BaseModal.js +2 -2
  20. package/dist/UIKit/BasePagination.js +1 -1
  21. package/dist/UIKit/BasePaper.js +2 -2
  22. package/dist/UIKit/BaseSelect/SelectItem.js +1 -1
  23. package/dist/UIKit/BaseSlider.js +2 -2
  24. package/dist/UIKit/BaseSnackbar.js +2 -2
  25. package/dist/UIKit/BaseTextarea.js +2 -2
  26. package/dist/UIKit/BaseToggle.js +2 -2
  27. package/dist/UIKit/BaseTooltip.js +2 -2
  28. package/dist/UIKit/BaseUploadFile.js +1 -1
  29. package/dist/UIKit/Checkbox/CheckboxBtn.js +2 -2
  30. package/dist/UIKit/Checkbox/CheckboxGroup.js +1 -1
  31. package/dist/UIKit/Radio/RadioButton.js +1 -1
  32. package/dist/UIKit/Radio/RadioGroup.js +1 -1
  33. package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +2 -2
  34. package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +1 -1
  35. package/dist/UIKit/Slider/SimpleSlider.js +2 -2
  36. package/dist/UIKit/StaticSpinner.js +2 -2
  37. package/dist/UIKit/Tab/BaseTab.js +1 -1
  38. package/dist/UIKit/Tab/BaseTabList.js +1 -1
  39. package/dist/UIKit/Tab/BaseTabPanel.js +1 -1
  40. package/dist/UIKit/Tab/BaseTabView.js +1 -1
  41. package/dist/assets/{packages/components/lib → lib}/UIKit/BaseComplexToggle.css +1 -1
  42. package/dist/chart/DoughnutChart.js +1 -1
  43. package/dist/chart/LineChart.js +1 -1
  44. package/dist/components/IntersectionObserver/IntersectionObservable.js +1 -1
  45. package/dist/components/IntersectionObserver/IntersectionObserver.js +1 -1
  46. package/dist/components/carousel/SwiperCarousel.js +3 -3
  47. package/dist/index.js +30 -30
  48. package/dist/lazyModules/Swiper/autoplay.js +5 -0
  49. package/dist/lazyModules/Swiper/controller.js +5 -0
  50. package/dist/lazyModules/Swiper/free-mode.js +5 -0
  51. package/dist/lazyModules/Swiper/keyboard.js +5 -0
  52. package/dist/lazyModules/Swiper/navigation.js +5 -0
  53. package/dist/lazyModules/Swiper/pagination.js +5 -0
  54. package/dist/lazyModules/Swiper/thumbs.js +5 -0
  55. package/dist/{packages/components/lib → lib}/UIKit/AccessibleSelect.vue.js +16 -18
  56. package/dist/lib/UIKit/Accordion/BaseAccordion.vue.js +31 -0
  57. package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionBtn.vue.js +5 -6
  58. package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionItem.vue.js +3 -4
  59. package/dist/{packages/components/lib → lib}/UIKit/BaseAutocomplete.vue.js +9 -12
  60. package/dist/{packages/components/lib → lib}/UIKit/BaseBreadcrumb.vue.js +9 -10
  61. package/dist/{packages/components/lib → lib}/UIKit/BaseButton.vue.js +1 -1
  62. package/dist/{packages/components/lib → lib}/UIKit/BaseDropDown.vue.js +6 -7
  63. package/dist/{packages/components/lib → lib}/UIKit/BaseInput.vue.js +2 -2
  64. package/dist/{packages/components/lib → lib}/UIKit/BaseModal.vue.js +15 -20
  65. package/dist/{packages/components/lib → lib}/UIKit/BasePagination.vue.js +3 -4
  66. package/dist/{packages/components/lib → lib}/UIKit/BaseSlider.vue.js +1 -1
  67. package/dist/{packages/components/lib → lib}/UIKit/BaseSnackbar.vue.js +3 -4
  68. package/dist/{packages/components/lib → lib}/UIKit/BaseTextarea.vue.js +2 -2
  69. package/dist/{packages/components/lib → lib}/UIKit/BaseUploadFile.vue.js +1 -1
  70. package/dist/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxGroup.vue.js +18 -22
  71. package/dist/{packages/components/lib → lib}/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +1 -1
  72. package/dist/{packages/components/lib → lib}/chart/DoughnutChart.vue.js +1 -1
  73. package/dist/{packages/components/lib → lib}/chart/LineChart.vue.js +1 -1
  74. package/dist/{packages/components/lib → lib}/components/carousel/SwiperCarousel.vue.js +32 -35
  75. package/package.json +16 -12
  76. package/dist/_virtual/polyline.js +0 -2
  77. package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/autoplay.css +0 -0
  78. package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/free-mode.css +0 -1
  79. package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/navigation.css +0 -1
  80. package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.css +0 -1
  81. package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/zoom.css +0 -1
  82. package/dist/assets/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper.css +0 -1
  83. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/autoplay.js +0 -128
  84. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/controller.js +0 -100
  85. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/free-mode.js +0 -123
  86. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/keyboard.js +0 -66
  87. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/navigation.js +0 -136
  88. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.js +0 -226
  89. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/thumbs.js +0 -120
  90. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/zoom.js +0 -309
  91. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/classes-to-selector.js +0 -6
  92. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/create-element-if-not-defined.js +0 -12
  93. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/ssr-window.esm.js +0 -134
  94. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/utils.js +0 -88
  95. package/dist/packages/components/lazyModules/Swiper/autoplay.js +0 -5
  96. package/dist/packages/components/lazyModules/Swiper/controller.js +0 -5
  97. package/dist/packages/components/lazyModules/Swiper/free-mode.js +0 -5
  98. package/dist/packages/components/lazyModules/Swiper/keyboard.js +0 -5
  99. package/dist/packages/components/lazyModules/Swiper/navigation.js +0 -5
  100. package/dist/packages/components/lazyModules/Swiper/pagination.js +0 -5
  101. package/dist/packages/components/lazyModules/Swiper/thumbs.js +0 -5
  102. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +0 -34
  103. package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js +0 -28
  104. package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js +0 -38
  105. package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -9
  106. package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -2
  107. package/dist/packages/components/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -40
  108. package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/ArrayUtils.js +0 -4
  109. package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/DeviceDetectionUtils.js +0 -4
  110. package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js +0 -15
  111. package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js +0 -12
  112. package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +0 -10
  113. package/dist/packages/components/node_modules/@wikicasa-dev/utilities/dist/utils/StringUtils.js +0 -4
  114. package/dist/packages/components/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -41
  115. package/dist/packages/components/node_modules/google-polyline/lib/decode.js +0 -22
  116. package/dist/packages/components/node_modules/google-polyline/lib/encode.js +0 -34
  117. package/dist/packages/components/node_modules/google-polyline/lib/polyline.js +0 -12
  118. package/dist/packages/components/node_modules/js-cookie/dist/js.cookie.js +0 -70
  119. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseAlert.css +0 -0
  120. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseBadge.css +0 -0
  121. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseCard.css +0 -0
  122. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseFloatingLabel.css +0 -0
  123. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseIcon.css +0 -0
  124. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseInput.css +0 -0
  125. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseModal.css +0 -0
  126. /package/dist/assets/{packages/components/lib → lib}/UIKit/BasePaper.css +0 -0
  127. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseSlider.css +0 -0
  128. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseSnackbar.css +0 -0
  129. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseTextarea.css +0 -0
  130. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseToggle.css +0 -0
  131. /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseTooltip.css +0 -0
  132. /package/dist/assets/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxBtn.css +0 -0
  133. /package/dist/assets/{packages/components/lib → lib}/UIKit/ShimmerLoader/BaseShimmerLoader.css +0 -0
  134. /package/dist/assets/{packages/components/lib → lib}/UIKit/Slider/SimpleSlider.css +0 -0
  135. /package/dist/assets/{packages/components/lib → lib}/UIKit/StaticSpinner.css +0 -0
  136. /package/dist/assets/{packages/components/lib → lib}/components/carousel/SwiperCarousel.css +0 -0
  137. /package/dist/assets/{packages/components/lib → lib}/components/carousel/SwiperCarousel2.css +0 -0
  138. /package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionContent.vue.js +0 -0
  139. /package/dist/{packages/components/lib → lib}/UIKit/BaseAlert.vue.js +0 -0
  140. /package/dist/{packages/components/lib → lib}/UIKit/BaseBadge.vue.js +0 -0
  141. /package/dist/{packages/components/lib → lib}/UIKit/BaseCard.vue.js +0 -0
  142. /package/dist/{packages/components/lib → lib}/UIKit/BaseComplexToggle.vue.js +0 -0
  143. /package/dist/{packages/components/lib → lib}/UIKit/BaseFloatingLabel.vue.js +0 -0
  144. /package/dist/{packages/components/lib → lib}/UIKit/BaseIcon.vue.js +0 -0
  145. /package/dist/{packages/components/lib → lib}/UIKit/BasePaper.vue.js +0 -0
  146. /package/dist/{packages/components/lib → lib}/UIKit/BaseSelect/SelectItem.vue.js +0 -0
  147. /package/dist/{packages/components/lib → lib}/UIKit/BaseToggle.vue.js +0 -0
  148. /package/dist/{packages/components/lib → lib}/UIKit/BaseTooltip.vue.js +0 -0
  149. /package/dist/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxBtn.vue.js +0 -0
  150. /package/dist/{packages/components/lib → lib}/UIKit/Radio/RadioButton.vue.js +0 -0
  151. /package/dist/{packages/components/lib → lib}/UIKit/Radio/RadioGroup.vue.js +0 -0
  152. /package/dist/{packages/components/lib → lib}/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +0 -0
  153. /package/dist/{packages/components/lib → lib}/UIKit/Slider/SimpleSlider.vue.js +0 -0
  154. /package/dist/{packages/components/lib → lib}/UIKit/StaticSpinner.vue.js +0 -0
  155. /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTab.vue.js +0 -0
  156. /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTabList.vue.js +0 -0
  157. /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTabPanel.vue.js +0 -0
  158. /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTabView.vue.js +0 -0
  159. /package/dist/{packages/components/lib → lib}/components/IntersectionObserver/IntersectionObservable.vue.js +0 -0
  160. /package/dist/{packages/components/lib → lib}/components/IntersectionObserver/IntersectionObserver.vue.js +0 -0
@@ -1,38 +0,0 @@
1
- import { h as o } from "vue";
2
- import { g as e } from "./DefaultValues-CpabIgVz.js";
3
- const a = (t, { attrs: r }) => {
4
- t = { ...e(), ...t };
5
- const { width: i, height: s } = t;
6
- return o(
7
- "svg",
8
- {
9
- xmlns: "http://www.w3.org/2000/svg",
10
- viewBox: "0 0 18.558 18.558",
11
- width: `${i}`,
12
- height: `${s}`,
13
- class: t.class ?? "",
14
- "aria-hidden": r["aria-hidden"] ?? "true"
15
- },
16
- o(
17
- "g",
18
- {
19
- fill: "none",
20
- stroke: `${t["stroke-color"] ?? "#222"}`,
21
- "stroke-linecap": `${r["stroke-linecap"] ?? "round"}`,
22
- "stroke-linejoin": `${r["stroke-linejoin"] ?? "round"}`,
23
- "stroke-width": `${t["stroke-width"] ?? "3"}`
24
- },
25
- [
26
- o("path", {
27
- d: "m2.121 2.121 14.316 14.316"
28
- }),
29
- o("path", {
30
- d: "M2.121 16.437 16.244 2.121"
31
- })
32
- ]
33
- )
34
- );
35
- };
36
- export {
37
- a as CloseIcon
38
- };
@@ -1,9 +0,0 @@
1
- const e = () => ({
2
- width: 20,
3
- height: 20,
4
- "stroke-color": "#222",
5
- "aria-hidden": !0
6
- });
7
- export {
8
- e as g
9
- };
@@ -1,2 +0,0 @@
1
- import { h as w } from "vue";
2
- w("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 17 17" });
@@ -1,40 +0,0 @@
1
- import { h as o } from "vue";
2
- import { g as n } from "./DefaultValues-CpabIgVz.js";
3
- const h = (r, { attrs: t }) => {
4
- r = { ...n(), ...r };
5
- const { width: i, height: s } = r;
6
- return o(
7
- "svg",
8
- {
9
- xmlns: "http://www.w3.org/2000/svg",
10
- viewBox: "0 0 11.175 13.409",
11
- width: `${i}`,
12
- height: `${s}`,
13
- class: r.class ?? "",
14
- "aria-hidden": t["aria-hidden"] ?? "true",
15
- fill: "none",
16
- stroke: r["stroke-color"] ?? "#FA4F64"
17
- },
18
- [
19
- o("circle", {
20
- cx: 6,
21
- cy: 6,
22
- r: 4.5
23
- }),
24
- o("path", {
25
- "stroke-linejoin": "round",
26
- d: "M5.8 3.6h.4L6 6.5z"
27
- }),
28
- o("circle", {
29
- cx: 6,
30
- cy: 8.2,
31
- r: 0.6,
32
- fill: r["stroke-color"] ?? "#FA4F64",
33
- stroke: "none"
34
- })
35
- ]
36
- );
37
- };
38
- export {
39
- h as WarningIconRounded
40
- };
@@ -1,4 +0,0 @@
1
- const r = (t) => !t?.length;
2
- export {
3
- r as isArrNullOrEmpty
4
- };
@@ -1,4 +0,0 @@
1
- const s = () => navigator?.userAgent.includes("Windows");
2
- export {
3
- s as isWindows
4
- };
@@ -1,15 +0,0 @@
1
- function n(e, i) {
2
- return (...o) => new Promise((c, d) => {
3
- e.id && clearTimeout(e.id), e.id = setTimeout(() => {
4
- try {
5
- const t = i(...o);
6
- c(t);
7
- } catch (t) {
8
- d(t);
9
- }
10
- }, e.delay);
11
- });
12
- }
13
- export {
14
- n as debounce
15
- };
@@ -1,12 +0,0 @@
1
- const c = (e, t) => new Promise((a, o) => {
2
- setTimeout(() => {
3
- try {
4
- e && e(), a();
5
- } catch {
6
- o();
7
- }
8
- }, t);
9
- });
10
- export {
11
- c as awaitableSetTimeout
12
- };
@@ -1,10 +0,0 @@
1
- function c(t, s) {
2
- if (t)
3
- for (const o in t)
4
- s[o] = t[o];
5
- }
6
- const n = (t) => !t || !Object.keys(t).length;
7
- export {
8
- n as isEmptyObject,
9
- c as shallowCopyObjectTo
10
- };
@@ -1,4 +0,0 @@
1
- const t = (r = "") => !r || !r.trim() ? "" : (r = r.trim(), r.replace(" ", "-").toLowerCase());
2
- export {
3
- t as stringToHyphened
4
- };
@@ -1,41 +0,0 @@
1
- import { ref as p, onMounted as w, onUnmounted as E, unref as x } from "vue";
2
- const D = (o) => {
3
- const { isDropdownOpen: t, disableSpaceHandler: m } = o, n = p(-1), a = p(-1);
4
- if (!(o.activate === void 0 || o.activate)) return { activeIdx: n, selectedIdx: a };
5
- const l = (e) => {
6
- const d = "ArrowUp", v = "ArrowDown", s = "Enter", i = "Escape", r = " ", c = "PageUp", y = "Home", f = "PageDown", k = "End";
7
- if (!t.value || ![
8
- d,
9
- v,
10
- s,
11
- i,
12
- r,
13
- c,
14
- y,
15
- f,
16
- k
17
- ].includes(e.key))
18
- return;
19
- const u = x(o.optionsLength);
20
- if (e.key === d)
21
- n.value = n.value === 0 ? u - 1 : n.value - 1;
22
- else if (e.key === v)
23
- n.value = (n.value + 1) % u;
24
- else if (e.key === s || e.key === r) {
25
- if (e.key === r && m) return;
26
- a.value = n.value, t.value = !1;
27
- } else e.key === i ? (n.value = a.value, t.value = !1) : e.key === c || e.key === y ? n.value = 0 : (e.key === f || e.key === k) && (n.value = u - 1);
28
- e.stopPropagation(), e.preventDefault();
29
- };
30
- return w(() => {
31
- document && document.addEventListener("keydown", l);
32
- }), E(() => {
33
- document && document.removeEventListener("keydown", l);
34
- }), {
35
- activeIdx: n,
36
- selectedIdx: a
37
- };
38
- };
39
- export {
40
- D as useKeyboardController
41
- };
@@ -1,22 +0,0 @@
1
- var v, d;
2
- function g() {
3
- if (d) return v;
4
- d = 1;
5
- var f = 1e5;
6
- function e(r) {
7
- var o = [], n = 0, t = 0;
8
- return e.integers(r, function(u, i) {
9
- n += u, t += i, o.push([n / f, t / f]);
10
- }), o;
11
- }
12
- return e.sign = function(r) {
13
- return r & 1 ? ~(r >>> 1) : r >>> 1;
14
- }, e.integers = function(r, o) {
15
- for (var n = 0, t = 0, u = 0, i = 0, a = 0, s = 0, c = 0; c < r.length; c++)
16
- i = r.charCodeAt(c) - 63, a = a | (i & 31) << s, s = s + 5, i < 32 && (++n & 1 ? t = e.sign(a) : (u = e.sign(a), o(t, u)), a = 0, s = 0);
17
- return n;
18
- }, v = e, v;
19
- }
20
- export {
21
- g as __require
22
- };
@@ -1,34 +0,0 @@
1
- var d, v;
2
- function p() {
3
- if (v) return d;
4
- v = 1;
5
- for (var f = {}, u = 32; u < 127; u++)
6
- f[u] = String.fromCharCode(u);
7
- function g(r) {
8
- var e = 0, n = 0;
9
- return s(r, function(o, c, a) {
10
- var t = Math.round(c * 1e5), h = Math.round(a * 1e5);
11
- return o += x(i(t - e)) + x(i(h - n)), e = t, n = h, o;
12
- });
13
- }
14
- function s(r, e) {
15
- for (var n = null, o = 0, c = 0, a = "", t = 0; t < r.length; t++)
16
- n = r[t], o = n.lat || n.x || n[0], c = n.lng || n.y || n[1], a = e(a, o, c);
17
- return a;
18
- }
19
- function i(r) {
20
- return r < 0 ? ~(r << 1) : r << 1;
21
- }
22
- function C(r) {
23
- return (r & 31 | 32) + 63;
24
- }
25
- function x(r) {
26
- for (var e = ""; r >= 32; )
27
- e += f[C(r)], r = r >> 5;
28
- return e += f[r + 63], e;
29
- }
30
- return d = g, d;
31
- }
32
- export {
33
- p as __require
34
- };
@@ -1,12 +0,0 @@
1
- import { __require as i } from "./encode.js";
2
- import { __require as o } from "./decode.js";
3
- var e, r;
4
- function q() {
5
- return r || (r = 1, e = {
6
- encode: i(),
7
- decode: o()
8
- }), e;
9
- }
10
- export {
11
- q as __require
12
- };
@@ -1,70 +0,0 @@
1
- function d(r) {
2
- for (var c = 1; c < arguments.length; c++) {
3
- var f = arguments[c];
4
- for (var p in f)
5
- r[p] = f[p];
6
- }
7
- return r;
8
- }
9
- var g = {
10
- read: function(r) {
11
- return r[0] === '"' && (r = r.slice(1, -1)), r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
12
- },
13
- write: function(r) {
14
- return encodeURIComponent(r).replace(
15
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
16
- decodeURIComponent
17
- );
18
- }
19
- };
20
- function s(r, c) {
21
- function f(n, t, e) {
22
- if (!(typeof document > "u")) {
23
- e = d({}, c, e), typeof e.expires == "number" && (e.expires = new Date(Date.now() + e.expires * 864e5)), e.expires && (e.expires = e.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
24
- var o = "";
25
- for (var i in e)
26
- e[i] && (o += "; " + i, e[i] !== !0 && (o += "=" + e[i].split(";")[0]));
27
- return document.cookie = n + "=" + r.write(t, n) + o;
28
- }
29
- }
30
- function p(n) {
31
- if (!(typeof document > "u" || arguments.length && !n)) {
32
- for (var t = document.cookie ? document.cookie.split("; ") : [], e = {}, o = 0; o < t.length; o++) {
33
- var i = t[o].split("="), v = i.slice(1).join("=");
34
- try {
35
- var u = decodeURIComponent(i[0]);
36
- if (e[u] = r.read(v, u), n === u)
37
- break;
38
- } catch {
39
- }
40
- }
41
- return n ? e[n] : e;
42
- }
43
- }
44
- return Object.create(
45
- {
46
- set: f,
47
- get: p,
48
- remove: function(n, t) {
49
- f(
50
- n,
51
- "",
52
- d({}, t, {
53
- expires: -1
54
- })
55
- );
56
- },
57
- withAttributes: function(n) {
58
- return s(this.converter, d({}, this.attributes, n));
59
- },
60
- withConverter: function(n) {
61
- return s(d({}, this.converter, n), this.attributes);
62
- }
63
- },
64
- {
65
- attributes: { value: Object.freeze(c) },
66
- converter: { value: Object.freeze(r) }
67
- }
68
- );
69
- }
70
- s(g, { path: "/" });