@everymatrix/cashier-iframe-redirect 1.43.4 → 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.
@@ -1,603 +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(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function i(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let s,a;function l(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function h(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function c(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function f(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function m(t){return document.createTextNode(t)}function g(){return m(" ")}function d(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function b(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function y(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:b(t,e,n)}function E(t){const e={};for(const n of t)e[n.name]=n.value;return e}function v(t){a=t}
2
- /**
3
- * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).
4
- * Event dispatchers are functions that can take two arguments: `name` and `detail`.
5
- *
6
- * Component events created with `createEventDispatcher` create a
7
- * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).
8
- * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).
9
- * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)
10
- * property and can contain any type of data.
11
- *
12
- * https://svelte.dev/docs#run-time-svelte-createeventdispatcher
13
- */
14
- function H(){const t=function(){if(!a)throw new Error("Function called outside component initialization");return a}();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){
15
- // TODO are there situations where events could be dispatched
16
- // in a server (non-DOM) environment?
17
- const o=function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(e,n,{cancelable:r});return i.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}const T=[],B=[];let w=[];const _=[],C=Promise.resolve();let L=!1;function A(t){w.push(t)}
18
- // flush() calls callbacks in this order:
19
- // 1. All beforeUpdate callbacks, in order: parents before children
20
- // 2. All bind:this callbacks, in reverse order: children before parents.
21
- // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
22
- // for afterUpdates called during the initial onMount, which are called in
23
- // reverse order: children before parents.
24
- // Since callbacks might update component values, which could trigger another
25
- // call to flush(), the following steps guard against this:
26
- // 1. During beforeUpdate, any updated components will be added to the
27
- // dirty_components array and will cause a reentrant call to flush(). Because
28
- // the flush index is kept outside the function, the reentrant call will pick
29
- // up where the earlier call left off and go through all dirty components. The
30
- // current_component value is saved and restored so that the reentrant call will
31
- // not interfere with the "parent" flush() call.
32
- // 2. bind:this callbacks cannot trigger new flush() calls.
33
- // 3. During afterUpdate, any updated components will NOT have their afterUpdate
34
- // callback called a second time; the seen_callbacks set, outside the flush()
35
- // function, guarantees this behavior.
36
- const P=new Set;let S=0;// Do *not* move this inside the flush() function
37
- function O(){
38
- // Do not reenter flush while dirty components are updated, as this can
39
- // result in an infinite loop. Instead, let the inner flush handle it.
40
- // Reentrancy is ok afterwards for bindings etc.
41
- if(0!==S)return;const t=a;do{
42
- // first, call beforeUpdate functions
43
- // and update components
44
- try{for(;S<T.length;){const t=T[S];S++,v(t),N(t.$$)}}catch(t){
45
- // reset dirty state to not end up in a deadlocked state and then rethrow
46
- throw T.length=0,S=0,t}for(v(null),T.length=0,S=0;B.length;)B.pop()();
47
- // then, once components are updated, call
48
- // afterUpdate functions. This may cause
49
- // subsequent updates...
50
- for(let t=0;t<w.length;t+=1){const e=w[t];P.has(e)||(
51
- // ...so guard against infinite loops
52
- P.add(e),e())}w.length=0}while(T.length);for(;_.length;)_.pop()();L=!1,P.clear(),v(t)}function N(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(A)}}
53
- /**
54
- * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
55
- */const M=new Set;function I(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];w.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),w=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),
56
- // TODO null out other refs, including component.$$ (but need to
57
- // preserve final state?)
58
- n.on_destroy=n.fragment=null,n.ctx=[])}function R(t,e){-1===t.$$.dirty[0]&&(T.push(t),L||(L=!0,C.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function $(o,s,l,h,c,u,p,m=[-1]){const g=a;v(o);const d=o.$$={fragment:null,ctx:[],
59
- // state
60
- props:u,update:t,not_equal:c,bound:n(),
61
- // lifecycle
62
- on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(g?g.$$.context:[])),
63
- // everything else
64
- callbacks:n(),dirty:m,skip_bound:!1,root:s.target||g.$$.root};p&&p(d.root);let b=!1;if(d.ctx=l?l(o,s.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return d.ctx&&c(d.ctx[t],d.ctx[t]=r)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](r),b&&R(o,t)),e})):[],d.update(),b=!0,r(d.before_update),
65
- // `false` as a special case of no DOM component
66
- d.fragment=!!h&&h(d.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);
67
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
68
- d.fragment&&d.fragment.l(t),t.forEach(f)}else
69
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
70
- d.fragment&&d.fragment.c();s.intro&&((y=o.$$.fragment)&&y.i&&(M.delete(y),y.i(E))),function(t,n,o,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(n,o),s||
71
- // onMount happens before the initial afterUpdate
72
- A((()=>{const n=t.$$.on_mount.map(e).filter(i);
73
- // if the component was destroyed immediately
74
- // it will update the `$$.on_destroy` reference to `null`.
75
- // the destructured on_destroy may still reference to the old array
76
- t.$$.on_destroy?t.$$.on_destroy.push(...n):
77
- // Edge case - component was destroyed immediately,
78
- // most likely as a result of a binding initialising
79
- r(n),t.$$.on_mount=[]})),l.forEach(A)}(o,s.target,s.anchor,s.customElement),O()}var y,E;v(g)}let U;"function"==typeof HTMLElement&&(U=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);
80
- // @ts-ignore todo: improve typings
81
- for(const t in this.$$.slotted)
82
- // @ts-ignore todo: improve typings
83
- this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){I(this,1),this.$destroy=t}$on(e,n){
84
- // TODO should this delegate to addEventListener?
85
- if(!i(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 k=[];
86
- /**
87
- * Creates a `Readable` store that allows reading by subscription.
88
- * @param value initial value
89
- * @param {StartStopNotifier} [start]
90
- */
91
- /**
92
- * Create a `Writable` store that allows both updating and reading by subscription.
93
- * @param {*=}value initial value
94
- * @param {StartStopNotifier=} start
95
- */
96
- function G(e,n=t){let r;const i=new Set;function s(t){if(o(e,t)&&(e=t,r)){// store is ready
97
- const t=!k.length;for(const t of i)t[1](),k.push(t,e);if(t){for(let t=0;t<k.length;t+=2)k[t][0](k[t+1]);k.length=0}}}return{set:s,update:function(t){s(t(e))},subscribe:function(o,a=t){const l=[o,a];return i.add(l),1===i.size&&(r=n(s)||t),o(e),()=>{i.delete(l),0===i.size&&r&&(r(),r=null)}}}}function x(e,n,o){const s=!Array.isArray(e),a=s?[e]:e,l=n.length<2;return c=e=>{let o=!1;const c=[];let u=0,f=t;const p=()=>{if(u)return;f();const r=n(s?c[0]:c,e);l?e(r):f=i(r)?r:t},m=a.map(((t,e)=>h(t,(t=>{c[e]=t,u&=~(1<<e),o&&p()}),(()=>{u|=1<<e}))));return o=!0,p(),function(){r(m),f(),
98
- // We need to set this to false because callbacks can still happen despite having unsubscribed:
99
- // Callbacks might already be placed in the queue which doesn't know it should no longer
100
- // invoke this derived store.
101
- o=!1}},{subscribe:G(o,c).subscribe};var c}var D=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===F}(t)}
102
- // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
103
- (t)};var F="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function j(t,e){return!1!==e.clone&&e.isMergeableObject(t)?z((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function V(t,e,n){return t.concat(e).map((function(t){return j(t,n)}))}function X(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 K(t,e){try{return e in t}catch(t){return!1}}
104
- // Protects from prototype poisoning and unexpected merging up the prototype chain.
105
- function Z(t,e,n){var r={};return n.isMergeableObject(t)&&X(t).forEach((function(e){r[e]=j(t[e],n)})),X(e).forEach((function(i){(function(t,e){return K(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e));// and also unsafe if they're nonenumerable.
106
- })(t,i)||(K(t,i)&&n.isMergeableObject(e[i])?r[i]=function(t,e){if(!e.customMerge)return z;var n=e.customMerge(t);return"function"==typeof n?n:z}(i,n)(t[i],e[i],n):r[i]=j(e[i],n))})),r}function z(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||V,n.isMergeableObject=n.isMergeableObject||D,
107
- // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
108
- // implementations can use it. The caller may not replace it.
109
- n.cloneUnlessOtherwiseSpecified=j;var r=Array.isArray(e);return r===Array.isArray(t)?r?n.arrayMerge(t,e,n):Z(t,e,n):j(e,n)}z.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return z(t,n,e)}),{})};var Y=z,W=function(t,e){return W=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])},W(t,e)};function Q(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}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var J,q,tt,et=function(){return et=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},et.apply(this,arguments)};function nt(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))}
110
- /**
111
- * Type Guards
112
- */
113
- function rt(t){return t.type===q.literal}function it(t){return t.type===q.argument}function ot(t){return t.type===q.number}function st(t){return t.type===q.date}function at(t){return t.type===q.time}function lt(t){return t.type===q.select}function ht(t){return t.type===q.plural}function ct(t){return t.type===q.pound}function ut(t){return t.type===q.tag}function ft(t){return!(!t||"object"!=typeof t||t.type!==tt.number)}function pt(t){return!(!t||"object"!=typeof t||t.type!==tt.dateTime)}
114
- // @generated from regex-gen.ts
115
- "function"==typeof SuppressedError&&SuppressedError,function(t){
116
- /** Argument is unclosed (e.g. `{0`) */
117
- t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",
118
- /** Argument is empty (e.g. `{}`). */
119
- t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",
120
- /** Argument is malformed (e.g. `{foo!}``) */
121
- t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",
122
- /** Expect an argument type (e.g. `{foo,}`) */
123
- t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",
124
- /** Unsupported argument type (e.g. `{foo,foo}`) */
125
- t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",
126
- /** Expect an argument style (e.g. `{foo, number, }`) */
127
- t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",
128
- /** The number skeleton is invalid. */
129
- t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",
130
- /** The date time skeleton is invalid. */
131
- t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",
132
- /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
133
- t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",
134
- /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
135
- t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",
136
- /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
137
- t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",
138
- /** Missing select argument options (e.g. `{foo, select}`) */
139
- t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",
140
- /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
141
- t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",
142
- /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
143
- t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",
144
- /** Expecting a selector in `select` argument (e.g `{foo, select}`) */
145
- t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",
146
- /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
147
- t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",
148
- /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
149
- t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",
150
- /**
151
- * Expecting a message fragment after the `plural` or `selectordinal` selector
152
- * (e.g. `{foo, plural, one}`)
153
- */
154
- t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",
155
- /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
156
- t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",
157
- /**
158
- * Duplicate selectors in `plural` or `selectordinal` argument.
159
- * (e.g. {foo, plural, one {#} one {#}})
160
- */
161
- t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",
162
- /** Duplicate selectors in `select` argument.
163
- * (e.g. {foo, select, apple {apple} apple {apple}})
164
- */
165
- t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",
166
- /** Plural or select argument option must have `other` clause. */
167
- t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",
168
- /** The tag is malformed. (e.g. `<bold!>foo</bold!>) */
169
- t[t.INVALID_TAG=23]="INVALID_TAG",
170
- /** The tag name is invalid. (e.g. `<123>foo</123>`) */
171
- t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",
172
- /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */
173
- t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",
174
- /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */
175
- t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(J||(J={})),function(t){
176
- /**
177
- * Raw text
178
- */
179
- t[t.literal=0]="literal",
180
- /**
181
- * Variable w/o any format, e.g `var` in `this is a {var}`
182
- */
183
- t[t.argument=1]="argument",
184
- /**
185
- * Variable w/ number format
186
- */
187
- t[t.number=2]="number",
188
- /**
189
- * Variable w/ date format
190
- */
191
- t[t.date=3]="date",
192
- /**
193
- * Variable w/ time format
194
- */
195
- t[t.time=4]="time",
196
- /**
197
- * Variable w/ select format
198
- */
199
- t[t.select=5]="select",
200
- /**
201
- * Variable w/ plural format
202
- */
203
- t[t.plural=6]="plural",
204
- /**
205
- * Only possible within plural argument.
206
- * This is the `#` symbol that will be substituted with the count.
207
- */
208
- t[t.pound=7]="pound",
209
- /**
210
- * XML-like tag
211
- */
212
- t[t.tag=8]="tag"}(q||(q={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(tt||(tt={}));var mt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,gt=/(?:[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;
213
- /**
214
- * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
215
- * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
216
- * with some tweaks
217
- */
218
- /**
219
- * Parse Date time skeleton into Intl.DateTimeFormatOptions
220
- * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
221
- * @public
222
- * @param skeleton skeleton string
223
- */
224
- function dt(t){var e={};return t.replace(gt,(function(t){var n=t.length;switch(t[0]){
225
- // Era
226
- case"G":e.era=4===n?"long":5===n?"narrow":"short";break;
227
- // Year
228
- 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");
229
- // Quarter
230
- case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");
231
- // Month
232
- case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;
233
- // Week
234
- 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");
235
- // Weekday
236
- 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;
237
- // Period
238
- case"a":// AM, PM
239
- e.hour12=!0;break;case"b":// am, pm, noon, midnight
240
- case"B":// flexible day periods
241
- throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
242
- // Hour
243
- 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");
244
- // Minute
245
- case"m":e.minute=["numeric","2-digit"][n-1];break;
246
- // Second
247
- 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");
248
- // Zone
249
- case"z":// 1..3, 4: specific non-location format
250
- e.timeZoneName=n<4?"short":"long";break;case"Z":// 1..3, 4, 5: The ISO8601 varios formats
251
- case"O":// 1, 4: miliseconds in day short, long
252
- case"v":// 1, 4: generic non-location format
253
- case"V":// 1, 2, 3, 4: time zone ID or city
254
- case"X":// 1, 2, 3, 4: The ISO8601 varios formats
255
- case"x":// 1, 2, 3, 4: The ISO8601 varios formats
256
- throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}
257
- // @generated from regex-gen.ts
258
- var bt=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var yt=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Et=/^(@+)?(\+|#+)?[rs]?$/g,vt=/(\*)(0+)|(#+)(0+)|(0+)/g,Ht=/^(0+)$/;function Tt(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(Et,(function(t,n,r){
259
- // @@@ case
260
- 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 Bt(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 wt(t){
261
- // Engineering
262
- 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)),!Ht.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function _t(t){var e=Bt(t);return e||{}}
263
- /**
264
- * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
265
- */function Ct(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=et(et(et({},e),{notation:"scientific"}),i.options.reduce((function(t,e){return et(et({},t),_t(e))}),{}));continue;case"engineering":e=et(et(et({},e),{notation:"engineering"}),i.options.reduce((function(t,e){return et(et({},t),_t(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;
266
- // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
267
- 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;
268
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
269
- case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(vt,(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}
270
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
271
- if(Ht.test(i.stem))e.minimumIntegerDigits=i.stem.length;else if(yt.test(i.stem)){
272
- // Precision
273
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
274
- // precision-integer case
275
- if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(yt,(function(t,n,r,i,o,s){
276
- // .000* case (before ICU67 it was .000+)
277
- 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];
278
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
279
- "w"===o?e=et(et({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=et(et({},e),Tt(o)))}
280
- // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
281
- else if(Et.test(i.stem))e=et(et({},e),Tt(i.stem));else{var s=Bt(i.stem);s&&(e=et(et({},e),s));var a=wt(i.stem);a&&(e=et(et({},e),a))}}return e}
282
- // @generated from time-data-gen.ts
283
- // prettier-ignore
284
- var Lt,At={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"]};
285
- /**
286
- * Returns the best matching date time pattern if a date time skeleton
287
- * pattern is provided with a locale. Follows the Unicode specification:
288
- * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
289
- * @param skeleton date time skeleton pattern that possibly includes j, J or C
290
- * @param locale
291
- */
292
- /**
293
- * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
294
- * of the given `locale` to the corresponding time pattern.
295
- * @param locale
296
- */
297
- function Pt(t){var e=t.hourCycle;if(void 0===e&&
298
- // @ts-ignore hourCycle(s) is not identified yet
299
- t.hourCycles&&
300
- // @ts-ignore
301
- t.hourCycles.length&&(
302
- // @ts-ignore
303
- 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")}
304
- // TODO: Once hourCycle is fully supported remove the following with data generation
305
- var n,r=t.language;return"root"!==r&&(n=t.maximize().region),(At[n||""]||At[r||""]||At["".concat(r,"-001")]||At["001"])[0]}var St=new RegExp("^".concat(mt.source,"*")),Ot=new RegExp("".concat(mt.source,"*$"));function Nt(t,e){return{start:t,end:e}}
306
- // #region Ponyfills
307
- // Consolidate these variables up top for easier toggling during debugging
308
- var Mt=!!String.prototype.startsWith,It=!!String.fromCodePoint,Rt=!!Object.fromEntries,$t=!!String.prototype.codePointAt,Ut=!!String.prototype.trimStart,kt=!!String.prototype.trimEnd,Gt=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},xt=!0;try{
309
- /**
310
- * legacy Edge or Xbox One browser
311
- * Unicode flag support: supported
312
- * Pattern_Syntax support: not supported
313
- * See https://github.com/formatjs/formatjs/issues/2822
314
- */
315
- xt="a"===(null===(Lt=zt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===Lt?void 0:Lt[0])}catch(t){xt=!1}var Dt,Ft=Mt?// Native
316
- function(t,e,n){return t.startsWith(e,n)}:// For IE11
317
- function(t,e,n){return t.slice(n,n+e.length)===e},jt=It?String.fromCodePoint:// IE11
318
- 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},Vt=
319
- // native
320
- Rt?Object.fromEntries:// Ponyfill
321
- 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},Xt=$t?// Native
322
- function(t,e){return t.codePointAt(e)}:// IE 11
323
- 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}},Kt=Ut?// Native
324
- function(t){return t.trimStart()}:// Ponyfill
325
- function(t){return t.replace(St,"")},Zt=kt?// Native
326
- function(t){return t.trimEnd()}:// Ponyfill
327
- function(t){return t.replace(Ot,"")};
328
- // Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
329
- function zt(t,e){return new RegExp(t,e)}
330
- // #endregion
331
- if(xt){
332
- // Native
333
- var Yt=zt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Dt=function(t,e){var n;return Yt.lastIndex=e,null!==(n=Yt.exec(t)[1])&&void 0!==n?n:""}}else
334
- // IE11
335
- Dt=function(t,e){for(var n=[];;){var r=Xt(t,e);if(void 0===r||Jt(r)||qt(r))break;n.push(r),e+=r>=65536?2:1}return jt.apply(void 0,n)};var Wt=/** @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(J.UNMATCHED_CLOSING_TAG,Nt(this.clonePosition(),this.clonePosition()))}if(60/* `<` */===i&&!this.ignoreTag&&Qt(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:q.pound,location:Nt(s,this.clonePosition())})}}}return{val:r,err:null}},
336
- /**
337
- * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
338
- * [custom element name][] except that a dash is NOT always mandatory and uppercase letters
339
- * are accepted:
340
- *
341
- * ```
342
- * tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "</" tagName (whitespace)* ">"
343
- * tagName ::= [a-z] (PENChar)*
344
- * PENChar ::=
345
- * "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
346
- * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
347
- * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
348
- * ```
349
- *
350
- * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
351
- * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
352
- * since other tag-based engines like React allow it
353
- */
354
- t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();// `<`
355
- var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))
356
- // Self closing tag
357
- return{val:{type:q.literal,value:"<".concat(r,"/>"),location:Nt(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();
358
- // Expecting a close tag
359
- if(this.bumpIf("</")){if(this.isEOF()||!Qt(this.char()))return this.error(J.INVALID_TAG,Nt(s,this.clonePosition()));var a=this.clonePosition();return r!==this.parseTagName()?this.error(J.UNMATCHED_CLOSING_TAG,Nt(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:q.tag,value:r,children:o,location:Nt(n,this.clonePosition())},err:null}:this.error(J.INVALID_TAG,Nt(s,this.clonePosition())))}return this.error(J.UNCLOSED_TAG,Nt(n,this.clonePosition()))}return this.error(J.INVALID_TAG,Nt(n,this.clonePosition()))},
360
- /**
361
- * This method assumes that the caller has peeked ahead for the first tag character.
362
- */
363
- t.prototype.parseTagName=function(){var t,e=this.offset();// the first tag name character
364
- 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=Nt(n,this.clonePosition());return{val:{type:q.literal,value:r,location:a},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60/* `<` */!==this.char()||!this.ignoreTag&&(Qt(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t;
365
- /** See `parseTag` function docs. */},
366
- /**
367
- * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
368
- * a character that requires quoting (that is, "only where needed"), and works the same in
369
- * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
370
- */
371
- t.prototype.tryParseQuote=function(t){if(this.isEOF()||39/* `'` */!==this.char())return null;
372
- // Parse escaped char following the apostrophe, or early return if there is no escaped char.
373
- // Check if is valid escaped character
374
- switch(this.peek()){case 39/* `'` */:
375
- // double quote, should return as a single quote.
376
- return this.bump(),this.bump(),"'";
377
- // '{', '<', '>', '}'
378
- case 123:case 60:case 62:case 125:break;case 35:// '#'
379
- if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();// apostrophe
380
- var e=[this.char()];// escaped char
381
- // read chars until the optional closing apostrophe is found
382
- for(this.bump();!this.isEOF();){var n=this.char();if(39/* `'` */===n){if(39/* `'` */!==this.peek()){
383
- // Optional closing apostrophe.
384
- this.bump();break}e.push(39),
385
- // Bump one more time because we need to skip 2 characters.
386
- this.bump()}else e.push(n);this.bump()}return jt.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(),jt(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),// `{`
387
- this.bumpSpace(),this.isEOF())return this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(n,this.clonePosition()));if(125/* `}` */===this.char())return this.bump(),this.error(J.EMPTY_ARGUMENT,Nt(n,this.clonePosition()));
388
- // argument name
389
- var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(J.MALFORMED_ARGUMENT,Nt(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(n,this.clonePosition()));switch(this.char()){
390
- // Simple argument: `{name}`
391
- case 125/* `}` */:// `}`
392
- return this.bump(),{val:{type:q.argument,
393
- // value does not include the opening and closing braces.
394
- value:r,location:Nt(n,this.clonePosition())},err:null};
395
- // Argument with options: `{name, format, ...}`
396
- case 44/* `,` */:return this.bump(),// `,`
397
- this.bumpSpace(),this.isEOF()?this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(n,this.clonePosition())):this.parseArgumentOptions(t,e,r,n);default:return this.error(J.MALFORMED_ARGUMENT,Nt(n,this.clonePosition()))}},
398
- /**
399
- * Advance the parser until the end of the identifier, if it is currently on
400
- * an identifier character. Return an empty string otherwise.
401
- */
402
- t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=Dt(this.message,e),r=e+n.length;return this.bumpTo(r),{value:n,location:Nt(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();
403
- // Parse this range:
404
- // {name, type, style}
405
- // ^---^
406
- switch(s){case"":
407
- // Expecting a style string number, date, time, plural, selectordinal, or select.
408
- return this.error(J.EXPECT_ARGUMENT_TYPE,Nt(o,a));case"number":case"date":case"time":
409
- // Parse this range:
410
- // {name, number, style}
411
- // ^-------^
412
- this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(p=Zt(b.val)).length)return this.error(J.EXPECT_ARGUMENT_STYLE,Nt(this.clonePosition(),this.clonePosition()));l={style:p,styleLocation:Nt(h,this.clonePosition())}}if((y=this.tryParseArgumentClose(r)).err)return y;var c=Nt(r,this.clonePosition());
413
- // Extract style or skeleton
414
- if(l&&Ft(null==l?void 0:l.style,"::",0)){
415
- // Skeleton starts with `::`.
416
- var u=Kt(l.style.slice(2));if("number"===s)return(b=this.parseNumberSkeletonFromString(u,l.styleLocation)).err?b:{val:{type:q.number,value:n,location:c,style:b.val},err:null};if(0===u.length)return this.error(J.EXPECT_DATE_TIME_SKELETON,c);var f=u;
417
- // Get "best match" pattern only if locale is passed, if not, let it
418
- // pass as-is where `parseDateTimeSkeleton()` will throw an error
419
- // for unsupported patterns.
420
- 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),l=Pt(e);for("H"!=l&&"k"!=l||(a=0);a-- >0;)n+="a";for(;s-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(u,this.locale));var p={type:tt.dateTime,pattern:f,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?dt(f):{}};return{val:{type:"date"===s?q.date:q.time,value:n,location:c,style:p},err:null}}
421
- // Regular style or no style.
422
- return{val:{type:"number"===s?q.number:"date"===s?q.date:q.time,value:n,location:c,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":
423
- // Parse this range:
424
- // {name, plural, options}
425
- // ^---------^
426
- var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(J.EXPECT_SELECT_ARGUMENT_OPTIONS,Nt(m,et({},m)));this.bumpSpace();
427
- // Parse offset:
428
- // {name, plural, offset:1, options}
429
- // ^-----^
430
- // or the first option:
431
- // {name, plural, one {...} other {...}}
432
- // ^--^
433
- var g=this.parseIdentifierIfPossible(),d=0;if("select"!==s&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(J.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Nt(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(J.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;
434
- // Parse another identifier for option parsing
435
- this.bumpSpace(),g=this.parseIdentifierIfPossible(),d=b.val}var y,E=this.tryParsePluralOrSelectOptions(t,s,e,g);if(E.err)return E;if((y=this.tryParseArgumentClose(r)).err)return y;var v=Nt(r,this.clonePosition());return"select"===s?{val:{type:q.select,value:n,options:Vt(E.val),location:v},err:null}:{val:{type:q.plural,value:n,options:Vt(E.val),offset:d,pluralType:"plural"===s?"cardinal":"ordinal",location:v},err:null};default:return this.error(J.INVALID_ARGUMENT_TYPE,Nt(o,a))}},t.prototype.tryParseArgumentClose=function(t){
436
- // Parse: {value, number, ::currency/GBP }
437
- return this.isEOF()||125/* `}` */!==this.char()?this.error(J.EXPECT_ARGUMENT_CLOSING_BRACE,Nt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},
438
- /**
439
- * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
440
- */
441
- t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39/* `'` */:
442
- // Treat apostrophe as quoting but include it in the style part.
443
- // Find the end of the quoted literal text.
444
- this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(J.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Nt(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");
445
- // Parse the skeleton
446
- for(var e=[],n=0,r=t.split(bt).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,l=s;a<l.length;a++)if(0===l[a].length)throw new Error("Invalid number skeleton");e.push({stem:o,options:s})}return e}(t)}catch(t){return this.error(J.INVALID_NUMBER_SKELETON,e)}return{val:{type:tt.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?Ct(n):{}},err:null}},
447
- /**
448
- * @param nesting_level The current nesting level of messages.
449
- * This can be positive when parsing message fragment in select or plural argument options.
450
- * @param parent_arg_type The parent argument's type.
451
- * @param parsed_first_identifier If provided, this is the first identifier-like selector of
452
- * the argument. It is a by-product of a previous parsing attempt.
453
- * @param expecting_close_tag If true, this message is directly or indirectly nested inside
454
- * between a pair of opening and closing tags. The nested message will not parse beyond
455
- * the closing tag boundary.
456
- */
457
- t.prototype.tryParsePluralOrSelectOptions=function(t,e,n,r){
458
- // Parse:
459
- // one {one apple}
460
- // ^--^
461
- for(var i,o=!1,s=[],a=new Set,l=r.value,h=r.location;;){if(0===l.length){var c=this.clonePosition();if("select"===e||!this.bumpIf("="))break;
462
- // Try parse `={number}` selector
463
- var u=this.tryParseDecimalInteger(J.EXPECT_PLURAL_ARGUMENT_SELECTOR,J.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=Nt(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}
464
- // Duplicate selector clauses
465
- if(a.has(l))return this.error("select"===e?J.DUPLICATE_SELECT_ARGUMENT_SELECTOR:J.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);"other"===l&&(o=!0),
466
- // Parse:
467
- // one {one apple}
468
- // ^----------^
469
- this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?J.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:J.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Nt(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([l,{value:p.val,location:Nt(f,this.clonePosition())}]),
470
- // Keep track of the existing selectors
471
- a.add(l),
472
- // Prep next selector clause.
473
- this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,h=i.location}return 0===s.length?this.error("select"===e?J.EXPECT_SELECT_ARGUMENT_SELECTOR:J.EXPECT_PLURAL_ARGUMENT_SELECTOR,Nt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(J.MISSING_OTHER_CLAUSE,Nt(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=Nt(r,this.clonePosition());return i?Gt(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(){
474
- // This is much faster than `Object.assign` or spread.
475
- return{offset:this.position.offset,line:this.position.line,column:this.position.column}},
476
- /**
477
- * Return the code point at the current position of the parser.
478
- * Throws if the index is out of bound.
479
- */
480
- t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=Xt(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}}},
481
- /** Bump the parser to the next UTF-16 code unit. */
482
- 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,
483
- // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
484
- this.position.offset+=t<65536?1:2)}},
485
- /**
486
- * If the substring starting at the current position of the parser has
487
- * the given prefix, then bump the parser to the character immediately
488
- * following the prefix and return true. Otherwise, don't bump the parser
489
- * and return false.
490
- */
491
- t.prototype.bumpIf=function(t){if(Ft(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},
492
- /**
493
- * Bump the parser until the pattern character is found and return `true`.
494
- * Otherwise bump to the end of the file and return `false`.
495
- */
496
- 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)},
497
- /**
498
- * Bump the parser to the target offset.
499
- * If target offset is beyond the end of the input, bump the parser to the end of the input.
500
- */
501
- 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}},
502
- /** advance the parser through all whitespace to the next non-whitespace code unit. */
503
- t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Jt(this.char());)this.bump()},
504
- /**
505
- * Peek at the *next* Unicode codepoint in the input without advancing the parser.
506
- * If the input has been exhausted, then this returns null.
507
- */
508
- 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}();
509
- /**
510
- * This check if codepoint is alphabet (lower & uppercase)
511
- * @param codepoint
512
- * @returns
513
- */function Qt(t){return t>=97&&t<=122||t>=65&&t<=90}
514
- /**
515
- * Code point equivalent of regex `\p{White_Space}`.
516
- * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
517
- */
518
- function Jt(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}
519
- /**
520
- * Code point equivalent of regex `\p{Pattern_Syntax}`.
521
- * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
522
- */function qt(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 te(t){t.forEach((function(t){if(delete t.location,lt(t)||ht(t))for(var e in t.options)delete t.options[e].location,te(t.options[e].value);else ot(t)&&ft(t.style)||(st(t)||at(t))&&pt(t.style)?delete t.style.location:ut(t)&&te(t.children)}))}function ee(t,e){void 0===e&&(e={}),e=et({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Wt(t,e).parse();if(n.err){var r=SyntaxError(J[n.err.kind]);
523
- // @ts-expect-error Assign to error object
524
- throw r.location=n.err.location,
525
- // @ts-expect-error Assign to error object
526
- r.originalMessage=n.err.message,r}return(null==e?void 0:e.captureLocation)||te(n.val),n.val}
527
-
528
- // Main
529
-
530
- function ne(t,e){var n=e&&e.cache?e.cache:ce,r=e&&e.serializer?e.serializer:ae;return(e&&e.strategy?e.strategy:se)(t,{cache:n,serializer:r})}
531
-
532
- // Strategy
533
-
534
- function re(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 ie(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 oe(t,e,n,r,i){return n.bind(e,t,r,i)}function se(t,e){return oe(t,this,1===t.length?re:ie,e.cache.create(),e.serializer)}
535
- // Serializer
536
- var ae=function(){return JSON.stringify(arguments)};
537
-
538
- // Cache
539
-
540
- 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 he,ce={create:function(){
541
- // @ts-ignore
542
- return new le}},ue={variadic:function(t,e){return oe(t,this,ie,e.cache.create(),e.serializer)},monadic:function(t,e){return oe(t,this,re,e.cache.create(),e.serializer)}};!function(t){
543
- // When we have a placeholder but no value to format
544
- t.MISSING_VALUE="MISSING_VALUE",
545
- // When value supplied is invalid
546
- t.INVALID_VALUE="INVALID_VALUE",
547
- // When we need specific Intl API but it's not available
548
- t.MISSING_INTL_API="MISSING_INTL_API"}(he||(he={}));var fe,pe=/** @class */function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=r,i}return Q(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),me=/** @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('", "'),'"'),he.INVALID_VALUE,i)||this}return Q(e,t),e}(pe),ge=/** @class */function(t){function e(e,n,r){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),he.INVALID_VALUE,r)||this}return Q(e,t),e}(pe),de=/** @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,'"'),he.MISSING_VALUE,n)||this}return Q(e,t),e}(pe);function be(t){return"function"==typeof t}
549
- // TODO(skeleton): add skeleton support
550
- function ye(t,e,n,r,i,o,
551
- // For debugging
552
- s){
553
- // Hot path for straight simple msg translations
554
- if(1===t.length&&rt(t[0]))return[{type:fe.literal,value:t[0].value}];for(var a=[],l=0,h=t;l<h.length;l++){var c=h[l];
555
- // Exit early for string parts.
556
- if(rt(c))a.push({type:fe.literal,value:c.value});else
557
- // TODO: should this part be literal type?
558
- // Replace `#` in plural rules with the actual numeric value.
559
- if(ct(c))"number"==typeof o&&a.push({type:fe.literal,value:n.getNumberFormat(e).format(o)});else{var u=c.value;
560
- // Enforce that all required values are provided by the caller.
561
- if(!i||!(u in i))throw new de(u,s);var f=i[u];if(it(c))f&&"string"!=typeof f&&"number"!=typeof f||(f="string"==typeof f||"number"==typeof f?String(f):""),a.push({type:"string"==typeof f?fe.literal:fe.object,value:f});else
562
- // Recursively format plural and select parts' option — which can be a
563
- // nested pattern structure. The choosing of the option to use is
564
- // abstracted-by and delegated-to the part helper object.
565
- if(st(c)){var p="string"==typeof c.style?r.date[c.style]:pt(c.style)?c.style.parsedOptions:void 0;a.push({type:fe.literal,value:n.getDateTimeFormat(e,p).format(f)})}else if(at(c)){p="string"==typeof c.style?r.time[c.style]:pt(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:fe.literal,value:n.getDateTimeFormat(e,p).format(f)})}else if(ot(c)){(p="string"==typeof c.style?r.number[c.style]:ft(c.style)?c.style.parsedOptions:void 0)&&p.scale&&(f*=p.scale||1),a.push({type:fe.literal,value:n.getNumberFormat(e,p).format(f)})}else{if(ut(c)){var m=c.children,g=c.value,d=i[g];if(!be(d))throw new ge(g,"function",s);var b=d(ye(m,e,n,r,i,o).map((function(t){return t.value})));Array.isArray(b)||(b=[b]),a.push.apply(a,b.map((function(t){return{type:"string"==typeof t?fe.literal:fe.object,value:t}})))}if(lt(c)){if(!(y=c.options[f]||c.options.other))throw new me(c.value,f,Object.keys(c.options),s);a.push.apply(a,ye(y.value,e,n,r,i))}else if(ht(c)){var y;if(!(y=c.options["=".concat(f)])){if(!Intl.PluralRules)throw new pe('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',he.MISSING_INTL_API,s);var E=n.getPluralRules(e,{type:c.pluralType}).select(f-(c.offset||0));y=c.options[E]||c.options.other}if(!y)throw new me(c.value,f,Object.keys(c.options),s);a.push.apply(a,ye(y.value,e,n,r,i,f-(c.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===fe.literal&&e.type===fe.literal?n.value+=e.value:t.push(e),t}),[])}(a)}
566
- /*
567
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
568
- Copyrights licensed under the New BSD License.
569
- See the accompanying LICENSE file for terms.
570
- */
571
- // -- MessageFormat --------------------------------------------------------
572
- function Ee(t,e){return e?Object.keys(t).reduce((function(n,r){var i,o;return n[r]=(i=t[r],(o=e[r])?et(et(et({},i||{}),o||{}),Object.keys(i).reduce((function(t,e){return t[e]=et(et({},i[e]),o[e]||{}),t}),{})):i),n}),et({},t)):t}function ve(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"}(fe||(fe={}));var He=/** @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);
573
- // Hot path for straight simple msg translations
574
- if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===fe.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 ye(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},
575
- // Defined first because it's used to build the format pattern.
576
- 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`");
577
- // Parse string messages into an AST.
578
- 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.");
579
- // Creates a new object with the specified `formats` merged with the default
580
- // formats.
581
- this.formats=Ee(t.formats,r),this.formatters=i&&i.formatters||(void 0===(o=this.formatterCache)&&(o={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ne((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,nt([void 0],e,!1)))}),{cache:ve(o.number),strategy:ue.variadic}),getDateTimeFormat:ne((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,nt([void 0],e,!1)))}),{cache:ve(o.dateTime),strategy:ue.variadic}),getPluralRules:ne((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,nt([void 0],e,!1)))}),{cache:ve(o.pluralRules),strategy:ue.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=ee,
582
- // Default format options used as the prototype of the `formats` provided to the
583
- // constructor. These are used when constructing the internal Intl.NumberFormat
584
- // and Intl.DateTimeFormat instances.
585
- 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 Te={},Be=(t,e,n)=>n?(e in Te||(Te[e]={}),t in Te[e]||(Te[e][t]=n),n):n,we=(t,e)=>{if(null==e)return;if(e in Te&&t in Te[e])return Te[e][t];const n=tn(e);for(let r=0;r<n.length;r++){const i=Ae(n[r],t);if(i)return Be(t,e,i)}};let _e;const Ce=G({});function Le(t){return t in _e}function Ae(t,e){if(!Le(t))return null;const n=function(t){return _e[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 Pe(t,...e){delete Te[t],Ce.update((n=>(n[t]=Y.all([n[t]||{},...e]),n)))}x([Ce],(([t])=>Object.keys(t))),Ce.subscribe((t=>_e=t));const Se={};function Oe(t){return Se[t]}function Ne(t){return null!=t&&tn(t).some((t=>{var e;return null==(e=Oe(t))?void 0:e.size}))}function Me(t,e){const n=Promise.all(e.map((e=>(function(t,e){Se[t].delete(e),0===Se[t].size&&delete Se[t]}(t,e),e().then((t=>t.default||t))))));return n.then((e=>Pe(t,...e)))}const Ie={};function Re(t){if(!Ne(t))return t in Ie?Ie[t]:Promise.resolve();const e=function(t){return tn(t).map((t=>{const e=Oe(t);return[t,e?[...e]:[]]})).filter((([,t])=>t.length>0))}(t);return Ie[t]=Promise.all(e.map((([t,e])=>Me(t,e)))).then((()=>{if(Ne(t))return Re(t);delete Ie[t]})),Ie[t]}var $e=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;function Ge({locale:t,id:e}){console.warn(`[svelte-i18n] The message "${e}" was not found in "${tn(t).join('", "')}".${Ne(en())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`)}const xe={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 De(){return xe}function Fe(t){const e=t,{formats:n}=e,r=((t,e)=>{var n={};for(var r in t)Ue.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&$e)for(var r of $e(t))e.indexOf(r)<0&&ke.call(t,r)&&(n[r]=t[r]);return n})(e,["formats"]);let i=t.fallbackLocale;if(t.initialLocale)try{He.resolveLocale(t.initialLocale)&&(i=t.initialLocale)}catch(e){console.warn(`[svelte-i18n] The initial locale "${t.initialLocale}" is not a valid locale.`)}return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,null==r.handleMissingMessage?r.handleMissingMessage=Ge:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(xe,r,{initialLocale:i}),n&&("number"in n&&Object.assign(xe.formats.number,n.number),"date"in n&&Object.assign(xe.formats.date,n.date),"time"in n&&Object.assign(xe.formats.time,n.time)),nn.set(i)}const je=G(!1);var Ve=Object.defineProperty,Xe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,We=(t,e,n)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;let Qe;const Je=G(null);function qe(t){return t.split("-").map(((t,e,n)=>n.slice(0,e+1).join("-"))).reverse()}function tn(t,e=De().fallbackLocale){const n=qe(t);return e?[...new Set([...n,...qe(e)])]:n}function en(){return null!=Qe?Qe:void 0}Je.subscribe((t=>{Qe=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const nn=(rn=((t,e)=>{for(var n in e||(e={}))ze.call(e,n)&&We(t,n,e[n]);if(Ze)for(var n of Ze(e))Ye.call(e,n)&&We(t,n,e[n]);return t})({},Je),Xe(rn,Ke({set:t=>{if(t&&function(t){if(null==t)return;const e=tn(t);for(let t=0;t<e.length;t++){const n=e[t];if(Le(n))return n}}(t)&&Ne(t)){const{loadingDelay:e}=De();let n;return"undefined"!=typeof window&&null!=en()&&e?n=window.setTimeout((()=>je.set(!0)),e):je.set(!0),Re(t).then((()=>{Je.set(t)})).finally((()=>{clearTimeout(n),je.set(!1)}))}return Je.set(t)}})));var rn;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 sn=Object.defineProperty,an=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,hn=Object.prototype.propertyIsEnumerable,cn=(t,e,n)=>e in t?sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,un=(t,e)=>{for(var n in e||(e={}))ln.call(e,n)&&cn(t,n,e[n]);if(an)for(var n of an(e))hn.call(e,n)&&cn(t,n,e[n]);return t},fn=(t,e)=>{var n={};for(var r in t)ln.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&an)for(var r of an(t))e.indexOf(r)<0&&hn.call(t,r)&&(n[r]=t[r]);return n};const pn=(t,e)=>{const{formats:n}=De();if(t in n&&e in n[t])return n[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},mn=on((t=>{var e=t,{locale:n,format:r}=e,i=fn(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=pn("number",r)),new Intl.NumberFormat(n,i)})),gn=on((t=>{var e=t,{locale:n,format:r}=e,i=fn(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=pn("date",r):0===Object.keys(i).length&&(i=pn("date","short")),new Intl.DateTimeFormat(n,i)})),dn=on((t=>{var e=t,{locale:n,format:r}=e,i=fn(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=pn("time",r):0===Object.keys(i).length&&(i=pn("time","short")),new Intl.DateTimeFormat(n,i)})),bn=on((
586
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
587
- (t,e=en())=>new He(t,e,De().formats,{ignoreTag:De().ignoreTag}))),yn=(t,e={})=>{var n,r,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:l=en(),default:h}=s;if(null==l)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=we(t,l);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(o=null!=(i=null==(r=(n=De()).handleMissingMessage)?void 0:r.call(n,{locale:l,id:t,defaultValue:h}))?i:h)?o:t;if(!a)return c;let u=c;try{u=bn(c,l).format(a)}catch(e){e instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return u},En=(t,e)=>((t={})=>{var e=t,{locale:n=en()}=e,r=fn(e,["locale"]);return dn(un({locale:n},r))})(e).format(t),vn=(t,e)=>((t={})=>{var e=t,{locale:n=en()}=e,r=fn(e,["locale"]);return gn(un({locale:n},r))})(e).format(t),Hn=(t,e)=>((t={})=>{var e=t,{locale:n=en()}=e,r=fn(e,["locale"]);return mn(un({locale:n},r))})(e).format(t),Tn=(t,e=en())=>we(t,e),Bn=x([nn,Ce],(()=>yn));function wn(t,e){Pe(t,e)}x([nn],(()=>En)),x([nn],(()=>vn)),x([nn],(()=>Hn)),x([nn,Ce],(()=>Tn)),Fe({fallbackLocale:"en"});const _n={en:{redirectHeader:"Deposit redirect"},"pt-br":{redirectHeader:"Redirecionar depósito"},"es-mx":{redirectHeader:"Redirigir depósito"},tr:{redirectHeader:"Para yatırma yönlendirmesi"}};function Cn(t,e){Pe(t,e)}Fe({fallbackLocale:"en"});const Ln={en:{header:{general:"Cashier",deposit:"Deposit",withdraw:"Withdraw"}},tr:{header:{general:"Cashier",deposit:"Yatır",withdraw:"Çek"}}};
588
- /* ../cashier-header/src/CashierHeader.svelte generated by Svelte v3.59.2 */function An(e){let n,r,i;return{c(){n=p("div"),n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5632 3.47782C12.4787 3.50138 12.3362 3.57505 12.2465 3.64153C12.1567 3.70806 10.8069 5.04216 9.24694 6.60626C6.11944 9.74192 6.25999 9.58204 6.25999 10.0037C6.25999 10.4243 6.13093 10.2784 9.34296 13.4903C12.4449 16.5921 12.356 16.5116 12.7278 16.5556C13.1855 16.6098 13.6413 16.2585 13.7301 15.783C13.7612 15.6164 13.7212 15.3395 13.6437 15.1847C13.6158 15.129 12.451 13.9396 11.0553 12.5417L8.51768 10L11.0553 7.45837C12.451 6.06048 13.6158 4.87114 13.6437 4.81544C13.7729 4.55751 13.7703 4.2006 13.6374 3.94274C13.4469 3.5731 12.9668 3.36532 12.5632 3.47782Z" fill="#111111"></path></svg>',b(n,"class","CashierHeaderLeftButton")},m(t,o){u(t,n,o),r||(i=d(n,"click",/*back*/e[5]),r=!0)},p:t,d(t){t&&f(n),r=!1,i()}}}function Pn(e){let n,r,i,o,s,a,l,h,y,E,v,H=/*$_*/e[3](/*titleText*/e[2])+"",T=/*backButton*/e[1]&&An(e);return{c(){n=p("div"),r=p("slot"),T&&T.c(),i=g(),o=p("slot"),s=p("span"),a=m(H),l=g(),h=p("slot"),y=p("span"),y.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="13" height="20" viewBox="0 0 13 13" fill="none"><path d="M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z" fill="#111111"></path></svg>',this.c=t,b(r,"name","leftButton"),b(s,"class","CashierHeaderTitle"),b(o,"name","title"),b(y,"class","CashierHeaderRightButton"),b(h,"name","rightButton"),b(n,"class","CashierHeader")},m(t,f){u(t,n,f),c(n,r),T&&T.m(r,null),c(n,i),c(n,o),c(o,s),c(s,a),c(n,l),c(n,h),c(h,y),
589
- /*div_binding*/e[12](n),E||(v=d(y,"click",/*close*/e[4]),E=!0)},p(t,[e]){/*backButton*/t[1]?T?T.p(t,e):(T=An(t),T.c(),T.m(r,null)):T&&(T.d(1),T=null),/*$_, titleText*/12&e&&H!==(H=/*$_*/t[3](/*titleText*/t[2])+"")&&function(t,e){e=""+e,t.data!==e&&(t.data=e)}(a,H)},i:t,o:t,d(t){t&&f(n),T&&T.d()
590
- /*div_binding*/,e[12](null),E=!1,v()}}}function Sn(t,e,n){let r;var i,o;i=Bn,o=t=>n(3,r=t),t.$$.on_destroy.push(h(i,o));let s,a,{clientstyling:l=""}=e,{clientstylingurl:c=""}=e,{translationurl:u=""}=e,{showbackbutton:f=""}=e,{title:p="header.general"}=e,{lang:m="en"}=e,g=!1;Object.keys(Ln).forEach((t=>{Cn(t,Ln[t])}));const d=()=>{var t;t=m,nn.set(t)};return t.$$set=t=>{"clientstyling"in t&&n(6,l=t.clientstyling),"clientstylingurl"in t&&n(7,c=t.clientstylingurl),"translationurl"in t&&n(8,u=t.translationurl),"showbackbutton"in t&&n(9,f=t.showbackbutton),"title"in t&&n(10,p=t.title),"lang"in t&&n(11,m=t.lang)},t.$$.update=()=>{/*lang*/2048&t.$$.dirty&&m&&d(),/*lang, title*/3072&t.$$.dirty&&m&&p&&n(2,a=p||"header.general"),/*clientstyling, customStylingContainer*/65&t.$$.dirty&&l&&s&&(()=>{let t=document.createElement("style");t.innerHTML=l,s.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/129&t.$$.dirty&&c&&s&&(()=>{let t=new URL(c),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{s.appendChild(e)}),1)}))})(),/*lang, translationurl*/2304&t.$$.dirty&&m&&u&&u&&fetch(u).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Cn(e,t[e])}))})).catch((t=>{console.log(t)})),/*showbackbutton*/512&t.$$.dirty&&f&&n(1,g=!!f&&"false"!==f)},[s,g,a,r,()=>{window.postMessage({type:"CloseCashier"},window.location.href)},()=>{window.postMessage({type:"BackCashier"},window.location.href)},l,c,u,f,p,m,function(t){B[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}
591
- /* ../cashier-spinner/src/CashierSpinner.svelte generated by Svelte v3.59.2 */
592
- function On(e){let n;return{c(){n=p("div"),n.innerHTML='<svg class="spinner" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"></circle></svg>',this.c=t,b(n,"class","CashierSpinner")},m(t,r){u(t,n,r),
593
- /*div_binding*/e[3](n)},p:t,i:t,o:t,d(t){t&&f(n)
594
- /*div_binding*/,e[3](null)}}}function Nn(t,e,n){let r,{clientstyling:i=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,i=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl)},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&i&&r&&(()=>{let t=document.createElement("style");t.innerHTML=i,r.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&r&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{r.appendChild(e)}),1)}))})()},[r,i,o,function(t){B[t?"unshift":"push"]((()=>{r=t,n(0,r)}))}]}!customElements.get("cashier-header")&&customElements.define("cashier-header",class extends U{constructor(t){super();const e=document.createElement("style");e.textContent=".CashierHeader{display:flex;position:relative;align-items:center;height:var(--mmw--header-height, 32px);background-color:var(--mmw--color-grey-105, #E8E9EB);width:100%;border-radius:6px 6px 0 0}.CashierHeaderLeftButton{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);margin-bottom:0;position:absolute;display:flex;align-items:center;font-variant:all-small-caps;height:32px;left:7px;gap:2px;cursor:pointer}.CashierHeaderLeftButton svg path{fill:var(--mmw--color-grey-10, #111)}.CashierHeaderTitle{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}.CashierHeaderRightButton{position:absolute;display:flex;justify-content:space-between;align-items:center;padding:0 var(--emw--spacing-small, 12px);height:inherit;right:0;gap:var(--emw--spacing-small, 12px);cursor:pointer}",this.shadowRoot.appendChild(e),$(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},Sn,Pn,o,{clientstyling:6,clientstylingurl:7,translationurl:8,showbackbutton:9,title:10,lang:11},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["clientstyling","clientstylingurl","translationurl","showbackbutton","title","lang"]}get clientstyling(){return this.$$.ctx[6]}set clientstyling(t){this.$$set({clientstyling:t}),O()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),O()}get translationurl(){return this.$$.ctx[8]}set translationurl(t){this.$$set({translationurl:t}),O()}get showbackbutton(){return this.$$.ctx[9]}set showbackbutton(t){this.$$set({showbackbutton:t}),O()}get title(){return this.$$.ctx[10]}set title(t){this.$$set({title:t}),O()}get lang(){return this.$$.ctx[11]}set lang(t){this.$$set({lang:t}),O()}});
595
- /* src/CashierIframeRedirect.svelte generated by Svelte v3.59.2 */
596
- function Mn(e){let n,r,i;return{c(){n=p("div"),n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5632 3.47782C12.4787 3.50138 12.3362 3.57505 12.2465 3.64153C12.1567 3.70806 10.8069 5.04216 9.24694 6.60626C6.11944 9.74192 6.25999 9.58204 6.25999 10.0037C6.25999 10.4243 6.13093 10.2784 9.34296 13.4903C12.4449 16.5921 12.356 16.5116 12.7278 16.5556C13.1855 16.6098 13.6413 16.2585 13.7301 15.783C13.7612 15.6164 13.7212 15.3395 13.6437 15.1847C13.6158 15.129 12.451 13.9396 11.0553 12.5417L8.51768 10L11.0553 7.45837C12.451 6.06048 13.6158 4.87114 13.6437 4.81544C13.7729 4.55751 13.7703 4.2006 13.6374 3.94274C13.4469 3.5731 12.9668 3.36532 12.5632 3.47782Z" fill="#111111"></path></svg>',b(n,"slot","leftButton"),b(n,"class","CashierHeaderLeftButton")},m(t,o){u(t,n,o),r||(i=d(n,"click",/*close*/e[9]),r=!0)},p:t,d(t){t&&f(n),r=!1,i()}}}
597
- // (87:6) {#if !showbackbutton || showbackbutton === 'false'}
598
- function In(e){let n,r,i;return{c(){n=p("div"),n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="13" height="20" viewBox="0 0 13 13" fill="none"><path d="M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z" fill="#111111"></path></svg>',b(n,"slot","rightButton"),b(n,"class","CashierHeaderRightButton")},m(t,o){u(t,n,o),r||(i=d(n,"click",/*close*/e[9]),r=!0)},p:t,d(t){t&&f(n),r=!1,i()}}}
599
- // (95:2) {#if isLoading}
600
- function Rn(t){let e;return{c(){e=p("cashier-spinner"),y(e,"clientstylingurl",/*clientstylingurl*/t[5]),y(e,"clientstyling",/*clientstyling*/t[4])},m(t,n){u(t,e,n)},p(t,n){/*clientstylingurl*/32&n&&y(e,"clientstylingurl",/*clientstylingurl*/t[5]),/*clientstyling*/16&n&&y(e,"clientstyling",/*clientstyling*/t[4])},d(t){t&&f(e)}}}function $n(e){let n,r,i,o,s,a,h,m,E,v=!!/*showbackbutton*/e[3]&&/*showbackbutton*/"false"!==e[3]&&Mn(e),H=(!/*showbackbutton*/e[3]||/*showbackbutton*/"false"===e[3])&&In(e),T=/*isLoading*/e[8]&&Rn(e);return{c(){n=p("div"),r=p("cashier-header"),v&&v.c(),i=g(),H&&H.c(),o=g(),T&&T.c(),s=g(),a=p("iframe"),this.c=t,y(r,"lang",/*lang*/e[0]),y(r,"translationurl",/*translationurl*/e[2]),y(r,"title",/*title*/e[6]),y(r,"showbackbutton",/*showbackbutton*/e[3]),y(r,"clientstylingurl",/*clientstylingurl*/e[5]),y(r,"clientstyling",/*clientstyling*/e[4]),l(a.src,h=/*iframeurl*/e[1])||b(a,"src",h),b(a,"frameborder","0"),b(n,"class","CashierRedirectIframe")},m(t,l){u(t,n,l),c(n,r),v&&v.m(r,null),c(r,i),H&&H.m(r,null),c(n,o),T&&T.m(n,null),c(n,s),c(n,a),
601
- /*div_binding*/e[12](n),m||(E=d(a,"load",/*load_handler*/e[11]),m=!0)},p(t,[e]){/*showbackbutton*/t[3]&&/*showbackbutton*/"false"!==t[3]?v?v.p(t,e):(v=Mn(t),v.c(),v.m(r,i)):v&&(v.d(1),v=null),/*showbackbutton*/t[3]&&/*showbackbutton*/"false"!==t[3]?H&&(H.d(1),H=null):H?H.p(t,e):(H=In(t),H.c(),H.m(r,null)),/*lang*/1&e&&y(r,"lang",/*lang*/t[0]),/*translationurl*/4&e&&y(r,"translationurl",/*translationurl*/t[2]),/*title*/64&e&&y(r,"title",/*title*/t[6]),/*showbackbutton*/8&e&&y(r,"showbackbutton",/*showbackbutton*/t[3]),/*clientstylingurl*/32&e&&y(r,"clientstylingurl",/*clientstylingurl*/t[5]),/*clientstyling*/16&e&&y(r,"clientstyling",/*clientstyling*/t[4]),/*isLoading*/t[8]?T?T.p(t,e):(T=Rn(t),T.c(),T.m(n,s)):T&&(T.d(1),T=null),/*iframeurl*/2&e&&!l(a.src,h=/*iframeurl*/t[1])&&b(a,"src",h)},i:t,o:t,d(t){t&&f(n),v&&v.d(),H&&H.d(),T&&T.d()
602
- /*div_binding*/,e[12](null),m=!1,E()}}}function Un(t,e,n){let r,{lang:i="en"}=e,{iframeurl:o}=e,{translationurl:s=""}=e,{showbackbutton:a=""}=e,{clientstyling:l=""}=e,{clientstylingurl:h=""}=e,{title:c=""}=e,u=!0;H();Object.keys(_n).forEach((t=>{wn(t,_n[t])}));const f=()=>{var t;t=i,nn.set(t)},p=t=>{t.target.src&&n(8,u=!1)};return t.$$set=t=>{"lang"in t&&n(0,i=t.lang),"iframeurl"in t&&n(1,o=t.iframeurl),"translationurl"in t&&n(2,s=t.translationurl),"showbackbutton"in t&&n(3,a=t.showbackbutton),"clientstyling"in t&&n(4,l=t.clientstyling),"clientstylingurl"in t&&n(5,h=t.clientstylingurl),"title"in t&&n(6,c=t.title)},t.$$.update=()=>{/*lang*/1&t.$$.dirty&&i&&f(),/*translationurl*/4&t.$$.dirty&&s&&(()=>{if(s)fetch(s).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{wn(e,t[e])}))})).catch((t=>{console.log(t)}))})(),/*clientstyling, customStylingContainer*/144&t.$$.dirty&&l&&r&&(()=>{let t=document.createElement("style");t.innerHTML=l,r.appendChild(t)})(),/*clientstylingurl, customStylingContainer*/160&t.$$.dirty&&h&&r&&(()=>{let t=new URL(h),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{r.appendChild(e)}),1)}))})()},[i,o,s,a,l,h,c,r,u,()=>{dispatchEvent(new CustomEvent("closeIframe",{bubbles:!0,cancelable:!0,composed:!0}))},p,t=>p(t),function(t){B[t?"unshift":"push"]((()=>{r=t,n(7,r)}))}]}!customElements.get("cashier-spinner")&&customElements.define("cashier-spinner",class extends U{constructor(t){super();const e=document.createElement("style");e.textContent=".CashierSpinner{display:block;width:80px;height:80px;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:1}.CashierSpinner .spinner{animation:rotate 2s linear infinite;transform-origin:center center}.CashierSpinner .spinner .path{stroke-dasharray:1, 200;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite;stroke-linecap:round;stroke:var(--emw--color-primary, #7EC51E)}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:89, 200;stroke-dashoffset:-35px}100%{stroke-dasharray:89, 200;stroke-dashoffset:-124px}}",this.shadowRoot.appendChild(e),$(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},Nn,On,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),O()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),O()}});class kn extends U{constructor(t){super();const e=document.createElement("style");e.textContent=".CashierRedirectIframe{height:inherit;width:inherit}iframe{border-radius:0 0 6px 6px;border:1px solid var(--mmw--color-grey-105, #E8E9EB);height:calc(100% - var(--mmw--header-height, 32px));width:100%;box-sizing:border-box}.CashierHeaderLeftButton{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);margin-bottom:0;position:absolute;display:flex;align-items:center;font-variant:all-small-caps;height:32px;left:7px;gap:2px;cursor:pointer}.CashierHeaderLeftButton svg path{fill:var(--mmw--color-grey-10, #111)}.CashierHeaderRightButton{position:absolute;display:flex;justify-content:space-between;align-items:center;padding:0 var(--emw--spacing-small, 12px);height:inherit;right:0;gap:var(--emw--spacing-small, 12px);cursor:pointer}",this.shadowRoot.appendChild(e),$(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},Un,$n,o,{lang:0,iframeurl:1,translationurl:2,showbackbutton:3,clientstyling:4,clientstylingurl:5,title:6},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["lang","iframeurl","translationurl","showbackbutton","clientstyling","clientstylingurl","title"]}get lang(){return this.$$.ctx[0]}set lang(t){this.$$set({lang:t}),O()}get iframeurl(){return this.$$.ctx[1]}set iframeurl(t){this.$$set({iframeurl:t}),O()}get translationurl(){return this.$$.ctx[2]}set translationurl(t){this.$$set({translationurl:t}),O()}get showbackbutton(){return this.$$.ctx[3]}set showbackbutton(t){this.$$set({showbackbutton:t}),O()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(t){this.$$set({clientstyling:t}),O()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),O()}get title(){return this.$$.ctx[6]}set title(t){this.$$set({title:t}),O()}}return!customElements.get("cashier-iframe-redirect")&&customElements.define("cashier-iframe-redirect",kn),kn}));
603
- //# sourceMappingURL=cashier-iframe-redirect.js.map