@ozdao/prometheus-framework 0.2.89 → 0.2.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/dist/main-BV1Yv9Hy.js +92 -0
  2. package/dist/main-DmNP-t33.mjs +13625 -0
  3. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1 -1
  4. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +748 -750
  5. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs +1 -1
  6. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +40 -39
  7. package/dist/node_modules/web3/lib/esm/index.cjs +1 -1
  8. package/dist/node_modules/web3/lib/esm/index.js +42 -41
  9. package/dist/node_modules/web3/lib/esm/version.cjs +1 -1
  10. package/dist/node_modules/web3/lib/esm/version.js +1 -1
  11. package/dist/node_modules/web3-eth/lib/esm/schemas.cjs +1 -1
  12. package/dist/node_modules/web3-eth/lib/esm/schemas.js +113 -88
  13. package/dist/node_modules/web3-eth-contract/lib/esm/contract.cjs +3 -1
  14. package/dist/node_modules/web3-eth-contract/lib/esm/contract.js +242 -217
  15. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.cjs +1 -1
  16. package/dist/node_modules/web3-eth-contract/lib/esm/encoding.js +43 -37
  17. package/dist/node_modules/web3-eth-ens/lib/esm/config.cjs +1 -1
  18. package/dist/node_modules/web3-eth-ens/lib/esm/config.js +3 -1
  19. package/dist/node_modules/web3-eth-ens/lib/esm/ens.cjs +1 -1
  20. package/dist/node_modules/web3-eth-ens/lib/esm/ens.js +34 -13
  21. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.cjs +1 -1
  22. package/dist/node_modules/web3-eth-ens/lib/esm/resolver.js +48 -36
  23. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.cjs +1 -1
  24. package/dist/node_modules/web3-utils/lib/esm/chunk_response_parser.js +2 -2
  25. package/dist/node_modules/web3-utils/lib/esm/converters.cjs +1 -1
  26. package/dist/node_modules/web3-utils/lib/esm/converters.js +52 -50
  27. package/dist/node_modules/web3-utils/lib/esm/uint8array.cjs +1 -1
  28. package/dist/node_modules/web3-utils/lib/esm/uint8array.js +13 -13
  29. package/dist/node_modules/web3-validator/lib/esm/utils.cjs +1 -1
  30. package/dist/node_modules/web3-validator/lib/esm/utils.js +76 -87
  31. package/dist/node_modules/web3-validator/lib/esm/validator.cjs +1 -1
  32. package/dist/node_modules/web3-validator/lib/esm/validator.js +49 -47
  33. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  34. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +168 -158
  35. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
  37. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  38. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
  39. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  41. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  42. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  43. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  45. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  46. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  47. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  56. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  57. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  58. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  59. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  67. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  77. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +20 -25
  117. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  125. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  129. package/dist/prometheus-framework.cjs.js +1 -1
  130. package/dist/prometheus-framework.es.js +1 -1
  131. package/dist/style.css +1 -1
  132. package/dist/web-Bk_OtXgv.js +1 -0
  133. package/dist/web-VFuzUsNl.mjs +54 -0
  134. package/package.json +1 -1
@@ -1,80 +1,82 @@
1
1
  import "../../../web3-errors/lib/esm/errors/rpc_errors.js";
2
- import { SchemaFormatError as b } from "../../../web3-errors/lib/esm/errors/schema_errors.js";
3
- import l, { ZodIssueCode as m } from "../../../zod/lib/index.js";
4
- import { Web3ValidatorError as j } from "./errors.js";
2
+ import { SchemaFormatError as I } from "../../../web3-errors/lib/esm/errors/schema_errors.js";
3
+ import u, { ZodIssueCode as p } from "../../../zod/lib/index.js";
4
+ import { Web3ValidatorError as b } from "./errors.js";
5
5
  import y from "./formats.js";
