@everymatrix/cashier-session-expiration-modal 1.44.0 → 1.45.0
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/es2015/cashier-session-expiration-modal.cjs +1 -0
- package/es2015/cashier-session-expiration-modal.js +16 -0
- package/package.json +14 -33
- package/CHANGELOG.md +0 -9
- package/README.md +0 -30
- package/dist/cashier-session-expiration-modal.js +0 -1019
- package/dist/cashier-session-expiration-modal.js.map +0 -1
- package/index.html +0 -37
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -61
- package/src/CashierSessionExpirationModal.svelte +0 -328
- package/src/assets/set-timeout-icon.png +0 -0
- package/src/i18n.js +0 -33
- package/src/index.ts +0 -4
- package/src/translations.js +0 -14
- package/stories/CashierSessionExpirationModal.stories.js +0 -13
- package/tsconfig.json +0 -6
|
@@ -1,1019 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).app=e()}(this,(function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function r(){return Object.create(null)}function i(t){t.forEach(n)}function o(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function l(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}const u="undefined"!=typeof window;let h=u?()=>window.performance.now():()=>Date.now(),f=u?t=>requestAnimationFrame(t):t;const p=new Set;function m(t){p.forEach((e=>{e.c(t)||(p.delete(e),e.f())})),0!==p.size&&f(m)}
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new task that runs on each raf frame
|
|
4
|
-
* until it returns a falsy value or is aborted
|
|
5
|
-
*/function d(t,e){t.appendChild(e)}function g(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function y(t){const e=T("style");return function(t,e){d(t.head||t,e),e.sheet}(g(t),e),e.sheet}function E(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode&&t.parentNode.removeChild(t)}function T(t){return document.createElement(t)}function v(t){return document.createTextNode(t)}function w(){return v(" ")}function S(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function A(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function H(t,e){e=""+e,t.data!==e&&(t.data=e)}
|
|
6
|
-
// unfortunately this can't be a constant as that wouldn't be tree-shakeable
|
|
7
|
-
// so we cache the result instead
|
|
8
|
-
let O;function N(){if(void 0===O){O=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(t){O=!0}}return O}function C(t){const e={};for(const n of t)e[n.name]=n.value;return e}
|
|
9
|
-
// we need to store the information for multiple documents because a Svelte application could also contain iframes
|
|
10
|
-
// https://github.com/sveltejs/svelte/issues/3624
|
|
11
|
-
const M=new Map;let L,B=0;
|
|
12
|
-
// https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
13
|
-
function P(t,e,n,r,i,o,s,a=0){const c=16.666/r;let l="{\n";for(let t=0;t<=1;t+=c){const r=e+(n-e)*o(t);l+=100*t+`%{${s(r,1-r)}}\n`}const u=l+`100% {${s(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${a}`,f=g(t),{stylesheet:p,rules:m}=M.get(f)||function(t,e){const n={stylesheet:y(e),rules:{}};return M.set(t,n),n}(f,t);m[h]||(m[h]=!0,p.insertRule(`@keyframes ${h} ${u}`,p.cssRules.length));const d=t.style.animation||"";return t.style.animation=`${d?`${d}, `:""}${h} ${r}ms linear ${i}ms 1 both`,B+=1,h}function R(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-r.length;i&&(t.style.animation=r.join(", "),B-=i,B||f((()=>{B||(M.forEach((t=>{const{ownerNode:e}=t.stylesheet;
|
|
14
|
-
// there is no ownerNode if it runs on jsdom.
|
|
15
|
-
e&&b(e)})),M.clear())})))}function D(t){L=t}function x(){if(!L)throw new Error("Function called outside component initialization");return L}
|
|
16
|
-
/**
|
|
17
|
-
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
18
|
-
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
19
|
-
* it can be called from an external module).
|
|
20
|
-
*
|
|
21
|
-
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
|
22
|
-
*
|
|
23
|
-
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
24
|
-
*/const I=[],k=[];let U=[];const G=[],F=Promise.resolve();let z=!1;function Z(t){U.push(t)}
|
|
25
|
-
// flush() calls callbacks in this order:
|
|
26
|
-
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
27
|
-
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
28
|
-
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
29
|
-
// for afterUpdates called during the initial onMount, which are called in
|
|
30
|
-
// reverse order: children before parents.
|
|
31
|
-
// Since callbacks might update component values, which could trigger another
|
|
32
|
-
// call to flush(), the following steps guard against this:
|
|
33
|
-
// 1. During beforeUpdate, any updated components will be added to the
|
|
34
|
-
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
35
|
-
// the flush index is kept outside the function, the reentrant call will pick
|
|
36
|
-
// up where the earlier call left off and go through all dirty components. The
|
|
37
|
-
// current_component value is saved and restored so that the reentrant call will
|
|
38
|
-
// not interfere with the "parent" flush() call.
|
|
39
|
-
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
40
|
-
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
41
|
-
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
42
|
-
// function, guarantees this behavior.
|
|
43
|
-
const j=new Set;let W,V=0;// Do *not* move this inside the flush() function
|
|
44
|
-
function _(){
|
|
45
|
-
// Do not reenter flush while dirty components are updated, as this can
|
|
46
|
-
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
47
|
-
// Reentrancy is ok afterwards for bindings etc.
|
|
48
|
-
if(0!==V)return;const t=L;do{
|
|
49
|
-
// first, call beforeUpdate functions
|
|
50
|
-
// and update components
|
|
51
|
-
try{for(;V<I.length;){const t=I[V];V++,D(t),Y(t.$$)}}catch(t){
|
|
52
|
-
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
53
|
-
throw I.length=0,V=0,t}for(D(null),I.length=0,V=0;k.length;)k.pop()();
|
|
54
|
-
// then, once components are updated, call
|
|
55
|
-
// afterUpdate functions. This may cause
|
|
56
|
-
// subsequent updates...
|
|
57
|
-
for(let t=0;t<U.length;t+=1){const e=U[t];j.has(e)||(
|
|
58
|
-
// ...so guard against infinite loops
|
|
59
|
-
j.add(e),e())}U.length=0}while(I.length);for(;G.length;)G.pop()();z=!1,j.clear(),D(t)}function Y(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Z)}}
|
|
60
|
-
/**
|
|
61
|
-
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
62
|
-
*/function J(t,e,n){t.dispatchEvent(function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(`${e?"intro":"outro"}${n}`))}const X=new Set;let q;function K(t,e){t&&t.i&&(X.delete(t),t.i(e))}function Q(t,e,n,r){if(t&&t.o){if(X.has(t))return;X.add(t),q.c.push((()=>{X.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}const $={duration:0};function tt(n,r,s,a){const c={direction:"both"};let l=r(n,s,c),u=a?0:1,d=null,g=null,y=null;function E(){y&&R(n,y)}function b(t,e){const n=t.b-u;return e*=Math.abs(n),{a:u,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function T(r){const{delay:o=0,duration:s=300,easing:a=e,tick:c=t,css:T}=l||$,v={start:h()+o,b:r};r||(
|
|
63
|
-
// @ts-ignore todo: improve typings
|
|
64
|
-
v.group=q,q.r+=1),d||g?g=v:(
|
|
65
|
-
// if this is an intro, and there's a delay, we need to do
|
|
66
|
-
// an initial tick and/or apply CSS animation immediately
|
|
67
|
-
T&&(E(),y=P(n,u,r,s,o,a,T)),r&&c(0,1),d=b(v,s),Z((()=>J(n,r,"start"))),function(t){let e;0===p.size&&f(m),new Promise((n=>{p.add(e={c:t,f:n})}))}((t=>{if(g&&t>g.start&&(d=b(g,s),g=null,J(n,d.b,"start"),T&&(E(),y=P(n,u,d.b,d.duration,0,a,l.css))),d)if(t>=d.end)c(u=d.b,1-u),J(n,d.b,"end"),g||(
|
|
68
|
-
// we're done
|
|
69
|
-
d.b?
|
|
70
|
-
// intro — we can tidy up immediately
|
|
71
|
-
E():
|
|
72
|
-
// outro — needs to be coordinated
|
|
73
|
-
--d.group.r||i(d.group.c)),d=null;else if(t>=d.start){const e=t-d.start;u=d.a+d.d*a(e/d.duration),c(u,1-u)}return!(!d&&!g)})))}return{run(t){o(l)?(W||(W=Promise.resolve(),W.then((()=>{W=null}))),W).then((()=>{
|
|
74
|
-
// @ts-ignore
|
|
75
|
-
l=l(c),T(t)})):T(t)},end(){E(),d=g=null}}}function et(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];U.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),U=e}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
76
|
-
// TODO null out other refs, including component.$$ (but need to
|
|
77
|
-
// preserve final state?)
|
|
78
|
-
n.on_destroy=n.fragment=null,n.ctx=[])}function nt(t,e){-1===t.$$.dirty[0]&&(I.push(t),z||(z=!0,F.then(_)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function rt(e,s,a,c,l,u,h,f=[-1]){const p=L;D(e);const m=e.$$={fragment:null,ctx:[],
|
|
79
|
-
// state
|
|
80
|
-
props:u,update:t,not_equal:l,bound:r(),
|
|
81
|
-
// lifecycle
|
|
82
|
-
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(p?p.$$.context:[])),
|
|
83
|
-
// everything else
|
|
84
|
-
callbacks:r(),dirty:f,skip_bound:!1,root:s.target||p.$$.root};h&&h(m.root);let d=!1;if(m.ctx=a?a(e,s.props||{},((t,n,...r)=>{const i=r.length?r[0]:n;return m.ctx&&l(m.ctx[t],m.ctx[t]=i)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](i),d&&nt(e,t)),n})):[],m.update(),d=!0,i(m.before_update),
|
|
85
|
-
// `false` as a special case of no DOM component
|
|
86
|
-
m.fragment=!!c&&c(m.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
88
|
-
m.fragment&&m.fragment.l(t),t.forEach(b)}else
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
90
|
-
m.fragment&&m.fragment.c();s.intro&&K(e.$$.fragment),function(t,e,r,s){const{fragment:a,after_update:c}=t.$$;a&&a.m(e,r),s||
|
|
91
|
-
// onMount happens before the initial afterUpdate
|
|
92
|
-
Z((()=>{const e=t.$$.on_mount.map(n).filter(o);
|
|
93
|
-
// if the component was destroyed immediately
|
|
94
|
-
// it will update the `$$.on_destroy` reference to `null`.
|
|
95
|
-
// the destructured on_destroy may still reference to the old array
|
|
96
|
-
t.$$.on_destroy?t.$$.on_destroy.push(...e):
|
|
97
|
-
// Edge case - component was destroyed immediately,
|
|
98
|
-
// most likely as a result of a binding initialising
|
|
99
|
-
i(e),t.$$.on_mount=[]})),c.forEach(Z)}(e,s.target,s.anchor,s.customElement),_()}D(p)}let it;function ot(t,{delay:n=0,duration:r=400,easing:i=e}={}){const o=+getComputedStyle(t).opacity;return{delay:n,duration:r,easing:i,css:t=>"opacity: "+t*o}}"function"==typeof HTMLElement&&(it=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(o);
|
|
100
|
-
// @ts-ignore todo: improve typings
|
|
101
|
-
for(const t in this.$$.slotted)
|
|
102
|
-
// @ts-ignore todo: improve typings
|
|
103
|
-
this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){et(this,1),this.$destroy=t}$on(e,n){
|
|
104
|
-
// TODO should this delegate to addEventListener?
|
|
105
|
-
if(!o(n))return t;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});const st=[];
|
|
106
|
-
/**
|
|
107
|
-
* Creates a `Readable` store that allows reading by subscription.
|
|
108
|
-
* @param value initial value
|
|
109
|
-
* @param {StartStopNotifier} [start]
|
|
110
|
-
*/
|
|
111
|
-
/**
|
|
112
|
-
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
113
|
-
* @param {*=}value initial value
|
|
114
|
-
* @param {StartStopNotifier=} start
|
|
115
|
-
*/
|
|
116
|
-
function at(e,n=t){let r;const i=new Set;function o(t){if(s(e,t)&&(e=t,r)){// store is ready
|
|
117
|
-
const t=!st.length;for(const t of i)t[1](),st.push(t,e);if(t){for(let t=0;t<st.length;t+=2)st[t][0](st[t+1]);st.length=0}}}return{set:o,update:function(t){o(t(e))},subscribe:function(s,a=t){const c=[s,a];return i.add(c),1===i.size&&(r=n(o)||t),s(e),()=>{i.delete(c),0===i.size&&r&&(r(),r=null)}}}}function ct(e,n,r){const s=!Array.isArray(e),a=s?[e]:e,c=n.length<2;return u=e=>{let r=!1;const u=[];let h=0,f=t;const p=()=>{if(h)return;f();const r=n(s?u[0]:u,e);c?e(r):f=o(r)?r:t},m=a.map(((t,e)=>l(t,(t=>{u[e]=t,h&=~(1<<e),r&&p()}),(()=>{h|=1<<e}))));return r=!0,p(),function(){i(m),f(),
|
|
118
|
-
// We need to set this to false because callbacks can still happen despite having unsubscribed:
|
|
119
|
-
// Callbacks might already be placed in the queue which doesn't know it should no longer
|
|
120
|
-
// invoke this derived store.
|
|
121
|
-
r=!1}},{subscribe:at(r,u).subscribe};var u}var lt=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===ut}(t)}
|
|
122
|
-
// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
|
|
123
|
-
(t)};var ut="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ht(t,e){return!1!==e.clone&&e.isMergeableObject(t)?gt((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function ft(t,e,n){return t.concat(e).map((function(t){return ht(t,n)}))}function pt(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function mt(t,e){try{return e in t}catch(t){return!1}}
|
|
124
|
-
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
|
125
|
-
function dt(t,e,n){var r={};return n.isMergeableObject(t)&&pt(t).forEach((function(e){r[e]=ht(t[e],n)})),pt(e).forEach((function(i){(function(t,e){return mt(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
|
|
126
|
-
})(t,i)||(mt(t,i)&&n.isMergeableObject(e[i])?r[i]=function(t,e){if(!e.customMerge)return gt;var n=e.customMerge(t);return"function"==typeof n?n:gt}(i,n)(t[i],e[i],n):r[i]=ht(e[i],n))})),r}function gt(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||ft,n.isMergeableObject=n.isMergeableObject||lt,
|
|
127
|
-
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
|
128
|
-
// implementations can use it. The caller may not replace it.
|
|
129
|
-
n.cloneUnlessOtherwiseSpecified=ht;var r=Array.isArray(e);return r===Array.isArray(t)?r?n.arrayMerge(t,e,n):dt(t,e,n):ht(e,n)}gt.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return gt(t,n,e)}),{})};var yt=gt,Et=function(t,e){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Et(t,e)};function bt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Et(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Tt,vt,wt,St=function(){return St=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},St.apply(this,arguments)};function At(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}
|
|
130
|
-
/**
|
|
131
|
-
* Type Guards
|
|
132
|
-
*/
|
|
133
|
-
function Ht(t){return t.type===vt.literal}function Ot(t){return t.type===vt.argument}function Nt(t){return t.type===vt.number}function Ct(t){return t.type===vt.date}function Mt(t){return t.type===vt.time}function Lt(t){return t.type===vt.select}function Bt(t){return t.type===vt.plural}function Pt(t){return t.type===vt.pound}function Rt(t){return t.type===vt.tag}function Dt(t){return!(!t||"object"!=typeof t||t.type!==wt.number)}function xt(t){return!(!t||"object"!=typeof t||t.type!==wt.dateTime)}
|
|
134
|
-
// @generated from regex-gen.ts
|
|
135
|
-
"function"==typeof SuppressedError&&SuppressedError,function(t){
|
|
136
|
-
/** Argument is unclosed (e.g. `{0`) */
|
|
137
|
-
t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
|
|
138
|
-
/** Argument is empty (e.g. `{}`). */
|
|
139
|
-
t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
|
|
140
|
-
/** Argument is malformed (e.g. `{foo!}``) */
|
|
141
|
-
t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
|
|
142
|
-
/** Expect an argument type (e.g. `{foo,}`) */
|
|
143
|
-
t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
|
|
144
|
-
/** Unsupported argument type (e.g. `{foo,foo}`) */
|
|
145
|
-
t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
|
|
146
|
-
/** Expect an argument style (e.g. `{foo, number, }`) */
|
|
147
|
-
t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
|
|
148
|
-
/** The number skeleton is invalid. */
|
|
149
|
-
t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
|
|
150
|
-
/** The date time skeleton is invalid. */
|
|
151
|
-
t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
|
|
152
|
-
/** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
|
|
153
|
-
t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
|
|
154
|
-
/** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
|
|
155
|
-
t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
|
|
156
|
-
/** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
|
|
157
|
-
t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
|
|
158
|
-
/** Missing select argument options (e.g. `{foo, select}`) */
|
|
159
|
-
t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
|
|
160
|
-
/** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
|
|
161
|
-
t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
162
|
-
/** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
|
|
163
|
-
t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
|
|
164
|
-
/** Expecting a selector in `select` argument (e.g `{foo, select}`) */
|
|
165
|
-
t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
|
|
166
|
-
/** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
|
|
167
|
-
t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
|
|
168
|
-
/** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
|
|
169
|
-
t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
|
|
170
|
-
/**
|
|
171
|
-
* Expecting a message fragment after the `plural` or `selectordinal` selector
|
|
172
|
-
* (e.g. `{foo, plural, one}`)
|
|
173
|
-
*/
|
|
174
|
-
t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
|
|
175
|
-
/** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
|
|
176
|
-
t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
|
|
177
|
-
/**
|
|
178
|
-
* Duplicate selectors in `plural` or `selectordinal` argument.
|
|
179
|
-
* (e.g. {foo, plural, one {#} one {#}})
|
|
180
|
-
*/
|
|
181
|
-
t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
|
|
182
|
-
/** Duplicate selectors in `select` argument.
|
|
183
|
-
* (e.g. {foo, select, apple {apple} apple {apple}})
|
|
184
|
-
*/
|
|
185
|
-
t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
|
|
186
|
-
/** Plural or select argument option must have `other` clause. */
|
|
187
|
-
t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
|
|
188
|
-
/** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
|
|
189
|
-
t[t.INVALID_TAG=23]="INVALID_TAG",
|
|
190
|
-
/** The tag name is invalid. (e.g. `<123>foo</123>`) */
|
|
191
|
-
t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
|
|
192
|
-
/** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
|
|
193
|
-
t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
|
|
194
|
-
/** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
|
|
195
|
-
t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(Tt||(Tt={})),function(t){
|
|
196
|
-
/**
|
|
197
|
-
* Raw text
|
|
198
|
-
*/
|
|
199
|
-
t[t.literal=0]="literal",
|
|
200
|
-
/**
|
|
201
|
-
* Variable w/o any format, e.g `var` in `this is a {var}`
|
|
202
|
-
*/
|
|
203
|
-
t[t.argument=1]="argument",
|
|
204
|
-
/**
|
|
205
|
-
* Variable w/ number format
|
|
206
|
-
*/
|
|
207
|
-
t[t.number=2]="number",
|
|
208
|
-
/**
|
|
209
|
-
* Variable w/ date format
|
|
210
|
-
*/
|
|
211
|
-
t[t.date=3]="date",
|
|
212
|
-
/**
|
|
213
|
-
* Variable w/ time format
|
|
214
|
-
*/
|
|
215
|
-
t[t.time=4]="time",
|
|
216
|
-
/**
|
|
217
|
-
* Variable w/ select format
|
|
218
|
-
*/
|
|
219
|
-
t[t.select=5]="select",
|
|
220
|
-
/**
|
|
221
|
-
* Variable w/ plural format
|
|
222
|
-
*/
|
|
223
|
-
t[t.plural=6]="plural",
|
|
224
|
-
/**
|
|
225
|
-
* Only possible within plural argument.
|
|
226
|
-
* This is the `#` symbol that will be substituted with the count.
|
|
227
|
-
*/
|
|
228
|
-
t[t.pound=7]="pound",
|
|
229
|
-
/**
|
|
230
|
-
* XML-like tag
|
|
231
|
-
*/
|
|
232
|
-
t[t.tag=8]="tag"}(vt||(vt={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(wt||(wt={}));var It=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,kt=/(?:[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
|
-
/**
|
|
234
|
-
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
235
|
-
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
|
|
236
|
-
* with some tweaks
|
|
237
|
-
*/
|
|
238
|
-
/**
|
|
239
|
-
* Parse Date time skeleton into Intl.DateTimeFormatOptions
|
|
240
|
-
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
241
|
-
* @public
|
|
242
|
-
* @param skeleton skeleton string
|
|
243
|
-
*/
|
|
244
|
-
function Ut(t){var e={};return t.replace(kt,(function(t){var n=t.length;switch(t[0]){
|
|
245
|
-
// Era
|
|
246
|
-
case"G":e.era=4===n?"long":5===n?"narrow":"short";break;
|
|
247
|
-
// Year
|
|
248
|
-
case"y":e.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
|
|
249
|
-
// Quarter
|
|
250
|
-
case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
251
|
-
// Month
|
|
252
|
-
case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;
|
|
253
|
-
// Week
|
|
254
|
-
case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
255
|
-
// Weekday
|
|
256
|
-
case"E":e.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;
|
|
257
|
-
// Period
|
|
258
|
-
case"a":// AM, PM
|
|
259
|
-
e.hour12=!0;break;case"b":// am, pm, noon, midnight
|
|
260
|
-
case"B":// flexible day periods
|
|
261
|
-
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
262
|
-
// Hour
|
|
263
|
-
case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
264
|
-
// Minute
|
|
265
|
-
case"m":e.minute=["numeric","2-digit"][n-1];break;
|
|
266
|
-
// Second
|
|
267
|
-
case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
268
|
-
// Zone
|
|
269
|
-
case"z":// 1..3, 4: specific non-location format
|
|
270
|
-
e.timeZoneName=n<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
|
|
271
|
-
case"O":// 1, 4: miliseconds in day short, long
|
|
272
|
-
case"v":// 1, 4: generic non-location format
|
|
273
|
-
case"V":// 1, 2, 3, 4: time zone ID or city
|
|
274
|
-
case"X":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
275
|
-
case"x":// 1, 2, 3, 4: The ISO8601 varios formats
|
|
276
|
-
throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
|
|
277
|
-
// @generated from regex-gen.ts
|
|
278
|
-
var Gt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var Ft=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,zt=/^(@+)?(\+|#+)?[rs]?$/g,Zt=/(\*)(0+)|(#+)(0+)|(0+)/g,jt=/^(0+)$/;function Wt(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(zt,(function(t,n,r){
|
|
279
|
-
// @@@ case
|
|
280
|
-
return"string"!=typeof r?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):"+"===r?e.minimumSignificantDigits=n.length:"#"===n[0]?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),e}function Vt(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function _t(t){
|
|
281
|
-
// Engineering
|
|
282
|
-
var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if("+!"===n?(e.signDisplay="always",t=t.slice(2)):"+?"===n&&(e.signDisplay="exceptZero",t=t.slice(2)),!jt.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Yt(t){var e=Vt(t);return e||{}}
|
|
283
|
-
/**
|
|
284
|
-
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
|
285
|
-
*/function Jt(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=St(St(St({},e),{notation:"scientific"}),i.options.reduce((function(t,e){return St(St({},t),Yt(e))}),{}));continue;case"engineering":e=St(St(St({},e),{notation:"engineering"}),i.options.reduce((function(t,e){return St(St({},t),Yt(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
|
|
286
|
-
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
|
287
|
-
case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;
|
|
288
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
289
|
-
case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Zt,(function(t,n,r,i,o,s){if(n)e.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(s)throw new Error("We currently do not support exact integer digits")}return""}));continue}
|
|
290
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
|
291
|
-
if(jt.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(Ft.test(i.stem)){
|
|
292
|
-
// Precision
|
|
293
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
|
294
|
-
// precision-integer case
|
|
295
|
-
if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ft,(function(t,n,r,i,o,s){
|
|
296
|
-
// .000* case (before ICU67 it was .000+)
|
|
297
|
-
return"*"===r?e.minimumFractionDigits=n.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&s?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+s.length):(e.minimumFractionDigits=n.length,e.maximumFractionDigits=n.length),""}));var o=i.options[0];
|
|
298
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
|
299
|
-
"w"===o?e=St(St({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=St(St({},e),Wt(o)))}
|
|
300
|
-
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
|
301
|
-
else if(zt.test(i.stem))e=St(St({},e),Wt(i.stem));else{var s=Vt(i.stem);s&&(e=St(St({},e),s));var a=_t(i.stem);a&&(e=St(St({},e),a))}}return e}
|
|
302
|
-
// @generated from time-data-gen.ts
|
|
303
|
-
// prettier-ignore
|
|
304
|
-
var Xt,qt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};
|
|
305
|
-
/**
|
|
306
|
-
* Returns the best matching date time pattern if a date time skeleton
|
|
307
|
-
* pattern is provided with a locale. Follows the Unicode specification:
|
|
308
|
-
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
|
309
|
-
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
|
310
|
-
* @param locale
|
|
311
|
-
*/
|
|
312
|
-
/**
|
|
313
|
-
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
|
314
|
-
* of the given `locale` to the corresponding time pattern.
|
|
315
|
-
* @param locale
|
|
316
|
-
*/
|
|
317
|
-
function Kt(t){var e=t.hourCycle;if(void 0===e&&
|
|
318
|
-
// @ts-ignore hourCycle(s) is not identified yet
|
|
319
|
-
t.hourCycles&&
|
|
320
|
-
// @ts-ignore
|
|
321
|
-
t.hourCycles.length&&(
|
|
322
|
-
// @ts-ignore
|
|
323
|
-
e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}
|
|
324
|
-
// TODO: Once hourCycle is fully supported remove the following with data generation
|
|
325
|
-
var n,r=t.language;return"root"!==r&&(n=t.maximize().region),(qt[n||""]||qt[r||""]||qt["".concat(r,"-001")]||qt["001"])[0]}var Qt=new RegExp("^".concat(It.source,"*")),$t=new RegExp("".concat(It.source,"*$"));function te(t,e){return{start:t,end:e}}
|
|
326
|
-
// #region Ponyfills
|
|
327
|
-
// Consolidate these variables up top for easier toggling during debugging
|
|
328
|
-
var ee=!!String.prototype.startsWith,ne=!!String.fromCodePoint,re=!!Object.fromEntries,ie=!!String.prototype.codePointAt,oe=!!String.prototype.trimStart,se=!!String.prototype.trimEnd,ae=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},ce=!0;try{
|
|
329
|
-
/**
|
|
330
|
-
* legacy Edge or Xbox One browser
|
|
331
|
-
* Unicode flag support: supported
|
|
332
|
-
* Pattern_Syntax support: not supported
|
|
333
|
-
* See https://github.com/formatjs/formatjs/issues/2822
|
|
334
|
-
*/
|
|
335
|
-
ce="a"===(null===(Xt=ge("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Xt?void 0:Xt[0])}catch(t){ce=!1}var le,ue=ee?// Native
|
|
336
|
-
function(t,e,n){return t.startsWith(e,n)}:// For IE11
|
|
337
|
-
function(t,e,n){return t.slice(n,n+e.length)===e},he=ne?String.fromCodePoint:// IE11
|
|
338
|
-
function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n,r="",i=t.length,o=0;i>o;){if((n=t[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},fe=
|
|
339
|
-
// native
|
|
340
|
-
re?Object.fromEntries:// Ponyfill
|
|
341
|
-
function(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],s=i[1];e[o]=s}return e},pe=ie?// Native
|
|
342
|
-
function(t,e){return t.codePointAt(e)}:// IE 11
|
|
343
|
-
function(t,e){var n=t.length;if(!(e<0||e>=n)){var r,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},me=oe?// Native
|
|
344
|
-
function(t){return t.trimStart()}:// Ponyfill
|
|
345
|
-
function(t){return t.replace(Qt,"")},de=se?// Native
|
|
346
|
-
function(t){return t.trimEnd()}:// Ponyfill
|
|
347
|
-
function(t){return t.replace($t,"")};
|
|
348
|
-
// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
|
|
349
|
-
function ge(t,e){return new RegExp(t,e)}
|
|
350
|
-
// #endregion
|
|
351
|
-
if(ce){
|
|
352
|
-
// Native
|
|
353
|
-
var ye=ge("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");le=function(t,e){var n;return ye.lastIndex=e,null!==(n=ye.exec(t)[1])&&void 0!==n?n:""}}else
|
|
354
|
-
// IE11
|
|
355
|
-
le=function(t,e){for(var n=[];;){var r=pe(t,e);if(void 0===r||Te(r)||ve(r))break;n.push(r),e+=r>=65536?2:1}return he.apply(void 0,n)};var Ee=/** @class */function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,n){for(var r=[];!this.isEOF();){var i=this.char();if(123/* `{` */===i){if((o=this.parseArgument(t,n)).err)return o;r.push(o.val)}else{if(125/* `}` */===i&&t>0)break;if(35/* `#` */!==i||"plural"!==e&&"selectordinal"!==e){if(60/* `<` */===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(Tt.UNMATCHED_CLOSING_TAG,te(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&be(this.peek()||0)){if((o=this.parseTag(t,e)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(t,e)).err)return o;r.push(o.val)}}else{var s=this.clonePosition();this.bump(),r.push({type:vt.pound,location:te(s,this.clonePosition())})}}}return{val:r,err:null}},
|
|
356
|
-
/**
|
|
357
|
-
* A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
|
|
358
|
-
* [custom element name][] except that a dash is NOT always mandatory and uppercase letters
|
|
359
|
-
* are accepted:
|
|
360
|
-
*
|
|
361
|
-
* ```
|
|
362
|
-
* tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
|
|
363
|
-
* tagName ::= [a-z] (PENChar)*
|
|
364
|
-
* PENChar ::=
|
|
365
|
-
* "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
|
|
366
|
-
* [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
|
|
367
|
-
* [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
|
|
368
|
-
* ```
|
|
369
|
-
*
|
|
370
|
-
* [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
|
371
|
-
* NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
|
|
372
|
-
* since other tag-based engines like React allow it
|
|
373
|
-
*/
|
|
374
|
-
t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();// `<`
|
|
375
|
-
var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
|
|
376
|
-
// Self closing tag
|
|
377
|
-
return{val:{type:vt.literal,value:"<".concat(r,"/>"),location:te(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();
|
|
378
|
-
// Expecting a close tag
|
|
379
|
-
if(this.bumpIf("</")){if(this.isEOF()||!be(this.char()))return this.error(Tt.INVALID_TAG,te(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(Tt.UNMATCHED_CLOSING_TAG,te(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:vt.tag,value:r,children:o,location:te(n,this.clonePosition())},err:null}:this.error(Tt.INVALID_TAG,te(s,this.clonePosition())))}return this.error(Tt.UNCLOSED_TAG,te(n,this.clonePosition()))}return this.error(Tt.INVALID_TAG,te(n,this.clonePosition()))},
|
|
380
|
-
/**
|
|
381
|
-
* This method assumes that the caller has peeked ahead for the first tag character.
|
|
382
|
-
*/
|
|
383
|
-
t.prototype.parseTagName=function(){var t,e=this.offset();// the first tag name character
|
|
384
|
-
for(this.bump();!this.isEOF()&&(45/* '-' */===(t=this.char())||46/* '.' */===t||t>=48&&t<=57/* 0..9 */||95/* '_' */===t||t>=97&&t<=122/** a..z */||t>=65&&t<=90/* A..Z */||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(t,e){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(e);if(i)r+=i;else{var o=this.tryParseUnquoted(t,e);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var a=te(n,this.clonePosition());return{val:{type:vt.literal,value:r,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(be(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t;
|
|
385
|
-
/** See `parseTag` function docs. */},
|
|
386
|
-
/**
|
|
387
|
-
* Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
|
|
388
|
-
* a character that requires quoting (that is, "only where needed"), and works the same in
|
|
389
|
-
* nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
|
|
390
|
-
*/
|
|
391
|
-
t.prototype.tryParseQuote=function(t){if(this.isEOF()||39/* `'` */!==this.char())return null;
|
|
392
|
-
// Parse escaped char following the apostrophe, or early return if there is no escaped char.
|
|
393
|
-
// Check if is valid escaped character
|
|
394
|
-
switch(this.peek()){case 39/* `'` */:
|
|
395
|
-
// double quote, should return as a single quote.
|
|
396
|
-
return this.bump(),this.bump(),"'";
|
|
397
|
-
// '{', '<', '>', '}'
|
|
398
|
-
case 123:case 60:case 62:case 125:break;case 35:// '#'
|
|
399
|
-
if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();// apostrophe
|
|
400
|
-
var e=[this.char()];// escaped char
|
|
401
|
-
// read chars until the optional closing apostrophe is found
|
|
402
|
-
for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'` */!==this.peek()){
|
|
403
|
-
// Optional closing apostrophe.
|
|
404
|
-
this.bump();break}e.push(39),
|
|
405
|
-
// Bump one more time because we need to skip 2 characters.
|
|
406
|
-
this.bump()}else e.push(n);this.bump()}return he.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var n=this.char();return 60/* `<` */===n||123/* `{` */===n||35/* `#` */===n&&("plural"===e||"selectordinal"===e)||125/* `}` */===n&&t>0?null:(this.bump(),he(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),// `{`
|
|
407
|
-
this.bumpSpace(),this.isEOF())return this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,te(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(Tt.EMPTY_ARGUMENT,te(n,this.clonePosition()));
|
|
408
|
-
// argument name
|
|
409
|
-
var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Tt.MALFORMED_ARGUMENT,te(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,te(n,this.clonePosition()));switch(this.char()){
|
|
410
|
-
// Simple argument: `{name}`
|
|
411
|
-
case 125/* `}` */:// `}`
|
|
412
|
-
return this.bump(),{val:{type:vt.argument,
|
|
413
|
-
// value does not include the opening and closing braces.
|
|
414
|
-
value:r,location:te(n,this.clonePosition())},err:null};
|
|
415
|
-
// Argument with options: `{name, format, ...}`
|
|
416
|
-
case 44/* `,` */:return this.bump(),// `,`
|
|
417
|
-
this.bumpSpace(),this.isEOF()?this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,te(n,this.clonePosition())):this.parseArgumentOptions(t,e,r,n);default:return this.error(Tt.MALFORMED_ARGUMENT,te(n,this.clonePosition()))}},
|
|
418
|
-
/**
|
|
419
|
-
* Advance the parser until the end of the identifier, if it is currently on
|
|
420
|
-
* an identifier character. Return an empty string otherwise.
|
|
421
|
-
*/
|
|
422
|
-
t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=le(this.message,e),r=e+n.length;return this.bumpTo(r),{value:n,location:te(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
|
|
423
|
-
// Parse this range:
|
|
424
|
-
// {name, type, style}
|
|
425
|
-
// ^---^
|
|
426
|
-
switch(s){case"":
|
|
427
|
-
// Expecting a style string number, date, time, plural, selectordinal, or select.
|
|
428
|
-
return this.error(Tt.EXPECT_ARGUMENT_TYPE,te(o,a));case"number":case"date":case"time":
|
|
429
|
-
// Parse this range:
|
|
430
|
-
// {name, number, style}
|
|
431
|
-
// ^-------^
|
|
432
|
-
this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition();if((y=this.parseSimpleArgStyleIfPossible()).err)return y;if(0===(p=de(y.val)).length)return this.error(Tt.EXPECT_ARGUMENT_STYLE,te(this.clonePosition(),this.clonePosition()));c={style:p,styleLocation:te(l,this.clonePosition())}}if((E=this.tryParseArgumentClose(r)).err)return E;var u=te(r,this.clonePosition());
|
|
433
|
-
// Extract style or skeleton
|
|
434
|
-
if(c&&ue(null==c?void 0:c.style,"::",0)){
|
|
435
|
-
// Skeleton starts with `::`.
|
|
436
|
-
var h=me(c.style.slice(2));if("number"===s)return(y=this.parseNumberSkeletonFromString(h,c.styleLocation)).err?y:{val:{type:vt.number,value:n,location:u,style:y.val},err:null};if(0===h.length)return this.error(Tt.EXPECT_DATE_TIME_SKELETON,u);var f=h;
|
|
437
|
-
// Get "best match" pattern only if locale is passed, if not, let it
|
|
438
|
-
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
439
|
-
// for unsupported patterns.
|
|
440
|
-
this.locale&&(f=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t.charAt(r);if("j"===i){for(var o=0;r+1<t.length&&t.charAt(r+1)===i;)o++,r++;var s=1+(1&o),a=o<2?1:3+(o>>1),c=Kt(e);for("H"!=c&&"k"!=c||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=c+n}else n+="J"===i?"H":i}return n}(h,this.locale));var p={type:wt.dateTime,pattern:f,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Ut(f):{}};return{val:{type:"date"===s?vt.date:vt.time,value:n,location:u,style:p},err:null}}
|
|
441
|
-
// Regular style or no style.
|
|
442
|
-
return{val:{type:"number"===s?vt.number:"date"===s?vt.date:vt.time,value:n,location:u,style:null!==(i=null==c?void 0:c.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
|
|
443
|
-
// Parse this range:
|
|
444
|
-
// {name, plural, options}
|
|
445
|
-
// ^---------^
|
|
446
|
-
var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Tt.EXPECT_SELECT_ARGUMENT_OPTIONS,te(m,St({},m)));this.bumpSpace();
|
|
447
|
-
// Parse offset:
|
|
448
|
-
// {name, plural, offset:1, options}
|
|
449
|
-
// ^-----^
|
|
450
|
-
// or the first option:
|
|
451
|
-
// {name, plural, one {...} other {...}}
|
|
452
|
-
// ^--^
|
|
453
|
-
var d=this.parseIdentifierIfPossible(),g=0;if("select"!==s&&"offset"===d.value){if(!this.bumpIf(":"))return this.error(Tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,te(this.clonePosition(),this.clonePosition()));var y;if(this.bumpSpace(),(y=this.tryParseDecimalInteger(Tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Tt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return y;
|
|
454
|
-
// Parse another identifier for option parsing
|
|
455
|
-
this.bumpSpace(),d=this.parseIdentifierIfPossible(),g=y.val}var E,b=this.tryParsePluralOrSelectOptions(t,s,e,d);if(b.err)return b;if((E=this.tryParseArgumentClose(r)).err)return E;var T=te(r,this.clonePosition());return"select"===s?{val:{type:vt.select,value:n,options:fe(b.val),location:T},err:null}:{val:{type:vt.plural,value:n,options:fe(b.val),offset:g,pluralType:"plural"===s?"cardinal":"ordinal",location:T},err:null};default:return this.error(Tt.INVALID_ARGUMENT_TYPE,te(o,a))}},t.prototype.tryParseArgumentClose=function(t){
|
|
456
|
-
// Parse: {value, number, ::currency/GBP }
|
|
457
|
-
return this.isEOF()||125/* `}` */!==this.char()?this.error(Tt.EXPECT_ARGUMENT_CLOSING_BRACE,te(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},
|
|
458
|
-
/**
|
|
459
|
-
* See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
|
|
460
|
-
*/
|
|
461
|
-
t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
|
|
462
|
-
// Treat apostrophe as quoting but include it in the style part.
|
|
463
|
-
// Find the end of the quoted literal text.
|
|
464
|
-
this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Tt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,te(n,this.clonePosition()));this.bump();break;case 123/* `{` */:t+=1,this.bump();break;case 125/* `}` */:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var n=[];try{n=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");
|
|
465
|
-
// Parse the skeleton
|
|
466
|
-
for(var e=[],n=0,r=t.split(Gt).filter((function(t){return t.length>0}));n<r.length;n++){var i=r[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var o=i[0],s=i.slice(1),a=0,c=s;a<c.length;a++)if(0===c[a].length)throw new Error("Invalid number skeleton");e.push({stem:o,options:s})}return e}(t)}catch(t){return this.error(Tt.INVALID_NUMBER_SKELETON,e)}return{val:{type:wt.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?Jt(n):{}},err:null}},
|
|
467
|
-
/**
|
|
468
|
-
* @param nesting_level The current nesting level of messages.
|
|
469
|
-
* This can be positive when parsing message fragment in select or plural argument options.
|
|
470
|
-
* @param parent_arg_type The parent argument's type.
|
|
471
|
-
* @param parsed_first_identifier If provided, this is the first identifier-like selector of
|
|
472
|
-
* the argument. It is a by-product of a previous parsing attempt.
|
|
473
|
-
* @param expecting_close_tag If true, this message is directly or indirectly nested inside
|
|
474
|
-
* between a pair of opening and closing tags. The nested message will not parse beyond
|
|
475
|
-
* the closing tag boundary.
|
|
476
|
-
*/
|
|
477
|
-
t.prototype.tryParsePluralOrSelectOptions=function(t,e,n,r){
|
|
478
|
-
// Parse:
|
|
479
|
-
// one {one apple}
|
|
480
|
-
// ^--^
|
|
481
|
-
for(var i,o=!1,s=[],a=new Set,c=r.value,l=r.location;;){if(0===c.length){var u=this.clonePosition();if("select"===e||!this.bumpIf("="))break;
|
|
482
|
-
// Try parse `={number}` selector
|
|
483
|
-
var h=this.tryParseDecimalInteger(Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Tt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=te(u,this.clonePosition()),c=this.message.slice(u.offset,this.offset())}
|
|
484
|
-
// Duplicate selector clauses
|
|
485
|
-
if(a.has(c))return this.error("select"===e?Tt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Tt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(o=!0),
|
|
486
|
-
// Parse:
|
|
487
|
-
// one {one apple}
|
|
488
|
-
// ^----------^
|
|
489
|
-
this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?Tt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,te(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,e,n);if(p.err)return p;var m=this.tryParseArgumentClose(f);if(m.err)return m;s.push([c,{value:p.val,location:te(f,this.clonePosition())}]),
|
|
490
|
-
// Keep track of the existing selectors
|
|
491
|
-
a.add(c),
|
|
492
|
-
// Prep next selector clause.
|
|
493
|
-
this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,l=i.location}return 0===s.length?this.error("select"===e?Tt.EXPECT_SELECT_ARGUMENT_SELECTOR:Tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,te(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(Tt.MISSING_OTHER_CLAUSE,te(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(!(s>=48/* `0` */&&s<=57/* `9` */))break;i=!0,o=10*o+(s-48),this.bump()}var a=te(r,this.clonePosition());return i?ae(o*=n)?{val:o,err:null}:this.error(e,a):this.error(t,a)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){
|
|
494
|
-
// This is much faster than `Object.assign` or spread.
|
|
495
|
-
return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
|
|
496
|
-
/**
|
|
497
|
-
* Return the code point at the current position of the parser.
|
|
498
|
-
* Throws if the index is out of bound.
|
|
499
|
-
*/
|
|
500
|
-
t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=pe(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},
|
|
501
|
-
/** Bump the parser to the next UTF-16 code unit. */
|
|
502
|
-
t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10/* '\n' */===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,
|
|
503
|
-
// 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
|
|
504
|
-
this.position.offset+=t<65536?1:2)}},
|
|
505
|
-
/**
|
|
506
|
-
* If the substring starting at the current position of the parser has
|
|
507
|
-
* the given prefix, then bump the parser to the character immediately
|
|
508
|
-
* following the prefix and return true. Otherwise, don't bump the parser
|
|
509
|
-
* and return false.
|
|
510
|
-
*/
|
|
511
|
-
t.prototype.bumpIf=function(t){if(ue(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},
|
|
512
|
-
/**
|
|
513
|
-
* Bump the parser until the pattern character is found and return `true`.
|
|
514
|
-
* Otherwise bump to the end of the file and return `false`.
|
|
515
|
-
*/
|
|
516
|
-
t.prototype.bumpUntil=function(t){var e=this.offset(),n=this.message.indexOf(t,e);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},
|
|
517
|
-
/**
|
|
518
|
-
* Bump the parser to the target offset.
|
|
519
|
-
* If target offset is beyond the end of the input, bump the parser to the end of the input.
|
|
520
|
-
*/
|
|
521
|
-
t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},
|
|
522
|
-
/** advance the parser through all whitespace to the next non-whitespace code unit. */
|
|
523
|
-
t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Te(this.char());)this.bump()},
|
|
524
|
-
/**
|
|
525
|
-
* Peek at the *next* Unicode codepoint in the input without advancing the parser.
|
|
526
|
-
* If the input has been exhausted, then this returns null.
|
|
527
|
-
*/
|
|
528
|
-
t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(t>=65536?2:1));return null!=n?n:null},t}();
|
|
529
|
-
/**
|
|
530
|
-
* This check if codepoint is alphabet (lower & uppercase)
|
|
531
|
-
* @param codepoint
|
|
532
|
-
* @returns
|
|
533
|
-
*/function be(t){return t>=97&&t<=122||t>=65&&t<=90}
|
|
534
|
-
/**
|
|
535
|
-
* Code point equivalent of regex `\p{White_Space}`.
|
|
536
|
-
* From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
537
|
-
*/
|
|
538
|
-
function Te(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}
|
|
539
|
-
/**
|
|
540
|
-
* Code point equivalent of regex `\p{Pattern_Syntax}`.
|
|
541
|
-
* See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
|
|
542
|
-
*/function ve(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function we(t){t.forEach((function(t){if(delete t.location,Lt(t)||Bt(t))for(var e in t.options)delete t.options[e].location,we(t.options[e].value);else Nt(t)&&Dt(t.style)||(Ct(t)||Mt(t))&&xt(t.style)?delete t.style.location:Rt(t)&&we(t.children)}))}function Se(t,e){void 0===e&&(e={}),e=St({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Ee(t,e).parse();if(n.err){var r=SyntaxError(Tt[n.err.kind]);
|
|
543
|
-
// @ts-expect-error Assign to error object
|
|
544
|
-
throw r.location=n.err.location,
|
|
545
|
-
// @ts-expect-error Assign to error object
|
|
546
|
-
r.originalMessage=n.err.message,r}return(null==e?void 0:e.captureLocation)||we(n.val),n.val}
|
|
547
|
-
|
|
548
|
-
// Main
|
|
549
|
-
|
|
550
|
-
function Ae(t,e){var n=e&&e.cache?e.cache:Pe,r=e&&e.serializer?e.serializer:Me;return(e&&e.strategy?e.strategy:Ce)(t,{cache:n,serializer:r})}
|
|
551
|
-
|
|
552
|
-
// Strategy
|
|
553
|
-
|
|
554
|
-
function He(t,e,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),s=e.get(o);return void 0===s&&(s=t.call(this,r),e.set(o,s)),s}function Oe(t,e,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=e.get(i);return void 0===o&&(o=t.apply(this,r),e.set(i,o)),o}function Ne(t,e,n,r,i){return n.bind(e,t,r,i)}function Ce(t,e){return Ne(t,this,1===t.length?He:Oe,e.cache.create(),e.serializer)}
|
|
555
|
-
// Serializer
|
|
556
|
-
var Me=function(){return JSON.stringify(arguments)};
|
|
557
|
-
|
|
558
|
-
// Cache
|
|
559
|
-
|
|
560
|
-
function Le(){this.cache=Object.create(null)}Le.prototype.get=function(t){return this.cache[t]},Le.prototype.set=function(t,e){this.cache[t]=e};var Be,Pe={create:function(){
|
|
561
|
-
// @ts-ignore
|
|
562
|
-
return new Le}},Re={variadic:function(t,e){return Ne(t,this,Oe,e.cache.create(),e.serializer)},monadic:function(t,e){return Ne(t,this,He,e.cache.create(),e.serializer)}};!function(t){
|
|
563
|
-
// When we have a placeholder but no value to format
|
|
564
|
-
t.MISSING_VALUE="MISSING_VALUE",
|
|
565
|
-
// When value supplied is invalid
|
|
566
|
-
t.INVALID_VALUE="INVALID_VALUE",
|
|
567
|
-
// When we need specific Intl API but it's not available
|
|
568
|
-
t.MISSING_INTL_API="MISSING_INTL_API"}(Be||(Be={}));var De,xe=/** @class */function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=r,i}return bt(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),Ie=/** @class */function(t){function e(e,n,r,i){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Be.INVALID_VALUE,i)||this}return bt(e,t),e}(xe),ke=/** @class */function(t){function e(e,n,r){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),Be.INVALID_VALUE,r)||this}return bt(e,t),e}(xe),Ue=/** @class */function(t){function e(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),Be.MISSING_VALUE,n)||this}return bt(e,t),e}(xe);function Ge(t){return"function"==typeof t}
|
|
569
|
-
// TODO(skeleton): add skeleton support
|
|
570
|
-
function Fe(t,e,n,r,i,o,
|
|
571
|
-
// For debugging
|
|
572
|
-
s){
|
|
573
|
-
// Hot path for straight simple msg translations
|
|
574
|
-
if(1===t.length&&Ht(t[0]))return[{type:De.literal,value:t[0].value}];for(var a=[],c=0,l=t;c<l.length;c++){var u=l[c];
|
|
575
|
-
// Exit early for string parts.
|
|
576
|
-
if(Ht(u))a.push({type:De.literal,value:u.value});else
|
|
577
|
-
// TODO: should this part be literal type?
|
|
578
|
-
// Replace `#` in plural rules with the actual numeric value.
|
|
579
|
-
if(Pt(u))"number"==typeof o&&a.push({type:De.literal,value:n.getNumberFormat(e).format(o)});else{var h=u.value;
|
|
580
|
-
// Enforce that all required values are provided by the caller.
|
|
581
|
-
if(!i||!(h in i))throw new Ue(h,s);var f=i[h];if(Ot(u))f&&"string"!=typeof f&&"number"!=typeof f||(f="string"==typeof f||"number"==typeof f?String(f):""),a.push({type:"string"==typeof f?De.literal:De.object,value:f});else
|
|
582
|
-
// Recursively format plural and select parts' option — which can be a
|
|
583
|
-
// nested pattern structure. The choosing of the option to use is
|
|
584
|
-
// abstracted-by and delegated-to the part helper object.
|
|
585
|
-
if(Ct(u)){var p="string"==typeof u.style?r.date[u.style]:xt(u.style)?u.style.parsedOptions:void 0;a.push({type:De.literal,value:n.getDateTimeFormat(e,p).format(f)})}else if(Mt(u)){p="string"==typeof u.style?r.time[u.style]:xt(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:De.literal,value:n.getDateTimeFormat(e,p).format(f)})}else if(Nt(u)){(p="string"==typeof u.style?r.number[u.style]:Dt(u.style)?u.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),a.push({type:De.literal,value:n.getNumberFormat(e,p).format(f)})}else{if(Rt(u)){var m=u.children,d=u.value,g=i[d];if(!Ge(g))throw new ke(d,"function",s);var y=g(Fe(m,e,n,r,i,o).map((function(t){return t.value})));Array.isArray(y)||(y=[y]),a.push.apply(a,y.map((function(t){return{type:"string"==typeof t?De.literal:De.object,value:t}})))}if(Lt(u)){if(!(E=u.options[f]||u.options.other))throw new Ie(u.value,f,Object.keys(u.options),s);a.push.apply(a,Fe(E.value,e,n,r,i))}else if(Bt(u)){var E;if(!(E=u.options["=".concat(f)])){if(!Intl.PluralRules)throw new xe('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',Be.MISSING_INTL_API,s);var b=n.getPluralRules(e,{type:u.pluralType}).select(f-(u.offset||0));E=u.options[b]||u.options.other}if(!E)throw new Ie(u.value,f,Object.keys(u.options),s);a.push.apply(a,Fe(E.value,e,n,r,i,f-(u.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var n=t[t.length-1];return n&&n.type===De.literal&&e.type===De.literal?n.value+=e.value:t.push(e),t}),[])}(a)}
|
|
586
|
-
/*
|
|
587
|
-
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
588
|
-
Copyrights licensed under the New BSD License.
|
|
589
|
-
See the accompanying LICENSE file for terms.
|
|
590
|
-
*/
|
|
591
|
-
// -- MessageFormat --------------------------------------------------------
|
|
592
|
-
function ze(t,e){return e?Object.keys(t).reduce((function(n,r){var i,o;return n[r]=(i=t[r],(o=e[r])?St(St(St({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=St(St({},i[e]),o[e]||{}),t}),{})):i),n}),St({},t)):t}function Ze(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(De||(De={}));var je=/** @class */function(){function t(e,n,r,i){var o,s=this;if(void 0===n&&(n=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=s.formatToParts(t);
|
|
593
|
-
// Hot path for straight simple msg translations
|
|
594
|
-
if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===De.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(t){return Fe(s.ast,s.locales,s.formatters,s.formats,t,void 0,s.message)},this.resolvedOptions=function(){return{locale:s.resolvedLocale.toString()}},this.getAst=function(){return s.ast},
|
|
595
|
-
// Defined first because it's used to build the format pattern.
|
|
596
|
-
this.locales=n,this.resolvedLocale=t.resolveLocale(n),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
597
|
-
// Parse string messages into an AST.
|
|
598
|
-
this.ast=t.__parse(e,{ignoreTag:null==i?void 0:i.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");
|
|
599
|
-
// Creates a new object with the specified `formats` merged with the default
|
|
600
|
-
// formats.
|
|
601
|
-
this.formats=ze(t.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ae((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,At([void 0],e,!1)))}),{cache:Ze(o.number),strategy:Re.variadic}),getDateTimeFormat:Ae((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,At([void 0],e,!1)))}),{cache:Ze(o.dateTime),strategy:Re.variadic}),getPluralRules:Ae((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,At([void 0],e,!1)))}),{cache:Ze(o.pluralRules),strategy:Re.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=Se,
|
|
602
|
-
// Default format options used as the prototype of the `formats` provided to the
|
|
603
|
-
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
604
|
-
// and Intl.DateTimeFormat instances.
|
|
605
|
-
t.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"}}},t}();const We={},Ve=(t,e,n)=>n?(e in We||(We[e]={}),t in We[e]||(We[e][t]=n),n):n,_e=(t,e)=>{if(null==e)return;if(e in We&&t in We[e])return We[e][t];const n=wn(e);for(let r=0;r<n.length;r++){const i=qe(n[r],t);if(i)return Ve(t,e,i)}};let Ye;const Je=at({});function Xe(t){return t in Ye}function qe(t,e){if(!Xe(t))return null;const n=function(t){return Ye[t]||null}(t);return function(t,e){if(null==e)return;if(e in t)return t[e];const n=e.split(".");let r=t;for(let t=0;t<n.length;t++)if("object"==typeof r){if(t>0){const e=n.slice(t,n.length).join(".");if(e in r){r=r[e];break}}r=r[n[t]]}else r=void 0;return r}(n,e)}function Ke(t,...e){delete We[t],Je.update((n=>(n[t]=yt.all([n[t]||{},...e]),n)))}ct([Je],(([t])=>Object.keys(t))),Je.subscribe((t=>Ye=t));const Qe={};function $e(t){return Qe[t]}function tn(t){return null!=t&&wn(t).some((t=>{var e;return null==(e=$e(t))?void 0:e.size}))}function en(t,e){const n=Promise.all(e.map((e=>(function(t,e){Qe[t].delete(e),0===Qe[t].size&&delete Qe[t]}(t,e),e().then((t=>t.default||t))))));return n.then((e=>Ke(t,...e)))}const nn={};function rn(t){if(!tn(t))return t in nn?nn[t]:Promise.resolve();const e=function(t){return wn(t).map((t=>{const e=$e(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return nn[t]=Promise.all(e.map((([t,e])=>en(t,e)))).then((()=>{if(tn(t))return rn(t);delete nn[t]})),nn[t]}var on=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable;function cn({locale:t,id:e}){console.warn(`[svelte-i18n] The message "${e}" was not found in "${wn(t).join('", "')}".${tn(Sn())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`)}const ln={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 ln}const hn=at(!1);var fn=Object.defineProperty,pn=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,dn=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,En=(t,e,n)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;let bn;const Tn=at(null);function vn(t){return t.split("-").map(((t,e,n)=>n.slice(0,e+1).join("-"))).reverse()}function wn(t,e=un().fallbackLocale){const n=vn(t);return e?[...new Set([...n,...vn(e)])]:n}function Sn(){return null!=bn?bn:void 0}Tn.subscribe((t=>{bn=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const An=(Hn=((t,e)=>{for(var n in e||(e={}))gn.call(e,n)&&En(t,n,e[n]);if(dn)for(var n of dn(e))yn.call(e,n)&&En(t,n,e[n]);return t})({},Tn),pn(Hn,mn({set:t=>{if(t&&function(t){if(null==t)return;const e=wn(t);for(let t=0;t<e.length;t++){const n=e[t];if(Xe(n))return n}}(t)&&tn(t)){const{loadingDelay:e}=un();let n;return"undefined"!=typeof window&&null!=Sn()&&e?n=window.setTimeout((()=>hn.set(!0)),e):hn.set(!0),rn(t).then((()=>{Tn.set(t)})).finally((()=>{clearTimeout(n),hn.set(!1)}))}return Tn.set(t)}})));var Hn;const On=t=>{const e=Object.create(null);return n=>{const r=JSON.stringify(n);return r in e?e[r]:e[r]=t(n)}};var Nn=Object.defineProperty,Cn=Object.getOwnPropertySymbols,Mn=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,Bn=(t,e,n)=>e in t?Nn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pn=(t,e)=>{for(var n in e||(e={}))Mn.call(e,n)&&Bn(t,n,e[n]);if(Cn)for(var n of Cn(e))Ln.call(e,n)&&Bn(t,n,e[n]);return t},Rn=(t,e)=>{var n={};for(var r in t)Mn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&Cn)for(var r of Cn(t))e.indexOf(r)<0&&Ln.call(t,r)&&(n[r]=t[r]);return n};const Dn=(t,e)=>{const{formats:n}=un();if(t in n&&e in n[t])return n[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},xn=On((t=>{var e=t,{locale:n,format:r}=e,i=Rn(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Dn("number",r)),new Intl.NumberFormat(n,i)})),In=On((t=>{var e=t,{locale:n,format:r}=e,i=Rn(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Dn("date",r):0===Object.keys(i).length&&(i=Dn("date","short")),new Intl.DateTimeFormat(n,i)})),kn=On((t=>{var e=t,{locale:n,format:r}=e,i=Rn(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Dn("time",r):0===Object.keys(i).length&&(i=Dn("time","short")),new Intl.DateTimeFormat(n,i)})),Un=On((
|
|
606
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
607
|
-
(t,e=Sn())=>new je(t,e,un().formats,{ignoreTag:un().ignoreTag}))),Gn=(t,e={})=>{var n,r,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:c=Sn(),default:l}=s;if(null==c)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let u=_e(t,c);if(u){if("string"!=typeof u)return console.warn(`[svelte-i18n] Message with id "${t}" 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:c,id:t,defaultValue:l}))?i:l)?o:t;if(!a)return u;let h=u;try{h=Un(u,c).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return h},Fn=(t,e)=>((t={})=>{var e=t,{locale:n=Sn()}=e,r=Rn(e,["locale"]);return kn(Pn({locale:n},r))})(e).format(t),zn=(t,e)=>((t={})=>{var e=t,{locale:n=Sn()}=e,r=Rn(e,["locale"]);return In(Pn({locale:n},r))})(e).format(t),Zn=(t,e)=>((t={})=>{var e=t,{locale:n=Sn()}=e,r=Rn(e,["locale"]);return xn(Pn({locale:n},r))})(e).format(t),jn=(t,e=Sn())=>_e(t,e),Wn=ct([An,Je],(()=>Gn));function Vn(t,e){Ke(t,e)}ct([An],(()=>Fn)),ct([An],(()=>zn)),ct([An],(()=>Zn)),ct([An,Je],(()=>jn)),function(t){const e=t,{formats:n}=e,r=((t,e)=>{var n={};for(var r in t)sn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&on)for(var r of on(t))e.indexOf(r)<0&&an.call(t,r)&&(n[r]=t[r]);return n})(e,["formats"]);let i=t.fallbackLocale;if(t.initialLocale)try{je.resolveLocale(t.initialLocale)&&(i=t.initialLocale)}catch(e){console.warn(`[svelte-i18n] The initial locale "${t.initialLocale}" is not a valid locale.`)}r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,null==r.handleMissingMessage?r.handleMissingMessage=cn:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(ln,r,{initialLocale:i}),n&&("number"in n&&Object.assign(ln.formats.number,n.number),"date"in n&&Object.assign(ln.formats.date,n.date),"time"in n&&Object.assign(ln.formats.time,n.time)),An.set(i)}({fallbackLocale:"en"});const _n={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;function Yn(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var Jn=Yn((function(t,e){
|
|
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
|
-
t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;// eslint-disable-line import/no-mutable-exports
|
|
610
|
-
o||(o=function(t){return t}),s||(s=function(t){return t}),c||(c=function(t,e,n){return t.apply(e,n)}),l||(l=function(t,e){return new t(...e)});const u=w(Array.prototype.forEach),h=w(Array.prototype.pop),f=w(Array.prototype.push),p=w(String.prototype.toLowerCase),m=w(String.prototype.toString),d=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),E=w(String.prototype.trim),b=w(Object.prototype.hasOwnProperty),T=w(RegExp.prototype.test),v=S(TypeError);
|
|
611
|
-
/**
|
|
612
|
-
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
613
|
-
*
|
|
614
|
-
* @param {Function} func - The function to be wrapped and called.
|
|
615
|
-
* @returns {Function} A new function that calls the given function with a specified thisArg and arguments.
|
|
616
|
-
*/
|
|
617
|
-
function w(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return c(t,e,r)}}
|
|
618
|
-
/**
|
|
619
|
-
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
|
620
|
-
*
|
|
621
|
-
* @param {Function} func - The constructor function to be wrapped and called.
|
|
622
|
-
* @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.
|
|
623
|
-
*/function S(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return l(t,n)}}
|
|
624
|
-
/**
|
|
625
|
-
* Add properties to a lookup table
|
|
626
|
-
*
|
|
627
|
-
* @param {Object} set - The set to which elements will be added.
|
|
628
|
-
* @param {Array} array - The array containing elements to be added to the set.
|
|
629
|
-
* @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
|
630
|
-
* @returns {Object} The modified set with added elements.
|
|
631
|
-
*/function A(t,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;e&&
|
|
632
|
-
// Make 'in' and truthy checks like Boolean(set.constructor)
|
|
633
|
-
// independent of any properties defined on Object.prototype.
|
|
634
|
-
// Prevent prototype setters from intercepting set as a this value.
|
|
635
|
-
e(t,null);let o=r.length;for(;o--;){let e=r[o];if("string"==typeof e){const t=i(e);t!==e&&(
|
|
636
|
-
// Config presets (e.g. tags.js, attrs.js) are immutable.
|
|
637
|
-
n(r)||(r[o]=t),e=t)}t[e]=!0}return t}
|
|
638
|
-
/**
|
|
639
|
-
* Clean up an array to harden against CSPP
|
|
640
|
-
*
|
|
641
|
-
* @param {Array} array - The array to be cleaned.
|
|
642
|
-
* @returns {Array} The cleaned version of the array
|
|
643
|
-
*/function H(t){for(let e=0;e<t.length;e++)b(t,e)||(t[e]=null);return t}
|
|
644
|
-
/**
|
|
645
|
-
* Shallow clone an object
|
|
646
|
-
*
|
|
647
|
-
* @param {Object} object - The object to be cloned.
|
|
648
|
-
* @returns {Object} A new object that copies the original.
|
|
649
|
-
*/function O(e){const n=a(null);for(const[r,i]of t(e))b(e,r)&&(Array.isArray(i)?n[r]=H(i):i&&"object"==typeof i&&i.constructor===Object?n[r]=O(i):n[r]=i);return n}
|
|
650
|
-
/**
|
|
651
|
-
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
|
652
|
-
*
|
|
653
|
-
* @param {Object} object - The object to look up the getter function in its prototype chain.
|
|
654
|
-
* @param {String} prop - The property name for which to find the getter function.
|
|
655
|
-
* @returns {Function} The getter function found in the prototype chain or a fallback function.
|
|
656
|
-
*/function N(t,e){for(;null!==t;){const n=i(t,e);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}t=r(t)}function n(){return null}return n}const C=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"]),M=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"]),L=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"]),B=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"]),P=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"]),D=o(["#text"]),x=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"]),I=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"]),k=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"]),G=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=s(/<%[\w\W]*|[\w\W]*%>/gm),z=s(/\${[\w\W]*}/gm),Z=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),W=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),_=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=s(/^html$/i),J=s(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
657
|
-
// SVG
|
|
658
|
-
var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:F,TMPLIT_EXPR:z,DATA_ATTR:Z,ARIA_ATTR:j,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:_,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:J});
|
|
659
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
660
|
-
const q={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,
|
|
661
|
-
// Deprecated
|
|
662
|
-
entityNode:6,
|
|
663
|
-
// Deprecated
|
|
664
|
-
progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},K=function(){return"undefined"==typeof window?null:window},Q=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;
|
|
665
|
-
// Allow the callers to control the unique policy name
|
|
666
|
-
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
|
667
|
-
// Policy creation with duplicate names throws in Trusted Types.
|
|
668
|
-
let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){
|
|
669
|
-
// Policy creation failed (most likely another DOMPurify script has
|
|
670
|
-
// already run). Skip creating the policy, as this will only cause errors
|
|
671
|
-
// if TT are enforced.
|
|
672
|
-
return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function $(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const n=t=>$(t)
|
|
673
|
-
/**
|
|
674
|
-
* Version label, exposed for easier checks
|
|
675
|
-
* if DOMPurify is up to date or not
|
|
676
|
-
*/;if(n.version="3.1.6",
|
|
677
|
-
/**
|
|
678
|
-
* Array of elements that DOMPurify removed during sanitation.
|
|
679
|
-
* Empty if nothing was removed.
|
|
680
|
-
*/
|
|
681
|
-
n.removed=[],!e||!e.document||e.document.nodeType!==q.document)
|
|
682
|
-
// Not running in a browser, provide a factory function
|
|
683
|
-
// so that you can pass your own Window
|
|
684
|
-
return n.isSupported=!1,n;let{document:r}=e;const i=r,s=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:l,Node:w,Element:S,NodeFilter:H,NamedNodeMap:G=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:Z}=e,j=S.prototype,V=N(j,"cloneNode"),_=N(j,"remove"),J=N(j,"nextSibling"),tt=N(j,"childNodes"),et=N(j,"parentNode");
|
|
685
|
-
// As per issue #47, the web-components registry is inherited by a
|
|
686
|
-
// new document created via createHTMLDocument. As per the spec
|
|
687
|
-
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
|
688
|
-
// a new empty registry is used when creating a template contents owner
|
|
689
|
-
// document, so we use that as our parent document to ensure nothing
|
|
690
|
-
// is inherited.
|
|
691
|
-
if("function"==typeof l){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let nt,rt="";const{implementation:it,createNodeIterator:ot,createDocumentFragment:st,getElementsByTagName:at}=r,{importNode:ct}=i;let lt={};
|
|
692
|
-
/**
|
|
693
|
-
* Expose whether this browser supports running the full DOMPurify.
|
|
694
|
-
*/n.isSupported="function"==typeof t&&"function"==typeof et&&it&&void 0!==it.createHTMLDocument;const{MUSTACHE_EXPR:ut,ERB_EXPR:ht,TMPLIT_EXPR:ft,DATA_ATTR:pt,ARIA_ATTR:mt,IS_SCRIPT_OR_DATA:dt,ATTR_WHITESPACE:gt,CUSTOM_ELEMENT:yt}=X;let{IS_ALLOWED_URI:Et}=X,bt=null;
|
|
695
|
-
/**
|
|
696
|
-
* We consider the elements and attributes below to be safe. Ideally
|
|
697
|
-
* don't add any new ones but feel free to remove unwanted ones.
|
|
698
|
-
*/
|
|
699
|
-
/* allowed element names */const Tt=A({},[...C,...M,...L,...P,...D]);
|
|
700
|
-
/* Allowed attribute names */let vt=null;const wt=A({},[...x,...I,...k,...U]);
|
|
701
|
-
/*
|
|
702
|
-
* Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.
|
|
703
|
-
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
|
704
|
-
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
|
705
|
-
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
|
706
|
-
*/let St=Object.seal(a(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}})),At=null,Ht=null,Ot=!0,Nt=!0,Ct=!1,Mt=!0,Lt=!1,Bt=!0,Pt=!1,Rt=!1,Dt=!1,xt=!1,It=!1,kt=!1,Ut=!0,Gt=!1;
|
|
707
|
-
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */const Ft="user-content-";
|
|
708
|
-
/* Keep element content when removing element? */let zt=!0,Zt=!1,jt={},Wt=null;
|
|
709
|
-
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
|
710
|
-
* of importing it into a new Document and returning a sanitized copy */const Vt=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);
|
|
711
|
-
/* Tags that are safe for data: URIs */let _t=null;const Yt=A({},["audio","video","img","source","image","track"]);
|
|
712
|
-
/* Attributes safe for values like "javascript:" */let Jt=null;const Xt=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qt="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";
|
|
713
|
-
/* Document namespace */
|
|
714
|
-
let $t=Qt,te=!1,ee=null;const ne=A({},[qt,Kt,Qt],m);
|
|
715
|
-
/* Parsing of strict XHTML documents */let re=null;const ie=["application/xhtml+xml","text/html"],oe="text/html";let se=null,ae=null;
|
|
716
|
-
/* Keep a reference to config to pass to hooks */
|
|
717
|
-
/* Ideally, do not touch anything below this line */
|
|
718
|
-
/* ______________________________________________ */
|
|
719
|
-
const ce=r.createElement("form"),le=function(t){return t instanceof RegExp||t instanceof Function},ue=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ae||ae!==t){if(
|
|
720
|
-
/* Shield configuration object from tampering */
|
|
721
|
-
t&&"object"==typeof t||(t={})
|
|
722
|
-
/* Shield configuration object from prototype pollution */,t=O(t),re=
|
|
723
|
-
// eslint-disable-next-line unicorn/prefer-includes
|
|
724
|
-
-1===ie.indexOf(t.PARSER_MEDIA_TYPE)?oe:t.PARSER_MEDIA_TYPE,
|
|
725
|
-
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
726
|
-
se="application/xhtml+xml"===re?m:p,
|
|
727
|
-
/* Set configuration parameters */
|
|
728
|
-
bt=b(t,"ALLOWED_TAGS")?A({},t.ALLOWED_TAGS,se):Tt,vt=b(t,"ALLOWED_ATTR")?A({},t.ALLOWED_ATTR,se):wt,ee=b(t,"ALLOWED_NAMESPACES")?A({},t.ALLOWED_NAMESPACES,m):ne,Jt=b(t,"ADD_URI_SAFE_ATTR")?A(O(Xt),
|
|
729
|
-
// eslint-disable-line indent
|
|
730
|
-
t.ADD_URI_SAFE_ATTR,
|
|
731
|
-
// eslint-disable-line indent
|
|
732
|
-
se):Xt,_t=b(t,"ADD_DATA_URI_TAGS")?A(O(Yt),
|
|
733
|
-
// eslint-disable-line indent
|
|
734
|
-
t.ADD_DATA_URI_TAGS,
|
|
735
|
-
// eslint-disable-line indent
|
|
736
|
-
se):Yt,Wt=b(t,"FORBID_CONTENTS")?A({},t.FORBID_CONTENTS,se):Vt,At=b(t,"FORBID_TAGS")?A({},t.FORBID_TAGS,se):{},Ht=b(t,"FORBID_ATTR")?A({},t.FORBID_ATTR,se):{},jt=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,Ot=!1!==t.ALLOW_ARIA_ATTR,// Default true
|
|
737
|
-
Nt=!1!==t.ALLOW_DATA_ATTR,// Default true
|
|
738
|
-
Ct=t.ALLOW_UNKNOWN_PROTOCOLS||!1,// Default false
|
|
739
|
-
Mt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,// Default true
|
|
740
|
-
Lt=t.SAFE_FOR_TEMPLATES||!1,// Default false
|
|
741
|
-
Bt=!1!==t.SAFE_FOR_XML,// Default true
|
|
742
|
-
Pt=t.WHOLE_DOCUMENT||!1,// Default false
|
|
743
|
-
xt=t.RETURN_DOM||!1,// Default false
|
|
744
|
-
It=t.RETURN_DOM_FRAGMENT||!1,// Default false
|
|
745
|
-
kt=t.RETURN_TRUSTED_TYPE||!1,// Default false
|
|
746
|
-
Dt=t.FORCE_BODY||!1,// Default false
|
|
747
|
-
Ut=!1!==t.SANITIZE_DOM,// Default true
|
|
748
|
-
Gt=t.SANITIZE_NAMED_PROPS||!1,// Default false
|
|
749
|
-
zt=!1!==t.KEEP_CONTENT,// Default true
|
|
750
|
-
Zt=t.IN_PLACE||!1,// Default false
|
|
751
|
-
Et=t.ALLOWED_URI_REGEXP||W,$t=t.NAMESPACE||Qt,St=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&le(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&le(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Lt&&(Nt=!1),It&&(xt=!0)
|
|
752
|
-
/* Parse profile info */,jt&&(bt=A({},D),vt=[],!0===jt.html&&(A(bt,C),A(vt,x)),!0===jt.svg&&(A(bt,M),A(vt,I),A(vt,U)),!0===jt.svgFilters&&(A(bt,L),A(vt,I),A(vt,U)),!0===jt.mathMl&&(A(bt,P),A(vt,k),A(vt,U)))
|
|
753
|
-
/* Merge configuration parameters */,t.ADD_TAGS&&(bt===Tt&&(bt=O(bt)),A(bt,t.ADD_TAGS,se)),t.ADD_ATTR&&(vt===wt&&(vt=O(vt)),A(vt,t.ADD_ATTR,se)),t.ADD_URI_SAFE_ATTR&&A(Jt,t.ADD_URI_SAFE_ATTR,se),t.FORBID_CONTENTS&&(Wt===Vt&&(Wt=O(Wt)),A(Wt,t.FORBID_CONTENTS,se))
|
|
754
|
-
/* Add #text in case KEEP_CONTENT is set to true */,zt&&(bt["#text"]=!0)
|
|
755
|
-
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */,Pt&&A(bt,["html","head","body"])
|
|
756
|
-
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */,bt.table&&(A(bt,["tbody"]),delete At.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
757
|
-
// Overwrite existing TrustedTypes policy.
|
|
758
|
-
nt=t.TRUSTED_TYPES_POLICY,
|
|
759
|
-
// Sign local variables required by `sanitize`.
|
|
760
|
-
rt=nt.createHTML("")}else
|
|
761
|
-
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
|
762
|
-
void 0===nt&&(nt=Q(Z,s)),
|
|
763
|
-
// If creating the internal policy succeeded sign internal variables.
|
|
764
|
-
null!==nt&&"string"==typeof rt&&(rt=nt.createHTML(""));
|
|
765
|
-
// Prevent further manipulation of configuration.
|
|
766
|
-
// Not available in IE8, Safari 5, etc.
|
|
767
|
-
o&&o(t),ae=t}},he=A({},["mi","mo","mn","ms","mtext"]),fe=A({},["foreignobject","annotation-xml"]),pe=A({},["title","style","font","a","script"]),me=A({},[...M,...L,...B]),de=A({},[...P,...R]),ge=function(t){let e=et(t);
|
|
768
|
-
// In JSDOM, if we're inside shadow DOM, then parentNode
|
|
769
|
-
// can be null. We just simulate parent in this case.
|
|
770
|
-
e&&e.tagName||(e={namespaceURI:$t,tagName:"template"});const n=p(t.tagName),r=p(e.tagName);return!!ee[t.namespaceURI]&&(t.namespaceURI===Kt?
|
|
771
|
-
// The only way to switch from HTML namespace to SVG
|
|
772
|
-
// is via <svg>. If it happens via any other tag, then
|
|
773
|
-
// it should be killed.
|
|
774
|
-
e.namespaceURI===Qt?"svg"===n:
|
|
775
|
-
// The only way to switch from MathML to SVG is via`
|
|
776
|
-
// svg if parent is either <annotation-xml> or MathML
|
|
777
|
-
// text integration points.
|
|
778
|
-
e.namespaceURI===qt?"svg"===n&&("annotation-xml"===r||he[r]):Boolean(me[n]):t.namespaceURI===qt?
|
|
779
|
-
// The only way to switch from HTML namespace to MathML
|
|
780
|
-
// is via <math>. If it happens via any other tag, then
|
|
781
|
-
// it should be killed.
|
|
782
|
-
e.namespaceURI===Qt?"math"===n:
|
|
783
|
-
// The only way to switch from SVG to MathML is via
|
|
784
|
-
// <math> and HTML integration points
|
|
785
|
-
e.namespaceURI===Kt?"math"===n&&fe[r]:Boolean(de[n]):t.namespaceURI===Qt?
|
|
786
|
-
// The only way to switch from SVG to HTML is via
|
|
787
|
-
// HTML integration points, and from MathML to HTML
|
|
788
|
-
// is via MathML text integration points
|
|
789
|
-
!(e.namespaceURI===Kt&&!fe[r])&&!(e.namespaceURI===qt&&!he[r])&&!de[n]&&(pe[n]||!me[n]):!("application/xhtml+xml"!==re||!ee[t.namespaceURI]))},ye=function(t){f(n.removed,{element:t});try{
|
|
790
|
-
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
|
791
|
-
et(t).removeChild(t)}catch(e){_(t)}},Ee=function(t,e){try{f(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){f(n.removed,{attribute:null,from:e})}
|
|
792
|
-
// We void attribute values for unremovable "is"" attributes
|
|
793
|
-
if(e.removeAttribute(t),"is"===t&&!vt[t])if(xt||It)try{ye(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},be=function(t){
|
|
794
|
-
/* Create a HTML document */
|
|
795
|
-
let e=null,n=null;if(Dt)t="<remove></remove>"+t;else{
|
|
796
|
-
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
|
797
|
-
const e=d(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===re&&$t===Qt&&(
|
|
798
|
-
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
|
799
|
-
t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=nt?nt.createHTML(t):t;
|
|
800
|
-
/*
|
|
801
|
-
* Use the DOMParser API by default, fallback later if needs be
|
|
802
|
-
* DOMParser not work for svg when has multiple root element.
|
|
803
|
-
*/if($t===Qt)try{e=(new z).parseFromString(i,re)}catch(t){}
|
|
804
|
-
/* Use createHTMLDocument in case DOMParser is not available */if(!e||!e.documentElement){e=it.createDocument($t,"template",null);try{e.documentElement.innerHTML=te?rt:i}catch(t){
|
|
805
|
-
// Syntax error if dirtyPayload is invalid xml
|
|
806
|
-
}}const o=e.body||e.documentElement;
|
|
807
|
-
/* Work on whole document or just its body */
|
|
808
|
-
return t&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),$t===Qt?at.call(e,Pt?"html":"body")[0]:Pt?e.documentElement:o},Te=function(t){return ot.call(t.ownerDocument||t,t,
|
|
809
|
-
// eslint-disable-next-line no-bitwise
|
|
810
|
-
H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},ve=function(t){return t instanceof F&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof G)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},we=function(t){return"function"==typeof w&&t instanceof w},Se=function(t,e,r){lt[t]&&u(lt[t],(t=>{t.call(n,e,r,ae)}))},Ae=function(t){let e=null;
|
|
811
|
-
/* Execute a hook if present */
|
|
812
|
-
/* Check if element is clobbered or can clobber */
|
|
813
|
-
if(Se("beforeSanitizeElements",t,null),ve(t))return ye(t),!0;
|
|
814
|
-
/* Now let's check the element's type and name */const r=se(t.nodeName);
|
|
815
|
-
/* Execute a hook if present */
|
|
816
|
-
/* Detect mXSS attempts abusing namespace confusion */
|
|
817
|
-
if(Se("uponSanitizeElement",t,{tagName:r,allowedTags:bt}),t.hasChildNodes()&&!we(t.firstElementChild)&&T(/<[/\w]/g,t.innerHTML)&&T(/<[/\w]/g,t.textContent))return ye(t),!0;
|
|
818
|
-
/* Remove any occurrence of processing instructions */if(t.nodeType===q.progressingInstruction)return ye(t),!0;
|
|
819
|
-
/* Remove any kind of possibly harmful comments */if(Bt&&t.nodeType===q.comment&&T(/<[/\w]/g,t.data))return ye(t),!0;
|
|
820
|
-
/* Remove element if anything forbids its presence */if(!bt[r]||At[r]){
|
|
821
|
-
/* Check if we have a custom element to handle */
|
|
822
|
-
if(!At[r]&&Oe(r)){if(St.tagNameCheck instanceof RegExp&&T(St.tagNameCheck,r))return!1;if(St.tagNameCheck instanceof Function&&St.tagNameCheck(r))return!1}
|
|
823
|
-
/* Keep content except for bad-listed elements */if(zt&&!Wt[r]){const e=et(t)||t.parentNode,n=tt(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r){const i=V(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,J(t))}}return ye(t),!0}
|
|
824
|
-
/* Check whether element has a valid namespace */return t instanceof S&&!ge(t)?(ye(t),!0):
|
|
825
|
-
/* Make sure that older browsers don't get fallback-tag mXSS */
|
|
826
|
-
"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!T(/<\/no(script|embed|frames)/i,t.innerHTML)?(
|
|
827
|
-
/* Sanitize element content to be template-safe */
|
|
828
|
-
Lt&&t.nodeType===q.text&&(
|
|
829
|
-
/* Get the element's text content */
|
|
830
|
-
e=t.textContent,u([ut,ht,ft],(t=>{e=g(e,t," ")})),t.textContent!==e&&(f(n.removed,{element:t.cloneNode()}),t.textContent=e))
|
|
831
|
-
/* Execute a hook if present */,Se("afterSanitizeElements",t,null),!1):(ye(t),!0)},He=function(t,e,n){
|
|
832
|
-
/* Make sure attribute cannot clobber */
|
|
833
|
-
if(Ut&&("id"===e||"name"===e)&&(n in r||n in ce))return!1;
|
|
834
|
-
/* Allow valid data-* attributes: At least one character after "-"
|
|
835
|
-
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
836
|
-
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
837
|
-
We don't need to check the value; it's always URI safe. */if(Nt&&!Ht[e]&&T(pt,e));else if(Ot&&T(mt,e));else if(!vt[e]||Ht[e]){if(
|
|
838
|
-
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
839
|
-
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
840
|
-
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
841
|
-
!(Oe(t)&&(St.tagNameCheck instanceof RegExp&&T(St.tagNameCheck,t)||St.tagNameCheck instanceof Function&&St.tagNameCheck(t))&&(St.attributeNameCheck instanceof RegExp&&T(St.attributeNameCheck,e)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(e))||
|
|
842
|
-
// Alternative, second condition checks if it's an `is`-attribute, AND
|
|
843
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
844
|
-
"is"===e&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&T(St.tagNameCheck,n)||St.tagNameCheck instanceof Function&&St.tagNameCheck(n))))return!1;
|
|
845
|
-
/* Check value is safe. First, is attr inert? If so, is safe */}else if(Jt[e]);else if(T(Et,g(n,gt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(n,"data:")||!_t[t])if(Ct&&!T(dt,g(n,gt,"")));else if(n)return!1;return!0},Oe=function(t){return"annotation-xml"!==t&&d(t,yt)},Ne=function(t){
|
|
846
|
-
/* Execute a hook if present */
|
|
847
|
-
Se("beforeSanitizeAttributes",t,null);const{attributes:e}=t;
|
|
848
|
-
/* Check if we have attributes; if not we might have a text node */if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};let i=e.length;
|
|
849
|
-
/* Go backwards over all attributes; safely remove bad ones */for(;i--;){const o=e[i],{name:s,namespaceURI:a,value:c}=o,l=se(s);let f="value"===s?c:E(c);
|
|
850
|
-
/* Execute a hook if present */
|
|
851
|
-
/* Work around a security issue with comments inside attributes */
|
|
852
|
-
if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,// Allows developers to see this is a property they can set
|
|
853
|
-
Se("uponSanitizeAttribute",t,r),f=r.attrValue,Bt&&T(/((--!?|])>)|<\/(style|title)/i,f)){Ee(s,t);continue}
|
|
854
|
-
/* Did the hooks approve of the attribute? */if(r.forceKeepAttr)continue;
|
|
855
|
-
/* Remove attribute */
|
|
856
|
-
/* Did the hooks approve of the attribute? */
|
|
857
|
-
if(Ee(s,t),!r.keepAttr)continue;
|
|
858
|
-
/* Work around a security issue in jQuery 3.0 */if(!Mt&&T(/\/>/i,f)){Ee(s,t);continue}
|
|
859
|
-
/* Sanitize attribute content to be template-safe */Lt&&u([ut,ht,ft],(t=>{f=g(f,t," ")}))
|
|
860
|
-
/* Is `value` valid for this attribute? */;const p=se(t.nodeName);if(He(p,l,f)){
|
|
861
|
-
/* Handle attributes that require Trusted Types */
|
|
862
|
-
if(
|
|
863
|
-
/* Full DOM Clobbering protection via namespace isolation,
|
|
864
|
-
* Prefix id and name attributes with `user-content-`
|
|
865
|
-
*/
|
|
866
|
-
!Gt||"id"!==l&&"name"!==l||(
|
|
867
|
-
// Remove the attribute with this value
|
|
868
|
-
Ee(s,t),
|
|
869
|
-
// Prefix the value and later re-create the attribute with the sanitized value
|
|
870
|
-
f=Ft+f),nt&&"object"==typeof Z&&"function"==typeof Z.getAttributeType)if(a);else switch(Z.getAttributeType(p,l)){case"TrustedHTML":f=nt.createHTML(f);break;case"TrustedScriptURL":f=nt.createScriptURL(f)}
|
|
871
|
-
/* Handle invalid data-* attribute set by try-catching it */try{a?t.setAttributeNS(a,s,f):
|
|
872
|
-
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
873
|
-
t.setAttribute(s,f),ve(t)?ye(t):h(n.removed)}catch(t){}}}
|
|
874
|
-
/* Execute a hook if present */Se("afterSanitizeAttributes",t,null)},Ce=function t(e){let n=null;const r=Te(e);
|
|
875
|
-
/* Execute a hook if present */for(Se("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)
|
|
876
|
-
/* Execute a hook if present */
|
|
877
|
-
Se("uponSanitizeShadowNode",n,null),
|
|
878
|
-
/* Sanitize tags and elements */
|
|
879
|
-
Ae(n)||(
|
|
880
|
-
/* Deep shadow DOM detected */
|
|
881
|
-
n.content instanceof c&&t(n.content)
|
|
882
|
-
/* Check attributes, sanitize if necessary */,Ne(n));
|
|
883
|
-
/* Execute a hook if present */Se("afterSanitizeShadowDOM",e,null)};
|
|
884
|
-
/**
|
|
885
|
-
* Sanitize
|
|
886
|
-
* Public method providing core sanitation functionality
|
|
887
|
-
*
|
|
888
|
-
* @param {String|Node} dirty string or DOM node
|
|
889
|
-
* @param {Object} cfg object
|
|
890
|
-
*/
|
|
891
|
-
// eslint-disable-next-line complexity
|
|
892
|
-
return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,a=null;
|
|
893
|
-
/* Stringify, in case dirty is an object */
|
|
894
|
-
if(
|
|
895
|
-
/* Make sure we have a string to sanitize.
|
|
896
|
-
DO NOT return early, as this will return the wrong type if
|
|
897
|
-
the user has requested a DOM object rather than a string */
|
|
898
|
-
te=!t,te&&(t="\x3c!--\x3e"),"string"!=typeof t&&!we(t)){if("function"!=typeof t.toString)throw v("toString is not a function");if("string"!=typeof(t=t.toString()))throw v("dirty is not a string, aborting")}
|
|
899
|
-
/* Return dirty HTML if DOMPurify cannot run */if(!n.isSupported)return t;
|
|
900
|
-
/* Assign config vars */if(Rt||ue(e)
|
|
901
|
-
/* Clean up removed elements */,n.removed=[],
|
|
902
|
-
/* Check if dirty is correctly typed for IN_PLACE */
|
|
903
|
-
"string"==typeof t&&(Zt=!1),Zt){
|
|
904
|
-
/* Do some early pre-sanitization to avoid unsafe root nodes */
|
|
905
|
-
if(t.nodeName){const e=se(t.nodeName);if(!bt[e]||At[e])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof w)
|
|
906
|
-
/* If dirty is a DOM element, append to an empty document to avoid
|
|
907
|
-
elements being stripped by the parser */
|
|
908
|
-
r=be("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),o.nodeType===q.element&&"BODY"===o.nodeName||"HTML"===o.nodeName?
|
|
909
|
-
/* Node is already a body, use as is */
|
|
910
|
-
r=o:
|
|
911
|
-
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
912
|
-
r.appendChild(o);else{
|
|
913
|
-
/* Exit directly if we have nothing to do */
|
|
914
|
-
if(!xt&&!Lt&&!Pt&&
|
|
915
|
-
// eslint-disable-next-line unicorn/prefer-includes
|
|
916
|
-
-1===t.indexOf("<"))return nt&&kt?nt.createHTML(t):t;
|
|
917
|
-
/* Initialize the document to work on */
|
|
918
|
-
/* Check we have a DOM node from the data */
|
|
919
|
-
if(r=be(t),!r)return xt?null:kt?rt:""}
|
|
920
|
-
/* Remove first element node (ours) if FORCE_BODY is set */r&&Dt&&ye(r.firstChild)
|
|
921
|
-
/* Get node iterator */;const l=Te(Zt?t:r);
|
|
922
|
-
/* Now start iterating over the created document */for(;s=l.nextNode();)
|
|
923
|
-
/* Sanitize tags and elements */
|
|
924
|
-
Ae(s)||(
|
|
925
|
-
/* Shadow DOM detected, sanitize it */
|
|
926
|
-
s.content instanceof c&&Ce(s.content)
|
|
927
|
-
/* Check attributes, sanitize if necessary */,Ne(s));
|
|
928
|
-
/* If we sanitized `dirty` in-place, return it. */if(Zt)return t;
|
|
929
|
-
/* Return sanitized string or DOM */if(xt){if(It)for(a=st.call(r.ownerDocument);r.firstChild;)
|
|
930
|
-
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
931
|
-
a.appendChild(r.firstChild);else a=r;return(vt.shadowroot||vt.shadowrootmode)&&(
|
|
932
|
-
/*
|
|
933
|
-
AdoptNode() is not used because internal state is not reset
|
|
934
|
-
(e.g. the past names map of a HTMLFormElement), this is safe
|
|
935
|
-
in theory but we would rather not risk another attack vector.
|
|
936
|
-
The state that is cloned by importNode() is explicitly defined
|
|
937
|
-
by the specs.
|
|
938
|
-
*/
|
|
939
|
-
a=ct.call(i,a,!0)),a}let h=Pt?r.outerHTML:r.innerHTML;
|
|
940
|
-
/* Serialize doctype if allowed */return Pt&&bt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&T(Y,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h)
|
|
941
|
-
/* Sanitize final string template-safe */,Lt&&u([ut,ht,ft],(t=>{h=g(h,t," ")})),nt&&kt?nt.createHTML(h):h},
|
|
942
|
-
/**
|
|
943
|
-
* Public method to set the configuration once
|
|
944
|
-
* setConfig
|
|
945
|
-
*
|
|
946
|
-
* @param {Object} cfg configuration object
|
|
947
|
-
*/
|
|
948
|
-
n.setConfig=function(){ue(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Rt=!0},
|
|
949
|
-
/**
|
|
950
|
-
* Public method to remove the configuration
|
|
951
|
-
* clearConfig
|
|
952
|
-
*
|
|
953
|
-
*/
|
|
954
|
-
n.clearConfig=function(){ae=null,Rt=!1},
|
|
955
|
-
/**
|
|
956
|
-
* Public method to check if an attribute value is valid.
|
|
957
|
-
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
958
|
-
* isValidAttribute
|
|
959
|
-
*
|
|
960
|
-
* @param {String} tag Tag name of containing element.
|
|
961
|
-
* @param {String} attr Attribute name.
|
|
962
|
-
* @param {String} value Attribute value.
|
|
963
|
-
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
964
|
-
*/
|
|
965
|
-
n.isValidAttribute=function(t,e,n){
|
|
966
|
-
/* Initialize shared config vars if necessary. */
|
|
967
|
-
ae||ue({});const r=se(t),i=se(e);return He(r,i,n)},
|
|
968
|
-
/**
|
|
969
|
-
* AddHook
|
|
970
|
-
* Public method to add DOMPurify hooks
|
|
971
|
-
*
|
|
972
|
-
* @param {String} entryPoint entry point for the hook to add
|
|
973
|
-
* @param {Function} hookFunction function to execute
|
|
974
|
-
*/
|
|
975
|
-
n.addHook=function(t,e){"function"==typeof e&&(lt[t]=lt[t]||[],f(lt[t],e))},
|
|
976
|
-
/**
|
|
977
|
-
* RemoveHook
|
|
978
|
-
* Public method to remove a DOMPurify hook at a given entryPoint
|
|
979
|
-
* (pops it from the stack of hooks if more are present)
|
|
980
|
-
*
|
|
981
|
-
* @param {String} entryPoint entry point for the hook to remove
|
|
982
|
-
* @return {Function} removed(popped) hook
|
|
983
|
-
*/
|
|
984
|
-
n.removeHook=function(t){if(lt[t])return h(lt[t])},
|
|
985
|
-
/**
|
|
986
|
-
* RemoveHooks
|
|
987
|
-
* Public method to remove all DOMPurify hooks at a given entryPoint
|
|
988
|
-
*
|
|
989
|
-
* @param {String} entryPoint entry point for the hooks to remove
|
|
990
|
-
*/
|
|
991
|
-
n.removeHooks=function(t){lt[t]&&(lt[t]=[])},
|
|
992
|
-
/**
|
|
993
|
-
* RemoveAllHooks
|
|
994
|
-
* Public method to remove all DOMPurify hooks
|
|
995
|
-
*/
|
|
996
|
-
n.removeAllHooks=function(){lt={}},n}var tt=$();return tt}()})),Xn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARoAAAC+CAYAAADqScD2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAEU/SURBVHgB7b1tcFzZeSb2ntuftz/wSZAEBM5AFDmKQce2TGVXo6xiaGNtrez9kcTBVFL5Ee+PrKucaFPedSInVSk0U7W1K5d/JLu1qYoqVXZqs1VZI3GcVNZxeac0sGxFlmRoNBoR0gwpijMECYIgPvvj9sfte/Z9zkf37QZAgiQwJJrnAS/vveeec7oB9Hnwvs/7nnOIHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcjgOCHBwegVKJvKVfmPPm+HqJj39zejVxmc9/8M9vtukXuPRPl2ipRCE5ODwCjmhecsyVKPnp1ynj5c94iXomTWnfy3g7qVY7naBkxkOdVFSXLS/b81lBGc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spY9XM/3HVyun3EdZDrjfr7bptNO3aMN2Wfm+fx8p/1851q1638NfW2OEtfb/x6651hfpnw+9l76yvgoUcnrvm9dXuq293r6Mu8h/n5LPX2XOvVNHQcHhyPCWhGxAVTySqVSfPB2jpKpU+ofqKhPKC/FB+L+PvuedY9Sz31vHbQl1b6/rS3Dc1MmSqbcvp69x7XsWnhe7Nx5bstU+873ZeqVzPNumYODw1MiPhDtgBL7BmLPYO4MvP4BfFg/olTqlkkpVT1sXEHUe5hnB/XbKS+Vel4/3qb7mn1lh9U/qC+UyYPbOrZxcDhmdMaUVFvZHD7EujveqCspRKetLui2x956It6XbqP2Rpd0wDjGY66u+9lfQcb6ED192Ib6mTQPpeit3+mj+y3o99r7PjvdnpqpEg4OpxWWKXr+wvdDPecDA9aSSKzdwfV7zib7bl+56lMc1o+Dg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg8Ppwr8GI64WNQpoBzwAAAAASUVORK5CYII=",qn=Yn((function(t,e){t.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",o="minute",s="hour",a="day",c="week",l="month",u="quarter",h="year",f="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},y=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},E={s:y,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,l),o=n-i<0,s=e.clone().add(r+(o?-1:1),l);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:h,w:c,d:a,D:f,h:s,m:o,s:i,ms:r,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",T={};T[b]=g;var v="$isDayjsObject",w=function(t){return t instanceof O||!(!t||!t[v])},S=function t(e,n,r){var i;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();T[o]&&(i=o),n&&(T[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;T[a]=e,i=a}return!r&&i&&(b=i),i||!r&&b},A=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new O(n)},H=E;H.l=S,H.i=w,H.w=function(t,e){return A(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var O=function(){function g(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[v]=!0}var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(H.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(m);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return H},y.isValid=function(){return!(this.$d.toString()===p)},y.isSame=function(t,e){var n=A(t);return this.startOf(e)<=n&&n<=this.endOf(e)},y.isAfter=function(t,e){return A(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<A(t)},y.$g=function(t,e,n){return H.u(t)?this[e]:this.set(n,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var n=this,r=!!H.u(e)||e,u=H.p(t),p=function(t,e){var i=H.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},m=function(t,e){return H.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},d=this.$W,g=this.$M,y=this.$D,E="set"+(this.$u?"UTC":"");switch(u){case h:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var b=this.$locale().weekStart||0,T=(d<b?d+7:d)-b;return p(r?y-T:y+(6-T),g);case a:case f:return m(E+"Hours",0);case s:return m(E+"Minutes",1);case o:return m(E+"Seconds",2);case i:return m(E+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var n,c=H.p(t),u="set"+(this.$u?"UTC":""),p=(n={},n[a]=u+"Date",n[f]=u+"Date",n[l]=u+"Month",n[h]=u+"FullYear",n[s]=u+"Hours",n[o]=u+"Minutes",n[i]=u+"Seconds",n[r]=u+"Milliseconds",n)[c],m=c===a?this.$D+(e-this.$W):e;if(c===l||c===h){var d=this.clone().set(f,1);d.$d[p](m),d.init(),this.$d=d.set(f,Math.min(this.$D,d.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[H.p(t)]()},y.add=function(r,u){var f,p=this;r=Number(r);var m=H.p(u),d=function(t){var e=A(p);return H.w(e.date(e.date()+Math.round(t*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===h)return this.set(h,this.$y+r);if(m===a)return d(1);if(m===c)return d(7);var g=(f={},f[o]=e,f[s]=n,f[i]=t,f)[m]||1,y=this.$d.getTime()+r*g;return H.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=H.z(this),o=this.$H,s=this.$m,a=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,h=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},f=function(t){return H.s(o%12||12,t,"0")},m=u||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return H.s(e.$y,4,"0");case"M":return a+1;case"MM":return H.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,l,3);case"MMMM":return h(l,a);case"D":return e.$D;case"DD":return H.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,c,2);case"ddd":return h(n.weekdaysShort,e.$W,c,3);case"dddd":return c[e.$W];case"H":return String(o);case"HH":return H.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(o,s,!0);case"A":return m(o,s,!1);case"m":return String(s);case"mm":return H.s(s,2,"0");case"s":return String(e.$s);case"ss":return H.s(e.$s,2,"0");case"SSS":return H.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,f,p){var m,d=this,g=H.p(f),y=A(r),E=(y.utcOffset()-this.utcOffset())*e,b=this-y,T=function(){return H.m(d,y)};switch(g){case h:m=T()/12;break;case l:m=T();break;case u:m=T()/3;break;case c:m=(b-E)/6048e5;break;case a:m=(b-E)/864e5;break;case s:m=b/n;break;case o:m=b/e;break;case i:m=b/t;break;default:m=b}return p?m:H.a(m)},y.daysInMonth=function(){return this.endOf(l).$D},y.$locale=function(){return T[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},y.clone=function(){return H.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),N=O.prototype;return A.prototype=N,[["$ms",r],["$s",i],["$m",o],["$H",s],["$W",a],["$M",l],["$y",h],["$D",f]].forEach((function(t){N[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),A.extend=function(t,e){return t.$i||(t(e,O,A),t.$i=!0),A},A.locale=S,A.isDayjs=w,A.unix=function(t){return A(1e3*t)},A.en=T[b],A.Ls=T,A.p={},A}()})),Kn=Yn((function(t,e){var n,r,i;t.exports=(n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g,function(t,e,o){var s=e.prototype;o.utc=function(t){return new e({date:t,utc:!0,args:arguments})},s.utc=function(t){var e=o(this.toDate(),{locale:this.$L,utc:!0});return t?e.add(this.utcOffset(),n):e},s.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var a=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var c=s.init;s.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var l=s.utcOffset;s.utcOffset=function(t,e){var o=this.$utils().u;if(o(t))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var e=t.match(r);if(!e)return null;var n=(""+e[0]).match(i)||["-",0,0],o=n[0],s=60*+n[1]+ +n[2];return 0===s?0:"+"===o?s:-s}(t),null===t))return this;var s=Math.abs(t)<=16?60*t:t,a=this;if(e)return a.$offset=s,a.$u=0===t,a;if(0!==t){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(s+c,n)).$offset=s,a.$x.$localOffset=c}else a=this.utc();return a};var u=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var h=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var f=s.diff;s.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);var r=this.local(),i=o(t).local();return f.call(r,i,e,n)}})}));
|
|
997
|
-
/* src/CashierSessionExpirationModal.svelte generated by Svelte v3.59.2 */
|
|
998
|
-
function Qn(t){let e,n,r,o,s,a,c,l,u,h,f,p,m,g,y,O,C,M,L,B,P,R,D,x,I,k,U,G=/*$_*/t[7]("sessionExpirationHeader")+"",F=/*$_*/t[7]("sessionExpirationTitle")+"",z=Jn.sanitize(/*$_*/t[7]("sessionExpirationGeneralText",{values:{second:/*timeLeft*/t[6]}}))+"",j=/*$_*/t[7]("sessionExpirationGeneralButton")+"";function W(t,e){/*assetsurl*/
|
|
999
|
-
return t[3]?tr:$n}let V=W(t),_=V(t);return{c(){e=T("div"),n=T("div"),r=T("div"),o=T("div"),s=T("div"),a=v(G),c=w(),l=T("div"),u=T("div"),h=T("slot"),_.c(),f=w(),p=T("slot"),m=T("span"),g=v(F),y=w(),O=T("slot"),C=T("span"),M=w(),L=T("div"),B=T("slot"),P=T("span"),R=v(j),A(s,"class","CashierSessionExpirationModalHeaderTitle"),A(o,"class","CashierSessionExpirationModalHeader"),A(h,"name","icon"),A(h,"class","CashierSessionExpirationIcon"),A(p,"name","title"),A(p,"class","CashierSessionExpirationTitle"),A(O,"name","text"),A(O,"class","CashierSessionExpirationText"),A(B,"name","button"),A(L,"class","CashierSessionExpirationButton"),A(u,"class","CashierSessionExpiration"),A(l,"class","CashierSessionExpirationModalContainer"),A(l,"part","CashierSessionExpirationModalContainer"),A(r,"class","CashierSessionExpirationModalWrapper"),A(r,"part","CashierSessionExpirationModalWrapper"),A(n,"class","CashierSessionExpirationModalWindow"),A(n,"part","CashierSessionExpirationModalWindow"),A(n,"id","CashierSessionExpirationModal"),Z((()=>/*div6_elementresize_handler*/t[19].call(n))),A(e,"part","CustomStylingContainer")},m(i,v){E(i,e,v),d(e,n),d(n,r),d(r,o),d(o,s),d(s,a),d(r,c),d(r,l),d(l,u),d(u,h),_.m(h,null),d(u,f),d(u,p),d(p,m),d(m,g),d(u,y),d(u,O),d(O,C),C.innerHTML=z,d(u,M),d(u,L),d(L,B),d(B,P),d(P,R),
|
|
1000
|
-
/*div3_binding*/t[18](u),D=function(t,e){"static"===getComputedStyle(t).position&&(t.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=N();let i;return r?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=S(window,"message",(t=>{t.source===n.contentWindow&&e()}))):(n.src="about:blank",n.onload=()=>{i=S(n.contentWindow,"resize",e),
|
|
1001
|
-
// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)
|
|
1002
|
-
// see https://github.com/sveltejs/svelte/issues/4233
|
|
1003
|
-
e()}),d(t,n),()=>{(r||i&&n.contentWindow)&&i(),b(n)}}(n,/*div6_elementresize_handler*/t[19].bind(n)),
|
|
1004
|
-
/*div7_binding*/t[20](e),I=!0,k||(U=[S(L,"click",/*renewSession*/t[8]),S(n,"click",/*outOfModalClick*/t[9])],k=!0)},p(e,n){t=e,(!I||/*$_*/128&n[0])&&G!==(G=/*$_*/t[7]("sessionExpirationHeader")+"")&&H(a,G),V===(V=W(t))&&_?_.p(t,n):(_.d(1),_=V(t),_&&(_.c(),_.m(h,null))),(!I||/*$_*/128&n[0])&&F!==(F=/*$_*/t[7]("sessionExpirationTitle")+"")&&H(g,F),(!I||/*$_, timeLeft*/192&n[0])&&z!==(z=Jn.sanitize(/*$_*/t[7]("sessionExpirationGeneralText",{values:{second:/*timeLeft*/t[6]}}))+"")&&(C.innerHTML=z),(!I||/*$_*/128&n[0])&&j!==(j=/*$_*/t[7]("sessionExpirationGeneralButton")+"")&&H(R,j)},i(e){I||(Z((()=>{I&&(x||(x=tt(n,ot,{duration:/*duration*/t[2]},!0)),x.run(1))})),I=!0)},o(e){x||(x=tt(n,ot,{duration:/*duration*/t[2]},!1)),x.run(0),I=!1},d(n){n&&b(e),_.d(),
|
|
1005
|
-
/*div3_binding*/t[18](null),D(),n&&x&&x.end()
|
|
1006
|
-
/*div7_binding*/,t[20](null),k=!1,i(U)}}}
|
|
1007
|
-
// (164:18) {:else}
|
|
1008
|
-
function $n(e){let n,r;return{c(){n=T("img"),c(n.src,r=Xn)||A(n,"src",r),A(n,"width","300px"),A(n,"alt","error")},m(t,e){E(t,n,e)},p:t,d(t){t&&b(n)}}}
|
|
1009
|
-
// (162:16) {#if assetsurl}
|
|
1010
|
-
function tr(t){let e,n;return{c(){e=T("img"),c(e.src,n=`${/*assetsurl*/t[3]}/set-timeout-icon.png`)||A(e,"src",n),A(e,"width","300px"),A(e,"alt","error")},m(t,n){E(t,e,n)},p(t,r){/*assetsurl*/8&r[0]&&!c(e.src,n=`${/*assetsurl*/t[3]}/set-timeout-icon.png`)&&A(e,"src",n)},d(t){t&&b(e)}}}function er(e){let n,r,o=/*show*/e[5]&&Qn(e);return{c(){o&&o.c(),n=v(""),this.c=t},m(t,e){o&&o.m(t,e),E(t,n,e),r=!0},p(t,e){/*show*/t[5]?o?(o.p(t,e),/*show*/32&e[0]&&K(o,1)):(o=Qn(t),o.c(),K(o,1),o.m(n.parentNode,n)):o&&(q={r:0,c:[],p:q},Q(o,1,1,(()=>{o=null})),q.r||i(q.c),q=q.p)},i(t){r||(K(o),r=!0)},o(t){Q(o),r=!1},d(t){o&&o.d(t),t&&b(n)}}}function nr(t,e,n){let r;var i,o;i=Wn,o=t=>n(7,r=t),t.$$.on_destroy.push(l(i,o)),qn.extend(Kn);let s,a,c,u,h,f,{clientstyling:p=""}=e,{clientstylingurl:m=""}=e,{width:d}=e,{height:g}=e,{duration:y=200}=e,{assetsurl:E=""}=e,{lang:b="en"}=e,{translationurl:T=""}=e,{endpoint:v}=e,{currency:w}=e,{customerid:S}=e,{selectedpaymentmethodname:A}=e,H=!1;const O=t=>{"StartSessionCountdown"===t.data.type&&(f=t.data.xPaymentSessionToken,h=t.data.paymentMethodName,N())},N=()=>{n(5,H=!1);const t=(t=>{try{return JSON.parse(atob(t.split(".")[1]))}catch(t){return null}})(f);t&&(c=null==t?void 0:t.exp,n(6,a=c),u&&clearInterval(u),u=setInterval((()=>{const t=Math.floor((new Date).getTime()/1e3);n(6,a=c-t),a<=90&&n(5,H=!0),t>=c&&(n(6,a=0),n(5,H=!1),clearInterval(u),window.postMessage({type:"SessionExpired"},window.location.href))}),1e3))},C=()=>{const t=new URL(`${v}/v1/player/${S}/payment/GetPaymentMethod`),e=new Headers;e.append("accept","application/json"),e.append("Content-Type","application/json"),e.append("X-Client-Request-Timestamp",qn.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));const n={method:"POST",mode:"cors",headers:e,body:JSON.stringify({PaymentMethodName:h||A,Currency:w,XPaymentSessionToken:f})};fetch(t,n).then((t=>t.json())).then((t=>{f=t.XPaymentSessionToken,N()}))};Object.keys(_n).forEach((t=>{Vn(t,_n[t])}));const M=()=>{var t;t=b,An.set(t)};var L;
|
|
1011
|
-
/**
|
|
1012
|
-
* Schedules a callback to run immediately before the component is unmounted.
|
|
1013
|
-
*
|
|
1014
|
-
* Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
|
|
1015
|
-
* only one that runs inside a server-side component.
|
|
1016
|
-
*
|
|
1017
|
-
* https://svelte.dev/docs#run-time-svelte-ondestroy
|
|
1018
|
-
*/return L=()=>(window.addEventListener("message",O,!1),()=>{window.removeEventListener("message",O)}),x().$$.on_mount.push(L),function(t){x().$$.on_destroy.push(t)}((()=>{clearInterval(u)})),t.$$set=t=>{"clientstyling"in t&&n(10,p=t.clientstyling),"clientstylingurl"in t&&n(11,m=t.clientstylingurl),"width"in t&&n(0,d=t.width),"height"in t&&n(1,g=t.height),"duration"in t&&n(2,y=t.duration),"assetsurl"in t&&n(3,E=t.assetsurl),"lang"in t&&n(12,b=t.lang),"translationurl"in t&&n(13,T=t.translationurl),"endpoint"in t&&n(14,v=t.endpoint),"currency"in t&&n(15,w=t.currency),"customerid"in t&&n(16,S=t.customerid),"selectedpaymentmethodname"in t&&n(17,A=t.selectedpaymentmethodname)},t.$$.update=()=>{/*lang*/4096&t.$$.dirty[0]&&b&&M(),/*clientstyling, customStylingContainer*/1040&t.$$.dirty[0]&&p&&s&&(()=>{let t=document.createElement("style");t.innerHTML=p,s.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/2064&t.$$.dirty[0]&&m&&s&&(()=>{let t=new URL(m),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{s.appendChild(e)}),1)}))})(),/*translationurl*/8192&t.$$.dirty[0]&&T&&fetch(T).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Vn(e,t[e])}))})).catch((t=>{console.log(t)}))},[d,g,y,E,s,H,a,r,C,t=>{const e=t.currentTarget;t.target===e&&C()},p,m,b,T,v,w,S,A,function(t){k[t?"unshift":"push"]((()=>{s=t,n(4,s)}))},function(){d=this.clientWidth,g=this.clientHeight,n(0,d),n(1,g)},function(t){k[t?"unshift":"push"]((()=>{s=t,n(4,s)}))}]}class rr extends it{constructor(t){super();const e=document.createElement("style");e.textContent="*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.CashierSessionExpirationModalWindow{display:flex;position:absolute;align-items:center;justify-content:center;width:100%;height:100%;z-index:5;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(e),rt(this,{target:this.shadowRoot,props:C(this.attributes),customElement:!0},nr,er,s,{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]),t&&(t.target&&E(t.target,this,t.anchor),t.props&&(this.$set(t.props),_()))}static get observedAttributes(){return["clientstyling","clientstylingurl","width","height","duration","assetsurl","lang","translationurl","endpoint","currency","customerid","selectedpaymentmethodname"]}get clientstyling(){return this.$$.ctx[10]}set clientstyling(t){this.$$set({clientstyling:t}),_()}get clientstylingurl(){return this.$$.ctx[11]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),_()}get width(){return this.$$.ctx[0]}set width(t){this.$$set({width:t}),_()}get height(){return this.$$.ctx[1]}set height(t){this.$$set({height:t}),_()}get duration(){return this.$$.ctx[2]}set duration(t){this.$$set({duration:t}),_()}get assetsurl(){return this.$$.ctx[3]}set assetsurl(t){this.$$set({assetsurl:t}),_()}get lang(){return this.$$.ctx[12]}set lang(t){this.$$set({lang:t}),_()}get translationurl(){return this.$$.ctx[13]}set translationurl(t){this.$$set({translationurl:t}),_()}get endpoint(){return this.$$.ctx[14]}set endpoint(t){this.$$set({endpoint:t}),_()}get currency(){return this.$$.ctx[15]}set currency(t){this.$$set({currency:t}),_()}get customerid(){return this.$$.ctx[16]}set customerid(t){this.$$set({customerid:t}),_()}get selectedpaymentmethodname(){return this.$$.ctx[17]}set selectedpaymentmethodname(t){this.$$set({selectedpaymentmethodname:t}),_()}}return!customElements.get("cashier-session-expiration-modal")&&customElements.define("cashier-session-expiration-modal",rr),rr}));
|
|
1019
|
-
//# sourceMappingURL=cashier-session-expiration-modal.js.map
|