@everymatrix/cashier-session-expiration-modal 1.39.1 → 1.39.2
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.
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
*/function d(e,t){e.appendChild(t)}function g(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function E(e){const t=T("style");return function(e,t){d(e.head||e,t),t.sheet}(g(e),t),t.sheet}function y(e,t,n){e.insertBefore(t,n||null)}function b(e){e.parentNode&&e.parentNode.removeChild(e)}function T(e){return document.createElement(e)}function v(e){return document.createTextNode(e)}function _(){return v(" ")}function A(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function w(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function S(e,t){t=""+t,e.data!==t&&(e.data=t)}
|
|
6
6
|
// unfortunately this can't be a constant as that wouldn't be tree-shakeable
|
|
7
7
|
// so we cache the result instead
|
|
8
|
-
let N;function H(){if(void 0===N){N=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){N=!0}}return N}function
|
|
8
|
+
let N;function H(){if(void 0===N){N=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){N=!0}}return N}function L(e){const t={};for(const n of e)t[n.name]=n.value;return t}
|
|
9
9
|
// we need to store the information for multiple documents because a Svelte application could also contain iframes
|
|
10
10
|
// https://github.com/sveltejs/svelte/issues/3624
|
|
11
|
-
const
|
|
11
|
+
const C=new Map;let B,O=0;
|
|
12
12
|
// https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
13
|
-
function M(e,t,n,r,i,o,a,s=0){const l=16.666/r;let c="{\n";for(let e=0;e<=1;e+=l){const r=t+(n-t)*o(e);c+=100*e+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,h=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(u)}_${s}`,f=g(e),{stylesheet:p,rules:m}=
|
|
13
|
+
function M(e,t,n,r,i,o,a,s=0){const l=16.666/r;let c="{\n";for(let e=0;e<=1;e+=l){const r=t+(n-t)*o(e);c+=100*e+`%{${a(r,1-r)}}\n`}const u=c+`100% {${a(n,1-n)}}\n}`,h=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(u)}_${s}`,f=g(e),{stylesheet:p,rules:m}=C.get(f)||function(e,t){const n={stylesheet:E(t),rules:{}};return C.set(e,n),n}(f,e);m[h]||(m[h]=!0,p.insertRule(`@keyframes ${h} ${u}`,p.cssRules.length));const d=e.style.animation||"";return e.style.animation=`${d?`${d}, `:""}${h} ${r}ms linear ${i}ms 1 both`,O+=1,h}function R(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),O-=i,O||f((()=>{O||(C.forEach((e=>{const{ownerNode:t}=e.stylesheet;
|
|
14
14
|
// there is no ownerNode if it runs on jsdom.
|
|
15
|
-
t&&b(t)})),
|
|
15
|
+
t&&b(t)})),C.clear())})))}function P(e){B=e}function I(){if(!B)throw new Error("Function called outside component initialization");return B}
|
|
16
16
|
/**
|
|
17
17
|
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
18
18
|
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
@@ -21,7 +21,7 @@ t&&b(t)})),L.clear())})))}function P(e){B=e}function x(){if(!B)throw new Error("
|
|
|
21
21
|
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
|
22
22
|
*
|
|
23
23
|
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
24
|
-
*/const
|
|
24
|
+
*/const x=[],D=[];let U=[];const k=[],G=Promise.resolve();let $=!1;function F(e){U.push(e)}
|
|
25
25
|
// flush() calls callbacks in this order:
|
|
26
26
|
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
27
27
|
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
@@ -48,15 +48,15 @@ function V(){
|
|
|
48
48
|
if(0!==W)return;const e=B;do{
|
|
49
49
|
// first, call beforeUpdate functions
|
|
50
50
|
// and update components
|
|
51
|
-
try{for(;W<
|
|
51
|
+
try{for(;W<x.length;){const e=x[W];W++,P(e),X(e.$$)}}catch(e){
|
|
52
52
|
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
53
|
-
throw
|
|
53
|
+
throw x.length=0,W=0,e}for(P(null),x.length=0,W=0;D.length;)D.pop()();
|
|
54
54
|
// then, once components are updated, call
|
|
55
55
|
// afterUpdate functions. This may cause
|
|
56
56
|
// subsequent updates...
|
|
57
57
|
for(let e=0;e<U.length;e+=1){const t=U[e];j.has(t)||(
|
|
58
58
|
// ...so guard against infinite loops
|
|
59
|
-
j.add(t),t())}U.length=0}while(
|
|
59
|
+
j.add(t),t())}U.length=0}while(x.length);for(;k.length;)k.pop()();$=!1,j.clear(),P(e)}function X(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(F)}}
|
|
60
60
|
/**
|
|
61
61
|
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
62
62
|
*/function Y(e,t,n){e.dispatchEvent(function(e,t,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,r,t),i}(`${t?"intro":"outro"}${n}`))}const K=new Set;let Z;function q(e,t){e&&e.i&&(K.delete(e),e.i(t))}function J(e,t,n,r){if(e&&e.o){if(K.has(e))return;K.add(e),Z.c.push((()=>{K.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}const Q={duration:0};function ee(n,r,a,s){const l={direction:"both"};let c=r(n,a,l),u=s?0:1,d=null,g=null,E=null;function y(){E&&R(n,E)}function b(e,t){const n=e.b-u;return t*=Math.abs(n),{a:u,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function T(r){const{delay:o=0,duration:a=300,easing:s=t,tick:l=e,css:T}=c||Q,v={start:h()+o,b:r};r||(
|
|
@@ -75,7 +75,7 @@ y():
|
|
|
75
75
|
c=c(l),T(e)})):T(e)},end(){y(),d=g=null}}}function te(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];U.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),U=t}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(t),
|
|
76
76
|
// TODO null out other refs, including component.$$ (but need to
|
|
77
77
|
// preserve final state?)
|
|
78
|
-
n.on_destroy=n.fragment=null,n.ctx=[])}function ne(e,t){-1===e.$$.dirty[0]&&(
|
|
78
|
+
n.on_destroy=n.fragment=null,n.ctx=[])}function ne(e,t){-1===e.$$.dirty[0]&&(x.push(e),$||($=!0,G.then(V)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function re(t,a,s,l,c,u,h,f=[-1]){const p=B;P(t);const m=t.$$={fragment:null,ctx:[],
|
|
79
79
|
// state
|
|
80
80
|
props:u,update:e,not_equal:c,bound:r(),
|
|
81
81
|
// lifecycle
|
|
@@ -130,7 +130,7 @@ n.cloneUnlessOtherwiseSpecified=he;var r=Array.isArray(t);return r===Array.isArr
|
|
|
130
130
|
/**
|
|
131
131
|
* Type Guards
|
|
132
132
|
*/
|
|
133
|
-
function Se(e){return e.type===ve.literal}function Ne(e){return e.type===ve.argument}function He(e){return e.type===ve.number}function
|
|
133
|
+
function Se(e){return e.type===ve.literal}function Ne(e){return e.type===ve.argument}function He(e){return e.type===ve.number}function Le(e){return e.type===ve.date}function Ce(e){return e.type===ve.time}function Be(e){return e.type===ve.select}function Oe(e){return e.type===ve.plural}function Me(e){return e.type===ve.pound}function Re(e){return e.type===ve.tag}function Pe(e){return!(!e||"object"!=typeof e||e.type!==_e.number)}function Ie(e){return!(!e||"object"!=typeof e||e.type!==_e.dateTime)}
|
|
134
134
|
// @generated from regex-gen.ts
|
|
135
135
|
"function"==typeof SuppressedError&&SuppressedError,function(e){
|
|
136
136
|
/** Argument is unclosed (e.g. `{0`) */
|
|
@@ -229,7 +229,7 @@ e[e.pound=7]="pound",
|
|
|
229
229
|
/**
|
|
230
230
|
* XML-like tag
|
|
231
231
|
*/
|
|
232
|
-
e[e.tag=8]="tag"}(ve||(ve={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(_e||(_e={}));var
|
|
232
|
+
e[e.tag=8]="tag"}(ve||(ve={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(_e||(_e={}));var xe=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,De=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
233
233
|
/**
|
|
234
234
|
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
235
235
|
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
@@ -322,7 +322,7 @@ e.hourCycles.length&&(
|
|
|
322
322
|
// @ts-ignore
|
|
323
323
|
t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
324
324
|
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
325
|
-
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(Ze[n||""]||Ze[r||""]||Ze["".concat(r,"-001")]||Ze["001"])[0]}var Je=new RegExp("^".concat(
|
|
325
|
+
var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(Ze[n||""]||Ze[r||""]||Ze["".concat(r,"-001")]||Ze["001"])[0]}var Je=new RegExp("^".concat(xe.source,"*")),Qe=new RegExp("".concat(xe.source,"*$"));function et(e,t){return{start:e,end:t}}
|
|
326
326
|
// #region Ponyfills
|
|
327
327
|
// Consolidate these variables up top for easier toggling during debugging
|
|
328
328
|
var tt=!!String.prototype.startsWith,nt=!!String.fromCodePoint,rt=!!Object.fromEntries,it=!!String.prototype.codePointAt,ot=!!String.prototype.trimStart,at=!!String.prototype.trimEnd,st=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},lt=!0;try{
|
|
@@ -539,7 +539,7 @@ function Tt(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||
|
|
|
539
539
|
/**
|
|
540
540
|
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
541
541
|
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
542
|
-
*/function vt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function _t(e){e.forEach((function(e){if(delete e.location,Be(e)||Oe(e))for(var t in e.options)delete e.options[t].location,_t(e.options[t].value);else He(e)&&Pe(e.style)||(
|
|
542
|
+
*/function vt(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function _t(e){e.forEach((function(e){if(delete e.location,Be(e)||Oe(e))for(var t in e.options)delete e.options[t].location,_t(e.options[t].value);else He(e)&&Pe(e.style)||(Le(e)||Ce(e))&&Ie(e.style)?delete e.style.location:Re(e)&&_t(e.children)}))}function At(e,t){void 0===t&&(t={}),t=Ae({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new yt(e,t).parse();if(n.err){var r=SyntaxError(Te[n.err.kind]);
|
|
543
543
|
// @ts-expect-error Assign to error object
|
|
544
544
|
throw r.location=n.err.location,
|
|
545
545
|
// @ts-expect-error Assign to error object
|
|
@@ -547,13 +547,13 @@ r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||_t(n
|
|
|
547
547
|
|
|
548
548
|
// Main
|
|
549
549
|
|
|
550
|
-
function wt(e,t){var n=t&&t.cache?t.cache:Mt,r=t&&t.serializer?t.serializer:
|
|
550
|
+
function wt(e,t){var n=t&&t.cache?t.cache:Mt,r=t&&t.serializer?t.serializer:Ct;return(t&&t.strategy?t.strategy:Lt)(e,{cache:n,serializer:r})}
|
|
551
551
|
|
|
552
552
|
// Strategy
|
|
553
553
|
|
|
554
|
-
function St(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function Nt(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function Ht(e,t,n,r,i){return n.bind(t,e,r,i)}function
|
|
554
|
+
function St(e,t,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=t.get(o);return void 0===a&&(a=e.call(this,r),t.set(o,a)),a}function Nt(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function Ht(e,t,n,r,i){return n.bind(t,e,r,i)}function Lt(e,t){return Ht(e,this,1===e.length?St:Nt,t.cache.create(),t.serializer)}
|
|
555
555
|
// Serializer
|
|
556
|
-
var
|
|
556
|
+
var Ct=function(){return JSON.stringify(arguments)};
|
|
557
557
|
|
|
558
558
|
// Cache
|
|
559
559
|
|
|
@@ -565,7 +565,7 @@ e.MISSING_VALUE="MISSING_VALUE",
|
|
|
565
565
|
// When value supplied is invalid
|
|
566
566
|
e.INVALID_VALUE="INVALID_VALUE",
|
|
567
567
|
// When we need specific Intl API but it's not available
|
|
568
|
-
e.MISSING_INTL_API="MISSING_INTL_API"}(Ot||(Ot={}));var Pt,
|
|
568
|
+
e.MISSING_INTL_API="MISSING_INTL_API"}(Ot||(Ot={}));var Pt,It=/** @class */function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return be(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),xt=/** @class */function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Ot.INVALID_VALUE,i)||this}return be(t,e),t}(It),Dt=/** @class */function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),Ot.INVALID_VALUE,r)||this}return be(t,e),t}(It),Ut=/** @class */function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),Ot.MISSING_VALUE,n)||this}return be(t,e),t}(It);function kt(e){return"function"==typeof e}
|
|
569
569
|
// TODO(skeleton): add skeleton support
|
|
570
570
|
function Gt(e,t,n,r,i,o,
|
|
571
571
|
// For debugging
|
|
@@ -582,7 +582,7 @@ if(!i||!(h in i))throw new Ut(h,a);var f=i[h];if(Ne(u))f&&"string"!=typeof f&&"n
|
|
|
582
582
|
// Recursively format plural and select parts' option — which can be a
|
|
583
583
|
// nested pattern structure. The choosing of the option to use is
|
|
584
584
|
// abstracted-by and delegated-to the part helper object.
|
|
585
|
-
if(
|
|
585
|
+
if(Le(u)){var p="string"==typeof u.style?r.date[u.style]:Ie(u.style)?u.style.parsedOptions:void 0;s.push({type:Pt.literal,value:n.getDateTimeFormat(t,p).format(f)})}else if(Ce(u)){p="string"==typeof u.style?r.time[u.style]:Ie(u.style)?u.style.parsedOptions:r.time.medium;s.push({type:Pt.literal,value:n.getDateTimeFormat(t,p).format(f)})}else if(He(u)){(p="string"==typeof u.style?r.number[u.style]:Pe(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),s.push({type:Pt.literal,value:n.getNumberFormat(t,p).format(f)})}else{if(Re(u)){var m=u.children,d=u.value,g=i[d];if(!kt(g))throw new Dt(d,"function",a);var E=g(Gt(m,t,n,r,i,o).map((function(e){return e.value})));Array.isArray(E)||(E=[E]),s.push.apply(s,E.map((function(e){return{type:"string"==typeof e?Pt.literal:Pt.object,value:e}})))}if(Be(u)){if(!(y=u.options[f]||u.options.other))throw new xt(u.value,f,Object.keys(u.options),a);s.push.apply(s,Gt(y.value,t,n,r,i))}else if(Oe(u)){var y;if(!(y=u.options["=".concat(f)])){if(!Intl.PluralRules)throw new It('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Ot.MISSING_INTL_API,a);var b=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));y=u.options[b]||u.options.other}if(!y)throw new xt(u.value,f,Object.keys(u.options),a);s.push.apply(s,Gt(y.value,t,n,r,i,f-(u.offset||0)))}else;}}}return function(e){return e.length<2?e:e.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===Pt.literal&&t.type===Pt.literal?n.value+=t.value:e.push(t),e}),[])}(s)}
|
|
586
586
|
/*
|
|
587
587
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
588
588
|
Copyrights licensed under the New BSD License.
|
|
@@ -602,9 +602,9 @@ this.formats=$t(e.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.
|
|
|
602
602
|
// Default format options used as the prototype of the `formats` provided to the
|
|
603
603
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
604
604
|
// and Intl.DateTimeFormat instances.
|
|
605
|
-
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const zt={},Wt=(e,t,n)=>n?(t in zt||(zt[t]={}),e in zt[t]||(zt[t][e]=n),n):n,Vt=(e,t)=>{if(null==t)return;if(t in zt&&e in zt[t])return zt[t][e];const n=_n(t);for(let r=0;r<n.length;r++){const i=Zt(n[r],e);if(i)return Wt(e,t,i)}};let Xt;const Yt=se({});function Kt(e){return e in Xt}function Zt(e,t){if(!Kt(e))return null;const n=function(e){return Xt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function qt(e,...t){delete zt[e],Yt.update((n=>(n[e]=Ee.all([n[e]||{},...t]),n)))}le([Yt],(([e])=>Object.keys(e))),Yt.subscribe((e=>Xt=e));const Jt={};function Qt(e){return Jt[e]}function en(e){return null!=e&&_n(e).some((e=>{var t;return null==(t=Qt(e))?void 0:t.size}))}function tn(e,t){const n=Promise.all(t.map((t=>(function(e,t){Jt[e].delete(t),0===Jt[e].size&&delete Jt[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>qt(e,...t)))}const nn={};function rn(e){if(!en(e))return e in nn?nn[e]:Promise.resolve();const t=function(e){return _n(e).map((e=>{const t=Qt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return nn[e]=Promise.all(t.map((([e,t])=>tn(e,t)))).then((()=>{if(en(e))return rn(e);delete nn[e]})),nn[e]}var on=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable;function ln({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${_n(e).join('", "')}".${en(An())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`)}const cn={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function un(){return cn}const hn=se(!1);var fn=Object.defineProperty,pn=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,dn=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,yn=(e,t,n)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let bn;const Tn=se(null);function vn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function _n(e,t=un().fallbackLocale){const n=vn(e);return t?[...new Set([...n,...vn(t)])]:n}function An(){return null!=bn?bn:void 0}Tn.subscribe((e=>{bn=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const wn=(Sn=((e,t)=>{for(var n in t||(t={}))gn.call(t,n)&&yn(e,n,t[n]);if(dn)for(var n of dn(t))En.call(t,n)&&yn(e,n,t[n]);return e})({},Tn),pn(Sn,mn({set:e=>{if(e&&function(e){if(null==e)return;const t=_n(e);for(let e=0;e<t.length;e++){const n=t[e];if(Kt(n))return n}}(e)&&en(e)){const{loadingDelay:t}=un();let n;return"undefined"!=typeof window&&null!=An()&&t?n=window.setTimeout((()=>hn.set(!0)),t):hn.set(!0),rn(e).then((()=>{Tn.set(e)})).finally((()=>{clearTimeout(n),hn.set(!1)}))}return Tn.set(e)}})));var Sn;const Nn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}};var Hn=Object.defineProperty,
|
|
605
|
+
e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const zt={},Wt=(e,t,n)=>n?(t in zt||(zt[t]={}),e in zt[t]||(zt[t][e]=n),n):n,Vt=(e,t)=>{if(null==t)return;if(t in zt&&e in zt[t])return zt[t][e];const n=_n(t);for(let r=0;r<n.length;r++){const i=Zt(n[r],e);if(i)return Wt(e,t,i)}};let Xt;const Yt=se({});function Kt(e){return e in Xt}function Zt(e,t){if(!Kt(e))return null;const n=function(e){return Xt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let e=0;e<n.length;e++)if("object"==typeof r){if(e>0){const t=n.slice(e,n.length).join(".");if(t in r){r=r[t];break}}r=r[n[e]]}else r=void 0;return r}(n,t)}function qt(e,...t){delete zt[e],Yt.update((n=>(n[e]=Ee.all([n[e]||{},...t]),n)))}le([Yt],(([e])=>Object.keys(e))),Yt.subscribe((e=>Xt=e));const Jt={};function Qt(e){return Jt[e]}function en(e){return null!=e&&_n(e).some((e=>{var t;return null==(t=Qt(e))?void 0:t.size}))}function tn(e,t){const n=Promise.all(t.map((t=>(function(e,t){Jt[e].delete(t),0===Jt[e].size&&delete Jt[e]}(e,t),t().then((e=>e.default||e))))));return n.then((t=>qt(e,...t)))}const nn={};function rn(e){if(!en(e))return e in nn?nn[e]:Promise.resolve();const t=function(e){return _n(e).map((e=>{const t=Qt(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return nn[e]=Promise.all(t.map((([e,t])=>tn(e,t)))).then((()=>{if(en(e))return rn(e);delete nn[e]})),nn[e]}var on=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable;function ln({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${_n(e).join('", "')}".${en(An())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`)}const cn={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function un(){return cn}const hn=se(!1);var fn=Object.defineProperty,pn=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,dn=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,yn=(e,t,n)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let bn;const Tn=se(null);function vn(e){return e.split("-").map(((e,t,n)=>n.slice(0,t+1).join("-"))).reverse()}function _n(e,t=un().fallbackLocale){const n=vn(e);return t?[...new Set([...n,...vn(t)])]:n}function An(){return null!=bn?bn:void 0}Tn.subscribe((e=>{bn=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const wn=(Sn=((e,t)=>{for(var n in t||(t={}))gn.call(t,n)&&yn(e,n,t[n]);if(dn)for(var n of dn(t))En.call(t,n)&&yn(e,n,t[n]);return e})({},Tn),pn(Sn,mn({set:e=>{if(e&&function(e){if(null==e)return;const t=_n(e);for(let e=0;e<t.length;e++){const n=t[e];if(Kt(n))return n}}(e)&&en(e)){const{loadingDelay:t}=un();let n;return"undefined"!=typeof window&&null!=An()&&t?n=window.setTimeout((()=>hn.set(!0)),t):hn.set(!0),rn(e).then((()=>{Tn.set(e)})).finally((()=>{clearTimeout(n),hn.set(!1)}))}return Tn.set(e)}})));var Sn;const Nn=e=>{const t=Object.create(null);return n=>{const r=JSON.stringify(n);return r in t?t[r]:t[r]=e(n)}};var Hn=Object.defineProperty,Ln=Object.getOwnPropertySymbols,Cn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,On=(e,t,n)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mn=(e,t)=>{for(var n in t||(t={}))Cn.call(t,n)&&On(e,n,t[n]);if(Ln)for(var n of Ln(t))Bn.call(t,n)&&On(e,n,t[n]);return e},Rn=(e,t)=>{var n={};for(var r in e)Cn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ln)for(var r of Ln(e))t.indexOf(r)<0&&Bn.call(e,r)&&(n[r]=e[r]);return n};const Pn=(e,t)=>{const{formats:n}=un();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},In=Nn((e=>{var t=e,{locale:n,format:r}=t,i=Rn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Pn("number",r)),new Intl.NumberFormat(n,i)})),xn=Nn((e=>{var t=e,{locale:n,format:r}=t,i=Rn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Pn("date",r):0===Object.keys(i).length&&(i=Pn("date","short")),new Intl.DateTimeFormat(n,i)})),Dn=Nn((e=>{var t=e,{locale:n,format:r}=t,i=Rn(t,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Pn("time",r):0===Object.keys(i).length&&(i=Pn("time","short")),new Intl.DateTimeFormat(n,i)})),Un=Nn((
|
|
606
606
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
607
|
-
(e,t=An())=>new jt(e,t,un().formats,{ignoreTag:un().ignoreTag}))),kn=(e,t={})=>{var n,r,i,o;let a=t;"object"==typeof e&&(a=e,e=a.id);const{values:s,locale:l=An(),default:c}=a;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Vt(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(r=(n=un()).handleMissingMessage)?void 0:r.call(n,{locale:l,id:e,defaultValue:c}))?i:c)?o:e;if(!s)return u;let h=u;try{h=Un(u,l).format(s)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},Gn=(e,t)=>((e={})=>{var t=e,{locale:n=An()}=t,r=Rn(t,["locale"]);return Dn(Mn({locale:n},r))})(t).format(e),$n=(e,t)=>((e={})=>{var t=e,{locale:n=An()}=t,r=Rn(t,["locale"]);return
|
|
607
|
+
(e,t=An())=>new jt(e,t,un().formats,{ignoreTag:un().ignoreTag}))),kn=(e,t={})=>{var n,r,i,o;let a=t;"object"==typeof e&&(a=e,e=a.id);const{values:s,locale:l=An(),default:c}=a;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=Vt(e,l);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),u}else u=null!=(o=null!=(i=null==(r=(n=un()).handleMissingMessage)?void 0:r.call(n,{locale:l,id:e,defaultValue:c}))?i:c)?o:e;if(!s)return u;let h=u;try{h=Un(u,l).format(s)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return h},Gn=(e,t)=>((e={})=>{var t=e,{locale:n=An()}=t,r=Rn(t,["locale"]);return Dn(Mn({locale:n},r))})(t).format(e),$n=(e,t)=>((e={})=>{var t=e,{locale:n=An()}=t,r=Rn(t,["locale"]);return xn(Mn({locale:n},r))})(t).format(e),Fn=(e,t)=>((e={})=>{var t=e,{locale:n=An()}=t,r=Rn(t,["locale"]);return In(Mn({locale:n},r))})(t).format(e),jn=(e,t=An())=>Vt(e,t),zn=le([wn,Yt],(()=>kn));function Wn(e,t){qt(e,t)}le([wn],(()=>Gn)),le([wn],(()=>$n)),le([wn],(()=>Fn)),le([wn,Yt],(()=>jn)),function(e){const t=e,{formats:n}=t,r=((e,t)=>{var n={};for(var r in e)an.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&on)for(var r of on(e))t.indexOf(r)<0&&sn.call(e,r)&&(n[r]=e[r]);return n})(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{jt.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch(t){console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,null==r.handleMissingMessage?r.handleMissingMessage=ln:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(cn,r,{initialLocale:i}),n&&("number"in n&&Object.assign(cn.formats.number,n.number),"date"in n&&Object.assign(cn.formats.date,n.date),"time"in n&&Object.assign(cn.formats.time,n.time)),wn.set(i)}({fallbackLocale:"en"});const Vn={en:{sessionExpirationHeader:"Session Warning",sessionExpirationTitle:"Your session is about to expire!",sessionExpirationGeneralText:"Your session will automatically terminate in <b>{second} seconds</b>.",sessionExpirationGeneralButton:"CONTINUE"},tr:{sessionExpirationHeader:"Session Warning",sessionExpirationTitle:"You session is about to expire!",sessionExpirationGeneralText:"Oyun seansınız <b>{second} saniye</b> içinde otomatik olarak sonuçlandırılacaktır",sessionExpirationGeneralButton:"Devam et"}};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Xn=function(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}((function(e,t){
|
|
608
608
|
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
|
|
609
609
|
e.exports=function(){const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:a,create:s}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;// eslint-disable-line import/no-mutable-exports
|
|
610
610
|
o||(o=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=_(Array.prototype.forEach),h=_(Array.prototype.pop),f=_(Array.prototype.push),p=_(String.prototype.toLowerCase),m=_(String.prototype.toString),d=_(String.prototype.match),g=_(String.prototype.replace),E=_(String.prototype.indexOf),y=_(String.prototype.trim),b=_(Object.prototype.hasOwnProperty),T=_(RegExp.prototype.test),v=A(TypeError);
|
|
@@ -653,7 +653,7 @@ n(r)||(r[o]=e),t=e)}e[t]=!0}return e}
|
|
|
653
653
|
* @param {Object} object - The object to look up the getter function in its prototype chain.
|
|
654
654
|
* @param {String} prop - The property name for which to find the getter function.
|
|
655
655
|
* @returns {Function} The getter function found in the prototype chain or a fallback function.
|
|
656
|
-
*/function H(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=r(e)}function n(){return null}return n}const
|
|
656
|
+
*/function H(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=r(e)}function n(){return null}return n}const L=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),R=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=o(["#text"]),I=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),x=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),D=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),$=a(/\${[\w\W]*}/gm),F=a(/^data-[\-\w.\u00B7-\uFFFF]/),j=a(/^aria-[\-\w]+$/),z=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=a(/^(?:\w+script|data):/i),V=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=a(/^html$/i),Y=a(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
657
657
|
// SVG
|
|
658
658
|
var K=Object.freeze({__proto__:null,MUSTACHE_EXPR:k,ERB_EXPR:G,TMPLIT_EXPR:$,DATA_ATTR:F,ARIA_ATTR:j,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:V,DOCTYPE_NAME:X,CUSTOM_ELEMENT:Y});
|
|
659
659
|
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
@@ -696,14 +696,14 @@ if("function"==typeof c){const e=r.createElement("template");e.content&&e.conten
|
|
|
696
696
|
* We consider the elements and attributes below to be safe. Ideally
|
|
697
697
|
* don't add any new ones but feel free to remove unwanted ones.
|
|
698
698
|
*/
|
|
699
|
-
/* allowed element names */const Te=w({},[...C,...
|
|
700
|
-
/* Allowed attribute names */let ve=null;const _e=w({},[...x,...
|
|
699
|
+
/* allowed element names */const Te=w({},[...L,...C,...B,...M,...P]);
|
|
700
|
+
/* Allowed attribute names */let ve=null;const _e=w({},[...I,...x,...D,...U]);
|
|
701
701
|
/*
|
|
702
702
|
* Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
|
|
703
703
|
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
|
704
704
|
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
|
705
705
|
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
|
706
|
-
*/let Ae=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Se=null,Ne=!0,He=!0,
|
|
706
|
+
*/let Ae=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Se=null,Ne=!0,He=!0,Le=!1,Ce=!0,Be=!1,Oe=!0,Me=!1,Re=!1,Pe=!1,Ie=!1,xe=!1,De=!1,Ue=!0,ke=!1;
|
|
707
707
|
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */const Ge="user-content-";
|
|
708
708
|
/* Keep element content when removing element? */let $e=!0,Fe=!1,je={},ze=null;
|
|
709
709
|
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
|
@@ -735,21 +735,21 @@ e.ADD_DATA_URI_TAGS,
|
|
|
735
735
|
// eslint-disable-line indent
|
|
736
736
|
at):Xe,ze=b(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,at):We,we=b(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,at):{},Se=b(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,at):{},je=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,// Default true
|
|
737
737
|
He=!1!==e.ALLOW_DATA_ATTR,// Default true
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,// Default false
|
|
739
|
+
Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,// Default true
|
|
740
740
|
Be=e.SAFE_FOR_TEMPLATES||!1,// Default false
|
|
741
741
|
Oe=!1!==e.SAFE_FOR_XML,// Default true
|
|
742
742
|
Me=e.WHOLE_DOCUMENT||!1,// Default false
|
|
743
|
-
|
|
744
|
-
|
|
743
|
+
Ie=e.RETURN_DOM||!1,// Default false
|
|
744
|
+
xe=e.RETURN_DOM_FRAGMENT||!1,// Default false
|
|
745
745
|
De=e.RETURN_TRUSTED_TYPE||!1,// Default false
|
|
746
746
|
Pe=e.FORCE_BODY||!1,// Default false
|
|
747
747
|
Ue=!1!==e.SANITIZE_DOM,// Default true
|
|
748
748
|
ke=e.SANITIZE_NAMED_PROPS||!1,// Default false
|
|
749
749
|
$e=!1!==e.KEEP_CONTENT,// Default true
|
|
750
750
|
Fe=e.IN_PLACE||!1,// Default false
|
|
751
|
-
ye=e.ALLOWED_URI_REGEXP||z,Qe=e.NAMESPACE||Je,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Be&&(He=!1),
|
|
752
|
-
/* Parse profile info */,je&&(be=w({},P),ve=[],!0===je.html&&(w(be,
|
|
751
|
+
ye=e.ALLOWED_URI_REGEXP||z,Qe=e.NAMESPACE||Je,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Be&&(He=!1),xe&&(Ie=!0)
|
|
752
|
+
/* Parse profile info */,je&&(be=w({},P),ve=[],!0===je.html&&(w(be,L),w(ve,I)),!0===je.svg&&(w(be,C),w(ve,x),w(ve,U)),!0===je.svgFilters&&(w(be,B),w(ve,x),w(ve,U)),!0===je.mathMl&&(w(be,M),w(ve,D),w(ve,U)))
|
|
753
753
|
/* Merge configuration parameters */,e.ADD_TAGS&&(be===Te&&(be=N(be)),w(be,e.ADD_TAGS,at)),e.ADD_ATTR&&(ve===_e&&(ve=N(ve)),w(ve,e.ADD_ATTR,at)),e.ADD_URI_SAFE_ATTR&&w(Ye,e.ADD_URI_SAFE_ATTR,at),e.FORBID_CONTENTS&&(ze===We&&(ze=N(ze)),w(ze,e.FORBID_CONTENTS,at))
|
|
754
754
|
/* Add #text in case KEEP_CONTENT is set to true */,$e&&(be["#text"]=!0)
|
|
755
755
|
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */,Me&&w(be,["html","head","body"])
|
|
@@ -764,7 +764,7 @@ void 0===ne&&(ne=J(F,a)),
|
|
|
764
764
|
null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));
|
|
765
765
|
// Prevent further manipulation of configuration.
|
|
766
766
|
// Not available in IE8, Safari 5, etc.
|
|
767
|
-
o&&o(e),st=e}},ht=w({},["mi","mo","mn","ms","mtext"]),ft=w({},["foreignobject","annotation-xml"]),pt=w({},["title","style","font","a","script"]),mt=w({},[...
|
|
767
|
+
o&&o(e),st=e}},ht=w({},["mi","mo","mn","ms","mtext"]),ft=w({},["foreignobject","annotation-xml"]),pt=w({},["title","style","font","a","script"]),mt=w({},[...C,...B,...O]),dt=w({},[...M,...R]),gt=function(e){let t=te(e);
|
|
768
768
|
// In JSDOM, if we're inside shadow DOM, then parentNode
|
|
769
769
|
// can be null. We just simulate parent in this case.
|
|
770
770
|
t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===qe?
|
|
@@ -790,7 +790,7 @@ t.namespaceURI===qe?"math"===n&&ft[r]:Boolean(dt[n]):e.namespaceURI===Je?
|
|
|
790
790
|
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
|
791
791
|
te(e).removeChild(e)}catch(t){V(e)}},yt=function(e,t){try{f(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(n.removed,{attribute:null,from:t})}
|
|
792
792
|
// We void attribute values for unremovable "is"" attributes
|
|
793
|
-
if(t.removeAttribute(e),"is"===e&&!ve[e])if(xe
|
|
793
|
+
if(t.removeAttribute(e),"is"===e&&!ve[e])if(Ie||xe)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){
|
|
794
794
|
/* Create a HTML document */
|
|
795
795
|
let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{
|
|
796
796
|
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
|
@@ -842,7 +842,7 @@ if(Ue&&("id"===t||"name"===t)&&(n in r||n in lt))return!1;
|
|
|
842
842
|
// Alternative, second condition checks if it's an `is`-attribute, AND
|
|
843
843
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
844
844
|
"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&T(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1;
|
|
845
|
-
/* Check value is safe. First, is attr inert? If so, is safe */}else if(Ye[t]);else if(T(ye,g(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e])if(
|
|
845
|
+
/* Check value is safe. First, is attr inert? If so, is safe */}else if(Ye[t]);else if(T(ye,g(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e])if(Le&&!T(de,g(n,ge,"")));else if(n)return!1;return!0},Nt=function(e){return"annotation-xml"!==e&&d(e,Ee)},Ht=function(e){
|
|
846
846
|
/* Execute a hook if present */
|
|
847
847
|
At("beforeSanitizeAttributes",e,null);const{attributes:t}=e;
|
|
848
848
|
/* Check if we have attributes; if not we might have a text node */if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};let i=t.length;
|
|
@@ -855,7 +855,7 @@ At("uponSanitizeAttribute",e,r),f=r.attrValue,Oe&&T(/((--!?|])>)|<\/(style|title
|
|
|
855
855
|
/* Remove attribute */
|
|
856
856
|
/* Did the hooks approve of the attribute? */
|
|
857
857
|
if(yt(a,e),!r.keepAttr)continue;
|
|
858
|
-
/* Work around a security issue in jQuery 3.0 */if(!
|
|
858
|
+
/* Work around a security issue in jQuery 3.0 */if(!Ce&&T(/\/>/i,f)){yt(a,e);continue}
|
|
859
859
|
/* Sanitize attribute content to be template-safe */Be&&u([ue,he,fe],(e=>{f=g(f,e," ")}))
|
|
860
860
|
/* Is `value` valid for this attribute? */;const p=at(e.nodeName);if(St(p,c,f)){
|
|
861
861
|
/* Handle attributes that require Trusted Types */
|
|
@@ -871,7 +871,7 @@ f=Ge+f),ne&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(s);else
|
|
|
871
871
|
/* Handle invalid data-* attribute set by try-catching it */try{s?e.setAttributeNS(s,a,f):
|
|
872
872
|
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
873
873
|
e.setAttribute(a,f),vt(e)?Et(e):h(n.removed)}catch(e){}}}
|
|
874
|
-
/* Execute a hook if present */At("afterSanitizeAttributes",e,null)},
|
|
874
|
+
/* Execute a hook if present */At("afterSanitizeAttributes",e,null)},Lt=function e(t){let n=null;const r=Tt(t);
|
|
875
875
|
/* Execute a hook if present */for(At("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)
|
|
876
876
|
/* Execute a hook if present */
|
|
877
877
|
At("uponSanitizeShadowNode",n,null),
|
|
@@ -911,22 +911,22 @@ r=o:
|
|
|
911
911
|
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
912
912
|
r.appendChild(o);else{
|
|
913
913
|
/* Exit directly if we have nothing to do */
|
|
914
|
-
if(!
|
|
914
|
+
if(!Ie&&!Be&&!Me&&
|
|
915
915
|
// eslint-disable-next-line unicorn/prefer-includes
|
|
916
916
|
-1===e.indexOf("<"))return ne&&De?ne.createHTML(e):e;
|
|
917
917
|
/* Initialize the document to work on */
|
|
918
918
|
/* Check we have a DOM node from the data */
|
|
919
|
-
if(r=bt(e),!r)return
|
|
919
|
+
if(r=bt(e),!r)return Ie?null:De?re:""}
|
|
920
920
|
/* Remove first element node (ours) if FORCE_BODY is set */r&&Pe&&Et(r.firstChild)
|
|
921
921
|
/* Get node iterator */;const c=Tt(Fe?e:r);
|
|
922
922
|
/* Now start iterating over the created document */for(;a=c.nextNode();)
|
|
923
923
|
/* Sanitize tags and elements */
|
|
924
924
|
wt(a)||(
|
|
925
925
|
/* Shadow DOM detected, sanitize it */
|
|
926
|
-
a.content instanceof l&&
|
|
926
|
+
a.content instanceof l&&Lt(a.content)
|
|
927
927
|
/* Check attributes, sanitize if necessary */,Ht(a));
|
|
928
928
|
/* If we sanitized `dirty` in-place, return it. */if(Fe)return e;
|
|
929
|
-
/* Return sanitized string or DOM */if(
|
|
929
|
+
/* Return sanitized string or DOM */if(Ie){if(xe)for(s=ae.call(r.ownerDocument);r.firstChild;)
|
|
930
930
|
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
931
931
|
s.appendChild(r.firstChild);else s=r;return(ve.shadowroot||ve.shadowrootmode)&&(
|
|
932
932
|
/*
|
|
@@ -994,16 +994,16 @@ n.removeHooks=function(e){ce[e]&&(ce[e]=[])},
|
|
|
994
994
|
* Public method to remove all DOMPurify hooks
|
|
995
995
|
*/
|
|
996
996
|
n.removeAllHooks=function(){ce={}},n}var ee=Q();return ee}()}));
|
|
997
|
-
/* src/CashierSessionExpirationModal.svelte generated by Svelte v3.59.2 */function Yn(e){let t,n,r,o,a,s,l,c,u,h,f,p,m,g,E,N,C,
|
|
997
|
+
/* src/CashierSessionExpirationModal.svelte generated by Svelte v3.59.2 */function Yn(e){let t,n,r,o,a,s,l,c,u,h,f,p,m,g,E,N,L,C,B,O,M,R,P,I,x,D,U,k=/*$_*/e[7]("sessionExpirationHeader")+"",G=/*$_*/e[7]("sessionExpirationTitle")+"",$=Xn.sanitize(/*$_*/e[7]("sessionExpirationGeneralText",{values:{second:/*timeLeft*/e[6]}}))+"",j=/*$_*/e[7]("sessionExpirationGeneralButton")+"",z=/*assetsurl*/e[3]&&Kn(e);return{c(){t=T("div"),n=T("div"),r=T("div"),o=T("div"),a=T("div"),s=v(k),l=_(),c=T("div"),u=T("div"),h=T("slot"),z&&z.c(),f=_(),p=T("slot"),m=T("span"),g=v(G),E=_(),N=T("slot"),L=T("span"),C=_(),B=T("div"),O=T("slot"),M=T("span"),R=v(j),w(a,"class","CashierSessionExpirationModalHeaderTitle"),w(o,"class","CashierSessionExpirationModalHeader"),w(h,"name","icon"),w(h,"class","CashierSessionExpirationIcon"),w(p,"name","title"),w(p,"class","CashierSessionExpirationTitle"),w(N,"name","text"),w(N,"class","CashierSessionExpirationText"),w(O,"name","button"),w(B,"class","CashierSessionExpirationButton"),w(u,"class","CashierSessionExpiration"),w(c,"class","CashierSessionExpirationModalContainer"),w(c,"part","CashierSessionExpirationModalContainer"),w(r,"class","CashierSessionExpirationModalWrapper"),w(r,"part","CashierSessionExpirationModalWrapper"),w(n,"class","CashierSessionExpirationModalWindow"),w(n,"part","CashierSessionExpirationModalWindow"),w(n,"id","CashierSessionExpirationModal"),F((()=>/*div6_elementresize_handler*/e[19].call(n))),w(t,"part","CustomStylingContainer")},m(i,v){y(i,t,v),d(t,n),d(n,r),d(r,o),d(o,a),d(a,s),d(r,l),d(r,c),d(c,u),d(u,h),z&&z.m(h,null),d(u,f),d(u,p),d(p,m),d(m,g),d(u,E),d(u,N),d(N,L),L.innerHTML=$,d(u,C),d(u,B),d(B,O),d(O,M),d(M,R),
|
|
998
998
|
/*div3_binding*/e[18](u),P=function(e,t){"static"===getComputedStyle(e).position&&(e.style.position="relative");const n=T("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const r=H();let i;return r?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=A(window,"message",(e=>{e.source===n.contentWindow&&t()}))):(n.src="about:blank",n.onload=()=>{i=A(n.contentWindow,"resize",t),
|
|
999
999
|
// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)
|
|
1000
1000
|
// see https://github.com/sveltejs/svelte/issues/4233
|
|
1001
1001
|
t()}),d(e,n),()=>{(r||i&&n.contentWindow)&&i(),b(n)}}(n,/*div6_elementresize_handler*/e[19].bind(n)),
|
|
1002
|
-
/*div7_binding*/e[20](t),
|
|
1003
|
-
/*div3_binding*/,e[18](null),P(),n&&
|
|
1002
|
+
/*div7_binding*/e[20](t),x=!0,D||(U=[A(B,"click",/*renewSession*/e[8]),A(n,"click",/*outOfModalClick*/e[9])],D=!0)},p(t,n){e=t,(!x||/*$_*/128&n[0])&&k!==(k=/*$_*/e[7]("sessionExpirationHeader")+"")&&S(s,k),/*assetsurl*/e[3]?z?z.p(e,n):(z=Kn(e),z.c(),z.m(h,null)):z&&(z.d(1),z=null),(!x||/*$_*/128&n[0])&&G!==(G=/*$_*/e[7]("sessionExpirationTitle")+"")&&S(g,G),(!x||/*$_, timeLeft*/192&n[0])&&$!==($=Xn.sanitize(/*$_*/e[7]("sessionExpirationGeneralText",{values:{second:/*timeLeft*/e[6]}}))+"")&&(L.innerHTML=$),(!x||/*$_*/128&n[0])&&j!==(j=/*$_*/e[7]("sessionExpirationGeneralButton")+"")&&S(R,j)},i(t){x||(F((()=>{x&&(I||(I=ee(n,oe,{duration:/*duration*/e[2]},!0)),I.run(1))})),x=!0)},o(t){I||(I=ee(n,oe,{duration:/*duration*/e[2]},!1)),I.run(0),x=!1},d(n){n&&b(t),z&&z.d()
|
|
1003
|
+
/*div3_binding*/,e[18](null),P(),n&&I&&I.end()
|
|
1004
1004
|
/*div7_binding*/,e[20](null),D=!1,i(U)}}}
|
|
1005
1005
|
// (157:16) {#if assetsurl}
|
|
1006
|
-
function Kn(e){let t,n;return{c(){t=T("img"),l(t.src,n=`${/*assetsurl*/e[3]}/set-timeout-icon.png`)||w(t,"src",n),w(t,"width","300px"),w(t,"alt","error")},m(e,n){y(e,t,n)},p(e,r){/*assetsurl*/8&r[0]&&!l(t.src,n=`${/*assetsurl*/e[3]}/set-timeout-icon.png`)&&w(t,"src",n)},d(e){e&&b(t)}}}function Zn(t){let n,r,o=/*show*/t[5]&&Yn(t);return{c(){o&&o.c(),n=v(""),this.c=e},m(e,t){o&&o.m(e,t),y(e,n,t),r=!0},p(e,t){/*show*/e[5]?o?(o.p(e,t),/*show*/32&t[0]&&q(o,1)):(o=Yn(e),o.c(),q(o,1),o.m(n.parentNode,n)):o&&(Z={r:0,c:[],p:Z},J(o,1,1,(()=>{o=null})),Z.r||i(Z.c),Z=Z.p)},i(e){r||(q(o),r=!0)},o(e){J(o),r=!1},d(e){o&&o.d(e),e&&b(n)}}}function qn(e,t,n){let r;var i,o;i=zn,o=e=>n(7,r=e),e.$$.on_destroy.push(c(i,o));let a,s,l,u,h,f,{clientstyling:p=""}=t,{clientstylingurl:m=""}=t,{width:d}=t,{height:g}=t,{duration:E=200}=t,{assetsurl:y=""}=t,{lang:b="en"}=t,{translationurl:T=""}=t,{endpoint:v}=t,{currency:_}=t,{customerid:A}=t,{selectedpaymentmethodname:w}=t,S=!1;const N=e=>{"StartSessionCountdown"===e.data.type&&(f=e.data.xPaymentSessionToken,h=e.data.paymentMethodName,H())},H=()=>{n(5,S=!1);const e=(e=>{try{return JSON.parse(atob(e.split(".")[1]))}catch(e){return null}})(f);e&&(l=null==e?void 0:e.exp,n(6,s=l),u&&clearInterval(u),u=setInterval((()=>{const e=Math.floor((new Date).getTime()/1e3);n(6,s=l-e),s<=90&&n(5,S=!0),e>=l&&(n(6,s=0),n(5,S=!1),clearInterval(u),window.postMessage({type:"SessionExpired"},window.location.href))}),1e3))},
|
|
1006
|
+
function Kn(e){let t,n;return{c(){t=T("img"),l(t.src,n=`${/*assetsurl*/e[3]}/set-timeout-icon.png`)||w(t,"src",n),w(t,"width","300px"),w(t,"alt","error")},m(e,n){y(e,t,n)},p(e,r){/*assetsurl*/8&r[0]&&!l(t.src,n=`${/*assetsurl*/e[3]}/set-timeout-icon.png`)&&w(t,"src",n)},d(e){e&&b(t)}}}function Zn(t){let n,r,o=/*show*/t[5]&&Yn(t);return{c(){o&&o.c(),n=v(""),this.c=e},m(e,t){o&&o.m(e,t),y(e,n,t),r=!0},p(e,t){/*show*/e[5]?o?(o.p(e,t),/*show*/32&t[0]&&q(o,1)):(o=Yn(e),o.c(),q(o,1),o.m(n.parentNode,n)):o&&(Z={r:0,c:[],p:Z},J(o,1,1,(()=>{o=null})),Z.r||i(Z.c),Z=Z.p)},i(e){r||(q(o),r=!0)},o(e){J(o),r=!1},d(e){o&&o.d(e),e&&b(n)}}}function qn(e,t,n){let r;var i,o;i=zn,o=e=>n(7,r=e),e.$$.on_destroy.push(c(i,o));let a,s,l,u,h,f,{clientstyling:p=""}=t,{clientstylingurl:m=""}=t,{width:d}=t,{height:g}=t,{duration:E=200}=t,{assetsurl:y=""}=t,{lang:b="en"}=t,{translationurl:T=""}=t,{endpoint:v}=t,{currency:_}=t,{customerid:A}=t,{selectedpaymentmethodname:w}=t,S=!1;const N=e=>{"StartSessionCountdown"===e.data.type&&(f=e.data.xPaymentSessionToken,h=e.data.paymentMethodName,H())},H=()=>{n(5,S=!1);const e=(e=>{try{return JSON.parse(atob(e.split(".")[1]))}catch(e){return null}})(f);e&&(l=null==e?void 0:e.exp,n(6,s=l),u&&clearInterval(u),u=setInterval((()=>{const e=Math.floor((new Date).getTime()/1e3);n(6,s=l-e),s<=90&&n(5,S=!0),e>=l&&(n(6,s=0),n(5,S=!1),clearInterval(u),window.postMessage({type:"SessionExpired"},window.location.href))}),1e3))},L=()=>{const e=new URL(`${v}/v1/player/${A}/payment/GetPaymentMethod`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const n={method:"POST",mode:"cors",headers:t,body:JSON.stringify({PaymentMethodName:h||w,Currency:_,XPaymentSessionToken:f})};fetch(e,n).then((e=>e.json())).then((e=>{f=e.XPaymentSessionToken,H()}))};Object.keys(Vn).forEach((e=>{Wn(e,Vn[e])}));const C=()=>{var e;e=b,wn.set(e)};var B;
|
|
1007
1007
|
/**
|
|
1008
1008
|
* Schedules a callback to run immediately before the component is unmounted.
|
|
1009
1009
|
*
|
|
@@ -1011,5 +1011,5 @@ function Kn(e){let t,n;return{c(){t=T("img"),l(t.src,n=`${/*assetsurl*/e[3]}/set
|
|
|
1011
1011
|
* only one that runs inside a server-side component.
|
|
1012
1012
|
*
|
|
1013
1013
|
* https://svelte.dev/docs#run-time-svelte-ondestroy
|
|
1014
|
-
*/return B=()=>(window.addEventListener("message",N,!1),()=>{window.removeEventListener("message",N)}),
|
|
1014
|
+
*/return B=()=>(window.addEventListener("message",N,!1),()=>{window.removeEventListener("message",N)}),I().$$.on_mount.push(B),function(e){I().$$.on_destroy.push(e)}((()=>{clearInterval(u)})),e.$$set=e=>{"clientstyling"in e&&n(10,p=e.clientstyling),"clientstylingurl"in e&&n(11,m=e.clientstylingurl),"width"in e&&n(0,d=e.width),"height"in e&&n(1,g=e.height),"duration"in e&&n(2,E=e.duration),"assetsurl"in e&&n(3,y=e.assetsurl),"lang"in e&&n(12,b=e.lang),"translationurl"in e&&n(13,T=e.translationurl),"endpoint"in e&&n(14,v=e.endpoint),"currency"in e&&n(15,_=e.currency),"customerid"in e&&n(16,A=e.customerid),"selectedpaymentmethodname"in e&&n(17,w=e.selectedpaymentmethodname)},e.$$.update=()=>{/*lang*/4096&e.$$.dirty[0]&&b&&C(),/*clientstyling, customStylingContainer*/1040&e.$$.dirty[0]&&p&&a&&(()=>{let e=document.createElement("style");e.innerHTML=p,a.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/2064&e.$$.dirty[0]&&m&&a&&(()=>{let e=new URL(m),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{a.appendChild(t)}),1)}))})(),/*translationurl*/8192&e.$$.dirty[0]&&T&&fetch(T).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Wn(t,e[t])}))})).catch((e=>{console.log(e)}))},[d,g,E,y,a,S,s,r,L,e=>{const t=e.currentTarget;e.target===t&&L()},p,m,b,T,v,_,A,w,function(e){D[e?"unshift":"push"]((()=>{a=e,n(4,a)}))},function(){d=this.clientWidth,g=this.clientHeight,n(0,d),n(1,g)},function(e){D[e?"unshift":"push"]((()=>{a=e,n(4,a)}))}]}class Jn extends ie{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CashierSessionExpirationModalWindow{display:flex;position:fixed;align-items:center;justify-content:center;width:100%;height:100%;z-index:101;top:0;left:0;background-color:var(--mmw--color-black-transparency-4, rgba(0, 0, 0, 0.04));container-type:inline-size;container-name:session-expiration-modal-window}.CashierSessionExpirationModalWrapper{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);width:400px}.CashierSessionExpirationModalHeader{display:flex;align-items:center;position:relative;height:var(--mmw--header-height, 32px);background-color:var(--mmw--color-grey-105, #E8E9EB);width:100%;border-radius:var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px) 0 0}.CashierSessionExpirationModalHeaderTitle{display:flex;text-align:center;color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);margin:auto;max-width:calc(100% - 150px);overflow:hidden;text-overflow:ellipsis;line-height:calc(var(--emw--font-size-small, 14px) + 2px)}.CashierSessionExpirationModalContainer{padding:var(--emw--spacing-large, 20px)}.CashierSessionExpiration{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--emw--spacing-large, 20px)}.CashierSessionExpirationTitle{color:var(--emw--color-black, #000);font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:120%;text-align:center}.CashierSessionExpirationText{color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:120%;text-align:center}.CashierSessionExpirationButton{display:flex;width:100%;height:36px;flex-direction:column;justify-content:center;flex-shrink:0;color:var(--emw--color-white, #FFF);cursor:pointer;text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;line-height:36px;border-radius:var(--emw--border-radius-medium, 4px);background:var(--emw--color-primary, #7EC51E)}.CashierSessionExpirationButton:hover{background:var(--mmw--color-main-button-hover, #71B11B)}.CashierSessionExpirationButton:active{background:var(--mmw--color-main-button-active, #5C950F)}@container session-expiration-modal-window (max-width:750px){.CashierSessionExpirationModalWindow .CashierSessionExpirationModalWrapper{width:90%;max-width:400px}}",this.shadowRoot.appendChild(t),re(this,{target:this.shadowRoot,props:L(this.attributes),customElement:!0},qn,Zn,a,{clientstyling:10,clientstylingurl:11,width:0,height:1,duration:2,assetsurl:3,lang:12,translationurl:13,endpoint:14,currency:15,customerid:16,selectedpaymentmethodname:17},null,[-1,-1]),e&&(e.target&&y(e.target,this,e.anchor),e.props&&(this.$set(e.props),V()))}static get observedAttributes(){return["clientstyling","clientstylingurl","width","height","duration","assetsurl","lang","translationurl","endpoint","currency","customerid","selectedpaymentmethodname"]}get clientstyling(){return this.$$.ctx[10]}set clientstyling(e){this.$$set({clientstyling:e}),V()}get clientstylingurl(){return this.$$.ctx[11]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),V()}get width(){return this.$$.ctx[0]}set width(e){this.$$set({width:e}),V()}get height(){return this.$$.ctx[1]}set height(e){this.$$set({height:e}),V()}get duration(){return this.$$.ctx[2]}set duration(e){this.$$set({duration:e}),V()}get assetsurl(){return this.$$.ctx[3]}set assetsurl(e){this.$$set({assetsurl:e}),V()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),V()}get translationurl(){return this.$$.ctx[13]}set translationurl(e){this.$$set({translationurl:e}),V()}get endpoint(){return this.$$.ctx[14]}set endpoint(e){this.$$set({endpoint:e}),V()}get currency(){return this.$$.ctx[15]}set currency(e){this.$$set({currency:e}),V()}get customerid(){return this.$$.ctx[16]}set customerid(e){this.$$set({customerid:e}),V()}get selectedpaymentmethodname(){return this.$$.ctx[17]}set selectedpaymentmethodname(e){this.$$set({selectedpaymentmethodname:e}),V()}}return!customElements.get("cashier-session-expiration-modal")&&customElements.define("cashier-session-expiration-modal",Jn),Jn}));
|
|
1015
1015
|
//# sourceMappingURL=cashier-session-expiration-modal.js.map
|