smoothly 0.3.46 → 0.3.48
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/cjs/{Listenable-f6012fc2.js → Listenable-0b92b362.js} +33 -1
- package/dist/cjs/{getLanguage-430ecf04.js → getLanguage-7e53766b.js} +1013 -915
- package/dist/cjs/{index-879bbabb.js → index-45c42c7c.js} +2 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-country.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
- package/dist/collection/components/App.js +2 -2
- package/dist/collection/components/app/index.js +1 -1
- package/dist/collection/components/country/index.js +1 -1
- package/dist/collection/components/display/index.js +2 -2
- package/dist/collection/components/display-amount/index.js +1 -1
- package/dist/collection/components/input/index.js +1 -1
- package/dist/custom-elements/index.js +1037 -907
- package/dist/esm/{Listenable-34b047d8.js → Listenable-79ce5567.js} +33 -1
- package/dist/esm/{getLanguage-cccb8418.js → getLanguage-9c833eef.js} +1013 -915
- package/dist/esm/{index-d7a4e405.js → index-9594f9bc.js} +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/smoothly-accordion_53.entry.js +4 -4
- package/dist/esm/smoothly-country.entry.js +1 -1
- package/dist/esm/smoothly-trigger-sink.entry.js +1 -1
- package/dist/esm/smoothly-trigger-source.entry.js +1 -1
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/p-03c10101.js +1 -0
- package/dist/smoothly/p-1b714a63.js +1 -0
- package/dist/smoothly/{p-41bd21da.entry.js → p-68919b0f.entry.js} +1 -1
- package/dist/smoothly/p-8f1d86ff.js +1 -0
- package/dist/smoothly/{p-6630d923.entry.js → p-bb508923.entry.js} +1 -1
- package/dist/smoothly/p-e39602bd.entry.js +1 -0
- package/dist/smoothly/{p-e7b088e6.entry.js → p-f446ca1a.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/package.json +4 -4
- package/dist/smoothly/p-5b6351f6.js +0 -1
- package/dist/smoothly/p-94e08cee.js +0 -1
- package/dist/smoothly/p-9bf79e04.entry.js +0 -1
- package/dist/smoothly/p-e6cb38de.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class t{constructor(){this.encoding="utf-8"}encode(t){return Uint8Array.from(unescape(encodeURIComponent(t)).split(""),(t=>t.charCodeAt(0)))}}const n={standard:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",url:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function e(e,r="standard",i=""){"string"==typeof e&&(e=(new t).encode(e));const s=n[r],a=[];for(let t=0;t<e.length;t+=3){const n=e[t],r=t+1<e.length?e[t+1]:0,i=t+2<e.length?e[t+2]:0;a.push(s[n>>>2]),a.push(s[(3&n)<<4|r>>>4]),a.push(s[(15&r)<<2|i>>>6]),a.push(s[63&i])}const o=Math.ceil(e.length/3*4);return a.join("").substr(0,o)+i.repeat(a.length-o)}function r(t,e="standard"){for(;t.endsWith("=")&&t.length>0;)t=t.substr(0,t.length-1);const r=n[e],i=t.split("").map((t=>r.indexOf(t))),s=new Uint8Array(Math.floor(i.length/4*3));for(let t=0;t<s.length;t+=3){const n=i.shift()||0,e=i.shift()||0,r=i.shift()||0,a=i.shift()||0;s[t]=n<<2|e>>>4,s[t+1]=(15&e)<<4|r>>>2,s[t+2]=(3&r)<<6|a}return s}const i="undefined"!=typeof window?window.crypto||window.msCrypto:self.crypto||self.msCrypto;var s,a,o,c,u,f,S,y,l,p,h,w,A,b,d,g;!function(t){t.create=function(t,n,...e){const[r,...i]=(s=e,Array.isArray(s)&&s.length>0&&"string"==typeof s[0]?e.map((t=>Object.fromEntries(t.split(",").map((t=>t.split(":",2).map((t=>t.trim()))))))):e);var s;const a=Object.assign({},...Object.entries(r).map((([t,n])=>[t,[n,...i.map((n=>n[t])).filter((t=>t))]])).map((([n,e])=>({get[n](){return Object.assign(t(e),{name:n})}}))));return{current:a[n],...a}}}(s||(s={})),function(t){t.is=function(t){return"object"==typeof t&&(null==t.key||"string"==typeof t.key)&&"string"==typeof t.value&&"string"==typeof t.salt},t.stringify=function(t){return t.key=t.key&&4!=t.key.length?t.key.slice(-2):t.key,[t.key,t.salt,t.value].join(".")},t.parse=function(n){const e=n.split("."),r={key:e[0],salt:e[1],value:e[2]};return t.is(r)?r:void 0}}(a||(a={})),function(t){function n(t){return e(t,"url")}function s(t){t.length%2==1&&(t+="0");const e=new Uint8Array(t.length/2);for(let n=0;n<e.length;n++)e[n]=16*Number.parseInt(t[2*n],16)+Number.parseInt(t[2*n+1],16);return n(e)}function a(t,n){const e=r(t,"url");let i=[];for(const t of e)i.push(Math.floor(t/16).toString(16),(t%16).toString(16));return n&&(i=i.slice(0,n)),i.join("")}t.is=function(t,n){return"string"==typeof t&&(null==n||t.length==n)&&Array.from(t).every((t=>t>="0"&&t<="9"||t>="A"&&t<="Z"||t>="a"&&t<="z"||"-"==t||"_"==t))},t.fromUint24=function(t){return s(t.toString(16).padStart(6,"0"))},t.toUint24=function(t){return Number.parseInt(a(t,6),16)},t.fromUint48=function(t){return s(t.toString(16).padStart(12,"0"))},t.toUint48=function(t){return Number.parseInt(a(t,12),16)},t.fromBinary=n,t.toBinary=function(t){return r(t,"url")},t.generate=function(t){return n(i.getRandomValues(new Uint8Array(t/4*3)))},t.fromHexadecimal=s,t.toHexadecimal=a,t.length=[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128],(t.Length||(t.Length={})).is=function(t){return"number"==typeof t&&t>=4&&t<=128&&(252&t)==t}}(o||(o={})),function(t){t.is=function(t){return"string"==typeof t||"object"==typeof t&&"string"==typeof t.hash&&"string"==typeof t.salt},t.hash=async function(t,n,r){return r||(r=e(i.getRandomValues(new Uint8Array(64)))),{hash:await t.sign(r+n),salt:r}},t.verify=async function(n,e,r){return(await t.hash(n,r,e.salt)).hash==e.hash},(t.Hashed||(t.Hashed={})).is=function(t){return"object"==typeof t&&"string"==typeof t.hash&&"string"==typeof t.salt}}(c||(c={})),function(t){t.generate=function(t){return i.getRandomValues(t)}}(u||(u={})),(f||(f={})).is=function(t){return"HMAC"==t||"RSA"==t||"ECDSA"==t||"RSA-PSS"==t};class v{async sign(n){return"string"==typeof n?e(await this.signBinary((new t).encode(n)),"url"):this.signBinary(n)}verify(n,e){return"string"==typeof e&&(e=r(e,"url")),this.verifyBinary("string"==typeof n?(new t).encode(n):n,e)}}class H extends v{constructor(t,n,e){super(),this.hash=t,n&&("string"==typeof n&&(n=r(n)),this.publicKey=i.subtle.importKey("spki",n,{name:"ECDSA",namedCurve:"P-512"==t.replace("SHA","P")?"P-521":t.replace("SHA","P")},!1,["verify"])),e&&("string"==typeof e&&(e=r(e)),this.privateKey=i.subtle.importKey("pkcs8",e,{name:"ECDSA",namedCurve:"P-512"==t.replace("SHA","P")?"P-521":t.replace("SHA","P")},!0,["sign","verify"]))}async signBinary(t){return new Uint8Array(await i.subtle.sign({name:"ECDSA",hash:{name:this.hash}},await this.privateKey,t))}async verifyBinary(t,n){return i.subtle.verify({name:"ECDSA",hash:{name:this.hash}},await this.publicKey,n,t)}}!function(t){t.is=function(t){return"SHA-1"==t||"SHA-256"==t||"SHA-384"==t||"SHA-512"==t}}(S||(S={}));class m extends v{async verifyBinary(t,n){return e(await this.signBinary(t),"url")==e(n,"url")}}class P extends m{constructor(t,n){super(),this.hash=t,"string"==typeof n&&(n=r(n,"url")),this.key=i.subtle.importKey("raw",n,{name:"HMAC",hash:{name:t}},!1,["sign","verify"])}async signBinary(t){return new Uint8Array(await i.subtle.sign("HMAC",await this.key,t))}}class E extends m{signBinary(t){return Promise.resolve(new Uint8Array(0))}}class k extends v{constructor(t,n,e){super(),this.variant=t,this.publicKey=n,this.privateKey=e}get parameters(){return j(this.variant)}async signBinary(t){return this.privateKey?new Uint8Array(await i.subtle.sign(this.parameters,await this.privateKey,t)):new Uint8Array(0)}async verifyBinary(t,n){return!!this.publicKey&&i.subtle.verify(this.parameters,await this.publicKey,n,t)}async export(t,n="base64"){const r=await("private"==t?this.privateKey:this.publicKey);let s;if(r)switch(n){case"jwk":s=await i.subtle.exportKey("jwk",r);break;case"buffer":s=await i.subtle.exportKey("private"==t?"pkcs8":"spki",r);break;case"base64":{const n=await this.export(t,"buffer");s=n&&e(new Uint8Array(n),"standard","=")}break;case"pem":{const n=await this.export(t,"base64");s=n&&[`-----BEGIN ${t.toUpperCase()} KEY-----`,...R(n,64),`-----END ${t.toUpperCase()} KEY-----`].join("\n")}}return s}static import(t,n,e,r){return new k(t,k.importHelper(t,n,"public",e),k.importHelper(t,n,"private",r))}static importHelper(t,n,e,s){return"string"==typeof s&&(s=r(s)),s&&i.subtle.importKey("private"==e?"pkcs8":"spki",s,{name:j(t).name,hash:{name:n}},!0,["private"==e?"sign":"verify"])}static generate(t,n,e){const r=i.subtle.generateKey({name:j(t).name,modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:n},!0,["sign","verify"]);return new k(t,r.then((t=>t.publicKey)),r.then((t=>t.privateKey)))}}function*R(t,n){let e=0;for(;e<t.length;)yield t.slice(e,e+=n)}function j(t){return"PSS"==t?{name:"RSA-PSS",saltLength:128}:{name:"RSASSA-PKCS1-v1_5"}}!function(t){!function(t){t.is=f.is}(t.Algorithm||(t.Algorithm={})),(t.Hash||(t.Hash={})).is=S.is,t.generate=function(t,n,e){let r;switch(t){case"RSA":r=k.generate("SSA",n,e);break;case"RSA-PSS":r=k.generate("PSS",n,e)}return r},t.create=function(t,n,...e){let r;if(null!=n)switch(t){case"HMAC":r=new P(n,e[0]);break;case"RSA":r=k.import("SSA",n,e[0],e[1]);break;case"RSA-PSS":r=k.import("PSS",n,e[0],e[1]);break;case"ECDSA":r=new H(n,e[0],e[1])}else"None"==t&&(r=new E);return r}}(y||(y={})),Uint8Array.__proto__.from||(Uint8Array.__proto__.from=function(t,n,e){const r=Uint8Array.__proto__;if("function"!=typeof this)throw new TypeError("# is not a constructor");if(this.__proto__!==r)throw new TypeError("this is not a typed array.");if("function"!=typeof(n=n||(t=>t)))throw new TypeError("specified argument is not a function");if(!(t=Object(t)).length)return new this(0);let i=[];for(const t of i)i.push(t);i=i.map(n,e);const s=new this(i.length);for(let t=0;t<s.length;t++)s[t]=i[t];return s}),function(t){t.is=function(t){return"object"==typeof t&&Object.entries(t).every((t=>"function"==typeof t))}}(l||(l={})),function(t){t.is=function(t){return Array.isArray(t)&&t.every((t=>"string"==typeof t))}}(p||(p={})),function(t){t.is=function(t){return"object"==typeof t&&Object.entries(t).every((t=>"string"==typeof t[1]))}}(h||(h={})),function(t){t.is=function(t){return p.is(t)||l.is(t)||h.is(t)},(t.Converter||(t.Converter={})).is=l.is,(t.Crypto||(t.Crypto={})).is=p.is,(t.Renamer||(t.Renamer={})).is=h.is}(w||(w={})),function(t){t.is=function(t){return"object"==typeof t&&"function"==typeof t.apply&&"function"==typeof t.reverse},t.create=function(t){return{apply:t.apply?t.apply:t=>t,reverse:t.reverse?t.reverse:t=>t}}}(A||(A={})),function(t){t.is=function(t){return"RS256"==t||"RS384"==t||"RS512"==t||"ES256"==t||"ES384"==t||"ES512"==t||"PS256"==t||"PS384"==t||"PS512"==t}}(b||(b={})),function(t){t.is=function(t){return"HS256"==t||"HS384"==t||"HS512"==t}}(d||(d={})),function(t){t.is=function(t){return"none"==t||d.is(t)||b.is(t)},function(t){t.is=d.is}(t.Symmetric||(t.Symmetric={})),(t.Asymmetric||(t.Asymmetric={})).is=b.is}(g||(g={}));var C,U;class O{constructor(t,n){this.name=t,this.signer=n}sign(t){return n=this,e=void 0,i=function*(){return this.signer.sign(t)},new((r=void 0)||(r=Promise))((function(t,s){function a(t){try{c(i.next(t))}catch(t){s(t)}}function o(t){try{c(i.throw(t))}catch(t){s(t)}}function c(n){var e;n.done?t(n.value):(e=n.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,o)}c((i=i.apply(n,e||[])).next())}));var n,e,r,i}verify(t,n){return this.signer.verify(t,n)}static create(t,...n){let e;switch(t){case"ES256":e=y.create("ECDSA","SHA-256",n[0],n[1]);break;case"ES384":e=y.create("ECDSA","SHA-384",n[0],n[1]);break;case"ES512":e=y.create("ECDSA","SHA-512",n[0],n[1]);break;case"PS256":e=y.create("RSA-PSS","SHA-256",n[0],n[1]);break;case"PS384":e=y.create("RSA-PSS","SHA-384",n[0],n[1]);break;case"PS512":e=y.create("RSA-PSS","SHA-512",n[0],n[1]);break;case"HS256":e=y.create("HMAC","SHA-256",n[0]);break;case"HS384":e=y.create("HMAC","SHA-384",n[0]);break;case"HS512":e=y.create("HMAC","SHA-512",n[0]);break;case"RS256":e=y.create("RSA","SHA-256",n[0],n[1]);break;case"RS384":e=y.create("RSA","SHA-384",n[0],n[1]);break;case"RS512":e=y.create("RSA","SHA-512",n[0],n[1]);break;case"none":e=y.create("None")}return e&&new O(t,e)}static none(){return O.create("none")}static HS256(t){return O.create("HS256",t)}static HS384(t){return O.create("HS384",t)}static HS512(t){return O.create("HS512",t)}static RS256(t,n){return O.create("RS256",t,n)}static RS384(t,n){return O.create("RS384",t,n)}static RS512(t,n){return O.create("RS512",t,n)}static ES256(t,n){return O.create("ES256",t,n)}static ES384(t,n){return O.create("ES384",t,n)}static ES512(t,n){return O.create("ES512",t,n)}static PS256(t,n){return O.create("PS256",t,n)}static PS384(t,n){return O.create("PS384",t,n)}static PS512(t,n){return O.create("PS512",t,n)}}!function(t){var n;(n=t.Name||(t.Name={})).is=g.is,function(t){t.is=g.Symmetric.is}(n.Symmetric||(n.Symmetric={})),function(t){t.is=g.Asymmetric.is}(n.Asymmetric||(n.Asymmetric={}))}(O||(O={})),function(t){t.is=function(t){return"string"==typeof t&&/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(t)}}(C||(C={})),function(t){const n={"*":"https://site-icons.pages.dev/ionicons@5.0.0/dist/svg/${name}.svg"},e={};t.load=async function(t){var r,i;const s=(null!==(r=n[t])&&void 0!==r?r:n["*"]).replace("${name}",t);return null!==(i=e[s])&&void 0!==i?i:e[s]=async function(t){const n=await globalThis.fetch(t);return n.ok?n.text():void 0}(s)},t.add=function(t,...e){for(const r of e)n[r]=t}}(U||(U={}));class M{static is(t){return"object"==typeof t&&"string"==typeof t.destination&&null!=t.content}static send(t,n,e){if(M.is(t)&&null==e){(e=n)||(e=window);const r=t.destination.split("#",2);e.postMessage(t={destination:r[1],content:t.content},r[0])}else"string"!=typeof e&&(e||(e=window),"string"==typeof t&&M.send({destination:t,content:n},e))}static listen(t,n,e){const r=t.split("#",2);let i="";2==r.length&&(t=r[0],i=r[1]),(e||window).addEventListener("message",(e=>{const r=e.data;!M.is(r)||"*"!=t&&e.origin!=t||""!=i&&r.destination!=i||n(r.destination,r.content)}))}}class D{static is(t){return"object"==typeof t&&"string"==typeof t.name}}var x,B=function(t,n,e,r){if("a"===e&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?r:"a"===e?r.call(t):r?r.value:n.get(t)};class N{constructor(){x.set(this,{})}listen(t,n){var e,r;null!==(r=null===(e=B(this,x,"f")[t])||void 0===e?void 0:e.push(n))&&void 0!==r||(B(this,x,"f")[t]=[n]),n(this[t])}unlisten(t,n){var e,r;const i=null===(e=B(this,x,"f")[t])||void 0===e?void 0:e.indexOf(n);null!=i&&i>=0&&(null===(r=B(this,x,"f")[t])||void 0===r||r.splice(i,1))}static load(t,n){const e=null!=n?n:new N;return Object.defineProperties(e,function(t){return Object.fromEntries(Object.entries(Object.assign(Object.assign({},Object.getOwnPropertyDescriptors(t)),Object.getOwnPropertyDescriptors(Object.getPrototypeOf(t)))).map((([n,r])=>[n,"function"==typeof r.value?{get:()=>t[n].bind(t)}:r.writable||r.set?{get:()=>t[n],set(r){var i;t[n]=r,null===(i=B(e,x,"f")[n])||void 0===i||i.forEach((e=>e(t[n])))}}:{get:()=>t[n].bind(t)}])))}(t))}}x=new WeakMap;export{o as I,N as L,M,D as T,U as a}
|