6
6
  const s = (t) => {
7
7
  if ((!(t != null && t.type) || (t == null ? void 0 : t.type) === "object") && (t != null && t.properties)) {
8
- const n = {};
8
+ const e = {};
9
9
  for (const i of Object.keys(t.properties)) {
10
- const o = s(t.properties[i]);
11
- o && (n[i] = o);
10
+ const n = s(t.properties[i]);
11
+ n && (e[i] = n);
12
12
  }
13
- return Array.isArray(t.required) ? l.object(n).partial().required(t.required.reduce((i, o) => Object.assign(Object.assign({}, i), { [o]: !0 }), {})) : l.object(n).partial();
13
+ return Array.isArray(t.required) ? u.object(e).partial().required(t.required.reduce((i, n) => Object.assign(Object.assign({}, i), { [n]: !0 }), {})) : u.object(e).partial();
14
14
  }
15
15
  if ((t == null ? void 0 : t.type) === "array" && (t != null && t.items)) {
16
- if (Array.isArray(t.items) && t.items.length > 0) {
16
+ if (Array.isArray(t.items) && t.items.length > 1 && t.maxItems !== void 0 && new Set(t.items.map((n) => n.$id)).size === t.items.length) {
17
17
  const n = [];
18
- for (const i of t.items) {
19
- const o = s(i);
20
- o && n.push(o);
18
+ for (const o of t.items) {
19
+ const r = s(o);
20
+ r && n.push(r);
21
21
  }
22
- return l.tuple(n);
22
+ return u.tuple(n);
23
23
  }
24
- return l.array(s(t.items));
24
+ const e = Array.isArray(t.items) ? t.items[0] : t.items;
25
+ let i = u.array(s(e));
26
+ return i = t.minItems !== void 0 ? i.min(t.minItems) : i, i = t.maxItems !== void 0 ? i.max(t.maxItems) : i, i;
25
27
  }
26
28
  if (t.oneOf && Array.isArray(t.oneOf))
27
- return l.union(t.oneOf.map((n) => s(n)));
29
+ return u.union(t.oneOf.map((e) => s(e)));
28
30
  if (t != null && t.format) {
29
31
  if (!y[t.format])
30
- throw new b(t.format);
31
- return l.any().refine(y[t.format], (n) => ({
32
- params: { value: n, format: t.format }
32
+ throw new I(t.format);
33
+ return u.any().refine(y[t.format], (e) => ({
34
+ params: { value: e, format: t.format }
33
35
  }));
34
36
  }
35
- return t != null && t.type && (t == null ? void 0 : t.type) !== "object" && typeof l[String(t.type)] == "function" ? l[String(t.type)]() : l.object({ data: l.any() }).partial();
37
+ return t != null && t.type && (t == null ? void 0 : t.type) !== "object" && typeof u[String(t.type)] == "function" ? u[String(t.type)]() : u.object({ data: u.any() }).partial();
36
38
  };
37
39
  class v {
38
40
  // eslint-disable-next-line no-useless-constructor, @typescript-eslint/no-empty-function
39
41
  static factory() {
40
42
  return v.validatorInstance || (v.validatorInstance = new v()), v.validatorInstance;
41
43
  }
42
- validate(n, i, o) {
43
- var e, u;
44
- const r = s(n).safeParse(i);
45
- if (!r.success) {
46
- const d = this.convertErrors((u = (e = r.error) === null || e === void 0 ? void 0 : e.issues) !== null && u !== void 0 ? u : []);
47
- if (d) {
48
- if (o != null && o.silent)
49
- return d;
50
- throw new j(d);
44
+ validate(e, i, n) {
45
+ var o, r;
46
+ const l = s(e).safeParse(i);
47
+ if (!l.success) {
48
+ const a = this.convertErrors((r = (o = l.error) === null || o === void 0 ? void 0 : o.issues) !== null && r !== void 0 ? r : []);
49
+ if (a) {
50
+ if (n != null && n.silent)
51
+ return a;
52
+ throw new b(a);
51
53
  }
52
54
  }
53
55
  }
54
56
  // eslint-disable-next-line class-methods-use-this
55
- convertErrors(n) {
56
- if (n && Array.isArray(n) && n.length > 0)
57
- return n.map((i) => {
58
- var o;
59
- let e, u, a, r;
60
- r = i.path.join("/");
61
- const d = String(i.path[i.path.length - 1]), p = i.path.join("/");
62
- if (i.code === m.too_big)
63
- u = "maxItems", r = `${p}/maxItems`, a = { limit: i.maximum }, e = `must NOT have more than ${i.maximum} items`;
64
- else if (i.code === m.too_small)
65
- u = "minItems", r = `${p}/minItems`, a = { limit: i.minimum }, e = `must NOT have fewer than ${i.minimum} items`;
66
- else if (i.code === m.custom) {
67
- const { value: f, format: g } = (o = i.params) !== null && o !== void 0 ? o : {};
68
- typeof f > "u" ? e = `value at "/${r}" is required` : e = `value "${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
69
- typeof f == "object" ? JSON.stringify(f) : f}" at "/${r}" must pass "${g}" validation`, a = { value: f };
57
+ convertErrors(e) {
58
+ if (e && Array.isArray(e) && e.length > 0)
59
+ return e.map((i) => {
60
+ var n;
61
+ let o, r, d, l;
62
+ l = i.path.join("/");
63
+ const a = String(i.path[i.path.length - 1]), m = i.path.join("/");
64
+ if (i.code === p.too_big)
65
+ r = "maxItems", l = `${m}/maxItems`, d = { limit: i.maximum }, o = `must NOT have more than ${i.maximum} items`;
66
+ else if (i.code === p.too_small)
67
+ r = "minItems", l = `${m}/minItems`, d = { limit: i.minimum }, o = `must NOT have fewer than ${i.minimum} items`;
68
+ else if (i.code === p.custom) {
69
+ const { value: f, format: g } = (n = i.params) !== null && n !== void 0 ? n : {};
70
+ typeof f > "u" ? o = `value at "/${l}" is required` : o = `value "${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
71
+ typeof f == "object" ? JSON.stringify(f) : f}" at "/${l}" must pass "${g}" validation`, d = { value: f };
70
72
  }
71
73
  return {
72
- keyword: u ?? d,
73
- instancePath: p ? `/${p}` : "",
74
- schemaPath: r ? `#${r}` : "#",
74
+ keyword: r ?? a,
75
+ instancePath: m ? `/${m}` : "",
76
+ schemaPath: l ? `#${l}` : "#",
75
77
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
76
- params: a ?? { value: i.message },
77
- message: e ?? i.message
78
+ params: d ?? { value: i.message },
79
+ message: o ?? i.message
78
80
  };
79
81
  });
80
82
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! Capacitor: https://capacitorjs.com/ - MIT License */const Z=t=>{const e=new Map;e.set("web",{name:"web"});const r=t.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},i=(o,a)=>{r.platforms.set(o,a)},n=o=>{r.platforms.has(o)&&(r.currentPlatform=r.platforms.get(o))};return r.addPlatform=i,r.setPlatform=n,r},N=t=>t.CapacitorPlatforms=Z(t),S=N(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});S.addPlatform;S.setPlatform;exports.ExceptionCode=void 0;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(exports.ExceptionCode||(exports.ExceptionCode={}));class O extends Error{constructor(e,r,i){super(e),this.message=e,this.code=r,this.data=i}}const ee=t=>{var e,r;return t!=null&&t.androidBridge?"android":!((r=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||r===void 0)&&r.bridge?"ios":"web"},te=t=>{var e,r,i,n,o;const a=t.CapacitorCustomPlatform||null,s=t.Capacitor||{},f=s.Plugins=s.Plugins||{},l=t.CapacitorPlatforms,E=()=>a!==null?a.name:ee(t),v=((e=l==null?void 0:l.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||E,$=()=>v()!=="web",D=((r=l==null?void 0:l.currentPlatform)===null||r===void 0?void 0:r.isNativePlatform)||$,B=c=>{const d=j.get(c);return!!(d!=null&&d.platforms.has(v())||H(c))},F=((i=l==null?void 0:l.currentPlatform)===null||i===void 0?void 0:i.isPluginAvailable)||B,G=c=>{var d;return(d=s.PluginHeaders)===null||d===void 0?void 0:d.find(y=>y.name===c)},H=((n=l==null?void 0:l.currentPlatform)===null||n===void 0?void 0:n.getPluginHeader)||G,K=c=>t.console.error(c),z=(c,d,y)=>Promise.reject(`${y} does not have an implementation of "${d}".`),j=new Map,V=(c,d={})=>{const y=j.get(c);if(y)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),y.proxy;const P=v(),C=H(c);let h;const Q=async()=>(!h&&P in d?h=typeof d[P]=="function"?h=await d[P]():h=d[P]:a!==null&&!h&&"web"in d&&(h=typeof d.web=="function"?h=await d.web():h=d.web),h),X=(u,m)=>{var p,w;if(C){const b=C==null?void 0:C.methods.find(g=>m===g.name);if(b)return b.rtype==="promise"?g=>s.nativePromise(c,m.toString(),g):(g,k)=>s.nativeCallback(c,m.toString(),g,k);if(u)return(p=u[m])===null||p===void 0?void 0:p.bind(u)}else{if(u)return(w=u[m])===null||w===void 0?void 0:w.bind(u);throw new O(`"${c}" plugin is not implemented on ${P}`,exports.ExceptionCode.Unimplemented)}},U=u=>{let m;const p=(...w)=>{const b=Q().then(g=>{const k=X(g,u);if(k){const x=k(...w);return m=x==null?void 0:x.remove,x}else throw new O(`"${c}.${u}()" is not implemented on ${P}`,exports.ExceptionCode.Unimplemented)});return u==="addListener"&&(b.remove=async()=>m()),b};return p.toString=()=>`${u.toString()}() { [capacitor code] }`,Object.defineProperty(p,"name",{value:u,writable:!1,configurable:!1}),p},M=U("addListener"),W=U("removeListener"),Y=(u,m)=>{const p=M({eventName:u},m),w=async()=>{const g=await p;W({eventName:u,callbackId:g},m)},b=new Promise(g=>p.then(()=>g({remove:w})));return b.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await w()},b},A=new Proxy({},{get(u,m){switch(m){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return C?Y:M;case"removeListener":return W;default:return U(m)}}});return f[c]=A,j.set(c,{name:c,proxy:A,platforms:new Set([...Object.keys(d),...C?[P]:[]])}),A},J=((o=l==null?void 0:l.currentPlatform)===null||o===void 0?void 0:o.registerPlugin)||V;return s.convertFileSrc||(s.convertFileSrc=c=>c),s.getPlatform=v,s.handleError=K,s.isNativePlatform=D,s.isPluginAvailable=F,s.pluginMethodNoop=z,s.registerPlugin=J,s.Exception=O,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s.platform=s.getPlatform(),s.isNative=s.isNativePlatform(),s},re=t=>t.Capacitor=te(t),L=re(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),T=L.registerPlugin;L.Plugins;class _{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,r){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(r);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const o=async()=>this.removeListener(e,r),a=Promise.resolve({remove:o});return Object.defineProperty(a,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()}}),a}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,r){const i=this.listeners[e];i&&i.forEach(n=>n(r))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,r){this.windowListeners[r]={registered:!1,windowEventName:e,pluginEventName:r,handler:i=>{this.notifyListeners(r,i)}}}unimplemented(e="not implemented"){return new L.Exception(e,exports.ExceptionCode.Unimplemented)}unavailable(e="not available"){return new L.Exception(e,exports.ExceptionCode.Unavailable)}async removeListener(e,r){const i=this.listeners[e];if(!i)return;const n=i.indexOf(r);this.listeners[e].splice(n,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const R=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),I=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ne extends _{async getCookies(){const e=document.cookie,r={};return e.split(";").forEach(i=>{if(i.length<=0)return;let[n,o]=i.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=I(n).trim(),o=I(o).trim(),r[n]=o}),r}async setCookie(e){try{const r=R(e.key),i=R(e.value),n=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${r}=${i||""}${n}; path=${o}; ${a};`}catch(r){return Promise.reject(r)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const r of e)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}T("CapacitorCookies",{web:()=>new ne});const oe=async t=>new Promise((e,r)=>{const i=new FileReader;i.onload=()=>{const n=i.result;e(n.indexOf(",")>=0?n.split(",")[1]:n)},i.onerror=n=>r(n),i.readAsDataURL(t)}),se=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(n=>n.toLocaleLowerCase()).reduce((n,o,a)=>(n[o]=t[e[a]],n),{})},ie=(t,e=!0)=>t?Object.entries(t).reduce((i,n)=>{const[o,a]=n;let s,f;return Array.isArray(a)?(f="",a.forEach(l=>{s=e?encodeURIComponent(l):l,f+=`${o}=${s}&`}),f.slice(0,-1)):(s=e?encodeURIComponent(a):a,f=`${o}=${s}`),`${i}&${f}`},"").substr(1):null,q=(t,e={})=>{const r=Object.assign({method:t.method||"GET",headers:t.headers},e),n=se(t.headers)["content-type"]||"";if(typeof t.data=="string")r.body=t.data;else if(n.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[a,s]of Object.entries(t.data||{}))o.set(a,s);r.body=o.toString()}else if(n.includes("multipart/form-data")||t.data instanceof FormData){const o=new FormData;if(t.data instanceof FormData)t.data.forEach((s,f)=>{o.append(f,s)});else for(const s of Object.keys(t.data))o.append(s,t.data[s]);r.body=o;const a=new Headers(r.headers);a.delete("content-type"),r.headers=a}else(n.includes("application/json")||typeof t.data=="object")&&(r.body=JSON.stringify(t.data));return r};class ae extends _{async request(e){const r=q(e,e.webFetchExtra),i=ie(e.params,e.shouldEncodeUrlParams),n=i?`${e.url}?${i}`:e.url,o=await fetch(n,r),a=o.headers.get("content-type")||"";let{responseType:s="text"}=o.ok?e:{};a.includes("application/json")&&(s="json");let f,l;switch(s){case"arraybuffer":case"blob":l=await o.blob(),f=await oe(l);break;case"json":f=await o.json();break;case"document":case"text":default:f=await o.text()}const E={};return o.headers.forEach((v,$)=>{E[$]=v}),{data:f,headers:E,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}T("CapacitorHttp",{web:()=>new ae});exports.Capacitor=L;exports.CapacitorException=O;exports.CapacitorPlatforms=S;exports.WebPlugin=_;exports.buildRequestInit=q;exports.registerPlugin=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! Capacitor: https://capacitorjs.com/ - MIT License */const Z=r=>{const e=new Map;e.set("web",{name:"web"});const t=r.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},o=(n,a)=>{t.platforms.set(n,a)},i=n=>{t.platforms.has(n)&&(t.currentPlatform=t.platforms.get(n))};return t.addPlatform=o,t.setPlatform=i,t},N=r=>r.CapacitorPlatforms=Z(r),S=N(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});S.addPlatform;S.setPlatform;exports.ExceptionCode=void 0;(function(r){r.Unimplemented="UNIMPLEMENTED",r.Unavailable="UNAVAILABLE"})(exports.ExceptionCode||(exports.ExceptionCode={}));class $ extends Error{constructor(e,t,o){super(e),this.message=e,this.code=t,this.data=o}}const ee=r=>{var e,t;return r!=null&&r.androidBridge?"android":!((t=(e=r==null?void 0:r.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||t===void 0)&&t.bridge?"ios":"web"},te=r=>{var e,t,o,i,n;const a=r.CapacitorCustomPlatform||null,s=r.Capacitor||{},f=s.Plugins=s.Plugins||{},l=r.CapacitorPlatforms,L=()=>a!==null?a.name:ee(r),P=((e=l==null?void 0:l.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||L,O=()=>P()!=="web",D=((t=l==null?void 0:l.currentPlatform)===null||t===void 0?void 0:t.isNativePlatform)||O,F=c=>{const d=A.get(c);return!!(d!=null&&d.platforms.has(P())||H(c))},B=((o=l==null?void 0:l.currentPlatform)===null||o===void 0?void 0:o.isPluginAvailable)||F,G=c=>{var d;return(d=s.PluginHeaders)===null||d===void 0?void 0:d.find(y=>y.name===c)},H=((i=l==null?void 0:l.currentPlatform)===null||i===void 0?void 0:i.getPluginHeader)||G,K=c=>r.console.error(c),z=(c,d,y)=>Promise.reject(`${y} does not have an implementation of "${d}".`),A=new Map,V=(c,d={})=>{const y=A.get(c);if(y)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),y.proxy;const w=P(),C=H(c);let p;const Q=async()=>(!p&&w in d?p=typeof d[w]=="function"?p=await d[w]():p=d[w]:a!==null&&!p&&"web"in d&&(p=typeof d.web=="function"?p=await d.web():p=d.web),p),X=(u,g)=>{var h,b;if(C){const v=C==null?void 0:C.methods.find(m=>g===m.name);if(v)return v.rtype==="promise"?m=>s.nativePromise(c,g.toString(),m):(m,k)=>s.nativeCallback(c,g.toString(),m,k);if(u)return(h=u[g])===null||h===void 0?void 0:h.bind(u)}else{if(u)return(b=u[g])===null||b===void 0?void 0:b.bind(u);throw new $(`"${c}" plugin is not implemented on ${w}`,exports.ExceptionCode.Unimplemented)}},j=u=>{let g;const h=(...b)=>{const v=Q().then(m=>{const k=X(m,u);if(k){const x=k(...b);return g=x==null?void 0:x.remove,x}else throw new $(`"${c}.${u}()" is not implemented on ${w}`,exports.ExceptionCode.Unimplemented)});return u==="addListener"&&(v.remove=async()=>g()),v};return h.toString=()=>`${u.toString()}() { [capacitor code] }`,Object.defineProperty(h,"name",{value:u,writable:!1,configurable:!1}),h},R=j("addListener"),M=j("removeListener"),Y=(u,g)=>{const h=R({eventName:u},g),b=async()=>{const m=await h;M({eventName:u,callbackId:m},g)},v=new Promise(m=>h.then(()=>m({remove:b})));return v.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await b()},v},U=new Proxy({},{get(u,g){switch(g){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return C?Y:R;case"removeListener":return M;default:return j(g)}}});return f[c]=U,A.set(c,{name:c,proxy:U,platforms:new Set([...Object.keys(d),...C?[w]:[]])}),U},J=((n=l==null?void 0:l.currentPlatform)===null||n===void 0?void 0:n.registerPlugin)||V;return s.convertFileSrc||(s.convertFileSrc=c=>c),s.getPlatform=P,s.handleError=K,s.isNativePlatform=D,s.isPluginAvailable=B,s.pluginMethodNoop=z,s.registerPlugin=J,s.Exception=$,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s.platform=s.getPlatform(),s.isNative=s.isNativePlatform(),s},re=r=>r.Capacitor=te(r),E=re(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),T=E.registerPlugin;E.Plugins;class _{constructor(e){this.listeners={},this.retainedEventArguments={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,t){let o=!1;this.listeners[e]||(this.listeners[e]=[],o=!0),this.listeners[e].push(t);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n),o&&this.sendRetainedArgumentsForEvent(e);const a=async()=>this.removeListener(e,t);return Promise.resolve({remove:a})}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t,o){const i=this.listeners[e];if(!i){if(o){let n=this.retainedEventArguments[e];n||(n=[]),n.push(t),this.retainedEventArguments[e]=n}return}i.forEach(n=>n(t))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:o=>{this.notifyListeners(t,o)}}}unimplemented(e="not implemented"){return new E.Exception(e,exports.ExceptionCode.Unimplemented)}unavailable(e="not available"){return new E.Exception(e,exports.ExceptionCode.Unavailable)}async removeListener(e,t){const o=this.listeners[e];if(!o)return;const i=o.indexOf(t);this.listeners[e].splice(i,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){const t=this.retainedEventArguments[e];t&&(delete this.retainedEventArguments[e],t.forEach(o=>{this.notifyListeners(e,o)}))}}const W=r=>encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),I=r=>r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ne extends _{async getCookies(){const e=document.cookie,t={};return e.split(";").forEach(o=>{if(o.length<=0)return;let[i,n]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");i=I(i).trim(),n=I(n).trim(),t[i]=n}),t}async setCookie(e){try{const t=W(e.key),o=W(e.value),i=`; expires=${(e.expires||"").replace("expires=","")}`,n=(e.path||"/").replace("path=",""),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${t}=${o||""}${i}; path=${n}; ${a};`}catch(t){return Promise.reject(t)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(t){return Promise.reject(t)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const t of e)document.cookie=t.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}T("CapacitorCookies",{web:()=>new ne});const se=async r=>new Promise((e,t)=>{const o=new FileReader;o.onload=()=>{const i=o.result;e(i.indexOf(",")>=0?i.split(",")[1]:i)},o.onerror=i=>t(i),o.readAsDataURL(r)}),oe=(r={})=>{const e=Object.keys(r);return Object.keys(r).map(i=>i.toLocaleLowerCase()).reduce((i,n,a)=>(i[n]=r[e[a]],i),{})},ie=(r,e=!0)=>r?Object.entries(r).reduce((o,i)=>{const[n,a]=i;let s,f;return Array.isArray(a)?(f="",a.forEach(l=>{s=e?encodeURIComponent(l):l,f+=`${n}=${s}&`}),f.slice(0,-1)):(s=e?encodeURIComponent(a):a,f=`${n}=${s}`),`${o}&${f}`},"").substr(1):null,q=(r,e={})=>{const t=Object.assign({method:r.method||"GET",headers:r.headers},e),i=oe(r.headers)["content-type"]||"";if(typeof r.data=="string")t.body=r.data;else if(i.includes("application/x-www-form-urlencoded")){const n=new URLSearchParams;for(const[a,s]of Object.entries(r.data||{}))n.set(a,s);t.body=n.toString()}else if(i.includes("multipart/form-data")||r.data instanceof FormData){const n=new FormData;if(r.data instanceof FormData)r.data.forEach((s,f)=>{n.append(f,s)});else for(const s of Object.keys(r.data))n.append(s,r.data[s]);t.body=n;const a=new Headers(t.headers);a.delete("content-type"),t.headers=a}else(i.includes("application/json")||typeof r.data=="object")&&(t.body=JSON.stringify(r.data));return t};class ae extends _{async request(e){const t=q(e,e.webFetchExtra),o=ie(e.params,e.shouldEncodeUrlParams),i=o?`${e.url}?${o}`:e.url,n=await fetch(i,t),a=n.headers.get("content-type")||"";let{responseType:s="text"}=n.ok?e:{};a.includes("application/json")&&(s="json");let f,l;switch(s){case"arraybuffer":case"blob":l=await n.blob(),f=await se(l);break;case"json":f=await n.json();break;case"document":case"text":default:f=await n.text()}const L={};return n.headers.forEach((P,O)=>{L[O]=P}),{data:f,headers:L,status:n.status,url:n.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}T("CapacitorHttp",{web:()=>new ae});exports.Capacitor=E;exports.CapacitorException=$;exports.CapacitorPlatforms=S;exports.WebPlugin=_;exports.buildRequestInit=q;exports.registerPlugin=T;