@cedros/pay-react 1.1.27 → 1.1.29
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.
- package/dist/{AISettingsSection-DELur7D2.js → AISettingsSection-B7qrycfY.js} +2 -2
- package/dist/{AISettingsSection-BlIv3CzS.mjs → AISettingsSection-DtAgMsDw.mjs} +6 -4
- package/dist/{AutosaveIndicator-Bed0-ekg.mjs → AutosaveIndicator-BEvABoKU.mjs} +1 -1
- package/dist/AutosaveIndicator-DiyeAg93.js +1 -0
- package/dist/CedrosContext-5Gjveoba.mjs +2555 -0
- package/dist/CedrosContext-CCakH2SZ.js +3 -0
- package/dist/CedrosPayAdminDashboard-CAwEvn66.js +1 -0
- package/dist/CedrosPayAdminDashboard-CBuvNAtB.mjs +250 -0
- package/dist/{ChatLogsSection-v4zwzCTC.mjs → ChatLogsSection-Ber5o8hF.mjs} +19 -17
- package/dist/ChatLogsSection-DLxMMi9I.js +1 -0
- package/dist/ComplianceSection-Buu0zTiL.js +1 -0
- package/dist/{ComplianceSection-CemgfDrL.mjs → ComplianceSection-ZCr0wsvw.mjs} +18 -15
- package/dist/{CryptoButton-BV9owVe2.mjs → CryptoButton-Cl2kZbOP.mjs} +26 -24
- package/dist/CryptoButton-DxFCYDlJ.js +1 -0
- package/dist/CustomersSection-BywmMLur.js +1 -0
- package/dist/{CustomersSection-D_j7OrfS.mjs → CustomersSection-D9UknSKC.mjs} +21 -19
- package/dist/{DisputesSection-BcAbXp3K.mjs → DisputesSection-C_eySK-W.mjs} +19 -17
- package/dist/DisputesSection-DwkHGv2a.js +1 -0
- package/dist/Dropdown-B90Zabxr.mjs +111 -0
- package/dist/Dropdown-CtY91emj.js +1 -0
- package/dist/ErrorBanner-CZXsHi3H.mjs +22 -0
- package/dist/ErrorBanner-Cx2dUhps.js +1 -0
- package/dist/{FAQSection-Dn38OhB_.mjs → FAQSection-Bv_Hdt8B.mjs} +8 -6
- package/dist/FAQSection-DlPLnIJD.js +1 -0
- package/dist/ImagesSection-B4Jzet79.js +1 -0
- package/dist/{ImagesSection-Ctw9Icym.mjs → ImagesSection-DpdXQ6qu.mjs} +6 -4
- package/dist/InventorySection-BgRdpn1l.js +1 -0
- package/dist/{InventorySection-DmhjUlRZ.mjs → InventorySection-DZMu9DMw.mjs} +25 -23
- package/dist/MessagingSection-CxV-pf-f.js +1 -0
- package/dist/{MessagingSection-B1FaGxkp.mjs → MessagingSection-D_cOBfFt.mjs} +5 -4
- package/dist/OrdersSection-BbAX79Ff.js +1 -0
- package/dist/{OrdersSection-Bj8bPdg8.mjs → OrdersSection-wfPavit9.mjs} +27 -24
- package/dist/PaymentSettingsSection-BdBDgaRg.js +1 -0
- package/dist/PaymentSettingsSection-DunzBo9n.mjs +648 -0
- package/dist/ReturnsSection-7k4LZ8yp.js +1 -0
- package/dist/{ReturnsSection-BC0L8r2e.mjs → ReturnsSection-B4FL7bUv.mjs} +11 -9
- package/dist/{SettingsSection-vdYFSNxB.js → SettingsSection-Cz2Yjdhr.js} +1 -1
- package/dist/{SettingsSection-KYdEizq_.mjs → SettingsSection-DoeNDbqd.mjs} +1 -1
- package/dist/{ShippingSection-BOgto6_9.mjs → ShippingSection-BlVsYC6B.mjs} +5 -3
- package/dist/ShippingSection-C-HI8rOb.js +1 -0
- package/dist/{SingleCategorySettings-suJ8z9d8.mjs → SingleCategorySettings-B406nnF-.mjs} +143 -140
- package/dist/SingleCategorySettings-BqC2UXt3.js +3 -0
- package/dist/StatsBar-D4v-I_Dj.mjs +25 -0
- package/dist/StatsBar-m6GSRNxs.js +1 -0
- package/dist/StorefrontSection-Axvh_KeS.js +1 -0
- package/dist/{StorefrontSection-BRvIGBEJ.mjs → StorefrontSection-BK_rhrAi.mjs} +121 -119
- package/dist/{SubscriptionsSection-D60qrX9a.mjs → SubscriptionsSection-D8V9RBv-.mjs} +11 -9
- package/dist/SubscriptionsSection-EeULMWIB.js +1 -0
- package/dist/{TaxSection-C7-pv-Rl.mjs → TaxSection-Cj6TXL6x.mjs} +23 -21
- package/dist/TaxSection-CzHPhaHl.js +1 -0
- package/dist/ThemeContext-CFXyYx7A.js +1 -0
- package/dist/ThemeContext-l0bqcOGW.mjs +126 -0
- package/dist/Token22Section-DqRKVG_G.js +1 -0
- package/dist/{Token22Section-CrHLQ0EB.mjs → Token22Section-DtYAcT54.mjs} +7 -6
- package/dist/{WalletManager-BIwH8Dw_.mjs → WalletManager-D-eoqUDy.mjs} +21 -19
- package/dist/WalletManager-DXChB9LA.js +1 -0
- package/dist/WebhooksSection-D--iPZuM.js +1 -0
- package/dist/{WebhooksSection-COPW4Ec0.mjs → WebhooksSection-DBAIxtBy.mjs} +40 -38
- package/dist/admin.d.ts +2 -0
- package/dist/admin.js +1 -0
- package/dist/admin.mjs +8 -0
- package/dist/configApi-BS5UJfzm.js +1 -0
- package/dist/{configApi-6XhAJGKX.mjs → configApi-BUXZOMWK.mjs} +57 -3
- package/dist/crypto-only.js +1 -1
- package/dist/crypto-only.mjs +214 -202
- package/dist/dateHelpers-BKW_lGND.js +1 -0
- package/dist/dateHelpers-yvPkofYQ.mjs +6 -0
- package/dist/fetchWithTimeout-CG0EKbhf.js +1 -0
- package/dist/fetchWithTimeout-DmMOwL0Q.mjs +195 -0
- package/dist/index-9QF_UfSN.mjs +18668 -0
- package/dist/index-Cq9ya93W.js +84 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +74 -64
- package/dist/safeHref-DqJPLPl5.mjs +12 -0
- package/dist/safeHref-DyHIpVjY.js +1 -0
- package/dist/sectionIds-B_tFiNvF.js +1 -0
- package/dist/sectionIds-DBavltrL.mjs +359 -0
- package/dist/sections-BHph7CYj.mjs +9 -0
- package/dist/sections-C2zEJr5G.js +1 -0
- package/dist/sections-more-C1VNVwkp.js +1 -0
- package/dist/sections-more-CMFgfU4d.mjs +3082 -0
- package/dist/src/admin/index.d.ts +3 -3
- package/dist/src/admin/index.d.ts.map +1 -1
- package/dist/src/admin/plugin.d.ts.map +1 -1
- package/dist/src/admin/types.d.ts +2 -6
- package/dist/src/admin/types.d.ts.map +1 -1
- package/dist/src/admin.d.ts +9 -0
- package/dist/src/admin.d.ts.map +1 -0
- package/dist/src/components/admin/LazyCedrosPayAdminDashboard.d.ts +4 -0
- package/dist/src/components/admin/LazyCedrosPayAdminDashboard.d.ts.map +1 -0
- package/dist/src/components/admin/PaymentReadinessChecklist.d.ts +9 -0
- package/dist/src/components/admin/PaymentReadinessChecklist.d.ts.map +1 -0
- package/dist/src/components/admin/PaymentSettingsSection.d.ts.map +1 -1
- package/dist/src/components/admin/PaymentSetupGuide.d.ts +6 -0
- package/dist/src/components/admin/PaymentSetupGuide.d.ts.map +1 -0
- package/dist/src/components/admin/ProductsSection.d.ts.map +1 -1
- package/dist/src/components/admin/configApi.d.ts +1 -1
- package/dist/src/components/admin/configApi.d.ts.map +1 -1
- package/dist/src/components/admin/icons.d.ts +3 -50
- package/dist/src/components/admin/icons.d.ts.map +1 -1
- package/dist/src/components/admin/index.d.ts +1 -1
- package/dist/src/components/admin/index.d.ts.map +1 -1
- package/dist/src/components/admin/types.d.ts +43 -0
- package/dist/src/components/admin/types.d.ts.map +1 -1
- package/dist/src/context/CedrosContext.d.ts +2 -0
- package/dist/src/context/CedrosContext.d.ts.map +1 -1
- package/dist/src/ecommerce/__tests__/featureFlags.test.d.ts +2 -0
- package/dist/src/ecommerce/__tests__/featureFlags.test.d.ts.map +1 -0
- package/dist/src/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +1 -1
- package/dist/src/ecommerce/components/general/ErrorBoundary.d.ts +1 -1
- package/dist/src/ecommerce/components/ui/button.d.ts +1 -1
- package/dist/src/ecommerce/components/ui/sheet.d.ts +1 -1
- package/dist/src/ecommerce/config/context.d.ts +2 -0
- package/dist/src/ecommerce/config/context.d.ts.map +1 -1
- package/dist/src/ecommerce/config/types.d.ts +2 -0
- package/dist/src/ecommerce/config/types.d.ts.map +1 -1
- package/dist/src/ecommerce/index.d.ts +2 -0
- package/dist/src/ecommerce/index.d.ts.map +1 -1
- package/dist/src/featureFlags.d.ts +41 -0
- package/dist/src/featureFlags.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/managers/StripeManager.d.ts.map +1 -1
- package/dist/src/managers/SubscriptionManager.d.ts +1 -0
- package/dist/src/managers/SubscriptionManager.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +14 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/subscription.d.ts +47 -1
- package/dist/src/types/subscription.d.ts.map +1 -1
- package/dist/src/utils/validateConfig.d.ts.map +1 -1
- package/dist/stripe-only.js +1 -1
- package/dist/stripe-only.mjs +35 -33
- package/dist/styles--fxb3lCl.js +1 -0
- package/dist/{styles-D4SQkuV3.mjs → styles-DGagylUj.mjs} +53 -51
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.mjs +1 -1
- package/dist/tokenMintValidator-DAjQld0r.mjs +98 -0
- package/dist/tokenMintValidator-DNBhoefh.js +4 -0
- package/dist/{walletPool-DE-t1wSW.mjs → walletPool-9MylB2QK.mjs} +1 -1
- package/dist/walletPool-BjTXX6Vn.js +1 -0
- package/package.json +6 -5
- package/dist/AutosaveIndicator-Dn_qA2hK.js +0 -1
- package/dist/CedrosContext-C2RjHLaQ.js +0 -6
- package/dist/CedrosContext-CY6zvjvJ.mjs +0 -2801
- package/dist/ChatLogsSection-BH5tLA4T.js +0 -1
- package/dist/ComplianceSection-DP2a9-S0.js +0 -1
- package/dist/CryptoButton-DpiCnyXE.js +0 -1
- package/dist/CustomersSection-CBwy_waO.js +0 -1
- package/dist/DisputesSection-BLjIk60n.js +0 -1
- package/dist/FAQSection-wNeH0i6Q.js +0 -1
- package/dist/ImagesSection-0ZzKlzMJ.js +0 -1
- package/dist/InventorySection-zV6lTmue.js +0 -1
- package/dist/MessagingSection-B_wdFR0j.js +0 -1
- package/dist/OrdersSection-Dw2FX-1d.js +0 -1
- package/dist/PaymentSettingsSection-BYF4D-GR.js +0 -1
- package/dist/PaymentSettingsSection-EnMxeWjv.mjs +0 -94
- package/dist/ReturnsSection-D_pJVxuG.js +0 -1
- package/dist/ShippingSection-1DRSTu49.js +0 -1
- package/dist/SingleCategorySettings-DwCnBdRf.js +0 -3
- package/dist/StorefrontSection-RumGkb3C.js +0 -1
- package/dist/SubscriptionsSection-C2aLLn7L.js +0 -1
- package/dist/TaxSection-Dt1DnM51.js +0 -1
- package/dist/Token22Section-DY3mUwTY.js +0 -1
- package/dist/WalletManager-B3UdQ5pQ.js +0 -1
- package/dist/WebhooksSection-CKeiJ7Py.js +0 -1
- package/dist/configApi-DkduMQg1.js +0 -1
- package/dist/index-C0g-JxJk.js +0 -84
- package/dist/index-DXnuQp5x.mjs +0 -22128
- package/dist/sections-C1NpK7hk.mjs +0 -9
- package/dist/sections-DVVSZBhW.js +0 -1
- package/dist/styles-BT4bhFey.js +0 -1
- package/dist/walletPool-IS7R3MR1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(t){return new Date(t).toLocaleString()}exports.formatDateTime=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const _="3.7.8",$=_,l=typeof Buffer=="function",m=typeof TextDecoder=="function"?new TextDecoder:void 0,E=typeof TextEncoder=="function"?new TextEncoder:void 0,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=Array.prototype.slice.call(L),d=(t=>{let e={};return t.forEach((r,o)=>e[r]=o),e})(u),V=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,i=String.fromCharCode.bind(String),B=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),w=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),R=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),F=t=>{let e,r,o,n,s="";const f=t.length%3;for(let a=0;a<t.length;){if((r=t.charCodeAt(a++))>255||(o=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|o<<8|n,s+=u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[e&63]}return f?s.slice(0,f-3)+"===".substring(f):s},A=typeof btoa=="function"?t=>btoa(t):l?t=>Buffer.from(t,"binary").toString("base64"):F,g=l?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let o=0,n=t.length;o<n;o+=4096)r.push(i.apply(null,t.subarray(o,o+4096)));return A(r.join(""))},h=(t,e=!1)=>e?w(g(t)):g(t),W=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?i(192|e>>>6)+i(128|e&63):i(224|e>>>12&15)+i(128|e>>>6&63)+i(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return i(240|e>>>18&7)+i(128|e>>>12&63)+i(128|e>>>6&63)+i(128|e&63)}},j=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,D=t=>t.replace(j,W),U=l?t=>Buffer.from(t,"utf8").toString("base64"):E?t=>g(E.encode(t)):t=>A(D(t)),c=(t,e=!1)=>e?w(U(t)):U(t),C=t=>c(t,!0),G=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,H=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return i((r>>>10)+55296)+i((r&1023)+56320);case 3:return i((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return i((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},S=t=>t.replace(G,H),T=t=>{if(t=t.replace(/\s+/g,""),!V.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r,o,n=[];for(let s=0;s<t.length;)e=d[t.charAt(s++)]<<18|d[t.charAt(s++)]<<12|(r=d[t.charAt(s++)])<<6|(o=d[t.charAt(s++)]),r===64?n.push(i(e>>16&255)):o===64?n.push(i(e>>16&255,e>>8&255)):n.push(i(e>>16&255,e>>8&255,e&255));return n.join("")},p=typeof atob=="function"?t=>atob(R(t)):l?t=>Buffer.from(t,"base64").toString("binary"):T,v=l?t=>B(Buffer.from(t,"base64")):t=>B(p(t).split("").map(e=>e.charCodeAt(0))),I=t=>v(O(t)),M=l?t=>Buffer.from(t,"base64").toString("utf8"):m?t=>m.decode(v(t)):t=>S(p(t)),O=t=>R(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),b=t=>M(O(t)),k=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},N=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),P=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,N(r));t("fromBase64",function(){return b(this)}),t("toBase64",function(e){return c(this,e)}),t("toBase64URI",function(){return c(this,!0)}),t("toBase64URL",function(){return c(this,!0)}),t("toUint8Array",function(){return I(this)})},z=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,N(r));t("toBase64",function(e){return h(this,e)}),t("toBase64URI",function(){return h(this,!0)}),t("toBase64URL",function(){return h(this,!0)})},q=()=>{P(),z()},J={version:_,VERSION:$,atob:p,atobPolyfill:T,btoa:A,btoaPolyfill:F,fromBase64:b,toBase64:c,encode:c,encodeURI:C,encodeURL:C,utob:D,btou:S,decode:b,isValid:k,fromUint8Array:h,toUint8Array:I,extendString:P,extendUint8Array:z,extendBuiltins:q};var Z=(t=>(t[t.DEBUG=0]="DEBUG",t[t.INFO=1]="INFO",t[t.WARN=2]="WARN",t[t.ERROR=3]="ERROR",t[t.SILENT=4]="SILENT",t))(Z||{});class y{config;constructor(e){this.config=e}setLevel(e){this.config.level=e}getLevel(){return this.config.level}debug(...e){this.config.level<=0&&this.log("DEBUG",console.log,e)}info(...e){this.config.level<=1&&this.log("INFO",console.info,e)}warn(...e){this.config.level<=2&&this.log("WARN",console.warn,e)}error(...e){this.config.level<=3&&this.log("ERROR",console.error,e)}log(e,r,o){const n=this.config.prefix?`${this.config.prefix} `:"",s=new Date().toISOString();r(`[${s}] ${n}[${e}]`,...o)}}const K=()=>typeof process<"u"&&process.env.NODE_ENV==="development"?0:2;let x=null;function Q(){return x||(x=new y({level:K(),prefix:"[CedrosPay]"})),x}function X(t){x=t}function Y(t){return new y(t)}const tt=15e3;async function et(t,e={},r=tt){const o=new AbortController,n=e.signal;if(n?.aborted)throw o.abort(),new DOMException("The operation was aborted","AbortError");const s=setTimeout(()=>o.abort(),r);let f=null;n&&(f=()=>o.abort(),n.addEventListener("abort",f));try{return await fetch(t,{...e,signal:o.signal})}catch(a){throw a instanceof Error&&a.name==="AbortError"?n?.aborted?a:new Error(`Request timeout after ${r}ms`):a}finally{clearTimeout(s),n&&f&&n.removeEventListener("abort",f)}}exports.LogLevel=Z;exports.Logger=y;exports.createLogger=Y;exports.fetchWithTimeout=et;exports.gBase64=J;exports.getLogger=Q;exports.setLogger=X;
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
const C = "3.7.8", Z = C, l = typeof Buffer == "function", y = typeof TextDecoder == "function" ? new TextDecoder() : void 0, m = typeof TextEncoder == "function" ? new TextEncoder() : void 0, $ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", u = Array.prototype.slice.call($), d = ((t) => {
|
|
2
|
+
let e = {};
|
|
3
|
+
return t.forEach((r, o) => e[r] = o), e;
|
|
4
|
+
})(u), V = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, a = String.fromCharCode.bind(String), E = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (t) => new Uint8Array(Array.prototype.slice.call(t, 0)), _ = (t) => t.replace(/=/g, "").replace(/[+\/]/g, (e) => e == "+" ? "-" : "_"), w = (t) => t.replace(/[^A-Za-z0-9\+\/]/g, ""), R = (t) => {
|
|
5
|
+
let e, r, o, n, s = "";
|
|
6
|
+
const f = t.length % 3;
|
|
7
|
+
for (let i = 0; i < t.length; ) {
|
|
8
|
+
if ((r = t.charCodeAt(i++)) > 255 || (o = t.charCodeAt(i++)) > 255 || (n = t.charCodeAt(i++)) > 255)
|
|
9
|
+
throw new TypeError("invalid character found");
|
|
10
|
+
e = r << 16 | o << 8 | n, s += u[e >> 18 & 63] + u[e >> 12 & 63] + u[e >> 6 & 63] + u[e & 63];
|
|
11
|
+
}
|
|
12
|
+
return f ? s.slice(0, f - 3) + "===".substring(f) : s;
|
|
13
|
+
}, A = typeof btoa == "function" ? (t) => btoa(t) : l ? (t) => Buffer.from(t, "binary").toString("base64") : R, g = l ? (t) => Buffer.from(t).toString("base64") : (t) => {
|
|
14
|
+
let r = [];
|
|
15
|
+
for (let o = 0, n = t.length; o < n; o += 4096)
|
|
16
|
+
r.push(a.apply(null, t.subarray(o, o + 4096)));
|
|
17
|
+
return A(r.join(""));
|
|
18
|
+
}, x = (t, e = !1) => e ? _(g(t)) : g(t), j = (t) => {
|
|
19
|
+
if (t.length < 2) {
|
|
20
|
+
var e = t.charCodeAt(0);
|
|
21
|
+
return e < 128 ? t : e < 2048 ? a(192 | e >>> 6) + a(128 | e & 63) : a(224 | e >>> 12 & 15) + a(128 | e >>> 6 & 63) + a(128 | e & 63);
|
|
22
|
+
} else {
|
|
23
|
+
var e = 65536 + (t.charCodeAt(0) - 55296) * 1024 + (t.charCodeAt(1) - 56320);
|
|
24
|
+
return a(240 | e >>> 18 & 7) + a(128 | e >>> 12 & 63) + a(128 | e >>> 6 & 63) + a(128 | e & 63);
|
|
25
|
+
}
|
|
26
|
+
}, W = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, F = (t) => t.replace(W, j), U = l ? (t) => Buffer.from(t, "utf8").toString("base64") : m ? (t) => g(m.encode(t)) : (t) => A(F(t)), c = (t, e = !1) => e ? _(U(t)) : U(t), B = (t) => c(t, !0), G = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, H = (t) => {
|
|
27
|
+
switch (t.length) {
|
|
28
|
+
case 4:
|
|
29
|
+
var e = (7 & t.charCodeAt(0)) << 18 | (63 & t.charCodeAt(1)) << 12 | (63 & t.charCodeAt(2)) << 6 | 63 & t.charCodeAt(3), r = e - 65536;
|
|
30
|
+
return a((r >>> 10) + 55296) + a((r & 1023) + 56320);
|
|
31
|
+
case 3:
|
|
32
|
+
return a((15 & t.charCodeAt(0)) << 12 | (63 & t.charCodeAt(1)) << 6 | 63 & t.charCodeAt(2));
|
|
33
|
+
default:
|
|
34
|
+
return a((31 & t.charCodeAt(0)) << 6 | 63 & t.charCodeAt(1));
|
|
35
|
+
}
|
|
36
|
+
}, D = (t) => t.replace(G, H), S = (t) => {
|
|
37
|
+
if (t = t.replace(/\s+/g, ""), !V.test(t))
|
|
38
|
+
throw new TypeError("malformed base64.");
|
|
39
|
+
t += "==".slice(2 - (t.length & 3));
|
|
40
|
+
let e, r, o, n = [];
|
|
41
|
+
for (let s = 0; s < t.length; )
|
|
42
|
+
e = d[t.charAt(s++)] << 18 | d[t.charAt(s++)] << 12 | (r = d[t.charAt(s++)]) << 6 | (o = d[t.charAt(s++)]), r === 64 ? n.push(a(e >> 16 & 255)) : o === 64 ? n.push(a(e >> 16 & 255, e >> 8 & 255)) : n.push(a(e >> 16 & 255, e >> 8 & 255, e & 255));
|
|
43
|
+
return n.join("");
|
|
44
|
+
}, p = typeof atob == "function" ? (t) => atob(w(t)) : l ? (t) => Buffer.from(t, "base64").toString("binary") : S, T = l ? (t) => E(Buffer.from(t, "base64")) : (t) => E(p(t).split("").map((e) => e.charCodeAt(0))), I = (t) => T(v(t)), M = l ? (t) => Buffer.from(t, "base64").toString("utf8") : y ? (t) => y.decode(T(t)) : (t) => D(p(t)), v = (t) => w(t.replace(/[-_]/g, (e) => e == "-" ? "+" : "/")), b = (t) => M(v(t)), k = (t) => {
|
|
45
|
+
if (typeof t != "string")
|
|
46
|
+
return !1;
|
|
47
|
+
const e = t.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
|
48
|
+
return !/[^\s0-9a-zA-Z\+/]/.test(e) || !/[^\s0-9a-zA-Z\-_]/.test(e);
|
|
49
|
+
}, O = (t) => ({
|
|
50
|
+
value: t,
|
|
51
|
+
enumerable: !1,
|
|
52
|
+
writable: !0,
|
|
53
|
+
configurable: !0
|
|
54
|
+
}), N = function() {
|
|
55
|
+
const t = (e, r) => Object.defineProperty(String.prototype, e, O(r));
|
|
56
|
+
t("fromBase64", function() {
|
|
57
|
+
return b(this);
|
|
58
|
+
}), t("toBase64", function(e) {
|
|
59
|
+
return c(this, e);
|
|
60
|
+
}), t("toBase64URI", function() {
|
|
61
|
+
return c(this, !0);
|
|
62
|
+
}), t("toBase64URL", function() {
|
|
63
|
+
return c(this, !0);
|
|
64
|
+
}), t("toUint8Array", function() {
|
|
65
|
+
return I(this);
|
|
66
|
+
});
|
|
67
|
+
}, P = function() {
|
|
68
|
+
const t = (e, r) => Object.defineProperty(Uint8Array.prototype, e, O(r));
|
|
69
|
+
t("toBase64", function(e) {
|
|
70
|
+
return x(this, e);
|
|
71
|
+
}), t("toBase64URI", function() {
|
|
72
|
+
return x(this, !0);
|
|
73
|
+
}), t("toBase64URL", function() {
|
|
74
|
+
return x(this, !0);
|
|
75
|
+
});
|
|
76
|
+
}, q = () => {
|
|
77
|
+
N(), P();
|
|
78
|
+
}, Q = {
|
|
79
|
+
version: C,
|
|
80
|
+
VERSION: Z,
|
|
81
|
+
atob: p,
|
|
82
|
+
atobPolyfill: S,
|
|
83
|
+
btoa: A,
|
|
84
|
+
btoaPolyfill: R,
|
|
85
|
+
fromBase64: b,
|
|
86
|
+
toBase64: c,
|
|
87
|
+
encode: c,
|
|
88
|
+
encodeURI: B,
|
|
89
|
+
encodeURL: B,
|
|
90
|
+
utob: F,
|
|
91
|
+
btou: D,
|
|
92
|
+
decode: b,
|
|
93
|
+
isValid: k,
|
|
94
|
+
fromUint8Array: x,
|
|
95
|
+
toUint8Array: I,
|
|
96
|
+
extendString: N,
|
|
97
|
+
extendUint8Array: P,
|
|
98
|
+
extendBuiltins: q
|
|
99
|
+
};
|
|
100
|
+
var J = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.SILENT = 4] = "SILENT", t))(J || {});
|
|
101
|
+
class z {
|
|
102
|
+
config;
|
|
103
|
+
constructor(e) {
|
|
104
|
+
this.config = e;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Update the log level dynamically
|
|
108
|
+
*/
|
|
109
|
+
setLevel(e) {
|
|
110
|
+
this.config.level = e;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get the current log level
|
|
114
|
+
*/
|
|
115
|
+
getLevel() {
|
|
116
|
+
return this.config.level;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Debug-level logging (most verbose)
|
|
120
|
+
* Use for detailed debugging information
|
|
121
|
+
*/
|
|
122
|
+
debug(...e) {
|
|
123
|
+
this.config.level <= 0 && this.log("DEBUG", console.log, e);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Info-level logging
|
|
127
|
+
* Use for general informational messages
|
|
128
|
+
*/
|
|
129
|
+
info(...e) {
|
|
130
|
+
this.config.level <= 1 && this.log("INFO", console.info, e);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Warning-level logging
|
|
134
|
+
* Use for potentially problematic situations
|
|
135
|
+
*/
|
|
136
|
+
warn(...e) {
|
|
137
|
+
this.config.level <= 2 && this.log("WARN", console.warn, e);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Error-level logging
|
|
141
|
+
* Use for error conditions
|
|
142
|
+
*/
|
|
143
|
+
error(...e) {
|
|
144
|
+
this.config.level <= 3 && this.log("ERROR", console.error, e);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Internal log method with formatting
|
|
148
|
+
*/
|
|
149
|
+
log(e, r, o) {
|
|
150
|
+
const n = this.config.prefix ? `${this.config.prefix} ` : "", s = (/* @__PURE__ */ new Date()).toISOString();
|
|
151
|
+
r(`[${s}] ${n}[${e}]`, ...o);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const K = () => typeof process < "u" && process.env.NODE_ENV === "development" ? 0 : 2;
|
|
155
|
+
let h = null;
|
|
156
|
+
function X() {
|
|
157
|
+
return h || (h = new z({
|
|
158
|
+
level: K(),
|
|
159
|
+
prefix: "[CedrosPay]"
|
|
160
|
+
})), h;
|
|
161
|
+
}
|
|
162
|
+
function Y(t) {
|
|
163
|
+
h = t;
|
|
164
|
+
}
|
|
165
|
+
function tt(t) {
|
|
166
|
+
return new z(t);
|
|
167
|
+
}
|
|
168
|
+
const L = 15e3;
|
|
169
|
+
async function et(t, e = {}, r = L) {
|
|
170
|
+
const o = new AbortController(), n = e.signal;
|
|
171
|
+
if (n?.aborted)
|
|
172
|
+
throw o.abort(), new DOMException("The operation was aborted", "AbortError");
|
|
173
|
+
const s = setTimeout(() => o.abort(), r);
|
|
174
|
+
let f = null;
|
|
175
|
+
n && (f = () => o.abort(), n.addEventListener("abort", f));
|
|
176
|
+
try {
|
|
177
|
+
return await fetch(t, {
|
|
178
|
+
...e,
|
|
179
|
+
signal: o.signal
|
|
180
|
+
});
|
|
181
|
+
} catch (i) {
|
|
182
|
+
throw i instanceof Error && i.name === "AbortError" ? n?.aborted ? i : new Error(`Request timeout after ${r}ms`) : i;
|
|
183
|
+
} finally {
|
|
184
|
+
clearTimeout(s), n && f && n.removeEventListener("abort", f);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
export {
|
|
188
|
+
J as L,
|
|
189
|
+
z as a,
|
|
190
|
+
Q as b,
|
|
191
|
+
tt as c,
|
|
192
|
+
et as f,
|
|
193
|
+
X as g,
|
|
194
|
+
Y as s
|
|
195
|
+
};
|