@micro-lc/preview 0.5.0-rc1 → 0.5.0-rc10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts +27 -41
- package/dist/index.js +10 -97
- package/package.json +11 -8
- package/website/assets/index-11acce20.js +15 -0
- package/website/development/{index.js → assets/index-49595118.js} +782 -668
- package/website/development/index.html +1 -1
- package/website/development/manifest.json +1 -6
- package/website/development/service-worker.js +2118 -98
- package/website/index.html +1 -1
- package/website/manifest.json +1 -6
- package/website/service-worker.js +3 -1
- package/dist/service-worker.d.ts +0 -28
- package/dist/service-worker.js +0 -1
- package/website/index.js +0 -13
package/CHANGELOG.md
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
### Added
|
4
|
+
|
5
|
+
- standalone service-worker that might act as a reverse proxy when employed
|
6
|
+
- e2e tests run with TLS (both local and CI pipeline)
|
7
|
+
|
3
8
|
### Versioning
|
4
9
|
|
5
10
|
- `rxjs` bumped to version `v7.8.1`
|
6
11
|
- development dependencies bumped
|
7
12
|
|
13
|
+
## [0.4.2] - 2023-05-09
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
- added support for `zone.js`
|
18
|
+
|
8
19
|
## [0.4.1] - 2023-04-07
|
9
20
|
|
10
21
|
### Versioning
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
import type { Manifest } from '@micro-lc/back-kit-engine/schemas';
|
2
2
|
import type { Component, PluginConfiguration } from '@micro-lc/interfaces/schemas/v2';
|
3
|
+
interface UrlMatchPair {
|
4
|
+
headers?: Record<string, string>;
|
5
|
+
query?: Record<string, string>;
|
6
|
+
to: `${string}/`;
|
7
|
+
}
|
8
|
+
type SourceMapItems = Record<`${string}/`, UrlMatchPair>;
|
3
9
|
interface TagInfo {
|
4
10
|
definitions?: Record<string, unknown>;
|
5
11
|
description?: string;
|
@@ -24,6 +30,7 @@ interface OptionMessage {
|
|
24
30
|
content: {
|
25
31
|
disableOverlay?: boolean;
|
26
32
|
redirectTo?: string;
|
33
|
+
run?: boolean;
|
27
34
|
timeout?: number;
|
28
35
|
};
|
29
36
|
type: 'options';
|
@@ -39,19 +46,21 @@ type RegisteredElementMessages = {
|
|
39
46
|
content: StyledElementContent | undefined;
|
40
47
|
type: 'focus-element';
|
41
48
|
};
|
49
|
+
interface NewConfiguration {
|
50
|
+
configuration: PluginConfiguration;
|
51
|
+
contexts: Map<string, Component[]>;
|
52
|
+
tags: string[];
|
53
|
+
}
|
42
54
|
interface NewConfigurationMessage {
|
43
|
-
content:
|
44
|
-
configuration: PluginConfiguration;
|
45
|
-
contexts: Map<string, Component[]>;
|
46
|
-
tags: string[];
|
47
|
-
};
|
55
|
+
content: NewConfiguration;
|
48
56
|
type: 'new-configuration';
|
49
57
|
}
|
58
|
+
interface UpdateConfiguration {
|
59
|
+
configuration: PluginConfiguration;
|
60
|
+
context: Component;
|
61
|
+
}
|
50
62
|
interface UpdateConfigurationMessage {
|
51
|
-
content:
|
52
|
-
configuration: PluginConfiguration;
|
53
|
-
context: Component;
|
54
|
-
};
|
63
|
+
content: UpdateConfiguration;
|
55
64
|
type: 'update';
|
56
65
|
}
|
57
66
|
interface UpdatedMessage {
|
@@ -60,23 +69,13 @@ interface UpdatedMessage {
|
|
60
69
|
}
|
61
70
|
type RegisteredConfigMessages = NewConfigurationMessage | UpdateConfigurationMessage;
|
62
71
|
type ReducedMouseEvent = Pick<MouseEvent, 'bubbles' | 'cancelable' | 'clientX' | 'clientY'>;
|
63
|
-
interface ServiceWorkerConfig {
|
64
|
-
dictionary: Record<`${string}/`, {
|
65
|
-
headers: Record<string, string>;
|
66
|
-
query: Record<string, string>;
|
67
|
-
to: `${string}/`;
|
68
|
-
}>;
|
69
|
-
scope?: string;
|
70
|
-
}
|
71
72
|
interface SourceMapMessage {
|
72
|
-
content:
|
73
|
+
content: SourceMapItems;
|
73
74
|
type: 'set-source-map';
|
74
75
|
}
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
};
|
79
|
-
type: 'service-worker';
|
76
|
+
declare enum DebugMessage {
|
77
|
+
Default = 0,
|
78
|
+
Skip = 1
|
80
79
|
}
|
81
80
|
type RegisteredMessages = {
|
82
81
|
content: ReducedMouseEvent;
|
@@ -92,7 +91,8 @@ type RegisteredMessages = {
|
|
92
91
|
} | {
|
93
92
|
content: InfoEntry[];
|
94
93
|
type: 'tag-info';
|
95
|
-
} | RegisteredConfigMessages | UpdatedMessage | RegisteredElementMessages | OptionMessage | RequestResource | SourceMapMessage
|
94
|
+
} | RegisteredConfigMessages | UpdatedMessage | RegisteredElementMessages | OptionMessage | RequestResource | SourceMapMessage;
|
95
|
+
type MessageType = RegisteredMessages['type'];
|
96
96
|
interface NotifyProps extends Record<string, unknown> {
|
97
97
|
data?: Record<string, string>;
|
98
98
|
description: string;
|
@@ -114,22 +114,8 @@ type Update = Reset | SingleUpdate;
|
|
114
114
|
declare const MIA_PREVIEW_ID = "__mia_preview_id";
|
115
115
|
declare const OVERLAY_Z_INDEX = 1000000;
|
116
116
|
declare const DEFAULT_MODE = "select";
|
117
|
+
declare const keys: Record<MessageType, DebugMessage>;
|
117
118
|
declare function isRegisteredMessage(input: unknown): input is RegisteredMessages;
|
118
|
-
|
119
|
-
|
120
|
-
private __instance;
|
121
|
-
private __handler;
|
122
|
-
private __window;
|
123
|
-
private __randomColor;
|
124
|
-
private postMessage;
|
125
|
-
constructor(handler: (this: PostChannel, message: RegisteredMessages) => void);
|
126
|
-
set instance(str: string);
|
127
|
-
get window(): Window;
|
128
|
-
set window(win: Window);
|
129
|
-
send(to: Window, message: RegisteredMessages, origin?: string): void;
|
130
|
-
recv(window: Window, from?: Window | null): () => void;
|
131
|
-
}
|
132
|
-
export type { OverlayMode, TagInfo, InfoEntry, ElementContent, StyledElementContent, NewConfigurationMessage, UpdateConfigurationMessage, RegisteredConfigMessages, RegisteredMessages, OptionMessage, NotifyProps, Reset, Update, RequestResource, SourceMapMessage, ServiceWorkerConfig, };
|
133
|
-
export type * from './service-worker';
|
134
|
-
export { MIA_PREVIEW_ID, OVERLAY_Z_INDEX, DEFAULT_MODE, generateDarkColorHex, isRegisteredMessage, PostChannel, };
|
119
|
+
export type { NewConfiguration, UpdateConfiguration, OverlayMode, TagInfo, InfoEntry, ElementContent, StyledElementContent, NewConfigurationMessage, UpdateConfigurationMessage, RegisteredConfigMessages, RegisteredMessages, OptionMessage, NotifyProps, Reset, Update, RequestResource, SourceMapItems, UrlMatchPair, };
|
120
|
+
export { MIA_PREVIEW_ID, OVERLAY_Z_INDEX, DEFAULT_MODE, isRegisteredMessage, DebugMessage, keys, };
|
135
121
|
export * from './handlebars';
|
package/dist/index.js
CHANGED
@@ -7,20 +7,19 @@ const MIA_PREVIEW_ID = '__mia_preview_id';
|
|
7
7
|
const OVERLAY_Z_INDEX = 1_000_000;
|
8
8
|
const DEFAULT_MODE = 'select';
|
9
9
|
const keys = {
|
10
|
-
'click-element': DebugMessage.
|
11
|
-
'ctrl-space': DebugMessage.
|
10
|
+
'click-element': DebugMessage.Default,
|
11
|
+
'ctrl-space': DebugMessage.Default,
|
12
12
|
'focus-element': DebugMessage.Default,
|
13
|
-
mousedown: DebugMessage.
|
13
|
+
mousedown: DebugMessage.Default,
|
14
14
|
mousemove: DebugMessage.Skip,
|
15
15
|
'new-configuration': DebugMessage.Default,
|
16
|
-
notification: DebugMessage.
|
17
|
-
options: DebugMessage.
|
18
|
-
'request-resource': DebugMessage.
|
19
|
-
'service-worker': DebugMessage.Skip,
|
16
|
+
notification: DebugMessage.Default,
|
17
|
+
options: DebugMessage.Default,
|
18
|
+
'request-resource': DebugMessage.Default,
|
20
19
|
'set-source-map': DebugMessage.Default,
|
21
|
-
'tag-info': DebugMessage.
|
22
|
-
update: DebugMessage.
|
23
|
-
updated: DebugMessage.
|
20
|
+
'tag-info': DebugMessage.Default,
|
21
|
+
update: DebugMessage.Default,
|
22
|
+
updated: DebugMessage.Default,
|
24
23
|
};
|
25
24
|
const isValidKey = (type) => Object.keys(keys).includes(type);
|
26
25
|
function isRegisteredMessage(input) {
|
@@ -35,91 +34,5 @@ function isRegisteredMessage(input) {
|
|
35
34
|
}
|
36
35
|
return true;
|
37
36
|
}
|
38
|
-
|
39
|
-
if (input === null) {
|
40
|
-
return false;
|
41
|
-
}
|
42
|
-
if (typeof input !== 'object') {
|
43
|
-
return false;
|
44
|
-
}
|
45
|
-
if (!('type' in input) || typeof input.type !== 'string') {
|
46
|
-
return false;
|
47
|
-
}
|
48
|
-
const { type: signedType } = input;
|
49
|
-
if (!signedType.startsWith(signature)) {
|
50
|
-
return false;
|
51
|
-
}
|
52
|
-
const type = signedType.substring(signature.length);
|
53
|
-
if (!isValidKey(type)) {
|
54
|
-
return false;
|
55
|
-
}
|
56
|
-
return true;
|
57
|
-
}
|
58
|
-
const sign = (signature, message) => ({ ...message, type: `${signature}${message.type}` });
|
59
|
-
const unsign = (signature, message) => {
|
60
|
-
let { type } = message;
|
61
|
-
if (type.startsWith(signature)) {
|
62
|
-
type = type.substring(signature.length);
|
63
|
-
}
|
64
|
-
return { ...message, type };
|
65
|
-
};
|
66
|
-
const generateDarkColorHex = () => {
|
67
|
-
let color = '#';
|
68
|
-
for (let i = 0; i < 3; i++) {
|
69
|
-
color += (`0${Math.floor(Math.random() * Math.pow(16, 2) / 2).toString(16)}`).slice(-2);
|
70
|
-
}
|
71
|
-
return color;
|
72
|
-
};
|
73
|
-
class PostChannel {
|
74
|
-
__instance;
|
75
|
-
__handler;
|
76
|
-
__window;
|
77
|
-
__randomColor;
|
78
|
-
postMessage(to, message, origin) {
|
79
|
-
if (import.meta.env.MODE !== 'production' || this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__ === 'debug') {
|
80
|
-
console.assert(to !== this.__window);
|
81
|
-
}
|
82
|
-
if ((import.meta.env.MODE !== 'production' || this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__ === 'debug') && keys[message.type] !== DebugMessage.Skip) {
|
83
|
-
const color = this.__randomColor;
|
84
|
-
const background = `${color}22`;
|
85
|
-
const style = { background, color };
|
86
|
-
const hasTop = this.__window.top !== this.__window;
|
87
|
-
console.groupCollapsed(`%c Msg from ${this.__window.origin} ${hasTop ? '(inner)' : '(top)'} `, Object.entries(style).map(([key, val]) => `${key}: ${val}`).join('; '));
|
88
|
-
console.info(`window '${this.__window.origin}' is sending a message of type %c ${message.type} `, 'background: lightgreen; color: darkgreen');
|
89
|
-
console.log('to', to.document);
|
90
|
-
console.log(message.content);
|
91
|
-
console.groupEnd();
|
92
|
-
}
|
93
|
-
to.postMessage(sign(this.__instance, message), origin);
|
94
|
-
}
|
95
|
-
constructor(handler) {
|
96
|
-
this.__instance = '';
|
97
|
-
this.__handler = handler;
|
98
|
-
this.__window = window;
|
99
|
-
this.__randomColor = generateDarkColorHex();
|
100
|
-
}
|
101
|
-
set instance(str) {
|
102
|
-
this.__instance = str;
|
103
|
-
}
|
104
|
-
get window() {
|
105
|
-
return this.__window;
|
106
|
-
}
|
107
|
-
set window(win) {
|
108
|
-
this.__window = win;
|
109
|
-
}
|
110
|
-
send(to, message, origin = '*') {
|
111
|
-
this.__window !== to && this.postMessage(to, message, origin);
|
112
|
-
}
|
113
|
-
recv(window, from = null) {
|
114
|
-
const listener = ({ data, source }) => {
|
115
|
-
if ((from === null || source === from) && isInstanceMessage(data, this.__instance)) {
|
116
|
-
const message = unsign(this.__instance, data);
|
117
|
-
this.__handler(message);
|
118
|
-
}
|
119
|
-
};
|
120
|
-
window.addEventListener('message', listener);
|
121
|
-
return () => window.removeEventListener('message', listener);
|
122
|
-
}
|
123
|
-
}
|
124
|
-
export { MIA_PREVIEW_ID, OVERLAY_Z_INDEX, DEFAULT_MODE, generateDarkColorHex, isRegisteredMessage, PostChannel, };
|
37
|
+
export { MIA_PREVIEW_ID, OVERLAY_Z_INDEX, DEFAULT_MODE, isRegisteredMessage, DebugMessage, keys, };
|
125
38
|
export * from './handlebars';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@micro-lc/preview",
|
3
|
-
"version": "0.5.0-
|
3
|
+
"version": "0.5.0-rc10",
|
4
4
|
"module": "./dist/index.js",
|
5
5
|
"types": "./dist/index.d.ts",
|
6
6
|
"files": [
|
@@ -16,22 +16,25 @@
|
|
16
16
|
"build:types": "tsc --project scripts/tsconfig.build.json",
|
17
17
|
"build:app:dev": "vite build --mode development",
|
18
18
|
"build:app:prod": "vite build --mode production",
|
19
|
-
"build": "
|
19
|
+
"build:service-worker:dev": "esbuild service-worker.ts --bundle --outdir=website/development --allow-overwrite --define:process.env.MODE=\\\"development\\\"",
|
20
|
+
"build:service-worker:prod": "esbuild service-worker.ts --minify --bundle --outdir=website --allow-overwrite --define:process.env.MODE=\\\"production\\\"",
|
21
|
+
"build": "yarn run -T run-p build:types build:app:dev build:app:prod build:service-worker:dev build:service-worker:prod",
|
20
22
|
"preview": "vite preview"
|
21
23
|
},
|
22
24
|
"dependencies": {
|
23
25
|
"@micro-lc/composer": "^2.0.3",
|
24
|
-
"
|
26
|
+
"@micro-lc/post-channel": "0.1.0-rc1",
|
27
|
+
"es-module-shims": "^1.7.3",
|
25
28
|
"rxjs": "^7.8.1"
|
26
29
|
},
|
27
30
|
"devDependencies": {
|
28
|
-
"@micro-lc/back-kit-engine": "^0.20.
|
31
|
+
"@micro-lc/back-kit-engine": "^0.20.12",
|
29
32
|
"@micro-lc/interfaces": "^1.0.2",
|
30
|
-
"@playwright/test": "^1.34.
|
31
|
-
"@types/node": "^20.2.
|
32
|
-
"npm-run-all": "^4.1.5",
|
33
|
+
"@playwright/test": "^1.34.3",
|
34
|
+
"@types/node": "^20.2.4",
|
33
35
|
"typescript": "^5.0.4",
|
34
|
-
"vite": "^4.3.
|
36
|
+
"vite": "^4.3.9",
|
37
|
+
"vite-plugin-mkcert": "^1.15.0"
|
35
38
|
},
|
36
39
|
"engines": {
|
37
40
|
"node": ">=v16.20.0"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
var ss=Object.defineProperty;var os=(t,e,n)=>e in t?ss(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var se=(t,e,n)=>(os(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var as=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){const t=typeof window<"u",e=typeof document<"u",n=()=>{},r=e?document.querySelector("script[type=esms-options]"):void 0,s=r?JSON.parse(r.innerHTML):{};Object.assign(s,self.esmsInitOptions||{});let o=e?!!s.shimMode:!0;const c=F(o&&s.onimport),f=F(o&&s.resolve);let h=s.fetch?F(s.fetch):fetch;const d=s.meta?F(o&&s.meta):n,_=s.mapOverrides;let g=s.nonce;if(!g&&e){const u=document.querySelector("script[nonce]");u&&(g=u.nonce||u.getAttribute("nonce"))}const S=F(s.onerror||n),x=s.onpolyfill?F(s.onpolyfill):()=>{console.log("%c^^ Module TypeError above is polyfilled and can be ignored ^^","font-weight:900;color:#391")},{revokeBlobURLs:P,noLoadEventRetriggers:C,enforceIntegrity:q}=s;function F(u){return typeof u=="string"?self[u]:u}const R=Array.isArray(s.polyfillEnable)?s.polyfillEnable:[],H=R.includes("css-modules"),G=R.includes("json-modules"),ft=!navigator.userAgentData&&!!navigator.userAgent.match(/Edge\/\d+\.\d+/),ue=e?document.baseURI:`${location.protocol}//${location.host}${location.pathname.includes("/")?location.pathname.slice(0,location.pathname.lastIndexOf("/")+1):location.pathname}`,te=(u,p="text/javascript")=>URL.createObjectURL(new Blob([u],{type:p}));let{skip:_e}=s;if(Array.isArray(_e)){const u=_e.map(p=>new URL(p,ue).href);_e=p=>u.some(b=>b[b.length-1]==="/"&&p.startsWith(b)||p===b)}else if(typeof _e=="string"){const u=new RegExp(_e);_e=p=>u.test(p)}const gi=u=>setTimeout(()=>{throw u}),Lt=u=>{(self.reportError||t&&window.safari&&console.error||gi)(u),S(u)};function Ve(u){return u?` imported from ${u}`:""}let ht=!1;function wi(){ht=!0}if(!o)if(document.querySelectorAll("script[type=module-shim],script[type=importmap-shim],link[rel=modulepreload-shim]").length)o=!0;else{let u=!1;for(const p of document.querySelectorAll("script[type=module],script[type=importmap]"))if(!u)p.type==="module"&&!p.ep&&(u=!0);else if(p.type==="importmap"&&u){ht=!0;break}}const ki=/\\/g;function Tt(u){if(u.indexOf(":")===-1)return!1;try{return new URL(u),!0}catch{return!1}}function Sn(u,p){return Ee(u,p)||(Tt(u)?u:Ee("./"+u,p))}function Ee(u,p){const b=p.indexOf("#"),A=p.indexOf("?");if(b+A>-2&&(p=p.slice(0,b===-1?A:A===-1||A>b?b:A)),u.indexOf("\\")!==-1&&(u=u.replace(ki,"/")),u[0]==="/"&&u[1]==="/")return p.slice(0,p.indexOf(":")+1)+u;if(u[0]==="."&&(u[1]==="/"||u[1]==="."&&(u[2]==="/"||u.length===2&&(u+="/"))||u.length===1&&(u+="/"))||u[0]==="/"){const k=p.slice(0,p.indexOf(":")+1);let $;if(p[k.length+1]==="/"?k!=="file:"?($=p.slice(k.length+2),$=$.slice($.indexOf("/")+1)):$=p.slice(8):$=p.slice(k.length+(p[k.length]==="/")),u[0]==="/")return p.slice(0,p.length-$.length-1)+u;const E=$.slice(0,$.lastIndexOf("/")+1)+u,I=[];let M=-1;for(let O=0;O<E.length;O++){if(M!==-1){E[O]==="/"&&(I.push(E.slice(M,O+1)),M=-1);continue}else if(E[O]==="."){if(E[O+1]==="."&&(E[O+2]==="/"||O+2===E.length)){I.pop(),O+=2;continue}else if(E[O+1]==="/"||O+1===E.length){O+=1;continue}}for(;E[O]==="/";)O++;M=O}return M!==-1&&I.push(E.slice(M)),p.slice(0,p.length-$.length)+I.join("")}}function En(u,p,b){const A={imports:Object.assign({},b.imports),scopes:Object.assign({},b.scopes)};if(u.imports&&On(u.imports,A.imports,p,b),u.scopes)for(let k in u.scopes){const $=Sn(k,p);On(u.scopes[k],A.scopes[$]||(A.scopes[$]={}),p,b)}return A}function Pt(u,p){if(p[u])return u;let b=u.length;do{const A=u.slice(0,b+1);if(A in p)return A}while((b=u.lastIndexOf("/",b-1))!==-1)}function xn(u,p){const b=Pt(u,p);if(b){const A=p[b];return A===null?void 0:A+u.slice(b.length)}}function Mt(u,p,b){let A=b&&Pt(b,u.scopes);for(;A;){const k=xn(p,u.scopes[A]);if(k)return k;A=Pt(A.slice(0,A.lastIndexOf("/")),u.scopes)}return xn(p,u.imports)||p.indexOf(":")!==-1&&p}function On(u,p,b,A){for(let k in u){const $=Ee(k,b)||k;if((!o||!_)&&p[$]&&p[$]!==u[$])throw Error(`Rejected map override "${$}" from ${p[$]} to ${u[$]}.`);let E=u[k];if(typeof E!="string")continue;const I=Mt(A,Ee(E,b)||E,b);if(I){p[$]=I;continue}console.warn(`Mapping "${k}" -> "${u[k]}" does not resolve`)}}let me=!e&&(0,eval)("u=>import(u)"),qe;const $i=e&&new Promise(u=>{const p=Object.assign(document.createElement("script"),{src:te("self._d=u=>import(u)"),ep:!0});p.setAttribute("nonce",g),p.addEventListener("load",()=>{if(!(qe=!!(me=self._d))){let b;window.addEventListener("error",A=>b=A),me=(A,k)=>new Promise(($,E)=>{const I=Object.assign(document.createElement("script"),{type:"module",src:te(`import*as m from'${A}';self._esmsi=m`)});b=void 0,I.ep=!0,g&&I.setAttribute("nonce",g),I.addEventListener("error",M),I.addEventListener("load",M);function M(O){document.head.removeChild(I),self._esmsi?($(self._esmsi,ue),self._esmsi=void 0):(E(!(O instanceof Event)&&O||b&&b.error||new Error(`Error loading ${k&&k.errUrl||A} (${I.src}).`)),b=void 0)}document.head.appendChild(I)})}document.head.removeChild(p),delete self._d,u()}),document.head.appendChild(p)});let dt=!1,pt=!1;const Rt=e&&HTMLScriptElement.supports;let je=Rt&&Rt.name==="supports"&&Rt("importmap"),mt=qe;const In="import.meta",Cn='import"x"assert{type:"css"}',Ai='import"x"assert{type:"json"}';let Si=Promise.resolve($i).then(()=>{if(qe)return e?new Promise(u=>{const p=document.createElement("iframe");p.style.display="none",p.setAttribute("nonce",g);function b({data:I}){Array.isArray(I)&&I[0]==="esms"&&(je=I[1],mt=I[2],pt=I[3],dt=I[4],u(),document.head.removeChild(p),window.removeEventListener("message",b,!1))}window.addEventListener("message",b,!1);const A=`<script nonce=${g||""}>b=(s,type='text/javascript')=>URL.createObjectURL(new Blob([s],{type}));document.head.appendChild(Object.assign(document.createElement('script'),{type:'importmap',nonce:"${g}",innerText:\`{"imports":{"x":"\${b('')}"}}\`}));Promise.all([${je?"true,true":`'x',b('${In}')`}, ${H?`b('${Cn}'.replace('x',b('','text/css')))`:"false"}, ${G?`b('${Ai}'.replace('x',b('{}','text/json')))`:"false"}].map(x =>typeof x==='string'?import(x).then(x =>!!x,()=>false):x)).then(a=>parent.postMessage(['esms'].concat(a),'*'))<\/script>`;let k=!1,$=!1;function E(){if(!k){$=!0;return}const I=p.contentDocument;if(I&&I.head.childNodes.length===0){const M=I.createElement("script");g&&M.setAttribute("nonce",g),M.innerHTML=A.slice(15+(g?g.length:0),-9),I.head.appendChild(M)}}p.onload=E,document.head.appendChild(p),k=!0,"srcdoc"in p?p.srcdoc=A:p.contentDocument.write(A),$&&E()}):Promise.all([je||me(te(In)).then(()=>mt=!0,n),H&&me(te(Cn.replace("x",te("","text/css")))).then(()=>pt=!0,n),G&&me(te(jsonModulescheck.replace("x",te("{}","text/json")))).then(()=>dt=!0,n)])}),D,vt,jt,Ge=2<<19;const Ln=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(u,p){const b=u.length;let A=0;for(;A<b;)p[A]=u.charCodeAt(A++)}:function(u,p){const b=u.length;let A=0;for(;A<b;){const k=u.charCodeAt(A);p[A++]=(255&k)<<8|k>>>8}},Ei="xportmportlassetaromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels";let W,Tn,j;function xi(u,p="@"){W=u,Tn=p;const b=2*W.length+(2<<18);if(b>Ge||!D){for(;b>Ge;)Ge*=2;vt=new ArrayBuffer(Ge),Ln(Ei,new Uint16Array(vt,16,105)),D=function(E,I,M){var O=new E.Int8Array(M),w=new E.Int16Array(M),a=new E.Int32Array(M),re=new E.Uint8Array(M),Y=new E.Uint16Array(M),J=1024;function ie(){var i=0,l=0,m=0,y=0,v=0,L=0,$e=0;$e=J,J=J+10240|0,O[795]=1,w[395]=0,w[396]=0,a[67]=a[2],O[796]=0,a[66]=0,O[794]=0,a[68]=$e+2048,a[69]=$e,O[797]=0,i=(a[3]|0)+-2|0,a[70]=i,l=i+(a[64]<<1)|0,a[71]=l;e:for(;;){if(m=i+2|0,a[70]=m,i>>>0>=l>>>0){v=18;break}n:do switch(w[m>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(w[396]|0)&&et(m)|0&&!(Z(i+4|0,16,10)|0)&&(we(),(O[795]|0)==0)){v=9;break e}else v=17;break}case 105:{et(m)|0&&!(Z(i+4|0,26,10)|0)&&B(),v=17;break}case 59:{v=17;break}case 47:switch(w[i+4>>1]|0){case 47:{Kt();break n}case 42:{zt(1);break n}default:{v=16;break e}}default:{v=16;break e}}while(0);(v|0)==17&&(v=0,a[67]=a[70]),i=a[70]|0,l=a[71]|0}(v|0)==9?(i=a[70]|0,a[67]=i,v=19):(v|0)==16?(O[795]=0,a[70]=i,v=19):(v|0)==18&&(O[794]|0?i=0:(i=m,v=19));do if((v|0)==19){e:for(;;){if(l=i+2|0,a[70]=l,y=l,i>>>0>=(a[71]|0)>>>0){v=82;break}n:do switch(w[l>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(w[396]|0)&&et(l)|0&&!(Z(i+4|0,16,10)|0)&&we(),v=81;break}case 105:{et(l)|0&&!(Z(i+4|0,26,10)|0)&&B(),v=81;break}case 99:{et(l)|0&&!(Z(i+4|0,36,8)|0)&&tt(w[i+12>>1]|0)|0&&(O[797]=1),v=81;break}case 40:{y=a[68]|0,l=w[396]|0,v=l&65535,a[y+(v<<3)>>2]=1,m=a[67]|0,w[396]=l+1<<16>>16,a[y+(v<<3)+4>>2]=m,v=81;break}case 41:{if(l=w[396]|0,!(l<<16>>16)){v=36;break e}l=l+-1<<16>>16,w[396]=l,m=w[395]|0,m<<16>>16&&(L=a[(a[69]|0)+((m&65535)+-1<<2)>>2]|0,(a[L+20>>2]|0)==(a[(a[68]|0)+((l&65535)<<3)+4>>2]|0))&&(l=L+4|0,a[l>>2]|0||(a[l>>2]=y),a[L+12>>2]=i+4,w[395]=m+-1<<16>>16),v=81;break}case 123:{v=a[67]|0,y=a[61]|0,i=v;do if((w[v>>1]|0)==41&(y|0)!=0&&(a[y+4>>2]|0)==(v|0))if(l=a[62]|0,a[61]=l,l){a[l+28>>2]=0;break}else{a[57]=0;break}while(0);y=a[68]|0,m=w[396]|0,v=m&65535,a[y+(v<<3)>>2]=O[797]|0?6:2,w[396]=m+1<<16>>16,a[y+(v<<3)+4>>2]=i,O[797]=0,v=81;break}case 125:{if(i=w[396]|0,!(i<<16>>16)){v=49;break e}y=a[68]|0,v=i+-1<<16>>16,w[396]=v,(a[y+((v&65535)<<3)>>2]|0)==4&&ve(),v=81;break}case 39:{Q(39),v=81;break}case 34:{Q(34),v=81;break}case 47:switch(w[i+4>>1]|0){case 47:{Kt();break n}case 42:{zt(1);break n}default:{i=a[67]|0,y=w[i>>1]|0;t:do if(Fi(y)|0)switch(y<<16>>16){case 46:if(((w[i+-2>>1]|0)+-48&65535)<10){v=66;break t}else{v=69;break t}case 43:if((w[i+-2>>1]|0)==43){v=66;break t}else{v=69;break t}case 45:if((w[i+-2>>1]|0)==45){v=66;break t}else{v=69;break t}default:{v=69;break t}}else{switch(y<<16>>16){case 41:if(Bi(a[(a[68]|0)+(Y[396]<<3)+4>>2]|0)|0){v=69;break t}else{v=66;break t}case 125:break;default:{v=66;break t}}l=a[68]|0,m=Y[396]|0,!(Ni(a[l+(m<<3)+4>>2]|0)|0)&&(a[l+(m<<3)>>2]|0)!=6?v=66:v=69}while(0);t:do if((v|0)==66)if(v=0,gt(i)|0)v=69;else{switch(y<<16>>16){case 0:{v=69;break t}case 47:{if(O[796]|0){v=69;break t}break}default:}m=a[3]|0,l=y;do{if(i>>>0<=m>>>0)break;i=i+-2|0,a[67]=i,l=w[i>>1]|0}while(!(Jt(l)|0));if(kt(l)|0){do{if(i>>>0<=m>>>0)break;i=i+-2|0,a[67]=i}while(kt(w[i>>1]|0)|0);if(Ui(i)|0){tr(),O[796]=0,v=81;break n}else i=1}else i=1}while(0);(v|0)==69&&(tr(),i=0),O[796]=i,v=81;break n}}case 96:{y=a[68]|0,m=w[396]|0,v=m&65535,a[y+(v<<3)+4>>2]=a[67],w[396]=m+1<<16>>16,a[y+(v<<3)>>2]=3,ve(),v=81;break}default:v=81}while(0);(v|0)==81&&(v=0,a[67]=a[70]),i=a[70]|0}if((v|0)==36){ne(),i=0;break}else if((v|0)==49){ne(),i=0;break}else if((v|0)==82){i=O[794]|0?0:(w[395]|w[396])<<16>>16==0;break}}while(0);return J=$e,i|0}function we(){var i=0,l=0,m=0,y=0,v=0,L=0,$e=0,Ie=0,Qt=0,Xt=0,Zt=0,en=0,U=0,V=0;Ie=a[70]|0,Qt=a[63]|0,V=Ie+12|0,a[70]=V,m=T(1)|0,i=a[70]|0,(i|0)==(V|0)&&!(wt(m)|0)||(U=3);e:do if((U|0)==3){n:do switch(m<<16>>16){case 123:{for(a[70]=i+2,i=T(1)|0,m=a[70]|0;;){if(nt(i)|0?(Q(i),i=(a[70]|0)+2|0,a[70]=i):(Oe(i)|0,i=a[70]|0),T(1)|0,i=Xe(m,i)|0,i<<16>>16==44&&(a[70]=(a[70]|0)+2,i=T(1)|0),l=m,m=a[70]|0,i<<16>>16==125){U=15;break}if((m|0)==(l|0)){U=12;break}if(m>>>0>(a[71]|0)>>>0){U=14;break}}if((U|0)==12){ne();break e}else if((U|0)==14){ne();break e}else if((U|0)==15){a[70]=m+2;break n}break}case 42:{a[70]=i+2,T(1)|0,V=a[70]|0,Xe(V,V)|0;break}default:{switch(O[795]=0,m<<16>>16){case 100:{switch(Ie=i+14|0,a[70]=Ie,(T(1)|0)<<16>>16){case 97:{l=a[70]|0,!(Z(l+2|0,56,8)|0)&&(v=l+10|0,kt(w[v>>1]|0)|0)&&(a[70]=v,T(0)|0,U=22);break}case 102:{U=22;break}case 99:{l=a[70]|0,!(Z(l+2|0,36,8)|0)&&(y=l+10|0,V=w[y>>1]|0,tt(V)|0|V<<16>>16==123)&&(a[70]=y,L=T(1)|0,L<<16>>16!=123)&&(en=L,U=31);break}default:}t:do if((U|0)==22&&($e=a[70]|0,(Z($e+2|0,64,14)|0)==0)){if(m=$e+16|0,l=w[m>>1]|0,!(tt(l)|0))switch(l<<16>>16){case 40:case 42:break;default:break t}a[70]=m,l=T(1)|0,l<<16>>16==42&&(a[70]=(a[70]|0)+2,l=T(1)|0),l<<16>>16!=40&&(en=l,U=31)}while(0);if((U|0)==31&&(Xt=a[70]|0,Oe(en)|0,Zt=a[70]|0,Zt>>>0>Xt>>>0)){Fe(i,Ie,Xt,Zt),a[70]=(a[70]|0)+-2;break e}Fe(i,Ie,0,0),a[70]=i+12;break e}case 97:{a[70]=i+10,T(0)|0,i=a[70]|0,U=35;break}case 102:{U=35;break}case 99:{if(!(Z(i+2|0,36,8)|0)&&(l=i+10|0,Jt(w[l>>1]|0)|0)){a[70]=l,V=T(1)|0,U=a[70]|0,Oe(V)|0,V=a[70]|0,Fe(U,V,U,V),a[70]=(a[70]|0)+-2;break e}i=i+4|0,a[70]=i;break}case 108:case 118:break;default:break e}if((U|0)==35){a[70]=i+16,i=T(1)|0,i<<16>>16==42&&(a[70]=(a[70]|0)+2,i=T(1)|0),U=a[70]|0,Oe(i)|0,V=a[70]|0,Fe(U,V,U,V),a[70]=(a[70]|0)+-2;break e}i=i+4|0,a[70]=i,O[795]=0;t:for(;;){switch(a[70]=i+2,V=T(1)|0,i=a[70]|0,(Oe(V)|0)<<16>>16){case 91:case 123:break t;default:}if(l=a[70]|0,(l|0)==(i|0))break e;if(Fe(i,l,i,l),(T(1)|0)<<16>>16!=44)break;i=a[70]|0}a[70]=(a[70]|0)+-2;break e}}while(0);if(V=(T(1)|0)<<16>>16==102,i=a[70]|0,V&&!(Z(i+2|0,50,6)|0))for(a[70]=i+8,ke(Ie,T(1)|0),i=Qt|0?Qt+16|0:232;;){if(i=a[i>>2]|0,!i)break e;a[i+12>>2]=0,a[i+8>>2]=0,i=i+16|0}a[70]=i+-2}while(0)}function B(){var i=0,l=0,m=0,y=0,v=0,L=0;v=a[70]|0,i=v+12|0,a[70]=i;e:do switch((T(1)|0)<<16>>16){case 40:{if(l=a[68]|0,L=w[396]|0,m=L&65535,a[l+(m<<3)>>2]=5,i=a[70]|0,w[396]=L+1<<16>>16,a[l+(m<<3)+4>>2]=i,(w[a[67]>>1]|0)!=46){switch(a[70]=i+2,L=T(1)|0,Yt(v,a[70]|0,0,i),l=a[61]|0,m=a[69]|0,v=w[395]|0,w[395]=v+1<<16>>16,a[m+((v&65535)<<2)>>2]=l,L<<16>>16){case 39:{Q(39);break}case 34:{Q(34);break}default:{a[70]=(a[70]|0)+-2;break e}}switch(i=(a[70]|0)+2|0,a[70]=i,(T(1)|0)<<16>>16){case 44:{a[70]=(a[70]|0)+2,T(1)|0,v=a[61]|0,a[v+4>>2]=i,L=a[70]|0,a[v+16>>2]=L,O[v+24>>0]=1,a[70]=L+-2;break e}case 41:{w[396]=(w[396]|0)+-1<<16>>16,L=a[61]|0,a[L+4>>2]=i,a[L+12>>2]=(a[70]|0)+2,O[L+24>>0]=1,w[395]=(w[395]|0)+-1<<16>>16;break e}default:{a[70]=(a[70]|0)+-2;break e}}}break}case 46:{if(a[70]=(a[70]|0)+2,(T(1)|0)<<16>>16==109&&(l=a[70]|0,(Z(l+2|0,44,6)|0)==0)){if(i=a[67]|0,!(rr(i)|0)&&(w[i>>1]|0)==46)break e;Yt(v,v,l+8|0,2)}break}case 42:case 39:case 34:{y=18;break}case 123:{if(i=a[70]|0,w[396]|0){a[70]=i+-2;break e}for(;!(i>>>0>=(a[71]|0)>>>0);){if(i=T(1)|0,nt(i)|0)Q(i);else if(i<<16>>16==125){y=33;break}i=(a[70]|0)+2|0,a[70]=i}if((y|0)==33&&(a[70]=(a[70]|0)+2),L=(T(1)|0)<<16>>16==102,i=a[70]|0,L&&Z(i+2|0,50,6)|0){ne();break e}if(a[70]=i+8,i=T(1)|0,nt(i)|0){ke(v,i);break e}else{ne();break e}}default:(a[70]|0)==(i|0)?a[70]=v+10:y=18}while(0);do if((y|0)==18){if(w[396]|0){a[70]=(a[70]|0)+-2;break}for(i=a[71]|0,l=a[70]|0;;){if(l>>>0>=i>>>0){y=25;break}if(m=w[l>>1]|0,nt(m)|0){y=23;break}L=l+2|0,a[70]=L,l=L}if((y|0)==23){ke(v,m);break}else if((y|0)==25){ne();break}}while(0)}function ke(i,l){i=i|0,l=l|0;var m=0,y=0;switch(m=(a[70]|0)+2|0,l<<16>>16){case 39:{Q(39),y=5;break}case 34:{Q(34),y=5;break}default:ne()}do if((y|0)==5){if(Yt(i,m,a[70]|0,1),a[70]=(a[70]|0)+2,l=T(0)|0,i=l<<16>>16==97,i?(m=a[70]|0,Z(m+2|0,78,10)|0&&(y=11)):(m=a[70]|0,l<<16>>16==119&&(w[m+2>>1]|0)==105&&(w[m+4>>1]|0)==116&&(w[m+6>>1]|0)==104||(y=11)),(y|0)==11){a[70]=m+-2;break}if(a[70]=m+((i?6:4)<<1),(T(1)|0)<<16>>16!=123){a[70]=m;break}i=a[70]|0,l=i;e:for(;;){switch(a[70]=l+2,l=T(1)|0,l<<16>>16){case 39:{Q(39),a[70]=(a[70]|0)+2,l=T(1)|0;break}case 34:{Q(34),a[70]=(a[70]|0)+2,l=T(1)|0;break}default:l=Oe(l)|0}if(l<<16>>16!=58){y=20;break}switch(a[70]=(a[70]|0)+2,(T(1)|0)<<16>>16){case 39:{Q(39);break}case 34:{Q(34);break}default:{y=24;break e}}switch(a[70]=(a[70]|0)+2,(T(1)|0)<<16>>16){case 125:{y=29;break e}case 44:break;default:{y=28;break e}}if(a[70]=(a[70]|0)+2,(T(1)|0)<<16>>16==125){y=29;break}l=a[70]|0}if((y|0)==20){a[70]=m;break}else if((y|0)==24){a[70]=m;break}else if((y|0)==28){a[70]=m;break}else if((y|0)==29){y=a[61]|0,a[y+16>>2]=i,a[y+12>>2]=(a[70]|0)+2;break}}while(0)}function gt(i){i=i|0;e:do switch(w[i>>1]|0){case 100:switch(w[i+-2>>1]|0){case 105:{i=z(i+-4|0,88,2)|0;break e}case 108:{i=z(i+-4|0,92,3)|0;break e}default:{i=0;break e}}case 101:switch(w[i+-2>>1]|0){case 115:switch(w[i+-4>>1]|0){case 108:{i=Ze(i+-6|0,101)|0;break e}case 97:{i=Ze(i+-6|0,99)|0;break e}default:{i=0;break e}}case 116:{i=z(i+-4|0,98,4)|0;break e}case 117:{i=z(i+-4|0,106,6)|0;break e}default:{i=0;break e}}case 102:{if((w[i+-2>>1]|0)==111&&(w[i+-4>>1]|0)==101)switch(w[i+-6>>1]|0){case 99:{i=z(i+-8|0,118,6)|0;break e}case 112:{i=z(i+-8|0,130,2)|0;break e}default:{i=0;break e}}else i=0;break}case 107:{i=z(i+-2|0,134,4)|0;break}case 110:{i=i+-2|0,Ze(i,105)|0?i=1:i=z(i,142,5)|0;break}case 111:{i=Ze(i+-2|0,100)|0;break}case 114:{i=z(i+-2|0,152,7)|0;break}case 116:{i=z(i+-2|0,166,4)|0;break}case 119:switch(w[i+-2>>1]|0){case 101:{i=Ze(i+-4|0,110)|0;break e}case 111:{i=z(i+-4|0,174,3)|0;break e}default:{i=0;break e}}default:i=0}while(0);return i|0}function ve(){var i=0,l=0,m=0,y=0;l=a[71]|0,m=a[70]|0;e:for(;;){if(i=m+2|0,m>>>0>=l>>>0){l=10;break}switch(w[i>>1]|0){case 96:{l=7;break e}case 36:{if((w[m+4>>1]|0)==123){l=6;break e}break}case 92:{i=m+4|0;break}default:}m=i}(l|0)==6?(i=m+4|0,a[70]=i,l=a[68]|0,y=w[396]|0,m=y&65535,a[l+(m<<3)>>2]=4,w[396]=y+1<<16>>16,a[l+(m<<3)+4>>2]=i):(l|0)==7?(a[70]=i,m=a[68]|0,y=(w[396]|0)+-1<<16>>16,w[396]=y,(a[m+((y&65535)<<3)>>2]|0)!=3&&ne()):(l|0)==10&&(a[70]=i,ne())}function T(i){i=i|0;var l=0,m=0,y=0;m=a[70]|0;e:do{l=w[m>>1]|0;n:do if(l<<16>>16!=47)if(i){if(tt(l)|0)break;break e}else{if(kt(l)|0)break;break e}else switch(w[m+2>>1]|0){case 47:{Kt();break n}case 42:{zt(i);break n}default:{l=47;break e}}while(0);y=a[70]|0,m=y+2|0,a[70]=m}while(y>>>0<(a[71]|0)>>>0);return l|0}function Q(i){i=i|0;var l=0,m=0,y=0,v=0;for(v=a[71]|0,l=a[70]|0;;){if(y=l+2|0,l>>>0>=v>>>0){l=9;break}if(m=w[y>>1]|0,m<<16>>16==i<<16>>16){l=10;break}if(m<<16>>16==92)m=l+4|0,(w[m>>1]|0)==13?(l=l+6|0,l=(w[l>>1]|0)==10?l:m):l=m;else if(ir(m)|0){l=9;break}else l=y}(l|0)==9?(a[70]=y,ne()):(l|0)==10&&(a[70]=y)}function Xe(i,l){i=i|0,l=l|0;var m=0,y=0,v=0,L=0;return m=a[70]|0,y=w[m>>1]|0,L=(i|0)==(l|0),v=L?0:i,L=L?0:l,y<<16>>16==97&&(a[70]=m+4,m=T(1)|0,i=a[70]|0,nt(m)|0?(Q(m),l=(a[70]|0)+2|0,a[70]=l):(Oe(m)|0,l=a[70]|0),y=T(1)|0,m=a[70]|0),(m|0)!=(i|0)&&Fe(i,l,v,L),y|0}function Yt(i,l,m,y){i=i|0,l=l|0,m=m|0,y=y|0;var v=0,L=0;v=a[65]|0,a[65]=v+32,L=a[61]|0,a[(L|0?L+28|0:228)>>2]=v,a[62]=L,a[61]=v,a[v+8>>2]=i,(y|0)==2?i=m:i=(y|0)==1?m+2|0:0,a[v+12>>2]=i,a[v>>2]=l,a[v+4>>2]=m,a[v+16>>2]=0,a[v+20>>2]=y,O[v+24>>0]=(y|0)==1&1,a[v+28>>2]=0}function ji(){var i=0,l=0,m=0;m=a[71]|0,l=a[70]|0;e:for(;;){if(i=l+2|0,l>>>0>=m>>>0){l=6;break}switch(w[i>>1]|0){case 13:case 10:{l=6;break e}case 93:{l=7;break e}case 92:{i=l+4|0;break}default:}l=i}return(l|0)==6?(a[70]=i,ne(),i=0):(l|0)==7&&(a[70]=i,i=93),i|0}function tr(){var i=0,l=0,m=0;e:for(;;){if(i=a[70]|0,l=i+2|0,a[70]=l,i>>>0>=(a[71]|0)>>>0){m=7;break}switch(w[l>>1]|0){case 13:case 10:{m=7;break e}case 47:break e;case 91:{ji()|0;break}case 92:{a[70]=i+4;break}default:}}(m|0)==7&&ne()}function Ni(i){switch(i=i|0,w[i>>1]|0){case 62:{i=(w[i+-2>>1]|0)==61;break}case 41:case 59:{i=1;break}case 104:{i=z(i+-2|0,200,4)|0;break}case 121:{i=z(i+-2|0,208,6)|0;break}case 101:{i=z(i+-2|0,220,3)|0;break}default:i=0}return i|0}function zt(i){i=i|0;var l=0,m=0,y=0,v=0,L=0;for(v=(a[70]|0)+2|0,a[70]=v,m=a[71]|0;l=v+2|0,!(v>>>0>=m>>>0||(y=w[l>>1]|0,!i&&ir(y)|0));){if(y<<16>>16==42&&(w[v+4>>1]|0)==47){L=8;break}v=l}(L|0)==8&&(a[70]=l,l=v+4|0),a[70]=l}function Z(i,l,m){i=i|0,l=l|0,m=m|0;var y=0,v=0;e:do if(!m)i=0;else{for(;y=O[i>>0]|0,v=O[l>>0]|0,y<<24>>24==v<<24>>24;)if(m=m+-1|0,m)i=i+1|0,l=l+1|0;else{i=0;break e}i=(y&255)-(v&255)|0}while(0);return i|0}function wt(i){i=i|0;e:do switch(i<<16>>16){case 38:case 37:case 33:{i=1;break}default:if((i&-8)<<16>>16==40|(i+-58&65535)<6)i=1;else{switch(i<<16>>16){case 91:case 93:case 94:{i=1;break e}default:}i=(i+-123&65535)<4}}while(0);return i|0}function Fi(i){i=i|0;e:do switch(i<<16>>16){case 38:case 37:case 33:break;default:if(!((i+-58&65535)<6|(i+-40&65535)<7&i<<16>>16!=41)){switch(i<<16>>16){case 91:case 94:break e;default:}return i<<16>>16!=125&(i+-123&65535)<4|0}}while(0);return 1}function nr(i){i=i|0;var l=0;l=w[i>>1]|0;e:do if((l+-9&65535)>=5){switch(l<<16>>16){case 160:case 32:{l=1;break e}default:}if(wt(l)|0)return l<<16>>16!=46|(rr(i)|0)|0;l=0}else l=1;while(0);return l|0}function Hi(i){i=i|0;var l=0,m=0,y=0,v=0;return m=J,J=J+16|0,y=m,a[y>>2]=0,a[64]=i,l=a[3]|0,v=l+(i<<1)|0,i=v+2|0,w[v>>1]=0,a[y>>2]=i,a[65]=i,a[57]=0,a[61]=0,a[59]=0,a[58]=0,a[63]=0,a[60]=0,J=m,l|0}function z(i,l,m){i=i|0,l=l|0,m=m|0;var y=0,v=0;return y=i+(0-m<<1)|0,v=y+2|0,i=a[3]|0,v>>>0>=i>>>0&&!(Z(v,l,m<<1)|0)?(v|0)==(i|0)?i=1:i=nr(y)|0:i=0,i|0}function Fe(i,l,m,y){i=i|0,l=l|0,m=m|0,y=y|0;var v=0,L=0;v=a[65]|0,a[65]=v+20,L=a[63]|0,a[(L|0?L+16|0:232)>>2]=v,a[63]=v,a[v>>2]=i,a[v+4>>2]=l,a[v+8>>2]=m,a[v+12>>2]=y,a[v+16>>2]=0}function Ui(i){switch(i=i|0,w[i>>1]|0){case 107:{i=z(i+-2|0,134,4)|0;break}case 101:{(w[i+-2>>1]|0)==117?i=z(i+-4|0,106,6)|0:i=0;break}default:i=0}return i|0}function Ze(i,l){i=i|0,l=l|0;var m=0;return m=a[3]|0,m>>>0<=i>>>0&&(w[i>>1]|0)==l<<16>>16?(m|0)==(i|0)?m=1:m=Jt(w[i+-2>>1]|0)|0:m=0,m|0}function Jt(i){i=i|0;e:do if((i+-9&65535)<5)i=1;else{switch(i<<16>>16){case 32:case 160:{i=1;break e}default:}i=i<<16>>16!=46&(wt(i)|0)}while(0);return i|0}function Kt(){var i=0,l=0,m=0;i=a[71]|0,m=a[70]|0;e:for(;l=m+2|0,!(m>>>0>=i>>>0);)switch(w[l>>1]|0){case 13:case 10:break e;default:m=l}a[70]=l}function Oe(i){for(i=i|0;!(tt(i)|0||wt(i)|0);)if(i=(a[70]|0)+2|0,a[70]=i,i=w[i>>1]|0,!(i<<16>>16)){i=0;break}return i|0}function Wi(){var i=0;switch(i=a[(a[59]|0)+20>>2]|0,i|0){case 1:{i=-1;break}case 2:{i=-2;break}default:i=i-(a[3]|0)>>1}return i|0}function Bi(i){return i=i|0,!(z(i,180,5)|0)&&!(z(i,190,3)|0)?i=z(i,196,2)|0:i=1,i|0}function kt(i){switch(i=i|0,i<<16>>16){case 160:case 32:case 12:case 11:case 9:{i=1;break}default:i=0}return i|0}function rr(i){return i=i|0,(w[i>>1]|0)==46&&(w[i+-2>>1]|0)==46?i=(w[i+-4>>1]|0)==46:i=0,i|0}function et(i){return i=i|0,(a[3]|0)==(i|0)?i=1:i=nr(i+-2|0)|0,i|0}function Di(){var i=0;return i=a[(a[60]|0)+12>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Vi(){var i=0;return i=a[(a[59]|0)+12>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function qi(){var i=0;return i=a[(a[60]|0)+8>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Gi(){var i=0;return i=a[(a[59]|0)+16>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Yi(){var i=0;return i=a[(a[59]|0)+4>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function zi(){var i=0;return i=a[59]|0,i=a[(i|0?i+28|0:228)>>2]|0,a[59]=i,(i|0)!=0|0}function Ji(){var i=0;return i=a[60]|0,i=a[(i|0?i+16|0:232)>>2]|0,a[60]=i,(i|0)!=0|0}function ne(){O[794]=1,a[66]=(a[70]|0)-(a[3]|0)>>1,a[70]=(a[71]|0)+2}function tt(i){return i=i|0,(i|128)<<16>>16==160|(i+-9&65535)<5|0}function nt(i){return i=i|0,i<<16>>16==39|i<<16>>16==34|0}function Ki(){return(a[(a[59]|0)+8>>2]|0)-(a[3]|0)>>1|0}function Qi(){return(a[(a[60]|0)+4>>2]|0)-(a[3]|0)>>1|0}function ir(i){return i=i|0,i<<16>>16==13|i<<16>>16==10|0}function Xi(){return(a[a[59]>>2]|0)-(a[3]|0)>>1|0}function Zi(){return(a[a[60]>>2]|0)-(a[3]|0)>>1|0}function es(){return re[(a[59]|0)+24>>0]|0|0}function ts(i){i=i|0,a[3]=i}function ns(){return(O[795]|0)!=0|0}function rs(){return a[66]|0}function is(i){return i=i|0,J=i+992+15&-16,992}return{su:is,ai:Gi,e:rs,ee:Qi,ele:Di,els:qi,es:Zi,f:ns,id:Wi,ie:Yi,ip:es,is:Xi,p:ie,re:Ji,ri:zi,sa:Hi,se:Vi,ses:ts,ss:Ki}}(typeof self<"u"?self:as,{},vt),jt=D.su(Ge-(2<<17))}const A=W.length+1;D.ses(jt),D.sa(A-1),Ln(W,new Uint16Array(vt,jt,A)),D.p()||(j=D.e(),ge());const k=[],$=[];for(;D.ri();){const E=D.is(),I=D.ie(),M=D.ai(),O=D.id(),w=D.ss(),a=D.se();let re;D.ip()&&(re=Nt(O===-1?E:E+1,W.charCodeAt(O===-1?E-1:E))),k.push({n:re,s:E,e:I,ss:w,se:a,d:O,a:M})}for(;D.re();){const E=D.es(),I=D.ee(),M=D.els(),O=D.ele(),w=W.charCodeAt(E),a=M>=0?W.charCodeAt(M):-1;$.push({s:E,e:I,ls:M,le:O,n:w===34||w===39?Nt(E+1,w):W.slice(E,I),ln:M<0?void 0:a===34||a===39?Nt(M+1,a):W.slice(M,O)})}return[k,$,!!D.f()]}function Nt(u,p){j=u;let b="",A=j;for(;;){j>=W.length&&ge();const k=W.charCodeAt(j);if(k===p)break;k===92?(b+=W.slice(A,j),b+=Oi(),A=j):(k===8232||k===8233||Pn(k)&&ge(),++j)}return b+=W.slice(A,j++),b}function Oi(){let u=W.charCodeAt(++j);switch(++j,u){case 110:return`
|
2
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(Ft(2));case 117:return function(){const p=W.charCodeAt(j);let b;return p===123?(++j,b=Ft(W.indexOf("}",j)-j),++j,b>1114111&&ge()):b=Ft(4),b<=65535?String.fromCharCode(b):(b-=65536,String.fromCharCode(55296+(b>>10),56320+(1023&b)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:W.charCodeAt(j)===10&&++j;case 10:return"";case 56:case 57:ge();default:if(u>=48&&u<=55){let p=W.substr(j-1,3).match(/^[0-7]+/)[0],b=parseInt(p,8);return b>255&&(p=p.slice(0,-1),b=parseInt(p,8)),j+=p.length-1,u=W.charCodeAt(j),p==="0"&&u!==56&&u!==57||ge(),String.fromCharCode(b)}return Pn(u)?"":String.fromCharCode(u)}}function Ft(u){const p=j;let b=0,A=0;for(let k=0;k<u;++k,++j){let $,E=W.charCodeAt(j);if(E!==95){if(E>=97)$=E-97+10;else if(E>=65)$=E-65+10;else{if(!(E>=48&&E<=57))break;$=E-48}if($>=16)break;A=E,b=16*b+$}else A!==95&&k!==0||ge(),A=E}return A!==95&&j-p===u||ge(),b}function Pn(u){return u===13||u===10}function ge(){throw Object.assign(Error(`Parse error ${Tn}:${W.slice(0,j).split(`
|
3
|
+
`).length}:${j-W.lastIndexOf(`
|
4
|
+
`,j-1)}`),{idx:j})}async function Mn(u,p){const b=Ee(u,p);return{r:Mt(xe,b||u,p)||jn(u,p),b:!b&&!Tt(u)}}const Rn=f?async(u,p)=>{let b=f(u,p,Ht);return b&&b.then&&(b=await b),b?{r:b,b:!Ee(u,p)&&!Tt(u)}:Mn(u,p)}:Mn;async function Ye(u,...p){let b=p[p.length-1];return typeof b!="string"&&(b=ue),await Je,c&&await c(u,typeof p[1]!="string"?p[1]:{},b),(Ke||o||!Ne)&&(e&&Bt(!0),o||(Ke=!1)),await bt,Un((await Rn(u,b)).r,{credentials:"same-origin"})}self.importShim=Ye;function Ht(u,p){return Mt(xe,Ee(u,p)||u,p)||jn(u,p)}function jn(u,p){throw Error(`Unable to resolve specifier '${u}'${Ve(p)}`)}const Nn=(u,p=ue)=>{p=`${p}`;const b=f&&f(u,p,Ht);return b&&!b.then?b:Ht(u,p)};function Ii(u,p=this.url){return Nn(u,p)}Ye.resolve=Nn,Ye.getImportMap=()=>JSON.parse(JSON.stringify(xe)),Ye.addImportMap=u=>{if(!o)throw new Error("Unsupported in polyfill mode.");xe=En(u,ue,xe)};const ze=Ye._r={};async function Fn(u,p){u.b||p[u.u]||(p[u.u]=1,await u.L,await Promise.all(u.d.map(b=>Fn(b,p))),u.n||(u.n=u.d.some(b=>b.n)))}let xe={imports:{},scopes:{}},Ne;const Je=Si.then(()=>{if(Ne=s.polyfillEnable!==!0&&qe&&mt&&je&&(!G||dt)&&(!H||pt)&&!ht,e){if(!je){const u=HTMLScriptElement.supports||(p=>p==="classic"||p==="module");HTMLScriptElement.supports=p=>p==="importmap"||u(p)}if(o||!Ne)if(new MutationObserver(u=>{for(const p of u)if(p.type==="childList")for(const b of p.addedNodes)b.tagName==="SCRIPT"?(b.type===(o?"module-shim":"module")&&Zn(b,!0),b.type===(o?"importmap-shim":"importmap")&&Xn(b,!0)):b.tagName==="LINK"&&b.rel===(o?"modulepreload-shim":"modulepreload")&&er(b)}).observe(document,{childList:!0,subtree:!0}),Bt(),document.readyState==="complete")qt();else{async function u(){await Je,Bt(),document.readyState==="complete"&&(qt(),document.removeEventListener("readystatechange",u))}document.addEventListener("readystatechange",u)}}});let bt=Je,Hn=!0,Ke=!0;async function Un(u,p,b,A,k){if(o||(Ke=!1),await Je,await bt,c&&await c(u,typeof p!="string"?p:{},""),!o&&Ne)return A?null:(await k,me(b?te(b):u,{errUrl:u||b}));const $=Yn(u,p,null,b),E={};if(await Fn($,E),yt=void 0,Bn($,E),await k,b&&!o&&!$.n)return A?void 0:(P&&Wn(Object.keys(E)),await me(te(b),{errUrl:b}));Hn&&!o&&$.n&&A&&(x(),Hn=!1);const I=await me(!o&&!$.n&&A?$.u:$.b,{errUrl:$.u});return $.s&&(await me($.s)).u$_(I),P&&Wn(Object.keys(E)),I}function Wn(u){let p=0;const b=u.length,A=self.requestIdleCallback?self.requestIdleCallback:self.requestAnimationFrame;A(k);function k(){const $=p*100;if(!($>b)){for(const E of u.slice($,$+100)){const I=ze[E];I&&URL.revokeObjectURL(I.b)}p++,A(k)}}}function Ut(u){return`'${u.replace(/'/g,"\\'")}'`}let yt;function Bn(u,p){if(u.b||!p[u.u])return;p[u.u]=0;for(const Y of u.d)Bn(Y,p);const[b,A]=u.a,k=u.S;let $=ft&&yt?`import '${yt}';`:"",E=0,I=0,M=[];function O(Y){for(;M[M.length-1]<Y;){const J=M.pop();$+=`${k.slice(E,J)}, ${Ut(u.r)}`,E=J}$+=k.slice(E,Y),E=Y}for(const{s:Y,ss:J,se:ie,d:we}of b)if(we===-1){let B=u.d[I++],ke=B.b,gt=!ke;gt&&((ke=B.s)||(ke=B.s=te(`export function u$_(m){${B.a[1].map(({s:ve,e:T},Q)=>{const Xe=B.S[ve]==='"'||B.S[ve]==="'";return`e$_${Q}=m${Xe?"[":"."}${B.S.slice(ve,T)}${Xe?"]":""}`}).join(",")}}${B.a[1].length?`let ${B.a[1].map((ve,T)=>`e$_${T}`).join(",")};`:""}export {${B.a[1].map(({s:ve,e:T},Q)=>`e$_${Q} as ${B.S.slice(ve,T)}`).join(",")}}
|
5
|
+
//# sourceURL=${B.r}?cycle`))),O(Y-1),$+=`/*${k.slice(Y-1,ie)}*/${Ut(ke)}`,!gt&&B.s&&($+=`;import*as m$_${I} from'${B.b}';import{u$_ as u$_${I}}from'${B.s}';u$_${I}(m$_${I})`,B.s=void 0),E=ie}else we===-2?(u.m={url:u.r,resolve:Ii},d(u.m,u.u),O(Y),$+=`importShim._r[${Ut(u.u)}].m`,E=ie):(O(J+6),$+="Shim(",M.push(ie-1),E=Y);u.s&&($+=`
|
6
|
+
;import{u$_}from'${u.s}';try{u$_({${A.filter(Y=>Y.ln).map(({s:Y,e:J,ln:ie})=>`${k.slice(Y,J)}:${ie}`).join(",")}})}catch(_){};
|
7
|
+
`);function w(Y,J){const ie=J+Y.length,we=k.indexOf(`
|
8
|
+
`,ie),B=we!==-1?we:k.length;O(ie),$+=new URL(k.slice(ie,B),u.r).href,E=B}let a=k.lastIndexOf(_t),re=k.lastIndexOf(Dn);a<E&&(a=-1),re<E&&(re=-1),a!==-1&&(re===-1||re>a)&&w(_t,a),re!==-1&&(w(Dn,re),a!==-1&&a>re&&w(_t,a)),O(k.length),a===-1&&($+=_t+u.r),u.b=yt=te($),u.S=void 0}const _t=`
|
9
|
+
//# sourceURL=`,Dn=`
|
10
|
+
//# sourceMappingURL=`,Ci=/^(text|application)\/(x-)?javascript(;|$)/,Li=/^(text|application)\/json(;|$)/,Ti=/^(text|application)\/css(;|$)/,Pi=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;let Wt=[],Vn=0;function Mi(){if(++Vn>100)return new Promise(u=>Wt.push(u))}function Ri(){Vn--,Wt.length&&Wt.shift()()}async function qn(u,p,b){if(q&&!p.integrity)throw Error(`No integrity for ${u}${Ve(b)}.`);const A=Mi();A&&await A;try{var k=await h(u,p)}catch($){throw $.message=`Unable to fetch ${u}${Ve(b)} - see network log for details.
|
11
|
+
`+$.message,$}finally{Ri()}if(!k.ok)throw Error(`${k.status} ${k.statusText} ${k.url}${Ve(b)}`);return k}async function Gn(u,p,b){const A=await qn(u,p,b),k=A.headers.get("content-type");if(Ci.test(k))return{r:A.url,s:await A.text(),t:"js"};if(Li.test(k))return{r:A.url,s:`export default ${await A.text()}`,t:"json"};if(Ti.test(k))return{r:A.url,s:`var s=new CSSStyleSheet();s.replaceSync(${JSON.stringify((await A.text()).replace(Pi,($,E="",I,M)=>`url(${E}${Sn(I||M,u)}${E})`))});export default s;`,t:"css"};throw Error(`Unsupported Content-Type "${k}" loading ${u}${Ve(b)}. Modules must be served with a valid MIME type like application/javascript.`)}function Yn(u,p,b,A){let k=ze[u];if(k&&!A)return k;if(k={u,r:A?u:void 0,f:void 0,S:void 0,L:void 0,a:void 0,d:void 0,b:void 0,s:void 0,n:!1,t:null,m:null},ze[u]){let $=0;for(;ze[k.u+ ++$];);k.u+=$}return ze[k.u]=k,k.f=(async()=>{if(!A){let $;if({r:k.r,s:A,t:$}=await(Gt[u]||Gn(u,p,b)),$&&!o){if($==="css"&&!H||$==="json"&&!G)throw Error(`${$}-modules require <script type="esms-options">{ "polyfillEnable": ["${$}-modules"] }<\/script>`);($==="css"&&!pt||$==="json"&&!dt)&&(k.n=!0)}}try{k.a=xi(A,k.u)}catch($){Lt($),k.a=[[],[],!1]}return k.S=A,k})(),k.L=k.f.then(async()=>{let $=p;k.d=(await Promise.all(k.a[0].map(async({n:E,d:I})=>{if((I>=0&&!qe||I===-2&&!mt)&&(k.n=!0),I!==-1||!E)return;const{r:M,b:O}=await Rn(E,k.r||k.u);if(O&&(!je||ht)&&(k.n=!0),I===-1)return _e&&_e(M)?{b:M}:($.integrity&&($=Object.assign({},$,{integrity:void 0})),Yn(M,$,k.r).f)}))).filter(E=>E)}),k}function Bt(u=!1){if(!u)for(const p of document.querySelectorAll(o?"link[rel=modulepreload-shim]":"link[rel=modulepreload]"))er(p);for(const p of document.querySelectorAll(o?"script[type=importmap-shim]":"script[type=importmap]"))Xn(p);if(!u)for(const p of document.querySelectorAll(o?"script[type=module-shim]":"script[type=module]"))Zn(p)}function Dt(u){const p={};return u.integrity&&(p.integrity=u.integrity),u.referrerPolicy&&(p.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?p.credentials="include":u.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}let zn=Promise.resolve(),Vt=1;function Jn(){--Vt===0&&!C&&(o||!Ne)&&document.dispatchEvent(new Event("DOMContentLoaded"))}e&&document.addEventListener("DOMContentLoaded",async()=>{await Je,Jn()});let Qe=1;function qt(){--Qe===0&&!C&&(o||!Ne)&&document.dispatchEvent(new Event("readystatechange"))}const Kn=u=>u.nextSibling||u.parentNode&&Kn(u.parentNode),Qn=(u,p)=>u.ep||!p&&(!u.src&&!u.innerHTML||!Kn(u))||u.getAttribute("noshim")!==null||!(u.ep=!0);function Xn(u,p=Qe>0){if(!Qn(u,p)){if(u.src){if(!o)return;wi()}Ke&&(bt=bt.then(async()=>{xe=En(u.src?await(await qn(u.src,Dt(u))).json():JSON.parse(u.innerHTML),u.src||ue,xe)}).catch(b=>{console.log(b),b instanceof SyntaxError&&(b=new Error(`Unable to parse import map ${b.message} in: ${u.src||u.innerHTML}`)),Lt(b)}),o||(Ke=!1))}}function Zn(u,p=Qe>0){if(Qn(u,p))return;const b=u.getAttribute("async")===null&&Qe>0,A=Vt>0;b&&Qe++,A&&Vt++;const k=Un(u.src||ue,Dt(u),!u.src&&u.innerHTML,!o,b&&zn).then(()=>{o&&u.dispatchEvent(new Event("load"))}).catch(Lt);b&&(zn=k.then(qt)),A&&k.then(Jn)}const Gt={};function er(u){u.ep||(u.ep=!0,!Gt[u.href]&&(Gt[u.href]=Gn(u.href,Dt(u))))}})();var ln=function(t,e){return ln=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},ln(t,e)};function de(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ln(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function cs(t,e,n,r){function s(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function f(_){try{d(r.next(_))}catch(g){c(g)}}function h(_){try{d(r.throw(_))}catch(g){c(g)}}function d(_){_.done?o(_.value):s(_.value).then(f,h)}d((r=r.apply(t,e||[])).next())})}function Lr(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(d){return function(_){return h([d,_])}}function h(d){if(r)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(n=0)),n;)try{if(r=1,s&&(o=d[0]&2?s.return:d[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,d[1])).done)return o;switch(s=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,s=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(_){d=[6,_],s=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Pe(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ae(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),s,o=[],c;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(f){c={error:f}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return o}function fe(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function He(t){return this instanceof He?(this.v=t,this):new He(t)}function us(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),s,o=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(S){r[S]&&(s[S]=function(x){return new Promise(function(P,C){o.push([S,x,P,C])>1||f(S,x)})})}function f(S,x){try{h(r[S](x))}catch(P){g(o[0][3],P)}}function h(S){S.value instanceof He?Promise.resolve(S.value.v).then(d,_):g(o[0][2],S)}function d(S){f("next",S)}function _(S){f("throw",S)}function g(S,x){S(x),o.shift(),o.length&&f(o[0][0],o[0][1])}}function ls(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Pe=="function"?Pe(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(c){return new Promise(function(f,h){c=t[o](c),s(f,h,c.done,c.value)})}}function s(o,c,f,h){Promise.resolve(h).then(function(d){o({value:d,done:f})},c)}}function N(t){return typeof t=="function"}function bn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var tn=bn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
12
|
+
`+n.map(function(r,s){return s+1+") "+r.toString()}).join(`
|
13
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function it(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var ce=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=Pe(c),h=f.next();!h.done;h=f.next()){var d=h.value;d.remove(this)}}catch(C){e={error:C}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}else c.remove(this);var _=this.initialTeardown;if(N(_))try{_()}catch(C){o=C instanceof tn?C.errors:[C]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var S=Pe(g),x=S.next();!x.done;x=S.next()){var P=x.value;try{sr(P)}catch(C){o=o??[],C instanceof tn?o=fe(fe([],ae(o)),ae(C.errors)):o.push(C)}}}catch(C){r={error:C}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}}if(o)throw new tn(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)sr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&it(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&it(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Tr=ce.EMPTY;function Pr(t){return t instanceof ce||t&&"closed"in t&&N(t.remove)&&N(t.add)&&N(t.unsubscribe)}function sr(t){N(t)?t():t.unsubscribe()}var Mr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},fn={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=fn.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,fe([t,e],ae(n))):setTimeout.apply(void 0,fe([t,e],ae(n)))},clearTimeout:function(t){var e=fn.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Rr(t){fn.setTimeout(function(){throw t})}function or(){}function St(t){t()}var yn=function(t){de(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Pr(n)&&n.add(r)):r.destination=ps,r}return e.create=function(n,r,s){return new Et(n,r,s)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(ce),fs=Function.prototype.bind;function nn(t,e){return fs.call(t,e)}var hs=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){$t(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){$t(r)}else $t(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){$t(n)}},t}(),Et=function(t){de(e,t);function e(n,r,s){var o=t.call(this)||this,c;if(N(n)||!n)c={next:n??void 0,error:r??void 0,complete:s??void 0};else{var f;o&&Mr.useDeprecatedNextContext?(f=Object.create(n),f.unsubscribe=function(){return o.unsubscribe()},c={next:n.next&&nn(n.next,f),error:n.error&&nn(n.error,f),complete:n.complete&&nn(n.complete,f)}):c=n}return o.destination=new hs(c),o}return e}(yn);function $t(t){Rr(t)}function ds(t){throw t}var ps={closed:!0,next:or,error:ds,complete:or},_n=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function gn(t){return t}function ms(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return jr(t)}function jr(t){return t.length===0?gn:t.length===1?t[0]:function(n){return t.reduce(function(r,s){return s(r)},n)}}var ee=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var s=this,o=bs(e)?e:new Et(e,n,r);return St(function(){var c=s,f=c.operator,h=c.source;o.add(f?f.call(o,h):h?s._subscribe(o):s._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=ar(n),new n(function(s,o){var c=new Et({next:function(f){try{e(f)}catch(h){o(h),c.unsubscribe()}},error:o,complete:s});r.subscribe(c)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[_n]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return jr(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ar(e),new e(function(r,s){var o;n.subscribe(function(c){return o=c},function(c){return s(c)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function ar(t){var e;return(e=t??Mr.Promise)!==null&&e!==void 0?e:Promise}function vs(t){return t&&N(t.next)&&N(t.error)&&N(t.complete)}function bs(t){return t&&t instanceof yn||vs(t)&&Pr(t)}function ys(t){return N(t==null?void 0:t.lift)}function pe(t){return function(e){if(ys(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function he(t,e,n,r,s){return new _s(t,e,n,r,s)}var _s=function(t){de(e,t);function e(n,r,s,o,c,f){var h=t.call(this,n)||this;return h.onFinalize=c,h.shouldUnsubscribe=f,h._next=r?function(d){try{r(d)}catch(_){n.error(_)}}:t.prototype._next,h._error=o?function(d){try{o(d)}catch(_){n.error(_)}finally{this.unsubscribe()}}:t.prototype._error,h._complete=s?function(){try{s()}catch(d){n.error(d)}finally{this.unsubscribe()}}:t.prototype._complete,h}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(yn),gs=bn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),It=function(t){de(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new cr(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new gs},e.prototype.next=function(n){var r=this;St(function(){var s,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var c=Pe(r.currentObservers),f=c.next();!f.done;f=c.next()){var h=f.value;h.next(n)}}catch(d){s={error:d}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}}})},e.prototype.error=function(n){var r=this;St(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var s=r.observers;s.length;)s.shift().error(n)}})},e.prototype.complete=function(){var n=this;St(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,s=this,o=s.hasError,c=s.isStopped,f=s.observers;return o||c?Tr:(this.currentObservers=null,f.push(n),new ce(function(){r.currentObservers=null,it(f,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,s=r.hasError,o=r.thrownError,c=r.isStopped;s?n.error(o):c&&n.complete()},e.prototype.asObservable=function(){var n=new ee;return n.source=this,n},e.create=function(n,r){return new cr(n,r)},e}(ee),cr=function(t){de(e,t);function e(n,r){var s=t.call(this)||this;return s.destination=n,s.source=r,s}return e.prototype.next=function(n){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,n)},e.prototype.error=function(n){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&s!==void 0?s:Tr},e}(It),ur=function(t){de(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,s=n.thrownError,o=n._value;if(r)throw s;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(It),wn={now:function(){return(wn.delegate||Date).now()},delegate:void 0},ye=function(t){de(e,t);function e(n,r,s){n===void 0&&(n=1/0),r===void 0&&(r=1/0),s===void 0&&(s=wn);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=s,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,s=r.isStopped,o=r._buffer,c=r._infiniteTimeWindow,f=r._timestampProvider,h=r._windowTime;s||(o.push(n),!c&&o.push(f.now()+h)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),s=this,o=s._infiniteTimeWindow,c=s._buffer,f=c.slice(),h=0;h<f.length&&!n.closed;h+=o?1:2)n.next(f[h]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,s=n._timestampProvider,o=n._buffer,c=n._infiniteTimeWindow,f=(c?1:2)*r;if(r<1/0&&f<o.length&&o.splice(0,o.length-f),!c){for(var h=s.now(),d=0,_=1;_<o.length&&o[_]<=h;_+=2)d=_;d&&o.splice(0,d+1)}},e}(It),ws=function(t){de(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(ce),xt={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=xt.delegate;return s!=null&&s.setInterval?s.setInterval.apply(s,fe([t,e],ae(n))):setInterval.apply(void 0,fe([t,e],ae(n)))},clearInterval:function(t){var e=xt.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},ks=function(t){de(e,t);function e(n,r){var s=t.call(this,n,r)||this;return s.scheduler=n,s.work=r,s.pending=!1,s}return e.prototype.schedule=function(n,r){var s;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,c=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(c,o,r)),this.pending=!0,this.delay=r,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(c,this.id,r),this},e.prototype.requestAsyncId=function(n,r,s){return s===void 0&&(s=0),xt.setInterval(n.flush.bind(n,this),s)},e.prototype.recycleAsyncId=function(n,r,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return r;r!=null&&xt.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(n,r);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var s=!1,o;try{this.work(n)}catch(c){s=!0,o=c||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,s=n.scheduler,o=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,it(o,this),r!=null&&(this.id=this.recycleAsyncId(s,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(ws),lr=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=wn.now,t}(),$s=function(t){de(e,t);function e(n,r){r===void 0&&(r=lr.now);var s=t.call(this,n,r)||this;return s.actions=[],s._active=!1,s}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var s;this._active=!0;do if(s=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,s){for(;n=r.shift();)n.unsubscribe();throw s}},e}(lr),kn=new $s(ks),As=kn,Ss=new ee(function(t){return t.complete()});function Nr(t){return t&&N(t.schedule)}function Fr(t){return t[t.length-1]}function Es(t){return N(Fr(t))?t.pop():void 0}function Hr(t){return Nr(Fr(t))?t.pop():void 0}var $n=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Ur(t){return N(t==null?void 0:t.then)}function Wr(t){return N(t[_n])}function Br(t){return Symbol.asyncIterator&&N(t==null?void 0:t[Symbol.asyncIterator])}function Dr(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function xs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Vr=xs();function qr(t){return N(t==null?void 0:t[Vr])}function Gr(t){return us(this,arguments,function(){var n,r,s,o;return Lr(this,function(c){switch(c.label){case 0:n=t.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,He(n.read())];case 3:return r=c.sent(),s=r.value,o=r.done,o?[4,He(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,He(s)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Yr(t){return N(t==null?void 0:t.getReader)}function De(t){if(t instanceof ee)return t;if(t!=null){if(Wr(t))return Os(t);if($n(t))return Is(t);if(Ur(t))return Cs(t);if(Br(t))return zr(t);if(qr(t))return Ls(t);if(Yr(t))return Ts(t)}throw Dr(t)}function Os(t){return new ee(function(e){var n=t[_n]();if(N(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Is(t){return new ee(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Cs(t){return new ee(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Rr)})}function Ls(t){return new ee(function(e){var n,r;try{for(var s=Pe(t),o=s.next();!o.done;o=s.next()){var c=o.value;if(e.next(c),e.closed)return}}catch(f){n={error:f}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()})}function zr(t){return new ee(function(e){Ps(t,e).catch(function(n){return e.error(n)})})}function Ts(t){return zr(Gr(t))}function Ps(t,e){var n,r,s,o;return cs(this,void 0,void 0,function(){var c,f;return Lr(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),n=ls(t),h.label=1;case 1:return[4,n.next()];case 2:if(r=h.sent(),!!r.done)return[3,4];if(c=r.value,e.next(c),e.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=h.sent(),s={error:f},[3,11];case 6:return h.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function oe(t,e,n,r,s){r===void 0&&(r=0),s===void 0&&(s=!1);var o=e.schedule(function(){n(),s?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!s)return o}function Jr(t,e){return e===void 0&&(e=0),pe(function(n,r){n.subscribe(he(r,function(s){return oe(r,t,function(){return r.next(s)},e)},function(){return oe(r,t,function(){return r.complete()},e)},function(s){return oe(r,t,function(){return r.error(s)},e)}))})}function Kr(t,e){return e===void 0&&(e=0),pe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Ms(t,e){return De(t).pipe(Kr(e),Jr(e))}function Rs(t,e){return De(t).pipe(Kr(e),Jr(e))}function js(t,e){return new ee(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Ns(t,e){return new ee(function(n){var r;return oe(n,e,function(){r=t[Vr](),oe(n,e,function(){var s,o,c;try{s=r.next(),o=s.value,c=s.done}catch(f){n.error(f);return}c?n.complete():n.next(o)},0,!0)}),function(){return N(r==null?void 0:r.return)&&r.return()}})}function Qr(t,e){if(!t)throw new Error("Iterable cannot be null");return new ee(function(n){oe(n,e,function(){var r=t[Symbol.asyncIterator]();oe(n,e,function(){r.next().then(function(s){s.done?n.complete():n.next(s.value)})},0,!0)})})}function Fs(t,e){return Qr(Gr(t),e)}function Hs(t,e){if(t!=null){if(Wr(t))return Ms(t,e);if($n(t))return js(t,e);if(Ur(t))return Rs(t,e);if(Br(t))return Qr(t,e);if(qr(t))return Ns(t,e);if(Yr(t))return Fs(t,e)}throw Dr(t)}function ut(t,e){return e?Hs(t,e):De(t)}function Us(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Hr(t);return ut(t,n)}var Xr=bn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function At(t,e){var n=typeof e=="object";return new Promise(function(r,s){var o=!1,c;t.subscribe({next:function(f){c=f,o=!0},error:s,complete:function(){o?r(c):n?r(e.defaultValue):s(new Xr)}})})}function Ws(t,e){var n=typeof e=="object";return new Promise(function(r,s){var o=new Et({next:function(c){r(c),o.unsubscribe()},error:s,complete:function(){n?r(e.defaultValue):s(new Xr)}});t.subscribe(o)})}function Bs(t){return t instanceof Date&&!isNaN(t)}function le(t,e){return pe(function(n,r){var s=0;n.subscribe(he(r,function(o){r.next(t.call(e,o,s++))}))})}var Ds=Array.isArray;function Vs(t,e){return Ds(e)?t.apply(void 0,fe([],ae(e))):t(e)}function Zr(t){return le(function(e){return Vs(t,e)})}function qs(t,e,n){return n===void 0&&(n=gn),function(r){fr(e,function(){for(var s=t.length,o=new Array(s),c=s,f=s,h=function(_){fr(e,function(){var g=ut(t[_],e),S=!1;g.subscribe(he(r,function(x){o[_]=x,S||(S=!0,f--),f||r.next(n(o.slice()))},function(){--c||r.complete()}))},r)},d=0;d<s;d++)h(d)},r)}}function fr(t,e,n){t?oe(n,t,e):e()}function Gs(t,e,n,r,s,o,c,f){var h=[],d=0,_=0,g=!1,S=function(){g&&!h.length&&!d&&e.complete()},x=function(C){return d<r?P(C):h.push(C)},P=function(C){o&&e.next(C),d++;var q=!1;De(n(C,_++)).subscribe(he(e,function(F){s==null||s(F),o?x(F):e.next(F)},function(){q=!0},void 0,function(){if(q)try{d--;for(var F=function(){var R=h.shift();c?oe(e,c,function(){return P(R)}):P(R)};h.length&&d<r;)F();S()}catch(R){e.error(R)}}))};return t.subscribe(he(e,x,function(){g=!0,S()})),function(){f==null||f()}}function Me(t,e,n){return n===void 0&&(n=1/0),N(e)?Me(function(r,s){return le(function(o,c){return e(r,o,s,c)})(De(t(r,s)))},n):(typeof e=="number"&&(n=e),pe(function(r,s){return Gs(r,s,t,n)}))}var Ys=["addListener","removeListener"],zs=["addEventListener","removeEventListener"],Js=["on","off"];function hn(t,e,n,r){if(N(n)&&(r=n,n=void 0),r)return hn(t,e,n).pipe(Zr(r));var s=ae(Xs(t)?zs.map(function(f){return function(h){return t[f](e,h,n)}}):Ks(t)?Ys.map(hr(t,e)):Qs(t)?Js.map(hr(t,e)):[],2),o=s[0],c=s[1];if(!o&&$n(t))return Me(function(f){return hn(f,e,n)})(De(t));if(!o)throw new TypeError("Invalid event target");return new ee(function(f){var h=function(){for(var d=[],_=0;_<arguments.length;_++)d[_]=arguments[_];return f.next(1<d.length?d:d[0])};return o(h),function(){return c(h)}})}function hr(t,e){return function(n){return function(r){return t[n](e,r)}}}function Ks(t){return N(t.addListener)&&N(t.removeListener)}function Qs(t){return N(t.on)&&N(t.off)}function Xs(t){return N(t.addEventListener)&&N(t.removeEventListener)}function dn(t,e,n){t===void 0&&(t=0),n===void 0&&(n=As);var r=-1;return e!=null&&(Nr(e)?n=e:r=e),new ee(function(s){var o=Bs(t)?+t-n.now():t;o<0&&(o=0);var c=0;return n.schedule(function(){s.closed||(s.next(c++),0<=r?this.schedule(void 0,r):s.complete())},o)})}function Zs(t,e){return t===void 0&&(t=0),e===void 0&&(e=kn),t<0&&(t=0),dn(t,t,e)}var eo=Array.isArray;function to(t){return t.length===1&&eo(t[0])?t[0]:t}function X(t,e){return pe(function(n,r){var s=0;n.subscribe(he(r,function(o){return t.call(e,o,s++)&&r.next(o)}))})}function no(t){for(var e,n,r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var o=(e=Hr(r))!==null&&e!==void 0?e:kn,c=(n=r[0])!==null&&n!==void 0?n:null,f=r[1]||1/0;return pe(function(h,d){var _=[],g=!1,S=function(C){var q=C.buffer,F=C.subs;F.unsubscribe(),it(_,C),d.next(q),g&&x()},x=function(){if(_){var C=new ce;d.add(C);var q=[],F={buffer:q,subs:C};_.push(F),oe(C,o,function(){return S(F)},t)}};c!==null&&c>=0?oe(d,o,x,c,!0):g=!0,x();var P=he(d,function(C){var q,F,R=_.slice();try{for(var H=Pe(R),G=H.next();!G.done;G=H.next()){var ft=G.value,ue=ft.buffer;ue.push(C),f<=ue.length&&S(ft)}}catch(te){q={error:te}}finally{try{G&&!G.done&&(F=H.return)&&F.call(H)}finally{if(q)throw q.error}}},function(){for(;_!=null&&_.length;)d.next(_.shift().buffer);P==null||P.unsubscribe(),d.complete(),d.unsubscribe()},void 0,function(){return _=null});h.subscribe(P)})}function ei(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Es(t);return n?ms(ei.apply(void 0,fe([],ae(t))),Zr(n)):pe(function(r,s){qs(fe([r],ae(to(t))))(s)})}function ro(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ei.apply(void 0,fe([],ae(t)))}function io(t,e){return N(e)?Me(t,e,1):Me(t,1)}function Le(t){return t<=0?function(){return Ss}:pe(function(e,n){var r=0;e.subscribe(he(n,function(s){++r<=t&&(n.next(s),t<=r&&n.complete())}))})}function so(){return pe(function(t,e){var n,r=!1;t.subscribe(he(e,function(s){var o=n;n=s,r&&e.next([o,s]),r=!0}))})}function oo(t,e,n){var r=N(t)||e||n?{next:t,error:e,complete:n}:t;return r?pe(function(s,o){var c;(c=r.subscribe)===null||c===void 0||c.call(r);var f=!0;s.subscribe(he(o,function(h){var d;(d=r.next)===null||d===void 0||d.call(r,h),o.next(h)},function(){var h;f=!1,(h=r.complete)===null||h===void 0||h.call(r),o.complete()},function(h){var d;f=!1,(d=r.error)===null||d===void 0||d.call(r,h),o.error(h)},function(){var h,d;f&&((h=r.unsubscribe)===null||h===void 0||h.call(r)),(d=r.finalize)===null||d===void 0||d.call(r)}))}):gn}const ao="en",co=(t,e=ao)=>typeof t=="string"?t:t==null?void 0:t[e];function uo(t){return Object.entries(t).reduce((e,[n,r])=>(e[n]=co(r),e),{})}const Ue=(...t)=>{},ti=t=>Array.isArray(t)?t:[t],ni=({document:{baseURI:t},location:{href:e}})=>n=>new URL(n,new URL(t,e)),ri=(t,e)=>{let n=e;return e instanceof URL||(n=t(typeof e=="string"?e:e.url)),n},lo=(t,e)=>{const{href:n,origin:r}=e;return t===r?n.substring(t.length):n},fo=(t,e,n=0)=>{const{selectors:r}=e;return t.querySelector(r[n])};function ho(t){return document.querySelector(t)}const po=(t,e)=>{const n=e.get(t);if(n){const{css:r,rest:s,subscription:o}=n;s.forEach(c=>{var f;return(f=c.__unfocus_handler)==null?void 0:f.call(c)}),o.unsubscribe(),n.elementToFocus.forEach((c,f)=>{Object.assign(c.style,r[f])})}e.delete(t)},mo=t=>t!==void 0;function vo(t,e,n){const r=new Map,s=ho.bind(t),o=e.pipe(so(),oo(([c])=>{var f;if(c!==void 0){const h=fo(t,c);h!==null&&((f=h.__unfocus_handler)==null||f.call(h),po(h,r))}}),le(([,c])=>c),X(mo),le(c=>{const[f,...h]=c.selectors,d=h.reduce((_,g)=>{var S;const x=s(g);if(x){_.push(x);const P=(S=x.__focus_handler)==null?void 0:S.call(x);P&&"then"in P&&P.catch(Ue)}return _},[]);return{first:f,next:c,otherElements:d}}),le(c=>({...c,firstElement:s(c.first)})),X(c=>c.firstElement!==null),le(c=>{var f,h;return{...c,focus:(h=(f=c.firstElement).__focus_handler)==null?void 0:h.call(f)}}),io(({focus:c,...f})=>(c&&"then"in c?c:Promise.resolve(c??f.firstElement)).then(d=>({focus:d,...f})).catch(()=>({focus:void 0,...f})))).subscribe(({otherElements:c,next:f,firstElement:h,focus:d})=>{const _=Object.keys(f.style),g=new ce,S=ti(d??h).filter(Boolean),x={css:[],elementToFocus:S,rest:c,subscription:g},P=_.reduce((C,q)=>(S.forEach((F,R)=>{var H;C.css[R]=Object.assign((H=C.css[R])!=null?H:{},{[q]:F.style[q]})}),C),x);g.add(n.pipe(X(C=>C==="select"),Le(1)).subscribe(()=>{S.forEach(C=>{Object.assign(C.style,f.style)})})),r.set(h,P)});return()=>o.unsubscribe()}var bo=Object.defineProperty,yo=(t,e,n)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ae=(t,e,n)=>(yo(t,typeof e!="symbol"?e+"":e,n),n);let _o=class{constructor(e){Ae(this,"_input"),Ae(this,"_length"),Ae(this,"_idx",0),Ae(this,"_mode",0),Ae(this,"_literals",[]),Ae(this,"_variables",[]),Ae(this,"_braketCount",0),Ae(this,"_done",!1),this._input=e,this._length=e.length}concatToLastLiteral(e){this._literals.push(this._literals.pop().concat(e))}concatToLastVariable(e){this._variables.push(this._variables.pop().concat(e))}get(){const e=[...this._literals],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._variables}}run(){for(this._length===0&&this._literals.push("");this._idx<this._length;){const e=this._input.charAt(this._idx);switch(this._mode){case 0:{this._literals.length===0&&this._literals.push(""),e==="{"&&this._idx+1!==this._length&&this._input.charAt(this._idx+1)==="{"?(this._literals.push(""),this._variables.push(""),this._mode=1,this._idx+=1):this.concatToLastLiteral(e);break}case 1:e==="}"&&this._input.charAt(this._idx+1)==="}"?(this._mode=0,this._idx+=1):this.concatToLastVariable(e);break}this._idx+=1}this._mode===1&&(this._literals.pop(),this.concatToLastLiteral(`{{${this._variables.pop()}`)),this._done=!0}};const go=t=>{const e=t.trim();if(!(e.startsWith("[")&&e.endsWith("]")))return!1;const n=e.slice(1).slice(0,-1).trim();return Number.parseInt(n).toString(10)===n},wo=t=>Number.parseInt(t.trim().slice(1).slice(0,-1).trim());function ko(t,e,n){if(!e.trim())return n?`{{${e}}}`:"";const r=e.trim().split(".").reduce((s,o)=>{if(Array.isArray(s)&&go(o))return s[wo(o)];if(typeof s=="object"&&s!==null&&o in s)return s[o]},{...t});return typeof r=="string"?r:n?`{{${e}}}`:""}function $o(t,e,n=!1){const r=new _o(t);r.run();const s=r.get();let[o]=s.literals;for(let c=0;c<s.variables.length;c++)o=o.concat(ko(e,s.variables[c],n)).concat(s.literals[c+1]);return o}const Ao=(t,e)=>Object.fromEntries(Object.entries(t).map(([n,r])=>[n,$o(r,e)]));var ii=(t=>(t[t.Default=0]="Default",t[t.Skip=1]="Skip",t))(ii||{});const pn="__mia_preview_id",So=1e6,Eo={"click-element":0,"ctrl-space":0,"focus-element":0,mousedown:0,mousemove:1,"new-configuration":0,notification:0,options:0,"request-resource":0,"set-source-map":0,"tag-info":0,update:0,updated:0};var rn;const Ot=window,We=Ot.trustedTypes,dr=We?We.createPolicy("lit-html",{createHTML:t=>t}):void 0,mn="$lit$",Se=`lit$${(Math.random()+"").slice(9)}$`,si="?"+Se,xo=`<${si}>`,Re=document,st=()=>Re.createComment(""),ot=t=>t===null||typeof t!="object"&&typeof t!="function",oi=Array.isArray,Oo=t=>oi(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",sn=`[
|
14
|
+
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pr=/-->/g,mr=/>/g,Ce=RegExp(`>|${sn}(?:([^\\s"'>=/]+)(${sn}*=${sn}*(?:[^
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),vr=/'/g,br=/"/g,ai=/^(?:script|style|textarea|title)$/i,Io=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Co=Io(1),at=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),yr=new WeakMap,Te=Re.createTreeWalker(Re,129,null,!1),Lo=(t,e)=>{const n=t.length-1,r=[];let s,o=e===2?"<svg>":"",c=rt;for(let h=0;h<n;h++){const d=t[h];let _,g,S=-1,x=0;for(;x<d.length&&(c.lastIndex=x,g=c.exec(d),g!==null);)x=c.lastIndex,c===rt?g[1]==="!--"?c=pr:g[1]!==void 0?c=mr:g[2]!==void 0?(ai.test(g[2])&&(s=RegExp("</"+g[2],"g")),c=Ce):g[3]!==void 0&&(c=Ce):c===Ce?g[0]===">"?(c=s??rt,S=-1):g[1]===void 0?S=-2:(S=c.lastIndex-g[2].length,_=g[1],c=g[3]===void 0?Ce:g[3]==='"'?br:vr):c===br||c===vr?c=Ce:c===pr||c===mr?c=rt:(c=Ce,s=void 0);const P=c===Ce&&t[h+1].startsWith("/>")?" ":"";o+=c===rt?d+xo:S>=0?(r.push(_),d.slice(0,S)+mn+d.slice(S)+Se+P):d+Se+(S===-2?(r.push(void 0),h):P)}const f=o+(t[n]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[dr!==void 0?dr.createHTML(f):f,r]};class ct{constructor({strings:e,_$litType$:n},r){let s;this.parts=[];let o=0,c=0;const f=e.length-1,h=this.parts,[d,_]=Lo(e,n);if(this.el=ct.createElement(d,r),Te.currentNode=this.el.content,n===2){const g=this.el.content,S=g.firstChild;S.remove(),g.append(...S.childNodes)}for(;(s=Te.nextNode())!==null&&h.length<f;){if(s.nodeType===1){if(s.hasAttributes()){const g=[];for(const S of s.getAttributeNames())if(S.endsWith(mn)||S.startsWith(Se)){const x=_[c++];if(g.push(S),x!==void 0){const P=s.getAttribute(x.toLowerCase()+mn).split(Se),C=/([.?@])?(.*)/.exec(x);h.push({type:1,index:o,name:C[2],strings:P,ctor:C[1]==="."?Po:C[1]==="?"?Ro:C[1]==="@"?jo:Ct})}else h.push({type:6,index:o})}for(const S of g)s.removeAttribute(S)}if(ai.test(s.tagName)){const g=s.textContent.split(Se),S=g.length-1;if(S>0){s.textContent=We?We.emptyScript:"";for(let x=0;x<S;x++)s.append(g[x],st()),Te.nextNode(),h.push({type:2,index:++o});s.append(g[S],st())}}}else if(s.nodeType===8)if(s.data===si)h.push({type:2,index:o});else{let g=-1;for(;(g=s.data.indexOf(Se,g+1))!==-1;)h.push({type:7,index:o}),g+=Se.length-1}o++}}static createElement(e,n){const r=Re.createElement("template");return r.innerHTML=e,r}}function Be(t,e,n=t,r){var s,o,c,f;if(e===at)return e;let h=r!==void 0?(s=n._$Co)===null||s===void 0?void 0:s[r]:n._$Cl;const d=ot(e)?void 0:e._$litDirective$;return(h==null?void 0:h.constructor)!==d&&((o=h==null?void 0:h._$AO)===null||o===void 0||o.call(h,!1),d===void 0?h=void 0:(h=new d(t),h._$AT(t,n,r)),r!==void 0?((c=(f=n)._$Co)!==null&&c!==void 0?c:f._$Co=[])[r]=h:n._$Cl=h),h!==void 0&&(e=Be(t,h._$AS(t,e.values),h,r)),e}class To{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:r},parts:s}=this._$AD,o=((n=e==null?void 0:e.creationScope)!==null&&n!==void 0?n:Re).importNode(r,!0);Te.currentNode=o;let c=Te.nextNode(),f=0,h=0,d=s[0];for(;d!==void 0;){if(f===d.index){let _;d.type===2?_=new lt(c,c.nextSibling,this,e):d.type===1?_=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&(_=new No(c,this,e)),this._$AV.push(_),d=s[++h]}f!==(d==null?void 0:d.index)&&(c=Te.nextNode(),f++)}return Te.currentNode=Re,o}v(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class lt{constructor(e,n,r,s){var o;this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Be(this,e,n),ot(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==at&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Oo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==K&&ot(this._$AH)?this._$AA.nextSibling.data=e:this.$(Re.createTextNode(e)),this._$AH=e}g(e){var n;const{values:r,_$litType$:s}=e,o=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ct.createElement(s.h,this.options)),s);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===o)this._$AH.v(r);else{const c=new To(o,this),f=c.u(this.options);c.v(r),this.$(f),this._$AH=c}}_$AC(e){let n=yr.get(e.strings);return n===void 0&&yr.set(e.strings,n=new ct(e)),n}T(e){oi(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,s=0;for(const o of e)s===n.length?n.push(r=new lt(this.k(st()),this.k(st()),this,this.options)):r=n[s],r._$AI(o),s++;s<n.length&&(this._$AR(r&&r._$AB.nextSibling,s),n.length=s)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,n);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class Ct{constructor(e,n,r,s,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,r,s){const o=this.strings;let c=!1;if(o===void 0)e=Be(this,e,n,0),c=!ot(e)||e!==this._$AH&&e!==at,c&&(this._$AH=e);else{const f=e;let h,d;for(e=o[0],h=0;h<o.length-1;h++)d=Be(this,f[r+h],n,h),d===at&&(d=this._$AH[h]),c||(c=!ot(d)||d!==this._$AH[h]),d===K?e=K:e!==K&&(e+=(d??"")+o[h+1]),this._$AH[h]=d}c&&!s&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Po extends Ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}}const Mo=We?We.emptyScript:"";class Ro extends Ct{constructor(){super(...arguments),this.type=4}j(e){e&&e!==K?this.element.setAttribute(this.name,Mo):this.element.removeAttribute(this.name)}}class jo extends Ct{constructor(e,n,r,s,o){super(e,n,r,s,o),this.type=5}_$AI(e,n=this){var r;if((e=(r=Be(this,e,n,0))!==null&&r!==void 0?r:K)===at)return;const s=this._$AH,o=e===K&&s!==K||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,c=e!==K&&(s===K||o);o&&this.element.removeEventListener(this.name,this,s),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,r;typeof this._$AH=="function"?this._$AH.call((r=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class No{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Be(this,e)}}const _r=Ot.litHtmlPolyfillSupport;_r==null||_r(ct,lt),((rn=Ot.litHtmlVersions)!==null&&rn!==void 0?rn:Ot.litHtmlVersions=[]).push("2.7.4");const Fo=(t,e,n)=>{var r,s;const o=(r=n==null?void 0:n.renderBefore)!==null&&r!==void 0?r:e;let c=o._$litPart$;if(c===void 0){const f=(s=n==null?void 0:n.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=c=new lt(e.insertBefore(st(),f),f,void 0,n??{})}return c._$AI(t),c};const Ho=t=>{const e=t.charAt(0);return!(e!==t.charAt(t.length-1)||e!=="'"&&e!=='"')};function Uo(t){const e=t.match(/([^.]+)/g);return n=>e.reduce((r,s)=>{let o=s;if(s.startsWith("[")&&s.endsWith("]")){const c=s.slice(1,-1),f=Number.parseInt(c);!Number.isNaN(f)&&f.toString()===c?o=f:(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'"))&&(o=c.slice(1,-1))}if(o==="")throw new TypeError("42",{cause:t});return typeof r=="object"&&r!==null?r[o]:void 0},n)}function Wo(t,e={}){return t.reduce((n,r,s)=>{const o=r.trim(),c=Number.parseInt(o),f=Number.parseFloat(o);if(o==="")n[s]=o;else if(Ho(o))n[s]=o.slice(1,-1);else if(["true","false"].includes(o))n[s]=o==="true";else if(!Number.isNaN(c)&&c.toString()===o)n[s]=c;else if(!Number.isNaN(f)&&f.toString()===o)n[s]=f;else if(o.startsWith("{")||o.startsWith("["))try{n[s]=JSON.parse(o)}catch(h){if(h instanceof SyntaxError)throw new TypeError("43",{cause:h.message})}else n[s]=Uo(o)(e);return n},[])}function ci(t){return Array.isArray(t)?t:[t]}function Bo(t){const e=typeof t=="string"?[t]:t;return Array.isArray(e)?e:ci(e.uris)}const Do=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Vo(t){return Do.includes(t.tag)}function qo(t){return Array.isArray(t)?t:[t]}function ui(t,e,n){if(typeof e!="object"){t.push(`${e}`);return}qo(e).forEach(r=>{if(typeof r!="object"){t.push(`${r}`);return}const{tag:s,attributes:o={},booleanAttributes:c=[],properties:f={}}=r,h=Vo(r),d=`<${s}`,_=h?"/>":">",g=`</${s}>`,S=Object.entries(o).reduce((R,[H,G])=>(R.push(`${H}="${G}"`),R),[]),x=ci(c),{override:P,props:C}=Object.entries(f).reduce((R,[H,G])=>(n.has(H)?typeof G=="string"&&(R.override[H]=G):R.props[H]=G,R),{override:{},props:{}}),q=Array.from(n.keys()).map(R=>{var H;return`.${R}=\${${(H=P[R])!=null?H:R}}`}),F=Object.entries(C).reduce((R,[H,G])=>{switch(typeof G){case"object":case"number":case"boolean":R.push(`.${H}=\${${JSON.stringify(G)}}`);break;case"string":R.push(`.${H}=\${"${G}"}`);break}return R},[]);if(t.push([d,S.join(" "),x.join(" "),q.join(" "),F.join(" "),_].join(" ")),!h){const{content:R}=r;R!==void 0&&ui(t,R,n),t.push(g)}})}function Go(t,e=new Set){const n=[];return ui(n,t,e),n.join(" ")}const Yo="modulepreload",zo=function(t,e){return new URL(t,e).href},gr={},Jo=function(e,n,r){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=zo(o,r),o in gr)return;gr[o]=!0;const c=o.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let _=s.length-1;_>=0;_--){const g=s[_];if(g.href===o&&(!c||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${f}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Yo,c||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),c)return new Promise((_,g)=>{d.addEventListener("load",_),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};function li(t,...e){Jo(()=>import("./errors-af3a2945.js"),[],import.meta.url).then(({default:n})=>{const r=n[t];r?console.error(r(...e)):console.error(...e)}).catch(n=>{console.error(`[micro-lc][composer]: Dynamic import error while importing logger utils - ${n.message}`)})}function Ko(t){return e=>{li("0",t,e.message)}}const Qo=Object.freeze(Object.defineProperty({__proto__:null,dynamicImportError:Ko,error:li},Symbol.toStringTag,{value:"Module"}));var wr=Qo;var Xo=Object.defineProperty,Zo=(t,e,n)=>e in t?Xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,be=(t,e,n)=>(Zo(t,typeof e!="symbol"?e+"":e,n),n);class ea{constructor(e){be(this,"_i",0),be(this,"_s"),be(this,"_l"),be(this,"_d",!1),be(this,"_m",0),be(this,"_st",[]),be(this,"_n",0),be(this,"_li",[]),be(this,"_v",[]),this._s=e,this._l=e.length,e.length===0&&(this._d=!0)}_sw(e){this._m=e}_fst(){this._st=[]}_fn(){this._v.push(this._st.join("")),this._fst()}_fs(){this._li.push(this._st.join("")),this._fst()}_fpn(){this._li.push(this._st.slice(0,-1).join("")),this._fst()}_nx(){const e=this._s.charAt(this._i);switch(this._m){case 1:{e==="{"?(this._n+=1,this._st.push(e)):e==="}"&&this._n===0?(this._fn(),this._sw(0)):e==="}"&&this._n>0?(this._st.push(e),this._n-=1):this._st.push(e);break}case 2:{e==="{"?(this._fpn(),this._sw(1)):(this._sw(0),this._st.push(e));break}case 0:default:{e==="$"&&this._sw(2),this._st.push(e);break}}if(this._i+=1,this._i===this._l){if(this._m===2)this._sw(0);else if(this._m===1)throw new TypeError("41",{cause:`${this._i}`});this._fs(),this._d=!0}}_c(){const e=[...this._li],n=Object.assign([],e);return Object.defineProperty(n,"raw",{value:e,writable:!1}),{literals:n,variables:this._v}}run(){for(;!this._d;)this._nx();return this._c()}}const ta=async(t,e="SHA-1")=>window.crypto.subtle.digest(e,new TextEncoder().encode(t)),on=new Map;async function na(t){const e=await ta(t).catch(n=>{wr.error("40",t,n.message)});if(!e||!on.has(e)){let n;try{n=new ea(t).run(),e&&on.set(e,n)}catch(r){r instanceof TypeError&&wr.error(r.message,t,r.cause);const s=[];Object.defineProperty(s,"raw",{value:s,writable:!1}),n={literals:s,variables:[]}}return n}return on.get(e)}class an extends ye{}function ra(){const t=[],e=new Proxy({},{get(n,r,s){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=new an),Reflect.get(n,r,s)}});return new Proxy(new an,{get(n,r,s){if(r==="pool")return e;const o=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(o)?Reflect.get(n,r,s):(t.at(o)===void 0&&(t[o]=new an),t[o])}})}async function ia(t,{extraProperties:e,context:n={}}={}){const r=Array.isArray(e)?new Set(e):e,s=Go(t,r),o=await na(s),c=Wo(o.variables,n),f=Co(o.literals,...c);return(h,d)=>Fo(f,h,d)}async function sa(t,e=window,n=console.error){var r;let s=[],o,c=Promise.resolve();if(t.sources){const{sources:f}=t;o=!Array.isArray(f)&&typeof f!="string"?(r=f.importmap)!=null?r:{}:{};try{e.importShim.addImportMap(o)}catch(h){n(h)}s=Bo(f),s.length>0&&(c=Promise.all(s.map(h=>e.importShim(h).catch(n))))}return c.then(()=>({...t,sources:{importmap:o,uris:s}}))}async function oa(t,e,n={}){return ia(t.content,{context:n,extraProperties:new Set(Object.keys(n))}).then(s=>(s(e),null))}const aa=t=>{var e;return{data:{message:t.message,name:t.name,stack:(e=t.stack)!=null?e:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},fi=(t,e)=>t.send({content:aa(e),type:"notification"}),hi=t=>"clientX"in t&&"clientY"in t;function kr(t,e){return n=>{hi(n)&&t.send({content:{bubbles:!0,cancelable:!1,clientX:n.clientX,clientY:n.clientY},type:e})}}const ca=(t,e)=>t.has(e.tagName)&&e.hasAttribute(pn),ua=(t,e,n)=>{const{document:r}=t;return s=>{let o;if(hi(s)){const{clientX:c,clientY:f}=s;o=r.elementsFromPoint(c,f).reduce((h,d)=>{if(ca(n.uppercaseTags,d)){const _=d.getAttribute(pn);h.ids.push(_),h.selectors.push(`[${pn}="${_}"]`)}return h},{ids:[],selectors:[]})}(n.mode.getValue()==="select"||o===void 0)&&e.send({content:o&&(o.ids.length>0?o:void 0),type:"click-element"})}};var la=(t,e)=>({postMessage:n=>{t.postMessage(n,(e==null?void 0:e.targetOrigin)??"*",e==null?void 0:e.transfer)}}),di=(t=>(t.Ack="ack",t.Syn="syn",t))(di||{}),fa=Object.values(di),cn=t=>t.data,un=t=>e=>e.type===t.toString(),ha=t=>{const e=t.data;return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"&&"instance"in e&&typeof e.instance=="string"&&"content"in e},da=()=>{let t="#";for(let e=0;e<3;e++)t+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return t},pa=class{constructor(t,e,n,r){se(this,"__generateId");se(this,"__instance");se(this,"__colors");se(this,"__listener");se(this,"__log");se(this,"__receiver");se(this,"__subscription");se(this,"__okToWrite");se(this,"__write$");se(this,"__recv$");this.__generateId=()=>globalThis.crypto.randomUUID();const s=this.__generateId(),o=new ye,c=hn(e,"message").pipe(X(ha)).subscribe(o);this.__subscription=new ce,this.__subscription.add(c),this.__okToWrite=new ye(1),this.__write$=this.__okToWrite.pipe(Le(1)),this.__recv$=o.asObservable(),this.__listener=t,this.__log=(r==null?void 0:r.log)&&r.log.bind(this),this.__instance=s;const f=da();this.__colors={bg:`${f}22`,fg:f},this.__receiver=n,this.__connect(s,r!=null&&r.period?r.period:10)}__connect(t,e){const n=Zs(e).subscribe(()=>this.__receiver.postMessage({content:t,instance:t,type:"syn".toString()}));this.__subscription.add(n),this.__subscription.add(this.__recv$.pipe(le(cn),X(un("ack")),X(({content:r})=>r===t),Le(1)).subscribe(({instance:r})=>{this.__okToWrite.next(0),this.__subscription.add(this.__recv$.pipe(X(({data:{type:s,instance:o}})=>!fa.includes(s)&&o===r)).subscribe(s=>{this.__listener(s);const{data:o}=s;o._id!==void 0&&this.__receiver.postMessage({...o,content:o,instance:t,type:"ack"})})),n.unsubscribe()})),this.__subscription.add(this.__recv$.pipe(le(cn),X(un("syn")),X(({instance:r})=>r!==t),Le(1)).subscribe(({content:r})=>{this.__receiver.postMessage({content:r,instance:t,type:"ack"})}))}__write(t,e){const n={};e!==void 0&&(n._id=e),this.__subscription.add(this.__write$.subscribe(()=>{var s;const r=Object.assign(t,{instance:this.__instance,...n});this.__receiver.postMessage(r),(s=this.__log)==null||s.call(this,r)}))}disconnect(){this.__subscription.unsubscribe()}send(t){this.__write(t)}ackSend(t){let e;const n=new Promise(s=>{e=s}),r=this.__generateId();return this.__subscription.add(this.__recv$.pipe(le(cn),X(un("ack")),X(({_id:s})=>s===r),Le(1)).subscribe(()=>e())),this.__write(t,r),n}get instance(){return this.__instance}get colors(){return this.__colors}get ready(){return Ws(this.__write$).then(()=>{})}},pi=pa;const ma=()=>({configuration:new ye,focus:new ur(void 0),infos:new ye,mocks:new ye,mode:new ur("select"),notification:new ye,setSourceMap:new ye(1),swSourceMapAck:new ye(1),updated:new It,uppercaseTags:new Set}),mi=t=>{let e=0;const n=t.getValue();return n==="interact"?e="select":n==="select"&&(e="interact"),t.next(e),e},va=t=>e=>{const{data:n}=e;switch(n.type){}},ba=async(t,e)=>{const{navigator:{serviceWorker:n}}=t;return Promise.all([n.register("./service-worker.js"),n.ready.then(r=>{if(!r.active)throw new TypeError("smth went wrong on sw activation");return new pi(va(),window.navigator.serviceWorker,r.active)})]).then(([,r])=>r)},ya=(t,e)=>n=>{const{data:r}=n;switch(r.type){case"options":{const{content:{disableOverlay:s,redirectTo:o,timeout:c,run:f}}=r;f&&e.swSourceMapAck.next(0),s&&(Object.defineProperty(t,"__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__",{value:!0}),e.mode.next("interact")),c!==void 0&&Object.defineProperty(t,"__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__",{value:c});const{history:h}=t;o&&h.pushState(h.state,"",o);break}case"ctrl-space":mi(e.mode);break;case"new-configuration":e.configuration.next({...r.content,type:"reset"});break;case"update":e.configuration.next({...r.content,type:"update"});break;case"focus-element":e.focus.next(r.content);break;case"set-source-map":{const{content:s}=r;e.setSourceMap.next(Object.entries(s).reduce((o,[c,f])=>{try{const{href:h}=new URL(c,t.location.href),d=typeof f=="string"?{headers:{},query:{},to:f}:f;o[h]={originalFrom:c,...d}}catch{}return o},{}));break}}},_a=(t,e)=>new pi(ya(t,e),t,la(t.parent),{log(n){if(t.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&console.assert(t.parent!==t),t.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&Eo[n.type]!==ii.Skip){const r={background:this.colors.bg,color:this.colors.fg};console.groupCollapsed(`%c Msg from ${t.origin} (inner) `,Object.entries(r).map(([s,o])=>`${s}: ${o}`).join("; ")),console.info(`window '${t.origin}' is sending a message of type %c ${n.type} `,"background: lightgreen; color: darkgreen"),console.log(n.content),console.groupEnd()}}}),ga=t=>e=>{e.ctrlKey&&e.key===" "&&(e.preventDefault(),mi(t.mode),t.focus.next(void 0))},wa=([t,e])=>ut(e.then(n=>[t,n])),ka=([t,e])=>{const n={label:t,properties:{},type:"layout"},{__manifest:r=Promise.resolve(n)}=e,s=r.then(o=>[e,{__manifest:{...n,...o},tag:t}]).catch(()=>[e,{__manifest:n,tag:t}]);return ut(s)},$a=(t,e)=>ut(e.map(n=>[n,t.whenDefined(n)])).pipe(Me(wa),Me(ka)),Aa=500,An=(t,e)=>{e instanceof Error&&fi(t,e)},Sa=(t,e,n)=>e.pipe(Me(([,{__manifest:{label:r,description:s,...o},tag:c}])=>(delete o.mocks,Us({info:{...uo({description:s,label:r}),...o},tag:c}))),no(Aa),X(r=>r.length>0)).subscribe({error:r=>An(t,r),next:r=>n(r)}),Ea=(t,e,n)=>n.pipe(le(([,{__manifest:{mocks:r={}},tag:s}])=>[s,r])).subscribe({error:r=>An(t,r),next:r=>{e.mocks.next(r)}});async function vi(t,e,n,{addInfo:r,tags:s}){const{subscription:o}=this;if(n){const c=$a(this.customElements,s);return sa(n,this,f=>An(t,f)).then(()=>{o.add(Sa(t,c,r)),o.add(Ea(t,e,c))})}}const bi=(t,e)=>{const{document:n}=t;let r=e.firstElementChild;return r===null&&(r=n.createElement("div"),r.style.height="inherit",r.style.display="flex",e.appendChild(r)),r};async function vn(t,e){const n=ra(),{proxyWindow:r=this}=this;return oa({content:t,sources:{importmap:{},uris:[]}},bi(this,e),{eventBus:n,proxyWindow:r})}function yi(t){bi(this,t).remove()}var xa=Object.defineProperty,Oa=(t,e,n)=>e in t?xa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$r=(t,e,n)=>(Oa(t,typeof e!="symbol"?e+"":e,n),n);function Ar(t,e,n){const{properties:r,attributes:s,booleanAttributes:o=[]}=t,c=Object.assign(Object.fromEntries(ti(o).map(h=>[h,!0])),{...s,...r});return e(c).map(({url:h,method:d="GET",notify:_=!1,handler:g=()=>Promise.resolve(new Response)})=>{var S;const x=Ao({...h,method:d},c),P=new URL(x.pathname,(S=x.origin)!=null?S:n);return[P.href,d,(C,q)=>g(C,q).finally(()=>{_&&this.notify(_i(d,P))})]})}const Ia=(t,e)=>{const{href:n,search:r}=t;return n.replace(/\?$/,"").substring(0,n.length-r.length).match(new RegExp(`^${e}$`))!==null},Ca=(t,e)=>{const{href:n}=t;return n.match(new RegExp(`^${e.replace(/\/$/,"")}/`))!==null};class La extends Map{constructor(e){super(),$r(this,"notify"),$r(this,"__urlMap",new Map),this.notify=e}add(e,n){var r,s;const{method:o,url:c}=e,f=(r=this.get(o))!=null?r:new Map,h=(s=this.__urlMap.get(o))!=null?s:[];f.set(c,n),h.push(c),this.set(o,f),this.__urlMap.set(o,h)}match(e){var n;const{method:r,url:s}=e,o=this.__urlMap.get(r);if(o===void 0)return;const c=o.reduce((f,h,d,_)=>{if(Ia(s,h)||Ca(s,h)){if(f===void 0)return d;if(_[f].length<h.length)return d}return f},void 0);if(c!==void 0)return(n=this.get(r))==null?void 0:n.get(o[c])}}const Ta=t=>([e,n,r])=>t.add({method:n,url:e},r);async function Sr(t,e,n,r){const s=Ta(t);return Array.isArray(e)?Promise.all(e.map(o=>Ar.call(t,o,n,r)).flat().map(s)).then(Ue):Promise.all(Ar.call(t,e,n,r).map(s)).then(Ue)}var Er;const xr=(Er=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?Er:5e3,Pa=t=>t.includes("-"),Or=t=>({data:{tag:t},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function Ma(t,e,n,r=[]){const{location:{href:s},fetch:o}=this,c=ni(this),f=new La(this.notify.bind(this));await Promise.all(r.map(async d=>{var _;let g=()=>[];const S=await Promise.race([At(dn(xr)),At(e.mocks.pipe(X(([P])=>P===d),Le(1)))]);if(S===0)this.notify(Or(d));else{const[,{fetch:P}]=S;P!==void 0&&(g=P)}const x=(_=n.get(d))!=null?_:[];return Sr(f,x,g,s)})).catch(d=>d instanceof Error&&fi(t,d));const h=async(d,_)=>{var g;const S=ri(c,d),x=f.match({method:(g=_==null?void 0:_.method)!=null?g:"GET",url:S});return x!==void 0?x(S,_).then(P=>P):o(d,_)};if(this.proxyWindow){const d=Object.assign(h,{update:async _=>{let g=()=>[];if(Pa(_.tag)){const S=await Promise.race([At(dn(xr)),At(e.mocks.pipe(X(([x])=>x===_.tag),Le(1)))]);if(S===0)this.notify(Or(_.tag));else{const[,{fetch:x}]=S;x!==void 0&&(g=x)}}return Sr(f,_,g,s)}});this.fetch=d,this.proxyWindow.fetch=d}}function Ra(t,e){const{href:n,origin:r,pathname:s}=new URL(t??"",this.location.href);let o=n;return r===this.location.origin&&(o=`{ your domain }${s}`),this.notify({data:{nextUrl:o,target:e??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function ja(t,e,n){const{href:r,origin:s,pathname:o}=new URL(n);let c=r;s===this.location.origin&&(c=`${o}`),this.notify({data:{nextUrl:c},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function Na(t,e,n){const{href:r,origin:s,pathname:o,search:c}=new URL(n);let f=r;s===this.location.origin&&(f=`${o}${c}`),this.notify({data:{nextUrl:f},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function Fa(t){return new Proxy(t,{get:(e,n)=>n==="pushState"?(r,s,o)=>{ja.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:n==="replaceState"?(r,s,o)=>{Na.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:e[n]})}class Ir extends Map{get length(){return this.size}clear(){super.clear()}getItem(e){var n;return(n=super.get(e))!=null?n:null}key(){return null}removeItem(e){super.delete(e)}setItem(e,n){super.set(e,n)}}const Ha=t=>t.tagName==="A";function Ua(t){const{prototype:{createElement:e}}=Document;return Document.prototype.createElement=function(r,s){const o=e.call(this,r,s);if(Ha(o)){const c=()=>{var f;return t.notify({data:{href:lo(t.location.origin,new URL(o.href,t.location.href)),target:(f=o.getAttribute("target"))!=null?f:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(o,"click",{get(){return c},set:Ue})}return o},()=>{Document.prototype.createElement=e}}function Wa(t,e){let n=t.fetch.bind(t);const r={notify:_=>e.next(_)},s=new Ir,o=new Ir,c=Object.assign(t,r),f=new Proxy(c,{get(_,g,S){if(g==="fetch")return n;if(g==="history")return Fa.call(_,_.history);if(g==="open")return Ra.bind(_);if(g==="localStorage")return s;if(g==="sessionStorage")return o;const x=Reflect.get(_,g);return typeof x!="function"?x:function(...C){return Reflect.apply(x,this===S?t:this,C)}},set(_,g,S){return g==="fetch"?(n=S,!0):Reflect.set(_,g,S)}}),h=Object.assign(c,{proxyWindow:f}),d=Ua(h);return{sandbox:h,unpatch:d}}var Ba=Object.defineProperty,Da=(t,e,n)=>e in t?Ba(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cr=(t,e,n)=>(Da(t,typeof e!="symbol"?e+"":e,n),n);function Va(t,e){const{document:n}=t,r=n.createElement("div"),s="";r.style.display=s,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex=`${So}`;const o=()=>r.style.display===s,c=()=>o()?r.style.display="none":r.style.display=s,f=e.pipe(X(h=>t.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?h==="interact":!0)).subscribe(h=>{switch(h){case"interact":t.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=s;break;case 0:default:c();break}});return n.body.appendChild(r),{cleanup:()=>f.unsubscribe(),overlay:r}}const qa=t=>{const e=t.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.height="inherit",t.body.appendChild(e),e};function Ga(t){const e=t;return Object.assign(t,{bootstrap:vi.bind(e),mocks:{fetch:new Map},subscription:new ce,unmount:yi.bind(e),update:vn.bind(e)})}class Ya{constructor(){Cr(this,"_results",new Map),Cr(this,"_queue",Promise.resolve())}add(e){const r=[...e].map(s=>{let o,c;const f=new Promise((h,d)=>{o=h,c=d});return this._queue=this._queue.then(()=>s()).then(h=>{o(h)}).catch(h=>c(h)),f});return Promise.allSettled(r)}get(e){return this._results.get(e)}}const za=t=>e=>{e.forEach(n=>{n.status==="rejected"&&t.next({data:{reason:n.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},Ja=t=>e=>{t.infos.next(e),e.forEach(({tag:n})=>t.uppercaseTags.add(n.toUpperCase()))},Ka=(t,e,n,r)=>{const s=new Ya,o=r.configuration.pipe(ro(r.swSourceMapAck)).subscribe(([c])=>{const{configuration:f}=c,{content:h}=f;let d;if(c.type==="reset"){const{contexts:_,tags:g}=c;d=s.add([()=>yi.call(t,e),()=>vi.call(t,n,r,f,{addInfo:Ja(r),tags:g}),()=>Ma.call(t,n,r,_,c.tags),()=>vn.call(t,h,e).finally(()=>r.updated.next(0))])}else{const{context:_}=c;d=s.add([()=>{var g,S,x;return(x=(g=t.proxyWindow)==null?void 0:(S=g.fetch).update)==null?void 0:x.call(S,_)},()=>vn.call(t,h,e).finally(()=>r.updated.next(0))])}d.then(za(r.notification)).catch(Ue)});return()=>o.unsubscribe()},Qa=t=>{const{body:e}=t;e.style.height="100%",e.style.padding="0",e.style.margin="0"},Xa=(t,e)=>{const{location:{origin:n,port:r,protocol:s}}=t;return!(n!==e.origin||r!==e.port||s!==e.protocol)},_i=(t,e)=>({data:{method:t,url:e.href.substring(e.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),Za=(t,e)=>{const n=ni(t),{document:r,parent:s}=t;if(s===t)return;const o=t.fetch.bind(t);t.fetch=(c,f)=>{var h;const d=ri(n,c);return Xa(r,d)&&e.next(_i((h=f==null?void 0:f.method)!=null?h:"GET",d)),o(c,f)}},ec=(t,e,n)=>{Qa(t.document),Za(t,n.notification);const{cleanup:r}=Va(t,n.mode.asObservable()),s=vo(t.document,n.focus.asObservable(),n.mode.asObservable()),o=qa(t.document),c=Ga(t),{sandbox:f,unpatch:h}=Wa(c,n.notification),d=Ka(f,o,e,n);return{cleanup:()=>{d(),h(),s(),r()},sandboxedWindow:f}};function tc(t){const e=new ce;return e.add(t.updated.subscribe(()=>this.send({content:{},type:"updated"}))),e.add(t.infos.subscribe(n=>this.send({content:n,type:"tag-info"}))),e.add(t.notification.subscribe(n=>this.send({content:n,type:"notification"}))),e.add(t.mode.subscribe(n=>this.send({content:{mode:n},type:"ctrl-space"}))),()=>e.unsubscribe()}function nc(t){const e=new ce;return e.add(t.setSourceMap.subscribe(n=>{this.ackSend({content:n,type:"set-source-map"}).then(()=>t.swSourceMapAck.next(0)).catch(Ue)})),()=>e.unsubscribe()}function rc(t,...e){const n=e.map(({type:r,handler:s})=>(t.addEventListener(r,s),()=>t.removeEventListener(r,s)));return()=>{n.forEach(r=>r())}}function ic(t,e){t.addEventListener("unload",()=>{t.subscription.unsubscribe(),e.forEach(n=>n())})}(async t=>{const e=ma(),n=await ba(t),r=_a(t,e),s=nc.call(n,e),o=tc.call(r,e),c=rc(t,{handler:ga(e),type:"keydown"},{handler:kr(r,"mousemove"),type:"mousemove"},{handler:kr(r,"mousedown"),type:"mousedown"},{handler:ua(t,r,e),type:"mousedown"}),{cleanup:f,sandboxedWindow:h}=ec(t,r,e);ic(h,[f,c,o,s,()=>r.disconnect(),()=>n.send({content:{},type:"unload-client"}),()=>n.disconnect()])})(window).catch(t=>{throw console.error(`[preview] Error Boundary: ${String(t)}`),t});
|