@reventlessdev/reventless-host-shell 3.0.0-alpha.69 → 3.0.0-alpha.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,128 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-Dgph1vS8.js","assets/MapMode.res-UkF-_PLs.js","assets/Geocoder.res-BitNulBf.js","assets/index-DYTDlj-s.js"])))=>i.map(i=>d[i]);
2
+ import"./virtualExposes-DN39MDG_.js";import{d as vI}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C8lRAcSv.js";import{_ as Gm}from"./preload-helper-BlTxHScW.js";import{_ as _B}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BzAfciYp.js";import{_ as L,a as b,b as Lr}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-hre-5-8f.js";import{a as de,b as $e,c as ar,d as br,e as bB,f as At,g as tn,h as Fe,i as Nt,j as cS,k as yB,l as _I,m as ao,n as xB,o as SB,p as wB,q as EB}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js";import{a as bI,b as Op}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Bp_g55i_.js";import{c as v0,_ as St}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function kB(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function CB(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Gt(e){return e===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:e!==null&&e.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function Wi(e){if(e!=null)return Gt(e)}function zt(e){if(e===null||e.BS_PRIVATE_NESTED_SOME_NONE===void 0)return e;let t=e.BS_PRIVATE_NESTED_SOME_NONE;if(t!==0)return{BS_PRIVATE_NESTED_SOME_NONE:t-1|0}}let Rg="JsExn";function RB(e){if(e.RE_EXN_ID===Rg)return Gt(e._1)}function AB(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function dl(e){return AB(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let TB=["map","graph"];async function $B(e,t){switch(e){case"graph":return(await Gm(()=>import("./GraphMode.res-Dgph1vS8.js"),__vite__mapDeps([0])).then(o=>o.init))(t.graphLayout,void 0);case"map":let n=await Gm(()=>import("./MapMode.res-UkF-_PLs.js"),__vite__mapDeps([1])).then(o=>o.init),i=await Gm(()=>import("./Geocoder.res-BitNulBf.js"),__vite__mapDeps([2])).then(o=>o.fromShell);return n(t.mapStyle,i(),void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+TB.join(", "));return}}async function NB(e){await Promise.all(e.viewModes.map(async t=>{try{return await $B(t,e)}catch(r){let n=dl(r);if(n.RE_EXN_ID===Rg){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function Du(e,t){if(e!==void 0&&t(zt(e)))return e}function re(e,t){if(e!==void 0)return t(zt(e))}function fe(e,t,r){return e!==void 0?r(zt(e)):t}function G(e,t){if(e!==void 0)return Gt(t(zt(e)))}function C(e,t){if(e!==void 0)return t(zt(e))}function F(e,t){return e!==void 0?zt(e):t}function Aa(e,t){return e!==void 0?e:t}function De(e){return e!==void 0}function Wr(e){return e===void 0}function DB(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function nC(e){switch(e){case"":case"/":return 0;default:let t=e.slice(1),n=t[t.length-1|0]==="/"?t.slice(0,-1):t,i=n.split("?",2),a=(i.length!==2?n:i[0]).split("/").filter(u=>u.length!==0),s=a.length-1|0,l=0;for(;;){let u=l,d=s;if(d<0)return u;l={hd:a[d],tl:u},s=d-1|0}}}function FB(e,t){let r=globalThis.window;return e!==void 0?nC(e):r!==void 0?nC(zt(r).location.pathname):0}function IB(){let e=globalThis.window;if(e===void 0)return"";let t=zt(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function iC(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function PB(e,t){let r=globalThis.window;return e!==void 0?iC(e):r!==void 0?iC(zt(r).location.search):""}function cs(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){zt(t).pushState(null,"",e),zt(r).dispatchEvent(DB("popstate"));return}}function OB(e,t){if(e.hash!==t.hash||e.search!==t.search)return!0;{let r=e.path,n=t.path;for(;;){let i=n,o=r;if(o===0)return i!==0;if(i===0||o.hd!==i.hd)return!0;n=i.tl,r=o.tl}}}function _0(e,t){return{path:FB(e),hash:IB(),search:PB(e)}}function MB(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(_0(void 0));return zt(t).addEventListener("popstate",r),r}function LB(e){let t=globalThis.window;if(t!==void 0){zt(t).removeEventListener("popstate",e);return}}function zB(e,t){let r=de(()=>_0(void 0)),n=r[1],i=r[0];return $e(()=>{let o=MB(s=>n(l=>s)),a=_0(void 0);return OB(a,i)&&n(s=>a),()=>LB(o)},[]),i}let UB=_0,Ag=ar({prefix:"",path:""});function yI(e,t){return e===""||t.startsWith(e)?t:e+t}let BB=Ag.Provider;function jB(e){return br(BB,{value:e.value,children:e.children})}let qB=jB,oC="popstate";function VB(){let e=globalThis.window;return e!==void 0?zt(e).location.pathname:""}function GB(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=zt(t);return r.addEventListener(oC,e),()=>{r.removeEventListener(oC,e)}}function Tg(e,t){return bB(GB,VB,()=>F(e,""))}function Cl(){let t=At(Ag).prefix;return r=>cs(yI(t,r))}function KB(){let t=At(Ag).path,r=Tg(void 0);return t===""?r:t}function $t(e,t){return e.catch(r=>t(dl(r)))}function Wc(e,t){return e===t?0:e<t?-1:1}function dS(e,t){return e<t?-1:e===t?0:1}function Ho(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function xI(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function fl(e,t){if(e<=0)return[];let r=new Array(e);for(let n=0;n<e;++n)r[n]=t(n);return r}function nt(e,t,r){return e.reduce(r,t)}function HB(e,t){let r=e.findIndex(t);if(r!==-1)return r}function ee(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a);s!==void 0&&(n[i]=zt(s),i=i+1|0)}return n.length=i,n}function fS(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a,o);s!==void 0&&(n[i]=zt(s),i=i+1|0)}return n.length=i,n}function WB(e,t){let r=0;for(;;){let n=r;if(n===e.length)return;let i=t(e[n]);if(i!==void 0)return i;r=n+1|0}}function SI(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function JB(e,t){for(;;){let r=t,n=e;if(n===0)return r;let i={hd:n.hd,tl:0};r.tl=i,t=i,e=n.tl}}function QB(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return JB(e.tl,r).tl=t,r}function YB(e){let t=e,r=0;for(;;){let n=r,i=t;if(i===0)return n;r=n+1|0,t=i.tl}}function XB(e,t,r){for(;;){let n=r,i=t;if(n===0)return;e[i]=n.hd,r=n.tl,t=i+1|0}}function $g(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}function Ng(e){let t=YB(e),r=new Array(t);return XB(r,0,e),r}function ZB(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function wI(e){return ZB(e,0)}function ej(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function EI(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function tj(e){let t=e.length,r=0;for(let i=0;i<t;++i)r=r+e[i].length|0;let n=new Array(r);r=0;for(let i=0;i<t;++i){let o=e[i];for(let a=0,s=o.length;a<s;++a)n[r]=o[a],r=r+1|0}return n}function rj(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let kI=rj;function Sc(e){return e!==void 0?e.h:0}function ua(e,t,r,n){let i=Sc(e),o=Sc(n);return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n}}function nj(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function ij(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function aC(e,t,r,n){let i=e!==void 0?e.h:0,o=n!==void 0?n.h:0;if(i>(o+2|0)){let l=e.l,u=e.r;return Sc(l)>=Sc(u)?ua(l,e.k,e.v,ua(u,t,r,n)):ua(ua(l,e.k,e.v,u.l),u.k,u.v,ua(u.r,t,r,n))}if(o<=(i+2|0))return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n};let a=n.l,s=n.r;return Sc(s)>=Sc(a)?ua(ua(e,t,r,a),n.k,n.v,s):ua(ua(e,t,r,a.l),a.k,a.v,ua(a.r,n.k,n.v,s))}function oj(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Gt(r.v);e=t<n?r.l:r.r}}function t1(e,t,r){if(e===void 0)return nj(t,r);let n=e.k;if(t===n)return ij(e,r);let i=e.v;return t<n?aC(t1(e.l,t,r),n,i,e.r):aC(e.l,n,i,t1(e.r,t,r))}let CI=oj;function RI(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=$g(n.split("/"));return i!==0&&i.hd===""?i.tl:i}},r=e.indexOf("?");return r===-1?t(e):r===0?0:t(e.slice(0,r))}let r1={parsers:0,children:void 0,capture:void 0,wildcard:!1};function aj(e,t){let r=e,n=t;for(;;){let i=n,o=r,a=o.parsers,s=0;if(a!==0)s=1;else{if(i===0)return 0;s=1}if(s===1){let l=o.capture,u=0;if(i===0)return a;if(i.hd===""){if(i.tl===0)return a;u=2}else u=2;if(u===2){if(o.wildcard)return a;let d=i.tl,f=CI(o.children,i.hd);if(f!==void 0){n=d,r=f;continue}if(l===void 0)return 0;n=d,r=l;continue}}}}function sj(e,t,r){let n=(i,o)=>{if(i===0)return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:o.wildcard};let a=o.capture,s=o.children,l=i.tl,u=i.hd;if(typeof u!="object"){if(u!=="Capture")return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:!0};let f=n(l,a!==void 0?a:r1);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=u._0,f=CI(s,d),p=n(l,f!==void 0?f:r1);return{parsers:o.parsers,children:t1(s,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function lj(e){return{prefix:0,matched:RI(e)}}function uj(e){return Ng({hd:"",tl:e.matched}).join("/")}function cj(e){return Ng({hd:"",tl:e.prefix}).join("/")}function dj(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function b0(e,t){return{TAG:"Match",_0:e,_1:t}}function n1(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:n1(e._1)}:{hd:"Capture",tl:n1(e._1)}}function fj(e,t){let r=i=>e("/"+Ng(i).join("/")),n=(i,o)=>{for(;;){let a=o,s=i;if(typeof a!="object")return a==="End"?s(0):d=>s(QB(d.matched,0));if(a.TAG==="Match"){let d=a._0;o=a._1,i=f=>s({hd:d,tl:f});continue}let l=a._1,u=a._0.to_;return d=>n(f=>s({hd:u(d),tl:f}),l)}};return n(r,t)}function hj(e){return fj(t=>t,e)}function pj(e,t,r){let n=e,i=t,o=0,a=r;for(;;){let s=a,l=o,u=i,d=n;if(typeof d!="object")return d==="End"?s!==0?s.hd===""&&s.tl===0?{TAG:"MatchWithTrailingSlash",_0:u}:"NoMatch":{TAG:"FullMatch",_0:u}:{TAG:"FullMatch",_0:u({prefix:wI(l),matched:s})};if(d.TAG==="Match"){if(s===0)return"NoMatch";let p=s.hd;if(d._0!==p)return"NoMatch";a=s.tl,o={hd:p,tl:l},n=d._1;continue}if(s===0)return"NoMatch";let f=s.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";a=s.tl,o={hd:f,tl:l},i=u(zt(h)),n=d._1}}function mj(e){let t=wI(e);return EI(t,r1,(r,n)=>{let i=n1(n._0);return sj(i,n,r)})}function gj(e,t){let r=RI(t),i=aj(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let a=o.hd,s=a._2,l=pj(a._0,a._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:s(l._0)}:{TAG:"MatchWithTrailingSlash",_0:s(l._0)};i=o.tl}}function vj(e,t){let r=gj(e,t);if(typeof r=="object")return Gt(r._0)}function AI(e){return e("End")}let TI={prefix:cj,wildcard_match:uj,of_parts:lj},_j="Wildcard",Ya=hj,hc=dj;function cu(){return{}}let $I=ar({});function bj(e,t){return e+("."+t)}function yj(e,t,r,n){return e[bj(t,r)]=Ya(n),e}function i1(e,t){return Object.assign(Object.assign({},e),t)}function Dg(){return At($I)}let xj=$I.Provider;function Sj(e){return br(xj,{value:e.registry,children:e.children})}let wj={make:Sj},NI={contents:{}};function Ej(e){NI.contents=e}function kj(e){return e.startsWith("/")?e.slice(1):e}function Cj(e){let t=kj(e);return G(nt(Object.entries(NI.contents),void 0,(r,n)=>{let i=n[0];if(!t.startsWith(i+"/"))return r;let o=n[1];return r!==void 0&&r[0].length>=i.length?r:[i,o]}),r=>r[1])}function du(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=Cj(e);if(t===void 0)return e;let r=e.startsWith("/")?e:"/"+e;return(t.endsWith("/")?t.slice(0,t.length-1|0):t)+r}let Rj=((e,t)=>{for(var r in e)t(e[r],r)});function Aj(e){if(typeof e=="boolean")return e}function Tj(e){if(e===null)return null}function $j(e){if(typeof e=="string")return e}function Nj(e){if(typeof e=="number")return e}function Dj(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function Fj(e){if(Array.isArray(e))return e}let me={bool:Aj,$$null:Tj,string:$j,float:Nj,object:Dj,array:Fj};function M(e,t){if(t in e)return Gt(e[t])}function Pe(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i){let o=t[i];n[i]=[o,e[o]]}return n}function Kh(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i)n[i]=e[t[i]];return n}function Ye(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}let Ij=/[^aeiou]y$/i;function Pj(e){return Ij.test(e)?e.slice(0,e.length-1|0)+"ies":e.endsWith("s")||e.endsWith("x")||e.endsWith("z")||e.endsWith("ch")||e.endsWith("sh")?e+"es":e+"s"}function Lo(e){return e.endsWith("ies")?e.slice(0,e.length-3|0)+"y":e.endsWith("ses")||e.endsWith("xes")||e.endsWith("zes")||e.endsWith("ches")||e.endsWith("shes")?e.slice(0,e.length-2|0):e.endsWith("s")?e.slice(0,e.length-1|0):e}function Fg(e){return Pj(Lo(e))}let Oj=[["id","ID"],["ids","IDs"],["url","URL"],["uri","URI"],["api","API"],["arn","ARN"],["aws","AWS"],["iam","IAM"],["sqs","SQS"],["sns","SNS"],["uuid","UUID"],["ip","IP"],["dns","DNS"],["http","HTTP"],["https","HTTPS"],["json","JSON"],["xml","XML"],["sql","SQL"],["ui","UI"],["ux","UX"]],Mj=Ye(Oj);function C_(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function R_(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function Lj(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return!0;default:return!1}}function zj(e){let t=e.length,r=[],n={contents:""},i=()=>{if(n.contents.length>0){r.push(n.contents),n.contents="";return}};for(let o=0;o<t;++o){let a=e.charAt(o);if(a==="_"||a==="-"||a===" ")i();else if(C_(a)){let s=o>0&&R_(e.charAt(o-1|0)),l=(o+1|0)<t&&R_(e.charAt(o+1|0)),u=o>0&&C_(e.charAt(o-1|0));(s||u&&l)&&i(),n.contents=n.contents+a}else if(Lj(a)){let s=!1;if(o>0){let l=e.charAt(o-1|0);s=C_(l)||R_(l)}s&&i(),n.contents=n.contents+a}else n.contents=n.contents+a}return i(),r}function Uj(e){let t=e.toLowerCase(),r=M(Mj,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function vt(e){let t=zj(e);return t.length!==0?t.map(Uj).join(" "):e}let Bj=Lo;function et(e){let t=typeof e;return t==="string"?{TAG:"JSONString",_0:e}:t==="number"?{TAG:"JSONNumber",_0:e}:t==="boolean"?e===!0?"JSONTrue":"JSONFalse":e===null?"JSONNull":Array.isArray(e)?{TAG:"JSONArray",_0:e}:{TAG:"JSONObject",_0:e}}function ce(e){if(typeof e=="string")return e}function Ji(e){if(typeof e=="number")return e}function H(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function Vt(e){if(Array.isArray(e))return e}function hS(e){if(typeof e=="boolean")return e}let sC=(function(e,t){for(var r in e)t(r)});function Ne(e,t){if(e===t)return!0;let r=typeof e;if(r==="string"||r==="number"||r==="bigint"||r==="boolean"||r==="undefined"||e===null)return!1;let n=typeof t;if(r==="function"||n==="function")throw{RE_EXN_ID:"Invalid_argument",_1:"equal: functional value",Error:new Error};if(n==="number"||n==="bigint"||n==="undefined"||t===null)return!1;let i=e.TAG,o=t.TAG;if(i!==o)return!1;let a=e.length|0,s=t.length|0;if(a===s)if(Array.isArray(e)){let l=0;for(;;){let u=l;if(u===a)return!0;if(!Ne(e[u],t[u]))return!1;l=u+1|0}}else{if(e instanceof Date&&t instanceof Date)return!(e>t||e<t);{let l={contents:!0},u=f=>{if(!Object.prototype.hasOwnProperty.call(t,f)){l.contents=!1;return}},d=f=>{if(!Object.prototype.hasOwnProperty.call(e,f)||!Ne(t[f],e[f])){l.contents=!1;return}};return sC(e,u),l.contents&&sC(t,d),l.contents}}else return!1}function Jc(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!Ne(e,t)}function cn(e){let t=H(e);if(t===void 0)return e;let r=M(t,"type"),n=M(t,"properties");return r!==void 0||n!==void 0?e:F(G(nt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:C(C(M(t,o),Vt),a=>a.find(s=>Jc(C(C(H(s),l=>M(l,"type")),ce),"null")))),cn),e)}function DI(e){return C(H(cn(e)),t=>{if(C(M(t,"type"),ce)==="array")return G(M(t,"items"),cn)})}function jj(e,t){return t.startsWith(e)}function qj(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let nn={initial:"initial",inherit_:"inherit_",unset:"unset",toString:qj};function Vj(e){return{NAME:"var",VAL:e}}function Gj(e,t){return{NAME:"varDefault",VAL:[e,t]}}function lC(e){return jj("--",e)?e:"--"+e}function Ig(e){if(e.NAME==="var")return"var("+lC(e.VAL)+")";let t=e.VAL;return"var("+lC(t[0])+","+t[1]+")"}function Kj(e){return{NAME:"s",VAL:e}}function Hj(e){return{NAME:"ms",VAL:e}}function Wj(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let Jj={s:Kj,ms:Hj,toString:Wj};function pS(e){return e.VAL.toString()+"%"}function Qj(e){return{NAME:"ch",VAL:e}}function Yj(e){return{NAME:"em",VAL:e}}function Xj(e){return{NAME:"ex",VAL:e}}function Zj(e){return{NAME:"rem",VAL:e}}function eq(e){return{NAME:"vh",VAL:e}}function tq(e){return{NAME:"vw",VAL:e}}function rq(e){return{NAME:"vmin",VAL:e}}function nq(e){return{NAME:"vmax",VAL:e}}function iq(e){return{NAME:"px",VAL:e}}function oq(e){return{NAME:"pxFloat",VAL:e}}function aq(e){return{NAME:"cm",VAL:e}}function sq(e){return{NAME:"mm",VAL:e}}function lq(e){return{NAME:"inch",VAL:e}}function uq(e){return{NAME:"pc",VAL:e}}function cq(e){return{NAME:"pt",VAL:e}}function o1(e){if(typeof e!="object")return"0";let t=e.NAME;return t==="inch"?e.VAL.toString()+"in":t==="vmax"?e.VAL.toString()+"vmax":t==="vmin"?e.VAL.toString()+"vmin":t==="percent"?e.VAL.toString()+"%":t==="ch"?e.VAL.toString()+"ch":t==="cm"?e.VAL.toString()+"cm":t==="em"?e.VAL.toString()+"em":t==="ex"?e.VAL.toString()+"ex":t==="mm"?e.VAL.toString()+"mm":t==="pc"?e.VAL.toString()+"pc":t==="pt"?e.VAL.toString()+"pt":t==="px"?e.VAL.toString()+"px":t==="vh"?e.VAL.toString()+"vh":t==="vw"?e.VAL.toString()+"vw":t==="rem"?e.VAL.toString()+"rem":e.VAL.toString()+"px"}let FI={ch:Qj,em:Yj,ex:Xj,rem:Zj,vh:eq,vw:tq,vmin:rq,vmax:nq,px:iq,pxFloat:oq,cm:aq,mm:sq,inch:lq,pc:uq,pt:cq,zero:"zero",toString:o1};function dq(e,t){return{NAME:"min",VAL:[e,t]}}function fq(e,t){return{NAME:"max",VAL:[e,t]}}function Do(e){if(typeof e!="object")return o1(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+Do(n[0])+" - "+Do(n[1])+")"}if(t==="percent")return pS(e);if(t==="add"){let n=e.VAL;return"calc("+Do(n[0])+" + "+Do(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+Do(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+Do(n[0])+", "+Do(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+Do(n[0])+", "+Do(n[1])+")"}if(t!=="mul")return o1(e);let r=e.VAL;return"calc("+Do(r[0])+" * "+r[1].toString()+")"}let Jr={min:dq,max:fq,toString:Do};function hq(e){let t=e.NAME;return t==="turn"?e.VAL.toString()+"turn":t==="deg"?e.VAL.toString()+"deg":t==="rad"?e.VAL.toString()+"rad":e.VAL.toString()+"grad"}function pq(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let mq={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:pq};function gq(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let II={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:gq};function vq(e){return"auto"}let _q={auto:"auto",toString:vq};function bq(e,t){return{NAME:"steps",VAL:[e,t]}}function yq(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function xq(e){if(typeof e!="object")return e==="easeInOut"?"ease-in-out":e==="linear"?"linear":e==="jumpBoth"?"jump-both":e==="stepStart"?"step-start":e==="jumpNone"?"jump-none":e==="stepEnd"?"step-end":e==="easeIn"?"ease-in":e==="jumpEnd"?"jump-end":e==="jumpStart"?"jump-start":e==="easeOut"?"ease-out":"ease";if(e.NAME==="steps"){let r=e.VAL,n=r[0];return r[1]==="start"?"steps("+n.toString()+", start)":"steps("+n.toString()+", end)"}let t=e.VAL;return"cubic-bezier("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"}function Sq(e){return e==="none"?"none":e==="circle"?"circle":e==="lowerGreek"?"lower-greek":e==="square"?"square":e==="lowerAlpha"?"lower-alpha":e==="upperAlpha"?"upper-alpha":e==="decimal"?"decimal":e==="lowerRoman"?"lower-roman":e==="lowerLatin"?"lower-latin":e==="upperRoman"?"upper-roman":e==="upperLatin"?"upper-latin":"disc"}let wq={toString:Sq};function Eq(e){return typeof e=="object"?e.VAL.toString():"infinite"}let kq={toString:Eq};function Cq(e){return e==="cell"?"cell":e==="copy"?"copy":e==="swResize"?"sw-resize":e==="grab"?"grab":e==="help"?"help":e==="move"?"move":e==="none"?"none":e==="text"?"text":e==="rowResize"?"row-resize":e==="wait"?"wait":e==="pointer"?"pointer":e==="seResize"?"se-resize":e==="zoomOut"?"zoom-out":e==="sResize"?"s-resize":e==="zoomIn"?"zoom-in":e==="grabbing"?"grabbing":e==="nsResize"?"ns-resize":e==="nwseResize"?"nwse-resize":e==="progress"?"progress":e==="crosshair"?"crosshair":e==="wResize"?"w-resize":e==="noDrop"?"no-drop":e==="allScroll"?"all-scroll":e==="verticalText"?"vertical-text":e==="nResize"?"n-resize":e==="default"?"default":e==="neswResize"?"nesw-resize":e==="alias"?"alias":e==="ewResize"?"ew-resize":e==="eResize"?"e-resize":e==="nwResize"?"nw-resize":e==="contextMenu"?"context-menu":e==="colResize"?"col-resize":e==="notAllowed"?"not-allowed":e==="neResize"?"ne-resize":"auto"}let Rq={auto:"auto",$$default:"default",none:"none",contextMenu:"contextMenu",help:"help",pointer:"pointer",progress:"progress",wait:"wait",cell:"cell",crosshair:"crosshair",text:"text",verticalText:"verticalText",alias:"alias",copy:"copy",move:"move",noDrop:"noDrop",notAllowed:"notAllowed",grab:"grab",grabbing:"grabbing",allScroll:"allScroll",colResize:"colResize",rowResize:"rowResize",nResize:"nResize",eResize:"eResize",sResize:"sResize",wResize:"wResize",neResize:"neResize",nwResize:"nwResize",seResize:"seResize",swResize:"swResize",ewResize:"ewResize",nsResize:"nsResize",neswResize:"neswResize",nwseResize:"nwseResize",zoomIn:"zoomIn",zoomOut:"zoomOut",toString:Cq};function Aq(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function Tq(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function $q(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function Nq(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function Dq(e){return{NAME:"hex",VAL:e}}function uC(e){let t=e.NAME;return t==="var"||t==="varDefault"?Ig(e):hq(e)}function cC(e){let t=e.NAME;return t==="percent"?pS(e):t==="num"?e.VAL.toString():Ig(e)}function Mp(e){return e.NAME==="percent"?pS(e):Ig(e)}function Lp(e){if(typeof e!="object")return e==="transparent"?"transparent":"currentColor";let t=e.NAME;if(t==="rgba"){let n=e.VAL;return"rgba("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+", "+cC(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+uC(n[0])+", "+Mp(n[1])+", "+Mp(n[2])+")"}if(t==="rgb"){let n=e.VAL;return"rgb("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+")"}let r=e.VAL;return"hsla("+uC(r[0])+", "+Mp(r[1])+", "+Mp(r[2])+", "+cC(r[3])+")"}function Fq(e){if(typeof e!="object"||e.NAME!=="lightDark")return Lp(e);let t=e.VAL;return"light-dark("+Lp(t[0])+", "+Lp(t[1])+")"}function Iq(e){return e==="hidden"?"hidden":e==="ridge"?"ridge":e==="solid"?"solid":e==="outset"?"outset":e==="groove"?"groove":e==="dashed"?"dashed":e==="dotted"?"dotted":e==="double"?"double":e==="inset"?"inset":"none"}let Pq={toString:Iq};function Oq(e){return typeof e=="object"?e.VAL.toString():"normal"}let dC={toString:Oq};function Mq(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let Lq={toString:Mq};function zq(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let Uq={toString:zq};function Bq(e){return"list-item"}let jq={toString:Bq};function qq(e){return e==="tableRow"?"table-row":e==="tableRowGroup"?"table-row-group":e==="tableColumn"?"table-column":e==="tableHeaderGroup"?"table-header-group":e==="tableCell"?"table-cell":e==="tableColumnGroup"?"table-column-group":e==="tableCaption"?"table-caption":"table-footer-group"}let Vq={toString:qq};function Gq(e){return e==="contents"?"contents":"none"}let Kq={toString:Gq};function Hq(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let Wq={toString:Hq};function Jq(e){return e==="left"?"left":e==="right"?"right":e==="selfEnd"?"self-end":e==="start"?"start":e==="center"?"center":e==="flexStart"?"flex-start":e==="flexEnd"?"flex-end":e==="selfStart"?"self-start":"end"}let mS={toString:Jq};function Qq(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let PI={toString:Qq};function Yq(e){return"normal"}let Xq={toString:Yq};function Zq(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let eV={toString:Zq};function tV(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let rV={toString:tV};function nV(e){return e==="normal"?"normal":"stretch"}let iV={toString:nV};function oV(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let aV={toString:oV};function sV(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let lV={toString:sV};function uV(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let cV={toString:uV};function dV(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let fV={toString:dV};function hV(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let gS={toString:hV};function pV(e){return"none"}let Pg={toString:pV};function mV(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let vS={toString:mV},Qr={$$var:Vj,varDefault:Gj,toString:Ig},gV={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:bq,cubicBezier:yq,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:xq},a1={rgb:Aq,rgba:Tq,hsl:$q,hsla:Nq,hex:Dq,transparent:"transparent",currentColor:"currentColor",toString:Fq},vV=Pg,_V=Pg,bV=Pg,yV=Pg,xV=a1.transparent;function SV(e,t){switch(t.TAG){case"D":let r=t._1,n=t._0;n==="content"?e[n]=r===""?'""':r:e[n]=r;break;case"S":e[t._0]=Jl(t._1);break;case"PseudoClass":e[":"+t._0]=Jl(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=Jl(t._2);break}return e}function Jl(e){return kI(e,{},SV)}function wV(e){let t=p=>e.injectRaw(p),r=(p,m)=>e.renderRaw(p,m),n=(p,m)=>e.injectRules(p,Jl(m)),i=(p,m,g)=>e.renderRules(p,m,Jl(g)),o=p=>e.make(Jl(p)),a=p=>e.mergeStyles(p),s=(p,m)=>e.mergeStyles([p,m]),l=(p,m,g)=>e.mergeStyles([p,m,g]),u=(p,m,g,v)=>e.mergeStyles([p,m,g,v]),d=p=>kI(p,{},(m,g)=>(m[g[0].toString()+"%"]=Jl(g[1]),m));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:a,merge2:s,merge3:l,merge4:u,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,m)=>e.renderKeyframes(p,d(m))}}function Og(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?Qr.toString(e):Jr.toString(e)}function EV(e){if(typeof e!="object")return a1.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Qr.toString(e):a1.toString(e)}function kV(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?PI.toString(e):e==="normal"||e==="stretch"?iV.toString(e):mS.toString(e)}}function CV(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?Qr.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?mS.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?PI.toString(e):aV.toString(e)}}function RV(e){return{TAG:"D",_0:"animationDuration",_1:Jj.toString(e)}}function AV(e){return{TAG:"D",_0:"animationIterationCount",_1:kq.toString(e)}}function TV(e){return{TAG:"D",_0:"animationTimingFunction",_1:gV.toString(e)}}function $V(e){return{TAG:"D",_0:"bottom",_1:Og(e)}}function NV(e){return{TAG:"D",_0:"cursor",_1:Rq.toString(e)}}function DV(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?Qr.toString(e):e==="table"||e==="grid"||e==="flex"?Uq.toString(e):e==="contents"||e==="none"?Kq.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?Wq.toString(e):e==="block"||e==="inline"||e==="runIn"?Lq.toString(e):e==="listItem"?jq.toString(e):Vq.toString(e)}}function FV(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):cV.toString(e)}}function IV(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function PV(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function OV(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?Qr.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?lV.toString(e):nn.toString(e)}}function MV(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):Jr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):vS.toString(e);return{TAG:"D",_0:"height",_1:t}}function LV(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?Qr.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?eV.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="normal"?Xq.toString(e):mS.toString(e)}}function zV(e){return{TAG:"D",_0:"left",_1:Og(e)}}function UV(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):r==="abs"?dC.toString(e):Jr.toString(e)}else t=e==="zero"?Jr.toString(e):e==="normal"?dC.toString(e):nn.toString(e);return{TAG:"D",_0:"lineHeight",_1:t}}function BV(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):wq.toString(e)}}function fu(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):_q.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Qr.toString(e):Jr.toString(e)}function jV(e){return{TAG:"D",_0:"margin",_1:fu(e)}}function qV(e,t){return{TAG:"D",_0:"margin",_1:fu(e)+(" "+fu(t))}}function VV(e){return{TAG:"D",_0:"marginLeft",_1:fu(e)}}function GV(e){return{TAG:"D",_0:"marginRight",_1:fu(e)}}function KV(e){return{TAG:"D",_0:"marginTop",_1:fu(e)}}function HV(e){return{TAG:"D",_0:"marginBottom",_1:fu(e)}}function WV(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):Jr.toString(e)}else t=e==="none"?bV.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):vS.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function JV(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):Jr.toString(e)}else t=e==="none"?vV.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):gS.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function QV(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):Jr.toString(e)}else t=e==="none"?yV.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):vS.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function YV(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):Jr.toString(e)}else t=e==="none"?_V.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):gS.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function XV(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function ZV(e){return{TAG:"D",_0:"overflow",_1:II.toString(e)}}function eG(e){return{TAG:"D",_0:"overflowY",_1:II.toString(e)}}function tG(e){return{TAG:"D",_0:"padding",_1:Jr.toString(e)}}function rG(e,t){return{TAG:"D",_0:"padding",_1:Jr.toString(e)+(" "+Jr.toString(t))}}function nG(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):mq.toString(e)}}function iG(e){return{TAG:"D",_0:"right",_1:Og(e)}}function oG(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):rV.toString(e)}}function aG(e){return{TAG:"D",_0:"top",_1:Og(e)}}function sG(e,t){return{TAG:"D",_0:e,_1:t}}function lG(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):fV.toString(e)}}function uG(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Qr.toString(e):Jr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):e==="zero"?Jr.toString(e):gS.toString(e);return{TAG:"D",_0:"width",_1:t}}function cG(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function dG(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function fG(e,t){return{TAG:"S",_0:e,_1:t}}function hG(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function pG(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function mG(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function gG(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function vG(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function _G(e){return{TAG:"S",_0:"::placeholder",_1:e}}let bG=FI.px;function yG(e){return typeof e=="object"?Qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?nn.toString(e):Pq.toString(e)}function xG(e,t,r){return{TAG:"D",_0:"border",_1:FI.toString(e)+" "+yG(t)+" "+EV(r)}}function SG(e){return{TAG:"D",_0:"animationName",_1:e}}function wG(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function EG(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var kG=(function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(EG(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=wG(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Wn="-ms-",y0="-moz-",Bt="-webkit-",OI="comm",_S="rule",bS="decl",CG="@import",MI="@keyframes",RG="@layer",AG=Math.abs,Mg=String.fromCharCode,TG=Object.assign;function $G(e,t){return zn(e,0)^45?(((t<<2^zn(e,0))<<2^zn(e,1))<<2^zn(e,2))<<2^zn(e,3):0}function LI(e){return e.trim()}function NG(e,t){return(e=t.exec(e))?e[0]:e}function jt(e,t,r){return e.replace(t,r)}function s1(e,t){return e.indexOf(t)}function zn(e,t){return e.charCodeAt(t)|0}function rh(e,t,r){return e.slice(t,r)}function ga(e){return e.length}function yS(e){return e.length}function zp(e,t){return t.push(e),e}function DG(e,t){return e.map(t).join("")}var Lg=1,Qc=1,zI=0,Ri=0,Zr=0,gd="";function zg(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Lg,column:Qc,length:a,return:""}}function Yd(e,t){return TG(zg("",null,null,"",null,null,0),e,{length:-e.length},t)}function FG(){return Zr}function IG(){return Zr=Ri>0?zn(gd,--Ri):0,Qc--,Zr===10&&(Qc=1,Lg--),Zr}function Vi(){return Zr=Ri<zI?zn(gd,Ri++):0,Qc++,Zr===10&&(Qc=1,Lg++),Zr}function ka(){return zn(gd,Ri)}function Km(){return Ri}function Hh(e,t){return rh(gd,e,t)}function nh(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function UI(e){return Lg=Qc=1,zI=ga(gd=e),Ri=0,[]}function BI(e){return gd="",e}function Hm(e){return LI(Hh(Ri-1,l1(e===91?e+2:e===40?e+1:e)))}function PG(e){for(;(Zr=ka())&&Zr<33;)Vi();return nh(e)>2||nh(Zr)>3?"":" "}function OG(e,t){for(;--t&&Vi()&&!(Zr<48||Zr>102||Zr>57&&Zr<65||Zr>70&&Zr<97););return Hh(e,Km()+(t<6&&ka()==32&&Vi()==32))}function l1(e){for(;Vi();)switch(Zr){case e:return Ri;case 34:case 39:e!==34&&e!==39&&l1(Zr);break;case 40:e===41&&l1(e);break;case 92:Vi();break}return Ri}function MG(e,t){for(;Vi()&&e+Zr!==57;)if(e+Zr===84&&ka()===47)break;return"/*"+Hh(t,Ri-1)+"*"+Mg(e===47?e:Vi())}function LG(e){for(;!nh(ka());)Vi();return Hh(e,Ri)}function zG(e){return BI(Wm("",null,null,null,[""],e=UI(e),0,[0],e))}function Wm(e,t,r,n,i,o,a,s,l){for(var u=0,d=0,f=a,h=0,p=0,m=0,g=1,v=1,_=1,x=0,S="",E=i,k=o,R=n,T=S;v;)switch(m=x,x=Vi()){case 40:if(m!=108&&zn(T,f-1)==58){s1(T+=jt(Hm(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:T+=Hm(x);break;case 9:case 10:case 13:case 32:T+=PG(m);break;case 92:T+=OG(Km()-1,7);continue;case 47:switch(ka()){case 42:case 47:zp(UG(MG(Vi(),Km()),t,r),l);break;default:T+="/"}break;case 123*g:s[u++]=ga(T)*_;case 125*g:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+d:_==-1&&(T=jt(T,/\f/g,"")),p>0&&ga(T)-f&&zp(p>32?hC(T+";",n,r,f-1):hC(jt(T," ","")+";",n,r,f-2),l);break;case 59:T+=";";default:if(zp(R=fC(T,t,r,u,d,i,s,S,E=[],k=[],f),o),x===123)if(d===0)Wm(T,t,R,R,E,o,f,s,k);else switch(h===99&&zn(T,3)===110?100:h){case 100:case 108:case 109:case 115:Wm(e,R,R,n&&zp(fC(e,R,R,0,0,i,s,S,i,E=[],f),k),i,k,f,s,n?E:k);break;default:Wm(T,R,R,R,[""],k,0,s,k)}}u=d=p=0,g=_=1,S=T="",f=a;break;case 58:f=1+ga(T),p=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&IG()==125)continue}switch(T+=Mg(x),x*g){case 38:_=d>0?1:(T+="\f",-1);break;case 44:s[u++]=(ga(T)-1)*_,_=1;break;case 64:ka()===45&&(T+=Hm(Vi())),h=ka(),d=f=ga(S=T+=LG(Km())),x++;break;case 45:m===45&&ga(T)==2&&(g=0)}}return o}function fC(e,t,r,n,i,o,a,s,l,u,d){for(var f=i-1,h=i===0?o:[""],p=yS(h),m=0,g=0,v=0;m<n;++m)for(var _=0,x=rh(e,f+1,f=AG(g=a[m])),S=e;_<p;++_)(S=LI(g>0?h[_]+" "+x:jt(x,/&\f/g,h[_])))&&(l[v++]=S);return zg(e,t,r,i===0?_S:s,l,u,d)}function UG(e,t,r){return zg(e,t,r,OI,Mg(FG()),rh(e,2,-2),0)}function hC(e,t,r,n){return zg(e,t,r,bS,rh(e,0,n),rh(e,n+1,-1),n)}function Nc(e,t){for(var r="",n=yS(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function BG(e,t,r,n){switch(e.type){case RG:if(e.children.length)break;case CG:case bS:return e.return=e.return||e.value;case OI:return"";case MI:return e.return=e.value+"{"+Nc(e.children,n)+"}";case _S:e.value=e.props.join(",")}return ga(r=Nc(e.children,n))?e.return=e.value+"{"+r+"}":""}function jG(e){var t=yS(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function qG(e){return function(t){t.root||(t=t.return)&&e(t)}}function VG(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var GG=function(t,r,n){for(var i=0,o=0;i=o,o=ka(),i===38&&o===12&&(r[n]=1),!nh(o);)Vi();return Hh(t,Ri)},KG=function(t,r){var n=-1,i=44;do switch(nh(i)){case 0:i===38&&ka()===12&&(r[n]=1),t[n]+=GG(Ri-1,r,n);break;case 2:t[n]+=Hm(i);break;case 4:if(i===44){t[++n]=ka()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Mg(i)}while(i=Vi());return t},HG=function(t,r){return BI(KG(UI(t),r))},pC=new WeakMap,WG=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!pC.get(n))&&!i){pC.set(t,!0);for(var o=[],a=HG(r,o),s=n.props,l=0,u=0;l<a.length;l++)for(var d=0;d<s.length;d++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},JG=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function jI(e,t){switch($G(e,t)){case 5103:return Bt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Bt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Bt+e+y0+e+Wn+e+e;case 6828:case 4268:return Bt+e+Wn+e+e;case 6165:return Bt+e+Wn+"flex-"+e+e;case 5187:return Bt+e+jt(e,/(\w+).+(:[^]+)/,Bt+"box-$1$2"+Wn+"flex-$1$2")+e;case 5443:return Bt+e+Wn+"flex-item-"+jt(e,/flex-|-self/,"")+e;case 4675:return Bt+e+Wn+"flex-line-pack"+jt(e,/align-content|flex-|-self/,"")+e;case 5548:return Bt+e+Wn+jt(e,"shrink","negative")+e;case 5292:return Bt+e+Wn+jt(e,"basis","preferred-size")+e;case 6060:return Bt+"box-"+jt(e,"-grow","")+Bt+e+Wn+jt(e,"grow","positive")+e;case 4554:return Bt+jt(e,/([^-])(transform)/g,"$1"+Bt+"$2")+e;case 6187:return jt(jt(jt(e,/(zoom-|grab)/,Bt+"$1"),/(image-set)/,Bt+"$1"),e,"")+e;case 5495:case 3959:return jt(e,/(image-set\([^]*)/,Bt+"$1$`$1");case 4968:return jt(jt(e,/(.+:)(flex-)?(.*)/,Bt+"box-pack:$3"+Wn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Bt+e+e;case 4095:case 3583:case 4068:case 2532:return jt(e,/(.+)-inline(.+)/,Bt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ga(e)-1-t>6)switch(zn(e,t+1)){case 109:if(zn(e,t+4)!==45)break;case 102:return jt(e,/(.+:)(.+)-([^]+)/,"$1"+Bt+"$2-$3$1"+y0+(zn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~s1(e,"stretch")?jI(jt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(zn(e,t+1)!==115)break;case 6444:switch(zn(e,ga(e)-3-(~s1(e,"!important")&&10))){case 107:return jt(e,":",":"+Bt)+e;case 101:return jt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Bt+(zn(e,14)===45?"inline-":"")+"box$3$1"+Bt+"$2$3$1"+Wn+"$2box$3")+e}break;case 5936:switch(zn(e,t+11)){case 114:return Bt+e+Wn+jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Bt+e+Wn+jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Bt+e+Wn+jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Bt+e+Wn+e+e}return e}var QG=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case bS:t.return=jI(t.value,t.length);break;case MI:return Nc([Yd(t,{value:jt(t.value,"@","@"+Bt)})],i);case _S:if(t.length)return DG(t.props,function(o){switch(NG(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Nc([Yd(t,{props:[jt(o,/:(read-\w+)/,":"+y0+"$1")]})],i);case"::placeholder":return Nc([Yd(t,{props:[jt(o,/:(plac\w+)/,":"+Bt+"input-$1")]}),Yd(t,{props:[jt(o,/:(plac\w+)/,":"+y0+"$1")]}),Yd(t,{props:[jt(o,/:(plac\w+)/,Wn+"input-$1")]})],i)}return""})}},YG=[QG],XG=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||YG,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;s.push(g)});var l,u=[WG,JG];{var d,f=[BG,qG(function(g){d.insert(g)})],h=jG(u.concat(i,f)),p=function(v){return Nc(zG(v),h)};l=function(v,_,x,S){d=x,p(v?v+"{"+_.styles+"}":_.styles),S&&(m.inserted[_.name]=!0)}}var m={key:r,sheet:new kG({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function ZG(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var eK={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},tK=/[A-Z]|^ms/g,rK=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qI=function(t){return t.charCodeAt(1)===45},mC=function(t){return t!=null&&typeof t!="boolean"},A_=VG(function(e){return qI(e)?e:e.replace(tK,"-$&").toLowerCase()}),gC=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(rK,function(n,i,o){return Qs={name:i,styles:o,next:Qs},i})}return eK[t]!==1&&!qI(t)&&typeof r=="number"&&r!==0?r+"px":r};function x0(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Qs={name:i.name,styles:i.styles,next:Qs},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Qs={name:a.name,styles:a.styles,next:Qs},a=a.next;var s=o.styles+";";return s}return nK(e,t,r)}}var l=r;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function nK(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=x0(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":mC(s)&&(n+=A_(o)+":"+gC(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)mC(a[l])&&(n+=A_(o)+":"+gC(o,a[l])+";");else{var u=x0(e,t,a);switch(o){case"animation":case"animationName":{n+=A_(o)+":"+u+";";break}default:n+=o+"{"+u+"}"}}}return n}var vC=/label:\s*([^\s;{]+)\s*(;|$)/g,Qs;function T_(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Qs=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=x0(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=x0(r,t,e[s]),n){var l=o;i+=l[s]}vC.lastIndex=0;for(var u="",d;(d=vC.exec(i))!==null;)u+="-"+d[1];var f=ZG(i)+u;return{name:f,styles:i,next:Qs}}function VI(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var iK=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},oK=function(t,r,n){iK(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function _C(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function bC(e,t,r){var n=[],i=VI(e,n,r);return n.length<2?r:i+t(n)}var aK=function(t){var r=XG(t);r.sheet.speedy=function(s){this.isSpeedy=s},r.compat=!0;var n=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=T_(u,r.registered,void 0);return oK(r,f),r.key+"-"+f.name},i=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=T_(u,r.registered),h="animation-"+f.name;return _C(r,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=T_(u,r.registered);_C(r,f)},a=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return bC(r.registered,n,sK(u))};return{css:n,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){r.inserted[u]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:VI.bind(null,r.registered),merge:bC.bind(null,r.registered,n)}},sK=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},Ug=aK({key:"css"}),lK=Ug.cx,Bg=Ug.injectGlobal,GI=Ug.keyframes,uK=Ug.css;function cK(e,t){Bg(t)}function dK(e,t){Bg(Ye([[e,t]]))}function fK(e,t,r){Bg(Ye([[t,r]]))}function hK(e){return GI(e)}function pK(e,t){return GI(t)}let jg=wV({injectRaw:e=>{Bg(e)},renderRaw:cK,injectRules:dK,renderRules:fK,make:e=>uK(e),mergeStyles:e=>lK(e),makeKeyframes:hK,renderKeyframes:pK}),c=sG,X=kV,KI=CV,xS=$V,Ce=NV,z=DV,ve=FV,Vn=IV,$n=PV,ei=OV,HI=MV,Xe=LV,vd=zV,mK=UV,gK=BV,on=jV,vK=qV,Wh=VV,WI=GV,Yo=KV,Jh=HV,_K=WV,bK=JV,yK=QV,SS=YV,is=XV,xs=ZV,xK=eG,SK=tG,wK=rG,Ft=nG,Rl=iG,Fa=oG,Ss=aG,JI=lG,Xo=uG,EK=cG,lr=fG,wS=dG,QI=hG,ws=pG,YI=mG,je=gG,XI=vG,kK=_G,Re=bG,CK=xG,RK=SG,AK=RV,TK=AV,$K=TV,NK=xV,DK=jg.global,w=jg.style,zr=jg.merge,FK=jg.keyframes,y={background:"--rv-color-background",surface:"--rv-color-surface",surfaceSubtle:"--rv-color-surface-subtle",surfaceElevated:"--rv-color-surface-elevated",brand:"--rv-color-brand",brandSubtle:"--rv-color-brand-subtle",success:"--rv-color-success",warning:"--rv-color-warning",error:"--rv-color-error",info:"--rv-color-info",textPrimary:"--rv-color-text-primary",textSecondary:"--rv-color-text-secondary",textDisabled:"--rv-color-text-disabled",textOnBrand:"--rv-color-text-on-brand",border:"--rv-color-border",borderSubtle:"--rv-color-border-subtle"},I={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},$={fontFamily:"--rv-font-family",fontFamilyMono:"--rv-font-family-mono",sizeXs:"--rv-font-size-xs",sizeSm:"--rv-font-size-sm",sizeMd:"--rv-font-size-md",sizeLg:"--rv-font-size-lg",sizeXl:"--rv-font-size-xl",sizeXxl:"--rv-font-size-xxl",weightNormal:"--rv-font-weight-normal",weightMedium:"--rv-font-weight-medium",weightBold:"--rv-font-weight-bold",lineHeightTight:"--rv-line-height-tight",lineHeightNormal:"--rv-line-height-normal",lineHeightRelaxed:"--rv-line-height-relaxed"},Y={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},kn={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function fo(e){return"var("+e+")"}let IK=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap",fo(I.md)),Vn(1),c("min-height","200px"),Fa("center"),c("padding",fo(I.xxl))]),PK=w([c("font-size","40px"),c("color",fo(y.textDisabled)),c("line-height","1")]),OK=w([c("color",fo(y.textPrimary)),c("font-size",fo($.sizeLg)),c("font-weight",fo($.weightMedium)),on(Re(0))]),MK=w([c("color",fo(y.textSecondary)),c("font-size",fo($.sizeMd)),c("max-width","360px"),on(Re(0))]),LK=w([c("background",fo(y.brand)),c("color",fo(y.textOnBrand)),c("border","none"),c("border-radius",fo(Y.md)),c("padding","var("+I.sm+") var("+I.lg+")"),c("font-size",fo($.sizeMd)),c("cursor","pointer"),Yo(Re(8))]);function zK(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[b("div",{children:"( )",className:PK}),b("h3",{children:r,className:OK}),fe(e.description,null,n=>b("p",{children:n,className:MK})),fe(e.action,null,n=>{let i=n[1];return b("button",{children:n[0],className:LK,onClick:o=>i()})})],className:IK})}let _d=zK;function wi(e){return"var("+e+")"}let UK=w([Xo({NAME:"percent",VAL:100}),c("border-collapse","collapse"),c("font-size",wi($.sizeMd))]),BK=w([c("background",wi(y.surfaceSubtle)),c("border-bottom","2px solid var("+y.border+")")]),yC=w([c("padding","var("+I.xs+") var("+I.sm+")"),c("color",wi(y.textSecondary)),c("font-weight",wi($.weightMedium)),c("font-size",wi($.sizeSm)),c("text-align","left"),c("white-space","nowrap"),c("user-select","none")]),jK=w([c("padding","var("+I.sm+") var("+I.md+")"),c("font-size",wi($.sizeMd))]),qK=w([Ce("pointer"),je([c("color",wi(y.textPrimary))])]),VK=w([c("color",wi(y.textPrimary))]),GK=w([Wh(Re(4)),c("font-size",wi($.sizeXs)),c("color",wi(y.brand))]),xC=w([c("border-bottom","1px solid var("+y.borderSubtle+")"),je([c("background",wi(y.surfaceSubtle))])]),KK=w([c("min-height","44px")]),HK=w([Ce("pointer")]),WK=w([c("background",wi(y.surfaceSubtle)),c("box-shadow","inset 3px 0 0 0 var("+y.brand+")")]),SC=w([c("padding","var("+I.xs+") var("+I.sm+")"),c("color",wi(y.textPrimary)),c("vertical-align","middle")]),JK=w([c("padding","var("+I.sm+") var("+I.md+")")]),QK=w([Fa("center"),c("padding",wi(I.xxl))]);function YK(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?yC+" "+jK:yC;return b("thead",{children:b("tr",{children:e.columns.map(i=>{let o=fe(r,!1,l=>l.key===i.key),a=fe(r,"Asc",l=>l.direction),s=i.sortable?n+" "+qK+(o?" "+VK:""):n;return L("th",{children:[i.label,o?b("span",{children:a==="Asc"?"^":"v",className:GK}):null],className:s,style:fe(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return re(t,u=>{let d=o&&a==="Asc"?"Desc":"Asc";u(i.key,d)})}},i.key)})}),className:BK})}function XK(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,a=e.columns,s=r!==void 0?r:"Compact",l=s==="Comfortable"?SC+" "+JK:SC,u=s==="Comfortable"?xC+" "+KK:xC;return L("table",{children:[b(YK,{columns:a,sortState:e.sortState,onSort:e.onSort,density:s}),b("tbody",{children:o.length===0?b("tr",{children:b("td",{children:F(e.emptyView,b(_d,{title:"No data"})),className:l+" "+QK,colSpan:a.length})}):o.map(d=>{let f=i(d),h=fe(n,u,m=>u+" "+HK),p=Ne(t,f)?h+" "+WK:h;return b("tr",{children:a.map(m=>b("td",{children:m.render(d),className:l},m.key)),className:p,onClick:m=>re(n,g=>g(d))},f)})})],className:UK})}let S0=XK;function w0(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function ZK(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function eH(e){let t=ee(e,i=>{if(typeof i=="object")return i._0});if(t.length===0)return e.length===0||e.some(i=>i===void 0)?void 0:"Complete";let r=t.some(i=>i!=="FromStart"),n=t.some(i=>i!=="ToEnd");return{TAG:"Partial",_0:r?n?"Between":"ToEnd":"FromStart"}}function wC(e,t){return e.toString()+" "+t+(e===1?"":"s")}function ZI(e,t,r,n){let i=n!==void 0?n:"item",o=F(r,t),a=o===t?wC(o,i):o.toString()+" of "+wC(t,i);if(e===void 0)return"Showing the "+a+" loaded";if(typeof e!="object")return"Showing all "+a;switch(e._0){case"FromStart":return"Showing the first "+a+" — more available";case"Between":return"Showing "+a+" — more before and after";case"ToEnd":return"Showing the last "+a+" — more before"}}function eP(e,t){return t?e+"+":e}function tH(e){return typeof e=="object"}function tP(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let rP=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function rH(e){let t={contents:5381};return e.split("").forEach(r=>{let n=F(r.codePointAt(0),0);t.contents=(t.contents*33|0)+n&2147483647}),Ho(t.contents,rP.length)}function nH(e){let t=ee(e.split(/[\s_.@-]+/),o=>o).filter(o=>o!==""),r=o=>o.slice(0,1).toUpperCase(),n=t[0],i=t[1];return n!==void 0?i!==void 0?r(n)+r(i):r(n):"?"}function $_(e){return"var("+e+")"}let iH=w([z("inlineFlex"),X("center"),Xe("center"),c("border-radius",$_(Y.full)),c("color","#ffffff"),c("font-family",$_($.fontFamily)),c("font-weight",$_($.weightMedium)),c("flex-shrink","0"),c("user-select","none"),c("vertical-align","middle"),c("overflow","hidden")]),oH=w([c("width","100%"),c("height","100%"),c("object-fit","cover")]);function aH(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=de(()=>!1),a=o[1],s=tP(i),l=s.toString()+"px",u=r!==void 0?r!==""&&!o[0]:!1,d={background:u?"transparent":rP[rH(n)],fontSize:((s/2|0)-1|0).toString()+"px",height:l,width:l};return b("span",{children:u?b("img",{className:oH,alt:n,src:F(r,""),onError:f=>a(h=>!0)}):nH(n),"aria-label":n,className:iH,role:"img",style:d,title:n})}let bd=aH;function Gs(e){return"var("+e+")"}let sH=w([z("flex"),ei("wrap"),c("gap",Gs(I.xs)),X("center")]),lH=w([z("inlineFlex"),X("center"),c("padding","2px 8px"),c("border-radius",Gs(Y.full)),c("background",Gs(y.surfaceElevated)),c("color",Gs(y.textSecondary)),c("font-size",Gs($.sizeXs)),c("font-weight",Gs($.weightMedium)),c("line-height","1.5"),c("white-space","nowrap")]),uH=w([c("color",Gs(y.textDisabled)),c("font-size",Gs($.sizeSm))]);function cH(e){let t=e.items;return t.length===0?b("span",{children:"—",className:uH}):b("div",{children:t.map((r,n)=>b("span",{children:r,className:lH},n.toString()+":"+r)),className:sH})}let nP=cH;function Gl(e){return"var("+e+")"}let EC=w([z("inlineFlex"),X("center"),c("gap","4px"),c("background","transparent"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Gl(Y.sm)),c("padding","1px 6px"),c("color",Gl(y.textSecondary)),c("font-size",Gl($.sizeXs)),c("line-height","1"),Ce("pointer"),je([c("background",Gl(y.surfaceElevated)),c("color",Gl(y.textPrimary))])]),dH=w([c("color",Gl(y.success)),c("border-color",Gl(y.success))]);function fH(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=de(()=>!1),o=i[1],a=i[0],s=u=>{u.stopPropagation(),u.preventDefault(),$t(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=a?EC+" "+dH:EC;return b("button",{children:a?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:s})}let hH=fH;function E0(e){return"var("+e+")"}let pH=w([z("inlineFlex"),X("center"),c("gap",E0(I.xs)),c("min-width","0")]),mH=w([c("color",E0(y.brand)),c("text-decoration","none"),c("max-width","260px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),je([c("text-decoration","underline")])]),gH=w([c("color",E0(y.textPrimary)),c("font-family","var(--rv-font-mono, ui-monospace, monospace)"),c("font-size",E0($.sizeSm)),c("max-width","200px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]);function vH(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function _H(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,a=Cl();return L("span",{children:[i!==void 0?b("a",{children:n,className:mH,title:n,href:i,onClick:l=>{if(!(l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.button!==0)&&i!==void 0)return l.preventDefault(),l.stopPropagation(),a(i)}}):b("span",{children:vH(n,18),className:gH,title:r}),o?b(hH,{value:r}):null],className:pH})}let bH=_H;function Xa(e){return"var("+e+")"}let kC=w([z("inlineFlex"),X("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",Xa(Y.full)),c("background",Xa(y.surfaceElevated)),c("color",Xa(y.textSecondary)),c("font-size",Xa($.sizeXs)),c("font-weight",Xa($.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("border","none")]),yH=w([Ce("pointer"),je([c("background",Xa(y.surface)),c("color",Xa(y.textPrimary))])]),xH=w([c("font-weight",Xa($.weightBold)),c("color",Xa(y.textPrimary))]);function SH(e){let t=e.onClick,r=fe(t,kC,i=>kC+" "+yH),n=L(Lr,{children:[b("span",{children:e.count.toString(),className:xH})," "+e.label,fe(t,null,i=>b("span",{children:" ▸","aria-hidden":!0}))]});return t!==void 0?b("button",{children:n,className:r,type:"button",onClick:i=>t()}):b("span",{children:n,className:r})}let If=SH;function Xd(e){let t=e.toString();return t.length<2?"0"+t:t}function qg(e){let t=new Date(e),r=t.getTime();if(Number.isNaN(r))return e;let n=t.getFullYear()|0,i=(t.getMonth()|0)+1|0,o=t.getDate()|0,a=t.getHours()|0,s=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+Xd(i)+"-"+Xd(o)+" "+Xd(a)+":"+Xd(s)+":"+Xd(l)}let wH=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function ih(e){if(wH.test(e))return qg(e)}function EH(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function iP(e,t){if(!fe(e,!1,EH))return ih(t)}function kH(e,t){return e>t?e-t|0:0}function pc(e){return"var("+e+")"}let CH=w([z("inlineFlex"),X("center"),c("vertical-align","middle")]),CC=w([z("inlineFlex"),c("border-radius",pc(Y.full)),c("box-shadow","0 0 0 2px var("+y.surface+")")]),RH=w([z("inlineFlex"),X("center"),Xe("center"),c("border-radius",pc(Y.full)),c("background",pc(y.surfaceElevated)),c("color",pc(y.textSecondary)),c("font-family",pc($.fontFamily)),c("font-weight",pc($.weightMedium)),c("flex-shrink","0"),c("user-select","none")]);function AH(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,a=kH(n.length,o),s=a>0?n.slice(0,o):n,l=a>0?n.slice(o):[],u=tP(i),d=(-u|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((s.length+1|0)-h|0).toString()});return L("span",{children:[s.map((h,p)=>b("span",{children:b(bd,{name:h.name,src:h.imageUrl,size:i}),className:CC,style:f(p)},p.toString())),a>0?b("span",{children:"+"+a.toString(),className:CC+" "+RH,style:{fontSize:((u/2|0)-2|0).toString()+"px",height:u.toString()+"px",marginLeft:d.toString()+"px",width:u.toString()+"px",zIndex:(s.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:CH})}let oP=AH;function N_(e){return"var("+e+")"}function TH(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[y.success,y.background];case"Warning":return[y.warning,y.background];case"Error":return[y.error,y.background];case"Info":return[y.info,y.background];case"Neutral":return[y.surfaceElevated,y.textSecondary]}}function $H(e,t){return w([z("inlineFlex"),X("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",N_(Y.full)),c("font-size",N_($.sizeXs)),c("font-weight",N_($.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("background",e.startsWith("--rv-")?"var("+e+")":e),c("color",t.startsWith("--rv-")?"var("+t+")":t)])}function NH(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=TH(n);return L("span",{children:[i?b("span",{style:{background:"currentColor",display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}):null,e.label],className:$H(o[0],o[1])})}let ds=NH,aP=ar(void 0),DH=aP.Provider;function FH(e){return br(DH,{value:e.fill,children:e.children})}let sP={make:FH};function IH(e){return C(At(aP),t=>t(e))}function fs(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}function PH(e){return G(e.plugin,t=>t+"."+e.store)}let lP={isId:!1,isCompositeId:!1,isSubId:!1,isCompositeSubId:!1,index:void 0,hidden:!1,summary:!1,groupBy:!1,drillTarget:void 0,collapsed:!1,scan:!1,scanSort:!1,semantic:void 0,semanticFromType:!1,storeTarget:void 0,channel:void 0,setter:void 0};function ca(e,t){let r=G(M(e,t),et);return r==="JSONTrue"&&typeof r!="object"}function Zd(e,t){return C(M(e,t),ce)}function OH(e){return C(C(M(e,"x-reventless-semantic-target"),H),t=>G(C(M(t,"store"),ce),r=>({plugin:C(M(t,"plugin"),ce),store:r})))}function MH(e){return C(C(M(e,"x-reventless-setter"),H),t=>G(C(M(t,"command"),ce),r=>({command:r,field:C(M(t,"field"),ce)})))}function LH(e){let t=G(M(e,"x-reventless-index"),et);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function zH(e){let t=H(e);if(t===void 0)return;let r=H(cn(e));if(r===void 0||r===t)return t;let n=Ye(Pe(r));return Pe(t).forEach(i=>{n[i[0]]=i[1]}),n}function Ta(e){let t=zH(e);return t!==void 0?{isId:ca(t,"x-reventless-id"),isCompositeId:ca(t,"x-reventless-compositeId"),isSubId:ca(t,"x-reventless-subId"),isCompositeSubId:ca(t,"x-reventless-compositeSubId"),index:LH(t),hidden:ca(t,"x-reventless-hidden"),summary:ca(t,"x-reventless-summary"),groupBy:ca(t,"x-reventless-group-by"),drillTarget:G(Zd(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:Zd(t,"x-reventless-drillTargetKey")})),collapsed:ca(t,"x-reventless-collapsed"),scan:ca(t,"x-reventless-scan"),scanSort:ca(t,"x-reventless-scanSort"),semantic:Zd(t,"x-reventless-semantic"),semanticFromType:Ne(Zd(t,"x-reventless-semantic-source"),"type"),storeTarget:OH(t),channel:Zd(t,"x-reventless-channel"),setter:MH(t)}:lP}function Qh(e,t){return F(G(C(C(H(e),r=>M(r,"properties")),H),r=>ee(Pe(r),n=>{if(t(Ta(n[1])))return n[0]})),[])}function UH(e){return F(G(C(C(H(e),t=>M(t,"properties")),H),t=>ee(Pe(t),r=>{let n=r[0];return C(C(C(H(r[1]),i=>M(i,"x-reventless-metric")),H),i=>{let o=C(M(i,"aggregate"),ce),a=C(M(i,"label"),ce);return G(o,s=>[n,s,a])})})),[])}function Vg(e){return Qh(e,t=>t.summary)}function BH(e){return Qh(e,t=>t.isId)[0]}function jH(e){return Qh(e,t=>t.groupBy)[0]}function ES(e){return Qh(e,t=>t.isCompositeId)}function kS(e){return Qh(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function qH(e){return C(C(H(e),t=>M(t,"x-reventless-live")),t=>{let r=et(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function VH(e){return F(qH(e),!0)}function uP(e){return C(C(H(e),t=>M(t,"x-reventless-viewmode")),ce)}function GH(e){return C(C(H(e),t=>M(t,"x-reventless-layout")),ce)}function KH(e){let t=H(e),r=n=>F(C(C(C(C(C(C(t,i=>M(i,"properties")),H),i=>M(i,n)),H),i=>M(i,"title")),ce),vt(n));return C(C(C(t,n=>M(n,"x-reventless-owner-unscoped")),H),n=>G(C(M(n,"field"),ce),i=>({ownerLabel:r(i),matchedGroups:fe(C(M(n,"as"),Vt),[],o=>ee(o,ce))})))}function Fu(e){return C(G(C(C(H(cn(e)),t=>M(t,"enum")),Vt),t=>ee(t,ce)),t=>{if(t.length!==0)return t})}function Zo(e,t){return F(C(C(C(C(H(e),r=>M(r,"properties")),H),r=>M(r,t)),Fu),[])}function yd(e){switch(e){case"Email":return"email";case"Phone":return"phone";case"Url":return"url";case"DateTime":return"date-time";case"Currency":return"currency";case"Percent":return"percent";case"Bytes":return"bytes";case"Duration":return"duration";case"Color":return"color";case"Image":return"image";case"Status":return"status";case"GeoLat":return"geo-lat";case"GeoLng":return"geo-lng";case"GeoPoint":return"geo-point";case"Label":return"label";case"UserRef":return"user-ref";case"File":return"file";case"Markdown":return"markdown";case"ChannelText":return"channel-text";case"Rating":return"rating";case"Progress":return"progress";case"FileUrl":return"file-url";case"Country":return"country";case"Address":return"address";case"Qr":return"qr";case"Barcode":return"barcode";case"Signature":return"signature";case"ParentRef":return"parent-ref";case"Money":return"money";case"DateRange":return"date-range"}}let HH=["Email","Phone","Url","DateTime","Currency","Percent","Bytes","Duration","Color","Image","Status","GeoLat","GeoLng","GeoPoint","Label","UserRef","File","Markdown","ChannelText","Rating","Progress","FileUrl","Country","Address","Qr","Barcode","Signature","ParentRef","Money","DateRange"],WH="storageRef";function CS(e){switch(e){case"address":return"Address";case"barcode":return"Barcode";case"bytes":return"Bytes";case"channel-text":return"ChannelText";case"color":return"Color";case"country":return"Country";case"currency":return"Currency";case"date-time":return"DateTime";case"date-range":case"dateRange":return"DateRange";case"duration":return"Duration";case"email":return"Email";case"file":return"File";case"file-url":return"FileUrl";case"geo-lat":return"GeoLat";case"geo-lng":return"GeoLng";case"geo-point":case"geoPoint":return"GeoPoint";case"image":return"Image";case"label":return"Label";case"markdown":return"Markdown";case"money":return"Money";case"parent-ref":return"ParentRef";case"percent":return"Percent";case"phone":return"Phone";case"progress":return"Progress";case"qr":return"Qr";case"rating":return"Rating";case"signature":return"Signature";case"status":return"Status";case"url":return"Url";case"user-ref":return"UserRef";default:return}}function cP(e){switch(e){case"Image":return["Illustrable"];case"Status":return["Stageable"];case"GeoPoint":return["Mappable"];case"ParentRef":return["Hierarchical"];case"Money":return["Measure"];case"DateRange":return["Schedulable"];default:return[]}}function dP(e,t){return C(C(M(e,t),ce),r=>{if(r!=="")return r})}function fP(e,t,r){return C(C(C(C(M(e,t),H),n=>M(n,r)),ce),n=>{if(n!=="")return n})}function Iu(e,t){return e.TAG==="Pair"?dP(t,e.startField):fP(t,e._0,"start")}function RS(e,t){if(e.TAG!=="Pair")return fP(t,e._0,"end");let r=e.endField;if(r!==void 0)return dP(t,r)}function hP(e){return e.TAG==="Pair"?e.endField!==void 0:!0}function RC(e,t){let r=M(e,t);if(r===void 0)return;let n=Ji(r);return n!==void 0?n:C(ce(r),fs)}function AC(e,t,r){return C(C(C(M(e,t),H),n=>M(n,r)),Ji)}function Lje(e,t){let r;if(e.TAG==="Paired")r=[RC(t,e.latField),RC(t,e.lngField)];else{let o=e._0;r=[AC(t,o,"lat"),AC(t,o,"lng")]}let n=r[1],i=r[0];if(i!==void 0&&n!==void 0)return[i,n]}function Dr(e){return F(G(C(C(H(cn(e)),t=>M(t,"properties")),H),Pe),[]).map(t=>[t[0],cn(t[1])])}function Or(e,t){return C(C(H(cn(e)),r=>M(r,t)),ce)}function JH(e){return Or(e,"type")}function hs(e){let t=Or(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function Yh(e){return Ne(Or(e,"type"),"string")}function Gg(e){let t=Or(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let pP=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function mP(e){return pP.includes(e.toLowerCase())}function k0(e,t){return t.some(r=>e.endsWith(r))}function QH(e){return k0(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function YH(e){let t=Or(e,"format");if(t!==void 0)switch(t){case"date":case"date-time":return["DateTime","format:date-time"];case"email":return["Email","format:email"];case"uri":case"url":return["Url","format:uri"];default:return}}function TC(e){return fe(Fu(e),0,t=>t.length)}function oh(e,t){return C(C(H(cn(e)),r=>M(r,t)),Ji)}function XH(e,t){if(!hs(t))return;let r=oh(t,"maximum");return["rating","stars","starrating"].includes(e)?r!==void 0&&r>10?void 0:["Rating","name:rating"]:e==="score"&&r!==void 0&&r<=10?["Rating","name:score-scale"]:void 0}let ZH=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function eW(e){let t=Dr(e),r=(n,i)=>t.some(o=>o[0].toLowerCase()===n?i(o[1]):!1);return r("amount",hs)?r("currency",Yh):!1}function tW(e){let t=Dr(e),r=n=>t.some(i=>{let o=i[1];return i[0].toLowerCase()===n&&Ne(Or(o,"type"),"string")?Gg(o):!1});return r("start")?r("end"):!1}function rW(e){let t=Dr(e);return ZH.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let nW=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function iW(e){return nW.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function oW(e,t){let r=e.toLowerCase(),n=XH(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&TC(t)>0?TC(t)<=8?["Status","name:status-enum"]:void 0:Ne(Or(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:hs(t)&&k0(r,["price","amount","total"])?["Currency","name:currency"]:Ne(Or(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:Ne(Or(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:Ne(Or(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:Ne(Or(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||k0(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:hs(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:Ne(Or(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:Ne(Or(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:Ne(Or(t,"type"),"string")&&iW(r)?["ParentRef","name:parent-ref"]:Ne(Or(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:Ne(Or(t,"type"),"string")&&pP.includes(r)?["UserRef","name:user"]:void 0}function gP(e){return["lat","latitude"].includes(e)}function vP(e){return["lng","lon","long","longitude"].includes(e)}function aW(e){let t=Dr(e),r=t.some(i=>gP(i[0].toLowerCase())?hs(i[1]):!1),n=t.some(i=>vP(i[0].toLowerCase())?hs(i[1]):!1);return r?n:!1}function sW(e){return["createdat","updatedat","deletedat"].includes(e)}let $C={contents:[]};function _P(e,t,r){let n=e+"."+t+"."+r;if($C.contents.some(o=>o===n))return;$C.contents.push(n);let i=HH.map(yd).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function Yc(e,t){let r=cn(t),n=Ta(r),i=n.semanticFromType?"Type":"Annotation",o=Ne(n.semantic,WH),a=C(n.semantic,d=>{if(o)return;let f=CS(d);if(f!==void 0)return{semantic:f,provenance:i};_P("x-reventless-semantic",e,d)});if(a!==void 0)return a;let s=e.toLowerCase(),l=Ne(Or(r,"type"),"object")&&eW(r)?["Money","shape:money"]:Ne(Or(r,"type"),"object")&&tW(r)?["DateRange","shape:date-range"]:Ne(Or(r,"type"),"object")&&rW(r)?["Address","shape:address"]:Ne(Or(r,"type"),"object")&&aW(r)?["GeoPoint","shape:geo-point"]:gP(s)&&hs(r)?["GeoLat","name:geo-pair"]:vP(s)&&hs(r)?["GeoLng","name:geo-pair"]:void 0,u;if(l!==void 0)u=l;else if(Ne(Or(r,"type"),"string")&&QH(s))u=["FileUrl","name:file-url"];else{let d=YH(r);u=d!==void 0?d:oW(e,r)}return Aa(G(u,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function lW(e,t){let r=Yc(e,t);return r!==void 0?r:C(DI(t),n=>Yc(Bj(e),n))}function jn(e,t,r){let n=Dr(e),i={};n.forEach(R=>{let T=R[0],A=C(C(t,N=>M(N,T)),N=>{let P=CS(N);if(P!==void 0)return{semantic:P,provenance:"Hint"};_P("uiHints.fields",T,N)});if(A!==void 0){i[T]=A;return}else return re(Yc(T,R[1]),N=>{i[T]=N})});let o=R=>n.map(T=>T[0]).find(T=>fe(M(i,T),!1,A=>A.semantic===R)),a=R=>n.map(T=>T[0]).find(T=>fe(M(i,T),!1,A=>cP(A.semantic).includes(R))),s=C(Du(r,R=>R.field!=="id"),R=>G(n.find(T=>T[0]===R.field?Ne(Or(T[1],"type"),"string"):!1),T=>T[0])),l=fe(r,!1,R=>Ne(R.source,"annotation")),u=n.map(R=>R[0]).find(R=>fe(M(i,R),!1,T=>T.semantic==="Label"?T.provenance==="Hint":!1)),d;if(u!==void 0)d=u;else{let R=0;if(s!==void 0&&l?d=s:R=1,R===1){let T=o("Label");d=T!==void 0?T:s}}if(d!==void 0&&s!==void 0&&d===s){let T={semantic:"Label",provenance:l?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},A=M(i,d);if(A!==void 0){let N=0,P=A.provenance;(typeof P=="object"||P!=="Hint")&&(N=1),N===1&&A.semantic==="Label"&&(i[d]=T)}else i[d]=T}let f=a("Mappable"),h=o("GeoLat"),p=o("GeoLng"),g=f!==void 0?{TAG:"Pointed",_0:f}:h!==void 0&&p!==void 0?{TAG:"Paired",latField:h,lngField:p}:void 0,v=a("Schedulable"),_=ee(n,R=>{let T=R[0];if(fe(M(i,T),!1,A=>A.semantic==="DateTime")||Gg(R[1]))return T}),x=_.find(R=>R.toLowerCase().startsWith("start")),S=_.find(R=>R.toLowerCase().startsWith("end")),E=x!==void 0?S!==void 0?{TAG:"Pair",startField:x,endField:S}:{TAG:"Pair",startField:x}:G(_.find(R=>{let T=R.toLowerCase();return sW(T)?!1:k0(T,["at","date"])?!0:T==="date"}),R=>({TAG:"Pair",startField:R}));return{semantics:i,geo:g,dateSpan:v!==void 0?{TAG:"Ranged",_0:v}:E,statusField:a("Stageable"),labelField:d,imageField:a("Illustrable"),parentField:a("Hierarchical")}}function uW(e,t){let n=jn(e,t,void 0).semantics;return ee(Dr(e),i=>{let o=i[0];return C(M(n,o),a=>{if(cP(a.semantic).includes("Measure"))return o})})}let bP=ar([]),yP=ar(e=>{}),cW=bP.Provider,dW=yP.Provider;function fW(e){let t=e.initial,r=t!==void 0?t:[],n=de(()=>r),i=n[1],o=tn(a=>i(s=>a),[]);return br(dW,{value:o,children:br(cW,{value:n[0],children:e.children})})}let hW={make:fW};function Ia(){return At(bP)}function pW(){return At(yP)}function mW(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function Es(e,t){let r=mW(t),n=Fg(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function Bs(e,t){return AI(r=>b0(e,b0(encodeURIComponent(t),r)))}function mc(e,t){return b0(e,b0(encodeURIComponent(t),_j))}function ps(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return Ya(mc(e,t))(TI.of_parts(i.join("/")))}function gW(e){let r=TI.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=G(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}var Kl=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Kl||{});const vW=[0,1],xP=[1,0],SP=[2,3],wP=[3,2],_W={L:vW,M:xP,Q:SP,H:wP},bW=/^\d*$/,yW=/^[A-Z0-9 $%*+./:-]*$/,D_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",AS=1,TS=40,NC=3,xW=3,Up=40,SW=10,EP=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],kP=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];let wW=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<AS||t>TS)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const o=Array.from({length:this.size}).fill(!1);for(let s=0;s<this.size;s++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),i===-1){let s=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u<s&&(i=l,s=u),this.applyMask(l)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}size;mask;modules=[];types=[];getModule(t,r){return t>=0&&t<this.size&&r>=0&&r<this.size&&this.modules[r][t]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,Kl.Timing),this.setFunctionModule(n,6,n%2===0,Kl.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),r=t.length;for(let n=0;n<r;n++)for(let i=0;i<r;i++)n===0&&i===0||n===0&&i===r-1||n===r-1&&i===0||this.drawAlignmentPattern(t[n],t[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const r=this.ecc[1]<<3|t;let n=r;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const i=(r<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,Ba(i,o));this.setFunctionModule(8,7,Ba(i,6)),this.setFunctionModule(8,8,Ba(i,7)),this.setFunctionModule(7,8,Ba(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,Ba(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,Ba(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,Ba(i,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let n=0;n<12;n++)t=t<<1^(t>>>11)*7973;const r=this.version<<12|t;for(let n=0;n<18;n++){const i=Ba(r,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,i),this.setFunctionModule(a,o,i)}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){const o=Math.max(Math.abs(i),Math.abs(n)),a=t+i,s=r+n;a>=0&&a<this.size&&s>=0&&s<this.size&&this.setFunctionModule(a,s,o!==2&&o!==4,Kl.Position)}}drawAlignmentPattern(t,r){for(let n=-2;n<=2;n++)for(let i=-2;i<=2;i++)this.setFunctionModule(t+i,r+n,Math.max(Math.abs(i),Math.abs(n))!==1,Kl.Alignment)}setFunctionModule(t,r,n,i=Kl.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==Jm(r,n))throw new RangeError("Invalid argument");const i=kP[n[0]][r],o=EP[n[0]][r],a=Math.floor(u1(r)/8),s=i-a%i,l=Math.floor(a/i),u=[],d=DW(o);for(let h=0,p=0;h<i;h++){const m=t.slice(p,p+l-o+(h<s?0:1));p+=m.length;const g=FW(m,d);h<s&&m.push(0),u.push(m.concat(g))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,m)=>{(h!==l-o||m>=s)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(u1(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){const a=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][a]&&r<t.length*8&&(this.modules[l][a]=Ba(t[r>>>3],7-(r&7)),r++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let n=0;n<this.size;n++){let i;switch(t){case 0:i=(n+r)%2===0;break;case 1:i=r%2===0;break;case 2:i=n%3===0;break;case 3:i=(n+r)%3===0;break;case 4:i=(Math.floor(n/3)+Math.floor(r/2))%2===0;break;case 5:i=n*r%2+n*r%3===0;break;case 6:i=(n*r%2+n*r%3)%2===0;break;case 7:i=((n+r)%2+n*r%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[r][n]&&i&&(this.modules[r][n]=!this.modules[r][n])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[o][u]===a?(s++,s===5?t+=NC:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*Up),a=this.modules[o][u],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*Up}for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][o]===a?(s++,s===5?t+=NC:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*Up),a=this.modules[u][o],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*Up}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const s=this.modules[o][a];s===this.modules[o][a+1]&&s===this.modules[o+1][a]&&s===this.modules[o+1][a+1]&&(t+=xW)}let r=0;for(const o of this.modules)r=o.reduce((a,s)=>a+(s?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*SW,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,r=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,n=[6];for(let i=this.size-7;n.length<t;i-=r)n.splice(1,0,i);return n}}finderPenaltyCountPatterns(t){const r=t[1],n=r>0&&t[2]===r&&t[3]===r*3&&t[4]===r&&t[5]===r;return(n&&t[0]>=r*4&&t[6]>=r?1:0)+(n&&t[6]>=r*4&&t[0]>=r?1:0)}finderPenaltyTerminateAndCount(t,r,n){return t&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(t,r){r[0]===0&&(t+=this.size),r.pop(),r.unshift(t)}};function Za(e,t,r){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function Ba(e,t){return(e>>>t&1)!==0}class $S{constructor(t,r,n){if(this.mode=t,this.numChars=r,this.bitData=n,r<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const EW=[1,10,12,14],kW=[2,9,11,13],CW=[4,8,16,16];function CP(e,t){return e[Math.floor((t+7)/17)+1]}function RP(e){const t=[];for(const r of e)Za(r,8,t);return new $S(CW,e.length,t)}function RW(e){if(!AP(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let r=0;r<e.length;){const n=Math.min(e.length-r,3);Za(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new $S(EW,e.length,t)}function AW(e){if(!TP(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let r;for(r=0;r+2<=e.length;r+=2){let n=D_.indexOf(e.charAt(r))*45;n+=D_.indexOf(e.charAt(r+1)),Za(n,11,t)}return r<e.length&&Za(D_.indexOf(e.charAt(r)),6,t),new $S(kW,e.length,t)}function TW(e){return e===""?[]:AP(e)?[RW(e)]:TP(e)?[AW(e)]:[RP(NW(e))]}function AP(e){return bW.test(e)}function TP(e){return yW.test(e)}function $W(e,t){let r=0;for(const n of e){const i=CP(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function NW(e){e=encodeURI(e);const t=[];for(let r=0;r<e.length;r++)e.charAt(r)!=="%"?t.push(e.charCodeAt(r)):(t.push(Number.parseInt(e.substring(r+1,r+3),16)),r+=2);return t}function u1(e){if(e<AS||e>TS)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}function Jm(e,t){return Math.floor(u1(e)/8)-EP[t[0]][e]*kP[t[0]][e]}function DW(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let r=1;for(let n=0;n<e;n++){for(let i=0;i<t.length;i++)t[i]=c1(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=c1(r,2)}return t}function FW(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,a)=>r[a]^=c1(o,i))}return r}function c1(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r}function IW(e,t,r=1,n=40,i=-1,o=!0){if(!(AS<=r&&r<=n&&n<=TS)||i<-1||i>7)throw new RangeError("Invalid value");let a,s;for(a=r;;a++){const f=Jm(a,t)*8,h=$W(e,a);if(h<=f){s=h;break}if(a>=n)throw new RangeError("Data too long")}for(const f of[xP,SP,wP])o&&s<=Jm(a,f)*8&&(t=f);const l=[];for(const f of e){Za(f.mode[0],4,l),Za(f.numChars,CP(f.mode,a),l);for(const h of f.getData())l.push(h)}const u=Jm(a,t)*8;Za(0,Math.min(4,u-l.length),l),Za(0,(8-l.length%8)%8,l);for(let f=236;l.length<u;f^=253)Za(f,8,l);const d=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new wW(a,t,d,i)}function PW(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:a=-1,border:s=1}=t||{},l=typeof e=="string"?TW(e):Array.isArray(e)?[RP(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=IW(l,_W[r],i,o,a,n),d=OW({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},s);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function OW(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let a=0;a<t;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},a=>!1)),e.data.push(Array.from({length:n},a=>!1));const i=Kl.Border;e.types.forEach(o=>{for(let a=0;a<t;a++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},a=>i)),e.types.push(Array.from({length:n},a=>i));return e}function MW(e){return"var("+e+")"}let LW=w([z("inlineBlock"),c("background","#ffffff"),c("padding","6px"),c("border-radius",MW(Y.md)),c("border","1px solid var("+y.borderSubtle+")"),c("line-height","0")]),zW=w([c("color","#000000"),c("display","block")]);function UW(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function BW(e){if(e.trim()!=="")try{return PW(e,{ecc:"M",border:4})}catch{return}}function jW(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=BW(r);if(i===void 0)return null;let o=i.size.toString();return b("span",{children:b("svg",{children:b("path",{d:UW(i.data),fill:"currentColor"}),"aria-label":F(e.title,"QR code for "+r),className:zW,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:LW})}let qW=jW,VW=["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","1100011101011"];function DC(e){return e>="0"?e<="9":!1}function GW(e){let t=[],r=0,n=e.length;for(;r<n;)if(DC(F(e[r],""))){let i=r;for(;r<n&&DC(F(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function KW(e){let t={};return GW(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,a=n-o|0;if(a<=0)return;let s=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(a/2|0)|0)+(s?0:1)|0)<n){t[(i+o|0).toString()]=a;return}}),t}function HW(e){let t=e.length;if(t===0||e.split("").some(l=>{let u=F(l.codePointAt(0),0);return u<32?!0:u>126}))return;let n=KW(e),i=[],o=De(n[0]);i.push(o?105:104);let a=o?"C":"B",s=0;for(;s<t;){let l=n[s.toString()];if(l!==void 0){a!=="C"&&(i.push(99),a="C");for(let u=0,d=l/2|0;u<d;++u){let f=e.substring(s+(u<<1)|0,(s+(u<<1)|0)+2|0);i.push(F(SI(f),0))}s=s+l|0}else a==="C"&&(i.push(100),a="B"),i.push(F(e.codePointAt(s),32)-32|0),s=s+1|0}return i}function WW(e){return G(HW(e),t=>{let r={contents:t[0]};return t.forEach((n,i)=>{if(i>0){r.contents=r.contents+(n*i|0)|0;return}}),t.concat([r.contents%103,106]).map(n=>VW[n]).join("")})}function JW(e,t,r){let n=r.toString(),i=[],o=0,a=e.length;for(;o<a;)if(Ne(e[o],"1")){let s=o;for(;o<a&&Ne(e[o],"1");)o=o+1|0;let l=(o-s|0).toString();i.push("M"+(s+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function QW(e){return"var("+e+")"}let YW=w([z("inlineBlock"),bK({NAME:"percent",VAL:100}),c("overflow-x","auto"),c("background","#ffffff"),c("padding","6px"),c("border-radius",QW(Y.md)),c("border","1px solid var("+y.borderSubtle+")"),c("line-height","0")]),XW=w([c("color","#000000"),c("display","block")]);function ZW(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,a=WW(n);if(a===void 0)return null;let s=a.length+20|0;return b("span",{children:b("svg",{children:b("path",{d:JW(a,10,40),fill:"currentColor"}),"aria-label":F(e.title,"Barcode for "+n),className:XW,role:"img",height:i.toString(),width:(s*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+s.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:YW})}let eJ=ZW;function Qi(e){return"var("+e+")"}let tJ=w([Ft("fixed"),Ss(Re(0)),vd(Re(0)),Rl(Re(0)),xS(Re(0)),c("background","rgba(0,0,0,0.82)"),z("flex"),ve("column"),X("center"),Xe("center"),c("gap",Qi(I.md)),c("padding",Qi(I.lg)),c("z-index","1100")]),rJ=w([c("max-width","min(92vw, 1400px)"),c("max-height","78vh"),c("object-fit","contain"),c("border-radius",Qi(Y.sm)),c("box-shadow",Qi(kn.lg))]),nJ=w([z("flex"),X("center"),c("gap",Qi(I.md)),c("max-width","100%")]),iJ=w([z("flex"),X("center"),c("gap",Qi(I.md)),c("max-width","92vw"),c("color","#f5f5f5"),c("font-size",Qi($.sizeSm))]),oJ=w([c("font-size",Qi($.sizeMd)),c("font-weight",Qi($.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),aJ=w([c("color","#c8c8c8")]),sJ=w([c("font-family",Qi($.fontFamilyMono)),c("color","#c8c8c8")]),$P=w([z("inlineFlex"),X("center"),Xe("center"),c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",Qi(Y.md)),c("color","#f5f5f5"),c("padding","4px var("+I.sm+")"),c("font-size",Qi($.sizeSm)),Ce("pointer"),je([c("background","rgba(255,255,255,0.22)")])]),FC=zr([$P,w([c("width","40px"),c("height","40px"),c("border-radius","50%"),c("font-size",Qi($.sizeLg)),$n(0)])]),lJ=zr([$P,w([Ft("absolute"),Ss(Re(16)),Rl(Re(16)),c("width","32px")])]);function nc(e,t,r){return t===0?0:Ho(Ho(e+r|0,t)+t|0,t)}function uJ(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,a=o>1;$e(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return a?r(nc(n,o,-1)):void 0;case"ArrowRight":return a?r(nc(n,o,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,o]);let s=i[nc(n,o,0)];if(s===void 0)return null;let l=s.title,u=s.caption;return L("div",{children:[b("button",{children:"✕",className:lJ,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[a?b("button",{children:"‹",className:FC,title:"Previous",type:"button",onClick:d=>r(nc(n,o,-1))}):null,b("img",{className:rJ,alt:F(s.title,""),src:s.src}),a?b("button",{children:"›",className:FC,title:"Next",type:"button",onClick:d=>r(nc(n,o,1))}):null],className:nJ,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?b("span",{children:l,className:oJ,title:l}):null,u!==void 0?b("span",{children:u,className:aJ}):null,a?b("span",{children:(nc(n,o,0)+1|0).toString()+" / "+o.toString(),className:sJ}):null,F(e.action,null)],className:iJ,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:tJ,role:"dialog",onClick:d=>t()})}let NP=uJ;function li(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function mo(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function DP(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function Kg(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return mo(li(e),-r|0)}function FP(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function cJ(e){let t=Kg(FP(e));return fl(42,r=>mo(t,r))}function IP(e,t){return li(e)===li(t)}function dJ(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function PP(e,t,r){let n=li(r),i=n+864e5;return e<i?t>=n:!1}function IC(e){let t=e.toString();return t.length<2?"0"+t:t}function OP(e){let t=new Date(e);return IC(t.getHours()|0)+":"+IC(t.getMinutes()|0)}function MP(e){return e===li(e)}let LP=["January","February","March","April","May","June","July","August","September","October","November","December"];function lo(e){let t=new Date(e),r=t.getMonth()|0;return F(LP[r],"")+" "+t.getFullYear().toString()}let NS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function zP(e){return new Date(e).getDate()|0}function ms(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return F(NS[n],"")+" "+(new Date(e).getDate()|0).toString()}function qn(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let UP=864e5;function Ql(e){return"var("+e+")"}function fJ(e){return w([c("width","100%"),c("height",e),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Ql(Y.md)),c("background",Ql(y.surfaceSubtle)),xs("hidden")])}let hJ=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap",Ql(I.sm)),c("height","100%"),c("padding",Ql(I.lg)),c("color",Ql(y.textSecondary)),c("font-size",Ql($.sizeSm)),c("text-align","center")]),pJ=w([c("color",Ql(y.brand)),c("text-decoration","none"),je([c("text-decoration","underline")])]);function mJ(e){return F(F(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function gJ(e){let t=e.height,r=e.title,n=e.src,i=r!==void 0?r:"Document",o=t!==void 0?t:"70vh";return b("object",{children:L("div",{children:["This browser can't display the document inline.",b("a",{children:"Open "+i,className:pJ,href:n,rel:"noopener noreferrer",target:"_blank"})],className:hJ}),"aria-label":i,className:fJ(o),data:n,type:"application/pdf"})}let vJ=gJ;function BP(e){return e==="Small"?"13px":"18px"}let jP="★";function _J(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function hu(e){return"var("+e+")"}function bJ(e){return w([z("inlineFlex"),Ft("relative"),c("font-size",BP(e)),c("line-height","1"),c("letter-spacing","1px"),c("white-space","nowrap"),c("vertical-align","-1px")])}let yJ=w([c("color",hu(y.borderSubtle))]);function xJ(e){return w([Ft("absolute"),c("top","0"),c("left","0"),c("width",(e*100).toString()+"%"),xs("hidden"),c("white-space","nowrap"),c("color",hu(y.warning)),c("pointer-events","none")])}let PC=w([z("inlineFlex"),c("gap","2px"),X("center")]);function SJ(e,t){return w([c("background","none"),c("border","none"),c("padding","0 1px"),c("font-size",BP(t)),c("line-height","1"),Ce("pointer"),c("color",hu(e?y.warning:y.borderSubtle)),c("transition","color 120ms, transform 120ms"),je([c("transform","scale(1.15)")]),lr("&:focus-visible",[c("outline","2px solid var("+y.brand+")"),c("outline-offset","1px"),c("border-radius","2px")])])}let OC=w([c("color",hu(y.textSecondary)),c("font-size",hu($.sizeSm))]),wJ=w([z("inlineFlex"),X("center"),c("gap","6px")]),EJ=w([c("border","1px solid var("+y.error+")"),c("border-radius",hu(Y.sm)),c("padding","2px 4px")]);function kJ(e){return xI(e<=0?0:e,jP).join("")}function CJ(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,a=e.max,s=e.value,l=a!==void 0?a:5,u=o!==void 0?o:"Small",d=i!==void 0?i:!1,f=t!==void 0?t:!1,h=l<=0?5:l,p=kJ(h),m=F(e.label,(Math.round(s*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[fl(h,g=>g+1|0).map(g=>{let v=g<=s;return b("button",{children:jP,"aria-label":g.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:SJ(v,u),title:g.toString()+" of "+h.toString(),type:"button",onBlur:_=>re(r,x=>x()),onClick:_=>{_.stopPropagation(),n(g===s?0:g)}},g.toString())}),d?b("span",{children:s<=0?"—":s.toString(),className:OC}):null],"aria-label":m,className:f?PC+" "+EJ:PC,role:"group"}):L("span",{children:[L("span",{children:[b("span",{children:p,className:yJ}),b("span",{children:p,className:xJ(_J(s,h))})],"aria-label":m,className:bJ(u),role:"img",title:m}),d?b("span",{children:(Math.round(s*10)/10).toString()+" / "+h.toString(),className:OC}):null],className:wJ})}let F_=CJ;function pu(e){return"var("+e+")"}let RJ=w([z("flex"),ve("column"),c("gap","4px")]),AJ=w([z("flex"),Xe("spaceBetween"),c("font-size",pu($.sizeSm))]),TJ=w([c("color",pu(y.textSecondary))]),$J=w([c("color",pu(y.textPrimary)),c("font-weight",pu($.weightMedium))]),NJ=w([c("background",pu(y.surfaceSubtle)),c("border-radius",pu(Y.full)),c("height","8px"),xs("hidden")]);function DJ(e,t){return w([c("background",t!==void 0?t:"var("+y.brand+")"),c("border-radius",pu(Y.full)),c("height","100%"),c("width",e.toString()+"%"),c("transition","width 0.3s ease")])}function FJ(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,a=o<0?0:o;return L("div",{children:[De(r)||i?L("div",{children:[fe(r,null,s=>b("span",{children:s,className:TJ})),i?b("span",{children:Math.round(a).toString()+"%",className:$J}):null],className:AJ}):null,b("div",{children:b("div",{className:DJ(a,e.color)}),className:NJ})],className:RJ})}let qP=FJ,Hg={};function VP(e){Hg[e.id]=e}function GP(e){return M(Hg,e)}let KP={};function IJ(e){return fe(M(Hg,e),KP,t=>t.constraints)}let MC={contents:[]};function PJ(e,t){if(MC.contents.some(n=>n===e))return;MC.contents.push(e);let r=Kh(Hg).map(n=>n.id).join(", ");console.error('[AutoUI] Unknown channel "'+e+'" ('+t+") — falling back to a plain-text preview. Registered channels: "+(r===""?"(none — has the channel adapter's init() run?)":r))}let HP="#111111";function Oo(e){return"var("+e+")"}let LC=w([z("flex"),ve("column"),c("gap",Oo(I.xs))]);function OJ(e){return w([c("background","#ffffff"),c("border",e?"1px solid var("+y.error+")":"1px dashed var("+y.border+")"),c("border-radius",Oo(Y.md)),c("touch-action","none"),c("max-width","100%"),c("width","100%"),c("height","auto"),Ce("crosshair"),c("display","block")])}let MJ=w([c("fill","#9ca3af"),c("font-size","13px"),c("pointer-events","none"),c("user-select","none")]),LJ=w([c("stroke","#e5e7eb"),c("stroke-width","1")]),zC=w([z("flex"),X("center"),c("gap",Oo(I.sm)),c("font-size",Oo($.sizeXs)),c("color",Oo(y.textSecondary))]),UC=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Oo(Y.sm)),c("color",Oo(y.textSecondary)),c("font-size",Oo($.sizeXs)),c("padding","2px 8px"),Ce("pointer"),je([c("border-color",Oo(y.brand)),c("color",Oo(y.brand))])]),zJ=w([c("background","#ffffff"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Oo(Y.md)),c("padding","4px"),c("display","inline-block"),c("line-height","0")]),UJ=w([c("display","block"),c("max-width","100%"),c("height","auto")]);function yi(e){return(Math.round(e*10)/10).toString()}function WP(e){return e.map(t=>yi(t.x)+","+yi(t.y)).join(" ")}function BJ(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let a=o.length===1?o.concat(o):o;return'<polyline points="'+WP(a)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+yi(t)+" "+yi(r)+'" width="'+yi(t)+'" height="'+yi(r)+'"><g fill="none" stroke="'+HP+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function BC(e){return e.trim().startsWith("<svg")}function JP(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function jJ(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function qJ(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,a=e.value,s=n!==void 0?n:480,l=r!==void 0?r:160,u=t!==void 0?t:!1,d=Fe(null),f=de(()=>[]),h=f[1],p=f[0],m=de(()=>!1),g=m[1],v=Fe(!1),_=A=>G(Wi(d.current),N=>{let P=N.getBoundingClientRect(),O=P.width===0?1:s/P.width,D=P.height===0?1:l/P.height;return{x:(A.clientX-P.left)*O,y:(A.clientY-P.top)*D}}),x=A=>o(BJ(A,s,l)),S=A=>{A.preventDefault();let N=_(A);if(N!==void 0)return v.current=!0,re(Wi(d.current),P=>{P.setPointerCapture(A.pointerId)}),h(P=>P.concat([[N]]))},E=A=>{if(!v.current)return;let N=_(A);if(N!==void 0)return h(P=>{let O=P[P.length-1|0];if(O===void 0)return P;let D=O[O.length-1|0];return D!==void 0&&!jJ(N,D)?P:P.slice(0,P.length-1|0).concat([O.concat([N])])})},k=A=>{if(v.current)return v.current=!1,x(p),re(i,N=>N())},R=()=>{h(A=>[]),g(A=>!0),o("")},T=p.length!==0;return a.trim().startsWith("<svg")&&!T&&!m[0]?L("div",{children:[b("span",{children:b("img",{className:UJ,alt:"Signature",src:JP(a)}),className:zJ}),b("div",{children:b("button",{children:"Sign again",className:UC,type:"button",onClick:A=>R()}),className:zC})],className:LC}):L("div",{children:[L("svg",{children:[b("line",{className:LJ,x1:yi(s*.06),x2:yi(s*.94),y1:yi(l*.78),y2:yi(l*.78)}),T?null:b("text",{children:"Sign here",className:MJ,textAnchor:"middle",x:yi(s/2),y:yi(l*.7)}),b("g",{children:p.map((A,N)=>b("polyline",{points:WP(A.length===1?A.concat(A):A)},N.toString())),fill:"none",stroke:HP,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Gt(d),"aria-label":"Signature pad",className:OJ(u),role:"img",onPointerDown:S,onPointerMove:E,onPointerUp:k,onPointerCancel:k,viewBox:"0 0 "+yi(s)+" "+yi(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[T?b("button",{children:"Clear",className:UC,type:"button",onClick:A=>R()}):null,b("span",{children:"Draw your signature above"})],className:zC})],className:LC})}let VJ=qJ;function GJ(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function ho(e){return"var("+e+")"}let KJ=w([z("flex"),ve("column"),c("gap",ho(I.sm))]),HJ=w([z("flex"),c("gap","4px")]),jC=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",ho(Y.sm)),c("color",ho(y.textSecondary)),c("font-size",ho($.sizeXs)),c("padding","2px 8px"),Ce("pointer")]),WJ=w([c("background",ho(y.brandSubtle)),c("border-color",ho(y.brand)),c("color",ho(y.textPrimary))]),JJ=w([Xo({NAME:"percent",VAL:100}),c("min-height","220px"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",ho(Y.sm)),c("background","#ffffff")]),QJ=w([c("margin","0"),c("font-family",ho($.fontFamilyMono)),c("font-size",ho($.sizeXs)),c("line-height",ho($.lineHeightRelaxed)),c("color",ho(y.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]);function YJ(e){let t=e.textAlternative,r=de(()=>!1),n=r[1],i=r[0],o=(l,u,d)=>b("button",{children:l,className:u?jC+" "+WJ:jC,type:"button",onClick:d}),a,s=0;return i&&t!==void 0?a=b("pre",{children:t,className:QJ}):s=1,s===1&&(a=b("iframe",{className:JJ,title:"Email preview",sandbox:"",srcDoc:e.html})),L("div",{children:[t!==void 0?L("div",{children:[o("HTML",!i,l=>n(u=>!1)),o("Plain text",i,l=>n(u=>!0))],className:HJ}):null,a],className:KJ})}function XJ(e,t){return b(YJ,{html:e.body,textAlternative:e.textAlternative})}function ZJ(){VP({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:XJ})}const qC={};function eQ(e){let t=qC[e];if(t)return t;t=qC[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);t.push(n)}for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function Xc(e,t){typeof t!="string"&&(t=Xc.defaultChars);const r=eQ(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,a=n.length;o<a;o+=3){const s=parseInt(n.slice(o+1,o+3),16);if(s<128){i+=r[s];continue}if((s&224)===192&&o+3<a){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const u=s<<6&1984|l&63;u<128?i+="��":i+=String.fromCharCode(u),o+=3;continue}}if((s&240)===224&&o+6<a){const l=parseInt(n.slice(o+4,o+6),16),u=parseInt(n.slice(o+7,o+9),16);if((l&192)===128&&(u&192)===128){const d=s<<12&61440|l<<6&4032|u&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((s&248)===240&&o+9<a){const l=parseInt(n.slice(o+4,o+6),16),u=parseInt(n.slice(o+7,o+9),16),d=parseInt(n.slice(o+10,o+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let f=s<<18&1835008|l<<12&258048|u<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Xc.defaultChars=";/?:@&=+$,#";Xc.componentChars="";const VC={};function tQ(e){let t=VC[e];if(t)return t;t=VC[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function Xh(e,t,r){typeof t!="string"&&(r=t,t=Xh.defaultChars),typeof r>"u"&&(r=!0);const n=tQ(t);let i="";for(let o=0,a=e.length;o<a;o++){const s=e.charCodeAt(o);if(r&&s===37&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(s<128){i+=n[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Xh.defaultChars=";/?:@&=+$,-_.!~*'()#";Xh.componentChars="-_.!~*'()";function DS(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function C0(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const rQ=/^([a-z0-9.+-]+:)/i,nQ=/:[0-9]*$/,iQ=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,oQ=["<",">",'"',"`"," ","\r",`
3
+ `," "],aQ=["{","}","|","\\","^","`"].concat(oQ),sQ=["'"].concat(aQ),GC=["%","/","?",";","#"].concat(sQ),KC=["/","?","#"],lQ=255,HC=/^[+a-z0-9A-Z_-]{0,63}$/,uQ=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,WC={javascript:!0,"javascript:":!0},JC={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function FS(e,t){if(e&&e instanceof C0)return e;const r=new C0;return r.parse(e,t),r}C0.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=iQ.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let a=rQ.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&WC[a])&&(o=o.substr(2),this.slashes=!0)),!WC[a]&&(i||a&&!JC[a])){let u=-1;for(let m=0;m<KC.length;m++)n=o.indexOf(KC[m]),n!==-1&&(u===-1||n<u)&&(u=n);let d,f;u===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",u),f!==-1&&(d=o.slice(0,f),o=o.slice(f+1),this.auth=d),u=-1;for(let m=0;m<GC.length;m++)n=o.indexOf(GC[m]),n!==-1&&(u===-1||n<u)&&(u=n);u===-1&&(u=o.length),o[u-1]===":"&&u--;const h=o.slice(0,u);o=o.slice(u),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let g=0,v=m.length;g<v;g++){const _=m[g];if(_&&!_.match(HC)){let x="";for(let S=0,E=_.length;S<E;S++)_.charCodeAt(S)>127?x+="x":x+=_[S];if(!x.match(HC)){const S=m.slice(0,g),E=m.slice(g+1),k=_.match(uQ);k&&(S.push(k[1]),E.unshift(k[2])),E.length&&(o=E.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>lQ&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),JC[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};C0.prototype.parseHost=function(e){let t=nQ.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const cQ=Object.freeze(Object.defineProperty({__proto__:null,decode:Xc,encode:Xh,format:DS,parse:FS},Symbol.toStringTag,{value:"Module"})),QP=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,YP=/[\0-\x1F\x7F-\x9F]/,dQ=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,IS=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,XP=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,ZP=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,fQ=Object.freeze(Object.defineProperty({__proto__:null,Any:QP,Cc:YP,Cf:dQ,P:IS,S:XP,Z:ZP},Symbol.toStringTag,{value:"Module"})),hQ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),pQ=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var I_;const mQ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),gQ=(I_=String.fromCodePoint)!==null&&I_!==void 0?I_:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function vQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=mQ.get(e))!==null&&t!==void 0?t:e}var yn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(yn||(yn={}));const _Q=32;var Ys;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ys||(Ys={}));function d1(e){return e>=yn.ZERO&&e<=yn.NINE}function bQ(e){return e>=yn.UPPER_A&&e<=yn.UPPER_F||e>=yn.LOWER_A&&e<=yn.LOWER_F}function yQ(e){return e>=yn.UPPER_A&&e<=yn.UPPER_Z||e>=yn.LOWER_A&&e<=yn.LOWER_Z||d1(e)}function xQ(e){return e===yn.EQUALS||yQ(e)}var gn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(gn||(gn={}));var es;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(es||(es={}));class SQ{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=gn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=es.Strict}startEntity(t){this.decodeMode=t,this.state=gn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case gn.EntityStart:return t.charCodeAt(r)===yn.NUM?(this.state=gn.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=gn.NamedEntity,this.stateNamedEntity(t,r));case gn.NumericStart:return this.stateNumericStart(t,r);case gn.NumericDecimal:return this.stateNumericDecimal(t,r);case gn.NumericHex:return this.stateNumericHex(t,r);case gn.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|_Q)===yn.LOWER_X?(this.state=gn.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=gn.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const o=n-r;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(r,o),i),this.consumed+=o}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(d1(i)||bQ(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(d1(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===yn.SEMI)this.consumed+=1;else if(this.decodeMode===es.Strict)return 0;return this.emitCodePoint(vQ(this.result),this.consumed),this.errors&&(t!==yn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],o=(i&Ys.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=wQ(n,i,this.treeIndex+Math.max(1,o),a),this.treeIndex<0)return this.result===0||this.decodeMode===es.Attribute&&(o===0||xQ(a))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&Ys.VALUE_LENGTH)>>14,o!==0){if(a===yn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==es.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&Ys.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~Ys.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case gn.NamedEntity:return this.result!==0&&(this.decodeMode!==es.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case gn.NumericDecimal:return this.emitNumericEntity(0,2);case gn.NumericHex:return this.emitNumericEntity(0,3);case gn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case gn.EntityStart:return 0}}}function eO(e){let t="";const r=new SQ(e,n=>t+=gQ(n));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),r.startEntity(o);const u=r.write(i,s+1);if(u<0){a=s+r.end();break}a=s+u,s=u===0?a+1:a}const l=t+i.slice(a);return t="",l}}function wQ(e,t,r,n){const i=(t&Ys.BRANCH_LENGTH)>>7,o=t&Ys.JUMP_TABLE;if(i===0)return o!==0&&n===o?r:-1;if(o){const l=n-o;return l<0||l>=i?-1:e[r+l]-1}let a=r,s=a+i-1;for(;a<=s;){const l=a+s>>>1,u=e[l];if(u<n)a=l+1;else if(u>n)s=l-1;else return e[l+i]}return-1}const tO=eO(hQ);eO(pQ);function EQ(e,t=es.Legacy){return tO(e,t)}function kQ(e){return tO(e,es.Strict)}function CQ(e){return Object.prototype.toString.call(e)}function PS(e){return CQ(e)==="[object String]"}const RQ=Object.prototype.hasOwnProperty;function AQ(e,t){return RQ.call(e,t)}function Wg(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){e[n]=r[n]})}}),e}function rO(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function OS(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function ah(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const nO=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,TQ=/&([a-z#][a-z0-9]{1,31});/gi,$Q=new RegExp(nO.source+"|"+TQ.source,"gi"),NQ=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function DQ(e,t){if(t.charCodeAt(0)===35&&NQ.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return OS(n)?ah(n):e}const r=EQ(e);return r!==e?r:e}function FQ(e){return e.indexOf("\\")<0?e:e.replace(nO,"$1")}function Zc(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace($Q,function(t,r,n){return r||DQ(t,n)})}const IQ=/[&<>"]/,PQ=/[&<>"]/g,OQ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function MQ(e){return OQ[e]}function hl(e){return IQ.test(e)?e.replace(PQ,MQ):e}const LQ=/[.?*+^$[\]\\(){}|-]/g;function zQ(e){return e.replace(LQ,"\\$&")}function vr(e){switch(e){case 9:case 32:return!0}return!1}function sh(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function iO(e){return IS.test(e)||XP.test(e)}function lh(e){return iO(ah(e))}function uh(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Jg(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function QC(e){return e===32||e===9||e===10||e===13}function Qg(e){let t=0;for(;t<e.length&&QC(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&QC(e.charCodeAt(r));r--);return e.slice(t,r+1)}const UQ={mdurl:cQ,ucmicro:fQ},BQ=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:rO,asciiTrim:Qg,assign:Wg,escapeHtml:hl,escapeRE:zQ,fromCodePoint:ah,has:AQ,isMdAsciiPunct:uh,isPunctChar:iO,isPunctCharCode:lh,isSpace:vr,isString:PS,isValidEntityCode:OS,isWhiteSpace:sh,lib:UQ,normalizeReference:Jg,unescapeAll:Zc,unescapeMd:FQ},Symbol.toStringTag,{value:"Module"}));function jQ(e,t,r){let n,i,o,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),o===91){if(a===e.pos-1)n++;else if(r)return e.pos=l,-1}}let u=-1;return i&&(u=e.pos),e.pos=l,u}function qQ(e,t,r){let n,i=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<r;){if(n=e.charCodeAt(i),n===10||n===60)return o;if(n===62)return o.pos=i+1,o.str=Zc(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let a=0;for(;i<r&&(n=e.charCodeAt(i),!(n===32||n<32||n===127));){if(n===92&&i+1<r){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(n===40&&(a++,a>32))return o;if(n===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Zc(e.slice(t,i)),o.pos=i,o.ok=!0),o}function VQ(e,t,r,n){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o<r;){if(i=e.charCodeAt(o),i===a.marker)return a.pos=o+1,a.str+=Zc(e.slice(t,o)),a.ok=!0,a;if(i===40&&a.marker===41)return a;i===92&&o+1<r&&o++,o++}return a.can_continue=!0,a.str+=Zc(e.slice(t,o)),a}const GQ=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:qQ,parseLinkLabel:jQ,parseLinkTitle:VQ},Symbol.toStringTag,{value:"Module"})),Pa={};Pa.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+hl(o.content)+"</code>"};Pa.code_block=function(e,t,r,n,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+hl(e[t].content)+`</code></pre>
4
+ `};Pa.fence=function(e,t,r,n,i){const o=e[t],a=o.info?Zc(o.info).trim():"";let s="",l="";if(a){const d=a.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let u;if(r.highlight?u=r.highlight(o.content,s,l)||hl(o.content):u=hl(o.content),u.indexOf("<pre")===0)return u+`
5
+ `;if(a){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+s]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+s);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${u}</code></pre>
6
+ `}return`<pre><code${i.renderAttrs(o)}>${u}</code></pre>
7
+ `};Pa.image=function(e,t,r,n,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(e,t,r)};Pa.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
8
+ `:`<br>
9
+ `};Pa.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
10
+ `:`<br>
11
+ `:`
12
+ `};Pa.text=function(e,t){return hl(e[t].content)};Pa.html_block=function(e,t){return e[t].content};Pa.html_inline=function(e,t){return e[t].content};function xd(){this.rules=Wg({},Pa)}xd.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+hl(t.attrs[r][0])+'="'+hl(t.attrs[r][1])+'"';return i};xd.prototype.renderToken=function(t,r,n){const i=t[r];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&t[r-1].hidden&&(o+=`
13
+ `),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let a=!1;if(i.block&&(a=!0,i.nesting===1&&r+1<t.length)){const s=t[r+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===i.tag)&&(a=!1)}return o+=a?`>
14
+ `:">",o};xd.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};xd.prototype.renderInlineAsText=function(e,t,r){let n="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":n+=e[i].content;break;case"image":n+=this.renderInlineAsText(e[i].children,t,r);break;case"html_inline":case"html_block":n+=e[i].content;break;case"softbreak":case"hardbreak":n+=`
15
+ `;break}return n};xd.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;s==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function Ai(){this.__rules__=[],this.__cache__=null}Ai.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Ai.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||e.__cache__[r].push(n.fn))})})};Ai.prototype.at=function(e,t,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null};Ai.prototype.before=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};Ai.prototype.after=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};Ai.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Ai.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!0,r.push(n)},this),this.__cache__=null,r};Ai.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};Ai.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!1,r.push(n)},this),this.__cache__=null,r};Ai.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function ea(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ea.prototype.attrIndex=function(t){if(!this.attrs)return-1;const r=this.attrs;for(let n=0,i=r.length;n<i;n++)if(r[n][0]===t)return n;return-1};ea.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ea.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};ea.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};ea.prototype.attrJoin=function(t,r){const n=this.attrIndex(t);n<0?this.attrPush([t,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function oO(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}oO.prototype.Token=ea;const KQ=/\r\n?|\n/g,HQ=/\0/g;function WQ(e){let t;t=e.src.replace(KQ,`
16
+ `),t=t.replace(HQ,"�"),e.src=t}function JQ(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function QQ(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const i=t[r];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function YQ(e){return/^<a[>\s]/i.test(e)}function XQ(e){return/^<\/a\s*>/i.test(e)}function ZQ(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(YQ(s.content)&&o>0&&o--,XQ(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let u=e.md.linkify.match(l);const d=[];let f=s.level,h=0;u.length>0&&u[0].index===0&&a>0&&i[a-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const m=u[p].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let v=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const _=u[p].index;if(_>h){const k=new e.Token("text","",0);k.content=l.slice(h,_),k.level=f,d.push(k)}const x=new e.Token("link_open","a",1);x.attrs=[["href",g]],x.level=f++,x.markup="linkify",x.info="auto",d.push(x);const S=new e.Token("text","",0);S.content=v,S.level=f,d.push(S);const E=new e.Token("link_close","a",-1);E.level=--f,E.markup="linkify",E.info="auto",d.push(E),h=u[p].lastIndex}if(h<l.length){const p=new e.Token("text","",0);p.content=l.slice(h),p.level=f,d.push(p)}t[r].children=i=rO(i,a,d)}}}}const aO=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,eY=/\((c|tm|r)\)/i,tY=/\((c|tm|r)\)/ig,rY={c:"©",r:"®",tm:"™"};function nY(e,t){return rY[t.toLowerCase()]}function iY(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&(n.content=n.content.replace(tY,nY)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function oY(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&aO.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function aY(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(eY.test(e.tokens[t].content)&&iY(e.tokens[t].children),aO.test(e.tokens[t].content)&&oY(e.tokens[t].children))}const sY=/['"]/,YC=/['"]/g,XC="’";function Bp(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function lY(e,t){let r="",n=0;t.sort((i,o)=>i.pos-o.pos);for(let i=0;i<t.length;i++){const o=t[i];r+=e.slice(n,o.pos)+o.ch,n=o.pos+1}return r+e.slice(n)}function uY(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const a=e[o],s=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,a.type!=="text")continue;const l=a.content;let u=0;const d=l.length;e:for(;u<d;){YC.lastIndex=u;const f=YC.exec(l);if(!f)break;let h=!0,p=!0;u=f.index+1;const m=f[0]==="'";let g=32;if(f.index-1>=0)g=l.charCodeAt(f.index-1);else for(r=o-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){g=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(u<d)v=l.charCodeAt(u);else for(r=o+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const _=uh(g)||lh(g),x=uh(v)||lh(v),S=sh(g),E=sh(v);if(E?h=!1:x&&(S||_||(h=!1)),S?p=!1:_&&(E||x||(p=!1)),v===34&&f[0]==='"'&&g>=48&&g<=57&&(p=h=!1),h&&p&&(h=_,p=x),!h&&!p){m&&Bp(i,o,f.index,XC);continue}if(p)for(r=n.length-1;r>=0;r--){let k=n[r];if(n[r].level<s)break;if(k.single===m&&n[r].level===s){k=n[r];let R,T;m?(R=t.md.options.quotes[2],T=t.md.options.quotes[3]):(R=t.md.options.quotes[0],T=t.md.options.quotes[1]),Bp(i,o,f.index,T),Bp(i,k.token,k.pos,R),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:m,level:s}):p&&m&&Bp(i,o,f.index,XC)}}Object.keys(i).forEach(function(o){e[o].content=lY(e[o].content,i[o])})}function cY(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!sY.test(e.tokens[t].content)||uY(e.tokens[t].children,e)}function dY(e){let t,r;const n=e.tokens,i=n.length;for(let o=0;o<i;o++){if(n[o].type!=="inline")continue;const a=n[o].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=r=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}}const P_=[["normalize",WQ],["block",JQ],["inline",QQ],["linkify",ZQ],["replacements",aY],["smartquotes",cY],["text_join",dY]];function MS(){this.ruler=new Ai;for(let e=0;e<P_.length;e++)this.ruler.push(P_[e][0],P_[e][1])}MS.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};MS.prototype.State=oO;function Oa(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,a=0,s=0,l=0,u=i.length,d=!1;a<u;a++){const f=i.charCodeAt(a);if(!d)if(vr(f)){s++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||a===u-1)&&(f!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),d=!1,s=0,l=0,o=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Oa.prototype.push=function(e,t,r){const n=new ea(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};Oa.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Oa.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Oa.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!vr(n))break}return t};Oa.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!vr(this.src.charCodeAt(--t)))return t+1;return t};Oa.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};Oa.prototype.skipCharsBack=function(t,r,n){if(t<=n)return t;for(;t>n;)if(r!==this.src.charCodeAt(--t))return t+1;return t};Oa.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let a=0,s=t;s<r;s++,a++){let l=0;const u=this.bMarks[s];let d=u,f;for(s+1<r||i?f=this.eMarks[s]+1:f=this.eMarks[s];d<f&&l<n;){const h=this.src.charCodeAt(d);if(vr(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(d-u<this.tShift[s])l++;else break;d++}l>n?o[a]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[a]=this.src.slice(d,f)}return o.join("")};Oa.prototype.Token=ea;const fY=65536;function O_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function ZC(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,a=0,s="";for(;n<r;)i===124&&(o?(s+=e.substring(a,n-1),a=n):(t.push(s+e.substring(a,n)),s="",a=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(s+e.substring(a)),t}function hY(e,t,r,n){if(t+2>r)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!vr(s)||a===45&&vr(s))return!1;for(;o<e.eMarks[i];){const E=e.src.charCodeAt(o);if(E!==124&&E!==45&&E!==58&&!vr(E))return!1;o++}let l=O_(e,t+1),u=l.split("|");const d=[];for(let E=0;E<u.length;E++){const k=u[E].trim();if(!k){if(E===0||E===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?d.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=O_(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=ZC(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const f=u.length;if(f===0||f!==d.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const _=e.push("tr_open","tr",1);_.map=[t,t+1];for(let E=0;E<u.length;E++){const k=e.push("th_open","th",1);d[E]&&(k.attrs=[["style","text-align:"+d[E]]]);const R=e.push("inline","",0);R.content=u[E].trim(),R.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let x,S=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let E=!1;for(let R=0,T=p.length;R<T;R++)if(p[R](e,i,r,!0)){E=!0;break}if(E||(l=O_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(u=ZC(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),S+=f-u.length,S>fY))break;if(i===t+2){const R=e.push("tbody_open","tbody",1);R.map=x=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[i,i+1];for(let R=0;R<f;R++){const T=e.push("td_open","td",1);d[R]&&(T.attrs=[["style","text-align:"+d[R]]]);const A=e.push("inline","",0);A.content=u[R]?u[R].trim():"",A.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return x&&(e.push("tbody_close","tbody",-1),x[1]=i),e.push("table_close","table",-1),g[1]=i,e.parentType=h,e.line=i,!0}function pY(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,i=n;for(;n<r;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,i=n;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+`
17
+ `,o.map=[t,e.line],!0}function mY(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const u=e.src.slice(s,i),d=e.src.slice(i,o);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,a),!(i-s<l)&&(i=e.skipSpaces(i),!(i<o)))){h=!0;break}l=e.sCount[t],e.line=f+(h?1:0);const p=e.push("fence","code",0);return p.info=d,p.content=e.getLines(t+1,f,l,!0),p.markup=u,p.map=[t,e.line],!0}function gY(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const s=[],l=[],u=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m<r;m++){const S=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],o=e.eMarks[m],i>=o)break;if(e.src.charCodeAt(i++)===62&&!S){let k=e.sCount[m]+1,R,T;e.src.charCodeAt(i)===32?(i++,k++,T=!1,R=!0):e.src.charCodeAt(i)===9?(R=!0,(e.bsCount[m]+k)%4===3?(i++,k++,T=!1):T=!0):R=!1;let A=k;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<o;){const N=e.src.charCodeAt(i);if(vr(N))N===9?A+=4-(A+e.bsCount[m]+(T?1:0))%4:A++;else break;i++}p=i>=o,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(R?1:0),u.push(e.sCount[m]),e.sCount[m]=A-k,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let E=!1;for(let k=0,R=f.length;k<R;k++)if(f[k](e,m,r,!0)){E=!0;break}if(E){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]=-1}const g=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const _=[t,0];v.map=_,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,_[1]=e.line;for(let S=0;S<d.length;S++)e.bMarks[S+t]=s[S],e.tShift[S+t]=d[S],e.sCount[S+t]=u[S],e.bsCount[S+t]=l[S];return e.blkIndent=g,!0}function vY(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o<i;){const u=e.src.charCodeAt(o++);if(u!==a&&!vr(u))return!1;u===a&&s++}if(s<3)return!1;if(n)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function eR(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(n++);if(i!==42&&i!==45&&i!==43)return-1;if(n<r){const o=e.src.charCodeAt(n);if(!vr(o))return-1}return n}function tR(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-r>=10)return-1;continue}if(o===41||o===46)break;return-1}return i<n&&(o=e.src.charCodeAt(i),!vr(o))?-1:i}function _Y(e,t){const r=e.level+2;for(let n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function bY(e,t,r,n){let i,o,a,s,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;n&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(d=!0);let f,h,p;if((p=tR(e,l))>=0){if(f=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,p-1)),d&&h!==1)return!1}else if((p=eR(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const m=e.src.charCodeAt(p-1),g=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const v=[l,0];s.map=v,s.markup=String.fromCharCode(m);let _=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const E=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let k=E;for(;o<i;){const q=e.src.charCodeAt(o);if(q===9)k+=4-(k+e.bsCount[l])%4;else if(q===32)k++;else break;o++}const R=o;let T;R>=i?T=1:T=k-E,T>4&&(T=1);const A=E+T;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[l,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const P=e.tight,O=e.tShift[l],D=e.sCount[l],U=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=A,e.tight=!0,e.tShift[l]=R-e.bMarks[l],e.sCount[l]=k,R>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,l,r,!0),(!e.tight||_)&&(u=!1),_=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=U,e.tShift[l]=O,e.sCount[l]=D,e.tight=P,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,N[1]=l,l>=r||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let B=!1;for(let q=0,Q=x.length;q<Q;q++)if(x[q](e,l,r,!0)){B=!0;break}if(B)break;if(f){if(p=tR(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=eR(e,l),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return f?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),v[1]=l,e.line=l,e.parentType=S,u&&_Y(e,g),!0}function yY(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let E=!1;if(e.sCount[x]-e.blkIndent>3&&(E=!0),e.sCount[x]<0&&(E=!0),!E){const T=e.md.block.ruler.getRules("reference"),A=e.parentType;e.parentType="reference";let N=!1;for(let P=0,O=T.length;P<O;P++)if(T[P](e,x,S,!0)){N=!0;break}if(e.parentType=A,N)return null}const k=e.bMarks[x]+e.tShift[x],R=e.eMarks[x];return e.src.slice(k,R+1)}let l=e.src.slice(i,o+1);o=l.length;let u=-1;for(i=1;i<o;i++){const x=l.charCodeAt(i);if(x===91)return!1;if(x===93){u=i;break}else if(x===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(x===92&&(i++,i<o&&l.charCodeAt(i)===10)){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(i=u+2;i<o;i++){const x=l.charCodeAt(i);if(x===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!vr(x))break}const d=e.md.helpers.parseLinkDestination(l,i,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;i=d.pos;const h=i,p=a,m=i;for(;i<o;i++){const x=l.charCodeAt(i);if(x===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!vr(x))break}let g=e.md.helpers.parseLinkTitle(l,i,o);for(;g.can_continue;){const x=s(a);if(x===null)break;l+=x,i=o,o=l.length,a++,g=e.md.helpers.parseLinkTitle(l,i,o,g)}let v;for(i<o&&m!==i&&g.ok?(v=g.str,i=g.pos):(v="",i=h,a=p);i<o;){const x=l.charCodeAt(i);if(!vr(x))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,a=p;i<o;){const x=l.charCodeAt(i);if(!vr(x))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const _=Jg(l.slice(1,u));return _?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[_]>"u"&&(e.env.references[_]={title:v,href:f}),e.line=a),!0):!1}const xY=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],SY="[a-zA-Z_:][a-zA-Z0-9:._-]*",wY="[^\"'=<>`\\x00-\\x20]+",EY="'[^']*'",kY='"[^"]*"',CY="(?:"+wY+"|"+EY+"|"+kY+")",RY="(?:\\s+"+SY+"(?:\\s*=\\s*"+CY+")?)",sO="<[A-Za-z][A-Za-z0-9\\-]*"+RY+"*\\s*\\/?>",lO="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",AY="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",TY="<[?][\\s\\S]*?[?]>",$Y="<![A-Za-z][^>]*>",NY="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",DY=new RegExp("^(?:"+sO+"|"+lO+"|"+AY+"|"+TY+"|"+$Y+"|"+NY+")"),FY=new RegExp("^(?:"+sO+"|"+lO+")"),Il=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+xY.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(FY.source+"\\s*$"),/^$/,!1]];function IY(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s<Il.length&&!Il[s][0].test(a);s++);if(s===Il.length)return!1;if(n)return Il[s][2];let l=t+1;const u=Il[s][1].test("");if(!Il[s][1].test(a)){for(;l<r&&!(e.sCount[l]<e.blkIndent&&(u||!e.isEmpty(l)));l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(i,o),Il[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function PY(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i<o&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<o&&!vr(a))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&vr(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const u=e.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[t,e.line];const d=e.push("inline","",0);d.content=Qg(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function OY(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s<r&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p<m&&(a=e.src.charCodeAt(p),(a===45||a===61)&&(p=e.skipChars(p,a),p=e.skipSpaces(p),p>=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=n.length;p<m;p++)if(n[p](e,s,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=Qg(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;const u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(a),u.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(a),e.parentType=i,!0}function MY(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<r&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let u=!1;for(let d=0,f=n.length;d<f;d++)if(n[d](e,o,r,!0)){u=!0;break}if(u)break}const a=Qg(e.getLines(t,o,e.blkIndent,!1));e.line=o;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const jp=[["table",hY,["paragraph","reference"]],["code",pY],["fence",mY,["paragraph","reference","blockquote","list"]],["blockquote",gY,["paragraph","reference","blockquote","list"]],["hr",vY,["paragraph","reference","blockquote","list"]],["list",bY,["paragraph","reference","blockquote"]],["reference",yY],["html_block",IY,["paragraph","reference","blockquote"]],["heading",PY,["paragraph","reference","blockquote"]],["lheading",OY],["paragraph",MY]];function Yg(){this.ruler=new Ai;for(let e=0;e<jp.length;e++)this.ruler.push(jp[e][0],jp[e][1],{alt:(jp[e][2]||[]).slice()})}Yg.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let a=t,s=!1;for(;a<r&&(e.line=a=e.skipEmptyLines(a),!(a>=r||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=r;break}const l=e.line;let u=!1;for(let d=0;d<i;d++)if(u=n[d](e,a,r,!1),u){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<r&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}};Yg.prototype.parse=function(e,t,r,n){if(!e)return;const i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)};Yg.prototype.State=Oa;function Zh(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Zh.prototype.pushPending=function(){const e=new ea("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Zh.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new ea(e,t,r);let i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};Zh.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)===55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)===56320){const v=this.src.charCodeAt(e-2);i=(v&64512)===55296?65536+(v-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let o=e;for(;o<r&&this.src.charCodeAt(o)===n;)o++;const a=o-e;let s=o<r?this.src.charCodeAt(o):32;if((s&64512)===55296){const v=this.src.charCodeAt(o+1);s=(v&64512)===56320?65536+(s-55296<<10)+(v-56320):65533}else(s&64512)===56320&&(s=65533);const l=uh(i)||lh(i),u=uh(s)||lh(s),d=sh(i),f=sh(s),h=!f&&(!u||d||l),p=!d&&(!l||f||u);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||u),length:a}};Zh.prototype.Token=ea;function LY(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function zY(e,t){let r=e.pos;for(;r<e.posMax&&!LY(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const UY=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function BY(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,n=e.posMax;if(r+3>n||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const i=e.pending.match(UY);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const d=e.push("link_open","a",1);d.attrs=[["href",u]],d.markup="linkify",d.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-o.length,!0}function jY(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<i&&vr(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const LS=[];for(let e=0;e<256;e++)LS.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){LS[e.charCodeAt(0)]=1});function qY(e,t){let r=e.pos;const n=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=e.src.charCodeAt(r);if(i===10){for(t||e.push("hardbreak","br",0),r++;r<n&&(i=e.src.charCodeAt(r),!!vr(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const s=e.src.charCodeAt(r+1);s>=56320&&s<=57343&&(o+=e.src[r+1],r++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&LS[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=r+1,!0}function VY(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const o=e.posMax;for(;r<o&&e.src.charCodeAt(r)===96;)r++;const a=e.src.slice(i,r),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=a),e.pos+=s,!0;let l=r,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&e.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===s){if(!t){const f=e.push("code_inline","code",0);f.markup=a,f.content=e.src.slice(r,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=u}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function GY(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=a,o--);for(let l=0;l<o;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function rR(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];r=e.tokens[a.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[s.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&n.push(s.token-1)}for(;n.length;){const o=n.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(r=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=r)}}function KY(e){const t=e.tokens_meta,r=e.tokens_meta.length;rR(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&rR(e,t[n].delimiters)}const uO={tokenize:GY,postProcess:KY};function HY(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let o=0;o<i.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function nR(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const u=e.tokens[o.token];u.type=a?"strong_close":"em_close",u.tag=a?"strong":"em",u.nesting=-1,u.markup=a?s+s:s,u.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function WY(e){const t=e.tokens_meta,r=e.tokens_meta.length;nR(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&nR(e,t[n].delimiters)}const cO={tokenize:HY,postProcess:WY};function JY(e,t){let r,n,i,o,a="",s="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<f&&e.src.charCodeAt(m)===40){for(u=!1,m++;m<f&&(r=e.src.charCodeAt(m),!(!vr(r)&&r!==10));m++);if(m>=f)return!1;if(l=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",l=m;m<f&&(r=e.src.charCodeAt(m),!(!vr(r)&&r!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<f&&l!==m&&i.ok)for(s=i.str,m=i.pos;m<f&&(r=e.src.charCodeAt(m),!(!vr(r)&&r!==10));m++);}(m>=f||e.src.charCodeAt(m)!==41)&&(u=!0),m++}if(u){if(typeof e.env.references>"u")return!1;if(m<f&&e.src.charCodeAt(m)===91?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?n=e.src.slice(l,m++):m=p+1):m=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[Jg(n)],!o)return e.pos=d,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const g=e.push("link_open","a",1),v=[["href",a]];g.attrs=v,s&&v.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function QY(e,t){let r,n,i,o,a,s,l,u,d="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!vr(r)&&r!==10));o++);if(o>=h)return!1;for(u=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(d=e.md.normalizeLink(s.str),e.md.validateLink(d)?o=s.pos:d=""),u=o;o<h&&(r=e.src.charCodeAt(o),!(!vr(r)&&r!==10));o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&u!==o&&s.ok)for(l=s.str,o=s.pos;o<h&&(r=e.src.charCodeAt(o),!(!vr(r)&&r!==10));o++);else l="";if(o>=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<h&&e.src.charCodeAt(o)===91?(u=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(u,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[Jg(i)],!a)return e.pos=f,!1;d=a.href,l=a.title}if(!t){n=e.src.slice(p,m);const g=[];e.md.inline.parse(n,e.md,e.env,g);const v=e.push("image","img",0),_=[["src",d],["alt",""]];v.attrs=_,v.children=g,v.content=n,l&&_.push(["title",l])}return e.pos=o,e.posMax=h,!0}const YY=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,XY=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ZY(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const a=e.src.charCodeAt(r);if(a===60)return!1;if(a===62)break}const o=e.src.slice(n+1,r);if(XY.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}if(YY.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}return!1}function eX(e){return/^<a[>\s]/i.test(e)}function tX(e){return/^<\/a\s*>/i.test(e)}function rX(e){const t=e|32;return t>=97&&t<=122}function nX(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=e.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!rX(i))return!1;const o=e.src.slice(n).match(DY);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],eX(a.content)&&e.linkLevel++,tX(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const iX=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,oX=/^&([a-z][a-z0-9]{1,31});/i;function aX(e,t){const r=e.pos,n=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=n)return!1;if(e.src.charCodeAt(r+1)===35){const o=e.src.slice(r).match(iX);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=OS(a)?ah(a):ah(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(oX);if(o){const a=kQ(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function iR(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;a<r;a++){const s=e[a];if(o.push(0),(e[n].marker!==s.marker||i!==s.token-1)&&(n=a),i=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let u=n-o[n]-1,d=u;for(;u>l;u-=o[u]+1){const f=e[u];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=u>0&&!e[u-1].open?o[u-1]+1:0;o[a]=a-u+p,o[u]=p,s.open=!1,f.end=a,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function sX(e){const t=e.tokens_meta,r=e.tokens_meta.length;iR(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&iR(t[n].delimiters)}function lX(e){let t,r,n=0;const i=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<o&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}const M_=[["text",zY],["linkify",BY],["newline",jY],["escape",qY],["backticks",VY],["strikethrough",uO.tokenize],["emphasis",cO.tokenize],["link",JY],["image",QY],["autolink",ZY],["html_inline",nX],["entity",aX]],L_=[["balance_pairs",sX],["strikethrough",uO.postProcess],["emphasis",cO.postProcess],["fragments_join",lX]];function ep(){this.ruler=new Ai;for(let e=0;e<M_.length;e++)this.ruler.push(M_[e][0],M_[e][1]);this.ruler2=new Ai;for(let e=0;e<L_.length;e++)this.ruler2.push(L_[e][0],L_[e][1])}ep.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<i){for(let s=0;s<n;s++)if(e.level++,a=r[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};ep.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const o=e.pos;let a=!1;if(e.level<i){for(let s=0;s<r;s++)if(a=t[s](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ep.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s<a;s++)o[s](i)};ep.prototype.State=Zh;function uX(e){const t={};e=e||{},t.src_Any=QP.source,t.src_Cc=YP.source,t.src_Z=ZP.source,t.src_P=IS.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function f1(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function Xg(e){return Object.prototype.toString.call(e)}function cX(e){return Xg(e)==="[object String]"}function dX(e){return Xg(e)==="[object Object]"}function fX(e){return Xg(e)==="[object RegExp]"}function oR(e){return Xg(e)==="[object Function]"}function hX(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const dO={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function pX(e){return Object.keys(e||{}).reduce(function(t,r){return t||dO.hasOwnProperty(r)},!1)}const mX={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},gX="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",vX="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function _X(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function aR(){return function(e,t){t.normalize(e)}}function R0(e){const t=e.re=uX(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(gX),r.push(t.src_xn),t.src_tlds=r.join("|");function n(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const u={validate:null,link:null};if(e.__compiled__[s]=u,dX(l)){fX(l.validate)?u.validate=_X(l.validate):oR(l.validate)?u.validate=l.validate:o(s,l),oR(l.normalize)?u.normalize=l.normalize:l.normalize?o(s,l):u.normalize=aR();return}if(cX(l)){i.push(s);return}o(s,l)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:aR()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(hX).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function fO(e,t,r,n){const i=e.slice(r,n);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=i,this.text=i,this.url=i}function Yi(e,t){if(!(this instanceof Yi))return new Yi(e,t);t||pX(e)&&(t=e,e={}),this.__opts__=f1({},dO,t),this.__schemas__=f1({},mX,e),this.__compiled__={},this.__tlds__=vX,this.__tlds_replaced__=!1,this.re={},R0(this)}Yi.prototype.add=function(t,r){return this.__schemas__[t]=r,R0(this),this};Yi.prototype.set=function(t){return this.__opts__=f1(this.__opts__,t),this};Yi.prototype.test=function(t){if(!t.length)return!1;let r,n;if(this.re.schema_test.test(t)){for(n=this.re.schema_search,n.lastIndex=0;(r=n.exec(t))!==null;)if(this.testSchemaAt(t,r[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};Yi.prototype.pretest=function(t){return this.re.pretest.test(t)};Yi.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};Yi.prototype.match=function(t){const r=[],n=[],i=[],o=[];let a,s,l;function u(h,p){return h?p?h.index!==p.index?h.index<p.index?h:p:h.lastIndex>=p.lastIndex?h:p:h:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(a=l.exec(t))!==null;)s=this.testSchemaAt(t,a[2],l.lastIndex),s&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+s});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)i.push({schema:"",index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)o.push({schema:"mailto:",index:a.index+a[1].length,lastIndex:a.index+a[0].length});const d=[0,0,0];let f=0;for(;;){const h=[n[d[0]],o[d[1]],i[d[2]]],p=u(u(h[0],h[1]),h[2]);if(!p)break;if(p===h[0]?d[0]++:p===h[1]?d[1]++:d[2]++,p.index<f)continue;const m=new fO(t,p.schema,p.index,p.lastIndex);this.__compiled__[m.schema].normalize(m,this),r.push(m),f=p.lastIndex}return r.length?r:null};Yi.prototype.matchAtStart=function(t){if(!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const n=this.testSchemaAt(t,r[2],r[0].length);if(!n)return null;const i=new fO(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};Yi.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,o){return n!==o[i-1]}).reverse(),R0(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,R0(this),this)};Yi.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Yi.prototype.onCompile=function(){};const Dc=2147483647,ya=36,zS=1,ch=26,bX=38,yX=700,hO=72,pO=128,mO="-",xX=/^xn--/,SX=/[^\0-\x7F]/,wX=/[\x2E\u3002\uFF0E\uFF61]/g,EX={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z_=ya-zS,xa=Math.floor,U_=String.fromCharCode;function js(e){throw new RangeError(EX[e])}function kX(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function gO(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(wX,".");const i=e.split("."),o=kX(i,t).join(".");return n+o}function vO(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const o=e.charCodeAt(r++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const CX=e=>String.fromCodePoint(...e),RX=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ya},sR=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},_O=function(e,t,r){let n=0;for(e=r?xa(e/yX):e>>1,e+=xa(e/t);e>z_*ch>>1;n+=ya)e=xa(e/z_);return xa(n+(z_+1)*e/(e+bX))},bO=function(e){const t=[],r=e.length;let n=0,i=pO,o=hO,a=e.lastIndexOf(mO);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&js("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<r;){const l=n;for(let d=1,f=ya;;f+=ya){s>=r&&js("invalid-input");const h=RX(e.charCodeAt(s++));h>=ya&&js("invalid-input"),h>xa((Dc-n)/d)&&js("overflow"),n+=h*d;const p=f<=o?zS:f>=o+ch?ch:f-o;if(h<p)break;const m=ya-p;d>xa(Dc/m)&&js("overflow"),d*=m}const u=t.length+1;o=_O(n-l,u,l==0),xa(n/u)>Dc-i&&js("overflow"),i+=xa(n/u),n%=u,t.splice(n++,0,i)}return String.fromCodePoint(...t)},yO=function(e){const t=[];e=vO(e);const r=e.length;let n=pO,i=0,o=hO;for(const l of e)l<128&&t.push(U_(l));const a=t.length;let s=a;for(a&&t.push(mO);s<r;){let l=Dc;for(const d of e)d>=n&&d<l&&(l=d);const u=s+1;l-n>xa((Dc-i)/u)&&js("overflow"),i+=(l-n)*u,n=l;for(const d of e)if(d<n&&++i>Dc&&js("overflow"),d===n){let f=i;for(let h=ya;;h+=ya){const p=h<=o?zS:h>=o+ch?ch:h-o;if(f<p)break;const m=f-p,g=ya-p;t.push(U_(sR(p+m%g,0))),f=xa(m/g)}t.push(U_(sR(f,0))),o=_O(i,u,s===a),i=0,++s}++i,++n}return t.join("")},AX=function(e){return gO(e,function(t){return xX.test(t)?bO(t.slice(4).toLowerCase()):t})},TX=function(e){return gO(e,function(t){return SX.test(t)?"xn--"+yO(t):t})},xO={version:"2.3.1",ucs2:{decode:vO,encode:CX},decode:bO,encode:yO,toASCII:TX,toUnicode:AX},$X={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},NX={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},DX={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},FX={default:$X,zero:NX,commonmark:DX},IX=/^(vbscript|javascript|file|data):/,PX=/^data:image\/(gif|png|jpeg|webp);/;function OX(e){const t=e.trim().toLowerCase();return IX.test(t)?PX.test(t):!0}const SO=["http:","https:","mailto:"];function MX(e){const t=FS(e,!0);if(t.hostname&&(!t.protocol||SO.indexOf(t.protocol)>=0))try{t.hostname=xO.toASCII(t.hostname)}catch{}return Xh(DS(t))}function LX(e){const t=FS(e,!0);if(t.hostname&&(!t.protocol||SO.indexOf(t.protocol)>=0))try{t.hostname=xO.toUnicode(t.hostname)}catch{}return Xc(DS(t),Xc.defaultChars+"%")}function xo(e,t){if(!(this instanceof xo))return new xo(e,t);t||PS(e)||(t=e||{},e="default"),this.inline=new ep,this.block=new Yg,this.core=new MS,this.renderer=new xd,this.linkify=new Yi,this.validateLink=OX,this.normalizeLink=MX,this.normalizeLinkText=LX,this.utils=BQ,this.helpers=Wg({},GQ),this.options={},this.configure(e),t&&this.set(t)}xo.prototype.set=function(e){return Wg(this.options,e),this};xo.prototype.configure=function(e){const t=this;if(PS(e)){const r=e;if(e=FX[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};xo.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};xo.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};xo.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};xo.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens};xo.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};xo.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};xo.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Yr(e){return"var("+e+")"}let zX=w([c("color",Yr(y.textPrimary)),c("font-size",Yr($.sizeSm)),c("line-height",Yr($.lineHeightRelaxed)),c("word-break","break-word"),lr("& > :first-child",[c("margin-top","0")]),lr("& > :last-child",[c("margin-bottom","0")]),lr("& h1, & h2, & h3, & h4, & h5, & h6",[c("margin","var("+I.md+") 0 var("+I.sm+")"),c("line-height",Yr($.lineHeightTight)),c("font-weight",Yr($.weightBold))]),lr("& h1",[c("font-size",Yr($.sizeXl))]),lr("& h2",[c("font-size",Yr($.sizeLg))]),lr("& h3, & h4, & h5, & h6",[c("font-size",Yr($.sizeMd))]),lr("& p",[c("margin","var("+I.sm+") 0")]),lr("& a",[c("color",Yr(y.brand)),c("text-decoration","none")]),lr("& a:hover",[c("text-decoration","underline")]),lr("& ul, & ol",[c("margin","var("+I.sm+") 0"),c("padding-left","1.5em")]),lr("& li",[c("margin","var("+I.xs+") 0")]),lr("& code",[c("font-family",Yr($.fontFamilyMono)),c("font-size","0.9em"),c("background",Yr(y.surfaceSubtle)),c("padding","1px 4px"),c("border-radius",Yr(Y.sm))]),lr("& pre",[c("background",Yr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Yr(Y.md)),c("padding",Yr(I.md)),c("overflow","auto"),c("margin","var("+I.sm+") 0")]),lr("& pre code",[c("background","none"),c("padding","0")]),lr("& blockquote",[c("margin","var("+I.sm+") 0"),c("padding-left",Yr(I.md)),c("border-left","3px solid var("+y.border+")"),c("color",Yr(y.textSecondary))]),lr("& table",[c("border-collapse","collapse"),c("margin","var("+I.sm+") 0")]),lr("& th, & td",[c("border","1px solid var("+y.borderSubtle+")"),c("padding","var("+I.xs+") var("+I.sm+")"),c("text-align","left")]),lr("& th",[c("background",Yr(y.surfaceSubtle)),c("font-weight",Yr($.weightMedium))]),lr("& img",[c("max-width","100%"),c("border-radius",Yr(Y.sm))]),lr("& hr",[c("border","none"),c("border-top","1px solid var("+y.borderSubtle+")"),c("margin","var("+I.md+") 0")])]),UX=new xo({html:!1,linkify:!0});function BX(e){let t=e.source,r=Nt(()=>UX.render(t),[t]),n=Fe(null);return $e(()=>{re(Wi(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),b("div",{ref:Gt(n),className:zX,dangerouslySetInnerHTML:{__html:r}})}let wO=BX;function jX(e,t){return b(wO,{source:e.body})}function qX(){VP({id:"markdown",label:"Markdown",constraints:{},preview:jX})}function Fc(e){return Array.from(e).length}function US(e,t){let r=Array.from(e),n=t<0?0:t;return r.length<=n?[e,""]:[r.slice(0,n).join(""),r.slice(n).join("")]}function EO(e,t){return C(t,r=>{let i=US(e,r)[1];if(i!=="")return i})}function Er(e){return"var("+e+")"}let VX=w([z("flex"),ve("column"),c("gap","4px")]),lR=w([c("background",Er(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Er(Y.sm)),c("padding","var("+I.xs+") var("+I.sm+")"),c("font-family","inherit"),c("font-size",Er($.sizeMd)),c("line-height",Er($.lineHeightNormal)),c("color",Er(y.textPrimary)),c("outline","none"),c("resize","vertical"),Xo({NAME:"percent",VAL:100}),c("box-sizing","border-box"),c("transition","border-color 120ms"),ws([c("border-color",Er(y.brand))])]),GX=w([c("border-color",Er(y.error)),ws([c("border-color",Er(y.error))])]),KX=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Er(I.sm)),c("font-size",Er($.sizeXs)),c("color",Er(y.textSecondary))]),HX=w([z("inlineFlex"),X("center"),c("gap","4px"),c("color",Er(y.textSecondary))]),uR=w([c("font-variant-numeric","tabular-nums")]),WX=w([c("color",Er(y.error)),c("font-weight",Er($.weightMedium))]),JX=w([c("background",Er(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-left","3px solid var("+y.error+")"),c("border-radius",Er(Y.sm)),c("padding","var("+I.xs+") var("+I.sm+")"),c("font-size",Er($.sizeXs)),c("line-height",Er($.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word"),c("max-height","8em"),c("overflow","auto")]),QX=w([c("color",Er(y.textSecondary)),c("font-size",Er($.sizeXs)),Jh(Re(2))]),YX=w([c("color",Er(y.textPrimary))]),XX=w([c("color",Er(y.error)),c("font-weight",Er($.weightMedium))]),ZX=w([c("color",Er(y.textDisabled)),c("text-decoration","line-through")]);function kO(e){return e.toString()+" character"+(e===1?"":"s")}function CO(e,t){return t!==void 0?e>t?(e-t|0).toString()+" over the "+t.toString()+"-character limit":e.toString()+" / "+t.toString():e.toString()+" characters"}function eZ(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,a=e.onBlur,s=e.onChange,l=e.value,u=a!==void 0?a:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=EO(l,o),m=De(p),g=f||m?lR+" "+GX:lR,v;if(p!==void 0&&o!==void 0){let _=US(l,o);v=L("div",{children:[b("div",{children:"Sent as:",className:QX}),L("div",{children:[b("span",{children:_[0],className:YX}),b("span",{children:"✂",className:XX}),b("span",{children:p,className:ZX})],className:JX})]})}else v=null;return L("div",{children:[b("textarea",{className:g,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:_=>u(),onChange:_=>s(_.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?De(i)?" · "+t:t:null],className:HX}),b("span",{children:CO(h,o),className:m?uR+" "+WX:uR})],className:KX}),v],className:VX})}let tZ=eZ;ZJ();qX();function Jt(e){return"var("+e+")"}let rZ=w([z("flex"),ve("column"),c("gap",Jt(I.sm)),c("background",Jt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Jt(Y.md)),c("padding",Jt(I.md))]),nZ=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Jt(I.sm))]),iZ=w([c("font-size",Jt($.sizeSm)),c("font-weight",Jt($.weightMedium)),c("color",Jt(y.textPrimary))]),oZ=w([c("font-size",Jt($.sizeXs)),c("color",Jt(y.textSecondary))]),qp=w([c("font-size",Jt($.sizeXs)),c("color",Jt(y.textSecondary)),c("font-variant-numeric","tabular-nums"),c("white-space","nowrap")]),cR=w([c("color",Jt(y.error)),c("font-weight",Jt($.weightMedium))]),aZ=w([z("flex"),X("baseline"),Xe("spaceBetween"),c("gap",Jt(I.sm)),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("padding-bottom",Jt(I.xs))]),sZ=w([c("font-size",Jt($.sizeMd)),c("font-weight",Jt($.weightMedium)),c("color",Jt(y.textPrimary)),c("word-break","break-word")]),lZ=w([c("color",Jt(y.textDisabled)),c("text-decoration","line-through")]),uZ=w([c("color",Jt(y.error)),c("font-weight",Jt($.weightMedium))]),cZ=w([c("margin","0"),c("font-family","inherit"),c("font-size",Jt($.sizeSm)),c("line-height",Jt($.lineHeightRelaxed)),c("color",Jt(y.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]),dZ=w([c("max-width","100%"),c("border-radius",Jt(Y.sm)),c("border","1px solid var("+y.borderSubtle+")"),c("object-fit","cover")]),fZ=w([c("font-size",Jt($.sizeXs)),c("color",Jt(y.error)),c("background",Jt(y.surfaceSubtle)),c("border-left","3px solid var("+y.error+")"),c("border-radius",Jt(Y.sm)),c("padding","var("+I.xs+") var("+I.sm+")")]);function dR(e,t){let r=US(e,t),n=r[1];return n===""?e:L(Lr,{children:[r[0],b("span",{children:"✂",className:uZ}),b("span",{children:n,className:lZ})]})}function hZ(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=GP(n);$e(()=>{Wr(o)&&PJ(n,"ChannelPreview")},[n]);let a=fe(o,n,_=>_.label),s=fe(o,KP,_=>_.constraints),l=Fc(r.body),u=EO(r.body,s.maxLength),d=r.subject,f;if(d!==void 0){let _=s.subjectMaxLength,x=Fc(d),S=fe(_,!1,E=>x>E);f=L("div",{children:[b("span",{children:_!==void 0?dR(d,_):d,className:sZ}),_!==void 0?b("span",{children:x.toString()+" / "+_.toString(),className:S?qp+" "+cR:qp}):null],className:aZ})}else f=null;let h=C(o,_=>_.preview),p;if(h!==void 0)p=h(r,s);else{let _=s.maxLength;p=b("pre",{children:_!==void 0?dR(r.body,_):r.body,className:cZ})}let m=r.imageUrl,g;if(m!==void 0){let _=s.mediaAspect;g=b("img",{className:dZ,style:_!==void 0?GJ({},"aspectRatio",_):{},alt:"Message media",src:du(m)})}else g=null;let v=s.note;return L("div",{children:[i?L("div",{children:[b("span",{children:a,className:iZ}),b("span",{children:CO(l,s.maxLength),className:De(u)?qp+" "+cR:qp})],className:nZ}):null,f,p,u!==void 0?b("div",{children:kO(Fc(u))+" past the limit — "+a+" will cut the tail.",className:fZ}):null,g,v!==void 0?b("span",{children:v,className:oZ}):null],className:rZ})}let pZ=hZ;function ne(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function RO(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);r.search=n.toString(),console.warn(`Minified Lexical warning #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const ta=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mZ=ta&&"documentMode"in document?document.documentMode:null,Fo=ta&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),pl=ta&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ed=!(!ta||!("InputEvent"in window)||mZ)&&"getTargetRanges"in new window.InputEvent("input"),ml=ta&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,AO=ta&&/Android/.test(navigator.userAgent),tp=ta&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!AO,TO=ta&&/^(?=.*Chrome).*/i.test(navigator.userAgent),A0=ta&&AO&&TO,rp=ta&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Fo&&!TO,gZ=0,vZ=1,_Z=2,fR=1,hR=2,pR=4,mR=8,bZ=16,B_=32,j_=64,BS=128,yZ=1,xZ=2,SZ=3,wZ=4,EZ=5,kZ=6,dh=tp||ml||rp?" ":"​",Yl=`
18
+
19
+ `,jS=pl?" ":dh,gs={bold:1,capitalize:1024,code:16,highlight:BS,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},CZ={directionless:1,unmergeable:2},T0={center:2,end:6,justify:4,left:1,right:3,start:5},RZ={[xZ]:"center",[kZ]:"end",[wZ]:"justify",[yZ]:"left",[SZ]:"right",[EZ]:"start"},AZ={normal:0,segmented:2,token:1},TZ={[gZ]:"normal",[_Z]:"segmented",[vZ]:"token"},gR="$config";function vR(){return Rr()._blockCursorElement}function $Z(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let $O=class Qm{element;before;after;constructor(t,r,n){this.element=t,this.before=r||null,this.after=n||null}withBefore(t){return new Qm(this.element,t,this.after)}withAfter(t){return new Qm(this.element,this.before,t)}withElement(t){return this.element===t?this:new Qm(t,this.before,this.after)}insertChild(t){const r=this.getInsertionAnchor();return r!==null&&r.parentElement!==this.element&&ne(357),this.element.insertBefore(t,r),this}removeChild(t){return t.parentElement!==this.element&&ne(358),this.element.removeChild(t),this}replaceChild(t,r){return r.parentElement!==this.element&&ne(359),this.element.replaceChild(t,r),this}getFirstChild(){const t=this.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;return r===this.getInsertionAnchor()?null:r}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,r,n){if(this.element===t)return r===t&&n===0?"before":"after";const i=_R(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(r===t)return n<=o?"before":"after";const a=_R(t,r);if(a===null)return"after";const s=Array.prototype.indexOf.call(t.childNodes,a);return s>=0&&s<=o?"before":"after"}getInsertionAnchor(){return this.before}};function _R(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class Ic extends $O{withBefore(t){return new Ic(this.element,t,this.after)}withAfter(t){return new Ic(this.element,this.before,t)}withElement(t){return this.element===t?this:new Ic(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;for(;$Z(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===vR()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(rp||ml||tp);this.insertManagedLineBreak(r)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const r=this.element,n=t.nodeName==="IMG"?t.nextSibling:null;n&&r.removeChild(n),r.removeChild(t),r.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const r=this.getManagedLineBreak();if(r){if(t===(r.nodeName==="IMG"))return;this.removeManagedLineBreak()}const n=this.element,i=this.before,o=hr().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const a=hr().createElement("img");a.setAttribute("data-lexical-managed-linebreak","true"),a.style.setProperty("display","inline","important"),a.style.setProperty("border","0px","important"),a.style.setProperty("margin","0px","important"),a.alt="",n.insertBefore(a,o),n.__lexicalLineBreak=a}else n.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),r=this.getInsertionAnchor();let n=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==r;i=i.nextSibling)n++;return n}resolveChildIndex(t,r,n,i){if(n===this.element){const l=this.getFirstChildOffset(),u=vR(),d=this.element.childNodes,f=Math.min(i,d.length);let h=0;for(let p=l;p<f;p++)d[p]!==u&&h++;return[t,Math.min(h,t.getChildrenSize())]}const o=bR(r,n);o.push(i);const a=bR(r,this.element);let s=t.getIndexWithinParent();for(let l=0;l<a.length;l++){const u=o[l],d=a[l];if(u===void 0||u<d)break;if(u>d){s+=1;break}}return[t.getParentOrThrow(),s]}}function bR(e,t){const r=[];let n=t;for(;n!==e&&n!==null;n=n.parentNode){let i=0;for(let o=n.previousSibling;o!==null;o=o.previousSibling)i++;r.push(i)}return n!==e&&ne(225),r.reverse()}let NO;try{NO="0.48.0+prod.esm"}catch{}const DO=NO??'"<unknown>+source"';let ef=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const r of this._back)t.push(r);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const Pl=null;function FO(e,t=1e3){return e instanceof h1?e.clone():e.size<t?new Map(e):new h1().init(new Map(e),void 0,e.size)}let h1=class IO{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new IO().init(this._old,this._nursery,this._size)}init(t,r,n){return this._old=t,this._nursery=r,this._size=n,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const r=this._nursery&&this._nursery.get(t);return r!==void 0?r:this._old&&this._old.get(t)}get(t){const r=this.getWithTombstone(t);return r===Pl?void 0:r}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const r=new Map(this._old);for(const[n,i]of this._nursery)i!==Pl?r.set(n,i):r.delete(n);this._old=r,this._nursery=void 0}return this._mutable=!1,this}set(t,r){const n=this.getWithTombstone(t);if(n===r)return this;const i=this.getNursery();return n!==Pl&&n!==void 0||(this._size++,n===Pl&&i.delete(t)),i.set(t,r),this}delete(t){const r=this.has(t);return r&&(this.getNursery().set(t,Pl),this._size--),r}getOrInsert(t,r){const n=this.get(t);return n!==void 0?n:(this.set(t,r),r)}getOrInsertComputed(t,r){const n=this.get(t);if(n!==void 0)return n;const i=r(t);return this.set(t,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,r=this._old;if(r)for(const n of r){const i=n[0],o=t?t.get(i):void 0;o!==Pl&&(o!==void 0&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===Pl||r&&r.has(n[0])||(yield n)}forEach(t,r){r!==void 0&&(t=t.bind(r));for(const[n,i]of this.entries())t(i,n,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function $0(e,t,r,n,i,o){if(V(e)){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&((V(a)||os(a)&&a.__slots!==null)&&$0(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}for(const a of os(e)&&e.__slots!==null?e.__slots.values():[]){const s=n.get(a);s!==void 0&&xu(s)&&s.__slotHost===t&&((V(s)||os(s)&&s.__slots!==null)&&$0(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a))}}let p1=!1,qS=0;function NZ(e){qS=e.timeStamp}function q_(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&Td(e,r)!==void 0}function DZ(e,t,r){const n=fi(Di(r)),i=n&&So(n,r._rootElement);let o=null,a=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,a=i.focusOffset);const s=e.nodeValue;s!==null&&ow(t,s,o,a,!1)}function FZ(e,t,r){if(ie(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return Ni(t)&&r.isAttached()}function IZ(e,t,r){for(let n=e;n&&!pM(n);n=Mu(n)){const i=Td(n,t);if(i!==void 0){const o=fr(i,r);if(o)return dt(o)||!tt(n)?void 0:[n,o]}}}function PO(e,t,r){p1=!0;const n=performance.now()-qS>100;try{go(e,()=>{const i=_e()||(function(f){return f.read("latest",()=>{const h=_e();return h!==null?h.clone():null})})(e),o=new Map,a=e._editorState,s=e._blockCursorElement;let l=!1,u="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,m=h.target,g=IZ(m,e,a);if(!g)continue;const[v,_]=g;if(p==="characterData")n&&se(_)&&Ni(m)&&FZ(i,m,_)&&DZ(m,_,e);else if(p==="childList"){l=!0;const x=h.addedNodes;for(let k=0;k<x.length;k++){const R=x[k],T=eM(R),A=R.parentNode;if(!(A==null||R===s||T!==null||q_(R,A,e)||e._slotsUsed&&tt(R)&&R.hasAttribute("data-lexical-slot")||pM(R))){if(pl){const N=(tt(R)?R.innerText:null)||R.nodeValue;N&&(u+=N)}A.removeChild(R)}}const S=h.removedNodes,E=S.length;if(E>0){let k=0;for(let R=0;R<E;R++){const T=S[R];(q_(T,m,e)||s===T)&&(m.appendChild(T),k++)}E!==k&&o.set(v,_)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=r.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],p=h.addedNodes,m=h.target;for(let g=0;g<p.length;g++){const v=p[g],_=v.parentNode;_==null||v.nodeName!=="BR"||q_(v,m,e)||_.removeChild(v)}}r.takeRecords()}i!==null&&(l&&Cn(i),pl&&aM(e)&&i.insertRawText(u))})}finally{p1=!1}}function OO(e){const t=e._observer;t!==null&&PO(e,t.takeRecords(),t)}function MO(e){(function(t){qS===0&&Di(t).addEventListener("textInput",NZ,!0)})(e),e._observer=new MutationObserver((t,r)=>{PO(e,t,r)})}const yR="latest";let PZ=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||LZ).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function np(e,t){return new PZ(e,t)}function ip(e,t,r=yR){const n=(r===yR?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function Pc(e,t,r){let n;if(_n(),typeof r=="function"){const o=e.getLatest(),a=ip(o,t);if(n=r(a),t.isEqual(a,n))return o}else n=r;const i=e.getWritable();return zO(i).updateFromKnown(t,n),i}function OZ(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of cw(typeof e=="function"?e:e.replace))if(n&&n.stateConfigs)for(const i of n.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&r.add(o.key)):o=i,t.set(o.key,o)}return{flatKeys:r,sharedConfigMap:t}}const xR=new Set(["__proto__","constructor","prototype"]);let MZ=class LO{node;knownState;unknownState;sharedNodeState;size;constructor(t,r,n=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=r,this.unknownState=n,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,u,d){let f=d.size;if(u)for(const h in u){const p=l.get(h);p&&d.has(p)||f++}return f})(a,n,i);this.size=s}getValue(t){const r=this.knownState.get(t);if(r!==void 0)return r;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(n=t.parse(i)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},r={};for(const[n,i]of this.knownState)n.isEqual(i,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(i);for(const n of this.sharedNodeState.flatKeys)n in t&&(r[n]=t[n],delete t[n]);return SR(t)&&(r.$=t),r}getWritable(t){if(this.node===t)return this;const{sharedNodeState:r,unknownState:n}=this,i=new Map(this.knownState);return new LO(t,r,(function(o,a,s){let l;if(s)for(const[u,d]of Object.entries(s)){if(xR.has(u))continue;const f=o.get(u);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[u]=d)}return l})(r.sharedConfigMap,i,n),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,r){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&n in o||(o&&(delete o[n],this.unknownState=SR(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(xR.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(r)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=r)}updateFromJSON(t){const{knownState:r}=this;for(const n of r.keys())r.set(n,n.defaultValue);if(this.size=r.size,this.unknownState=void 0,t)for(const[n,i]of Object.entries(t))this.updateFromUnknown(n,i)}};function zO(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new MZ(t,UO(t));return t.__state=r,r}function UO(e){return e.__state?e.__state.sharedNodeState:Y6(Rr(),e.getType()).sharedNodeState}function SR(e){if(e)for(const t in e)return e}function LZ(e){return e}function wR(e,t,r){for(const[n,i]of t.knownState){if(e.has(n.key))continue;e.add(n.key);const o=r?r.getValue(n):n.defaultValue;if(o!==i&&!n.isEqual(o,i))return!0}return!1}function ER(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,a]of Object.entries(n))if(!e.has(o)&&(e.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function kR(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function CR(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style,l=e.__state,u=t.__state;return(r===null||r===o)&&(n===null||n===a)&&(i===null||i===s)&&(e.__state===null||l===u||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&wR(h,d,f)||f&&wR(h,f,d)||d&&ER(h,d,f)||f&&ER(h,f,d))})(l,u))}function RR(e,t){const r=e.mergeWithSibling(t),n=Ut()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function AR(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&se(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(CR(t,n)){n=RR(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&se(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(CR(n,r)){n=RR(n,r);break}break}r.remove()}}else n.remove()}function Xs(e){return TR(e.anchor),TR(e.focus),e}function TR(e){for(;e.type==="element";){const t=e.getNode(),r=e.offset;let n,i;if(r===t.getChildrenSize()?(n=t.getChildAtIndex(r-1),i=!0):(n=t.getChildAtIndex(r),i=!1),se(n)){e.set(n.__key,i?n.getTextContentSize():0,"text",!0);break}if(!V(n))break;e.set(n.__key,i?n.getChildrenSize():0,"element",!0)}}const fh=Symbol.for("@lexical/CachedTextSize");function $R(e,t){return g1.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=zo.get(n);if(o===void 0&&ne(345,n),V(o)){const a=wr.get(n);if(a!==void 0&&V(a)&&a.__parent!==o.__parent)r+=o.getTextContentSize();else{const s=mu.get(n),l=s&&s.__lexicalTextContent;typeof l!="string"&&ne(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const a=o[fh];a===void 0&&ne(347,o.getType(),n),r+=a}n=o.__next}return r},{editor:Ct})}function BO(e){V(e)||e[fh]===void 0&&(e[fh]=se(e)?e.__text.length:e.getTextContentSize())}const zZ=4;let hh,Ct,ph,ht="",Pr=null,Jn=null,On=null;function Sa(){return{firstTextKey:On,format:Pr,style:Jn}}function so(e){e.firstTextKey!==null&&(Pr=e.format,Jn=e.style,On=e.firstTextKey)}function m1(e){if(On!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&ne(348),t===null)return;const r=wr.get(t);se(r)&&(Pr=r.getFormat(),Jn=r.getStyle(),On=t)}let Zg,Pf,Of,zo,g1,wr,mu,v1,mh,gu,ts=!1,N0=!1;function al(e,t){const r=zo.get(e),n=wr.has(e);if(t!==null){const i=S1(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(Ct._keyToDOMMap.delete(e),V(r)){const i=W0(r,zo);_1(i,0,i.length-1,null)}if(r!==void 0){for(const i of Li(r).values()){const o=y1(i);al(i,null),o!==null&&o.remove()}aw(mh,ph,Zg,r,"destroyed")}}}function _1(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&al(o,n)}}function Ol(e,t){e.setProperty("text-align",t)}const UZ="40px";function jO(e,t){const r=hh.theme.indent;if(typeof r=="string"){const n=e.classList.contains(r);t>0&&!n?e.classList.add(r):t<1&&n&&e.classList.remove(r)}e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * var(--lexical-indent-base-value, ${UZ}))`)}function qO(e,t){const r=e.style;t===0?Ol(r,""):t===1?Ol(r,"left"):t===2?Ol(r,"center"):t===3?Ol(r,"right"):t===4?Ol(r,"justify"):t===5?Ol(r,"start"):t===6&&Ol(r,"end")}function b1(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(Nr(n))return null;const o=n.getParent();return o===null||mr(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function VO(e){const t=hr().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function GO(e,t,r){t||e.contentEditable==="false"?nte(r,Ct):r.removeAttribute("contenteditable")}function NR(e,t,r){const n=ht,i=Sa();ht="";let o="";const a=dt(e);for(const[s,l]of r){const u=VO(s);GO(t,a,u),t.appendChild(u),ht="";const d=Sa();sl(l,wo(e,u,Ct)),so(d),KO(e,s,t,u),o+=ht}return so(i),ht=n,o}function Li(e){return os(e)&&e.__slots!==null?e.__slots:vM}function KO(e,t,r,n){const i=gu.$getSlotTargetElement(e,t,r,Ct);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function y1(e){const t=mu.get(e);return t!==void 0?t.parentElement:null}function DR(e,t,r){const n=Li(e),i=Li(t);for(const[d,f]of n)if(!i.has(d)){const h=y1(f);al(f,null),h!==null&&h.remove()}const o=ht,a=Sa();let s="",l=null;const u=dt(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?y1(h):null;ht="";const m=Sa();if(p===null){p=VO(d);let g=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){g=v;break}r.insertBefore(p,g),sl(f,wo(t,p,Ct))}else h===f?Ja(f,p):(h!==void 0&&al(h,p),sl(f,wo(t,p,Ct)));if(so(m),GO(r,u,p),KO(t,d,r,p),s+=ht,p.parentElement===r){const g=l===null?r.firstChild:l.nextSibling;g!==p&&r.insertBefore(p,g),l=p}}return so(a),ht=o,s}function sl(e,t){const r=wr.get(e);if(r===void 0&&ne(60),t!==null){const i=zo.get(e);if(i!==void 0){const o=mu.get(e);if(o!==void 0){const a=xu(i)?i.__slotHost:null,s=xu(r)?r.__slotHost:null,l=i.__parent!==r.__parent||a!==s,u=s!==null&&o.parentElement!==t.element;if(l||u)return t.insertChild(o),Ja(e,t.element)}}}const n=gu.$createDOM(r,Ct);if((function(i,o,a){const s=a._keyToDOMMap;tM(o,a,i),s.set(i,o)})(e,n,Ct),se(r)?n.setAttribute("data-lexical-text","true"):dt(r)&&(n.setAttribute("data-lexical-decorator","true"),rte(n,{captureSelection:!0})),V(r)){const i=r.__indent,o=r.__size;b1(n,r),i!==0&&jO(n,i);const a=Li(r),s=a.size>0?NR(r,n,a):"";if(o===0)n.__lexicalTextContent=s,n.__lexicalFirstTextKey=null,ht+=s,a.size>0&&(n.__lexicalSlotTextLength=s.length);else{const u=ht,d=o-1;if(x1(W0(r,wr),r,0,d,wo(r,n,Ct)),s!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=s+f,ht=u+s+f}a.size>0&&(n.__lexicalSlotTextLength=s.length)}const l=r.__format;l!==0&&qO(n,l),r.isInline()||HO(null,r,n)}else{const i=r.getTextContent();if(dt(r)){const o=r.decorate(Ct,hh);o!==null&&WO(e,o),n.contentEditable="false";const a=Li(r);a.size>0&&NR(r,n,a)}ht+=i}return t!==null&&t.insertChild(n),gu.$decorateDOM(r,null,n,Ct),BO(r),aw(mh,ph,Zg,r,"created"),n}function x1(e,t,r,n,i){const o=ht,a=Sa();ht="",Pr=null,Jn=null,On=null;let s=r;for(;s<=n;++s){const u=Sa();sl(e[s],i);const d=wr.get(e[s]);d!==null&&se(d)?Pr===null&&(Pr=d.getFormat(),Jn=d.getStyle(),On=d.__key):V(d)&&s<n&&!d.isInline()&&(ht+=Yl),so(u)}const l=Ct._keyToDOMMap.get(t.__key);l===void 0&&ne(349,t.__key),l.__lexicalTextContent=ht,l.__lexicalFirstTextKey=On,ht=o+ht,so(a)}function HO(e,t,r){const n=wo(t,r,Ct),i=n.element.__lexicalLastChildKind??null,o=(function(a,s){if(a){const l=a.__last;if(l){const u=s.get(l);if(u)return ci(u)?"line-break":dt(u)&&u.isInline()?"decorator":null}return Li(a).size>0?null:"empty"}return null})(t,wr);i!==o&&n.setManagedLineBreak(o)}function BZ(e,t,r){var n;Pr=null,Jn=null,On=null,(function(i,o,a){const s=ht,l=i.__size,u=o.__size;ht="";const d=a.element,f=Ct._keyToDOMMap.get(o.__key);f===void 0&&ne(351,o.__key);const h=u-l;if(!ts&&Math.abs(h)<=1&&l>=zZ&&i.__first===o.__first&&(h!==0||!Ct._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,m=v1.get(i.__key);if(!ts&&typeof p=="string"&&m!==void 0){const g=(function(v,_){const x=_.size;if(x===0||x>=v.__size)return null;let S=v.__last,E=null,k=0;for(;S!==null&&k<x;){if(!_.has(S))return null;E=S;const R=wr.get(S);if(R===void 0)return null;S=R.__prev,k++}return k!==x||S!==null&&_.has(S)?null:E})(o,m);if(g!==null){const v=m.size;if(h===0){const _=$R(g,v);let x=g,S=0;for(;x!==null&&S<v;){const A=wr.get(x);if(A===void 0)break;const N=Sa();Ja(x,d),se(A)&&Pr===null&&(Pr=A.getFormat(),Jn=A.getStyle(),On=A.__key),so(N),x=A.__next,S++}let E="";for(x=g,S=0;x!==null&&S<v;){const A=wr.get(x);if(A===void 0)break;let N;if(V(A)){const P=Ct._keyToDOMMap.get(x),O=P&&P.__lexicalTextContent;typeof O!="string"&&ne(352,A.getType()),N=O}else N=A.getTextContent();E+=N,S<v-1&&V(A)&&!A.isInline()&&(E+=Yl),x=A.__next,S++}const k=f.__lexicalSlotTextLength||0,R=k>0?p.slice(k):p,T=R.slice(0,R.length-_)+E;return f.__lexicalTextContent=T,ht=s+T,void FR(o,f,m)}if((function(_,x,S,E,k,R,T,A){if(A!==1&&A!==-1||T!==(A===1?2:1))return!1;const P=T-A;let O=_.__last;for(let ue=0;ue<P-1;ue++){if(O===null)return!1;const xe=zo.get(O);if(xe===void 0)return!1;O=xe.__prev}if(O===null)return!1;const D=wr.get(R),U=zo.get(O);if(D===void 0||U===void 0||D.__prev!==U.__prev)return!1;const B=[];let q=R;for(let ue=0;ue<T;ue++){if(q===null)return!1;B.push(q);const xe=wr.get(q);q=xe?xe.__next:null}const Q=[];q=O;for(let ue=0;ue<P;ue++){if(q===null)return!1;Q.push(q);const xe=zo.get(q);q=xe?xe.__next:null}const J=new Set(Q),te=new Set(B),ae=[];let Z=0,W=0;for(;Z<P&&W<T;)if(B[W]===Q[Z])ae.push({key:B[W],kind:"reconcile"}),Z++,W++;else if(te.has(Q[Z])){if(J.has(B[W]))return!1;ae.push({key:B[W],kind:"create",nextIndex:W}),W++}else ae.push({key:Q[Z],kind:"destroy"}),Z++;for(;Z<P;)ae.push({key:Q[Z++],kind:"destroy"});for(;W<T;)ae.push({key:B[W],kind:"create",nextIndex:W}),W++;const le=$R(O,P);for(const ue of ae){const xe=Sa();if(ue.kind==="reconcile")Ja(ue.key,S.element);else if(ue.kind==="destroy")al(ue.key,S.element);else{let ot=null;for(let rr=ue.nextIndex+1;rr<T;rr++){const It=Ct._keyToDOMMap.get(B[rr]);if(It!==void 0){ot=It;break}}sl(ue.key,S.withBefore(ot??S.before))}if(ue.kind!=="destroy"){const ot=wr.get(ue.key);ot&&se(ot)&&Pr===null&&(Pr=ot.getFormat(),Jn=ot.getStyle(),On=ot.__key)}so(xe)}let oe="";for(let ue=0;ue<T;ue++){const xe=wr.get(B[ue]);if(xe===void 0)return!1;let ot;if(V(xe)){const rr=Ct._keyToDOMMap.get(B[ue]),It=rr&&rr.__lexicalTextContent;typeof It!="string"&&ne(350,xe.getType()),ot=It}else ot=xe.getTextContent();oe+=ot,ue<T-1&&V(xe)&&!xe.isInline()&&(oe+=Yl)}const Se=E.__lexicalSlotTextLength||0,be=Se>0?k.slice(Se):k;return E.__lexicalTextContent=be.slice(0,be.length-le)+oe,!0})(i,0,a,f,p,g,v,h)){const _=f.__lexicalTextContent;return typeof _!="string"&&ne(353),ht=s+_,void FR(o,f,m)}}}if(h===0){let g=i.__first,v=0;for(;g!==null;){const _=wr.get(g);if(_===void 0)break;const x=ts||Of.has(g)||Pf.has(g),S=Sa();if(x)Ja(g,d);else{let E,k;if(V(_)){k=mu.get(g);const R=k&&k.__lexicalTextContent;typeof R!="string"&&ne(354,_.getType()),E=R}else E=_.getTextContent();ht+=E,k!==void 0&&m1(k)}se(_)?Pr===null&&(Pr=_.getFormat(),Jn=_.getStyle(),On=_.__key):V(_)&&v<u-1&&!_.isInline()&&(ht+=Yl),so(S),g=_.__next,v++}return f.__lexicalTextContent=ht,f.__lexicalFirstTextKey=On,void(ht=s+ht)}}if(l===1&&u===1){const p=i.__first,m=o.__first;if(p===m)Ja(p,d);else{const v=S1(p),_=sl(m,null);try{v.parentNode===d?d.replaceChild(_,v):a.insertChild(_)}catch(x){if(typeof x=="object"&&x!=null){const S=`${x.toString()} Parent: ${d.tagName}, new child: {tag: ${_.tagName} key: ${m}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(S)}throw x}al(p,null)}const g=wr.get(m);se(g)&&Pr===null&&(Pr=g.getFormat(),Jn=g.getStyle(),On=g.__key)}else{const p=W0(i,zo),m=W0(o,wr);if(p.length!==l&&ne(227),m.length!==u&&ne(228),l===0)u!==0&&x1(m,o,0,u-1,a);else if(u===0){if(l!==0){const g=a.after==null&&a.before==null&&Li(o).size===0&&a.element.__lexicalLineBreak==null;_1(p,0,l-1,g?null:d),g&&(d.textContent="")}}else(function(g,v,_,x,S,E){const k=x-1,R=S-1;let T,A,N=E.getFirstChild(),P=0,O=0;for(;P<=k&&O<=R;){const B=v[P],q=_[O],Q=Sa();if(B===q)N=V_(Ja(q,E.element)),P++,O++;else{if(A===void 0&&(A=IR(_,O)),T===void 0)T=IR(v,P);else if(!T.has(B)){P++,so(Q);continue}if(!A.has(B)){N=V_(S1(B)),al(B,E.element),P++,T.delete(B),so(Q);continue}if(T.has(q)){const te=id(Ct,q);te!==N&&E.withBefore(N??E.before).insertChild(te),N=V_(Ja(q,E.element)),P++,O++}else sl(q,E.withBefore(N??E.before)),O++}const J=wr.get(q);J!==null&&se(J)?Pr===null&&(Pr=J.getFormat(),Jn=J.getStyle(),On=J.__key):V(J)&&O<=R&&!J.isInline()&&(ht+=Yl),so(Q)}const D=P>k,U=O>R;if(D&&!U){const B=_[R+1],q=B===void 0?null:Ct.getElementByKey(B);x1(_,g,O,R,E.withBefore(q??E.before))}else U&&!D&&_1(v,P,k,E.element)})(o,p,m,l,u,a)}f.__lexicalTextContent=ht,f.__lexicalFirstTextKey=On,ht=s+ht})(e,t,wo(t,r,Ct)),mr(t)||(n=t,Pr==null||Pr===n.__textFormat||N0||n.setTextFormat(Pr),(function(i){Jn==null||Jn===i.__textStyle||N0||i.setTextStyle(Jn)})(t))}function FR(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const a=wr.get(o);if(a===void 0){o=null;break}if(a.__parent===i)break;o=a.__parent}if(o!==null&&!r.has(o)){const a=wr.get(n);if(se(a))return Pr=a.getFormat(),void(Jn=a.getStyle())}}t.__lexicalFirstTextKey=On}function Ja(e,t){const r=zo.get(e);let n=wr.get(e);r!==void 0&&n!==void 0||ne(61);const i=ts||Of.has(e)||Pf.has(e),o=id(Ct,e);if(r===n&&!i){let a;if(V(r)){const s=o.__lexicalTextContent;typeof s!="string"&&ne(355,r.getType()),a=s,m1(o)}else a=r.getTextContent();return ht+=a,o}if(r!==n&&i&&aw(mh,ph,Zg,n,"updated"),gu.$updateDOM(n,r,o,Ct)){const a=sl(e,null);return t===null&&ne(62),t.replaceChild(a,o),al(e,null),a}if(V(r)){V(n)||ne(334,e);const a=n.__indent;(ts||a!==r.__indent)&&jO(o,a);const s=n.__format;(ts||s!==r.__format)&&qO(o,s);const l=i&&(Li(n).size>0||Li(r).size>0)?DR(r,n,o):"";if(i){const u=ht;if(BZ(r,n,o),Nr(n)||n.isInline()||HO(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,ht=u+l+d,o.__lexicalSlotTextLength=l.length}else(Li(n).size>0||Li(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&ne(356,r.getType()),ht+=u,m1(o)}if((ts||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(b1(o,n),Nr(n)&&!ts))for(const u of n.getChildren())V(u)&&b1(id(Ct,u.getKey()),u)}else{const a=n.getTextContent();if(dt(n)){const s=n.decorate(Ct,hh);s!==null&&WO(e,s),i&&(Li(n).size>0||Li(r).size>0)&&DR(r,n,o)}ht+=a}if(!N0&&Nr(n)){const a=n.getLatest();if(a.__cachedText!==ht){const s=a.getWritable();s.__cachedText=ht,n=s}}return gu.$decorateDOM(n,r,o,Ct),BO(n),o}function WO(e,t){let r=Ct._pendingDecorators;const n=Ct._decorators;if(r===null){if(n[e]===t)return;r=rM(Ct)}r[e]=t}function V_(e){let t=e.nextSibling;return t!==null&&t===Ct._blockCursorElement&&(t=t.nextSibling),t}function IR(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function jZ(e,t,r,n,i,o){ht="",Pr=null,Jn=null,On=null,ts=n===2,Ct=r,hh=r._config,gu=r._config.dom||q0,ph=r._nodes,Zg=Ct._listeners.mutation,Pf=i,Of=o,zo=e._nodeMap,g1=e,wr=t._nodeMap,N0=t._readOnly,mu=FO(r._keyToDOMMap),v1=(function(){const s=new Map,l=u=>{for(const d of u){const f=wr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=s.get(h);p===void 0&&(p=new Set,s.set(h,p)),p.add(d)}};return l(Pf.keys()),l(Of),s})();const a=new Map;return mh=a,Ja("root",null),Ct=void 0,ph=void 0,Pf=void 0,Of=void 0,zo=void 0,g1=void 0,wr=void 0,hh=void 0,mu=void 0,v1=void 0,mh=void 0,gu=q0,a}function S1(e){const t=mu.get(e);return t===void 0&&ne(75,e),t}function qe(e){return{type:e}}const JO=qe("SELECTION_CHANGE_COMMAND"),qZ=qe("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),QO=qe("CLICK_COMMAND"),YO=qe("BEFORE_INPUT_COMMAND"),XO=qe("INPUT_COMMAND"),ZO=qe("COMPOSITION_START_COMMAND"),e6=qe("COMPOSITION_END_COMMAND"),tu=qe("DELETE_CHARACTER_COMMAND"),Oc=qe("INSERT_LINE_BREAK_COMMAND"),gh=qe("INSERT_PARAGRAPH_COMMAND"),Mc=qe("CONTROLLED_TEXT_INSERTION_COMMAND"),VS=qe("PASTE_COMMAND"),Ym=qe("REMOVE_TEXT_COMMAND"),vh=qe("DELETE_WORD_COMMAND"),_h=qe("DELETE_LINE_COMMAND"),Uo=qe("FORMAT_TEXT_COMMAND"),VZ=qe("SET_TEXT_FORMAT_COMMAND"),ev=qe("UNDO_COMMAND"),tv=qe("REDO_COMMAND"),t6=qe("KEYDOWN_COMMAND"),r6=qe("KEY_ARROW_RIGHT_COMMAND"),n6=qe("MOVE_TO_END"),i6=qe("KEY_ARROW_LEFT_COMMAND"),o6=qe("MOVE_TO_START"),a6=qe("KEY_ARROW_UP_COMMAND"),s6=qe("KEY_ARROW_DOWN_COMMAND"),bh=qe("KEY_ENTER_COMMAND"),l6=qe("KEY_SPACE_COMMAND"),GS=qe("KEY_BACKSPACE_COMMAND"),u6=qe("KEY_ESCAPE_COMMAND"),c6=qe("KEY_DELETE_COMMAND"),d6=qe("KEY_TAB_COMMAND"),GZ=qe("INSERT_TAB_COMMAND"),KZ=qe("INDENT_CONTENT_COMMAND"),PR=qe("OUTDENT_CONTENT_COMMAND"),f6=qe("DROP_COMMAND"),HZ=qe("FORMAT_ELEMENT_COMMAND"),h6=qe("DRAGSTART_COMMAND"),p6=qe("DRAGOVER_COMMAND"),WZ=qe("DRAGEND_COMMAND"),rv=qe("COPY_COMMAND"),KS=qe("CUT_COMMAND"),m6=qe("SELECT_ALL_COMMAND"),JZ=qe("CLEAR_EDITOR_COMMAND"),QZ=qe("CLEAR_HISTORY_COMMAND"),Vp=qe("CAN_REDO_COMMAND"),Gp=qe("CAN_UNDO_COMMAND"),YZ=qe("FOCUS_COMMAND"),XZ=qe("BLUR_COMMAND"),ZZ=qe("KEY_MODIFIER_COMMAND");function eee(e){const t=new Map;return{dispose(){for(const r of t.values())r.dispose();t.clear()},register(r,n){let i=t.get(r);i===void 0&&(i={dispose:e(r,n),holders:new Set},t.set(r,i));const o=()=>{const a=t.get(r);a&&a.holders.delete(o)&&a.holders.size===0&&(t.delete(r),a.dispose())};return i.holders.add(o),o}}}function tee(e,t,r,n){return e.addEventListener(t,r,n),e.removeEventListener.bind(e,t,r,n)}const ja=Object.freeze({}),w1=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&yh(r),!t.isComposing()&&Ae(t,t6,e)}],["pointerdown",function(e,t){const r=dM(e),n=e.pointerType;$d(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&go(t,()=>{H0(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){Ae(t,ZO,e)}],["compositionend",function(e,t){const r=t._inputState;pl?r.compositionPhase="ending-firefox":ml||!tp&&!rp?Ae(t,e6,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;yh(r),go(t,()=>{b6(e,t)||t.dispatchCommand(XO,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){go(t,()=>{const r=_e(),n=fi(Di(t)),i=Ed();if(n){if(ie(r)){const o=r.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!Nr(a)&&rn().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=So(n,t._rootElement).anchorNode;(tt(o)||Ni(o))&&Cn(JS(i,n,t,e))}}Ae(t,QO,e)})}],["cut",ja],["copy",ja],["dragstart",ja],["dragover",ja],["dragend",ja],["paste",ja],["focus",ja],["blur",ja],["drop",ja]];ed&&w1.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||pl&&aM(n)||i!=="insertCompositionText"&&go(n,()=>{b6(r,n)||Ae(n,YO,r)},{event:r})})(e,t)]);const E1=new WeakMap,D0=new WeakMap,ree=eee(e=>(e.addEventListener("selectionchange",UR),()=>e.removeEventListener("selectionchange",UR)));function g6(e,t,r,n,i,o){const a=e.anchor,s=e.focus,l=a.getNode(),u=Ut();let d;if(o!==void 0)d=o;else{const g=fi(Di(u));d=g!==null?So(g,u._rootElement):null}const f=d!==null?d.anchorNode:null,h=a.key,p=u.getElementByKey(h),m=r.length;return h!==s.key||!se(l)||(!i&&(!ed||u._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&m<2||nM(r))&&a.offset!==s.offset&&!l.isComposing()||Ui(l)||l.isDirty()&&m>1||(i||!ed)&&p!==null&&!l.isComposing()&&f!==ll(l,p,u)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!l.isComposing()&&(l.getFormat()!==e.format||l.getStyle()!==e.style)||(function(g,v){if(v.isSegmented())return!0;if(!g.isCollapsed())return!1;const _=g.anchor.offset,x=v.getParentOrThrow(),S=ru(v);return _===0?!v.canInsertTextBefore()||!x.canInsertTextBefore()&&!v.isComposing()||S||(function(E){const k=E.getPreviousSibling();return(se(k)||V(k)&&k.isInline())&&!k.canInsertTextAfter()})(v):_===v.getTextContentSize()&&(!v.canInsertTextAfter()||!x.canInsertTextAfter()&&!v.isComposing()||S)})(e,l)}function OR(e,t){return Ni(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function MR(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:a}=So(e,t._rootElement),s=t._inputState;s.isSelectionChangeFromDOMUpdate&&(s.isSelectionChangeFromDOMUpdate=!1,OR(n,i)&&OR(o,a)&&!s.postDeleteSelectionToRestore)||go(t,()=>{if(!r)return void Cn(null);if(!ap(t,n,o))return;let l=_e();if(s.postDeleteSelectionToRestore&&ie(l)&&l.isCollapsed()){const u=l.anchor,d=s.postDeleteSelectionToRestore.anchor;(u.key===d.key&&u.offset===d.offset+1||u.offset===1&&d.getNode().is(u.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),Cn(l))}if(s.postDeleteSelectionToRestore=null,ie(l)){const u=l.anchor,d=u.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=Di(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:m,offset:g,key:v,timeStamp:_}=s.collapsedSelectionFormat,x=rn(),S=t.isComposing()===!1&&x.getTextContent()==="";if(h<_+200&&u.offset===g&&u.key===v)Xm(l,p,m);else if(u.type==="text")se(d)||ne(141),v6(l,d);else if(u.type==="element"&&!S){V(d)||ne(259);const E=u.getNode();E.isEmpty()?(function(k,R){const T=R.getTextFormat(),A=R.getTextStyle();Xm(k,T,A)})(l,E):Xm(l,l.format,"")}}else{const f=u.key,h=l.focus.key,p=l.getNodes(),m=p.length,g=l.isBackward(),v=g?a:i,_=g?i:a,x=g?h:f,S=g?f:h;let E=2047,k=!1;for(let R=0;R<m;R++){const T=p[R],A=T.getTextContentSize();if(se(T)&&A!==0&&!(R===0&&T.__key===x&&v===A||R===m-1&&T.__key===S&&_===0)&&(k=!0,E&=T.getFormat(),E===0))break}l.format=k?E:0}}Ae(t,JO,void 0)})}function Xm(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function v6(e,t){Xm(e,t.getFormat(),t.getStyle())}function _6(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function LR(e){const{lastKeyCode:t}=Ut()._inputState;if(e==null||e.length<=1||t==null)return;const r=t.length===1?t:t==="Enter"?`
20
+ `:t==="Tab"?" ":null;if(!r)return;const n=_e();if(!ie(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!se(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const a=i.getNextSibling();if(r===`
21
+ `){if(ci(a))a.selectEnd();else if(!a){const s=ir(i,td),l=s&&s.getNextSibling();V(l)&&l.selectStart()}}else r===" "?vu(a)&&a.selectEnd():se(a)&&a.getTextContent()[0]===r&&a.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function yh(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function zR(e){yh(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>yh(e),0)}function b6(e,t){const r=dM(e);if(tt(r)&&H0(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=wh(n.ownerDocument);return i!==null&&n.contains(i)&&H0(i,t)}function nee(e){const t=e.inputType,r=_6(e),n=Ut(),i=n._inputState,o=_e();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(yh(i),e.preventDefault(),ie(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(t==="deleteContentBackward"){if(o===null){const f=Ed();if(!ie(f))return!0;Cn(f.clone())}if(ie(o)){const f=o.anchor.key===o.focus.key;if((function(h,p){return h.lastKeyCode==="MediaLast"&&p<h.lastKeyDownTimeStamp+30})(i,e.timeStamp)&&n.isComposing()&&f){if(bn(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{go(n,()=>{bn(null)})},30),ie(o)){const h=o.anchor.getNode();h.markDirty(),se(h)||ne(142),v6(o,h)}}else{if(bn(null),ml&&r!==null&&!r.collapsed&&(o.applyDOMRange(r),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),p=h.getTextContent(),m=h.canInsertTextAfter(),g=o.anchor.offset===0&&o.focus.offset===p.length;let v=A0&&f&&!g&&m;if(v&&o.isCollapsed()&&(v=!dt(Bee(o.anchor,!0))),!v){Ae(n,tu,!0);const _=_e();A0&&ie(_)&&_.isCollapsed()&&(i.postDeleteSelectionToRestore=_,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!ie(o))return!0;const a=e.data;i.unprocessedBeforeInputData!==null&&iw(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Nr(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const s=o.anchor,l=o.focus,u=s.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(a===`
22
+ `)e.preventDefault(),Ae(n,Oc,!1);else if(a===Yl)e.preventDefault(),Ae(n,gh,void 0);else if(a==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else a!=null&&g6(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Ae(n,Mc,a),LR(a)):i.unprocessedBeforeInputData=a;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Ae(n,Mc,e),LR((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;bn(null),f||Ae(n,Mc,e),Zm(h);break}case"insertLineBreak":bn(null),Ae(n,Oc,!1);break;case"insertParagraph":bn(null),i.isInsertLineBreak&&!ml?(i.isInsertLineBreak=!1,Ae(n,Oc,!1)):Ae(n,gh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Ae(n,VS,e);break;case"deleteByComposition":(function(f,h){return f!==h||V(f)||V(h)||!ru(f)||!ru(h)})(u,d)&&Ae(n,Ym,e);break;case"deleteByDrag":yu(C1),Ae(n,Ym,e);break;case"deleteByCut":Ae(n,Ym,e);break;case"deleteContent":Ae(n,tu,!1);break;case"deleteWordBackward":Ae(n,vh,!0);break;case"deleteWordForward":Ae(n,vh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Ae(n,_h,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Ae(n,_h,!1);break;case"formatStrikeThrough":Ae(n,Uo,"strikethrough");break;case"formatBold":Ae(n,Uo,"bold");break;case"formatItalic":Ae(n,Uo,"italic");break;case"formatUnderline":Ae(n,Uo,"underline");break;case"historyUndo":Ae(n,ev,void 0);break;case"historyRedo":Ae(n,tv,void 0)}return!0}function iee(e){const t=Ut(),r=t._inputState,n=_e(),i=e.data,o=_6(e);let a=!1;if(i!=null&&ie(n)){const s=fi(Di(t)),l=s!==null?So(s,t._rootElement):null,u=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&!t.isComposing();u&&(r.hadOrphanedCompositionEvents=!0);const d=n.anchor.getNode(),f=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&t.isComposing()&&se(d)&&Ui(d);if(!u&&!f&&g6(n,o,i,e.timeStamp,!1,l)){if(a=!0,r.compositionPhase==="ending-firefox"){const _=F0(t,i);if(r.compositionPhase="idle",_)return yu(xh),dA(),!0}const h=n.anchor.getNode();if(s===null||l===null)return!0;const p=n.isBackward(),m=p?n.anchor.offset:n.focus.offset,g=p?n.focus.offset:n.anchor.offset;ed&&!n.isCollapsed()&&se(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,m)+i+h.getTextContent().slice(m+g)===oM(l.anchorNode)||Ae(t,Mc,i);const v=i.length;pl&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),A0&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,bn(null))}}return a||(iw(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(F0(t,i||void 0),yu(xh),r.compositionPhase="idle")),dA(),!0}function oee(e){const t=Ut(),r=t._inputState,n=_e();if(ie(n)&&!t.isComposing()){r.compositionPhase="composing",r.hadOrphanedCompositionEvents=!1;const i=n.anchor,o=n.anchor.getNode();if(bn(i.key),yu(R6),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!A0&&(o.getFormat()!==n.format||se(o)&&o.getStyle()!==n.style)||se(o)&&(Ui(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){Ae(t,Mc,jS);const a=_e();ie(a)&&bn(a.anchor.key)}}return!0}function aee(e){const t=Ut();return t._inputState.compositionPhase="idle",F0(t,e.data),yu(xh),!0}function Zm(e){if(e===null)return;const t=fr(e);if(!se(t)||t.getType()==="text"||Ui(t)||!t.isAttached())return;const r=_e(),n=ie(r)&&r.anchor.key===e?r.anchor.offset:null,i=$r(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),n!==null){const o=Math.min(n,i.getTextContentSize());i.select(o,o)}}function F0(e,t){const r=e._compositionKey;if(bn(null),r!==null&&t!=null){if(t===""){const i=fr(r),o=e.getElementByKey(r),a=o!==null&&se(i)?ll(i,o,e):null;if(a!==null&&a.nodeValue!==null&&se(i)){const s=fi(Di(e)),l=s&&So(s,e._rootElement);let u=null,d=null;l!==null&&l.anchorNode===a&&(u=l.anchorOffset,d=l.focusOffset),ow(i,a.nodeValue,u,d,!0)}return Zm(r),!1}if(t[t.length-1]===`
23
+ `){const i=_e();if(ie(i)||ur(i)){if(ie(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return Ae(e,bh,null),Zm(r),!1}}const n=fr(r);if(n!==null&&se(n)&&Ui(n)){n.markDirty();const i=_e(),o=n.getTextContentSize(),a=ie(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(a,a).insertText(t),!0}}return iw(!0,e,t),Zm(r),!1}function see(e){const t=Ut(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=hA(e);if(n&&go(t,()=>{F0(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return tr(n,"ArrowRight",{shiftKey:"any"})})(e))Ae(t,r6,e);else if((function(n){return tr(n,"ArrowRight",{...Va,shiftKey:"any"})})(e))Ae(t,n6,e);else if((function(n){return tr(n,"ArrowLeft",{shiftKey:"any"})})(e))Ae(t,i6,e);else if((function(n){return tr(n,"ArrowLeft",{...Va,shiftKey:"any"})})(e))Ae(t,o6,e);else if((function(n){return tr(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))Ae(t,a6,e);else if((function(n){return tr(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))Ae(t,s6,e);else if((function(n){return tr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,Ae(t,bh,e);else if((function(n){return n.key===" "})(e))Ae(t,l6,e);else if((function(n){return Fo&&tr(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,Ae(t,Oc,!0);else if((function(n){return tr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,Ae(t,bh,e);else if((function(n){return tr(n,"Backspace",{shiftKey:"any"})||Fo&&tr(n,"h",{ctrlKey:!0})})(e))hA(e)?Ae(t,GS,e)&&zR(r):(e.preventDefault(),Ae(t,tu,!0));else if((function(n){return n.key==="Escape"})(e))Ae(t,u6,e);else if((function(n){return tr(n,"Delete",{})||Fo&&tr(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?Ae(t,c6,e):(e.preventDefault(),Ae(t,tu,!1));else if((function(n){return tr(n,"Backspace",fA)})(e))e.preventDefault(),Ae(t,vh,!0);else if((function(n){return tr(n,"Delete",fA)})(e))e.preventDefault(),Ae(t,vh,!1);else if((function(n){return Fo&&tr(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),Ae(t,_h,!0);else if((function(n){return Fo&&(tr(n,"Delete",{metaKey:!0})||tr(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),Ae(t,_h,!1);else if((function(n){return tr(n,"b",Va)})(e))e.preventDefault(),Ae(t,Uo,"bold");else if((function(n){return tr(n,"u",Va)})(e))e.preventDefault(),Ae(t,Uo,"underline");else if((function(n){return tr(n,"i",Va)})(e))e.preventDefault(),Ae(t,Uo,"italic");else if((function(n){return tr(n,"Tab",{shiftKey:"any"})})(e))Ae(t,d6,e);else if((function(n){return tr(n,"z",Va)})(e))e.preventDefault(),Ae(t,ev,void 0);else if((function(n){return Fo?tr(n,"z",{metaKey:!0,shiftKey:!0}):tr(n,"y",{ctrlKey:!0})||tr(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),Ae(t,tv,void 0);else{const n=t._editorState._selection;(function(i){return tr(i,"a",Va)})(e)?(e.preventDefault(),Ae(t,m6,e)&&zR(r)):n===null||ie(n)||((function(i){return tr(i,"c",Va)})(e)?(e.preventDefault(),Ae(t,rv,e)):(function(i){return tr(i,"x",Va)})(e)&&(e.preventDefault(),Ae(t,KS,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(ZZ,e),!0}function y6(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Lc=new Map;function UR(e){const t=Gee(e.target);if(t===null)return;const r=sw(e.target);let n=null,i=null;const o=r!==null?D0.get(r):void 0;if(r!==null){if(o!==void 0){const f=o.editors;let h=o.hasShadowEditor;if(h===void 0){h=!1;for(const p of f)if(p._rootElement!==null&&vs(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,m=null;for(const g of f){const v=g._rootElement;if(v===null)continue;const _=So(t,v).anchorNode;if(_!==null&&Uc(_)===g){if(vs(v.getRootNode())){n=g,i=_;break}p===null&&(p=g,m=_)}}n===null&&p!==null&&(n=p,i=m)}else{const p=t.anchorNode;p===null||tt(p)&&p.shadowRoot!==null||(n=Uc(p),n!==null&&(i=p))}}if(n===null){const f=wh(r);n=f!==null?Uc(f):null}}if(n===null)return;if(n._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;go(n,()=>{const f=Ed(),h=i??So(t,n._rootElement).anchorNode;(tt(h)||Ni(h))&&Cn(JS(f,t,n,e))})}const a=nw(n),s=a[a.length-1],l=s._key,u=Lc.get(l),d=u||s;d!==n&&MR(t,d,!1),MR(t,n,!0),n!==s?Lc.set(l,n):u&&Lc.delete(l)}function BR(e){e._lexicalHandled=!0}function jR(e){return e._lexicalHandled===!0}function lee(e){const t=E1.get(e);if(t===void 0)return;const r=D0.get(t);if(r===void 0)return;E1.delete(e);const n=sp(e);ov(n)?((function(o){if(o._parentEditor!==null){const a=nw(o),s=a[a.length-1]._key;Lc.get(s)===o&&Lc.delete(s)}else Lc.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&ne(198);const i=y6(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function k1(e,t,r){_n();const n=e.__key,i=e.getParent();if(i===null)return void(Bn(e)!==null&&ne(367,n,String(Bn(e))));const o=(function(s){const l=_e();if(!ie(l)||!V(s))return l;const{anchor:u,focus:d}=l,f=u.getNode(),h=d.getNode();return od(f,s)&&u.set(s.__key,0,"element"),od(h,s)&&d.set(s.__key,0,"element"),l})(e);let a=!1;if(ie(o)&&t){const s=o.anchor,l=o.focus;s.key===n&&(L0(s,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),l.key===n&&(L0(l,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else ur(o)&&t&&e.isSelected()&&e.selectPrevious();if(ie(o)&&t&&!a){const s=e.getIndexWithinParent();rs(e),Hl(o,i,s,-1)}else rs(e);r||mr(i)||i.canBeEmpty()||!i.isEmpty()||k1(i,t),t&&o&&Nr(i)&&i.isEmpty()&&i.selectEnd()}const x6=Symbol.for("ephemeral");function I0(e){return e[x6]||!1}const qR={configurable:!0,enumerable:!1,value:void 0,writable:!0};class Gi{__type;__key;__parent;__prev;__next;__state;[fh];static getType(){const{ownNodeType:t}=uw(this);return t===void 0&&ne(64,this.name),t}static clone(t){ne(65,this.name)}$config(){return{}}config(t,r){const n=r.extends||gM(this.constructor);return Object.assign(r,{extends:n}),typeof t=="string"&&Object.assign(r,{type:t}),{[t]:r}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}resetOnCopyNodeFrom(t){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",qR),Object.defineProperty(this,fh,qR),Z6(this,t)}getType(){return this.__type}isInline(){ne(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const r=fr(t);if(r===null)break;t=r.__parent!==null?r.__parent:Bn(r)}return!1}isSelected(t){const r=t||_e();if(r==null)return!1;const n=r.getNodes().some(i=>i.__key===this.__key);if(se(this))return n;if(ie(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(dt(this)&&this.isInline()&&i){const o=r.isBackward()?r.focus:r.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let r=t.getFirstChild(),n=0;for(;r!==null;){if(this.is(r))return n;n++,r=r.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:fr(t)}getParentOrThrow(){const t=this.getParent();return t===null&&ne(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const r=t.getParent();if(mr(r)||Bn(t)!==null)return V(t)||t===this&&dt(t)||ne(194),t;t=r}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&ne(67,this.__key),t}getParents(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r),r=r.getParent();return t}getParentKeys(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r.__key),r=r.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:fr(t)}getPreviousSiblings(){const t=[],r=this.getParent();if(r===null)return t;let n=r.getFirstChild();for(;n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:fr(t)}getNextSiblings(){const t=[];let r=this.getNextSibling();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getCommonAncestor(t){const r=V(this)?this:this.getParent(),n=V(t)?t:t.getParent(),i=r&&n?O1(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=O1(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?SM(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&ne(279),!1)))}isParentOf(t){return od(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const a=o.__key;if(i.has(a)||(i.add(a),n.push(o)),o===t)break;const s=V(o)?r?o.getFirstChild():o.getLastChild():null;if(s!==null){o=s;continue}const l=r?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||n.push(u),u===t)break;let d=null,f=u;do{if(f===null&&ne(68),d=r?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||n.push(f)}while(d===null);o=d}return r||n.reverse(),n}isDirty(){const t=Ut()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(I0(this))return this;const t=fr(this.__key);return t===null&&ne(113),t}getWritable(){if(I0(this))return this;_n();const t=Cs(),r=Ut(),n=t._nodeMap,i=this.__key,o=this.getLatest(),a=r._cloneNotNeeded,s=_e();if(s!==null&&s.setCachedNodes(null),a.has(i))return V0(o),o;const l=hM(o);return a.add(i),V0(l),n.set(i,l),l}getTextContent(){return _M(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){ne(70)}updateDOM(t,r,n){ne(71)}getDOMSlot(t){return new $O(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){ne(18,this.name)}updateFromJSON(t){return(function(r,n){const i=r.getWritable(),o=n.$;let a=o;for(const s of UO(i).flatKeys)s in n&&(a!==void 0&&a!==o||(a={...o}),a[s]=n[s]);return(i.__state||a)&&zO(r).updateFromJSON(a),i})(this,t)}static transform(){return null}remove(t){k1(this,!0,t)}replace(t,r){_n();let n=_e();n!==null&&(n=n.clone()),Z_(this,t);const i=this.getLatest(),o=this.__key,a=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,d=s.getParent(),f=d!==null?s.getIndexWithinParent():-1;rs(s),d!==null&&ie(n)&&Hl(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),m=i.__prev,g=i.__next,v=i.__parent;k1(i,!1,!0),h===null?l.__first=a:h.getWritable().__next=a,s.__prev=m,p===null?l.__last=a:p.getWritable().__prev=a,s.__next=g,s.__parent=v,l.__size=u;let _=0;r&&(V(this)&&V(s)||ne(139),_=s.getChildrenSize(),s.splice(_,0,this.getChildren()));const x=vo(this);if(x.length>0){os(this)&&os(s)||ne(368,this.__key,s.__key);for(const S of x){const E=Su(this,S);E!==null&&(ute(this,S),bM(s,S,E))}}if(ie(n)){Cn(n);const S=n.anchor,E=n.focus;S.key===o&&(r&&S.type==="element"?S.set(s.__key,_+S.offset,"element"):HR(S,s)),E.key===o&&(r&&E.type==="element"?E.set(s.__key,_+E.offset,"element"):HR(E,s))}return ns()===o&&bn(a),s}insertAfter(t,r=!0){_n(),Z_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),a=_e();let s=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(ie(a)){const m=o.__key,g=a.anchor,v=a.focus;s=g.type==="element"&&g.key===m&&g.offset===p+1,l=v.type==="element"&&v.key===m&&v.offset===p+1}rs(i),r&&ie(a)&&Hl(a,o,p,-1)}else rs(i);const u=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),f=i.__key,h=n.__next;if(u===null?d.__last=f:u.getWritable().__prev=f,d.__size++,n.__next=f,i.__next=h,i.__prev=n.__key,i.__parent=n.__parent,r&&ie(a)){const p=this.getIndexWithinParent();Hl(a,d,p+1);const m=d.__key;s&&a.anchor.set(m,p+2,"element"),l&&a.focus.set(m,p+2,"element")}return t}insertBefore(t,r=!0){_n(),Z_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,a=_e(),s=i.getParent(),l=s!==null?i.getIndexWithinParent():-1;rs(i),s!==null&&r&&ie(a)&&Hl(a,s,l,-1);const u=this.getPreviousSibling(),d=this.getParentOrThrow().getWritable(),f=n.__prev,h=this.getIndexWithinParent();return u===null?d.__first=o:u.getWritable().__next=o,d.__size++,n.__prev=o,i.__prev=f,i.__next=n.__key,i.__parent=n.__parent,r&&ie(a)&&Hl(a,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return qt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){_n();const n=Bo(this);if(n!==null)return n.selectPrevious(t,r);const i=this.getPreviousSibling(),o=this.getParentOrThrow();if(i===null)return o.select(0,0);if(V(i))return i.select();if(!se(i)){const a=i.getIndexWithinParent()+1;return o.select(a,a)}return i.select(t,r)}selectNext(t,r){_n();const n=Bo(this);if(n!==null)return n.selectNext(t,r);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(V(i))return i.select(0,0);if(!se(i)){const a=i.getIndexWithinParent();return o.select(a,a)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function S6(e){return e instanceof Gi}const P0="historic",w6="history-push",Mf="history-merge",E6="paste",k6="cut",C6="collaboration",uee="skip-scroll-into-view",cee="skip-dom-selection",C1="skip-selection-focus",R6="composition-start",xh="composition-end",dee="!important";function O0(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,a=!1,s=!1,l=0;const u=e.length;let d=-1;for(let p=0;p<u;p++){const m=e[p];if(o)m==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(a)d===-1&&(d=p),a=!1;else if(i===null)if(m!=="/"||e[p+1]!=="*")if(m!=='"'&&m!=="'")if(m!=="(")if(m!==")")if(s||m!==":"||l!==0){if(m===";"&&l===0){d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const g=r.trim(),v=n.trim();g!==""&&v!==""&&(t[g]=v),r="",n="",s=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),s=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=m;else d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),m==="\\"?a=!0:m===i&&(i=null)}d!==-1&&(s?n+=e.slice(d,u):r+=e.slice(d,u));const f=r.trim(),h=n.trim();return f!==""&&h!==""&&(t[f]=h),t}function fee(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===dee?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function zc(e,t,r=""){if(t===r)return;const n=O0(r),i=O0(t);for(const o in i)delete n[o],fee(e,o,i[o]);for(const o in n)e.removeProperty(o)}function G_(e,t){return 16&t?"code":t&BS?"mark":32&t?"sub":64&t?"sup":null}function K_(e,t){return 1&t?"strong":2&t?"em":"span"}function A6(e,t,r,n,i){const o=n.classList;let a=Bc(i,"base");a!==void 0&&o.add(...a),a=Bc(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;a!==void 0&&(8&r&&4&r?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const u in gs){const d=gs[u];if(a=Bc(i,u),a!==void 0)if(r&d){if(s&&(u==="underline"||u==="strikethrough")){t&d&&o.remove(...a);continue}((t&d)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...a)}else t&d&&o.remove(...a)}}function T6(e,t,r){const n=r.isComposing(),i=e+(n?dh:""),o=Rr(),a=sv(o).$getDOMSlot(r,t,o),s=a.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void a.insertChild(hr().createTextNode(i));const l=s,u=l.nodeValue;if(u!==i)if(n||pl){const[d,f,h]=(function(p,m){const g=p.length,v=m.length;let _=0,x=0;for(;_<g&&_<v&&p[_]===m[_];)_++;for(;x+_<g&&x+_<v&&p[g-x-1]===m[v-x-1];)x++;return[_,g-_-x,m.slice(_,v-x)]})(u,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function VR(e,t,r,n,i,o){T6(i,e,t);const a=o.theme.text;a!==void 0&&A6(0,0,n,e,a)}function Kp(e,t){const r=hr().createElement(t);return r.appendChild(e),r}function R1(e){return e!=null&&e.__isInlineFormattable===!0}class ks extends Gi{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new ks(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",r){super(r),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return TZ[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ns()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=gs[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return _u(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const n=this.__format,i=G_(0,n),o=K_(0,n),a=i===null?o:i,s=hr().createElement(a);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),i!==null&&(l=hr().createElement(o),s.appendChild(l)),VR(l,this,0,n,this.__text,t);const u=this.__style;return u!==""&&zc(s.style,u),s}updateDOM(t,r,n){const i=this.__text,o=t.__format,a=this.__format,s=G_(0,o),l=G_(0,a),u=K_(0,o),d=K_(0,a);if((s===null?u:s)!==(l===null?d:l))return!0;if(s===l&&u!==d){const g=r.firstChild;g==null&&ne(48);const v=hr().createElement(d);return VR(v,this,0,a,i,n),r.replaceChild(v,g),!1}let f=r;l!==null&&s!==null&&(f=r.firstChild,f==null&&ne(49)),T6(i,f,this);const h=n.theme.text;h!==void 0&&o!==a&&A6(0,o,a,f,h);const p=t.__style,m=this.__style;return p!==m&&zc(r.style,m,p),!1}static importDOM(){return{"#text":()=>({conversion:gee,priority:0}),b:()=>({conversion:pee,priority:0}),code:()=>({conversion:qa,priority:0}),em:()=>({conversion:qa,priority:0}),i:()=>({conversion:qa,priority:0}),mark:()=>({conversion:qa,priority:0}),s:()=>({conversion:qa,priority:0}),span:()=>({conversion:hee,priority:0}),strong:()=>({conversion:qa,priority:0}),sub:()=>({conversion:qa,priority:0}),sup:()=>({conversion:qa,priority:0}),u:()=>({conversion:qa,priority:0})}}static importJSON(t){return $r().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:r}=super.exportDOM(t);return tt(r)||ne(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=Kp(r,"b")),this.hasFormat("italic")&&(r=Kp(r,"i")),this.hasFormat("strikethrough")&&(r=Kp(r,"s")),this.hasFormat("underline")&&(r=Kp(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,r){}setFormat(t){const r=this.getWritable();return r.__format=typeof t=="string"?gs[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?CZ[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=_u(this.getFormat(),t,null);return this.setFormat(r)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const r=AZ[t];if(this.__mode===r)return this;const n=this.getWritable();return n.__mode=r,n}setTextContent(t){if(this.__text===t)return this;const r=this.getWritable();return r.__text=t,r}select(t,r){_n();let n=t,i=r;const o=_e(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!ie(o))return U6(s,n,s,i,"text","text");{const l=ns();l!==o.anchor.key&&l!==o.focus.key||bn(s),o.setTextNodeRange(this,n,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,r,n,i){const o=this.getWritable(),a=o.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const u=_e();if(i&&ie(u)){const f=t+s;u.setTextNodeRange(o,f,o,f)}const d=a.slice(0,l)+n+a.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){_n();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=ns(),a=n.length;t.sort((A,N)=>A-N),t.push(a);const s=[],l=t.length;for(let A=0,N=0;A<a&&N<=l;N++){const P=t[N];P>A&&(s.push(n.slice(A,P)),A=P)}const u=s.length;if(u===1)return[r];const d=s[0],f=r.getParent();let h;const p=r.getFormat(),m=r.getStyle(),g=r.__detail;let v=!1,_=null,x=null;const S=_e();if(ie(S)){const[A,N]=S.isBackward()?[S.focus,S.anchor]:[S.anchor,S.focus];A.type==="text"&&A.key===i&&(_=A),N.type==="text"&&N.key===i&&(x=N)}r.isSegmented()?(h=$r(d),h.__format=p,h.__style=m,h.__detail=g,h.__state=kR(r,h),v=!0):h=r.setTextContent(d);const E=[h];for(let A=1;A<u;A++){const N=$r(s[A]);N.__format=p,N.__style=m,N.__detail=g,N.__state=kR(r,N);const P=N.__key;o===i&&bn(P),E.push(N)}const k=_?_.offset:null,R=x?x.offset:null;let T=0;for(const A of E){if(!_&&!x)break;const N=T+A.getTextContentSize();if(_!==null&&k!==null&&k<=N&&k>=T&&(_.set(A.getKey(),k-T,"text"),k<N&&(_=null)),x!==null&&R!==null&&R<=N&&R>=T){x.set(A.getKey(),R-T,"text");break}T=N}if(f!==null){(function(P){const O=P.getPreviousSibling(),D=P.getNextSibling();O!==null&&V0(O),D!==null&&V0(D)})(this);const A=f.getWritable(),N=this.getIndexWithinParent();v?(A.splice(N,0,E),this.remove()):A.splice(N,1,E),ie(S)&&Hl(S,f,N,u-1)}return E}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||ne(50);const n=this.__key,i=t.__key,o=this.__text,a=o.length;ns()===i&&bn(n);const s=_e();if(ie(s)){const f=s.anchor,h=s.focus;f!==null&&f.key===i&&eA(f,r,n,t,a),h!==null&&h.key===i&&eA(h,r,n,t,a)}const l=t.__text,u=r?l+o:o+l;this.setTextContent(u);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function hee(e){return{forChild:HS(e.style),node:null}}function pee(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:HS(t.style,r?void 0:"bold"),node:null}}const GR=new WeakMap;function mee(e){if(!tt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function gee(e){const t=e;e.parentElement===null&&ne(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const a=[n];for(;o!==null&&(i=GR.get(o))===void 0&&!mee(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l<a.length;l++)GR.set(a[l],s);return s})(t)!==null)return{node:Sh(r)};if(r=r.replace(/\r/g,"").replace(/[ \t\n]+/g," "),r==="")return{node:null};if(r[0]===" "){let n=t,i=!0;for(;n!==null&&(n=KR(n,!1))!==null;){const o=n.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(r=r.slice(1)),i=!1;break}}i&&(r=r.slice(1))}if(r[r.length-1]===" "){let n=t,i=!0;for(;n!==null&&(n=KR(n,!0))!==null;)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(r=r.slice(0,r.length-1))}return r===""?{node:null}:{node:$r(r)}}function KR(e,t){let r=e;for(;;){let n;for(;(n=t?r.nextSibling:r.previousSibling)===null;){const o=r.parentElement;if(o===null)return null;r=o}if(r=n,tt(r)){const o=r.style.display;if(o===""&&!K0(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(Ni(r))return r;if(r.nodeName==="BR")return null}}const vee={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function qa(e){const t=vee[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:HS(e.style,t),node:null}}function $r(e=""){return ra(new ks(e))}function se(e){return e instanceof ks}function HS(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),a=e.fontStyle==="italic",s=n.includes("underline"),l=e.verticalAlign;return u=>((se(u)||R1(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),s&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Sd extends ks{static getType(){return"tab"}static clone(t){return new Sd(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const r=super.createDOM(t),n=Bc(t.theme,"tab");return n!==void 0&&r.classList.add(...n),r}static importJSON(t){return wd().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,r,n,i){return n===""&&r===0||n===" "&&r===1||ne(286),this}setDetail(t){return t!==2&&ne(127),this}setMode(t){return t!=="normal"&&ne(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function wd(){return ra(new Sd)}function vu(e){return e instanceof Sd}class _ee{key;offset;type;_selection;constructor(t,r,n){this._selection=null,this.key=t,this.offset=r,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:kh(Bi(ki(this,"next")),Bi(ki(t,"next")))<0}getNode(){const t=fr(this.key);return t===null&&ne(20),t}set(t,r,n,i){const o=this._selection,a=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,rd()||(ns()===a&&bn(t),o!==null&&(o.setCachedNodes(null),ie(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function $a(e,t,r){return new _ee(e,t,r)}function H_(e,t){let r=t.__key,n=e.offset,i="element";if(se(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!V(t)){const o=t.getNextSibling();if(se(o))r=o.__key,n=0,i="text";else{const a=t.getParent();a&&(r=a.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function HR(e,t){if(V(t)){const r=t.getLastDescendant();V(r)||se(r)?H_(e,r):H_(e,t)}else H_(e,t)}class nv{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!ur(t))return!1;const r=this._nodes,n=t._nodes;return r.size===n.size&&Array.from(r).every(i=>n.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new nv(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(a=>Bn(a)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(se(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a<n;a++)r[a].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=fr(i);o!==null&&n.push(o)}return rd()||(this._cachedNodes=n),n}getTextContent(){const t=this.getNodes();let r="";for(let n=0;n<t.length;n++)r+=t[n].getTextContent();return r}deleteNodes(){const t=this.getNodes().filter(r=>Bn(r)===null);if((_e()||Ed())===this&&t[0]){const r=Lt(t[0],"next");Ch(qo(r,r))}for(const r of t)r.remove();$6()}}function $6(){const e=rn();if(e.isEmpty()){const t=qt();e.append(t),t.select()}}function ie(e){return e instanceof Pu}class Pu{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,r,n,i){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ie(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=(function(n){const i=[],[o,a]=n.getTextSlices();o&&i.push(o.caret.origin);const s=new Set,l=new Set;for(const u of n)if(bo(u)){const{origin:d}=u;i.length===0?s.add(d):(l.add(d),i.push(d))}else{const{origin:d}=u;V(d)&&l.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),gl(n.focus)&&V(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let u=Eo(n.focus.origin,"previous");bo(u)&&s.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=hw(u))s.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!V(u)||l.has(u)||u.isEmpty()||s.has(u))break;i.pop()}if(i.length===0&&n.isCollapsed()){const u=Bi(n.anchor),d=Bi(n.anchor.getFlipped()),f=p=>_o(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(n.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(gw(M1(this),"next"));return rd()||(this._cachedNodes=r),r}setTextNodeRange(t,r,n,i){return this.anchor.set(t.__key,r,"text"),this.focus.set(n.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const r=t[0],n=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=A1(this);let u="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(V(h)&&!h.isInline()){d||(u+=`
24
+ `);let p="";for(const m of vo(h)){const g=Su(h,m);g!==null&&(p+=g.getTextContent())}p!==""?(u+=p,d=!1):d=!h.isEmpty()}else if(d=!1,se(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=s<l?p.slice(s,l):p.slice(l,s)):p=a?p.slice(s):p.slice(l):h===n&&(p=a?p.slice(0,l):p.slice(0,s)),u+=p}else!dt(h)&&!ci(h)||h===n&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const r=Ut(),n=r.getEditorState()._selection,i=z6(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,a,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(a.key,a.offset,a.type,!0),s&&(this.dirty=!0),Xs(this)}clone(){const t=this.anchor,r=this.focus;return new Pu($a(t.key,t.offset,t.type),$a(r.key,r.offset,r.type),this.format,this.style)}toggleFormat(t){this.format=_u(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const r=gs[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(Sh(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let a=r,s=n;!this.isCollapsed()&&n.isBefore(r)&&(a=n,s=r),a.type==="element"&&(function(v,_,x,S){const E=v.getNode(),k=E.getChildAtIndex(v.offset),R=$r();if(R.setFormat(x),R.setStyle(S),Ad(k))k.splice(0,0,[R]);else if(k!==null){const T=mr(E)?qt().append(R):R;k.insertBefore(T)}else if(mr(E)){const T=E.getLastChild();V(T)&&!T.isInline()&&T.isEmpty()?T.append(R):E.append(qt().append(R))}else E.append(R);v.is(_)&&_.set(R.__key,0,"text"),v.set(R.__key,0,"text")})(a,s,i,o),s.type==="element"&&ku(s,Bi(ki(s,"next")));const l=a.offset;let u=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];se(h)||ne(26);const p=h.getTextContent().length,m=h.getParentOrThrow();let g=d[f-1];if(f===1&&s.type==="element"&&(u=p,s.set(a.key,u,"text")),this.isCollapsed()&&l===p&&(Ui(h)||!h.canInsertTextAfter()||!m.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let _;if(se(v)&&v.canInsertTextBefore()&&!Ui(v)?_=v:(_=$r(),_.setFormat(i),_.setStyle(o),m.canInsertTextAfter()?h.insertAfter(_):m.insertAfter(_)),_.select(0,0),h=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Ui(h)||!h.canInsertTextBefore()||!m.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let _;if(!se(v)||Ui(v)?(_=$r(),_.setFormat(i),m.canInsertTextBefore()?h.insertBefore(_):m.insertBefore(_)):_=v,_.select(),h=_,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(ns()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=$r(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=g.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||V(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),O6(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(ru(h)){const S=$r(t);return S.select(),void h.replace(S)}const v=h.getFormat(),_=h.getStyle();if(l!==u||v===i&&_===o){if(vu(h)){const S=$r(t);return S.setFormat(i),S.setStyle(o),S.select(),void h.replace(S)}}else{if(h.getTextContent()!==""){const S=$r(t);if(S.setFormat(i),S.setStyle(o),S.select(),l===0)h.insertBefore(S,!1);else{const[E]=h.splitText(l);E.insertAfter(S,!1)}return void(S.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}h.setFormat(i),h.setStyle(o)}const x=u-l;h=h.spliceText(l,x,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=v,this.style=_,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const v=new Set([...h.getParentKeys(),...g.getParentKeys()]),_=V(h)?h:h.getParentOrThrow();let x=V(g)?g:g.getParentOrThrow(),S=g;if(!_.is(x)&&x.isInline())do S=x,x=x.getParentOrThrow();while(x.isInline());if(s.type==="text"&&(u!==0||g.getTextContent()==="")||s.type==="element"&&g.getIndexWithinParent()<u)if(se(g)&&!ru(g)&&u!==g.getTextContentSize()){if(g.isSegmented()){const A=$r(g.getTextContent());g.replace(A),g=A}Nr(s.getNode())||s.type!=="text"||(se(g)||ne(395),g=g.spliceText(0,u,"")),v.add(g.__key)}else{const A=g.getParentOrThrow();A.canBeEmpty()||A.getChildrenSize()!==1?g.remove():A.remove()}else v.add(g.__key);const E=x.getChildren(),k=new Set(d),R=_.is(x),T=_.isInline()&&h.getNextSibling()===null?_:h;for(let A=E.length-1;A>=0;A--){const N=E[A];if(N.is(h)||V(N)&&N.isParentOf(h))break;N.isAttached()&&(!k.has(N)||N.is(S)?R||T.insertAfter(N,!1):N.remove())}if(!R){let A=x,N=null;for(;A!==null;){const P=A.getChildren(),O=P.length;(O===0||P[O-1].is(N))&&(v.delete(A.__key),N=A),A=A.getParent()}}if(ru(h))if(l===p)h.select();else{const A=$r(t);A.select(),h.replace(A)}else h=h.spliceText(l,p-l,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let A=1;A<f;A++){const N=d[A],P=N.__key;v.has(P)||N.remove()}}}removeText(){const t=_e()===this;n0(this,vte(M1(this))),t&&_e()!==this&&Cn(this)}formatText(t,r=null){D6(this,t,r)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const r=this.anchor.getNode();if(this.anchor.type==="element"&&V(r)&&Bn(r)!==null){let g=r.isShadowRoot()?r.getFirstChild()??r.append(qt()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&g!==null&&!V(g)){const v=qt();g.insertBefore(v),g=v}if(g!==null){g.selectStart();const v=_e();return ie(v)||ne(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&mr(r)){const g=J_(t),v=g.getLastDescendant();return r.splice(this.anchor.offset,0,g.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=ir(n,Mn);const o=t[t.length-1];if(V(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=tf(this);i.splice(g,0,t),o.selectEnd()}return}if(!t.some(g=>(V(g)||dt(g))&&!g.isInline())){V(i)||ne(211,n.constructor.name,n.getType());const g=tf(this);return i.splice(g,0,t),void o.selectEnd()}if(V(i)&&Bn(i)!==null){const g=tf(this),v=$1(t);i.splice(g,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(g,g))}if(i===null){const g=J_(t),v=g.getLastDescendant();let _=ki(this.anchor,"next");for(const x of g.getChildren())_=EM(x,_);return void(v!==null&&v.selectEnd())}if(V(i)&&!i.isParentRequired()&&!mr(i.getParentOrThrow())){const g=tf(this),v=$1(t);i.splice(g,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(g,g))}const a=J_(t),s=a.getLastDescendant(),l=a.getChildren(),u=!V(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(n=this.anchor.getNode(),i=ir(n,Mn));const d=l[l.length-1];let f=l[0];var h;V(h=f)&&Mn(h)&&!h.isEmpty()&&V(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(V(i)||ne(211,n.constructor.name,n.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&ne(212,n.constructor.name,n.getType()),(function(g,v){const _=v.getParentOrThrow().getLastChild();let x=v;const S=[v];for(;x!==_;)x.getNextSibling()||ne(140),x=x.getNextSibling(),S.push(x);let E=g;for(const k of S)E=E.insertAfter(k)})(i,f));const p=ir(s,Mn);u&&V(p)&&(u.canMergeWhenEmpty()||Mn(d))&&(p.append(...u.getChildren()),u.remove()),V(i)&&i.isEmpty()&&i.remove(),s.selectEnd();const m=V(i)?i.getLastChild():null;ci(m)&&p!==i&&m.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&mr(t)){const s=qt();return t.splice(this.anchor.offset,0,[s]),s.select(),s}const r=tf(this),n=ir(this.anchor.getNode(),Mn);if(n!==null&&Bn(n)!==null)return null;V(n)||ne(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...o),a.selectStart(),a):null}insertLineBreak(t){const r=Wo();if(this.insertNodes([r]),t){const n=r.getParentOrThrow(),i=r.getIndexWithinParent();n.select(i,i)}}extract(){const t=[...this.getNodes()],r=t.length;let n=t[0],i=t[r-1];const[o,a]=A1(this),s=this.isBackward(),[l,u]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(r===0)return[];if(r===1){if(se(n)&&!this.isCollapsed()){const h=n.splitText(d,f),p=d===0?h[0]:h[1];return p?(l.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[n]}if(se(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),se(i)){const h=i.getTextContent().length;f===0?t.pop():f!==h&&([i]=i.splitText(f),t[t.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,r,n){if(U0(this,t,r,n))return;const i=t==="move",o=Ut(),a=fi(Di(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();l===null||s===null||!V(u)||u.isInline()||u.canBeEmpty()||G0(s,o,l);const d=id(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=se(u)?ll(u,d,o):null),this.dirty){const h=id(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const m=this.anchor.getNode();p=se(m)?ll(m,h,o):null}p&&f&&z0(a,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&se(u)&&u.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const h=Lt(u,r?"previous":"next").getNodeAtCaret();if(se(h)){if(!i){const p=h.getTextContentSize();return r?this.focus.set(h.__key,p-1,"text"):this.focus.set(h.__key,1,"text"),void(this.dirty=!0)}{const p=o.getElementByKey(h.getKey()),m=p?ll(h,p,o):null;if(m){const g=r?m.length:0;z0(a,m,g,m,g)}}}}if(I6(a,t,r?"backward":"forward",n),a.rangeCount>0){const h=av(a,o._rootElement),p=h||a.getRangeAt(0),m=this.anchor.getNode(),g=Nr(m)?m:sM(m);this.applyDOMRange(p),this.dirty=!0,!i&&(P6(this,r,g),(h?a.direction!=="backward":a.anchorNode===p.startContainer&&a.anchorOffset===p.startOffset)||F6(this))}n==="lineboundary"&&U0(this,t,r,n,"decorators")}forwardDeletion(t,r,n){if(!n&&(t.type==="element"&&V(r)&&t.offset===r.getChildrenSize()||t.type==="text"&&t.offset===r.getTextContentSize())){const i=r.getParent(),o=r.getNextSibling()||(i===null?null:i.getNextSibling());if(V(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const r=this.isCollapsed();if(this.isCollapsed()){const n=this.anchor;let i=n.getNode();if(this.forwardDeletion(n,i,t))return;const o=cv(ki(n,t?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(bo(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(V(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Bi(l);n0(this,qo(u,u)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(gl(l)){if(V(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(dt(l.origin)){if(!l.origin.isIsolated())if(vo(l.origin).length>0){if(V(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=M0();u.add(l.origin.getKey()),Cn(u)}}else if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&V(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=M0();u.add(l.origin.getKey()),Cn(u)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:u}=s;return vo(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(n0(this,qo(!l.origin.isEmpty()&&u.isEmpty()?zu(Lt(u,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if(Bn(l)!==null)return;if(V(l)&&l.isShadowRoot())break;l=l.getParent()}}const a=this.focus;if(W_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&JR(this,n.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=n.type==="text"?n.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,u=s.getTextContentSize();if(s.is(i)||t&&l!==u||!t&&l!==0)return void QR(s,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,u=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==u)return void QR(i,t,l)}(function(l,u){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const m=d.offset,g=f.offset,v=m<g,_=v?m:g,x=v?g:m,S=x-1;_!==S&&(function(E){return!(nM(E)||yee(E))})(h.getTextContent().slice(_,x))&&(u?f.set(f.key,S,f.type):d.set(d.key,S,d.type))}})(this,t)}}if(this.removeText(),t&&!r&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const n=this.anchor.getNode();n.isEmpty()&&Nr(n.getParent())&&n.getPreviousSibling()===null&&JR(this,n),$6()}}deleteLine(t){const r=T1(this.anchor);if(r!==null&&dt(Bo(r)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&W_(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):ir(this.anchor.getNode(),Mn)!==ir(this.focus.getNode(),Mn)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(t)):this.removeText()}deleteWord(t){if(this.isCollapsed()){const r=this.anchor,n=r.getNode();if(this.forwardDeletion(r,n,t))return;W_(this,t,"word")}this.isCollapsed()?this.deleteCharacter(t):this.removeText()}isBackward(){const t=this._cachedIsBackward;if(t!==null)return t;const r=this.focus.isBefore(this.anchor);return rd()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function ur(e){return e instanceof nv}function N6(e,t){if(ur(e)){for(const _ of e.getNodes())R1(_)&&_.setFormat(t(_.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void bn(null);const r=[];for(const _ of e.getNodes())se(_)?r.push(_):V(_)?_.setTextFormat(t(_.getTextFormat())):R1(_)&&_.setFormat(t(_.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void bn(null);const i=e.anchor,o=e.focus,a=e.isBackward(),s=a?o:i,l=a?i:o;let u=0,d=r[0],f=s.type==="element"?0:s.offset;if(s.type==="text"&&f===d.getTextContentSize()&&(u=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const m=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===m)return;const _=t(d.getFormat());if(Ui(d)||f===0&&m===d.getTextContentSize())d.setFormat(_);else{const x=d.splitText(f,m),S=f===0?x[0]:x[1];S.setFormat(_),s.type==="text"&&s.set(S.__key,0,"text"),l.type==="text"&&l.set(S.__key,m-f,"text")}return void(e.format=_)}f===0||Ui(d)||([,d]=d.splitText(f),f=0);const g=t(d.getFormat());d.setFormat(g);const v=t(p.getFormat());m>0&&(m===p.getTextContentSize()||Ui(p)||([p]=p.splitText(m)),p.setFormat(v));for(let _=u+1;_<h;_++){const x=r[_];x.setFormat(t(x.getFormat()))}s.type==="text"&&s.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,m,"text"),e.format=g|v}function bee(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&N6(e,n=>{for(const[i,o]of r)n=_u(n,i,o?gs[i]:0);return n})}function D6(e,t,r=null){const n=r===null&&ie(e)?_u(e.format,t,null):r;N6(e,i=>_u(i,t,n))}function WR(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function A1(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[r,n]=t;return r.type==="element"&&n.type==="element"&&r.key===n.key&&r.offset===n.offset?[0,0]:[WR(r),WR(n)]}function JR(e,t){for(let r=t;r;r=r.getParent()){if(V(r)){if(r.collapseAtStart(e))return!0;if(mr(r))break}if(r.getPreviousSibling())break}return!1}function F6(e){const t=e.focus,r=e.anchor,n=r.key,i=r.offset,o=r.type;r.set(t.key,t.offset,t.type,!0),t.set(n,i,o,!0)}function I6(e,t,r,n){e.modify(t,r,n)}function P6(e,t,r){const n=e.getNodes(),i=n.filter(s=>od(s,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],a=V(o)?o:o.getParentOrThrow();return t?a.selectStart():a.selectEnd(),!0}function W_(e,t,r){if(U0(e,"extend",t,r))return;const n=Ut(),i=fi(Di(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,a=n._rootElement,s=e.anchor,l=e.focus.getNode();a===null||o===null||!V(l)||l.isInline()||l.canBeEmpty()||G0(o,n,a);const u=N=>{const P=N.getNode(),O=n.getElementByKey(N.key);return O!==null&&N.type==="text"&&se(P)?ll(P,O,n):O},d=s.getNode(),f=u(s);if(f===null)return;const h=s.offset,p=e.isCollapsed(),m=e.focus,g=p?f:u(m);if(g===null)return;const v=m.offset;if(z0(i,g,v,g,v),I6(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const _=av(i,a)||i.getRangeAt(0),x=_.startContainer,S=_.startOffset;if(p&&r==="character"&&s.type==="text"&&se(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const N=Lt(d,t?"previous":"next").getNodeAtCaret();if(se(N)){const P=t?N.getTextContentSize()-1:1;return e.focus.set(N.__key,P,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&s.type==="text"){const N=t?0:d.getTextContentSize(),P=x===f?S:h!==N?N:-1;if(P>=0)return void(P!==h&&(e.focus.set(s.key,P,"text"),e.dirty=!0))}const[E,k,R,T]=t?[x,S,f,h]:[f,h,x,S],A=Nr(d)?d:sM(d);e.applyDOMRange({collapsed:!1,endContainer:R,endOffset:T,startContainer:E,startOffset:k}),e.dirty=!0,!P6(e,t,A)&&t&&F6(e),r==="lineboundary"&&U0(e,"extend",t,r,"decorators")}const yee=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function QR(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let u=0;u<o;u++){const d=u===o-1;if(s=a,a+=i[u].length,t&&a===r||a>r||d){i.splice(u,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(s,s))}function YR(e,t,r,n){let i,o=t,a=!1;if(tt(e)){let s=!1;const l=e.childNodes,u=l.length,d=n._blockCursorElement;o===u&&u>0&&(s=!0,o=u-1),Td(e,n)!==void 0||H0(e,n)||(a=!0);let f=l[o],h=!1;if(f===d)f=l[o+1],h=!0;else if(d!==null){const p=d.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,d)&&o--}if(i=wc(f),se(i))o=Ca(i,s?"next":"previous");else{let p=wc(e);if(p===null)return null;if(V(p)){const m=n.getElementByKey(p.getKey());m===null&&ne(214),[p,o]=wo(p,m,n).resolveChildIndex(p,m,e,t),V(p)||ne(215),s&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(V(v)&&(function(_,x,S){const E=_.getParent();return S===null||E===null||!E.canBeEmpty()||E!==S.getNode()})(v,0,r)){const _=s?v.getLastDescendant():v.getFirstDescendant();_===null?p=v:(v=_,p=V(v)?v:v.getParentOrThrow()),o=0}se(v)?(i=v,p=null,o=Ca(v,s?"next":"previous")):v!==p&&s&&!h&&(V(p)||ne(216),o=Math.min(p.getChildrenSize(),o+1))}else{const m=Bo(p),g=m!==null?m:p,v=g.getIndexWithinParent(),_=n.getElementByKey(p.getKey());let x="after";if(_!==null&&wc(e)===p){const S=wo(p,_,n);S.element!==_?x=S.resolveLeafPosition(_,e,t):t===0&&dt(p)&&(x="before")}o=x==="before"?v:v+1,p=g.getParentOrThrow()}if(V(p))return[$a(p.__key,o,"element"),a]}}else i=wc(e);return se(i)?[$a(i.__key,Ca(i,o,"clamp"),"text"),a]:null}function XR(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((r||!t)&&o===null&&V(a)&&a.isInline()){const s=a.getPreviousSibling();se(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else V(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):se(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&V(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&V(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){const s=a.getNextSibling();se(s)&&e.set(s.__key,0,"text")}}}function O6(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);XR(e,n,i),XR(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function T1(e){const t=fr(e.key);return t===null?null:lv(t)}function M6(e,t,r){const n=T1(e),i=T1(t);if(n===i||n!==null&&i!==null&&n.is(i))return!1;const o=r(n,i);if(n!==null)return V(n)?t.set(n.getKey(),o?n.getChildrenSize():0,"element"):t.set(n.getKey(),o?n.getTextContentSize():0,"text"),!0;const a=Bo(i);if(a===null)return!1;const s=a.getParent();if(s===null)return!1;const l=a.getIndexWithinParent();return t.set(s.getKey(),o?l+1:l,"element"),!0}function L6(e){const t=M6(e.anchor,e.focus,(r,n)=>(function(i,o,a,s){if(a!==null&&s!==null){const d=Bo(a),f=Bo(s);if(d!==null&&d.is(f)){for(const h of uv(d).values()){if(h===a.getKey())return!0;if(h===s.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(a!==null){const d=Bo(a),f=fr(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=Bo(s),u=fr(i.key);return l!==null&&u!==null&&!l.is(u)&&!l.isParentOf(u)&&u.isBefore(l)})(e.anchor,e.focus,r,n));return t&&(e.dirty=!0),t}function z6(e,t,r,n,i,o){if(e===null||r===null||!ap(i,e,r))return null;const a=YR(e,t,ie(o)?o.anchor:null,i);if(a===null)return null;const s=YR(r,n,ie(o)?o.focus:null,i);if(s===null)return null;const[l,u]=a,[d,f]=s;if(l.type==="element"&&d.type==="element"){const p=wc(e),m=wc(r);if(dt(p)&&dt(m))return null}const h=i._slotsUsed&&M6(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return O6(l,d),[l,d,u||f||h]}function td(e){return V(e)&&!e.isInline()}function U6(e,t,r,n,i,o){const a=Cs(),s=new Pu($a(e,t,i),$a(r,n,o),0,"");return s.dirty=!0,a._selection=s,s}function WS(){const e=$a("root",0,"element"),t=$a("root",0,"element");return new Pu(e,t,0,"")}function M0(){return new nv(new Set)}function JS(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!p1&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,d,f,h;if(ie(e)&&!l)return e.clone();{if(t===null)return null;const E=So(t,r._rootElement);if(u=E.anchorNode,d=E.focusNode,f=E.anchorOffset,h=E.focusOffset,(s||a===void 0)&&ie(e)&&!ap(r,u,d))return e.clone()}const p=z6(u,f,d,h,r,e);if(p===null)return null;const[m,g,v]=p;let _=0,x="";if(ie(e)){const E=e.anchor;if(m.key===E.key)_=e.format,x=e.style;else{const k=m.getNode();se(k)?(_=k.getFormat(),x=k.getStyle()):V(k)&&(_=k.getTextFormat(),x=k.getTextStyle())}}const S=new Pu(m,g,_,x);return v&&(S.dirty=!0),S}function _e(){return Cs()._selection}function Ed(){return Ut()._editorState._selection}function Hl(e,t,r,n=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(r<=u&&n>0||r<u&&n<0){const d=Math.max(0,u+n);i.set(l,d,"element"),o.set(l,d,"element"),ZR(e)}}else{const u=e.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(t.is(f)){const m=d.offset;(r<=m&&n>0||r<m&&n<0)&&d.set(l,Math.max(0,m+n),"element")}if(t.is(p)){const m=h.offset;(r<=m&&n>0||r<m&&n<0)&&h.set(l,Math.max(0,m+n),"element")}}ZR(e)}function ZR(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),a=n.getNode();if(e.isCollapsed()){if(!V(o))return;const s=o.getChildrenSize(),l=r>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(se(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text"),n.set(u.__key,d,"text")}return}if(V(o)){const s=o.getChildrenSize(),l=r>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(se(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(V(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(se(u)){let d=0;l&&(d=u.getTextContentSize()),n.set(u.__key,d,"text")}}}function L0(e,t,r,n,i){let o=null,a=0,s=null;n!==null?(o=n.__key,se(n)?(a=n.getTextContentSize(),s="text"):V(n)&&(a=n.getChildrenSize(),s="element")):i!==null&&(o=i.__key,se(i)?s="text":V(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=r.getChildrenSize()),e.set(r.__key,a,"element"))}function eA(e,t,r,n,i){e.type==="text"?e.set(r,e.offset+(t?0:i),"text"):e.offset>n.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function z0(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function tA(e,t,r){const n=id(e,t.getKey());if(V(t)){const i=wo(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function xee(e,t,r,n,i,o){const a=o.getRootNode(),s=Ou(a)||vs(a)?wh(a):null;if(i.has(C6)&&s!==o||s!==null&&rw(s,s))return;const l=So(n,o);let u;if(!ie(t))return void(e!==null&&ap(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[m,g]=tA(r,h,d.offset),[v,_]=tA(r,p,f.offset),x=t.format,S=t.style,E=t.isCollapsed();let k=m,R=v,T=!1;if(d.type==="text"?(k=se(h)?ll(h,m,r):null,T=h.getFormat()!==x||h.getStyle()!==S):ie(e)&&e.anchor.type==="text"&&(T=!0),f.type==="text"&&(R=se(p)?ll(p,v,r):null),k!==null&&R!==null){if(E&&(e===null||T||ie(e)&&(e.format!==x||e.style!==S))&&(function(A,N,P,O,D,U){A._inputState.collapsedSelectionFormat={format:N,key:D,offset:O,style:P,timeStamp:U}})(r,x,S,g,d.key,performance.now()),(n.type!=="Range"||!E)&&l.anchorOffset===g&&l.focusOffset===_&&l.anchorNode===k&&l.focusNode===R){if(s===null||!o.contains(s)){const A=s!==null?Uc(s):null;A!==null&&A!==r||i.has(C1)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(z0(n,k,g,R,_),pl&&t.isCollapsed()&&o!==null&&!i.has(C1)){const A=F1(o);if(A===null||!o.contains(A)){const N=wh(o.ownerDocument),P=N!==null?Uc(N):null;P!==null&&P!==r||o.focus({preventScroll:!0})}}if(!i.has(uee)&&t.isCollapsed()&&o!==null&&o===F1(o)){const A=ie(t)&&t.anchor.type==="element"?k.childNodes[g]||null:(u===void 0&&(u=Hee(n,o)),u);if(A!==null){let N;if(Ni(A)){const P=A.ownerDocument.createRange();P.selectNode(A),N=P.getBoundingClientRect()}else N=A.getBoundingClientRect();(function(P,O,D){const U=sw(D),B=lw(U);if(U===null||B===null)return;const q=D.getBoundingClientRect();if(O.bottom<q.top)return;let{top:Q,bottom:J}=O,te=0,ae=0,Z=D;for(;Z!==null;){const W=Z===U.body;if(W){const oe=B.visualViewport;if(oe){const xe=oe.offsetTop;te=xe,ae=xe+oe.height}else te=0,ae=Di(P).innerHeight;const Se=B.getComputedStyle(U.documentElement),be=parseFloat(Se.scrollPaddingTop),ue=parseFloat(Se.scrollPaddingBottom);isFinite(be)&&(te+=be),isFinite(ue)&&(ae-=ue)}else{const oe=Z===D?q:Z.getBoundingClientRect();te=oe.top,ae=oe.bottom}let le=0;if(Q<te?le=-(te-Q):J>ae&&(le=J-ae),le!==0)if(W)B.scrollBy(0,le);else{const oe=Z.scrollTop;Z.scrollTop+=le;const Se=Z.scrollTop-oe;Q-=Se,J-=Se}if(W)break;Z=Mu(Z)}})(r,N,o)}}(function(A){A._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function See(e){let t=_e()||Ed();t===null&&(t=rn().selectEnd()),t.insertNodes(e)}function B6(e,t){for(const r of e.split(/(\r?\n|\t)/))r===`
25
+ `||r===`\r
26
+ `?t.linebreak():r===" "?t.tab():r!==""&&t.text(r)}function Sh(e){const t=[];return B6(e,{linebreak:()=>t.push(Wo()),tab:()=>t.push(wd()),text:r=>t.push($r(r))}),t}function $1(e){const t=[];for(const r of e)ci(r)||(!V(r)&&!dt(r)||r.isInline()?t.push(r):V(r)&&t.push(...$1(r.getChildren())));return t}function tf(e){let t=e;e.isCollapsed()||t.removeText();const r=_e();ie(r)&&(t=r),ie(t)||ne(161);const n=t.anchor;let i=n.getNode(),o=n.offset;for(;!Mn(i)&&Bn(i)===null;){const a=i;if([i,o]=wee(i,o),a.is(i))break}return o}function wee(e,t){const r=e.getParent();if(!r){const i=qt();return rn().append(i),i.select(),[rn(),0]}if(se(e)){const i=e.splitText(t);if(i.length===0)return[r,e.getIndexWithinParent()];const o=t===0?0:1;return[r,i[0].getIndexWithinParent()+o]}if(!V(e)||t===0)return[r,e.getIndexWithinParent()];const n=e.getChildAtIndex(t);if(n){const i=new Pu($a(e.__key,t,"element"),$a(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function rA(e){return ci(e)||qee(e)||se(e)||e.isParentRequired()}function J_(e){const t=qt();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(rA(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(ci(i)&&(o===void 0||!rA(o)))continue}r.append(i)}else t.append(i),r=null}return t}function U0(e,t,r,n,i="decorators-and-blocks"){if(t==="move"&&n==="character"&&!e.isCollapsed()){const[d,f]=r===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(d.key,d.offset,d.type),!0}const o=ki(e.focus,r?"previous":"next"),a=n==="lineboundary",s=t==="move";let l=o,u=i==="decorators-and-blocks";if(!mw(l)){for(const d of l){u=!1;const{origin:f}=d;if(!dt(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(u)for(const d of cv(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(bo(d))d.origin.isInline()||(l=d);else{if(V(d.origin))continue;dt(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&dt(l.origin)&&l.origin.isKeyboardSelectable()){const d=M0();return d.add(l.origin.getKey()),Cn(d),!0}return l=Bi(l),s&&ku(e.anchor,l),ku(e.focus,l),u||!a}let xn=null,Hr=null,Ei=!1,Q_=!1,e0=!1;const Y_=new Set;let t0=0;const nA={characterData:!0,childList:!0,subtree:!0};function rd(){return Ei||xn!==null&&xn._readOnly}function _n(){Ei&&ne(13)}function j6(){t0>99&&ne(14)}function Cs(){return xn===null&&ne(195,q6()),xn}function Eee(e){Cs()!==null&&Hr===null&&(Hr=e),Hr!==e&&RO(378)}function Ut(){return Hr===null&&ne(337,q6()),Hr}function kee(){Ut()._dirtyType=2}function q6(){let e=0;const t=new Set,r=nd.version;if(typeof window<"u")for(const i of uM(document)){const o=sp(i);if(ov(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===r&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let n=` Detected on the page: ${e} compatible editor(s) with version ${r}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function V6(){return Hr}function iA(e,t,r){const n=t.__type,i=Y6(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const a=o.length;for(let s=0;s<a&&(o[s](t),t.isAttached());s++);}function oA(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function G6(e,t){if(!t)return;const r=e._updateTags;let n=t;Array.isArray(t)||(n=[t]);for(const i of n)r.add(i)}function Cee(e){return B0(e,Ut()._nodes)}function B0(e,t){const r=e.type,n=t.get(r);n===void 0&&ne(17,r);const i=n.klass;e.type!==i.getType()&&ne(18,i.name);const o=i.importJSON(e),a=e.children;if(V(o)&&Array.isArray(a))for(let l=0;l<a.length;l++){const u=B0(a[l],t);o.append(u)}const s=e.$slots;if(s){os(o)||ne(379,i.name);for(const l in s)bM(o,l,B0(s[l],t))}return o}function aA(e,t,r){const n=xn,i=Ei,o=Hr;xn=t,Ei=!0,Hr=e;try{return r()}finally{xn=n,Ei=i,Hr=o}}function Zs(e,t){const r=e0;e0=!0;try{(function(n,i){const o=n._pendingEditorState,a=n._rootElement,s=n._headless||a===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&sA(n,n._deferred));const l=n._editorState,u=l._selection,d=o._selection,f=n._dirtyType!==0,h=xn,p=Ei,m=Hr,g=n._updating,v=n._observer;let _=null;if(n._pendingEditorState=null,n._editorState=o,!s&&f&&v!==null){Hr=n,xn=o,Ei=!1,n._updating=!0;try{const A=n._dirtyType,N=n._dirtyElements,P=n._dirtyLeaves;v.disconnect(),_=jZ(l,o,n,A,N,P)}catch(A){if(A instanceof Error&&n._onError(A),Q_)throw A;return Q6(n,null,a,o),MO(n),n._dirtyType=2,Q_=!0,Zs(n,l),void(Q_=!1)}finally{v.observe(a,nA),n._updating=g,xn=h,Ei=p,Hr=m}}o._readOnly||(o._readOnly=!0);const x=n._dirtyLeaves,S=n._dirtyElements,E=n._normalizedNodes,k=n._updateTags;f&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set),n._updateTags=new Set,(function(A,N){const P=A._decorators;let O=A._pendingDecorators||P;const D=N._nodeMap;let U;for(U in O)D.has(U)||(O===P&&(O=rM(A)),delete O[U])})(n,o);const R=s?null:fi(Di(n));if(n._editable&&R!==null&&(f||d===null||d.dirty||!d.is(u))&&a!==null&&!k.has(cee)){Hr=n,xn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const A=n._blockCursorElement;A!==null&&G0(A,n,a),xee(u,d,n,R,k,a)}(function(A,N,P){let O=A._blockCursorElement;if(ie(P)&&P.isCollapsed()&&P.anchor.type==="element"&&N.contains(F1(N))){const D=P.anchor,U=D.getNode(),B=D.offset;let q=!1,Q=null;if(B===U.getChildrenSize())r0(U.getChildAtIndex(B-1))&&(q=!0);else{const J=U.getChildAtIndex(B);if(J!==null&&r0(J)){const te=J.getPreviousSibling();(te===null||r0(te))&&(q=!0,Q=A.getElementByKey(J.__key))}}if(q){const J=wo(U,A.getElementByKey(U.__key),A).element;return O===null&&(A._blockCursorElement=O=(function(te){const ae=te.theme,Z=hr().createElement("div");Z.contentEditable="false",Z.setAttribute("data-lexical-cursor","true");let W=ae.blockCursor;if(W!==void 0){if(typeof W=="string"){const le=as(W);W=ae.blockCursor=le}W!==void 0&&Z.classList.add(...W)}return Z})(A._config)),N.style.caretColor="transparent",void(Q===null?J.appendChild(O):J.insertBefore(O,Q))}}O!==null&&G0(O,A,N)})(n,a,d)}finally{v!==null&&v.observe(a,nA),Hr=m,xn=h}}_!==null&&(function(A,N,P,O,D){const U=Array.from(A._listeners.mutation),B=U.length;for(let q=0;q<B;q++){const[Q,J]=U[q];for(const te of J){const ae=N.get(te);ae!==void 0&&Q(ae,{dirtyLeaves:O,prevEditorState:D,updateTags:P})}}})(n,_,k,x,l),ie(d)||d===null||u!==null&&u.is(d)||n.dispatchCommand(JO,void 0);const T=n._pendingDecorators;T!==null&&(n._decorators=T,n._pendingDecorators=null,Lf("decorator",n,!0,T)),(function(A,N,P){const O=cA(N),D=cA(P);O!==D&&Lf("textcontent",A,!0,D)})(n,i||l,o),Lf("update",n,!0,{dirtyElements:S,dirtyLeaves:x,editorState:o,mutatedNodes:_,normalizedNodes:E,prevEditorState:i||l,tags:k}),!g&&sA(n,n._deferred),(function(A){const N=A._updates;if(N.length===0)return void(A._cascadeCount=0);if((function(O){Y_.has(O)||(Y_.add(O),setTimeout(()=>{Y_.delete(O),O._cascadeCount=0},0))})(A),A._cascadeCount++>99)return A._updates=[],A._cascadeCount=0,void A._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${A._config.namespace}`));const P=N.shift();if(P){const[O,D]=P;iv(A,O,D)}})(n)})(e,t)}finally{e0=r}}function Lf(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],a=Array.from(o);for(const[s,l]of a){l&&l();const u=s(...n);o.has(s)?o.set(s,u):u&&u()}}finally{t._updating=i}}function K6(e,t,r,n){const i=nw(e);let o;if(!e0)for(let a=0;a<i.length;a++)i[a]._updating||(i[a]._cascadeCount=0);for(let a=4;a>=0;a--)for(let s=0;s<i.length;s++){const l=i[s];if(s>0&&l._updating){o=l;break}const u=l._commands.get(t);if(u!==void 0){const d=u[a];if(d.size>0){let f=!1;if(go(l,()=>{for(const h of d)if(h(r,n))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{K6(o,t,r,n)}),!1}function sA(e,t){if(e._deferred=[],t.length!==0){const r=e._updating;e._updating=!0;try{for(let n=0;n<t.length;n++)t[n]()}finally{e._updating=r}}}function lA(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,a]=i,s=e._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(n=!0),a.discrete&&(s===null&&ne(191),s._flushSync=!0),l&&e._deferred.push(l),G6(e,a.tag)),s==null?iv(e,o,a):o()}}return n}function iv(e,t,r){const n=e._updateTags;let i,o=!1,a=!1;r!==void 0&&(i=r.onUpdate,G6(e,r.tag),o=r.skipTransforms||!1,a=r.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=H6(l||s),u=!0),l._flushSync=a;const d=xn,f=Ei,h=Hr,p=e._updating;xn=l,Ei=!1,e._updating=!0,Hr=e;const m=e._headless||e.getRootElement()===null;ew(null);try{u&&(m?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(x,S){const E=x.getEditorState()._selection,k=fi(Di(x));return ie(E)||E==null?JS(E,k,x,S):E.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=lA(e,o),(function(x,S){const E=S.getEditorState()._selection,k=x._selection;if(ie(k)){const R=k.anchor,T=k.focus;let A;if(R.type==="text"&&(A=R.getNode(),A.selectionTransform(E,k)),T.type==="text"){const N=T.getNode();A!==N&&N.selectionTransform(E,k)}}})(l,e),e._dirtyType!==0&&(o?(function(x,S){const E=S._dirtyLeaves,k=x._nodeMap;for(const R of E){const T=k.get(R);se(T)&&T.isAttached()&&T.isSimpleText()&&!T.isUnmergeable()&&AR(T)}})(l,e):(function(x,S){const E=S._dirtyLeaves,k=S._dirtyElements,R=x._nodeMap,T=ns(),A=new Map;let N=E,P=N.size,O=k,D=O.size;for(;P>0||D>0;){if(P>0){S._dirtyLeaves=new Set;for(const U of N){const B=R.get(U);se(B)&&B.isAttached()&&B.isSimpleText()&&!B.isUnmergeable()&&AR(B),B!==void 0&&oA(B,T)&&iA(S,B,A),E.add(U)}if(N=S._dirtyLeaves,P=N.size,P>0){t0++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map,O.delete("root")&&O.set("root",!0);for(const U of O){const B=U[0],q=U[1];if(k.set(B,q),!q)continue;const Q=R.get(B);Q!==void 0&&oA(Q,T)&&iA(S,Q,A)}N=S._dirtyLeaves,P=N.size,O=S._dirtyElements,D=O.size,t0++}S._dirtyLeaves=E,S._dirtyElements=k})(l,e),lA(e),(function(x,S,E,k){const R=x._nodeMap,T=S._nodeMap,A=[];for(const[O]of k){const D=T.get(O);D!==void 0&&(D.isAttached()||(V(D)&&$0(D,O,R,T,A,k),R.has(O)||k.delete(O),A.push(O)))}for(const O of E){const D=T.get(O);D===void 0||D.isAttached()||(os(D)&&D.__slots!==null&&$0(D,O,R,T,A,E),R.has(O)||E.delete(O),A.push(O))}for(const O of A)T.delete(O);const N=Ut(),P=N._compositionKey;P===null||T.has(P)||(N._compositionKey=null)})(s,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const _=l._selection;if(ie(_)){e._slotsUsed&&L6(_);const x=l._nodeMap,S=_.anchor.key,E=_.focus.key;x.get(S)!==void 0&&x.get(E)!==void 0||ne(19)}else ur(_)&&_._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Zs(e)}finally{xn=d,Ei=f,Hr=h,e._updating=p,t0=0}e._dirtyType!==0||e._deferred.length>0||(function(v,_){const x=_.getEditorState()._selection,S=v._selection;if(S!==null){if(S.dirty||!S.is(x))return!0}else if(x!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,Zs(e)):u&&Mee(()=>{Zs(e)}):(l._flushSync=!1,u&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function go(e,t,r){Hr===e&&r===void 0?t():iv(e,t,r)}function Ree(e){if(mr(e)){let t=null;for(const r of e.getChildren())t=r.isInline()?(t||r.replace(r.createParentElementNode())).append(r):null}}class Ti extends Gi{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:Ree,extends:Gi})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ne(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return RZ[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getChildrenKeys(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r.__key),r=r.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&vo(this).length===0}isDirty(){const t=Ut()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(t)}getAllTextNodes(){const t=[];for(const n of vo(this)){const i=Su(this,n);V(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(se(r)&&t.push(r),V(r)){const n=r.getAllTextNodes();t.push(...n)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;V(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;V(t);){const r=t.getLastChild();if(r===null)break;t=r}return t}getDescendantByIndex(t){const r=this.getChildren(),n=r.length;if(t>=n){const o=r[n-1];return V(o)&&o.getLastDescendant()||o||null}const i=r[t];return V(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:fr(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&ne(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:fr(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&ne(96,this.__key),t}getChildAtIndex(t){const r=this.getChildrenSize();let n,i;if(t<r/2){for(n=this.getFirstChild(),i=0;n!==null&&i<=t;){if(i===t)return n;n=n.getNextSibling(),i++}return null}for(n=this.getLastChild(),i=r-1;n!==null&&i>=t;){if(i===t)return n;n=n.getPreviousSibling(),i--}return null}getTextContent(){let t=_M(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContent(),V(o)&&i!==n-1&&!o.isInline()&&(t+=Yl)}return t}getTextContentSize(){let t=(function(i){let o=0;for(const a of vo(i)){const s=Su(i,a);s!==null&&(o+=s.getTextContentSize())}return o})(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContentSize(),V(o)&&i!==n-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const r=T0[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=gs[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return _u(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){_n();const n=_e();let i=t,o=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(se(l)||V(l))return l.select(0,0)}else if(!(t!==void 0&&t!==a||r!==void 0&&r!==a)){const l=this.getLastChild();if(se(l)||V(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return ie(n)?(n.anchor.set(s,i,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):U6(s,i,s,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(r=>r.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const r=this.getWritable();return r.__dir=t,r}setFormat(t){return this.getWritable().__format=t!==""&&T0[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const r=this.getWritable();return r.__textFormat=t,r}setTextStyle(t){const r=this.getWritable();return r.__textStyle=t,r}setIndent(t){return this.getWritable().__indent=t,this}splice(t,r,n){I0(this)&&ne(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();t+r<=i||ne(226,String(t),String(r),String(i));for(const p of n);const a=o.__key,s=[],l=[],u=this.getChildAtIndex(t+r);let d=null,f=i-r+n.length;if(t!==0)if(t===i)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){p===null&&ne(100);const g=p.getNextSibling(),v=p.__key;rs(p.getWritable()),l.push(v),p=g}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const m=p.getWritable();m.__parent===a&&f--,rs(m);const g=p.__key;if(h===null)o.__first=g,m.__prev=null;else{const v=h.getWritable();v.__next=g,m.__prev=v.__key}p.__key===a&&ne(76),m.__parent=a,s.push(g),h=p}if(t+r===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const m=h.getWritable();p.__prev=h.__key,m.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=_e();if(ie(p)){const m=new Set(l),g=new Set(s),{anchor:v,focus:_}=p;uA(v,m,g)&&L0(v,v.getNode(),this,d,u),uA(_,m,g)&&L0(_,_.getNode(),this,d,u),f!==0||this.canBeEmpty()||mr(this)||this.remove()}}return o}getDOMSlot(t){return new Ic(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){const n=this.getIndent();n>0&&(r.style.paddingInlineStart=40*n+"px",r.setAttribute("data-lexical-indent",String(n)));const i=this.getDirection();i&&(r.dir=i)}return{element:r}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),n=this.getTextStyle();return r===0&&n===""||mr(this)||this.getChildren().some(se)||(r!==0&&(t.textFormat=r),n!==""&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,r){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,r,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,r){const n=wo(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(i==null?(n.insertChild(a),i=a):i!==a&&n.replaceChild(a,i),i=i.nextSibling)}}}function V(e){return e instanceof Ti}function uA(e,t,r){let n=e.getNode();for(;n;){const i=n.__key;if(t.has(i)&&!r.has(i))return!0;n=n.getParent()}return!1}class QS extends Gi{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ne(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots)}decorate(t,r){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function dt(e){return e instanceof QS}class kd extends Ti{__cachedText;static getType(){return"root"}static clone(){return new kd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){ne(51)}getTextContent(){const t=this.__cachedText;return t===null||!rd()&&Ut()._dirtyType!==0?super.getTextContent():t}remove(){ne(52)}replace(t){ne(53)}insertBefore(t){ne(54)}insertAfter(t){ne(55)}updateDOM(t,r){return!1}splice(t,r,n){for(const i of n)V(i)||dt(i)||ne(282);return super.splice(t,r,n)}static importJSON(t){return rn().updateFromJSON(t)}collapseAtStart(){return!0}}function Nr(e){return e instanceof kd}function H6(e){return new op(FO(e._nodeMap),null,e._slotsUsed)}function YS(){return new op(new Map([["root",new kd]]),null,!1)}function N1(e){const t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&ne(130,r.name),V(e)){const i=t.children;Array.isArray(i)||ne(59,r.name);const o=e.getChildren();for(let a=0;a<o.length;a++){const s=N1(o[a]);i.push(s)}}const n=vo(e);if(n.length>0){const i={};for(const o of n){const a=Su(e,o);a===null&&ne(366,r.name,o),i[o]=N1(a)}t.$slots=i}return t}function Aee(e){return e instanceof op}class op{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,r=null,n=!1){this._nodeMap=t,this._selection=r||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,r){return aA(r&&r.editor||null,this,t)}clone(t){const r=new op(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return aA(null,this,()=>({root:N1(rn())}))}}class XS extends Ti{static getType(){return"artificial"}createDOM(t){return hr().createElement("div")}}class Cd extends Gi{static getType(){return"linebreak"}static clone(t){return new Cd(t.__key)}constructor(t){super(t)}getTextContent(){return`
27
+ `}createDOM(){return hr().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>W6(t)||J6(t)?null:{conversion:Tee,priority:0}}}static importJSON(t){return Wo().updateFromJSON(t)}}function Tee(e){return{node:Wo()}}function Wo(){return ra(new Cd)}function ci(e){return e instanceof Cd}function W6(e){const t=e.parentElement;if(t!==null&&ad(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&j0(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&j0(n))return!0}}return!1}function J6(e){const t=e.parentElement;if(t!==null&&ad(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&j0(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&j0(n))return!0}return!1}function j0(e){return Ni(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class Rd extends Ti{static getType(){return"paragraph"}static clone(t){return new Rd(t.__key)}createDOM(t){const r=hr().createElement("p"),n=Bc(t.theme,"paragraph");return n!==void 0&&r.classList.add(...n),r}updateDOM(t,r,n){return!1}static importDOM(){return{p:t=>({conversion:$ee,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){this.isEmpty()&&r.append(hr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return qt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(se);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=qt();n.setTextFormat(t.format),n.setTextStyle(t.style);const i=this.getDirection();return n.setDirection(i),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,r),n}collapseAtStart(){const t=this.getChildren();if(t.length===0||se(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function $ee(e){const t=qt();if(Ma(t,e),Lu(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in T0&&t.setFormat(r)}return Co(t,e),{node:t}}function qt(){return ra(new Rd)}function Ad(e){return e instanceof Rd}function Nee(e){console.warn(e)}const ct=0,gc=1,Dee=4,Fee=-8;function Q6(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=YS(),e._pendingEditorState=n,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(s,l){const u=`__lexicalKey_${l._key}`;delete s[u]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),tM(r,e,"root"))}function Iee(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of cw(e)){const o=n.transform;if(!r.has(o)){r.add(o);const a=n.transform();a&&t.add(a)}if(i){const a=i.$transform;a&&t.add(a)}}return t}const q0={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=tw(t,e.getType());return r&&r.exportDOM!==void 0?r.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,r,n,i)=>V(e)&&e.extractWithChild(t,r,n),$getDOMSlot:(e,t,r)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,r,n)=>null,$shouldExclude:(e,t,r)=>V(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,r)=>!t||e.isSelected(t),$updateDOM:(e,t,r,n)=>e.updateDOM(t,r,n._config)};function ZS(e){const t=e||{},r=V6(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,a=YS(),s=t.namespace||(i!==null?i._config.namespace:iM()),l=t.editorState,u=[kd,ks,Cd,Sd,Rd,XS,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&r!==null)m=r._nodes;else{m=new Map;for(let v=0;v<u.length;v++){let _=u[v],x=null,S=null;if(_&&typeof _=="object"){const R=_;_=R.replace,x=R.with,S=R.withKlass||null}if(typeof _!="function"||!_.prototype||!(_===Gi||_.prototype instanceof Gi)){let R="<unknown>";try{R=JSON.parse(DO)}catch{}ne(365,String(v-u.length+(t.nodes?t.nodes.length:0)),typeof _=="function"?`${_.name}${typeof _.getType=="function"?` (type ${String(_.getType())})`:""}`:String(_),String(R))}uw(_);const E=_.getType(),k=Iee(_);m.set(E,{exportDOM:h&&h.export?h.export.get(_):void 0,klass:_,replace:x,replaceWithKlass:S,sharedNodeState:OZ(u[v]),transforms:k})}}const g=new nd(a,i,m,{disableEvents:o,dom:{...q0,...e&&e.dom},namespace:s,theme:n},d||console.error,f||Nee,(function(v,_){const x=new Map,S=new Set,E=k=>{Object.keys(k).forEach(R=>{let T=x.get(R);T===void 0&&(T=[],x.set(R,T)),T.push(k[R])})};return v.forEach(k=>{const R=k.klass.importDOM;if(R==null||S.has(R))return;S.add(R);const T=R.call(k.klass);T!==null&&E(T)}),_&&E(_),x})(m,h?h.import:void 0),p,e);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),(function(v){v.registerCommand(YO,nee,ct),v.registerCommand(XO,iee,ct),v.registerCommand(ZO,oee,ct),v.registerCommand(e6,aee,ct),v.registerCommand(t6,see,ct)})(g),g}function Pee(e,t){const r=e.get(t);e.delete(t),r&&r()}function rf(e,t,r){return e.set(t,r),Pee.bind(null,e,t)}class nd{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,r,n,i,o,a,s,l,u){this._createEditorArgs=u,this._parentEditor=r,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new h1,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=i,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=iM(),this._onError=o,this._onWarn=a,this._htmlConversions=s,this._editable=l,this._headless=r!==null&&r._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){return rf(this._listeners.update,t)}registerEditableListener(t){return rf(this._listeners.editable,t)}registerDecoratorListener(t){return rf(this._listeners.decorator,t)}registerTextContentListener(t){return rf(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return _l(rf(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const a=n.get(i);a&&a(),n.set(i,i(...o)||void 0)})(r,t,[null,this._rootElement]))}registerCommand(t,r,n){n===void 0&&ne(35);const i=this._commands;i.has(t)||i.set(t,[new ef,new ef,new ef,new ef,new ef]);const o=i.get(t);o===void 0&&ne(36,String(t));const a=(function(l){return 7&l})(n),s=o[a];return a!==n?s.addFront(r):s.addBack(r),()=>{s.delete(r),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,r,n){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;let a=o.get(r);a===void 0&&(a=new Set,o.set(r,a)),a.add(i);const s=n&&n.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(r,i),()=>{a.delete(i),a.size===0&&o.delete(r)}}getRegisteredNode(t){const r=this._nodes.get(t.getType());return r===void 0&&ne(37,t.name),r}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,r){const n=this._editorState,i=gA(n).get(r.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,r){const n=this.getRegisteredNode(t);return n.transforms.add(r),n}registerNodeTransform(t,r){const n=this.registerNodeTransformToKlass(t,r),i=[n],o=n.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,r);i.push(a)}return(function(a,s){const l=gA(a.getEditorState()),u=[];for(const d of s){const f=l.get(d);f&&u.push(f)}u.length!==0&&a.update(()=>{for(const d of u)for(const f of d.keys()){const h=fr(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:Mf}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return Ae(this,t,r)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const r=this._rootElement;if(t!==r){const n=Bc(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Q6(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||lee(r),n!=null&&r.classList.remove(...n)),t!==null){const o=lw(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,MO(this),this._updateTags.add(Mf),Zs(this),this._config.disableEvents||(function(s,l){const u=s.ownerDocument;E1.set(s,u);let d=D0.get(u);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},D0.set(u,d)),d.editors.add(l),d.hasShadowEditor=void 0,s.__lexicalEditor=l;const f=y6(s);f.push(ree.register(u));for(let h=0;h<w1.length;h++){const[p,m]=w1[h],g=typeof m=="function"?v=>{jR(v)||(BR(v),(l.isEditable()||p==="click")&&m(v,l))}:v=>{if(jR(v))return;BR(v);const _=l.isEditable();switch(p){case"cut":return _&&Ae(l,KS,v);case"copy":return Ae(l,rv,v);case"paste":return _&&Ae(l,VS,v);case"dragstart":return _&&Ae(l,h6,v);case"dragover":return _&&Ae(l,p6,v);case"dragend":return _&&Ae(l,WZ,v);case"focus":return _&&Ae(l,YZ,v);case"blur":return _&&Ae(l,XZ,v);case"drop":return _&&Ae(l,f6,v)}};f.push(tee(s,p,g))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(Mf),Zs(this);Lf("root",this,!1,t,r)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,r){t.isEmpty()&&ne(38);let n=t;n._readOnly&&(n=H6(t),n._selection=t._selection?t._selection.clone():null),OO(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),Zs(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||t._slotsUsed,go(this,()=>{if(o&&this._updateTags.add(o),t._parsed)for(const[a,s]of n._nodeMap.entries())V(s)?this._dirtyElements.set(a,!0):this._dirtyLeaves.add(a)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const a=YS(),s=xn,l=Ei,u=Hr,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,xn=a,Ei=!1,Hr=i,ew(null);try{const m=i._nodes;B0(n.root,m),o&&o(),a._readOnly=!0,a._parsed=!0}catch(m){m instanceof Error&&i._onError(m)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,xn=s,Ei=l,Hr=u}return a})(typeof t=="string"?JSON.parse(t):t,this,r)}read(...t){const[r,n]=t.length===1?["force-commit",t[0]]:t;return r==="force-commit"&&Zs(this),(r==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,r){(function(n,i,o){n._updating?n._updates.push([i,o]):iv(n,i,o)})(this,t,r)}focus(t,r={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),go(this,()=>{const i=_e(),o=rn();i!==null?i.dirty||Cn(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),yu("focus"),jee(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const r=fi(this._window);r!==null&&r.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Lf("editable",this,!0,t),this._slotsUsed&&this.update(()=>kee()))}toJSON(){return{editorState:this._editorState.toJSON()}}}nd.version=DO;let D1=null;function ew(e){D1=e}let Oee=1;function Y6(e,t){const r=tw(e,t);return r===void 0&&ne(30,t),r}function tw(e,t){return e._nodes.get(t)}const Mee=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function rw(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return Ou(o)||vs(o)?wh(o):null})();if(!tt(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=bu(r),i=r.nodeName;return S6(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&sp(r)==null)}function ap(e,t,r){const n=e.getRootElement();if(!n)return!1;try{if(!t||!n.contains(t)||!n.contains(r))return!1}catch{return!1}return Uc(t)===e&&e.read("latest",()=>!rw(t))}function ov(e){return e instanceof nd}function Uc(e){let t=e;for(;t!=null;){const r=sp(t);if(ov(r))return r;t=Mu(t)}return null}function sp(e){return e?e.__lexicalEditor:null}function ru(e){return vu(e)||e.isToken()}function Ui(e){return ru(e)||e.isSegmented()}function Ni(e){return $d(e)&&e.nodeType===3}function Ou(e){return $d(e)&&e.nodeType===9}function Lee(e){let t=e;for(;t!=null;){if(Ni(t))return t;t=t.firstChild}return null}function _u(e,t,r){const n=gs[t];if(r!==null&&(e&n)===(r&n))return e;let i=e^n;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function X6(e){return se(e)||ci(e)||dt(e)}function Z6(e,t){const r=(function(){const a=D1;return D1=null,a})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);_n(),j6();const n=Ut(),i=Cs(),o=""+Oee++;i._nodeMap.set(o,e),V(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType===0&&(n._dirtyType=1),e.__key=o}function rs(e){Bn(e)!==null&&ne(380,e.__key,String(Bn(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(n.__first=a),o===null&&(n.__last=s),l!==null&&(l.__next=a),u!==null&&(u.__prev=s),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function V0(e){j6(),I0(e)&&ne(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:xu(t)?t.__slotHost:null,n=Cs(),i=Ut(),o=n._nodeMap,a=i._dirtyElements;r!==null&&(function(l,u,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent!==null?h.__parent:xu(h)?h.__slotHost:null}})(r,o,a);const s=t.__key;i._dirtyType===0&&(i._dirtyType=1),V(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function bn(e){_n();const t=Ut(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=fr(r);n!==null&&n.getWritable()}if(e!==null){const n=fr(e);n!==null&&n.getWritable()}}}function ns(){return rd()?null:Ut()._compositionKey}function fr(e,t){const r=(t||Cs())._nodeMap.get(e);return r===void 0?null:r}function eM(e,t){const r=Td(e,Ut());return r!==void 0?fr(r,t):null}function tM(e,t,r){e[`__lexicalKey_${t._key}`]=r}function Td(e,t){return e[`__lexicalKey_${t._key}`]}function bu(e,t){let r=e;for(;r!=null;){const n=eM(r,t);if(n!==null)return n;r=Mu(r)}return null}function rM(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function cA(e){return e.read(()=>rn().getTextContent())}function rn(){return Cs()._nodeMap.get("root")}function Cn(e){_n();const t=Cs();e!==null&&(e.dirty=!0,e.setCachedNodes(null),ie(e)&&Ut()._slotsUsed&&L6(e)),t._selection=e}function dA(){_n(),OO(Ut())}function wc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=Td(i,n);if(o!==void 0)return o;i=Mu(i)}return null})(e,Ut());return t===null?null:fr(t)}function nM(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function nw(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function iM(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function oM(e){return Ni(e)?e.nodeValue:null}function iw(e,t,r){const n=fi(Di(t));if(n===null)return;const i=So(n,t._rootElement),o=i.anchorNode;let{anchorOffset:a,focusOffset:s}=i;if(o!==null){let l=oM(o);const u=bu(o);if(l!==null&&se(u)){if((l===dh||l===jS)&&r){const d=r.length;l=r,a=d,s=d}l!==null&&ow(u,l,a,s,e)}}}function ow(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();if(o.isToken()&&a)return;let s=t;if((a||i)&&(t.endsWith(dh)&&(s=t.slice(0,-dh.length)),i)){const u=jS;let d;for(;(d=s.indexOf(u))!==-1;)s=s.slice(0,d)+s.slice(d+u.length),r!==null&&r>d&&(r=Math.max(d,r-u.length)),n!==null&&n>d&&(n=Math.max(d,n-u.length))}const l=o.getTextContent();if(i||s!==l){const u=_e();if(s===""){if(bn(null),tp||ml||rp)o.remove();else{const g=Ut();X_(o,"",u),setTimeout(()=>{g.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=Ed(),h=o.getTextContentSize(),p=ns(),m=o.getKey();if(o.isToken()&&!a||p!==null&&m===p&&!a||ie(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!a))return void o.markDirty();if(!ie(u)||r===null||n===null)return void X_(o,s,u);if(u.setTextNodeRange(o,r,o,n),o.isSegmented()){const g=$r(o.getTextContent());o.replace(g),o=g}X_(o,s,u)}}}function X_(e,t,r){if(e.setTextContent(t),ie(r)){const n=e.getKey();let i=!1;for(const o of["anchor","focus"]){const a=r[o];a.type==="text"&&a.key===n&&(a.offset=Ca(e,a.offset,"clamp"),i=!0)}i&&(r._cachedNodes=null,r._cachedIsBackward=null)}}function Hp(e,t,r){const n=t[r]||!1;return n==="any"||n===e[r]}function zee(e,t){return Hp(e,t,"altKey")&&Hp(e,t,"ctrlKey")&&Hp(e,t,"shiftKey")&&Hp(e,t,"metaKey")}function tr(e,t,r){if(!zee(e,r))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;const n="Key"+t.toUpperCase();return e.code===n}const Va={ctrlKey:!Fo,metaKey:Fo},fA={altKey:Fo,ctrlKey:!Fo};function hA(e){return e.key==="Backspace"}function Uee(e){const t=rn();if(ie(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(Nr(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Xs(e),e;const o=i.getTopLevelElementOrThrow(),a=o.getParent();if(a===null)return V(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Xs(e)),e;const s=a;return r.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),Xs(e),e}{const r=t.select(0,t.getChildrenSize());return Cn(Xs(r)),r}}function Bc(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const r=e.__lexicalClassNameCache,n=r[t];if(n!==void 0)return n;const i=e[t];if(typeof i=="string"){const o=as(i);return r[t]=o,o}return i}function aw(e,t,r,n,i){if(r.size===0)return;const o=n.__type,a=n.__key,s=t.get(o);s===void 0&&ne(33,o);const l=s.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const d=u.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(a,f?"updated":i)}function pA(e,t,r){const n=e.getParent();let i=r,o=e;return n!==null&&(r===0&&(i=o.getIndexWithinParent(),o=n)),o.getChildAtIndex(i-1)}function Bee(e,t){const r=e.offset;if(e.type==="element")return pA(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?pA(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function aM(e){const t=Di(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function Ae(e,t,r){return K6(e,t,r,e)}function id(e,t){const r=e._keyToDOMMap.get(t);return r===void 0&&ne(75,t),r}function Mu(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const r=e.parentNode;return vs(r)?r.host:null}function sw(e){return Ou(e)?e:tt(e)?e.ownerDocument:null}function yu(e){_n(),Ut()._updateTags.add(e)}function jee(e){_n(),Ut()._deferred.push(e)}function od(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function lw(e){const t=sw(e);return t?t.defaultView:null}function Di(e){const t=e._window;return t===null&&ne(78),t}function qee(e){return V(e)&&e.isInline()||dt(e)&&e.isInline()}function sM(e){let t=e.getLatest();for(;t!==null;){if(Bn(t)!==null&&V(t))return t;const r=t.getParentOrThrow();if(mr(r))return r;t=r}return t}function jc(e){return V(e)&&e.isShadowRoot()}function mr(e){return Nr(e)||jc(e)}function Xn(e,t=!1){const r=e.constructor.clone(e);return Z6(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function ra(e){const t=Ut(),r=e.getType(),n=tw(t,r);n===void 0&&ne(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const a=i(e),s=a.constructor;return o!==null?a instanceof o||ne(201,o.name,o.getType(),s.name,s.getType(),e.constructor.name,r):a instanceof e.constructor&&s!==e.constructor||ne(202,s.name,s.getType(),e.constructor.name,r),a.__key===e.__key&&ne(203,e.constructor.name,r,s.name,s.getType()),a}return e}function Z_(e,t){!Nr(e.getParent())||V(t)||dt(t)||ne(99)}function Vee(e){const t=fr(e);return t===null&&ne(63,e),t}function r0(e){if(!e||e.isInline())return!1;if(dt(e))return!0;if(V(e)){if(e.isShadowRoot()){const t=e.getParent();return!(V(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function G0(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function fi(e){return ta?(e||window).getSelection():null}function Gee(e){const t=lw(e);return t?t.getSelection():null}function vs(e){return I1(e)&&"host"in e}const Kee=[];function lM(e){const t=e.getRootNode();if(t===e||!vs(t))return Kee;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!vs(i))break;r.push(i),n=i.host}return r}function*uM(e){const t=[e];let r;for(;r=t.pop();){yield*r.querySelectorAll('[data-lexical-editor="true"]');const n=(Ou(r)?r:r.ownerDocument).createTreeWalker(r,NodeFilter.SHOW_ELEMENT);let i;for(;i=n.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}function cM(e){return e!==null?e.ownerDocument:document}function hr(){const e=V6();return cM(e!==null?e._rootElement:null)}function av(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=lM(t);if(r.length===0)return null;const n=e.getComposedRanges;try{const i=n.call(e,{shadowRoots:r})[0];if(i!==void 0)return i}catch{}try{const i=n.apply(e,r)[0];if(i!==void 0)return i}catch{}return null}function Hee(e,t){const r=av(e,t);if(r!==null){const n=Wee(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function So(e,t){const r=av(e,t);return r===null?e:Jee(r,Qee(e))}function Wee(e){const t=e.startContainer.ownerDocument;if(t===null)return null;const r=t.createRange();try{return r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset),r}catch{return null}}function Jee(e,t){const{startContainer:r,startOffset:n,endContainer:i,endOffset:o}=e;return t==="backward"?{anchorNode:i,anchorOffset:o,direction:t,focusNode:r,focusOffset:n}:{anchorNode:r,anchorOffset:n,direction:t,focusNode:i,focusOffset:o}}function Qee(e){return e.direction}function F1(e){const t=e.getRootNode();return Ou(t)||vs(t)?t.activeElement:null}function wh(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){const r=t.shadowRoot.activeElement;if(r===null)break;t=r}return t}function dM(e){const t=e.target;if(t!==null&&tt(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function fM(e){return tt(e)&&e.tagName==="A"}function tt(e){return $d(e)&&e.nodeType===1}function $d(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function I1(e){return $d(e)&&e.nodeType===11}const Yee=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function K0(e){return!(!tt(e)||!e.style.display.startsWith("inline"))||Yee.test(e.nodeName)}const Xee=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function ad(e){return(!tt(e)||!e.style.display.startsWith("inline"))&&Xee.test(e.nodeName)}function Mn(e){if(dt(e)&&!e.isInline())return!0;if(!V(e)||mr(e))return!1;const t=e.getFirstChild(),r=t===null||ci(t)||se(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function Rr(){return Ut()}function sv(e=Rr()){return e._config.dom||q0}function wo(e,t,r=Rr()){const n=sv(r).$getDOMSlot(e,t,r);return V(e)&&(Zee(n)||ne(344,e.getKey(),e.getType())),n}function Zee(e){return e instanceof Ic}function ll(e,t,r=Rr()){return Lee(wo(e,t,r).element)}const mA=new WeakMap,ete=new Map;function gA(e){if(!e._readOnly&&e.isEmpty())return ete;e._readOnly||ne(192);let t=mA.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const a=o.__type;let s=n.get(a);s||(s=new Map,n.set(a,s)),s.set(i,o)}return n})(e),mA.set(e,t)),t}function hM(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function tte(e){return(t=hM(e))[x6]=!0,t;var t}function Lu(e,t){const r=e.getAttribute("data-lexical-indent");if(r!==null){const o=parseInt(r,10);if(Number.isFinite(o)&&o>=0)return void t.setIndent(o)}const n=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(n/40);t.setIndent(i)}function Co(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function Ma(e,t){const r=t.style.textAlign;return r&&r in T0?e.setFormat(r):e}function rte(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function pM(e){return e.__lexicalUnmanaged===!0}function nte(e,t=Rr()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function H0(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(tt(r)&&r.hasAttribute("data-lexical-slot")||Td(r,t)!==void 0)return!1;r=Mu(r)}return!1}function nf(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==Gi[t]}const vA=new WeakMap;function uw(e){const t=vA.get(e);if(t)return t;const r=e.prototype!=null&&gR in e.prototype?e.prototype[gR]():void 0,n=(function(l){if(!(l===Gi||l.prototype instanceof Gi)){let u="<unknown>",d="<unknown>";try{u=l.getType()}catch{}try{nd.version&&(d=JSON.parse(nd.version))}catch{}ne(290,l.name,u,d)}return l===QS||l===Ti||l===Gi})(e),i=!n&&nf(e,"getType")?e.getType():void 0;let o,a=i;if(r)if(i)o=r[i];else{for(const[l,u]of Object.entries(r))a=l,o=u;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const u=r[l];if(u){o=u;break}}}if(!n&&a&&(nf(e,"getType")||(e.getType=()=>a),nf(e,"clone")||(e.clone=l=>(ew(l),new e)),nf(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!nf(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const s={klass:e,ownNodeConfig:o,ownNodeType:a};return vA.set(e,s),s}function*cw(e){for(let t=e;t&&(t===Gi||S6(t.prototype));){const r=uw(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||gM(t)}}function mM(e){const t=Rr();return _n(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const ir=(e,t)=>{let r=e;for(;r!=null&&!Nr(r);){if(t(r))return r;r=r.getParent()}return null};function W0(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?fr(n):t.get(n);i==null&&ne(174),r.push(n),n=i.__next}return r}function gM(e){const t=Object.getPrototypeOf(e);if(typeof t=="function"&&t!==Function.prototype)return t;const r=e.prototype&&Object.getPrototypeOf(e.prototype);return r?r.constructor:null}const vM=new Map;function os(e){return V(e)||dt(e)}function xu(e){return V(e)||dt(e)}function Bn(e){const t=e.getLatest();return xu(t)?t.__slotHost:null}function Bo(e){const t=Bn(e);if(t===null)return null;const r=fr(t);return V(r)||dt(r)||ne(370),r}function ite(e){const t=Bo(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of uv(t))if(i===r)return n;return null}function lv(e){let t=e.getLatest();for(;t!==null;){if(Bn(t)!==null)return t;t=t.getParent()}return null}function uv(e){const t=e.getLatest();return os(t)&&t.__slots!==null?t.__slots:vM}function vo(e){return Array.from(uv(e).keys())}function Su(e,t){const r=uv(e).get(t);return r===void 0?null:fr(r)}const ote=["__proto__","constructor","prototype"],_A=Symbol("slotMapOwner");function P1(e){let t=e.__slots;return t!==null&&t[_A]===e||(t=new Map(t),t[_A]=e,e.__slots=t),t}const bA=new WeakMap,ate=[];function ste(e){for(const{ownNodeConfig:t}of cw(e)){const r=t&&t.slots;if(r)return r}return ate}function _M(e){let t="";for(const r of vo(e)){const n=Su(e,r);n!==null&&(t+=n.getTextContent())}return t}function yA(e,t,r){const n=r.get(e),i=r.get(t);return n!==void 0?i!==void 0?n-i:-1:i!==void 0?1:e<t?-1:e>t?1:0}function lte(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(a){let s=bA.get(a);if(s===void 0){const l=ste(a),u=new Map;for(const d of l)ote.includes(d)&&ne(371,a.name,d),u.has(d)&&ne(372,a.name,d),u.set(d,u.size);s=u,bA.set(a,s)}return s})(e.constructor);let n=null,i=!0;for(const a of t.keys()){if(n!==null&&yA(n,a,r)>0){i=!1;break}n=a}if(i)return;const o=Array.from(t).sort(([a],[s])=>yA(a,s,r));t.clear();for(const[a,s]of o)t.set(a,s)}function bM(e,t,r){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||ne(373,t);const n=e.getLatest();if(n.__slots!==null&&n.__slots.get(t)===r.getLatest().__key)return n;(!V(r)&&!dt(r)||r.isInline())&&ne(374,r.__key);const i=e.getWritable(),o=P1(i),a=o.get(t);a!==void 0&&yM(a);const s=r.getWritable(),l=Bo(s);if(l!==null){const u=ite(s);u!==null&&P1(l.getWritable()).delete(u),s.__slotHost=null}return rs(s),s.__slotHost=i.__key,o.set(t,s.__key),lte(i),(function(){const u=Rr();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}function ute(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(yM(n),P1(r).delete(t)),r}function yM(e){const t=fr(e);if(t===null)return;const r=t.getWritable();xu(r)||ne(377,e),r.__slotHost=null,r.remove()}const cte={next:"previous",previous:"next"};class dw{origin;constructor(t){this.origin=t}[Symbol.iterator](){return xM({hasNext:gl,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Lt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Lt(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,r){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(n===null?this.insert(t):n.replace(t,r)),this}splice(t,r,n="next"){const i=n===this.direction?r:Array.from(r).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();s.set(u.getKey(),u)}for(const l of i){if(s.size>0){const u=o.getNodeAtCaret();if(u){if(s.delete(u.getKey()),s.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),u.replace(l)}}else u===null&&ne(263,Array.from(s).join(" "))}else o.insert(l);o=Lt(l,this.direction)}for(const l of s.values())l.remove();return this}}class Eh extends dw{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Eo(t,this.direction)}getParentCaret(t="root"){return Lt(fw(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Al(this.direction);return Lt(this.getNodeAtCaret(),t)||Eo(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof Eh&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const dte={root:Nr,shadowRoot:mr};function Al(e){return cte[e]}function fw(e,t="root"){return e===null||dte[t](e)?null:Bn(e)===null?e:null}class wu extends dw{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lt(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return V(this.origin)?Eo(this.origin,this.direction):null}getParentCaret(t="root"){return Lt(fw(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Al(this.direction);return Lt(this.getNodeAtCaret(),t)||Eo(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof wu&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof wu||t instanceof Eu)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Eu extends dw{type="text";offset;constructor(t,r){super(t),this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:vl(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Lt(fw(this.getParentAtCaret(),t),this.direction)}getFlipped(){return vl(this.origin,Al(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Eu&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof wu||t instanceof Eu)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Lt(this.origin,this.direction)}}function _o(e){return e instanceof Eu}function gl(e){return e instanceof wu}function bo(e){return e instanceof Eh}const fte={next:class extends Eu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Eu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},hte={next:class extends wu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends wu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},pte={next:class extends Eh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Eh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Lt(e,t){return e?new hte[t](e):null}function vl(e,t,r){return e?new fte[t](e,Ca(e,r)):null}function Ca(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&RO(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function xA(e,t){return new gte(e,t)}function Eo(e,t){return V(e)?new pte[t](e):null}function mte(e){return e&&e.getChildCaret()||e}function hw(e){return e&&mte(e.getAdjacentCaret())}class pw{type="node-caret-range";direction;anchor;focus;constructor(t,r,n){this.anchor=t,this.focus=r,this.direction=n}getLatest(){const t=this.anchor.getLatest(),r=this.focus.getLatest();return t===this.anchor&&r===this.focus?this:new pw(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return _o(o)?(function(a,s){const{direction:l,origin:u}=a,d=Ca(u,s==="focus"?Al(l):l);return xA(a,d-a.offset)})(o,i):null},r=t("anchor"),n=t("focus");if(r&&n){const{caret:i}=r,{caret:o}=n;if(i.isSameNodeCaret(o))return[xA(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=_o(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=_o(n),o=a=>a.isSameNodeCaret(n)?null:hw(a)||a.getParentCaret(t);return xM({hasNext:a=>a!==null&&!(i&&n.isSameNodeCaret(a)),initial:r.isSameNodeCaret(n)?null:o(r),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class gte{type="slice";caret;distance;constructor(t,r){this.caret=t,this.distance=r}getSliceIndices(){const{distance:t,caret:{offset:r}}=this,n=r+t;return n<r?[n,r]:[r,n]}getTextContent(){const[t,r]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,r)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:r}}=this,[n,i]=this.getSliceIndices(),o=t.getTextContent();return vl(t.setTextContent(o.slice(0,n)+o.slice(i)),r,n)}}function cv(e){return qo(e,Lt(rn(),e.direction))}function dv(e){return qo(e,e)}function qo(e,t){return e.direction!==t.direction&&ne(265),new pw(e,t,e.direction)}function xM(e){const{initial:t,hasNext:r,step:n,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!r(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=n(o),a}}}function kh(e,t){const r=O1(e.origin,t.origin);switch(r===null&&ne(275,e.origin.getKey(),t.origin.getKey()),r.type){case"same":{const n=e.type==="text",i=t.type==="text";return n&&i?(function(o,a){return Math.sign(o-a)})(e.offset,t.offset):e.type===t.type?0:n?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return SM(r)}}function SM(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,a=r;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===n)return 1}return o===null?1:-1}function Wp(e,t){return t.is(e)}function SA(e){return V(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function O1(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=SA(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=SA(t);n;i=n,n=n.getParent()){const o=r.get(n);if(o!==void 0)return o===null?(Wp(e,n)||ne(276),{commonAncestor:n,type:"ancestor"}):i===null?(Wp(t,n)||ne(277),{commonAncestor:n,type:"descendant"}):((V(o)||Wp(e,o))&&(V(i)||Wp(t,i))&&n.is(o.getParent())&&n.is(i.getParent())||ne(278),{a:o,b:i,commonAncestor:n,type:"branch"})}return null}function ki(e,t){const{type:r,key:n,offset:i}=e,o=Vee(e.key);return r==="text"?(se(o)||ne(266,o.getType(),n),vl(o,t,i)):(V(o)||ne(267,o.getType(),n),L1(o,e.offset,t))}function ku(e,t){const{origin:r,direction:n}=t,i=n==="next";_o(t)?e.set(r.getKey(),t.offset,"text"):gl(t)?se(r)?e.set(r.getKey(),Ca(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(bo(t)&&V(r)||ne(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function Ch(e){const t=_e(),r=ie(t)?t:WS();return n0(r,e),Cn(r),r}function n0(e,t){ku(e.anchor,t.anchor),ku(e.focus,t.focus)}function M1(e){const{anchor:t,focus:r}=e,n=ki(t,"next"),i=ki(r,"next"),o=kh(n,i)<=0?"next":"previous";return qo(_s(n,o),_s(i,o))}function zu(e){const{direction:t,origin:r}=e,n=Lt(r,Al(t)).getNodeAtCaret();return n?Lt(n,t):Eo(r.getParentOrThrow(),t)}function wA(e,t="root"){const r=[e];for(let n=bo(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push(zu(n));return r}function eb(e){return!!e&&e.origin.isAttached()}function vte(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=gw(e,n),a=wA(o.anchor,r),s=wA(o.focus.getFlipped(),r),l=new Set,u=[];for(const m of o.iterNodeCarets(r))if(bo(m))l.add(m.origin.getKey());else if(gl(m)){const{origin:g}=m;V(g)&&!l.has(g.getKey())||u.push(g)}for(const m of u)m.remove();for(const m of o.getTextSlices()){if(!m)continue;const{origin:g}=m.caret,v=g.getTextContentSize(),_=zu(Lt(g,n)),x=g.getMode();if(Math.abs(m.distance)===v&&i==="removeEmptySlices"||x==="token"&&m.distance!==0)_.remove();else if(m.distance!==0){i="removeEmptySlices";let S=m.removeTextSlice();const E=m.caret.origin;if(x==="segmented"){const k=S.origin,R=$r(k.getTextContent()).setStyle(k.getStyle()).setFormat(k.getFormat());_.replaceOrInsert(R),S=vl(R,n,S.offset)}E.is(a[0].origin)&&(a[0]=S),E.is(s[0].origin)&&(s[0]=S.getFlipped())}}let d,f;for(const m of a)if(eb(m)){d=Bi(m);break}for(const m of s)if(eb(m)){f=Bi(m);break}const h=(function(m,g,v){if(!m||!g)return null;const _=m.getParentAtCaret(),x=g.getParentAtCaret();if(!_||!x)return null;const S=_.getParents().reverse();S.push(_);const E=x.getParents().reverse();E.push(x);const k=Math.min(S.length,E.length);let R;for(R=0;R<k&&S[R]===E[R];R++);const T=(P,O)=>{let D;for(let U=R;U<P.length;U++){const B=P[U];if(mr(B))return;!D&&O(B)&&(D=B)}return D},A=T(S,Mn),N=A&&T(E,P=>v.has(P.getKey())&&Mn(P));return N&&vo(N).length>0?null:A&&N?[A,N]:null})(d,f,l);if(h){const[m,g]=h;Eo(m,"previous").splice(0,g.getChildren());let v=g.getParent();for(g.remove(!0);v&&v.isEmpty();){const _=v;v=v.getParent(),_.remove(!0)}}else if(f){const m=(function(_){if(bo(_)){const x=_.origin;if(Mn(x))return x}else{const x=_.getParentAtCaret();if(x&&Mn(x))return x}return null})(f),g=m&&m.getParent(),v=m&&m.getParents().findLast(jc);if(m&&g&&!Nr(g)&&m.isEmpty()&&l.has(m.getKey())&&vo(m).length===0&&(!v||l.has(v.getKey()))){m.remove(!0);let _=g;for(;_&&!Nr(_)&&_.isEmpty();){const x=_.getParent();if(x&&Nr(x)&&x.getChildrenSize()<=1)break;const S=_;_=x,S.remove(!0)}}}const p=[d,f,...a,...s].find(eb);if(p)return dv(_s(Bi(p),e.direction));ne(269,JSON.stringify(a.map(m=>m.origin.__key)))}function Bi(e){const t=(function(i){let o=i;for(;bo(o);){const a=hw(o);if(!bo(a))break;o=a}return o})(e.getLatest()),{direction:r}=t;if(se(t.origin))return _o(t)?t:vl(t.origin,r,r);const n=t.getAdjacentCaret();return gl(n)&&se(n.origin)?vl(n.origin,r,Al(r)):t}function mw(e){return _o(e)&&e.offset!==Ca(e.origin,e.direction)}function _s(e,t){return e.direction===t?e:e.getFlipped()}function gw(e,t){return e.direction===t?e:qo(_s(e.focus,t),_s(e.anchor,t))}function L1(e,t,r){let n=Eo(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return _s(n,r)}function _te(e){const{origin:t,offset:r,direction:n}=e;if(r===Ca(t,n))return e.getSiblingCaret();if(r===Ca(t,Al(n)))return zu(e.getSiblingCaret());const[i]=t.splitText(r);return se(i)||ne(281),_s(Lt(i,"next"),n)}function bte(e,t){return!0}function wM(e,{$copyElementNode:t=Xn,$splitTextPointCaretNext:r=_te,rootMode:n="shadowRoot",$shouldSplit:i=bte,removeEmptyDestination:o=!1}={}){if(_o(e))return r(e);const a=e.getParentCaret(n);if(a){const{origin:s}=a;if(bo(e)){const u=zu(a);if(o&&s.isEmpty())return s.remove(),u;if(!s.canBeEmpty()||!i(s,"first"))return u}const l=(function(u){const d=[];for(let f=u.getAdjacentCaret();f;f=f.getAdjacentCaret())d.push(f.origin);return d})(e);(l.length>0||!o&&s.canBeEmpty()&&i(s,"last"))&&a.insert(t(s).splice(0,0,l))}return a}function EM(e,t,r){let n=_s(t,"next");_o(n)&&(n.offset===0?n=Lt(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=Lt(n.origin,"next"))),n.origin.is(e)&&(gl(n)||ne(342,e.getKey(),e.getType()),n=zu(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=wM(i,r))n=i;return _o(n)&&ne(283),n.insert(e.isInline()?qt().append(e):e),_s(Lt(e.getLatest(),"next"),t.direction)}function vw(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function as(...e){const t=[];for(const r of e)if(r&&typeof r=="string")for(const[n]of r.matchAll(/\S+/g))t.push(n);return t}function Na(e,...t){const r=as(...t);r.length>0&&e.classList.add(...r)}function _w(e,...t){const r=as(...t);r.length>0&&e.classList.remove(...r)}function _l(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function kM(e){const t=Rr().getElementByKey(e.getKey());if(t===null)return null;const r=t.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(t)}function CM(e){return kM(Nr(e)?e:e.getParentOrThrow())}function Jp(e){const t=CM(e);return t!==null&&t.direction==="rtl"}function RM(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!Ui(t)&&n!==null){const[i,o]=n,a=e.isBackward(),s=i.getNode(),l=o.getNode(),u=t.is(s),d=t.is(l);if(u||d){const[f,h]=A1(e),p=s.is(l),m=t.is(a?l:s),g=t.is(a?s:l);let v,_=0;p?(_=f>h?h:f,v=f>h?f:h):m?(_=a?h:f,v=void 0):g&&(_=0,v=a?f:h);const x=t.__text.slice(_,v);x!==t.__text&&(r==="clone"&&(t=tte(t)),t.__text=x)}}return t}function yte(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function xte(e,t,r){let n=ki(e,r);if(mw(n))return!1;for(;n;n=n.getParentCaret()){const i=n.getParentAtCaret();if(!i||n.getNodeAtCaret())return!1;if(t.is(i))return!0}return!1}function Ste(e,t,r=yte){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const a=new Map;if(n){const[s,l]=n,u=ir(s.getNode(),Mn);o=ir(l.getNode(),Mn);const d=e.isBackward()?"previous":"next";i=V(o)&&!o.is(u)&&(function(f,h,p){const m=f.getNode();return(!V(m)||!m.isEmpty())&&xte(f,h,p)})(l,o,Al(d)),V(u)&&a.set(u.getKey(),u),V(o)&&!i&&a.set(o.getKey(),o)}for(const s of e.getNodes())if(V(s)&&Mn(s)){if(i&&s.is(o))continue;a.set(s.getKey(),s)}else if(!n){const l=ir(s,Mn);V(l)&&a.set(l.getKey(),l)}for(const s of a.values()){const l=t();r(s,l),s.replace(l,!0)}}function AM(e){const t=TM(e);return t!==null&&t.writingMode==="vertical-rl"}function TM(e){const t=e.anchor.getNode();return V(t)?kM(t):CM(t)}function EA(e,t){let r=AM(e)?!t:t;$M(e)&&(r=!r);const n=ki(e.focus,r?"previous":"next");if(mw(n))return!1;if(_o(n)&&!vu(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(se(i)&&!vu(i))return!0}for(const i of cv(n)){if(bo(i))return!i.origin.isInline();if(!V(i.origin)){if(dt(i.origin))return!0;break}}return!1}function wte(e,t,r,n){e.modify(t?"extend":"move",r,n)}function $M(e){const t=TM(e);return t!==null&&t.direction==="rtl"}function kA(e,t,r){const n=$M(e);let i;i=AM(e)||n?!r:r,wte(e,t,i,"character")}function Ete(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function kte(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function Cte(e){const t=ir(e,r=>V(r)&&!r.isInline());return V(t)||Ete(4,e.__key),t}function el(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Qp(e){let t=null;if(el(e,DragEvent)?t=e.dataTransfer:el(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const r=t.types,n=r.includes("Files"),i=r.includes("text/html")||r.includes("text/plain");return[n,Array.from(t.files),i]}function CA(e){const t=_e();if(!ie(t))return!1;const r=new Set,n=t.getNodes();for(let i=0;i<n.length;i++){const o=n[i],a=o.getKey();if(r.has(a))continue;const s=ir(o,u=>V(u)&&!u.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!r.has(l)&&(r.add(l),e(s))}return r.size>0}const Rte=Symbol.for("preact-signals");function bw(){if(nu>1)return void nu--;let e,t=!1;for(!(function(){let r=J0;for(J0=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();zf!==void 0;){let r=zf;for(zf=void 0,Q0++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&NM(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Q0=0,nu--,t)throw e}let Ht,zf;function RA(e){const t=Ht;Ht=void 0;try{return e()}finally{Ht=t}}let J0,nu=0,Q0=0,AA=0,i0=0;function TA(e){if(Ht===void 0)return;let t=e.n;return t===void 0||t.t!==Ht?(t={i:0,S:e,p:Ht.s,n:void 0,t:Ht,e:void 0,x:void 0,r:t},Ht.s!==void 0&&(Ht.s.n=t),Ht.s=t,e.n=t,32&Ht.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ht.s,t.n=void 0,Ht.s.n=t,Ht.s=t),t):void 0}function ni(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Ate(e,t){return new ni(e,t)}function NM(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function $A(e){for(let t=e.s;t!==void 0;t=t.n){const r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function DM(e){let t,r=e.s;for(;r!==void 0;){const n=r.p;r.i===-1?(r.S.U(r),n!==void 0&&(n.n=r.n),r.n!==void 0&&(r.n.p=n)):t=r,r.S.n=r.r,r.r!==void 0&&(r.r=void 0),r=n}e.s=t}function ic(e,t){ni.call(this,void 0),this.x=e,this.s=void 0,this.g=i0-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function FM(e){const t=e.m;if(e.m=void 0,typeof t=="function"){nu++;const r=Ht;Ht=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,yw(e),n}finally{Ht=r,bw()}}}function yw(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,FM(e)}function Tte(e){if(Ht!==this)throw new Error("Out-of-order effect");DM(this),Ht=e,this.f&=-2,8&this.f&&yw(this),bw()}function vc(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function $te(e,t){const r=new vc(e,t);try{r.c()}catch(i){throw r.d(),i}const n=r.d.bind(r);return n[Symbol.dispose]=n,n}ni.prototype.brand=Rte,ni.prototype.h=function(){return!0},ni.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:RA(()=>{var r;(r=this.W)==null||r.call(this)}))},ni.prototype.U=function(e){if(this.t!==void 0){const t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&RA(()=>{var n;(n=this.Z)==null||n.call(this)}))}},ni.prototype.subscribe=function(e){return $te(()=>{const t=this.value,r=Ht;Ht=void 0;try{e(t)}finally{Ht=r}},{name:"sub"})},ni.prototype.valueOf=function(){return this.value},ni.prototype.toString=function(){return this.value+""},ni.prototype.toJSON=function(){return this.value},ni.prototype.peek=function(){const e=Ht;Ht=void 0;try{return this.value}finally{Ht=e}},Object.defineProperty(ni.prototype,"value",{get(){const e=TA(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Q0>100)throw new Error("Cycle detected");(function(t){nu!==0&&Q0===0&&t.l!==AA&&(t.l=AA,J0={S:t,v:t.v,i:t.i,o:J0})})(this),this.v=e,this.i++,i0++,nu++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{bw()}}}}),ic.prototype=new ni,ic.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===i0))return!0;if(this.g=i0,this.f|=1,this.i>0&&!NM(this))return this.f&=-2,!0;const e=Ht;try{$A(this),Ht=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Ht=e,DM(this),this.f&=-2,!0},ic.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}ni.prototype.S.call(this,e)},ic.prototype.U=function(e){if(this.t!==void 0&&(ni.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ic.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(ic.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=TA(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),vc.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}},vc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,FM(this),$A(this),nu++;const e=Ht;return Ht=this,Tte.bind(this,e)},vc.prototype.N=function(){2&this.f||(this.f|=2,this.u=zf,zf=this)},vc.prototype.d=function(){this.f|=8,1&this.f||yw(this)},vc.prototype.dispose=function(){this.d()};function Nte(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function dr(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let IM;try{IM="0.48.0+prod.esm"}catch{}const Dte=IM??'"<unknown>+source"',Fte=new Set(["__proto__","constructor","prototype"]);function PM(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!Fte.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=PM(r[i],n[i]));return e}return t}const xw=0,z1=1,OM=2,tb=3,Yp=4,oc=5,rb=6,of=7;function nb(e){return e.id===xw}function MM(e){return e.id===OM}function Ite(e){return(function(t){return t.id===z1})(e)||dr(305,String(e.id),String(z1)),Object.assign(e,{id:OM})}const Pte=new Set;let Ote=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:xw}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):vw;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;MM(r)||dr(306,String(r.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,u){return Object.assign(s,{config:l,id:tb,registerState:u})})(r,this.mergeConfigs(),n);let a;this.state=o,this.extension.init&&(a=this.extension.init(t,o.config,n)),this.state=(function(s,l,u){return Object.assign(s,{id:Yp,initResult:l,registerState:u})})(o,a,i)}build(t){const r=this.state;let n;r.id!==Yp&&dr(307,String(r.id),String(oc)),this.extension.build&&(n=this.extension.build(t,r.config,r.registerState));const i={...r.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:oc,output:a,registerState:s})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==oc&&dr(308,String(n.id),String(oc));const i=this.extension.register&&this.extension.register(t,n.config,n.registerState);return this.state=(function(o){return Object.assign(o,{id:rb})})(n),()=>{const o=this.state;o.id!==of&&dr(309,String(n.id),String(of)),this.state=(function(a){return Object.assign(a,{id:oc})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==rb&&dr(310,String(r.id),String(rb)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:of})})(r),n}getSignal(){return this._signal===void 0&&dr(311),this._signal}getInitResult(){this.extension.init===void 0&&dr(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Yp})(t)||dr(313,String(t.id),String(Yp)),t.initResult}getInitPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return(function(r){return r.id>=tb})(t)||dr(314,String(t.id),String(tb)),{config:t.config}}getPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}getInitDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&dr(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&dr(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=of})(t)||dr(316,String(t.id),String(of)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Pte}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([r])=>r)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(r){return r.id>=oc})(t)||dr(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const NA={tag:Mf};function Mte(){const e=rn();e.isEmpty()&&e.append(qt())}const Lte={config:{setOptions:NA,updateOptions:NA},init:({$initialEditorState:e=Mte})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:r},n){const i=n.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(Aee(o))e.setEditorState(o,r);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const a=e.parseEditorState(o);e.setEditorState(a,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[kd,ks,Cd,Sd,Rd]},DA=Symbol.for("@lexical/extension/LexicalBuilder");function FA(){}function zte(e){throw e}function Xp(e){return Array.isArray(e)?e:[e]}const ib=Dte;class Uf{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(t){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ib,this.roots=t;for(const r of t)this.addExtension(r)}static fromExtensions(t){const r=[Xp(Lte)];for(const n of t)r.push(Xp(n));return new Uf(r)}static maybeFromEditor(t){const r=t[DA];return r&&(r.PACKAGE_VERSION!==ib&&dr(292,r.PACKAGE_VERSION,ib),r instanceof Uf||dr(293)),r}static fromEditor(t){const r=Uf.maybeFromEditor(t);return r===void 0&&dr(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(ZS({...i,...r?{onError:a=>{r(a,o)}}:{},...n?{onWarn:a=>{n(a,o)}}:{}}),{[DA]:this});for(const a of this.sortedExtensionReps())a.build(o);return o}buildEditor(){let t=FA;function r(){try{t()}finally{t=FA}}const n=Object.assign(this.constructEditor(),{dispose:r,[Symbol.dispose]:r});return t=_l(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const r=this.extensionNameMap.get(t.name);if(r)return r.extension!==t&&dr(295,t.name),r}addEdge(t,r,n){const i=this.outgoingConfigEdges.get(t);i?i.set(r,n):this.outgoingConfigEdges.set(t,new Map([[r,n]]));const o=this.incomingEdges.get(r);o?o.add(t):this.incomingEdges.set(r,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&dr(296);const r=Xp(t),[n]=r;typeof n.name!="string"&&dr(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&dr(298,n.name),!i){i=new Ote(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&dr(299,n.name,o);for(const a of n.conflictsWith||[])this.extensionNameMap.has(a)&&dr(299,n.name,a),this.conflicts.set(a,n.name);for(const a of n.dependencies||[]){const s=Xp(a);this.addEdge(n.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of n.peerDependencies||[])this.addEdge(n.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(MM(o))return;const a=n.extension.name;var s;nb(o)||dr(300,a,i||"[unknown]"),nb(s=o)||dr(304,String(s.id),String(xw)),o=Object.assign(s,{id:z1}),n.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&r(d,a)}o=Ite(o),n.state=o,t.push(n)};for(const n of this.extensionNameMap.values())nb(n.state)&&r(n);for(const n of t)for(const[i,o]of this.outgoingConfigEdges.get(n.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&dr(301,n.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const a of r){const s=a.register(t,o);s&&i.push(s)}for(const a of r){const s=a.afterRegistration(t);s&&i.push(s)}return _l(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of Nte(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&dr(302,f.name,h.replace.name,p.extension.name),n.set(h.replace,d)}r.add(h)}if(f.html){if(f.html.export)for(const[h,p]of f.html.export.entries())i.set(h,p);f.html.import&&Object.assign(o,f.html.import)}f.theme&&PM(a,f.theme)}Object.keys(a).length>0&&(t.theme=a),r.size&&(t.nodes=[...r]);const l=Object.keys(o).length>0,u=i.size>0;(l||u)&&(t.html={},l&&(t.html.import=o),u&&(t.html.export=i));for(const d of s)d.init(t);return t.onError||(t.onError=zte),t}}function lp(e,t){const r=Uf.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function Ute(e){return lp(Rr(),e)}class fv extends QS{static getType(){return"horizontalrule"}static clone(t){return new fv(t.__key)}static importJSON(t){return Sw().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:Bte,priority:0})}}exportDOM(){return{element:hr().createElement("hr")}}createDOM(t){const r=hr().createElement("hr");return Na(r,t.theme.hr),r}getTextContent(){return`
28
+ `}isInline(){return!1}updateDOM(){return!1}}function Bte(){return{node:Sw()}}function Sw(){return mM(fv)}function Nd(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let qc;function LM(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function zM(e){return qc&&qc.editor===e?qc:void 0}function jte(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n(LM(e,r))]}return t}function qte(e,t){let r=t;for(const n of e){const[i,o]=jte(r,n),a=i.key;if(r===t&&LM(r,i)===o)continue;const s=r===t||r===void 0?Vte(t):r;s[a]=o,r=s}return r}function Vte(e){return Object.create(e||null)}function UM(e,t){return[e,t]}function Gte(e,t,r,n=Rr()){const i=qc,o=zM(n);try{return qc={...o,editor:n,[e]:t},r()}finally{qc=i}}function Kte(e,t=()=>{}){return(r,n=Rr())=>i=>{const o=zM(n),a=o&&o[e],s=qte(r,a||t(n));return s&&s!==a?Gte(e,s,i,n):i()}}function BM(e,t,r,n){return Object.assign(np(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function Hte(e){if(!Ou(e))return;const t=e;if(t.querySelector("style")===null)return;const r=new Map;function n(i){let o=r.get(i);if(o===void 0){o=new Set;for(let a=0;a<i.style.length;a++)o.add(i.style[a]);r.set(i,o)}return o}try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const a of Array.from(o)){if(!el(a,CSSStyleRule))continue;let s;try{s=t.querySelectorAll(a.selectorText)}catch{continue}for(const l of Array.from(s)){if(!tt(l))continue;const u=n(l);for(let d=0;d<a.style.length;d++){const f=a.style[d];u.has(f)||l.style.setProperty(f,a.style.getPropertyValue(f),a.style.getPropertyPriority(f))}}}}}catch{}}const jM="@lexical/html/DOM",qM=Symbol.for("@lexical/html/DOMExportContext"),Wte=Symbol.for("@lexical/html/DOMImportContext");function Jte(e,t,r){return BM(qM,e,t,r)}const Qte=Jte("isExport",Boolean);function Yte(e){const t=lp(e,jM);return t?t.output.defaults:void 0}function Xte(e){const t=lp(e,jM);return t?t.output.runtime:void 0}function Zte(e=Rr()){const t=Xte(e);return t?t.getSessionConfig():sv(e)}const ere=Kte(qM,Yte),hv=Symbol.for("@lexical/html/SelectorImpl");function Rh(e,t){const r={kind:"element",predicate:(n=t,n.length===0?tt:n.length===1?n[0]:(o,a)=>{for(const s of n)if(!s(o,a))return!1;return!0}),tags:e};var n;const i=o=>Rh(e,[...t,o]);return{[hv]:r,attr:(o,a,s)=>i(U1(o,a,s)),classAll:(...o)=>i(GM(o)),classAny:(...o)=>i((function(a){const s=VM(a);return s.length===0?()=>!1:l=>{if(!tt(l))return!1;const u=l.classList;for(const d of s)if(u.contains(d))return!0;return!1}})(o)),styleAny:(o,a,s)=>i((function(l,u,d){if(typeof u=="string")return f=>tt(f)&&f.style.getPropertyValue(l)===u;if(u instanceof RegExp){const f=d&&d.capture,h=u;return(p,m)=>{if(!tt(p))return!1;const g=p.style.getPropertyValue(l);if(!g)return!1;const v=g.match(h);return v!==null&&(f!==void 0&&(m[f]=v),!0)}}Nd(362,JSON.stringify(l))})(o,a,s))}}function VM(e){const t=[];for(const r of e)r&&t.push(r);return t}function GM(e){const t=VM(e);return t.length===0?()=>!0:r=>{if(!tt(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function U1(e,t,r){if(t===!0)return n=>tt(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>tt(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,a)=>{if(!tt(o))return!1;const s=o.getAttribute(e);if(s==null)return!1;const l=s.match(i);return l!==null&&(n!==void 0&&(a[n]=l),!0)}}Nd(361,JSON.stringify(e))}const tre={kind:"text",predicate:Ni,tags:new Set},rre={[hv]:tre},nre={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},ire={[hv]:nre},Ec={any:()=>Rh(new Set,[]),comment:()=>ire,tag(...e){e.length>0||Nd(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return Rh(t,[])},text:()=>rre};function KM(e,t){return tt(e)&&e.nodeName===t.toUpperCase()}const HM=/[A-Za-z0-9_-]/;let ore=class{constructor(t,r){this.source=t,this.pos=r}peek(t=0){return this.source[this.pos+t]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const t=this.pos;for(;!this.eof()&&HM.test(this.peek());)this.pos++;return this.source.slice(t,this.pos)}readQuoted(){const t=this.consume();this.assert(t==='"'||t==="'","expected quote");const r=this.pos;for(;!this.eof()&&this.peek()!==t;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(r,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(t,r){t||Nd(364,String(this.pos+1),r,this.source)}};function are(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(HM.test(e.peek())){const i=e.readIdent();i&&t.add(i.toUpperCase())}for(;!e.eof();){const i=e.peek();if(i==="."){e.consume();const o=e.readIdent();e.assert(o!=="",'expected class name after "."'),n.push(o)}else if(i==="#"){e.consume();const o=e.readIdent();e.assert(o!=="",'expected id after "#"'),r.push(U1("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let a=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const s=e.peek();s==='"'||s==="'"?a=e.readQuoted():(a=e.readIdent(),e.assert(a!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(U1(o,a))}}}return n.length>0&&r.push(GM(n)),{predicates:r,tags:t}}function sre(e){const t=new ore(e,0),r=[];for(;;){const i=are(t);if(r.push(i),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===",",'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(r.length===1)return Rh(r[0].tags,r[0].predicates);const n=new Set;for(const i of r)for(const o of i.tags)n.add(o);return Rh(n,[(i,o)=>{for(const a of r){const s=i.nodeName;if(a.tags.size>0&&!a.tags.has(s))continue;let l=!0;for(const u of a.predicates)if(!u(i,o)){l=!1;break}if(l)return!0}return!1}])}function ww(e,t,r){return BM(Wte,e,t,r)}const B1=ww("textFormat",()=>0),lre=ww("textStyle",()=>({}));function ure(e){if(!tt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function cre(e){if(Ni(e))return!0;if(!tt(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!ad(e)&&K0(e)}const dre=ww("whitespaceConfig",()=>({isInline:cre,preservesWhitespace:ure}));function Ew(e){return td(e)||dt(e)&&!e.isInline()}function WM(e,t){const r=[];let n=[];const i=()=>{n.length!==0&&(r.push(t().splice(0,0,n)),n=[])};for(const o of e)if(Ew(o)){if(i(),V(o)){const a=WM(o.getChildren(),t);o.splice(0,o.getChildrenSize(),a)}r.push(o)}else n.push(o);return i(),r}function JM(e,t){if(!tt(t))return e;const r=t.style.textAlign;if(!kw(r))return e;for(const n of e)td(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function fre(e,t,r){e.length===1&&ci(e[0])&&(e=[]);const n=qt();if(tt(r)){const i=r.style.textAlign;kw(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const QM={$accepts:Ew,$packageRun:fre,name:"BlockSchema"},Uu=Ec,hre=new Set(["center","end","justify","left","right","start"]);function kw(e){return hre.has(e)}const pre={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},mre={CODE:bZ,MARK:BS},gre=new Set(["font-weight","font-style","text-decoration","vertical-align"]),vre={$import:(e,t)=>{const r=e.get(B1),n=pre[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=n?(a=n,{fontStyle:(s=i).fontStyle||a.fontStyle,fontWeight:s.fontWeight||a.fontWeight,textDecoration:s.textDecoration||a.textDecoration,verticalAlign:s.verticalAlign||a.verticalAlign}):i;var a,s;let l=(u=r,d=(function(h){let p=0,m=0;const{fontWeight:g,fontStyle:v,textDecoration:_,verticalAlign:x}=h;if(g==="700"||g==="bold"?p|=fR:g!=="normal"&&g!=="400"||(m|=fR),v==="italic"?p|=hR:v==="normal"&&(m|=hR),_){const S=_.split(" ");S.includes("underline")&&(p|=mR),S.includes("line-through")&&(p|=pR),S.includes("none")&&(m|=mR|pR)}return x==="sub"?(p|=B_,m|=j_):x==="super"?(p|=j_,m|=B_):x==="baseline"&&(m|=B_|j_),{clear:m,set:p}})(o),u&~d.clear|d.set);var u,d;const f=mre[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[UM(B1,l)]})},match:Uu.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function IA(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentNode;if(a===null)return null;n=a}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(Ni(n))return n;if(n.nodeName==="BR")return null}}function PA(e,t){return t!==0&&se(e)?e.setFormat(t):e}function OA(e,t){if(se(e)){const r=(function(n){let i="";for(const o in n)gre.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const _re={$import:(e,t)=>{const r=e.get(B1),n=e.get(lre),i=e.get(dre);if((function(s,l){let u=s.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(t,i)){const s=Sh(t.textContent||"");for(const l of s)PA(l,r),OA(l,n);return s}const o=(function(s,l){let u=(s.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let d=s,f=!0;for(;d!==null&&(d=IA(d,!1,l))!==null;){const h=d.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(u=u.slice(1)),f=!1;break}}f&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let d=s,f=!0;for(;d!==null&&(d=IA(d,!0,l))!==null;)if((d.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(u=u.slice(0,-1))}return u})(t,i);if(o==="")return[];const a=$r(o);return PA(a,r),OA(a,n),[a]},match:Uu.text(),name:"@lexical/html/#text"},bre={$import:()=>[],match:Uu.tag("script","style"),name:"@lexical/html/script-style-ignore"},yre={$import:(e,t)=>W6(t)||J6(t)?[]:[Wo()],match:Uu.tag("br"),name:"@lexical/html/br"},xre={$import:(e,t)=>{const r=qt();if(Ma(r,t),Lu(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&kw(n)&&r.setFormat(n)}return Co(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Uu.tag("p"),name:"@lexical/html/p"},Sre={$import:(e,t,r)=>Rr().hasNode(fv)?[Sw()]:r(),match:Uu.tag("hr"),name:"@lexical/html/hr"};Uu.any();function wre(e,t){const r=[];let n=0,i=0;for(;n<e.length&&i<t.length;)e[n]<=t[i]?r.push(e[n++]):r.push(t[i++]);for(;n<e.length;)r.push(e[n++]);for(;i<t.length;)r.push(t[i++]);return r}function Ere(e){const t=[],r=new Map,n=[],i=[],o=[],a=new Set;e.forEach((l,u)=>{const d=(function(h){const p=h[hv];return p===void 0&&Nd(360),p})(l.match),f=l.name||(function(h,p){return h.kind==="text"?`#text@${p}`:h.kind==="comment"?`#comment@${p}`:h.tags.size===0?`*@${p}`:`${Array.from(h.tags).join(",").toLowerCase()}@${p}`})(d,u);if(l.name&&a.add(l.name),t.push({$import:l.$import,name:f,predicate:d.predicate}),d.kind==="text")i.push(u);else if(d.kind==="comment")o.push(u);else if(d.tags.size===0)n.push(u);else for(const h of d.tags){let p=r.get(h);p||(p=[],r.set(h,p)),p.push(u)}});const s=new Map;if(n.length===0)for(const[l,u]of r)s.set(l,u);else for(const[l,u]of r)s.set(l,wre(u,n));return{byTag:s,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function kre(e){const t=[];for(const r of e)if(Cre(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function Cre(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function YM(e){const t=kre(e);return{__type:"CompiledOverlayRules",dispatch:Ere(t),rules:t}}Ec.any();const An={any:Ec.any,comment:Ec.comment,css:sre,tag:Ec.tag,text:Ec.text},XM=new Set(["STYLE","SCRIPT"]);function Rre(e,t){Hte(t);const r=Ou(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!XM.has(o.nodeName)){const a=e4(o,e,i,!1);if(a!==null)for(const s of a)n.push(s)}return(function(o){for(const a of o)a.getParent()&&a.getNextSibling()instanceof XS&&a.insertAfter(Wo());for(const a of o){const s=a.getParent();s&&s.splice(a.getIndexWithinParent(),1,a.getChildren())}})(i),n}function Are(e,t=null,r=Rr()){return ere([UM(Qte,!0)],r)(()=>{const n=rn(),i=Zte(r),o=ie(t)?lv(t.anchor.getNode()):null,a=e.append.bind(e);for(const s of(V(o)?o:n).getChildren())ZM(r,s,a,t,i);return e})}function Tre(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Nd(338),Eee(e),Are(hr().createElement("div"),t,e).innerHTML}function ZM(e,t,r,n=null,i=sv(e)){let o=i.$shouldInclude(t,n,e);const a=i.$shouldExclude(t,n,e);let s=t;n!==null&&se(t)&&(s=RM(n,t,"clone"));const l=i.$exportDOM(s,e),{element:u,after:d,append:f,$getChildNodes:h}=l;if(!u)return!1;const p=hr().createDocumentFragment(),m=h?h():V(s)?s.getChildren():[],g=o&&ur(n)&&V(t)?null:n,v=p.append.bind(p);for(const _ of m){const x=ZM(e,_,v,g,i);!o&&x&&i.$extractWithChild(t,_,n,"html",e)&&(o=!0)}if(o&&!a){if((tt(u)||I1(u))&&(f?f(p):u.append(p)),r(u),d){const _=d.call(s,u);_&&(I1(u)?u.replaceChildren(_):u.replaceWith(_))}}else r(p);return o}function e4(e,t,r,n,i=new Map,o){const a=[];if(XM.has(e.nodeName))return a;let s=null;const l=(function(m,g){const{nodeName:v}=m,_=g._htmlConversions.get(v.toLowerCase());let x=null;if(_!==void 0)for(const S of _){const E=S(m);E!==null&&(x===null||(x.priority||0)<=(E.priority||0))&&(x=E)}return x!==null?x.conversion:null})(e,t),u=l?l(e):null;let d=null;if(u!==null){d=u.after;const m=u.node;if(s=Array.isArray(m)?m[m.length-1]:m,s!==null){for(const[,g]of i)if(s=g(s,o),!s)break;s&&a.push(...Array.isArray(m)?m:[s])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const f=e.childNodes;let h=[];const p=(s==null||!mr(s))&&(s!=null&&td(s)||n);for(let m=0;m<f.length;m++)h.push(...e4(f[m],t,r,p,new Map(i),s));if(d!=null&&(h=d(h)),ad(e)&&(h=$re(e,h,p?()=>{const m=new XS;return r.push(m),m}:qt)),s==null)if(h.length>0)for(const m of h)a.push(m);else ad(e)&&(function(m){return m.nextSibling==null||m.previousSibling==null?!1:K0(m.nextSibling)&&K0(m.previousSibling)})(e)&&a.push(Wo());else V(s)&&s.append(...h);return a}function $re(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let a=0;a<t.length;a++){const s=t[a];if(td(s))n&&!s.getFormat()&&s.setFormat(n),i.push(s);else if(o.push(s),a===t.length-1||a<t.length-1&&td(t[a+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function Ks(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Nre(e){let t=1,r=e.getParent();for(;r!=null;){if(Tt(r)){const n=r.getParent();if(st(n)){t++,r=n.getParent();continue}Ks(40)}return t}return t}function j1(e){const t=e.getParent();st(t)||Ks(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),st(n)&&(r=n);return r}function t4(e){let t=[];const r=e.getChildren().filter(Tt);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();st(o)?t=t.concat(t4(o)):t.push(i)}return t}function uo(e){return Tt(e)&&st(e.getFirstChild())}function r4(e,t){return Tt(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function MA(e){const t=_e();if(t!==null){let r=t.getNodes();if(ie(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),a=o.getParent();if(mr(o)){const s=o.getFirstChild();if(s)r=s.selectStart().getNodes();else{const l=qt();o.append(l),r=l.select().getNodes()}}else if(r4(o,r)){const s=Vo(e);if(mr(a)){o.replace(s);const l=Da();V(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),s.append(l)}else if(Tt(o)){const l=o.getParentOrThrow();Cu(s,l.getChildren()),l.replace(s)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(V(o)&&o.isEmpty()&&!Tt(o)&&!n.has(o.getKey())){LA(o,e);continue}let a=X6(o)?o.getParent():Tt(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(st(a)){if(!n.has(s)){const l=Vo(e);Cu(l,a.getChildren()),a.replace(l),n.add(s)}break}{const l=a.getParent();if(mr(l)&&!n.has(s)){n.add(s),LA(a,e);break}a=l}}}}}function Cu(e,t){e.splice(e.getChildrenSize(),0,t)}function LA(e,t){if(st(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=Da();let o;if(Cu(i,e.getChildren()),st(r)&&t===r.getListType())r.append(i),st(n)&&t===n.getListType()&&(Cu(r,n.getChildren()),n.remove()),o=r;else if(st(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const s=Vo(t);s.append(i),e.replace(s),o=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const a=_e();return ie(a)&&(o.getKey()===a.anchor.key&&a.anchor.set(i.getKey(),a.anchor.offset,"element"),o.getKey()===a.focus.key&&a.focus.set(i.getKey(),a.focus.offset,"element")),e.remove(),o}function Cw(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&uo(r)&&uo(n)&&(Cw(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function Dre(){const e=_e();if(ie(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(r4(n,r))t.add(j1(n));else for(let i=0;i<r.length;i++){const o=r[i];if(X6(o)){const a=kte(o,Bu);a!=null&&t.add(j1(a))}}for(const i of t){let o=i;const a=t4(i);for(const s of a){const l=qt().setTextStyle(e.style).setTextFormat(e.format);Cu(l,s.getChildren()),o.insertAfter(l),o=l,s.__key===e.anchor.key&&ku(e.anchor,Bi(Eo(l,"next"))),s.__key===e.focus.key&&ku(e.focus,Bi(Eo(l,"next"))),s.remove()}i.remove()}}}function n4(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())Tt(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),st(n.getFirstChild())||r++)}function Fre(e){const t=new Set;if(uo(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(uo(n)&&uo(i)){const o=i.getFirstChild();if(st(o)){o.append(e);const a=n.getFirstChild();st(a)&&(Cu(o,a.getChildren()),n.remove(),t.add(n.getKey()))}}else if(uo(n)){const o=n.getFirstChild();if(st(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(e)}}else if(uo(i)){const o=i.getFirstChild();st(o)&&o.append(e)}else if(st(r)){const o=Xn(e),a=Xn(r);o.append(a),a.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function zA(e){if(uo(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(st(r?r.getParent():void 0)&&Tt(r)&&st(t)){const n=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(n))r.insertBefore(e),t.isEmpty()&&r.remove();else if(e.is(i))r.insertAfter(e),t.isEmpty()&&r.remove();else{const o=Xn(e),a=Xn(t);o.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const s=Xn(e),l=Xn(t);s.append(l),Cu(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(s),r.replace(e)}}}function Ire(e=!1){const t=_e();if(!ie(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(Tt(r)&&r.getChildrenSize()===0)n=r;else if(se(r)){const u=r.getParent();Tt(u)&&u.getChildren().every(d=>se(d)&&d.getTextContent().trim()==="")&&(n=u)}if(n===null)return!1;const i=j1(n),o=n.getParent();st(o)||Ks(40);const a=o.getParent();let s;if(mr(a))s=qt(),i.insertAfter(s);else{if(!Tt(a))return!1;s=Xn(a),a.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=n.getNextSiblings();if(l.length>0){const u=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,n):1,d=Xn(o).setStart(u);if(Tt(s)){const f=Xn(s);f.append(d),s.insertAfter(f)}else s.insertAfter(d);d.append(...l)}return(function(u){let d=u;for(;d.getNextSibling()==null&&d.getPreviousSibling()==null;){const f=d.getParent();if(f==null||!Tt(f)&&!st(f))break;d=f}d.remove()})(n),!0}let Bu=class extends Ti{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(st(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();st(n)||Ks(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:a}of Lt(t,o)){if(!Tt(a))break;i.push(a)}}t.insertBefore(n),n.splice(0,0,i),mr(r)||(EM(n,zu(Lt(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:Ti,importDOM:{li:()=>({conversion:Pre,priority:0})}})}constructor(t=1,r=void 0,n){super(n),this.__value=t===void 0?1:t,this.__checked=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const r=hr().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(a,s){const l=s.getParent();!st(l)||l.getListType()!=="check"||st(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(a,s,l){const u=s.list;if(!u)return;const d=u.listitem,f=u.nested&&u.nested.listitem,h=l.getParent(),p=st(h)&&h.getListType()==="check",m=l.getChecked(),g=l.getChildren().some(x=>st(x)),v=[];u.listitemChecked!==void 0&&v.push(u.listitemChecked),u.listitemUnchecked!==void 0&&v.push(u.listitemUnchecked),f!==void 0&&v.push(...as(f)),v.length>0&&_w(a,...v);const _=[];if(d!==void 0&&_.push(...as(d)),p){const x=m?u.listitemChecked:u.listitemUnchecked;x!==void 0&&_.push(x)}f!==void 0&&g&&_.push(...as(f)),_.length>0&&Na(a,..._)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&zc(r.style,o,i),(function(a,s,l){const u=s.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===u)return;const f=O0(u);for(const h in f)a.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in O0(d))h in f||a.style.removeProperty(`--listitem-marker-${h}`)})(r,this,t)}updateDOM(t,r,n){const i=r;return this.updateListItemDOM(t,i,n),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const r=this.createDOM(t._config),n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();return i&&(r.dir=i),uo(this)?{after(o){if(tt(o)){const a=o.previousElementSibling;if(tt(a)&&a.nodeName==="LI"){for(;o.firstChild;)a.append(o.firstChild);o.remove()}}return o},element:r}:{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let r=0;r<t.length;r++){const n=t[r];if(V(n)&&this.canMergeWith(n)){const i=n.getChildren();this.append(...i),n.remove()}else super.append(n)}return this}replace(t,r){if(Tt(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!st(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const a=Xn(n);let s=this.getNextSibling();for(;s;){const l=s;s=s.getNextSibling(),a.append(l)}n.insertAfter(t),t.insertAfter(a)}const i=this.__key;let o=0;if(r&&(V(t)||Ks(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&V(t)){const a=_e();if(ie(a))for(const s of a.getStartEndPoints())s.key===i&&s.type==="element"&&s.set(t.getKey(),o+s.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(st(n)||Ks(39),Tt(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=Xn(n);i.forEach(a=>o.append(a)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&uo(r)&&uo(n)&&(Cw(r.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,r=!0){const n=Xn(this);return this.insertAfter(n,r),n}collapseAtStart(t){if(uo(this))return!1;const r=this.getParentOrThrow();if(Tt(r.getParentOrThrow()))return zA(this),!0;const n=qt().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=Xn(r);o.append(...i),r.insertAfter(o)}return r.insertAfter(n),this.remove(),r.getChildrenSize()===0&&r.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(t){const r=this.getWritable();return r.__value=t,r}getChecked(){const t=this.getLatest();let r;const n=this.getParent();return st(n)&&(r=n.getListType()),r==="check"?!!t.__checked:void 0}setChecked(t){const r=this.getWritable();return r.__checked=t,r}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let r=t.getParentOrThrow(),n=0;for(;Tt(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&Ks(117),(t=Math.floor(t))>=0||Ks(199);let r=this.getIndent();for(;r!==t;)r<t?(Fre(this),r++):(zA(this),r--);return this}canInsertAfter(t){return Tt(t)}canReplaceWith(t){return Tt(t)}canMergeWith(t){return Tt(t)||Ad(t)}extractWithChild(t,r){if(!ie(r))return!1;const n=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(n)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Vo("bullet")}canMergeWhenEmpty(){return!0}};function Pre(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return UA(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return UA(n.children[0])}const t=e.getAttribute("aria-checked"),r=Da(t==="true"||t!=="false"&&void 0);return Ma(r,e),{after:i4.bind(null,r),node:Co(r,e)}}function UA(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=Da(e.hasAttribute("checked"));return{after:i4.bind(null,t),node:t}}function i4(e,t){const r=t[0];return t.length===1&&Ad(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function Da(e){return ra(new Bu(void 0,e))}function Tt(e){return e instanceof Bu}let up=class extends Ti{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();st(n)&&r.getListType()===n.getListType()&&Cw(r,n)})(t),n4(t)},extends:Ti,importDOM:{ol:()=>({conversion:jA,priority:0}),ul:()=>({conversion:jA,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=Ore[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const r=this.getWritable();return r.__listType=t,r.__tag=t==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const r=this.getWritable();return r.__start=t,r}createDOM(t,r){const n=this.__tag,i=hr().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,BA(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(BA(r,n.theme,this),t.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const r=this.createDOM(t._config,t);return tt(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,r,n){let i=n;for(let o=0;o<n.length;o++){const a=n[o];Tt(a)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!V(a)||st(a)||a.isInline()?a:$r(a.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return Tt(t)}createListItemNode(){return Da()}};function BA(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const a=o[`${r.__tag}Depth`]||[],s=Nre(r)-1,l=s%a.length,u=a[l],d=o[r.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&n.push(d),p!==void 0&&r.__listType==="check"&&n.push(p),u!==void 0){n.push(...as(u));for(let m=0;m<a.length;m++)m!==l&&i.push(r.__tag+m)}if(f!==void 0){const m=as(f);s>1?n.push(...m):i.push(...m)}}i.length>0&&_w(e,...i),n.length>0&&Na(e,...n)}function jA(e){let t;if((function(r){return tt(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=Vo("number",r)}else t=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const n of r.childNodes)if(tt(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?Vo("check"):Vo("bullet");return Co(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),a=[];for(let s=0;s<n.length;s++){const l=n[s];if(Tt(l)){a.push(l);const u=l.getChildren();u.length>1&&u.forEach(d=>{st(d)&&a.push(o().append(d))})}else a.push(o().append(l))}return a})(r,t),node:t}}const Ore={ol:"number",ul:"bullet"};function Vo(e="number",t=1){return ra(new up(e,t))}function st(e){return e instanceof up}function Mre(e){const t=[];for(const r of e)if(Tt(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)st(i)&&t.push(Da().append(i))}else t.push(Da().append(r));return t}const Lre={$import:(e,t)=>{let r;var n;return KM(t,"ol")?r=Vo("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?Vo("check"):Vo("bullet"),Co(r,t),[r.splice(0,0,JM(Mre(e.$importChildren(t)),t))]},match:An.tag("ol","ul"),name:"@lexical/list/list"};function o4(e,t){if(t.length!==1)return t;const r=t[0];return Ad(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function a4(e){const t=a=>Ew(a)&&!st(a);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const a of e)t(a)?(i(),r.push(V(a)?a.getChildren():[a])):n.push(a);i();const o=[];for(const a of r)o.length>0&&o.push(Wo()),o.push(...a);return o}const zre={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=Da(r==="true"||r!=="false"&&void 0);return Ma(n,t),Co(n,t),[n.splice(0,0,a4(o4(n,e.$importChildren(t))))]},match:An.tag("li"),name:"@lexical/list/li"};function qA(e,t,r){const n=KM(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=Da(n.hasAttribute("checked"));return Ma(i,t),Co(i,t),[i.splice(0,0,a4(o4(i,e.$importChildren(t))))]}An.tag("li").classAll("task-list-item"),An.tag("li").classAll("joplin-checkbox");const Ure=qe("UPDATE_LIST_START_COMMAND"),s4=qe("INSERT_UNORDERED_LIST_COMMAND"),l4=qe("INSERT_ORDERED_LIST_COMMAND"),Bre=qe("REMOVE_LIST_COMMAND");function jre(e,t){return _l(e.registerCommand(l4,()=>(MA("number"),!0),gc),e.registerCommand(Ure,r=>{const{listNodeKey:n,newStart:i}=r,o=fr(n);return!!st(o)&&(o.getListType()==="number"&&(o.setStart(i),n4(o)),!0)},gc),e.registerCommand(s4,()=>(MA("bullet"),!0),gc),e.registerCommand(Bre,()=>(Dre(),!0),gc),e.registerCommand(gh,()=>Ire(!1),gc),e.registerCommand(GS,r=>{if((function(){const a=_e();if(!ie(a)||!a.isCollapsed()||a.anchor.offset!==0)return!1;const s=a.anchor.getNode(),l=ir(s,Tt);if(!Tt(l))return!1;const u=l.getFirstDescendant();if(u===null||!l.is(s)&&!u.is(s))return!1;const d=l.getParent();if(!st(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!dt(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=qt().append(...l.getChildren());return d.insertBefore(h),l.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return r.preventDefault(),!0;const n=_e();if(!ie(n)||!n.isCollapsed())return!1;const{anchor:i}=n;if(i.offset!==0)return!1;let o=i.getNode();for(;!Tt(o);){if(o.getPreviousSibling()!==null)return!1;const a=o.getParent();if(a===null)return!1;o=a}return!(!Tt(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},Fee),e.registerNodeTransform(Bu,r=>{const n=r.getFirstChild();if(n){if(se(n)){const i=n.getStyle(),o=n.getFormat();r.getTextStyle()!==i&&r.setTextStyle(i),r.getTextFormat()!==o&&r.setTextFormat(o)}}else{const i=_e();ie(i)&&(i.style!==r.getTextStyle()||i.format!==r.getTextFormat())&&i.isCollapsed()&&r.is(i.anchor.getNode())&&r.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(ks,r=>{const n=r.getParent();if(Tt(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function qre(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,a=e._selection;if(i)return 1;if(!(ie(o)&&ie(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(_,x,S){const E=_._nodeMap,k=[];for(const R of x){const T=E.get(R);T!==void 0&&k.push(T)}for(const[R,T]of S){if(!T)continue;const A=E.get(R);A===void 0||Nr(A)||k.push(A)}return k})(t,r,n);if(s.length===0)return 0;if(s.length>1){const _=t._nodeMap,x=_.get(o.anchor.key),S=_.get(a.anchor.key);return x&&S&&!e._nodeMap.has(x.__key)&&se(x)&&x.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],u=e._nodeMap.get(l.__key);if(!se(u)||!se(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const m=h.offset,g=p.offset,v=f.length-d.length;return v===1&&g===m-1?2:v===-1&&g===m+1?3:v===-1&&g===m?4:0}function Vre(e,t,r){let n=r(),i=0,o=n,a=0,s=null;return(l,u,d,f,h,p)=>{const m=r();if(p.has(R6)&&(o=n,a=i,s=l),p.has(P0))return i=0,n=m,2;p.has(xh)&&s&&(n=o,i=a,l=s);const g=p.has(E6)||p.has(k6)?0:qre(l,u,f,h,e.isComposing()),v=(()=>{const _=d===null||d.editor===e,x=p.has(w6);if(!x&&_&&p.has(Mf))return 0;if(g===1)return 2;if(l===null)return 1;const S=u._selection;return f.size>0||h.size>0?x===!1&&g!==0&&g===i&&m<n+t&&_||f.size===1&&(function(k,R,T){const A=R._nodeMap.get(k),N=T._nodeMap.get(k),P=R._selection,O=T._selection;return!(ie(P)&&ie(O)&&P.anchor.type==="element"&&P.focus.type==="element"&&O.anchor.type==="text"&&O.focus.type==="text"||!se(A)||!se(N)||A.__parent!==N.__parent)&&JSON.stringify(R.read(()=>A.exportJSON()))===JSON.stringify(T.read(()=>N.exportJSON()))})(Array.from(f)[0],l,u)?0:1:S!==null?0:2})();return n=m,i=g,v}}function VA(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function Gre(e,t,r,n=Date.now,i,o=null){const a=Vre(e,r,n);return _l(e.registerCommand(ev,()=>((function(s,l,u){const d=l.redoStack,f=l.undoStack;if(f.length!==0){const h=l.current,p=f.pop();h!==null&&(d.push(h),s.dispatchCommand(Vp,!0)),f.length===0&&s.dispatchCommand(Gp,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:P0})}})(e,t),!0),ct),e.registerCommand(tv,()=>((function(s,l,u){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),s.dispatchCommand(Gp,!0));const p=d.pop();d.length===0&&s.dispatchCommand(Vp,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:P0})}})(e,t),!0),ct),e.registerCommand(JZ,()=>(VA(t),!1),ct),e.registerCommand(QZ,()=>(VA(t),e.dispatchCommand(Vp,!1),e.dispatchCommand(Gp,!1),!0),ct),e.registerUpdateListener(({editorState:s,prevEditorState:l,dirtyLeaves:u,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,m=t.undoStack,g=h===null?null:h.editorState;if(h!==null&&s===g)return;const v=a(l,s,h,u,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(Vp,!1)),h!==null){m.push({...h});const _=typeof o=="number"||o===null?o:o.peek();_!==null&&m.length>_&&m.splice(0,m.length-_),e.dispatchCommand(Gp,!0)}}else if(v===2)return;t.current={editor:e,editorState:s}}))}function Kre(){return{current:null,redoStack:[],undoStack:[]}}function Hre(e,t){let r=e;for(let n=Lt(e,t);n&&(d4(n.origin)||vu(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function Wre(e){return Hre(e,"previous")}function u4(e,t){for(const r of e.childNodes)if(tt(r)&&r.tagName===t||u4(r,t))return!0;return!1}const wf="data-language",af="data-highlight-language",Zp="data-theme";class Dd extends Ti{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new Dd(t.__language,t.__key)}constructor(t,r){super(r),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const r=hr().createElement("code");Na(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(wf,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(af,n));const i=this.getTheme();i&&r.setAttribute(Zp,i);const o=this.getStyle();return o&&zc(r.style,o),r}updateDOM(t,r,n){const i=this.__language,o=t.__language;i?i!==o&&r.setAttribute(wf,i):o&&r.removeAttribute(wf);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&r.setAttribute(af,i):r.removeAttribute(af):a&&i&&r.setAttribute(af,i);const s=this.__theme,l=t.__theme;s?s!==l&&r.setAttribute(Zp,s):l&&r.removeAttribute(Zp);const u=this.__style,d=t.__style;return u!==d&&zc(r.style,u,d),!1}exportDOM(t){const r=hr().createElement("pre");Na(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(wf,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(af,n));const i=this.getTheme();i&&r.setAttribute(Zp,i);const o=this.getStyle();return o&&zc(r.style,o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||u4(t,"BR"))?{conversion:GA,priority:1}:null,div:()=>({conversion:Jre,priority:1}),pre:()=>({conversion:GA,priority:0}),table:t=>ob(t)?{conversion:Qre,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&ob(n)?{conversion:KA,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&ob(r)?{conversion:KA,priority:3}:null}}}static importJSON(t){return ai().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,r=!0){if(!lp(Rr(),"@lexical/code")){const a=Yre(t);if(a)return a}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(se(o)){let a=Wre(o);const s=[];for(;;)if(vu(a))s.push(wd()),a=a.getNextSibling();else{if(!d4(a))break;{let m=0;const g=a.getTextContent(),v=a.getTextContentSize();for(;m<v&&g[m]===" ";)m++;if(m!==0&&s.push(c4(" ".repeat(m))),m!==v)break;a=a.getNextSibling()}}const l=o.splitText(n.offset)[0],u=n.offset===0?0:1,d=l.getIndexWithinParent()+u,f=o.getParentOrThrow(),h=[Wo(),...s];f.splice(d,0,h);const p=s[s.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(Ah(o)){const{offset:a}=t.anchor;o.splice(a,0,[Wo()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=qt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}setLanguage(t){const r=this.getWritable();return r.__language=t||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const r=this.getWritable();return r.__isSyntaxHighlightSupported=t,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const r=this.getWritable();return r.__theme=t||void 0,r}getTheme(){return this.getLatest().__theme}}function ai(e,t){return mM(Dd).setLanguage(e).setTheme(t)}function Ah(e){return e instanceof Dd}function GA(e){return{node:ai(e.getAttribute(wf))}}function Jre(e){const t=e,r=HA(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(HA(i))return!0;i=i.parentElement}return!1})(t)?{node:r?ai():null}:{node:null}}function Qre(){return{node:ai()}}function KA(){return{node:null}}function HA(e){return e.style.fontFamily.match("monospace")!==null}function ob(e){return e.classList.contains("js-file-line-container")}function Yre(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const r=t.getNode();if(Ah(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(ci(i)&&ci(i.getPreviousSibling())){const o=qt();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class pv extends ks{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new pv(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const r=this.getWritable();return r.__highlightType=t||void 0,r}canHaveFormat(){return!1}createDOM(t){const r=super.createDOM(t),n=ab(t.theme,this.__highlightType);return Na(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=ab(n.theme,t.__highlightType),a=ab(n.theme,this.__highlightType);return o!==a&&(o&&_w(r,o),a&&Na(r,a)),i}static importJSON(t){return c4().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return ai()}}function ab(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function c4(e="",t){return ra(new pv(e,t))}function d4(e){return e instanceof pv}const f4="data-language";function h4(e){return e.style.fontFamily.match("monospace")!==null}function q1(e){let t=e.parentElement;for(;t!==null;){if(h4(t))return!0;t=t.parentElement}return!1}const Xre=YM([{$import:(e,t)=>e.$importChildren(t),match:An.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),Zre={$import:(e,t)=>[ai(t.getAttribute(f4)).splice(0,0,e.$importChildren(t))],match:An.tag("pre"),name:"@lexical/code/pre"},ene={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[ai(t.getAttribute(f4)).splice(0,0,e.$importChildren(t))]:r()},match:An.tag("code"),name:"@lexical/code/code-multiline"};function em(e){if(!tt(e))return!1;const t=e.style.fontFamily,r=e.style.whiteSpace;return typeof t=="string"&&/monospace/i.test(t)&&typeof r=="string"&&r.startsWith("pre")}function tne(e){let t=!1;const r=[];let n="",i=!1;const o=()=>{i&&(r.push(n),n="",i=!1)};for(const a of Array.from(e.childNodes))if(tt(a))a.tagName==="DIV"?(o(),r.push(a.textContent||""),t=!0):a.tagName==="BR"?(o(),r.push(""),t=!0):(n+=a.textContent||"",i=!0);else if(Ni(a)){const s=a.textContent||"";s.length>0&&(n+=s,i=!0)}return o(),t?r:null}An.tag("div"),An.tag("div","br");const rne={$import:(e,t,r)=>h4(t)?[ai().splice(0,0,e.$importChildren(t))]:q1(t)?e.$importChildren(t):r(),match:An.tag("div"),name:"@lexical/code/div"};An.tag("table").classAll("js-file-line-container"),An.tag("td").classAll("js-file-line");const WA=new Set(["http:","https:","mailto:","sms:","tel:"]);let cp=class p4 extends Ti{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new p4(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",r={},n){super(n);const{target:i=null,rel:o=null,title:a=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=a}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const r=hr().createElement("a");return this.updateLinkDOM(null,r,t),Na(r,t.theme.link),r}updateLinkDOM(t,r,n){if(fM(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];t&&t[o]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:nne,priority:1})}}static importJSON(t){return sd().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){const r=t;t=YA(t);try{const n=new URL(YA(t));if(!WA.has(n.protocol))return"about:blank"}catch{const i=r.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!WA.has(`${i[1].toLowerCase()}:`))return"about:blank"}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const r=this.getWritable();return r.__url=t,r}getTarget(){return this.getLatest().__target}setTarget(t){const r=this.getWritable();return r.__target=t,r}getRel(){return this.getLatest().__rel}setRel(t){const r=this.getWritable();return r.__rel=t,r}getTitle(){return this.getLatest().__title}setTitle(t){const r=this.getWritable();return r.__title=t,r}insertNewAfter(t,r=!0){const n=Xn(this);return this.insertAfter(n,r),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,n){if(!ie(r))return!1;const i=r.anchor.getNode(),o=r.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(t){return this.getType()===t.getType()&&this.__url===t.__url&&this.__target===t.__target&&this.__rel===t.__rel&&this.__title===t.__title}};function nne(e){let t=null;if(fM(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=sd(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function sd(e="",t){return ra(new cp(e,t))}function ha(e){return e instanceof cp}let m4=class g4 extends cp{__isUnlinked;constructor(t="",r={},n){super(t,r,n),this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}afterCloneFrom(t){super.afterCloneFrom(t),this.__isUnlinked=t.__isUnlinked}static getType(){return"autolink"}static clone(t){return new g4(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(t){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const r=this.getWritable();return r.__isUnlinked=t,r}createDOM(t){return this.__isUnlinked?hr().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return JA().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,r=!0){const n=JA(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function JA(e="",t){return ra(new m4(e,t))}function _c(e){return e instanceof m4}function QA(e,t){if(e.type==="element"){const r=e.getNode();return V(r)||(function(n,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",n);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${n}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),r.getChildren()[e.offset+t]||null}return null}function ine(e,t={}){let r;if(e&&typeof e=="object"){const{url:d,...f}=e;r=d,t={...f,...t}}else r=e;const{target:n,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,a=_e();if(a===null||!ie(a)&&!ur(a))return;if(ur(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=ir(f,p=>!_c(p)&&ha(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=ir(f,p=>!_c(p)&&ha(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=sd(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(a.isCollapsed()&&r===null)for(const d of a.getNodes()){const f=ir(d,h=>!_c(h)&&ha(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const s=a.extract();if(r===null){const d=new Set;return void s.forEach(f=>{const h=ir(f,p=>!_c(p)&&ha(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(m,g){const v=new Set(g.filter(A=>m.isParentOf(A)).map(A=>A.getKey())),_=m.getChildren(),x=A=>v.has(A.getKey())||V(A)&&g.some(N=>m.isParentOf(N)&&A.isParentOf(N)),S=_.filter(x);if(S.length===_.length)return _.forEach(A=>m.insertBefore(A)),void m.remove();const E=_.findIndex(x),k=_.findLastIndex(x),R=E===0,T=k===_.length-1;if(R)S.forEach(A=>m.insertBefore(A));else if(T)for(let A=S.length-1;A>=0;A--)m.insertAfter(S[A]);else{for(let N=S.length-1;N>=0;N--)m.insertAfter(S[N]);const A=_.slice(k+1);if(A.length>0){const N=Xn(m);S[S.length-1].insertAfter(N),A.forEach(P=>N.append(P))}}})(h,s),d.add(p)}})}const l=new Set,u=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(r),n!==void 0&&d.setTarget(n),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=ir(d,ha);if(f!==null)return u(f)}(function(d){const f=_e();if(!ie(f))return d();const h=Xs(f),p=h.isBackward(),m=QA(h.anchor,p?-1:0),g=QA(h.focus,p?0:-1);if(d(),m||g){const v=_e();if(ie(v)){const _=v.clone();if(m){const x=m.getParent();x&&_.anchor.set(x.getKey(),m.getIndexWithinParent()+(p?1:0),"element")}if(g){const x=g.getParent();x&&_.focus.set(x.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}Cn(Xs(_))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=ir(f,ha);if(h){u(h);continue}if(V(f)){if(!f.isInline())continue;if(ha(f)){if(!(_c(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const m of f.getChildren())f.insertBefore(m);f.remove();continue}}const p=f.getPreviousSibling();ha(p)&&p.is(d)?p.append(f):(d=sd(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const one=/^\+?[0-9\s()-]{5,}$/;function YA(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:one.test(e)?`tel:${e}`:`https://${e}`}An.tag("a");function Y0(e,t,r=null){const n=cM(r),i=r?lM(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&(function(s,l){for(let u=s;u!==null;){if(u===l)return!0;u=Mu(u)}return!1})(a.offsetNode,r))return{node:a.offsetNode,offset:a.offset}}if(o){const a=r.getRootNode();if(vs(a)){const s=a.elementFromPoint(e,t);if(s!==null&&r.contains(s)){const l=(function(u,d,f,h){const p=h.createRange(),m=T=>d<T.top?T.top-d:d>T.bottom?d-T.bottom:0,g=T=>u<T.left?T.left-u:u>T.right?u-T.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let _=null,x=1/0,S=1/0;for(let T=v.nextNode();T;T=v.nextNode()){p.selectNodeContents(T);for(const A of p.getClientRects()){const N=m(A),P=g(A);(N<x||N===x&&P<S)&&(x=N,S=P,_=T)}}if(_===null)return null;let E=0,k=1/0,R=1/0;for(let T=0;T<=_.length;T++){p.setStart(_,T),p.collapse(!0);const A=p.getBoundingClientRect(),N=m(A),P=Math.abs(u-A.left);(N<k||N===k&&P<R)&&(k=N,R=P,E=T)}return{node:_,offset:E}})(e,t,s,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const a=n.caretRangeFromPoint(e,t);return a===null?null:{node:a.startContainer,offset:a.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t);return a===null?null:{node:a.offsetNode,offset:a.offset}}return null}function kc(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const V1={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function ane(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const XA=(e,t)=>{if(!ie(t))return t.insertRawText(e),!0;const r=n=>{const i=_e();ie(i)&&n(i)};return B6(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([wd()])),text:n=>r(i=>i.insertText(n))}),!0},G1={"application/x-lexical-editor":[(e,t,r)=>{try{const n=Rr(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return ZA(n,pne(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=Rr(),i=new DOMParser().parseFromString(ane(e),"text/html");return ZA(n,Rre(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[XA],"text/uri-list":[XA]};function sne(e,t,r,n){if(!e)return!1;const i=o=>!!e[o]&&e[o](t,r,i.bind(null,o-1),n);return i(e.length-1)}function v4(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(a=>o.$importMimeType[a]!==void 0).sort((a,s)=>{const l=o.priority[a],u=o.priority[s];return l===void 0&&u===void 0?a<s?-1:a>s?1:0:l===void 0?1:u===void 0?-1:l-u})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==n)&&sne(e.$importMimeType[i],o,r,t))return!0}return!1}const lne={$importMimeType:G1,$insertDataTransfer:(e,t)=>v4({$importMimeType:G1,priority:V1},e,t),priority:V1},une={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>v4(t,r,n),priority:t.priority}),config:{$importMimeType:G1,priority:V1},mergeConfig(e,t){const r=vw(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function _4(e,t=_e()){return t==null&&kc(166),ie(t)&&t.isCollapsed()||t.getNodes().length===0?"":Tre(e,t)}function b4(e,t=_e()){return t==null&&kc(166),ie(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(hne(e,t))}function K1(e,t,r){(function(){const n=Ute(une.name);return n?n.output:lne})().$insertDataTransfer(e,t)}const y4="application/x-lexical-drag";function cne(e,t){const r={editorKey:t.getKey()};e.setData(y4,JSON.stringify(r))}function dne(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(u){const d=u.getData(y4);if(!d)return null;let f;try{f=JSON.parse(d)}catch{return null}return(h=f)!==null&&typeof h=="object"&&"editorKey"in h&&typeof h.editorKey=="string"?f:null;var h})(n);if(i===null)return!1;const o=(function(u,d){const f=Y0(u.clientX,u.clientY,d.getRootElement());if(f===null)return null;const h=bu(f.node);if(h===null)return null;if(se(h))return vl(h,"next",f.offset);if(V(h))return L1(h,f.offset,"next");const p=h.getParent();return p===null?null:L1(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const a=wM(o);if(a===null)return!1;const s=i.editorKey===t.getKey(),l=_e();if(s){if(!ie(l)||l.isCollapsed())return!1;if((function(u,d){const{anchor:f,focus:h}=gw(M1(d),"next");return kh(f,u)<0&&kh(u,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!a.origin.isAttached())return e.preventDefault(),!0;if(r(n,Ch(dv(a)),t),!s){const u=t.getRootElement(),d=u?u.ownerDocument:null,f=d?(function(h,p){for(const m of uM(p)){const g=sp(m);if(ov(g)&&g.getKey()===h&&tt(m))return m}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function fne(e,t){return dne(e,t,K1)}function ZA(e,t,r){e.dispatchCommand(qZ,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(ie(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const a=ki(i,"previous");if(a)if(_o(a))o=a.origin;else{const s=qo(a,Eo(rn(),"next").getFlipped());for(const l of s){if(se(l.origin)){o=l.origin;break}if(V(l.origin)&&!l.origin.isInline())break}}if(o&&se(o)){const s=o.getFormat(),l=o.getStyle();n.format===s&&n.style===l||(n.format=s,n.style=l,n.dirty=!0)}}})(r))}function H1(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=V(r)&&r.excludeFromCopy("html");let a=r;t!==null&&se(a)&&(a=RM(t,a,"clone"));const s=V(a)?a.getChildren():[],l=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&kc(58,h.name),V(d)){const p=f.children;Array.isArray(p)||kc(59,h.name)}return f})(a);se(a)&&a.getTextContentSize()===0&&(i=!1);const u=i&&ur(t)&&V(r)?null:t;for(let d=0;d<s.length;d++){const f=s[d],h=H1(e,u,f,l.children);!i&&V(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=vo(a);if(d.length>0){const f={};for(const h of d){const p=Su(a,h);p===null&&kc(366,a.constructor.name,h);const m=[];H1(e,null,p,m),m.length===1&&m[0].type===p.getType()||kc(385,h,a.constructor.name,String(m.length),String(m.length>0?m[0].type:"none")),f[h]=m[0]}l.$slots=f}}if(i&&!o)n.push(l);else if(Array.isArray(l.children))for(let d=0;d<l.children.length;d++){const f=l.children[d];n.push(f)}return i}function hne(e,t){const r=[],n=rn(),i=ie(t)?t.anchor.getNode():ur(t)?t.getNodes()[0]??null:null,o=i!==null?lv(i):null,a=(V(o)?o:n).getChildren();for(let s=0;s<a.length;s++)H1(e,t,a[s],r);return{namespace:e._config.namespace,nodes:r}}function pne(e){const t=[];for(const r of e)t.push(Cee(r));return t}let ac=null;async function eT(e,t,r){if(ac!==null)return!1;if(t!==null)return new Promise((u,d)=>{e.update(()=>{u(tT(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,a=fi(i);if(n===null||a===null)return!1;const s=o.createElement("span");s.style.position="fixed",s.style.top="-1000px",s.append(o.createTextNode("#")),n.append(s);const l=o.createRange();return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((u,d)=>{const f=e.registerCommand(rv,h=>(el(h,ClipboardEvent)&&(f(),ac!==null&&(i.clearTimeout(ac),ac=null),u(tT(e,h,r))),!0),Dee);ac=i.setTimeout(()=>{f(),ac=null,u(!1)},50),o.execCommand("copy"),s.remove()})}function tT(e,t,r){if(r===void 0){const i=fi(e._window),o=_e();if(!o||o.isCollapsed()||!i)return!1;const a=So(i,e.getRootElement()),s=a.anchorNode,l=a.focusNode;if(s!==null&&l!==null&&!ap(e,s,l))return!1;r=x4(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(S4(n,r),!0)}const mne=[["text/html",_4],["application/x-lexical-editor",b4]];function x4(e=_e()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const a=vne(o,r);a!==null&&(n[i]=a)}return n})(gne(),e)}function S4(e,t){for(const[r]of mne)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function gne(e=Rr()){const t=lp(e,_ne.name);return t?t.output:w4}const w4={"application/x-lexical-editor":[(e,t)=>e?b4(Rr(),e):t()],"text/html":[(e,t)=>e?_4(Rr(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function vne(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const _ne={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:w4},mergeConfig(e,t){const r=vw(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},bne={$import:(e,t)=>{const r=ss(t.nodeName.toLowerCase());return Lu(t,r),Ma(r,t),Co(r,t),[r.splice(0,0,e.$importChildren(t))]},match:An.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},yne={$import:(e,t)=>{const r=Id();return Ma(r,t),Lu(t,r),Co(r,t),[r.splice(0,0,e.$importChildren(t))]},match:An.tag("blockquote"),name:"@lexical/rich-text/blockquote"};An.tag("blockquote");An.tag("p"),An.tag("span");const rT=qe("DRAG_DROP_PASTE_FILE"),sb=np("shadowRoot",{parse:Boolean});class Fd extends Ti{static getType(){return"quote"}static clone(t){return new Fd(t.__key)}$config(){return this.config("quote",{extends:Ti,stateConfigs:[{flat:!0,stateConfig:sb}]})}isShadowRoot(){return ip(this,sb)}setIsShadowRoot(t){return Pc(this,sb,t)}createDOM(t){const r=hr().createElement("blockquote");return Na(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:xne,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){this.isEmpty()&&r.append(hr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return Id().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=qt(),i=this.getDirection();return n.setDirection(i),this.insertAfter(n,r),n}collapseAtStart(){if(this.isShadowRoot()){for(const r of this.getChildren())this.insertBefore(r);return this.remove(),!0}const t=qt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Id(e){const t=ra(new Fd);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function W1(e){return e instanceof Fd}let mv=class E4 extends Ti{__tag;static getType(){return"heading"}static clone(t){return new E4(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}constructor(t="h1",r){super(r),this.__tag=t}getTag(){return this.getLatest().__tag}setTag(t){const r=this.getWritable();return r.__tag=t,r}createDOM(t){const r=this.__tag,n=hr().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];Na(n,o)}return n}updateDOM(t,r,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:sc,priority:0}),h2:t=>({conversion:sc,priority:0}),h3:t=>({conversion:sc,priority:0}),h4:t=>({conversion:sc,priority:0}),h5:t=>({conversion:sc,priority:0}),h6:t=>({conversion:sc,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&nT(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>nT(t)?{conversion:r=>({node:ss("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){this.isEmpty()&&r.append(hr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return ss(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,r=!0){const n=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&n===i.getTextContentSize()||!t?qt():ss(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const s=qt();s.select(),this.replace(s,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=qt();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function nT(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function sc(e){const t=e.nodeName.toLowerCase();let r=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(r=ss(t),Lu(e,r),Ma(r,e),Co(r,e)),{node:r}}function xne(e){const t=Id();return Ma(t,e),Lu(e,t),Co(t,e),{node:t}}function ss(e="h1"){return ra(new mv(e))}function Sne(e){return e instanceof mv}function iT(e){const t=bu(e);return dt(t)}function lc(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const s=e.anchor.getNode();if(se(s)){o=s;const l=e.anchor.offset,u=l===s.getTextContentSize()&&s.getNextSibling()===null,d=l===0&&s.getPreviousSibling()===null;i=r==="end"&&u||r==="start"&&d||r==="both"&&(u||d)}}let a=!1;for(const[s,l]of Object.entries(n)){if(l==null||!l[t])continue;const u=s;if(l.onlyAtBoundary){if(!(i&&o&&se(o)&&o.hasFormat(u)))continue;a=!0}e.hasFormat(u)&&e.toggleFormat(u)}a&&e.setStyle("")}const wne={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function tm(e,t){return(function(r,n){if(!r.isCollapsed())return!1;const i=ki(r.focus,n),o=ir(i.origin,jc);if(!o)return!1;const a=r.focus.getNode();if(!o.is(a)&&!od(a,o))return!1;const s=qo(i,Lt(o,n));if(s.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=qo(s.anchor.getSiblingCaret(),s.focus);let u=l.anchor.origin;for(const f of l){if(!gl(f)||!f.origin.is(u.getParent()))return!1;u=f.origin}let d=o;for(const f of cv(Lt(o,n))){if(!f.origin.is(d.getParent())){if(r0(f.origin)){const h=Lt(d,n);return Ch(qo(h,h)),!0}break}if(!jc(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=ki(r.anchor,n).getNodeAtCaret();return!(!jc(i)||i.isInline()||(Ch(dv(Bi(Eo(i,n)))),0))})(e,t)}function oT(e){return dt(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function rm(e){const t=M0();t.add(e),Cn(t)}function aT(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=ki(r,i);if(r.type==="element"&&V(n)&&(Nr(n)||jc(n))){const _=o.getNodeAtCaret();return!(_===null||!oT(_))&&(rm(_.__key),!0)}const a=ir(V(n)?n:n.getParentOrThrow(),_=>V(_)&&!_.isInline()&&mr(_.getParent()));if(a===null)return!1;const s=Lt(a,i).getNodeAtCaret();if(s===null||!oT(s))return!1;if(a.getTextContentSize()===0)return rm(s.__key),!0;const l=Rr().getRootElement();if(l===null)return!1;const u=fi(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const d=u.anchorNode,f=u.anchorOffset,h=u.focusNode,p=u.focusOffset;u.modify("move",t?"backward":"forward","line");const m=u.anchorNode,g=u.anchorOffset;if(m===null)return sT(u,d,f,h,p),!1;const v=bu(m);return sT(u,d,f,h,p),v===null?!1:(m===d&&g===f||!v.is(a)&&!od(v,a))&&(rm(s.__key),!0)}function sT(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function lT(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=ir(V(r)?r:r.getParentOrThrow(),v=>V(v)&&!v.isInline());if(n===null)return!1;const i=Rr(),o=i.getRootElement();if(o===null)return!1;const a=o.ownerDocument.defaultView;if(a===null)return!1;let s=!1;for(const v of n.getChildren())if(V(v)&&v.isInline()){const _=i.getElementByKey(v.getKey());if(_!==null){const x=a.getComputedStyle(_).display;if(x==="inline-grid"||x==="inline-flex"){s=!0;break}}}if(!s)return!1;const l=Lt(n,t?"previous":"next").getNodeAtCaret();if(l===null||!V(l)){if(t){const v=n.getFirstDescendant();se(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(se(v)){const _=v.getTextContentSize();v.select(_,_)}else{const _=n.getChildrenSize();n.select(_,_)}}return!0}const u=i.getElementByKey(l.getKey());if(u===null)return!1;const d=fi(a);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=u.getBoundingClientRect(),m=p.top+p.height/2;if(h.height>0){const v=Y0(h.left,m,o);if(v!==null&&u.contains(v.node)){const _=o.ownerDocument.createRange();return _.setStart(v.node,v.offset),_.collapse(!0),e.applyDOMRange(_),e.dirty=!0,!0}}const g=t?l.getLastDescendant():l.getFirstDescendant();if(se(g)){const v=t?g.getTextContentSize():0;g.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function nm(e,t){const r=Lt(e,t),n=r.getAdjacentCaret();n!==null&&V(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?Ch(dv(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function uT(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>Lt(l,"next")).sort(kh),o=(t?i[0]:i[i.length-1]).origin,a=ir(o,l=>l!==o&&V(l)&&!l.isInline())??rn(),s=t?0:a.getChildrenSize();return a.select(s,s),!0}function Ene(e,t=Ate(wne)){return _l(e.registerCommand(QO,()=>{const r=_e();return ur(r)?(r.clear(),!0):(ie(r)&&lc(r,"click","both",t.peek()),!1)},ct),e.registerCommand(tu,r=>{const n=_e();return ie(n)?(n.deleteCharacter(r),!0):!!ur(n)&&(n.deleteNodes(),!0)},ct),e.registerCommand(vh,r=>{const n=_e();return!!ie(n)&&(n.deleteWord(r),!0)},ct),e.registerCommand(_h,r=>{const n=_e();return!!ie(n)&&(n.deleteLine(r),!0)},ct),e.registerCommand(Mc,r=>{const n=_e();if(typeof r=="string")n!==null&&n.insertText(r);else{if(n===null)return!1;const i=r.dataTransfer;if(i!=null)K1(i,n);else if(ie(n)){const o=r.data;return o&&n.insertText(o),!0}}return!0},ct),e.registerCommand(Ym,()=>{const r=_e();return!!ie(r)&&(r.removeText(),!0)},ct),e.registerCommand(Uo,r=>{const n=_e();return!(!ie(n)&&!ur(n))&&(D6(n,r),!0)},ct),e.registerCommand(VZ,r=>{const n=_e();return!(!ie(n)&&!ur(n))&&(bee(n,r),!0)},ct),e.registerCommand(HZ,r=>{const n=_e();if(!ie(n)&&!ur(n))return!1;const i=n.getNodes();for(const o of i){const a=ir(o,s=>V(s)&&!s.isInline());a!==null&&a.setFormat(r)}return!0},ct),e.registerCommand(Oc,r=>{const n=_e();return!!ie(n)&&(n.insertLineBreak(r),!0)},ct),e.registerCommand(gh,()=>{const r=_e();return!!ie(r)&&(r.insertParagraph(),!0)},ct),e.registerCommand(GZ,()=>{const r=wd(),n=_e();return ie(n)&&(r.setFormat(n.format),r.setStyle(n.style)),See([r]),!0},ct),e.registerCommand(KZ,()=>CA(r=>{const n=r.getIndent();r.setIndent(n+1)}),ct),e.registerCommand(PR,()=>CA(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),ct),e.registerCommand(a6,r=>{const n=_e();if(ur(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),nm(i[0],"previous"),!0}else if(ie(n)&&(!r.shiftKey&&tm(n,"previous")||!r.shiftKey&&aT(n,!0)||!r.shiftKey&&lT(n,!0)))return r.preventDefault(),!0;return!1},ct),e.registerCommand(s6,r=>{const n=_e();if(ur(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),nm(i[0],"next"),!0}else if(ie(n)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===rn().getChildrenSize()})(n)||!r.shiftKey&&tm(n,"next")||!r.shiftKey&&aT(n,!1)||!r.shiftKey&&lT(n,!1)))return r.preventDefault(),!0;return!1},ct),e.registerCommand(i6,r=>{const n=_e();if(ur(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),nm(i[0],Jp(i[0])?"next":"previous"),!0}if(!ie(n))return!1;if(!r.shiftKey&&tm(n,Jp(n.anchor.getNode())?"next":"previous"))return r.preventDefault(),!0;if(r.shiftKey||lc(n,"arrow","start",t.peek()),EA(n,!0)){const i=r.shiftKey;return r.preventDefault(),kA(n,i,!0),!0}return!1},ct),e.registerCommand(r6,r=>{const n=_e();if(ur(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),nm(i[0],Jp(i[0])?"previous":"next"),!0}if(!ie(n))return!1;if(!r.shiftKey&&tm(n,Jp(n.anchor.getNode())?"previous":"next"))return r.preventDefault(),!0;if(r.shiftKey||lc(n,"arrow","end",t.peek()),EA(n,!1)){const i=r.shiftKey;return r.preventDefault(),kA(n,i,!1),!0}return!1},ct),e.registerCommand(GS,r=>{const n=_e();if(!ur(n)&&iT(r.target))return!1;if(ie(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const a=o.getNode();if(Nr(a))return!1;const s=Cte(a);return s.getIndent()>0&&(s.is(a)||a.is(s.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(PR,void 0);if(ml&&ed)return!1}else if(!ur(n))return!1;return r.preventDefault(),e.dispatchCommand(tu,!0)},ct),e.registerCommand(c6,r=>{const n=_e();return!(!ur(n)&&iT(r.target))&&!(!ie(n)&&!ur(n))&&(r.preventDefault(),e.dispatchCommand(tu,!1))},ct),e.registerCommand(bh,r=>{let n=_e();if(ur(n)){const i=n.getNodes();i.length===1&&dt(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!ie(n))return!1;if(lc(n,"enter","both",t.peek()),r!==null){if((ml||tp||rp)&&ed)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(Oc,!1)}return e.dispatchCommand(gh,void 0)},ct),e.registerCommand(u6,()=>{const r=_e();return!!ie(r)&&(e.blur(),!0)},ct),e.registerCommand(f6,r=>{const[,n]=Qp(r);if(n.length>0){const i=r.clientX,o=r.clientY,a=Y0(i,o,e.getRootElement());if(a!==null){const{offset:s,node:l}=a,u=bu(l);if(u!==null){const d=WS();if(se(u))d.anchor.set(u.getKey(),s,"text"),d.focus.set(u.getKey(),s,"text");else{const h=u.getParentOrThrow().getKey(),p=u.getIndexWithinParent()+1;d.anchor.set(h,p,"element"),d.focus.set(h,p,"element")}const f=Xs(d);Cn(f)}e.dispatchCommand(rT,n)}return r.preventDefault(),!0}return fne(r,e)},ct),e.registerCommand(h6,r=>{const[n]=Qp(r),i=_e();return!(n&&!ie(i))&&(ie(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(S4(r.dataTransfer,x4(i)),cne(r.dataTransfer,e)),!0)},ct),e.registerCommand(p6,r=>{const[n]=Qp(r),i=_e();if(n&&!ie(i))return!1;const o=r.clientX,a=r.clientY,s=Y0(o,a,e.getRootElement());if(s!==null){const l=bu(s.node);dt(l)&&r.preventDefault()}return!0},ct),e.registerCommand(m6,()=>{const r=_e();return Uee(ie(r)&&lv(r.anchor.getNode())!==null?r:null),!0},ct),e.registerCommand(rv,r=>(eT(e,el(r,ClipboardEvent)?r:null),!0),ct),e.registerCommand(KS,r=>((async function(n,i){await eT(i,el(n,ClipboardEvent)?n:null),i.update(()=>{const o=_e();ie(o)?o.removeText():ur(o)&&o.getNodes().forEach(a=>a.remove())},{tag:k6})})(r,e),!0),ct),e.registerCommand(VS,r=>{const[,n,i]=Qp(r);return n.length>0&&!i?(e.dispatchCommand(rT,n),!0):$d(r.target)&&rw(r.target)?!1:_e()!==null&&((function(o,a){o.preventDefault(),a.update(()=>{const s=_e(),l=el(o,InputEvent)||el(o,KeyboardEvent)?null:o.clipboardData;l!=null&&s!==null&&K1(l,s)},{tag:E6})})(r,e),!0)},ct),e.registerCommand(l6,()=>{const r=_e();return ie(r)&&lc(r,"space","both",t.peek()),!1},ct),e.registerCommand(d6,()=>{const r=_e();return ie(r)&&lc(r,"tab","both",t.peek()),!1},ct),e.registerCommand(n6,r=>{const n=_e();if(ur(n))return uT(n,!1,r);if(!ie(n))return!1;const{anchor:i}=n;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!V(o))return!1;const a=o.getFirstChild();if(!dt(a)||!a.isInline())return!1;const s=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(s,0,"element"),r.preventDefault(),r.stopPropagation(),!0},ct),e.registerCommand(o6,r=>{const n=_e();if(ur(n))return uT(n,!0,r);if(!ie(n))return!1;const{anchor:i,focus:o}=n,a=ir(o.getNode(),u=>V(u)&&!u.isInline());if(a===null)return!1;const s=a.getFirstChild();if(!dt(s)||!s.isInline()||ir(i.getNode(),u=>V(u)&&!u.isInline())!==a)return!1;const l=a.getKey();return(o.type!=="element"||o.key!==l||o.offset!==0)&&(n.focus.set(l,0,"element"),r.shiftKey||n.anchor.set(l,0,"element"),r.preventDefault(),r.stopPropagation(),!0)},ct))}function J1(e,t){const r={};for(const n of e){const i=t(n);i&&(r[i]?r[i].push(n):r[i]=[n])}return r}function Rw(e){const t=J1(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const cT=/[!-/:-@[-`{-~\s]/,dT=/\s/,Q1=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,kne=/^\s{0,3}$/;function Y1(e){if(!Ad(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&se(t)&&kne.test(t.getTextContent())}function X1(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const k4=/^(\s*)(\d{1,})\.\s/,C4=/^(\s*)[-*+]\s/,Cne=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,Z1=/^(#{1,6})\s/,R4=/^>\s/,A4=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,ex=/^[ \t]*`{3,}$/,Rne=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,Ane=/^(?:\|)(.+)(?:\|)\s?$/;function Tne(e){if(e[0]!=="|")return!1;const{length:t}=e;let r=1,n=0;for(;r<t;){let i=r;for(e[i]===" "&&i++,e[i]===":"&&i++;e[i]==="-";)i++;if(e[i]===":"&&i++,e[i]===" "&&i++,e[i]!=="|")break;n++,r=i+1}return n>0&&(r===t||r===t-1&&/\s/.test(e[r]))}const fT=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,hT=/^<\/[a-z_][\w-]*\s*>/i,pT=e=>new RegExp(`(?:${e.source})$`,e.flags),Ef=np("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),mT=np("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),T4=np("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function tx(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function $ne(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!se(n))return null;const i=n.getTextContent(),o=tx(i);if(o!==null){const[a,s]=o;return n.setTextContent(a),s}return/^ {2,}$/.test(i)&&(function(a,s){for(let l=s-1;l>=0;l--){if(ci(a[l]))return!1;if(/\S/.test(a[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function $4(e){const t=Wo(),r=$ne(e);return r!==null&&Pc(t,T4,r),t}const N4=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},D4=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),a=t.getNextSibling(),s=Da(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],u=e!=="bullet"&&e!=="check"||l!==Ef.parse(l)?void 0:l;if(st(a)&&a.getListType()===e){u&&Pc(a,Ef,u);const f=a.getFirstChild();f!==null?f.insertBefore(s):a.append(s),e==="number"&&a.setStart(Number(n[2])),t.remove()}else if(st(o)&&o.getListType()===e)u&&Pc(o,Ef,u),o.append(s),t.remove();else{const f=Vo(e,e==="number"?Number(n[2]):void 0);u&&Pc(f,Ef,u),f.append(s),t.replace(f)}s.append(...r),i||s.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let m=0;return h&&(m+=h.length),p&&(m+=Math.floor(p.length/4)),m})(n[1]);d&&s.setIndent(d)},Aw=(e,t,r,n)=>{const i=[],o=e.getChildren();let a=0;for(const s of o)if(Tt(s)){if(s.getChildrenSize()===1){const p=s.getFirstChild();if(st(p)){const m=Aw(p,t,r+1,n);m&&i.push(m);continue}}if(n&&!s.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),u=e.getListType(),d=ip(e,Ef),f=u==="number"?`${e.getStart()+a}. `:u==="check"?`${d} [${s.getChecked()?"x":" "}] `:d+" ";let h=t(s);u!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),a++}return i.join(`
29
+ `)},Nne={dependencies:[mv],export:(e,t)=>{if(!Sne(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:Z1,replace:N4(e=>{const t="h"+e[1].length;return ss(t)}),triggerOnEnter:!0,type:"element"},Dne={dependencies:[Fd],export:(e,t)=>{if(!W1(e))return null;const r=t(e).split(`
30
+ `),n=[];for(const i of r)n.push("> "+i);return n.join(`
31
+ `)},regExp:R4,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(W1(o))return o.splice(o.getChildrenSize(),0,[$4(o),...t]),void e.remove()}const i=Id();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},o0={dependencies:[Dd],export:e=>{if(!Ah(e))return null;const t=e.getTextContent();let r=ip(e,mT);if(t.indexOf(r)>-1){const n=t.match(/`{3,}/g);if(n){const i=Math.max(...n.map(o=>o.length));r="`".repeat(i+1)}}return r+(e.getLanguage()||"")+(t?`
32
+ `+t:"")+`
33
+ `+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:r,startMatch:n})=>{const i=n[1],o=i.trim().length,a=e[r],s=n.index+i.length,l=a.slice(s),u=new RegExp(`\`{${o},}$`);if(u.test(l)){const p=l.match(u),m=l.slice(0,l.lastIndexOf(p[0])),g=[...n];return g[2]="",o0.replace(t,null,g,p,[m],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const m=e[p];if(d.test(m)){const g=m.match(d),v=e.slice(r+1,p),_=a.slice(n[0].length);return _.length>0&&v.unshift(_),o0.replace(t,null,n,g,v,!0),[!0,p]}}const f=e.slice(r+1),h=a.slice(n[0].length);return h.length>0&&f.unshift(h),o0.replace(t,null,n,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:ex},regExpStart:A4,replace:(e,t,r,n,i,o)=>{let a,s;const l=r[1]?r[1].trim():"```",u=r[2]||void 0;if(!t&&i){if(i.length===1)n?(a=ai(u),s=i[0]):(a=ai(u),s=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(a=ai(u),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
34
+ `)}Pc(a,mT,l);const d=$r(s);a.append(d),e.append(a)}else t&&N4(d=>ai(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},Fne={dependencies:[up,Bu],export:(e,t,r)=>st(e)?Aw(e,t,0,r):null,regExp:C4,replace:D4("bullet"),triggerOnEnter:!0,type:"element"},Ine={dependencies:[up,Bu],export:(e,t,r)=>st(e)?Aw(e,t,0,r):null,regExp:k4,replace:D4("number"),triggerOnEnter:!0,type:"element"},Pne={format:["code"],tag:"`",type:"text-format"},One={format:["highlight"],tag:"==",type:"text-format"},Mne={format:["bold","italic"],tag:"***",type:"text-format"},Lne={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},zne={format:["bold"],tag:"**",type:"text-format"},Une={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Bne={format:["strikethrough"],tag:"~~",type:"text-format"},jne={format:["italic"],tag:"*",type:"text-format"},qne={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Vne={dependencies:[cp],export:(e,t,r)=>{if(!ha(e)||_c(e))return null;const n=t(e);let i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${n}](${e.getURL()} "${i}")`:`[${n}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{if(ir(e,ha))return;const[,r,n,i]=t,o=n!=null?X1(n):void 0,a=i!=null?X1(i):void 0,s=sd(o,{title:a}),l=r.split("[").length-1,u=r.split("]").length-1;let d=r,f="";if(l<u)return;if(l>u){const p=r.split("[");f="["+p[0],d=p.slice(1).join("[")}const h=$r(d);return h.setFormat(e.getFormat()),s.append(h),e.replace(s),f&&s.insertBefore($r(f)),h},trigger:")",type:"text-match"},Gne=[Nne,Dne,Fne,Ine],Kne=[o0],Hne=[Pne,Mne,Lne,zne,Une,One,jne,qne,Bne],Wne=[Vne],ul=[...Gne,...Kne,...Hne,...Wne];function Jne(e,t=!1){const r=e.split(`
35
+ `);let n=0;const i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a.trimEnd(),l=i[i.length-1],u=o<r.length-1?tx(a):null,d=l!==void 0&&tx(l)!==null;if(Rne.test(s))i.push(s);else if(n===0){{const f=s.match(A4);if(f){n=f[1].trim().length,i.push(s);continue}}s===""||l===""||!l||Z1.test(l)||Z1.test(s)||R4.test(s)||k4.test(s)||C4.test(s)||Cne.test(s)||Ane.test(s)||Tne(s)||d||!t||fT.test(s)||hT.test(s)||pT(hT).test(l)||pT(fT).test(l)||ex.test(l)?i.push(!t&&s!==""||u!==null?a:s):i[i.length-1]=l+" "+(u===null?s:a).trimStart()}else{if(ex.test(s)&&s.trim().length>=n){n=0,i.push(s);continue}i.push(a)}}return i.join(`
36
+ `)}function Qne(e,t,r,n,i){for(const o of t){if(!o.export)continue;const a=o.export(e,s=>X0(s,r,n,void 0,void 0,i));if(a!=null)return a}return V(e)?X0(e,r,n,void 0,void 0,i):dt(e)?e.getTextContent():null}function X0(e,t,r,n,i,o=!1){const a=[],s=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of s){for(const u of r){if(!u.export)continue;const d=u.export(l,f=>X0(f,t,r,n,[...i,...n],o),(f,h)=>gT(f,h,t,n,i,o));if(d!=null){a.push(d);continue e}}ci(l)?a.push(Yne(l)):se(l)?a.push(gT(l,l.getTextContent(),t,n,i,o)):V(l)?a.push(X0(l,t,r,n,i,o)):dt(l)&&a.push(l.getTextContent())}return a.join("")}function Yne(e){return ip(e,T4)+`
37
+ `}function gT(e,t,r,n,i,o=!1){const a=e.hasFormat("code");let s,l,u,d,f=t;if(a||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),a){const{fence:x,padded:S}=(function(E){const k=E.match(/`+/g),R=k?Math.max(...k.map(T=>T.length)):0;return{fence:"`".repeat(R+1),padded:E.length===0||E.includes("`")||/^\s/.test(E)&&/\s$/.test(E)?` ${E} `:E}})(t);s="",u="",l=x+S+x,d=!1}else{const x=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];s=x[1],l=x[2],u=x[3],d=l===""}let h="",p="",m="";const g=vT(e,!0),v=vT(e,!1),_=new Set;for(const x of r){const S=x.format[0],E=x.tag;S!=="code"&&_T(e,S)&&!_.has(S)&&(_.add(S),_T(g,S)&&n.find(k=>k.tag===E)||(n.push({format:S,tag:E}),h+=E))}for(let x=0;x<n.length;x++){const S=rx(e,n[x].format),E=rx(v,n[x].format);if(S&&E)continue;const k=[...n];for(;k.length>x;){const R=k.pop();i&&R&&i.find(T=>T.tag===R.tag)||(R&&typeof R.tag=="string"&&(S?E||(m+=R.tag):p+=R.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+s+h+l+m+u}function vT(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return se(r)?r:null}function rx(e,t){return se(e)&&e.hasFormat(t)}function _T(e,t){return!!rx(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function Xne(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=x=>{let S=0;for(let E=x-1;E>=0&&h[E]==="\\";E--)S++;return S%2==1},m=[];let g=0;for(;g<h.length;)if(h[g]==="`"){let x=1;for(;g+x<h.length&&h[g+x]==="`";)x++;m.push({index:g,length:x}),g+=x}else g++;const v=[];let _=0;for(;_<m.length;){const x=m[_];if(p(x.index)){_++;continue}let S=-1;for(let R=_+1;R<m.length;R++)if(m[R].length===x.length){S=R;break}if(S===-1){_++;continue}const E=m[S];let k=h.slice(x.index+x.length,E.index);k.length>=2&&k.startsWith(" ")&&k.endsWith(" ")&&/[^ ]/.test(k)&&(k=k.slice(1,-1)),v.push({content:k,endIndex:E.index+E.length,startIndex:x.index}),_=S+1}return v})(r);for(const h of f)o||(o={content:h.content,endIndex:h.endIndex,startIndex:h.startIndex,tag:"`"}),i.push({end:h.endIndex,start:h.startIndex})}const a=(function(f,h,p=[]){const m=[],g=new Set(Object.keys(h.transformersByTag).filter(S=>S[0]!=="`").map(S=>S[0])),v=S=>{let E=0;for(let k=S-1;k>=0&&f[k]==="\\";k--)E++;return E%2==1},_=S=>p.some(E=>S>=E.start&&S<E.end);let x=0;for(;x<f.length;){const S=f[x];if(!g.has(S)||v(x)||_(x)){x++;continue}let E=1;for(;x+E<f.length&&f[x+E]===S;)E++;const k=bT(S,f,x,E,!0),R=bT(S,f,x,E,!1);(k||R)&&m.push({active:!0,canClose:R,canOpen:k,char:S,index:x,length:E}),x+=E}return m})(r,t,i),s=a.length>0?(function(f,h,p){const m={};let g=0,v=null;for(;g<h.length;){const _=h[g];if(!_.active||!_.canClose||_.length===0){g++;continue}const x=`${_.char}${_.canOpen}${_.length%3}`,S=m[x]??-1;let E=!1;for(let k=g-1;k>S;k--){const R=h[k];if(!R.active||!R.canOpen||R.length===0||R.char!==_.char||(R.canClose||_.canOpen)&&(R.length+_.length)%3==0&&R.length%3!=0&&_.length%3!=0)continue;const T=Math.min(R.length,_.length),A=Object.keys(p.transformersByTag).filter(O=>O[0]===R.char&&O.length<=T).sort((O,D)=>D.length-O.length)[0];if(!A)continue;E=!0;const N=A.length,P={content:f.slice(R.index+R.length,_.index),endIndex:_.index+N,startIndex:R.index+(R.length-N),tag:A};(!v||P.startIndex<v.startIndex||P.startIndex===v.startIndex&&P.endIndex>v.endIndex)&&(v=P);for(let O=k+1;O<g;O++)h[O].active=!1;R.length-=N,_.length-=N,R.active=R.length>0,_.length>0?_.index+=N:(_.active=!1,g++);break}E||(m[x]=g-1,_.canOpen||(_.active=!1),g++)}return v})(r,a,t):null;let l=null,u=null;if(o&&s?s.startIndex<=o.startIndex&&s.endIndex>=o.endIndex?(l=s,u=t.transformersByTag[s.tag]):(l=o,u=n):o?(l=o,u=n):s&&(l=s,u=t.transformersByTag[s.tag]),!l||!u)return null;const d=[r.slice(l.startIndex,l.endIndex),l.tag,l.content];return d.index=l.startIndex,d.input=r,{endIndex:l.endIndex,isCodeSpan:u===n,match:d,startIndex:l.startIndex,transformer:u}}function bT(e,t,r,n,i){if(!yT(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!yT(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&Q1.test(o)}return!0}function yT(e,t,r,n){const i=e[t-1],o=e[t+r],[a,s]=n?[o,i]:[i,o];return a!==void 0&&!dT.test(a)&&(!Q1.test(a)||s===void 0||dT.test(s)||Q1.test(s))}function qs(e){return se(e)&&!e.hasFormat("code")}function zl(e,t,r){let n=Xne(e,t),i=(function(a,s){const l=a;let u,d,f,h;for(const p of s){if(!p.replace||!p.importRegExp)continue;const m=l.getTextContent().match(p.importRegExp);if(!m)continue;const g=m.index||0,v=p.getEndIndex?p.getEndIndex(l,m):g+m[0].length;v!==!1&&(u===void 0||d===void 0||g<u&&(v>d||v<=u))&&(u=g,d=v,f=p,h=m)}return u===void 0||d===void 0||f===void 0||h===void 0?null:{endIndex:d,match:h,startIndex:u,transformer:f}})(e,r);if(n&&i&&(n.isCodeSpan?i.startIndex<=n.startIndex&&i.endIndex>=n.endIndex?n=null:i=null:n.startIndex<=i.startIndex&&n.endIndex>=i.endIndex||i.startIndex>n.endIndex?i=null:n=null),n){const a=(function(s,l,u,d,f){const h=s.getTextContent();let p,m,g;if(f[0]===h?p=s:l===0?[p,m]=s.splitText(u):[g,p,m]=s.splitText(l,u),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:m,nodeBefore:g,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);qs(a.nodeAfter)&&zl(a.nodeAfter,t,r),qs(a.nodeBefore)&&zl(a.nodeBefore,t,r),qs(a.transformedNode)&&zl(a.transformedNode,t,r)}else if(i){const a=(function(s,l,u,d,f){let h,p,m;return l===0?[h,p]=s.splitText(u):[m,h,p]=s.splitText(l,u),d.replace?{nodeAfter:p,nodeBefore:m,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!a)return;qs(a.nodeAfter)&&zl(a.nodeAfter,t,r),qs(a.nodeBefore)&&zl(a.nodeBefore,t,r),qs(a.transformedNode)&&zl(a.transformedNode,t,r)}const o=X1(e.getTextContent());e.setTextContent(o)}function Zne(e,t,r,n=!1){const i=Rw(r),o=(function(u){const d={},f={},h=[];for(const p of u){const{tag:m}=p;d[m]=p;const g=m.replace(/(\*|\^|\+)/g,"\\$1");h.push(g),m.length===1?f[m]=m==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${g}])(${g})((\\\\${g})?.*?[^${g}\\s](\\\\${g})?)(${g})(?![\\\\${g}])`):f[m]=new RegExp(`(^|[^\\\\])(${g})((\\\\${g})?.*?[^\\s](\\\\${g})?)(${g})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),a=e.split(`
38
+ `),s=a.length;for(let u=0;u<s;u++){const d=a[u],[f,h]=eie(a,u,i.multilineElement,t);f?u=h:tie(d,t,i.element,o,i.textMatch,n)}const l=t.getChildren();for(const u of l)if(!n&&Y1(u)&&t.getChildrenSize()>1)u.remove();else if(V(u))for(const d of u.getAllTextNodes())rie(d)}function eie(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,u=e[t].match(s);if(!u)continue;if(o){const m=o({lines:e,rootNode:n,startLineIndex:t,startMatch:u,transformer:i});if(m===null)continue;if(m)return m}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=t;const p=e.length;for(;h<p;){const m=d?e[h].match(d):null;if(!m&&(!f||f&&h<p-1)){h++;continue}if(m&&t===h&&m.index===u.index){h++;continue}const g=[];if(m&&t===h)g.push(e[t].slice(u[0].length,-m[0].length));else for(let v=t;v<=h;v++)if(v===t){const _=e[v].slice(u[0].length);g.push(_)}else if(v===h&&m){const _=e[v].slice(0,-m[0].length);g.push(_)}else g.push(e[v]);if(l(n,null,u,m,g,!0)!==!1)return[!0,h];break}}return[!1,t]}function tie(e,t,r,n,i,o){const a=$r(e),s=qt();s.append(a),t.append(s);for(const{regExp:l,replace:u}of r){const d=e.match(l);if(d&&(a.setTextContent(e.slice(d[0].length)),u(s,[a],d,!0)!==!1))break}if(zl(a,n,i),s.getParent()!==null&&e.length>0){const l=s.getPreviousSibling();if(!o&&(Ad(l)||W1(l)||st(l))){let u=l;if(st(l)){const d=l.getLastDescendant();u=d==null?null:ir(d,Tt)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[$4(u),...s.getChildren()]),s.remove())}}}function rie(e){const t=new Set,r=e.getTextContent();let n=r.indexOf(" ");for(;n!==-1;)t.add(n),t.add(n+1),n=r.indexOf(" ",n+1);e.splitText(...t).forEach(i=>{i.getTextContent()===" "&&i.replace(wd())})}function nie(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function xT(e,t,r,n,i){const o=e.getParent();if(!mr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExp:s,replace:l}of n){const u=a.match(s),d=i||u&&u[0].endsWith(" ")?r:r-1;if(u&&u[0].length===d){const f=t.getNextSiblings(),[h,p]=t.splitText(r);if(l(e,p?[p,...f]:f,u,!1)!==!1)return h.remove(),!0}}return!1}function ST(e,t,r,n,i){const o=e.getParent();if(!mr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExpStart:s,replace:l,regExpEnd:u}of n){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const d=a.match(s);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,m]=t.splitText(r);if(l(e,m?[m,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function iie(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function wT(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(F4(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function F4(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function oie(e,t=ul){const r=Rw(t),n=r.element.filter(l=>l.triggerOnEnter),i=J1(r.textFormat,({tag:l})=>l[l.length-1]),o=J1(r.textMatch,({trigger:l})=>l),a=new Set([" "]);for(const l of r.textFormat)a.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&a.add(l.trigger);for(const l of t){const u=l.type;if(u==="element"||u==="text-match"||u==="multiline-element"){const d=l.dependencies;for(const f of d)e.hasNode(f)||nie(173,f.getType())}}const s=(l,u,d)=>!!xT(l,u,d,r.element)||!!ST(l,u,d,r.multilineElement)||!!(function(f,h,p){let m=f.getTextContent();const g=p[m[h-1]];if(g==null)return!1;h<m.length&&(m=m.slice(0,h));for(const v of g){if(!v.replace||!v.regExp)continue;const _=m.match(v.regExp);if(_===null)continue;const x=_.index||0,S=x+_[0].length;let E;return x===0?[E]=f.splitText(S):[,E]=f.splitText(x,S),E.selectNext(0,0),v.replace(E,_),!0}return!1})(u,d,o)||!!(function(f,h,p){const m=f.getTextContent(),g=h-1,v=m[g],_=p[v];if(!_)return!1;for(const x of _){const{tag:S}=x,E=S.length,k=g-E+1;if(E>1&&!F4(m,k,S,0,E)||m[k-1]===" ")continue;const R=m[g+1];if(x.intraword===!1&&R&&!cT.test(R))continue;const T=f;let A=T,N=wT(m,k,S),P=A;for(;N<0&&(P=P.getPreviousSibling())&&!ci(P);)if(se(P)){if(P.hasFormat("code"))continue;const ae=P.getTextContent();A=P,N=wT(ae,ae.length,S)}if(N<0||A===T&&N+E===k)continue;const O=A.getTextContent();if(N>0&&O[N-1]===v)continue;const D=O[N-1];if(x.intraword===!1&&D&&!cT.test(D)||!x.format.includes("code")&&iie(A,N))continue;const U=T.getTextContent(),B=U.slice(0,k)+U.slice(g+1);T.setTextContent(B);const q=A===T?B:O;A.setTextContent(q.slice(0,N)+q.slice(N+E));const Q=_e(),J=WS();Cn(J);const te=g-E*(A===T?2:1)+1;J.anchor.set(A.__key,N,"text"),J.focus.set(T.__key,te,"text");for(const ae of x.format)J.formatText(ae,gs[ae]);J.anchor.set(J.focus.key,J.focus.offset,J.focus.type);for(const ae of x.format)J.hasFormat(ae)&&J.toggleFormat(ae);return ie(Q)&&(J.format=Q.format),!0}return!1})(u,d,i);return _l(e.registerUpdateListener(({tags:l,dirtyLeaves:u,editorState:d,prevEditorState:f})=>{if(l.has(C6)||l.has(P0)||e.isComposing())return;const h=l.has(xh),p=d.read(_e),m=f.read(_e);if(!ie(m)||!ie(p)||!p.isCollapsed()||p.is(m)&&!h)return;const g=p.anchor.key,v=p.anchor.offset,_=d._nodeMap.get(g);if(se(_)&&u.has(g)&&(h||v===1||!(v>m.anchor.offset+1))){if(h){const x=d.read(()=>_.getTextContent())[v-1];if(!a.has(x))return}e.update(()=>{if(!qs(_))return;const x=_.getParent();x===null||Ah(x)||s(x,_,p.anchor.offset)&&yu(w6)})}}),e.registerCommand(bh,l=>{if(l!==null&&l.shiftKey)return!1;const u=_e();if(!ie(u)||!u.isCollapsed())return!1;const d=u.anchor.offset,f=u.anchor.getNode();if(!se(f)||!qs(f))return!1;const h=f.getParent();return h===null||Ah(h)?!1:d===f.getTextContent().length&&!(!ST(h,f,d,r.multilineElement,!0)&&!xT(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},gc))}function I4(e,t=ul,r,n=!1,i=!1){const o=n?e:Jne(e,i),a=rn();a.clear(),Zne(o,a,t,n),_e()!==null&&a.selectStart()}function P4(e=ul,t,r=!1){return(function(i,o=!1){const a=Rw(i),s=[...a.multilineElement,...a.element],l=!o,u=a.textFormat.filter(d=>d.format.length===1).sort((d,f)=>Number(d.format.includes("code"))-Number(f.format.includes("code")));return d=>{const f=[],h=(d||rn()).getChildren();for(let p=0;p<h.length;p++){const m=h[p],g=Qne(m,s,u,a.textMatch,o);g!=null&&f.push(l&&p>0&&!Y1(m)&&!Y1(h[p-1])?`
39
+ `.concat(g):g)}return f.join(`
40
+ `)}})(e,r)(t)}let O4=[mv,Fd,up,Bu,cp,Dd];function Si(e){return"var("+e+")"}let aie=w([z("flex"),ei("wrap"),X("center"),c("gap","2px"),c("padding","var("+I.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),lb=w([c("background","none"),c("border","1px solid transparent"),c("border-radius",Si(Y.sm)),c("color",Si(y.textSecondary)),c("font-family","inherit"),c("font-size",Si($.sizeSm)),c("line-height","1"),c("min-width","26px"),c("padding","5px 6px"),Ce("pointer"),je([c("background",Si(y.surfaceSubtle))])]),sie=w([c("background",Si(y.surfaceSubtle)),c("border-color",Si(y.border)),c("color",Si(y.textPrimary))]),lie=w([is(.4),Ce("notAllowed")]),ub=w([c("width","1px"),c("align-self","stretch"),c("background",Si(y.borderSubtle)),c("margin","2px 4px")]),uie=w([z("flex"),X("center"),c("gap",Si(I.xs)),c("padding","var("+I.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),cie=w([Vn(1),c("background",Si(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Si(Y.sm)),c("color",Si(y.textPrimary)),c("font-family","inherit"),c("font-size",Si($.sizeSm)),c("padding","3px 6px"),c("outline","none"),ws([c("border-color",Si(y.brand))])]);function die(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=de(()=>{}),a=o[1],s=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},u=h=>{n.update(()=>{let p=_e();if(p!=null&&ie(p)){Ste(p,h);return}})},d=(h,p,m,g)=>{let v=m!==void 0?m:!1,_=i?lb+" "+lie:v?lb+" "+sie:lb;return b("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:_,title:p,disabled:i,type:"button",onClick:x=>g(),onMouseDown:x=>{x.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{ine(p===""?null:p)}),a(m=>{})};return L(Lr,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(Uo,"bold")),d("I","Italic",r.italic,()=>l(Uo,"italic")),d("</>","Inline code",r.code,()=>l(Uo,"code")),b("span",{className:ub}),d("H1","Heading 1",void 0,()=>u(()=>ss("h1"))),d("H2","Heading 2",void 0,()=>u(()=>ss("h2"))),d("¶","Paragraph",void 0,()=>u(()=>qt())),b("span",{className:ub}),d("•","Bulleted list",void 0,()=>l(s4,void 0)),d("1.","Numbered list",void 0,()=>l(l4,void 0)),d("“","Quote",void 0,()=>u(()=>Id())),d("🔗","Link",void 0,()=>a(h=>{if(!De(h))return""})),b("span",{className:ub}),d("↩","Undo",void 0,()=>l(ev,void 0)),d("↪","Redo",void 0,()=>l(tv,void 0))],"aria-label":"Formatting",className:aie,role:"toolbar"}),s!==void 0?L("div",{children:[b("input",{"aria-label":"Link URL",className:cie,autoFocus:!0,placeholder:"https://…",type:"url",value:s,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(s);case"Escape":return a(m=>{});default:return}},onChange:h=>{let p=h.target.value;a(m=>p)}}),d("Apply","Apply link",void 0,()=>f(s)),d("Remove","Remove link",void 0,()=>f(""))],className:uie}):null]})}let ET={bold:!1,italic:!1,code:!1},fie=die;function hie(e){return e.trim()===""}let kT={contents:void 0};function pie(){let e=kT.contents;if(e!==void 0)return zt(e);let t=ZS({namespace:"reventless-rich-text-probe",nodes:O4,onError:r=>{}});return kT.contents=Gt(t),t}function mie(e){let t=pie(),r={contents:""};return t.update(()=>{I4(e,ul)},{discrete:!0}),t.read(()=>{r.contents=P4(ul)}),r.contents}function gie(e){return e.trim()!==""?e.trimEnd()!==mie(e).trimEnd():!1}function it(e){return"var("+e+")"}let CT=w([z("flex"),ve("column"),c("background",it(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",it(Y.sm)),c("box-sizing","border-box"),c("transition","border-color 120ms"),Xo({NAME:"percent",VAL:100}),xs("hidden"),YI([c("border-color",it(y.brand))])]),vie=w([c("border-color",it(y.error)),YI([c("border-color",it(y.error))])]),_ie=w([z("flex"),X("center"),c("gap","2px"),c("justify-content","flex-end"),c("padding","var("+I.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]);function bie(e){return w([c("background",e?it(y.surfaceSubtle):"transparent"),c("border","1px solid "+(e?it(y.border):"transparent")),c("border-radius",it(Y.sm)),c("color",it(e?y.textPrimary:y.textSecondary)),c("font-family","inherit"),c("font-size",it($.sizeXs)),c("padding","2px var("+I.sm+")"),Ce("pointer")])}let yie=w([c("background",it(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",it(y.textSecondary)),c("font-size",it($.sizeXs)),c("line-height",it($.lineHeightNormal)),c("padding","var("+I.xs+") var("+I.sm+")")]),xie=w([Ft("relative"),z("flex"),ve("column")]),Sie=w([Ft("absolute"),c("top","var("+I.sm+")"),c("left","var("+I.sm+")"),c("color",it(y.textDisabled)),c("font-size",it($.sizeSm)),c("pointer-events","none"),c("user-select","none")]);function wie(e){return w([c("color",it(y.textPrimary)),c("font-size",it($.sizeSm)),c("line-height",it($.lineHeightRelaxed)),c("min-height",e),c("outline","none"),c("padding",it(I.sm)),c("word-break","break-word"),c("overflow-y","auto"),c("tab-size","4")])}let Eie=w([c("margin","0 0 var("+I.sm+")")]),kie=w([c("font-size",it($.sizeXl)),c("font-weight",it($.weightBold)),c("line-height",it($.lineHeightTight)),c("margin","var("+I.sm+") 0 var("+I.xs+")")]),Cie=w([c("font-size",it($.sizeLg)),c("font-weight",it($.weightBold)),c("line-height",it($.lineHeightTight)),c("margin","var("+I.sm+") 0 var("+I.xs+")")]),Rie=w([c("font-size",it($.sizeMd)),c("font-weight",it($.weightBold)),c("margin","var("+I.sm+") 0 var("+I.xs+")")]),Aie=w([c("border-left","3px solid var("+y.border+")"),c("color",it(y.textSecondary)),c("margin","var("+I.xs+") 0"),c("padding-left",it(I.md))]),RT=w([c("margin","var("+I.xs+") 0"),c("padding-left","1.5em")]),Tie=w([c("margin","2px 0")]),$ie=w([c("color",it(y.brand)),c("text-decoration","underline")]),Nie=w([c("font-weight",it($.weightBold))]),Die=w([c("font-style","italic")]),Fie=w([c("text-decoration","line-through")]),Iie=w([c("background",it(y.surfaceSubtle)),c("border-radius",it(Y.sm)),c("font-family",it($.fontFamilyMono)),c("font-size","0.9em"),c("padding","1px 4px")]),Pie=w([c("background",it(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",it(Y.md)),c("display","block"),c("font-family",it($.fontFamilyMono)),c("font-size","0.9em"),c("margin","var("+I.xs+") 0"),c("padding",it(I.sm)),c("white-space","pre-wrap")]);function Oie(e){return w([c("background","transparent"),c("border","none"),c("color",it(y.textPrimary)),c("font-family",it($.fontFamilyMono)),c("font-size",it($.sizeSm)),c("line-height",it($.lineHeightNormal)),c("min-height",e),c("outline","none"),c("padding",it(I.sm)),c("resize","vertical"),c("box-sizing","border-box"),Xo({NAME:"percent",VAL:100})])}let Mie=Object.fromEntries([["paragraph",Eie],["quote",Aie],["link",$ie],["code",Pie],["heading",Object.fromEntries([["h1",kie],["h2",Cie],["h3",Rie]])],["list",Object.fromEntries([["ul",RT],["ol",RT],["listitem",Tie]])],["text",Object.fromEntries([["bold",Nie],["italic",Die],["strikethrough",Fie],["code",Iie]])]]);function Lie(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,a=e.onChange,s=e.value,l=o!==void 0?o:()=>{},u=i!==void 0?i:"Write markdown…",d=n!==void 0?n:"180px",f=r!==void 0?r:!1,h=t!==void 0?t:!1,p=de(()=>"Rich"),m=p[1],g=p[0],v=de(()=>ET),_=v[1],x=de(()=>s.trim()===""),S=x[1],E=de(()=>!1),k=E[1],R=Fe(null),T=Fe(s),A=Fe(s),N=Fe(!1),P=Fe(a);P.current=a;let O=Nt(()=>ZS({namespace:"reventless-rich-text",nodes:O4,onError:te=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",te)},theme:Mie}),[]),D=()=>{let te={contents:""};return O.read(()=>{te.contents=P4(ul)}),te.contents},U=te=>{A.current=te,T.current=te,N.current=!0,k(ae=>gie(te)),O.update(()=>{I4(te,ul)})},B=()=>{let te=D();if(S(ae=>te.trim()===""),_(ae=>{let Z={contents:ET};return O.read(()=>{let W=_e();if(W!=null&&ie(W)){Z.contents={bold:W.hasFormat("bold"),italic:W.hasFormat("italic"),code:W.hasFormat("code")};return}}),Z.contents}),N.current){N.current=!1,T.current=te;return}else return te!==T.current?(T.current=te,P.current(te)):void 0},q=g==="Rich";$e(()=>{if(!q)return;O.setRootElement(R.current);let te=_l(Ene(O),jre(O),Gre(O,Kre(),300),oie(O,ul),O.registerUpdateListener(ae=>B()));return U(s),()=>{te(),O.setRootElement(null)}},[q]),$e(()=>{q&&s!==T.current&&s!==A.current&&U(s)},[s]),$e(()=>{O.setEditable(!h)},[h]);let Q=(te,ae)=>b("button",{children:ae,"aria-pressed":g===te?"true":"false",className:bie(g===te),type:"button",onClick:Z=>{if(m(W=>te),te==="Source")return k(W=>!1)}}),J;return J=g==="Rich"?L("div",{children:[b("div",{ref:Gt(R),"aria-label":"Rich text editor","aria-multiline":!0,className:wie(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:te=>l(),suppressContentEditableWarning:!0}),x[0]&&!h?b("div",{children:u,className:Sie}):null],className:xie}):b("textarea",{"aria-label":"Markdown source",className:Oie(d),spellCheck:!1,placeholder:u,readOnly:h,value:s,onBlur:te=>l(),onChange:te=>{let ae=te.target.value;T.current=ae,A.current=ae,a(ae)}}),L("div",{children:[L("div",{children:[Q("Rich","Rich text"),Q("Source","Markdown")],className:_ie}),!h&&q?b(fie,{editor:O,formats:v[0]}):null,E[0]&&q?b("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:yie}):null,J],className:f?CT+" "+vie:CT})}let zie=Lie;function bl(e){return"var("+e+")"}let M4=w([z("inlineFlex"),X("center"),Xe("center"),c("background",bl(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("color",bl(y.textDisabled))]),AT=zr([M4,w([c("width","24px"),c("height","24px"),c("border-radius",bl(Y.sm)),c("font-size",bl($.sizeSm)),c("vertical-align","middle")])]),L4=zr([M4,w([c("border-radius",bl(Y.md)),c("font-size",bl($.sizeSm))])]),Uie=zr([L4,w([ve("column"),c("gap",bl(I.xs)),c("aspect-ratio","4 / 3")])]),Bie=zr([L4,w([ve("row"),c("gap",bl(I.sm)),c("padding","var("+I.sm+") var("+I.md+")")])]),jie=w([c("width","240px"),c("max-width","100%")]),qie=w([c("width","100%")]),Vie=w([c("width","100%"),c("height","100%"),c("aspect-ratio","auto")]),TT=w([c("font-size","20px"),c("line-height","1")]),Gie=w([c("position","absolute"),c("width","1px"),c("height","1px"),c("padding","0"),c("margin","-1px"),xs("hidden"),c("clip","rect(0, 0, 0, 0)"),c("white-space","nowrap"),c("border","0")]);function im(e){return e==="Media"?"⬚":"▤"}function Kie(e){return e==="Media"?"No image":"No file"}function $T(e){switch(e){case"Thumb":case"Detail":return jie;case"Tile":return qie;case"Fill":return Vie}}function Hie(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=F(e.label,Kie(n)),a;return a=n==="Media"?Uie:Bie,n==="Media"?i==="Thumb"?b("span",{children:im(n),"aria-label":o,className:AT,role:"img",title:o}):L("span",{children:[b("span",{children:im(n),"aria-hidden":!0,className:TT}),o],"aria-label":o,className:zr([a,$T(i)]),role:"img"}):i==="Thumb"?L("span",{children:[b("span",{children:im(n),"aria-hidden":!0}),b("span",{children:o,className:Gie})],className:AT,title:o}):L("span",{children:[b("span",{children:im(n),"aria-hidden":!0,className:TT}),o],className:zr([a,$T(i)])})}let nx=Hie;function Rt(e){return"var("+e+")"}let ix=w([c("color",Rt(y.brand)),c("text-decoration","none"),je([c("text-decoration","underline")])]),Wie=w([z("inlineBlock"),c("width","12px"),c("height","12px"),c("border-radius","3px"),c("border","1px solid var("+y.border+")"),c("vertical-align","-1px")]),Pd=w([z("inlineFlex"),X("center"),c("gap","6px")]),Jie=w([c("height","24px"),c("width","24px"),c("object-fit","cover"),c("border-radius",Rt(Y.sm)),c("border","1px solid var("+y.borderSubtle+")"),c("vertical-align","middle")]),Qie=w([c("max-height","160px"),c("max-width","240px"),c("object-fit","cover"),c("border-radius",Rt(Y.md)),c("border","1px solid var("+y.borderSubtle+")"),Ce("zoomIn")]),Yie=w([c("color",Rt(y.error)),c("font-size",Rt($.sizeXs)),c("font-weight",Rt($.weightMedium)),c("white-space","nowrap"),Wh(Re(6))]),Xie=w([z("inlineBlock"),c("background",Rt(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius","3px"),c("color",Rt(y.textSecondary)),c("font-size",Rt($.sizeXs)),c("font-weight",Rt($.weightMedium)),c("letter-spacing","0.03em"),c("padding","1px 4px"),c("line-height","1.2")]),Zie=w([z("inlineBlock"),c("background",Rt(y.surfaceSubtle)),c("border-radius",Rt(Y.full)),c("width","64px"),c("height","6px"),xs("hidden")]);function eoe(e){return w([c("background",Rt(y.brand)),c("border-radius",Rt(Y.full)),c("height","100%"),c("width",e.toString()+"%")])}let Tw=w([c("color",Rt(y.textSecondary)),c("font-size",Rt($.sizeXs)),c("font-variant-numeric","tabular-nums")]),toe=w([c("width","220px"),c("max-width","100%")]),roe=w([z("flex"),ve("column"),c("gap","1px"),c("line-height","1.35")]),noe=w([c("background","none"),c("border","none"),c("padding","0"),Ce("zoomIn")]),ioe=w([z("inlineFlex"),c("background","none"),c("border","none"),c("padding","0"),c("line-height","0"),c("max-width","100%"),Ce("pointer"),je([c("opacity","0.75")])]),ooe=w([z("flex"),ve("column"),c("gap",Rt(I.xs)),c("width","100%")]),aoe=w([c("background","none"),c("border","none"),c("padding","0"),c("color",Rt(y.textSecondary)),c("font-size",Rt($.sizeXs)),c("text-decoration","underline"),Ce("pointer"),je([c("color",Rt(y.brand))])]),z4=w([z("flex"),ve("column"),X("flexStart"),c("gap","6px")]),U4=w([c("color",Rt(y.textSecondary)),c("font-family",Rt($.fontFamilyMono)),c("font-size",Rt($.sizeXs))]),soe=w([z("inlineBlock"),c("background","#ffffff"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Rt(Y.md)),c("padding","4px"),c("line-height","0")]),loe=w([c("display","block"),c("max-width","260px"),c("height","auto")]),uoe=w([z("flex"),X("center"),c("gap",Rt(I.xs))]);function Bf(e){return w([c("background",Rt(y.surface)),c("border","1px solid var("+(e?y.error:y.border)+")"),c("border-radius",Rt(Y.sm)),c("color",Rt(y.textPrimary)),c("font-family","inherit"),c("font-size",Rt($.sizeSm)),c("padding","6px 8px")])}let NT=w([c("flex","1 1 auto"),c("min-width","0")]),DT=w([c("flex","0 0 auto")]),coe=w([c("color",Rt(y.textSecondary)),c("font-size",Rt($.sizeXs)),c("font-variant-numeric","tabular-nums")]),doe=w([z("inlineFlex"),X("center"),c("gap","6px")]);function B4(e){return w([c("color",Rt(e?y.error:y.textSecondary)),c("font-size",Rt($.sizeXs)),c("font-variant-numeric","tabular-nums")])}let foe=w([z("flex"),ve("column"),c("gap","4px")]),hoe=w([z("flex"),X("center"),c("gap",Rt(I.xs))]);function Od(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function $w(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=F(n[0],"0"),o=F(n[1],"00"),a=s=>{let l=s.length;return l<=3?s:a(s.slice(0,l-3|0))+","+s.slice(l-3|0)};return(t?"-":"")+a(i)+"."+o}function poe(e){return/^[A-Z]{3}$/.test(e)}function j4(e){if(poe(e))try{return Gt(new Intl.NumberFormat("en-US",{style:"currency",currency:e}))}catch{return}}function q4(e,t){let r=j4(t);if(r===void 0)return $w(e)+" "+t;let n=zt(r),i=n.resolvedOptions().maximumFractionDigits;return n.format(e/Math.pow(10,i))}function gv(e){return C(H(e),t=>{let r=C(M(t,"amount"),Ji),n=C(M(t,"currency"),ce);if(r!==void 0&&n!==void 0)return[r,n]})}function moe(e,t){let r=j4(t);return r!==void 0?e/Math.pow(10,zt(r).resolvedOptions().maximumFractionDigits):e}function V4(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function G4(e){let t=["B","KB","MB","GB","TB","PB"],n=((s,l)=>{for(;;){let u=l,d=s;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function Nw(e){let t=e<0?0:Math.floor(e)|0,r=t/86400|0,n=t%86400/3600|0,i=t%3600/60|0,o=t%60;return r>0?r.toString()+"d "+n.toString()+"h":n>0?n.toString()+"h "+i.toString()+"m":i>0?i.toString()+"m "+o.toString()+"s":o.toString()+"s"}function Dw(e){return C(H(e),t=>{let r=o=>C(C(M(t,o),ce),a=>{if(a!=="")return a}),n=r("start"),i=r("end");if(n!==void 0&&i!==void 0)return[n,i]})}function Fw(e,t){let r=qn(e),n=qn(t);return r!==void 0&&n!==void 0?n<r?"Ends before it starts":void 0:"Not a date-time"}function K4(e,t){let r=qn(e),n=qn(t);if(r!==void 0&&n!==void 0&&n>=r)return Nw((n-r)/1e3)}function goe(e){return e.replace(/```[^\n]*\n?/g,"").replace(/`([^`]*)`/g,"$1").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s{0,3}(?:[-*+]|\d+\.)\s+/gm,"").replace(/^>\s?/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/~~(.*?)~~/g,"$1").replace(/\s+/g," ").trim()}function voe(e,t){return nt(t,e,(r,n)=>F(r.split(n)[0],r))}function Z0(e){let r=voe(e,["?","#"]).split("/").filter(o=>o!==""),n=F(r[r.length-1|0],""),i;try{i=decodeURIComponent(n)}catch{i=n}return i===""?"file":i}function _oe(e){let t=e.split("."),r=t.length;if(r===0||r===1)return;let n=F(t[r-1|0],"");if(/^[A-Za-z0-9]{1,5}$/.test(n))return n.toUpperCase()}function Iw(e){return/^[A-Za-z]{2}$/.test(e)}function H4(e){if(Iw(e))return e.toUpperCase().split("").map(t=>F(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let FT={contents:void 0};function boe(){let e=FT.contents;if(e!==void 0)return zt(e);let t;try{t=Gt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return FT.contents=Gt(t),t}function Pw(e){if(!Iw(e))return e;let t=boe();if(t===void 0)return e;try{let r=zt(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let yoe=["street","streetaddress","line1","addressline1","address1"],xoe=["line2","addressline2","address2","apartment","unit","suite"],Soe=["postalcode","zip","zipcode","postcode"],woe=["city","town","locality"],Eoe=["state","region","province","county"],koe=["country","countrycode"];function Coe(e){let t=et(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0;return r===""?void 0:r;case"JSONNumber":return t._0.toString();default:return}}function W4(e){let t=et(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0.split(`
41
+ `).map(u=>u.trim()).filter(u=>u!=="");return r.length===0?void 0:r;case"JSONObject":let n=Pe(t._0),i=u=>C(n.find(d=>u.includes(d[0].toLowerCase())),d=>Coe(d[1])),o=i(Soe),a=i(woe),s=o!==void 0?a!==void 0?o+" "+a:o:a!==void 0?a:void 0,l=ee([i(yoe),i(xoe),s,i(Eoe),i(koe)],u=>u).map(u=>u.trim()).filter(u=>u!=="");return l.length===0?void 0:l;default:return}}function Roe(e){return G(W4(e),t=>t.map(r=>Iw(r)?Pw(r):r).join(", "))}function Aoe(e){let t=H4(e);return t!==void 0?t+" "+Pw(e):e}function om(e){return fe(G(oh(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function IT(e,t){let r=oh(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let vv={};function Ar(e,t){vv[yd(e)]=t}function Toe(e){return M(vv,yd(e))}function J4(e,t){return C(Yc(e,t),r=>M(vv,yd(r.semantic)))}function Q4(e,t,r){return C(J4(e,t),n=>n.cell(e,t,r))}function ox(e,t,r){return C(J4(e,t),n=>n.detail(e,t,r))}function $oe(e,t){return Q4(e,t,null)}function Noe(e,t){return ox(e,t,null)}function Ow(e,t){return C(lW(e,t),r=>M(vv,yd(r.semantic)))}function Doe(e,t){return fe(Ow(e,t),!1,r=>De(r.input))}function Foe(e,t,r,n,i,o,a){return G(C(Ow(e,t),s=>s.input),s=>s(e,t,r,n,i,o,a))}function Ioe(e,t,r,n){return C(C(Ow(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function eg(e){e.stopPropagation()}function tg(e,t,r){return r?b("a",{children:t,className:ix,href:e,rel:"noopener noreferrer",target:"_blank",onClick:eg}):b("a",{children:t,className:ix,href:e,onClick:eg})}function di(e){return C(ce(e),t=>{if(t!=="")return t})}function Mw(e){let t=(r,n,i)=>G(di(i),e);return{cell:t,detail:t}}function _v(e){let t=(r,n,i)=>G(Ji(i),o=>e(o));return{cell:t,detail:t}}Ar("Email",Mw(e=>tg("mailto:"+e,e,!1)));Ar("Phone",Mw(e=>tg("tel:"+e,e,!1)));Ar("Url",{cell:(e,t,r)=>G(di(r),n=>tg(n,Od(n,40),!0)),detail:(e,t,r)=>G(di(r),n=>tg(n,n,!0))});Ar("Currency",_v($w));Ar("Percent",_v(V4));Ar("Bytes",_v(G4));Ar("Duration",_v(Nw));Ar("Color",Mw(e=>L("span",{children:[b("span",{className:Wie,style:{background:e}}),e],className:Pd})));function Poe(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function rg(e){let t=e.size,r=e.kind,n=IH(e.field);if(n===void 0)return b(nx,{kind:r,size:t});let i=Poe(r);return b("button",{children:b(nx,{kind:r,size:t,label:i[1]}),className:ioe,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function Ooe(e){let t=e.alt,r=e.src,n=de(()=>!1);if(r===void 0)return b(rg,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(Lr,{children:[b("button",{children:b("img",{className:Qie,alt:t,src:r}),className:noe,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(a=>!0)}}),n[0]?b(NP,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function ng(e){let t=et(e);if(typeof t!="object")return t==="JSONNull"?Gt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Gt(r===""?void 0:r)}Ar("Image",{cell:(e,t,r)=>G(ng(r),n=>n!==void 0?b("img",{className:Jie,alt:e,src:du(n),onClick:eg}):b(rg,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>G(ng(r),n=>b(Ooe,{src:G(n,du),alt:e,field:e}))});function Moe(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)?!0:/^[0-9A-Za-z_-]{16,}$/.test(e)}function Loe(e){return L("span",{children:[b(bd,{name:e,size:"Small"}),e],className:Pd})}function PT(e,t,r){return C(di(r),n=>{if(!Moe(n))return Loe(n)})}Ar("UserRef",{cell:PT,detail:PT});Ar("Markdown",{cell:(e,t,r)=>G(di(r),n=>Od(goe(n),80)),detail:(e,t,r)=>G(di(r),n=>b(wO,{source:n})),input:(e,t,r,n,i,o,a)=>b(zie,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&hie(r))return"Required"}});Ar("Rating",{cell:(e,t,r)=>G(Ji(r),n=>b(F_,{value:n,max:om(t)})),detail:(e,t,r)=>G(Ji(r),n=>b(F_,{value:n,max:om(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,a)=>b(F_,{value:F(fs(r),0),max:om(t),size:"Medium",showValue:!0,onChange:s=>n(s<=0?"":s.toString()),onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=fs(r);if(i===void 0)return"Invalid rating";let o=om(t);if(i<0||i>o)return"Must be between 0 and "+o.toString()}});function zoe(e){return e<0?0:e>100?100:e}Ar("Progress",{cell:(e,t,r)=>G(Ji(r),n=>{let i=zoe(IT(t,n));return L("span",{children:[b("span",{children:b("span",{className:eoe(i)}),className:Zie}),b("span",{children:Math.round(i).toString()+"%",className:Tw})],className:Pd})}),detail:(e,t,r)=>G(Ji(r),n=>b("div",{children:b(qP,{value:IT(t,n)}),className:toe}))});function Lw(e,t){let r=du(e),n=_oe(t);return L("span",{children:[n!==void 0?b("span",{children:n,className:Xie}):null,b("a",{children:t,className:ix,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:eg})],className:Pd})}function Y4(e){let t=e.name,r=e.href,n=de(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[Lw(r,t),mJ(r)?b("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:aoe,type:"button",onClick:a=>{a.stopPropagation(),i(s=>!s)}}):null],className:Pd}),o?b(vJ,{src:du(r),title:t,height:"60vh"}):null],className:ooe})}Ar("FileUrl",{cell:(e,t,r)=>G(di(r),n=>Lw(n,Od(Z0(n),40))),detail:(e,t,r)=>G(di(r),n=>b(Y4,{href:n,name:Z0(n)}))});Ar("File",{cell:(e,t,r)=>G(ng(r),n=>n!==void 0?Lw(n,Od(Z0(n),40)):b(rg,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>G(ng(r),n=>n!==void 0?b(Y4,{href:n,name:Z0(n)}):b(rg,{field:e,kind:"Document",size:"Detail"}))});function Uoe(e){return F(C(Dr(e).find(t=>t[0].toLowerCase()==="currency"),t=>Fu(t[1])),[])}function Boe(e,t){return b("span",{children:q4(e,t),className:Tw})}function OT(e,t,r){return G(gv(r),n=>Boe(n[0],n[1]))}function joe(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o=Uoe(e.propSchema),a;if(i==="")a=void 0;else try{a=gv(JSON.parse(i))}catch{a=void 0}let s=a!==void 0?[a[0].toString(),a[1]]:["",F(o[0],"")],l=s[1],u=s[0],d=(h,p)=>{let m=fs(h);n(m!==void 0&&p!==""?JSON.stringify(Ye([["amount",m],["currency",p]])):"")},f=fs(u);return L("span",{children:[L("span",{children:[b("input",{"aria-label":"Amount in minor units",className:Bf(t)+" "+NT,step:1,type:"number",value:u,onBlur:h=>r(),onChange:h=>d(h.target.value,l)}),b("span",{children:f!==void 0&&l!==""?"= "+q4(f,l):"minor units",className:coe})],className:NT}),o.length===0?b("input",{"aria-label":"Currency",className:Bf(t)+" "+DT,placeholder:"EUR",value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)}):b("select",{children:o.map(h=>b("option",{children:h,value:h},h)),"aria-label":"Currency",className:Bf(t)+" "+DT,value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)})],className:uoe})}Ar("Money",{cell:OT,detail:OT,input:(e,t,r,n,i,o,a)=>b(joe,{propSchema:t,value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=gv(i);if(o===void 0)return"Invalid amount";let a=o[0];if(a!==Math.trunc(a))return"An amount is a whole number of minor units"}});function qoe(e,t){let r=Fw(e,t),n=K4(e,t),i=r!==void 0?r:n!==void 0?n:"";return L("span",{children:[F(ih(e),e)+" → "+F(ih(t),t),i===""?null:b("span",{children:i,className:B4(De(r))})],className:doe})}function MT(e,t,r){return G(Dw(r),n=>qoe(n[0],n[1]))}function am(e){if(e==="")return;let t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toISOString()}function LT(e){let t=qg(e);return t===e?"":t.slice(0,10)+"T"+t.slice(11,16)}function Voe(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o;if(i==="")o=void 0;else try{o=Dw(JSON.parse(i))}catch{o=void 0}let a=o!==void 0?[LT(o[0]),LT(o[1])]:["",""],s=a[1],l=a[0],u=(p,m)=>{let g=am(p),v=am(m);n(g!==void 0&&v!==void 0?JSON.stringify(Ye([["start",g],["end",v]])):"")},d=am(l),f=am(s),h;if(d!==void 0&&f!==void 0){let p=Fw(d,f);h=p!==void 0?[p,!0]:[F(K4(d,f),""),!1]}else h=["start and end",!1];return L("span",{children:[L("span",{children:[b("input",{"aria-label":"Start",className:Bf(t),type:"datetime-local",value:l,onBlur:p=>r(),onChange:p=>u(p.target.value,s)}),b("span",{children:"→","aria-hidden":!0}),b("input",{"aria-label":"End",className:Bf(t),type:"datetime-local",value:s,onBlur:p=>r(),onChange:p=>u(l,p.target.value)})],className:hoe}),b("span",{children:h[0],className:B4(h[1])})],className:foe})}Ar("DateRange",{cell:MT,detail:MT,input:(e,t,r,n,i,o,a)=>b(Voe,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=Dw(i);return o!==void 0?Fw(o[0],o[1]):"Invalid range"}});function Goe(e){let t=H4(e);return t!==void 0?L("span",{children:[b("span",{children:t,"aria-hidden":!0}),Pw(e)],className:Pd}):e}function zT(e,t,r){return G(di(r),Goe)}Ar("Country",{cell:zT,detail:zT});Ar("Address",{cell:(e,t,r)=>G(Roe(r),n=>Od(n,60)),detail:(e,t,r)=>G(W4(r),n=>b("span",{children:n.map((i,o)=>b("span",{children:Aoe(i)},o.toString())),className:roe}))});function Koe(e){return G(C(C(H(e),t=>M(t,"maxLength")),Ji),t=>t|0)}function cb(e){let t=C(Ta(e).channel,n=>IJ(n).maxLength),r=Koe(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}Ar("ChannelText",{cell:(e,t,r)=>G(di(r),n=>{let i=C(cb(t),o=>{if(Fc(n)>o)return Fc(n)-o|0});return L("span",{children:[Od(n,80),i!==void 0?b("span",{children:i.toString()+" over",className:Yie}):null]})}),detail:(e,t,r)=>{let n=di(r),i=Ta(t).channel;if(n!==void 0&&i!==void 0)return b(pZ,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,a)=>{let s=C(Ta(t).channel,GP);return b(tZ,{value:r,onChange:n,onBlur:i,maxLength:cb(t),channelLabel:G(s,l=>l.label),hasError:a,note:C(s,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":C(cb(t),i=>{let o=Fc(r);if(o>i)return kO(o-i|0)+" over the "+i.toString()+"-character limit"})});Ar("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>G(di(r),n=>L("span",{children:[b(qW,{value:n}),b("span",{children:n,className:U4})],className:z4}))});Ar("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>G(di(r),n=>L("span",{children:[b(eJ,{value:n}),b("span",{children:n,className:U4})],className:z4}))});Ar("Signature",{cell:(e,t,r)=>C(di(r),n=>{if(BC(n))return b("span",{children:"✓ Signed",className:Tw})}),detail:(e,t,r)=>C(di(r),n=>{if(BC(n))return b("span",{children:b("img",{className:loe,alt:"Signature",src:JP(n)}),className:soe})}),input:(e,t,r,n,i,o,a)=>b(VJ,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function Th(e){return"var("+e+")"}let Hoe=w([z("inlineFlex"),X("center"),ei("wrap"),c("gap","4px"),c("font-size",Th($.sizeSm)),c("min-width","0")]),Woe=w([c("color",Th(y.textDisabled)),c("font-size",Th($.sizeXs))]),Joe=w([c("color",Th(y.brand)),c("text-decoration","none"),je([c("text-decoration","underline")])]),Qoe=w([c("color",Th(y.textPrimary))]);function Yoe(e){let t=e.segments,r=Cl();return b("span",{children:t.map((n,i)=>{let o=i===(t.length-1|0),a=n.href;return L(cS,{children:[a!==void 0?b("a",{children:n.label,className:Joe,href:a,onClick:s=>{if(!(s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.button!==0))return s.preventDefault(),s.stopPropagation(),r(a)}}):b("span",{children:n.label,className:Qoe}),o?null:b("span",{children:" › ",className:Woe})]},i.toString()+":"+n.label)}),className:Hoe})}let Xoe=Yoe;function UT(e){return C(C(H(e),t=>M(t,"type")),ce)}function zw(e){return C(C(H(e),t=>M(t,"format")),ce)}function Zoe(e){return C(H(e),t=>M(t,"items"))}function BT(e){return De(C(C(H(e),t=>M(t,"properties")),H))}function ld(e){let t=e.toLowerCase(),r=e.length,n=o=>{let a=o.length;if(r>a&&t.endsWith(o))return e.slice(0,r-a|0)},i=n("ids");return i!==void 0?i:n("id")}function eae(e,t,r){let n=cn(t);if(e==="compositeId")return"KCompositeId";let i=Fu(n);if(i!==void 0)return{TAG:"KEnum",_0:i};let o=UT(n),a=0;if(o!==void 0)switch(o){case"array":let s=Zoe(n);if(s===void 0)return"KArrayOfStrings";if(BT(s)||Ne(UT(s),"object"))return{TAG:"KArrayOfObjects",_0:s};let l=ld(e);return l!==void 0?{TAG:"KArrayOfEntityIds",_0:l}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return BT(n)?{TAG:"KNestedObject",_0:n}:"KString";default:a=1}else a=1;if(a===1){let s=zw(n),l=0;if(s!==void 0)switch(s){case"date":case"date-time":return"KDate";default:l=2}else l=2;if(l===2){if(r.isId)return"KString";let u=ld(e);return u!==void 0?{TAG:"KEntityId",_0:u}:"KString"}}}function tae(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function rae(e,t,r){return t.isCompositeId?!0:r.includes(e)}function nae(e,t,r,n,i){return t.hidden||tae(e)||n&&rae(e,t,i)?!1:r?t.summary||t.isId||e==="compositeId"?!0:n?!1:e==="id":!(n&&e==="id")}function iae(e,t,r){if(e==="compositeId"||r.isId)return 0;if(e==="id")return 1;if(r.summary)return 2;if(typeof t!="object")switch(t){case"KBoolean":return 7;case"KCompositeId":return 0;case"KDate":return 4;case"KNumber":return 8;case"KString":return 5;case"KArrayOfStrings":return 11}else switch(t.TAG){case"KEnum":return 6;case"KEntityId":return 9;case"KArrayOfEntityIds":return 10;case"KArrayOfObjects":return 12;case"KNestedObject":return 13}}function oae(e,t){if(typeof e!="object")switch(e){case"KBoolean":return"80px";case"KCompositeId":return"260px";case"KNumber":return"100px";case"KString":return t==="id"?"220px":void 0;case"KDate":case"KArrayOfStrings":return"180px"}else switch(e.TAG){case"KEnum":return"140px";case"KEntityId":return"220px";case"KArrayOfEntityIds":return"260px";case"KArrayOfObjects":case"KNestedObject":return"240px"}}function Mo(e,t){let r=t!==void 0?t:"List",n=F(G(C(C(H(e),u=>M(u,"properties")),H),Pe),[]),i=Vg(e),o=r==="List"&&i.length!==0,a=ES(e),s=a.length!==0||n.some(u=>u[0]==="compositeId");return ee(n,u=>{let d=u[1],f=u[0],h=Ta(d);if(!nae(f,h,o,s,a))return;let p=eae(f,d,h),m=F(C(C(H(d),g=>M(g,"title")),ce),vt(f));return{key:f,label:m,kind:p,ann:h,propSchema:d,priority:iae(f,p,h),width:oae(p,f)}}).toSorted((u,d)=>u.priority-d.priority|0)}function aae(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function X4(e){return b(ds,{variant:"Neutral",label:e,dot:!1})}function jT(e,t,r,n,i){let o=Es(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[ps(o.pluginId,o.name,t,[]),t]}function qT(e,t,r){if(r===void 0)return[t,!1];let n=r.lookupLabel(e,t);return n!==void 0?[n,!1]:[t,r.isMissing(e,t)]}function $h(e,t,r){let n=Es(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function ax(e,t,r,n,i,o,a,s,l){let u=l!==void 0?l:!1,d=$h(t,n,a),f=F(s,mP(t)),h=g=>{let v=jT(t,g,n,i,a),_=v[1],x=d?[_,!1]:qT(t,_,o),S=x[0],E=b(bH,{href:v[0],label:S,rawValue:_}),k=f&&S!==_?L("span",{children:[b(bd,{name:S,size:"Small"}),E],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):E;return x[1]?b("span",{children:k,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+_+")"}):k},p=g=>{let v=ee(g,_=>{let S=jT(t,_,n,i,a)[1],k=qT(t,S,o)[0];if(k!==S)return{name:k}});if(u&&f&&!d&&g.length>=2&&v.length===g.length)return b(oP,{members:v,size:"Small"})},m=et(r);if(typeof m!="object")return JSON.stringify(r);switch(m.TAG){case"JSONString":return h(m._0);case"JSONArray":let g=m._0,v=ee(g,ce),_=v.length===g.length?p(v):void 0;return _!==void 0?_:b("span",{children:g.map((x,S)=>{let E=et(x);return typeof E!="object"||E.TAG!=="JSONString"?null:L("span",{children:[h(E._0),S<(g.length-1|0)?", ":null]},S.toString())})});default:return JSON.stringify(r)}}function sae(e){let t=et(e);if(typeof t!="object"||t.TAG!=="JSONString")return JSON.stringify(e);let r=t._0.split("/").map(n=>({label:n,href:void 0}));return b(Xoe,{segments:r})}function Io(e,t,r){let n=et(r);if(typeof n!="object")switch(n){case"JSONFalse":return b(ds,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return b(ds,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=iP(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return qg(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function VT(e,t){let r=H(t);if(r===void 0)return;let n=M(r,"name");if(n!==void 0&&et(n)!=="JSONNull")return Io("name",void 0,n);let i=Mo(e,"Drill"),o=ee(i,d=>{let f=d.kind,h;if(typeof f!="object")h=f!=="KArrayOfStrings";else switch(f.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":h=!1;break;default:h=!0}let p=M(r,d.key);if(!h||p===void 0)return;let m=et(p);if(!(typeof m!="object"&&m==="JSONNull"))return[d,p]});if(o.length===0)return;let a=o.slice(0,2),s=i.length-a.length|0,l=a.map((d,f)=>{let h=d[1],p=d[0],m=p.kind,g;if(typeof m!="object")g=m==="KDate"?Io(p.key,zw(p.propSchema),h):Io(p.key,void 0,h);else if(m.TAG==="KEnum"){let v=et(h);g=typeof v!="object"||v.TAG!=="JSONString"?Io(p.key,void 0,h):X4(v._0)}else g=Io(p.key,void 0,h);return L("span",{children:[f>0?" · ":null,g]},f.toString())}),u=s>0?b("span",{children:"+"+s.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return L("span",{children:[l,u],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function iu(e,t,r,n,i,o,a,s,l){let u=i!==void 0?i:lP;if(n===void 0)return F($oe(e,r),"—");let d=Q4(e,r,n);if(d!==void 0)return d;if(typeof t!="object")switch(t){case"KCompositeId":return sae(n);case"KDate":return Io(e,zw(r),n);case"KBoolean":case"KNumber":return Io(e,void 0,n);case"KString":let h=et(n);if(typeof h!="object"||h.TAG!=="JSONString")return Io(e,void 0,n);let p=h._0;return p.length>60?b("span",{children:aae(p,60),title:p}):Io(e,void 0,n);case"KArrayOfStrings":let m=F(G(Vt(n),g=>ee(g,ce)),[]);return b(nP,{items:m})}else switch(t.TAG){case"KEnum":let h=et(n);return typeof h!="object"||h.TAG!=="JSONString"?Io(e,void 0,n):X4(h._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let p=t._0,m=F(Vt(n),[]),g=m.length;if(u.collapsed){let E=m[0];return E!==void 0?GT(p,E,o,a,s,l):b(If,{count:g,label:"items"})}let v=C(m[0],E=>VT(p,E));return v!==void 0?L("span",{children:[v,g>1?b("span",{children:"+"+(g-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):b(If,{count:g,label:"items"});case"KNestedObject":let _=t._0;if(u.collapsed)return GT(_,n,o,a,s,l);let x=VT(_,n);if(x!==void 0)return x;let S=F(G(H(n),E=>Object.keys(E).length),0);return b(If,{count:S,label:"fields"})}let f=fe(Yc(e,r),!1,h=>h.semantic==="UserRef");return ax(e,t._0,n,o,a,s,l,f?!0:void 0,!0)}function GT(e,t,r,n,i,o){let a=F(H(t),{}),s=Mo(e,"Drill").filter(l=>{let u=l.kind;if(typeof u!="object")return!0;switch(u.TAG){case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}});return b("div",{children:s.map(l=>L("div",{children:[b("span",{children:l.label,style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),b("span",{children:iu(l.key,l.kind,l.propSchema,M(a,l.key),l.ann,r,n,i,o)})],style:{display:"flex",alignItems:"baseline",gap:"6px"}},l.key)),style:{display:"flex",maxHeight:"120px",overflow:"auto",flexDirection:"column",gap:"2px"}})}function lae(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}}function uae(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function KT(e,t,r,n){let i=Es(r,e);if(i===void 0)return n;let o=i.name.endsWith("s");return t?o?i.name:i.name+"s":o?i.name.slice(0,i.name.length-1|0):i.name}function cae(e,t,r,n,i,o,a,s){return e.map(l=>{let u=l.kind,d;if(typeof u!="object")d=l.label;else switch(u.TAG){case"KEntityId":let h=u._0;d=$h(h,t,a)?l.label:KT(h,!1,t,l.label);break;case"KArrayOfEntityIds":let p=u._0;d=$h(p,t,a)?l.label:KT(p,!0,t,l.label);break;default:d=l.label}let f=fe(Yc(l.key,l.propSchema),!1,h=>h.semantic==="Image"?!0:h.semantic==="File");return{key:l.key,label:d,render:h=>{let p=iu(l.key,l.kind,l.propSchema,n(h,l.key),l.ann,t,r,o,a);return s!==void 0&&f?b(sP.make,{fill:m=>s(h,m),children:p}):p},sortable:lae(l.kind),width:l.width}})}function Z4(e){return(t,r)=>e(t,r).then(n=>n.data)}let eL=ar(void 0),tL=ar(void 0),dae={contents:void 0},fae=eL.Provider,hae=tL.Provider;function pae(e){let t=e.executeResult,r=e.execute,n=Nt(()=>{if(r!==void 0)return r;if(t!==void 0)return Z4(t);console.error('AutoGraphQL.Provider: neither `execute` nor `executeResult` was supplied — every query below this provider will report "Not connected".')},[r,t]);return br(fae,{value:n,children:br(hae,{value:t,children:e.children})})}let mae={make:pae};function hi(){return At(eL)}function dp(){return At(tL)}let rL={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function nL(e,t){let r=H(e),n=C(C(C(r,i=>M(i,"data")),H),i=>M(i,t));return n!==void 0?n:C(r,i=>M(i,t))}function Uw(e,t){let r=nL(e,t),n=C(r,Vt);return n!==void 0?n:ee(F(C(C(C(r,H),i=>M(i,"edges")),Vt),[]),i=>C(H(i),o=>M(o,"node")))}function iL(e,t){return ee(Uw(e,t),H)}function oL(e,t){let r=(i,o)=>F(C(M(i,o),hS),!1),n=(i,o)=>C(M(i,o),ce);return fe(C(C(C(nL(e,t),H),i=>M(i,"pageInfo")),H),rL,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function gae(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function vae(e,t){return e.hasNextPage?!0:t==="Backward"}function _ae(e,t){return e.hasPreviousPage?!0:t==="Forward"}let bae={};function fp(e,t,r,n){return C(Es(r,t),i=>C(M(e,i.queryField),o=>M(o.labels,n)))}function bv(e,t,r,n){let i=Es(r,t);if(i===void 0)return!1;let o=M(e,i.queryField);return o!==void 0&&o.loaded?Wr(M(o.labels,n)):!1}function yae(e){let t=et(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return ee(t._0,ce).filter(n=>n!=="");default:return[]}}function xae(e,t,r,n){let i={};return t.forEach(o=>{let a=o.kind;if(typeof a!="object")return;switch(a.TAG){case"KEntityId":case"KArrayOfEntityIds":break;default:return}let s=a._0;if($h(s,r,n))return;let l=Es(r,s);if(l===void 0)return;let u=l.queryField,f={contents:F(M(i,u),[])};e.forEach(h=>{let p=M(h,o.key);if(p!==void 0){yae(p).forEach(m=>{if(!f.contents.some(g=>g===m)){f.contents.push(m);return}});return}}),i[u]=f.contents}),i}function Sae(e){return Pe(e).toSorted((r,n)=>Wc(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(Wc).join(",")).join("|")}function wae(e){try{let t=atob(e),r=t.indexOf(":");return r>0&&r<(t.length-1|0)?t.slice(r+1|0):void 0}catch{return}}function aL(e,t,r){let n={};return iL(e,t).forEach(i=>{let o=C(M(i,"id"),ce),a=F(C(M(i,r),ce),"");if(o===void 0)return;let s=wae(o),l=r==="id"?s!==void 0?s:o:a===""?o:a;if(n[o]=l,s!==void 0){n[s]=l;return}}),n}function hp(e,t,r,n,i){let o=i!==void 0?i:!0,a=hi(),s=de(()=>bae),l=s[1],u=o?xae(e,t,r,n):{},d=Sae(u);return $e(()=>{let f={contents:!1};return d!==""&&a!==void 0&&Pe(u).forEach(h=>{let p=h[1];if(p.length===0)return;let m=h[0],g=r.find(E=>E.queryField===m);if(g===void 0)return;let v=g.labelField,_=v==="id"?"id":"id "+v,x="query($ids: [ID!]) { "+m+"(first: "+p.length.toString()+", filter: {ids: $ids}) { edges { node { "+_+" } } } }",S={};S.ids=p.map(E=>E),$t(a(x,S).then(E=>{if(!f.contents){let k=aL(E,m,v);l(R=>{let T=Ye(Pe(R));return T[m]={loaded:!0,labels:k},T})}return Promise.resolve()}),E=>(f.contents||(console.warn("[AutoUI] RefLabel batch "+m+" failed; cells fall back to raw ids",E),l(k=>{let R=Ye(Pe(k));return R[m]={loaded:!0,labels:{}},R})),Promise.resolve()))}),()=>{f.contents=!0}},[d,a]),s[0]}let bs="table",Hs={contents:[]};function na(e){Hs.contents.some(t=>t.id===e.id)?Hs.contents=Hs.contents.map(t=>t.id===e.id?e:t):Hs.contents=Hs.contents.concat([e])}function sL(e){return Hs.contents.find(t=>t.id===e)}function ig(){return Hs.contents}function Bw(e){let t=jn(e,void 0,void 0),r=Hs.contents.filter(n=>{let i=n.arity;return typeof i!="object"||i.TAG==="Multi"?n.isCapable(e,t):!1});return r.filter(n=>n.id===bs).concat(r.filter(n=>n.id!==bs))}function jw(e){return eH(e.map(t=>t.window))}function Eae(e){return nt(e,0,(t,r)=>t+r.rows.length|0)}function pp(e,t,r){let n=r!==void 0?r:"item";return ZI(jw(e),Eae(e),t,n)}function qw(e){try{return Wi(localStorage.getItem(e))}catch{return}}function lL(e,t){try{return localStorage.setItem(e,t)}catch{return}}function uL(e,t,r){return"autoui.viewmode."+F(e,"default")+"."+t+fe(r,"",n=>"."+n)}function tl(e){return"var("+e+")"}let cL=w([z("inlineFlex"),X("center"),c("border","1px solid var("+y.border+")"),c("border-radius",tl(Y.md)),c("overflow","hidden")]),Vw=w([z("inlineFlex"),X("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","2px var("+I.sm+")"),c("color",tl(y.textSecondary)),c("font-size",tl($.sizeSm)),Ce("pointer"),je([c("background",tl(y.surfaceSubtle)),c("color",tl(y.textPrimary))])]),dL=zr([Vw,w([c("background",tl(y.surfaceSubtle)),c("color",tl(y.textPrimary)),c("font-weight",tl($.weightMedium))])]),kae={group:cL,btn:Vw,btnActive:dL};function Cae(e){let t=e.onSelect,r=e.activeId;return b("div",{children:e.modes.map(n=>L("button",{children:[n.icon,b("span",{children:n.label})],className:n.id===r?dL:Vw,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:cL,role:"group"})}let kf={Style:kae,make:Cae};function Rae(e){let t=e.source,r=Ia(),n=Dg(),i=Mo(t.schema,"List"),o=t.rows.map((d,f)=>{let h=F(H(d),{});return{rowKey:F(C(M(h,"id"),ce),"#"+f.toString()),json:d,dict:h}}),a=hp(o.map(d=>d.dict),i,r,t.ownEntity,Wr(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(d,f)=>fp(a,d,r,f),isMissing:(d,f)=>bv(a,d,r,f)},u=i.map(d=>({key:d.key,label:d.label,render:f=>iu(d.key,d.kind,d.propSchema,M(f.dict,d.key),d.ann,r,n,l,t.ownEntity),sortable:!1,width:d.width}));return b(S0,{columns:u,data:o,keyFn:d=>d.rowKey,onRowClick:d=>t.onOpenRow(d.rowKey,d.json)})}let Aae=b("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});na({id:bs,label:"Table",icon:Aae,arity:"Single",isCapable:(e,t)=>!0,render:e=>{let t=e[0];return t!==void 0?b(Rae,{source:t}):null},capability:"always — the universal default"});let HT=["resources","events"],WT=["split","full"],JT=["funnel","scatter"],sx={};function xi(e,t){return C(e.views,r=>M(r,t))}function ys(e,t){return C(e.fields,r=>M(r,t))}function Tn(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function en(e,t,r){let n=e[t];if(n===void 0)return;let i=me.string(n);if(i!==void 0)return i;Tn(r+"."+t,"expected a string — dropped")}function lx(e,t,r){let n=e[t];if(n===void 0)return;let i=me.bool(n);if(i!==void 0)return i;Tn(r+"."+t,"expected a boolean — dropped")}function Tae(e,t,r){let n=e[t];if(n===void 0)return;let i=me.float(n);if(i!==void 0){if(i===Math.trunc(i))return i|0;Tn(r+"."+t,"expected a whole number — dropped");return}else{Tn(r+"."+t,"expected a number — dropped");return}}function $ae(e,t,r){let n=e[t];if(n===void 0)return;let i=me.array(n);if(i!==void 0)return ee(i,me.string);Tn(r+"."+t,"expected an array of strings — dropped")}function QT(e,t,r,n){let i=e[t];if(i===void 0)return;let o=me.object(i);if(o!==void 0){let a={};return Object.entries(o).forEach(s=>{let l=s[0];re(n(s[1],r+"."+t+'["'+l+'"]'),u=>{a[l]=u})}),a}Tn(r+"."+t,"expected an object — dropped")}function fL(e,t){let r=me.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],a=me.string(i[1]);if(a!==void 0){n[o]=a;return}else return Tn(t+"."+o,"expected a string — dropped")}),n}Tn(t,"expected an object of string values — dropped")}function Nae(e,t){let r=me.object(e);if(r!==void 0)return{label:en(r,"label",t),group:en(r,"group",t),order:Tae(r,"order",t),hidden:lx(r,"hidden",t)};Tn(t,"expected an object — dropped")}function Dae(e,t){let r=me.object(e);if(r!==void 0){let n=en(r,"pluginId",t),i=en(r,"slice",t),o=en(r,"command",t),a=en(r,"field",t);if(n!==void 0&&i!==void 0&&o!==void 0&&a!==void 0)return{label:en(r,"label",t),pluginId:n,slice:i,command:o,field:a,then:en(r,"then",t)};Tn(t,"a row action needs pluginId, slice, command and field — dropped");return}Tn(t,"expected an object — dropped")}function Fae(e,t){let r=me.object(e);if(r!==void 0){let n=r.nav,i=r.rowActions,o;if(i!==void 0){let s=me.array(i);s!==void 0?o=fS(s,(l,u)=>Dae(l,t+".rowActions["+u.toString()+"]")):(Tn(t+".rowActions","expected an array of row actions — dropped"),o=void 0)}else o=void 0;let a=r.transitions;return{mode:en(r,"mode",t),layout:en(r,"layout",t),canvas:en(r,"canvas",t),role:en(r,"role",t),resourceRef:en(r,"resourceRef",t),accent:en(r,"accent",t),audit:lx(r,"audit",t),presence:lx(r,"presence",t),nav:n!==void 0?Nae(n,t+".nav"):void 0,rowActions:o,suppress:$ae(r,"suppress",t),transitions:a!==void 0?fL(a,t+".transitions"):void 0}}Tn(t,"expected an object — dropped")}function Iae(e,t){let r=me.object(e);if(r!==void 0){let n=en(r,"view",t);if(n!==void 0)return{view:n,label:en(r,"label",t),field:en(r,"field",t),aggregate:en(r,"aggregate",t),viz:en(r,"viz",t),xField:en(r,"xField",t)};Tn(t,"metric without a `view` — dropped");return}Tn(t,"expected an object — dropped")}function Pae(e,t){let r=e!==void 0?e:"ui-hints",n=me.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let a=me.array(i);a!==void 0?o=fS(a,(s,l)=>Iae(s,r+".dashboard["+l.toString()+"]")):(Tn(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:QT(n,"views",r,Fae),fields:QT(n,"fields",r,fL),dashboard:o}}return Tn(r,"expected an object — no hints applied"),sx}function Oae(e){let t=me.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=Pae('ui-hints["'+i+'"]',n[1])}),r}return Tn("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function Mae(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];De(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function Ul(e){return F(G(C(C(H(cn(e)),t=>M(t,"properties")),H),t=>Object.keys(t)),[])}function Lae(e,t){return C(C(G(C(C(C(H(cn(e)),r=>M(r,"properties")),H),r=>M(r,t)),cn),H),r=>M(r,"items"))}function db(e,t){let r=t.split("."),n=F(r[0],t),i=e.readModels.find(a=>a.name===n),o=i!==void 0?i.schema:G(e.stateViewSlices.find(a=>a.name===n),a=>a.schema);return o!==void 0?nt(r.slice(1),{TAG:"Ok",_0:{schema:o}},(a,s)=>{if(a.TAG!=="Ok")return a;let l=a._0.schema,u=Lae(l,s);return u!==void 0?{TAG:"Ok",_0:{schema:u}}:Ul(l).includes(s)?fe(C(C(C(H(cn(l)),d=>M(d,"properties")),H),d=>M(d,s)),{TAG:"Error",_0:'unresolvable path segment "'+s+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+s+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(a=>a.name).concat(e.stateViewSlices.map(a=>a.name)).join(", ")}}function zae(e){return e.aggregates.flatMap(t=>t.commands).concat(e.stateChangeSlices.flatMap(t=>t.commands).concat(e.readModels.flatMap(t=>t.commands))).map(t=>t.name)}function hL(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.statusField:C(e.stateViewSlices.find(n=>n.name===t),n=>n.statusField)}function Uae(e,t,r){let n=Aa(hL(e,t),jn(r,void 0,void 0).statusField);return n!==void 0?Zo(r,n):[]}function Bae(e){return Dr(e).filter(t=>hs(t[1])).map(t=>t[0])}function YT(e,t){if(sL(e)!==void 0)return;let n=ig().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function jae(e,t){let r=e.aggregates.find(i=>i.name===t);if(r!==void 0)return{TAG:"Ok",_0:r.commands};let n=e.stateChangeSlices.find(i=>i.name===t);return n!==void 0?{TAG:"Ok",_0:n.commands}:{TAG:"Error",_0:e.aggregates.map(i=>i.name).concat(e.stateChangeSlices.map(i=>i.name))}}function qae(e,t,r){let n=r!==void 0?r:[],i=n.length===0?[t]:n,o=[],a=s=>{o.push("[AutoUI] uiHints ("+t.id+"): "+s)};return re(e.views,s=>{Pe(s).forEach(l=>{let u=l[1],d=l[0],f=db(t,d);f.TAG!=="Ok"&&a('views["'+d+'"]: '+f._0),re(u.role,h=>{if(!HT.includes(h))return a('views["'+d+'"].role: unknown role "'+h+'" — expected '+HT.join(" or "));if(h!=="events")return;let p=u.resourceRef;return p!==void 0?f.TAG==="Ok"&&!Ul(f._0.schema).includes(p)?a('views["'+d+'"].resourceRef: unknown field "'+p+'"'):void 0:a('views["'+d+'"]: role "events" requires a resourceRef field')}),re(u.resourceRef,h=>{if(Jc(u.role,"events"))return a('views["'+d+'"].resourceRef: only meaningful with role "events"')}),re(u.transitions,h=>{let p=zae(t),m=hL(t,d),g;g=f.TAG==="Ok"?m!==void 0?Zo(f._0.schema,m):[]:[],g.length===0&&a('views["'+d+'"].transitions: the view declares no status enum, so no transition can apply'),Pe(h).forEach(v=>{let _=v[1],x=v[0];if(p.includes(_)||a('views["'+d+'"].transitions["'+x+'"]: unknown command "'+_+'" — known commands: '+p.join(", ")),g.length!==0&&!g.includes(x))return a('views["'+d+'"].transitions: unknown target state "'+x+'" — known states: '+g.join(", "))})}),re(u.nav,h=>{d.includes(".")&&a('views["'+d+'"].nav: a nested path has no menu entry of its own — nav belongs on the top-level view'),[["label",h.label],["group",h.group]].forEach(p=>{let m=p[0];re(p[1],g=>{if(g.trim()==="")return a('views["'+d+'"].nav.'+m+": blank — an empty "+m+" renders nothing, so it is ignored")})})}),re(u.rowActions,h=>{d.includes(".")&&h.length!==0&&a('views["'+d+'"].rowActions: a nested path is rendered by the detail producer, which offers no row actions — they belong on the top-level view'),h.forEach((p,m)=>{let g='views["'+d+'"].rowActions['+m.toString()+"]",v=i.find(_=>_.id===p.pluginId);if(v!==void 0){let _=jae(v,p.slice);if(_.TAG==="Ok"){let x=_._0,S=x.find(E=>E.name===p.command);if(S!==void 0){let E=Ul(S.schema);E.includes(p.field)||a(g+': unknown field "'+p.field+'" on command "'+p.command+'" — known fields: '+E.join(", "))}else a(g+': unknown command "'+p.command+'" in "'+p.slice+'" — known commands: '+x.map(E=>E.name).join(", "))}else a(g+': unknown slice "'+p.slice+'" in plugin "'+p.pluginId+'" — known aggregates and slices: '+_._0.join(", "))}else a(g+': unknown plugin "'+p.pluginId+'" — known plugins: '+i.map(_=>_.id).join(", "));re(p.then,_=>{if(_.trim()==="")return a(g+".then: blank — an empty route navigates nowhere, so it is ignored")})})}),re(u.mode,h=>re(YT(h,'views["'+d+'"].mode'),a)),re(u.layout,h=>{if(!WT.includes(h))return a('views["'+d+'"].layout: unknown layout "'+h+'" — expected '+WT.join(" or "))}),re(u.suppress,h=>{h.forEach(p=>{if(re(YT(p,'views["'+d+'"].suppress'),a),p===bs)return a('views["'+d+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),re(e.fields,s=>{Pe(s).forEach(l=>{let u=l[0],d=db(t,u);if(d.TAG!=="Ok")return a('fields["'+u+'"]: '+d._0);let f=Ul(d._0.schema);Pe(l[1]).forEach(h=>{let p=h[1],m=h[0];if(f.includes(m)||a('fields["'+u+'"]: unknown field "'+m+'"'),Wr(CS(p)))return a('fields["'+u+'"].'+m+': unknown semantic "'+p+'"')})})}),re(e.dashboard,s=>{s.forEach(l=>{let u=F(l.aggregate,"count");["count","sum","avg"].includes(u)?u!=="count"&&Wr(l.field)&&a('dashboard metric on "'+l.view+'": aggregate "'+u+'" requires a field'):a('dashboard metric on "'+l.view+'": unknown aggregate "'+u+'" — expected count, sum, or avg');let d=db(t,l.view);if(d.TAG!=="Ok")return a("dashboard metric: "+d._0);let f=d._0.schema;re(l.field,h=>{if(!Ul(f).includes(h))return a('dashboard metric on "'+l.view+'": unknown field "'+h+'"')}),re(l.xField,h=>{if(!Ul(f).includes(h))return a('dashboard metric on "'+l.view+'": unknown xField "'+h+'"')}),re(l.viz,h=>{if(!JT.includes(h))return a('dashboard metric on "'+l.view+'": unknown viz "'+h+'" — expected '+JT.join(", "));if(h==="funnel"&&Uae(t,l.view,f).length===0)return a('dashboard metric on "'+l.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(h!=="scatter")return;let p=l.field,m=l.xField;if(p!==void 0&&m!==void 0){let g=Ul(f),v=Bae(f);[["field",p],["xField",m]].forEach(_=>{let x=_[1];if(g.includes(x)&&!v.includes(x))return a('dashboard metric on "'+l.view+'": viz "scatter" '+_[0]+' "'+x+'" is not a numeric field')});return}a('dashboard metric on "'+l.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),o.forEach(s=>{console.error(s)}),o}function pL(e,t){let r=Bw(e),n=C(t,i=>i.suppress);return n!==void 0?r.filter(i=>i.id===bs?!0:!n.includes(i.id)):r}function mL(e,t,r,n){let i=l=>C(l,u=>n.find(d=>d.id===u)),o=i(e);if(o!==void 0)return o;let a=i(C(t,l=>l.mode));if(a!==void 0)return a;let s=i(r);return s!==void 0?s:n[0]}function fb(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function Vae(e,t,r,n){if(!n)return"Full";let i=C(e,fb);if(i!==void 0)return i;let o=C(C(t,a=>a.layout),fb);return o!==void 0?o:F(C(r,fb),"Full")}function Gae(e,t){return F(C(e,r=>r.audit),!1)?!0:t}function Kae(e){return F(C(e,t=>t.presence),!1)}function Hae(e){return e.toLowerCase()==="hide"?"Hide":"Lock"}function Cc(e,t){return t!==void 0&&t.length!==0?t.some(r=>e.includes(r)):!0}function gL(e){return C(e,t=>t[0])}function Wae(e,t){let r=n=>n.filter(i=>Cc(e,i.requiredAccess));return t.map(n=>{let i={...n};return i.internalQueryables=G(n.internalQueryables,o=>o.filter(a=>Cc(e,a.requiredAccess))),i.stateChangeSlices=n.stateChangeSlices.map(o=>({name:o.name,commands:r(o.commands),linkedViews:o.linkedViews,consistencyRead:o.consistencyRead})),i.stateViewSlices=n.stateViewSlices.filter(o=>Cc(e,o.requiredAccess)),i.aggregates=n.aggregates.map(o=>({name:o.name,schema:o.schema,commands:r(o.commands),linkedViews:o.linkedViews})),i.readModels=n.readModels.filter(o=>Cc(e,o.requiredAccess)).map(o=>{let a={...o};return a.commands=r(o.commands),a}),i})}function Jae(e,t){let r={},n=(i,o)=>{let a=!Cc(e,o),s=gL(o);if(a&&s!==void 0){r[i]=s;return}};return t.forEach(i=>{i.readModels.forEach(o=>n(o.name,o.requiredAccess)),i.stateViewSlices.forEach(o=>n(o.name,o.requiredAccess))}),r}function Qae(e,t){let r={},n=(i,o)=>{if(o.length!==0&&o.every(a=>!Cc(e,a.requiredAccess)))return re(C(o[0],a=>gL(a.requiredAccess)),a=>{r[i]=a})};return t.forEach(i=>{i.aggregates.forEach(o=>n(o.name,o.commands)),i.stateChangeSlices.forEach(o=>n(o.name,o.commands))}),r}function Yae(e,t,r){return e==="Lock"?[r,Jae(t,r),Qae(t,r)]:[Wae(t,r),{},{}]}let Xae=[c(y.background,"#0d1117"),c(y.surface,"#161b22"),c(y.surfaceSubtle,"#1c2128"),c(y.surfaceElevated,"#21262d"),c(y.brand,"#2f81f7"),c(y.brandSubtle,"#1f4b8e"),c(y.success,"#3fb950"),c(y.warning,"#d29922"),c(y.error,"#f85149"),c(y.info,"#58a6ff"),c(y.textPrimary,"#e6edf3"),c(y.textSecondary,"#8b949e"),c(y.textDisabled,"#484f58"),c(y.textOnBrand,"#ffffff"),c(y.border,"#30363d"),c(y.borderSubtle,"#21262d"),c(I.xs,"4px"),c(I.sm,"8px"),c(I.md,"16px"),c(I.lg,"24px"),c(I.xl,"32px"),c(I.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Y.sm,"4px"),c(Y.md,"6px"),c(Y.lg,"12px"),c(Y.full,"9999px"),c(kn.sm,"0 1px 3px rgba(0,0,0,0.4)"),c(kn.md,"0 4px 12px rgba(0,0,0,0.5)"),c(kn.lg,"0 8px 24px rgba(0,0,0,0.6)")],Zae=[c(y.background,"#ffffff"),c(y.surface,"#f6f8fa"),c(y.surfaceSubtle,"#eaeef2"),c(y.surfaceElevated,"#ffffff"),c(y.brand,"#0969da"),c(y.brandSubtle,"#ddf4ff"),c(y.success,"#1a7f37"),c(y.warning,"#9a6700"),c(y.error,"#cf222e"),c(y.info,"#0550ae"),c(y.textPrimary,"#1f2328"),c(y.textSecondary,"#636c76"),c(y.textDisabled,"#bec1c5"),c(y.textOnBrand,"#ffffff"),c(y.border,"#d0d7de"),c(y.borderSubtle,"#eaeef2"),c(I.xs,"4px"),c(I.sm,"8px"),c(I.md,"16px"),c(I.lg,"24px"),c(I.xl,"32px"),c(I.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Y.sm,"4px"),c(Y.md,"6px"),c(Y.lg,"12px"),c(Y.full,"9999px"),c(kn.sm,"0 1px 3px rgba(0,0,0,0.08)"),c(kn.md,"0 4px 12px rgba(0,0,0,0.12)"),c(kn.lg,"0 8px 24px rgba(0,0,0,0.16)")],ese=[c(y.background,"#f5f5f5"),c(y.surface,"#ffffff"),c(y.surfaceSubtle,"#eeeeee"),c(y.surfaceElevated,"#ffffff"),c(y.brand,"#424242"),c(y.brandSubtle,"#e0e0e0"),c(y.success,"#388e3c"),c(y.warning,"#f57c00"),c(y.error,"#d32f2f"),c(y.info,"#1976d2"),c(y.textPrimary,"#212121"),c(y.textSecondary,"#757575"),c(y.textDisabled,"#bdbdbd"),c(y.textOnBrand,"#ffffff"),c(y.border,"#bdbdbd"),c(y.borderSubtle,"#e0e0e0"),c(I.xs,"4px"),c(I.sm,"8px"),c(I.md,"16px"),c(I.lg,"24px"),c(I.xl,"32px"),c(I.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Y.sm,"4px"),c(Y.md,"6px"),c(Y.lg,"12px"),c(Y.full,"9999px"),c(kn.sm,"0 1px 3px rgba(0,0,0,0.12)"),c(kn.md,"0 4px 12px rgba(0,0,0,0.14)"),c(kn.lg,"0 8px 24px rgba(0,0,0,0.18)")],tse=[c(y.background,"#000000"),c(y.surface,"#0a0a0a"),c(y.surfaceSubtle,"#111111"),c(y.surfaceElevated,"#1a1a1a"),c(y.brand,"#ffdd00"),c(y.brandSubtle,"#332b00"),c(y.success,"#00ff00"),c(y.warning,"#ffaa00"),c(y.error,"#ff4444"),c(y.info,"#44aaff"),c(y.textPrimary,"#ffffff"),c(y.textSecondary,"#cccccc"),c(y.textDisabled,"#555555"),c(y.textOnBrand,"#000000"),c(y.border,"#ffffff"),c(y.borderSubtle,"#888888"),c(I.xs,"4px"),c(I.sm,"8px"),c(I.md,"16px"),c(I.lg,"24px"),c(I.xl,"32px"),c(I.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Y.sm,"4px"),c(Y.md,"6px"),c(Y.lg,"12px"),c(Y.full,"9999px"),c(kn.sm,"0 1px 3px rgba(255,255,255,0.1)"),c(kn.md,"0 4px 12px rgba(255,255,255,0.15)"),c(kn.lg,"0 8px 24px rgba(255,255,255,0.2)")];function sm(e,t){let r=t!==void 0?[c(y.brand,t.primaryColor)]:[];return w(e.concat(r))}function rse(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=sm(Xae,t.brand);break;case"Light":n=sm(Zae,t.brand);break;case"Neutral":n=sm(ese,t.brand);break;case"HighContrast":n=sm(tse,t.brand);break}return b("div",{children:e.children,className:n})}let nse=rse;function ise(e){}let ose={preset:"Light",setPreset:ise},vL=ar(ose),ase=vL.Provider;function sse(){return At(vL)}let _L="reventless-ui:theme",lse=["Light","Dark","Neutral","HighContrast"];function use(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Light":return"Light";case"Neutral":return"Neutral";default:return}}function bL(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function ux(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function cse(e){let t=localStorage.getItem(_L);return t==null?e:bL(t)}function dse(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=de(()=>cse(r)),i=n[1],o=n[0],a=tn(l=>{localStorage.setItem(_L,ux(l)),i(u=>l)},[]),s=Nt(()=>({preset:o,setPreset:a}),[o,a]);return b(ase,{value:s,children:b(nse,{theme:{preset:o,brand:e.brand},children:e.children})})}let fse={make:dse};function yL(e){return e.startsWith("/")?!e.startsWith("//"):!1}function hse(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):yL(e)?t=(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:t=e;let r=t.replace("appsync-api.","appsync-realtime-api.");return r.endsWith("/realtime")?r:r+"/realtime"}function pse(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):yL(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function mse(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function gse(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+mse(r)}function cx(e,t){if(e.state===t)return;let r=e.state;e.state=t;let n=0;switch(t){case"Closed":case"Connecting":n=1;break;case"Open":let i=e.disconnectedSince;if(i!==void 0){let o=Date.now()-i;e.disconnectedSince=void 0,re(e.onReconnect,a=>a(o))}break}if(n===1)switch(r){case"Closed":case"Connecting":break;case"Open":e.disconnectedSince=Date.now();break}re(e.onStateChange,i=>i(t))}function vse(e){switch(e){case 1:return 1e3;case 2:return 2e3;case 3:return 4e3;case 4:return 8e3;case 5:return 16e3;default:return 3e4}}let _se='{"type":"connection_init"}';function dx(e,t){let r=e.ws,n=e.getToken();if(r===void 0||n===void 0)return;let i=Object.fromEntries([["host",e.host],["Authorization",n]]),o=JSON.stringify(Object.fromEntries([["type","subscribe"],["id",t.id],["channel",t.channel],["authorization",i]]));try{zt(r).send(o);return}catch{return}}function bse(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{zt(r).send(n);return}catch{return}}function yse(e){e.subscriptions.forEach(t=>dx(e,t))}function xse(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=C(r,me.object);if(n===void 0)return;let i=C(n.type,me.string);if(i!==void 0)switch(i){case"connection_ack":cx(e,"Open"),e.reconnectAttempts=0;let o=e.pendingPostAck;return e.pendingPostAck=[],o.forEach(h=>h()),yse(e);case"data":let a=C(n.id,me.string),s=F(n.event,null),l=h=>{let p=me.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},u=me.array(s),d=u!==void 0?u.map(l):[l(s)],f=C(a,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function xL(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([gse(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Gt(i),cx(e,"Connecting"),i.onopen=()=>{try{i.send(_se);return}catch{return}},i.onmessage=o=>xse(e,o.data),i.onclose=()=>{if(e.ws=void 0,cx(e,"Closed"),e.disposed)return;let o=e.reconnectAttempts+1|0;e.reconnectAttempts=o,e.reconnectTimer=setTimeout(()=>xL(e),vse(o))},i.onerror=o=>{}}function Sse(e,t,r,n,i){let o={ws:void 0,state:"Closed",url:e,host:t,getToken:r,subscriptions:new Map,pendingPostAck:[],reconnectAttempts:0,reconnectTimer:void 0,disposed:!1,onStateChange:n,disconnectedSince:void 0,onReconnect:i};return xL(o),o}function wse(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};e.subscriptions.set(n,i);let o=e.state,a=0;switch(o){case"Closed":case"Connecting":a=1;break;case"Open":dx(e,i);break}return a===1&&e.pendingPostAck.push(()=>dx(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),bse(e,n)}}function XT(e){e.disposed=!0;let t=e.reconnectTimer;t!==void 0&&clearTimeout(t),e.reconnectTimer=void 0;let r=e.ws;if(r!==void 0)try{zt(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function Ese(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(a=>JSON.stringify(a))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let a=await fetch(e,{method:"POST",headers:o,body:i});return a.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+a.status.toString()}}catch(a){let s=dl(a);return s.RE_EXN_ID===Rg?{TAG:"Error",_0:F(s._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function ZT(){return fe(Wi(globalThis.document),!1,e=>e.hidden)}function kse(e){let t=Wi(globalThis.document);if(t===void 0)return()=>{};let r=zt(t);return r.addEventListener("visibilitychange",e),()=>{r.removeEventListener("visibilitychange",e)}}let SL=["Platform_"];function e$(e,t){let r=t.toLowerCase();return e.some(n=>r.startsWith(n.toLowerCase()))?"Platform":"Domain"}let wL=ar(void 0);function yv(){return At(wL)}function t$(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[],torndown:!1}}let Cse=wL.Provider;function Rse(e){let t=e.getToken,r=e.platformReadModelPrefixes,n=e.clientEventsNamespace,i=e.liveReconnectRefetch,o=e.liveUpdates,a=e.platformEventsEndpoint,s=e.domainEventsEndpoint,l=i!==void 0?i:!0,u=r!==void 0?r:SL,d=Fe(t);$e(()=>{d.current=t},[t]);let f=()=>d.current(),h=Fe(t$()),p=Fe(t$()),m=Fe(ZT()),g=de(()=>"Closed"),v=g[1],_=g[0],x=de(()=>"Closed"),S=x[1],E=x[0],k=Z=>Z==="Domain"?h:p,R=Z=>Z==="Domain"?s:a,T=Z=>{let W=k(Z).current;if(!l)return;W.reconnectListeners.slice().forEach(oe=>{try{return oe()}catch{return}})},A=Z=>{let W=k(Z).current,le=W.client;if(le!==void 0)return le;let oe=R(Z);if(oe===void 0)return;let Se=hse(oe),be=pse(oe),ue=Sse(Se,be,f,xe=>Z==="Domain"?v(ot=>xe):S(ot=>xe),xe=>{if(xe>=2e3)return T(Z)});return W.client=ue,ue},N=Z=>{let W=k(Z).current,le=W.idleTimer;if(le!==void 0){clearTimeout(le),W.idleTimer=void 0;return}},P=(Z,W,le)=>{if(!Wr(le.underlyingUnsub))return;let oe=A(Z);if(oe===void 0)return;let Se=wse(oe,W,be=>{le.callbacks.forEach(ue=>ue(be))});le.underlyingUnsub=Se},O=(Z,W,le)=>{let oe=k(Z).current;if(!o||Wr(R(Z)))return()=>{};N(Z),oe.refcount=oe.refcount+1|0;let Se=oe.registry.get(W),be;if(Se!==void 0){let ue=Se.drainTimer;ue!==void 0&&(clearTimeout(ue),Se.drainTimer=void 0),be=Se}else{let ue={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};oe.registry.set(W,ue),be=ue}return be.callbacks.push(le),be.refcount=be.refcount+1|0,be.refcount===1&&!m.current&&P(Z,W,be),()=>{if(be.callbacks=be.callbacks.filter(ue=>ue!==le),be.refcount=be.refcount-1|0,oe.torndown?(be.underlyingUnsub=void 0,oe.registry.delete(W)):be.refcount===0&&(be.drainTimer=setTimeout(()=>{let ue=be.underlyingUnsub;ue!==void 0&&ue(),be.underlyingUnsub=void 0,be.drainTimer=void 0,oe.registry.delete(W)},5e3)),oe.refcount=oe.refcount-1|0,oe.refcount===0&&!oe.torndown){let ue=k(Z).current,xe=ue.idleTimer;xe!==void 0&&clearTimeout(xe),ue.idleTimer=setTimeout(()=>{let ot=ue.client;ot!==void 0&&(XT(ot),ue.client=void 0),ue.idleTimer=void 0},3e4);return}}},D=Z=>o?De(R(e$(u,Z))):!1,U=()=>{["Domain","Platform"].forEach(Z=>{k(Z).current.registry.forEach(le=>{let oe=le.underlyingUnsub;if(oe!==void 0){oe(),le.underlyingUnsub=void 0;return}})})},B=()=>{["Domain","Platform"].forEach(Z=>{let W=k(Z).current,le={contents:!1};if(W.registry.forEach((oe,Se)=>{if(oe.refcount>0&&Wr(oe.underlyingUnsub))if(P(Z,Se,oe),De(oe.underlyingUnsub)){le.contents=!0;return}else return}),le.contents)return T(Z)})};$e(()=>kse(()=>{let W=ZT();if(W!==m.current)return m.current=W,W?U():B()}),[]),$e(()=>(()=>{["Domain","Platform"].forEach(Z=>{let W=k(Z).current,le=W.idleTimer;le!==void 0&&clearTimeout(le),W.idleTimer=void 0,W.registry.forEach(Se=>{let be=Se.drainTimer;if(be!==void 0){clearTimeout(be),Se.drainTimer=void 0;return}});let oe=W.client;oe!==void 0&&XT(oe),W.client=void 0,W.torndown=!0})}),[]);let q=Z=>Z==="Domain"?_:E,Q=(Z,W)=>{let le=k(Z).current;return le.reconnectListeners.push(W),()=>{le.reconnectListeners=le.reconnectListeners.filter(oe=>oe!==W)}},J=()=>o&&De(n)?De(s):!1,te=async(Z,W,le)=>{let oe=R(Z);return oe!==void 0?await Ese(oe,d.current(),W,le):{TAG:"Error",_0:"no events endpoint configured"}},ae=Nt(()=>({subscribe:O,isLive:D,apiForReadModel:Z=>e$(u,Z),statusFor:q,registerReconnect:Q,publish:te,clientChannelsAvailable:J,clientNamespace:()=>n,liveUpdatesEnabled:()=>o}),[o,s,a,_,E,n,u]);return br(Cse,{value:ae,children:e.children})}let Ase={make:Rse};function Tse(e,t){return re(C(C(H(t),r=>M(r,"properties")),H),r=>{Kh(r).forEach(n=>re(C(C(H(n),i=>M(i,"x-reventless-semantic-target")),H),i=>{let o=M(i,"store"),a=M(i,"plugin");if(o!==void 0&&a===void 0){i.plugin=e;return}}))}),t}function fx(e,t){let r=ce(t);return Tse(e,r!==void 0?JSON.parse(r):t)}function r$(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function n$(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function $se(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function i$(e){if(Ne(C(M(e,"type"),ce),"object"))return C(M(e,"x-reventless-graphql-input"),ce)}function Nse(e){return C(M(e,"x-reventless-graphql-type"),ce)}function Dse(e,t){let r=F(C(M(t,"type"),ce),"string");if(r==="array"){let i=C(M(t,"items"),H),o=C(i,i$);return"["+(o!==void 0?o:F(G(C(C(i,s=>M(s,"type")),ce),s=>s==="string"&&($se(e)||n$(e))?"ID":r$(s)),"String"))+"!]"}let n=i$(t);return n!==void 0?n:n$(e)&&r==="string"?"ID":r$(r)}function EL(e){return G(C(C(H(e),t=>M(t,"required")),Vt),t=>ee(t,ce))}function Fse(e,t,r){let n=EL(t),i=F(G(C(C(H(t),d=>M(d,"properties")),H),d=>Object.keys(d).filter(f=>f!=="TAG").map(f=>{let h=C(M(d,f),H),p=C(h,Nse),m;if(p!==void 0)m=p;else{let g=fe(h,"String",v=>Dse(f,v));m=n!==void 0?n.includes(f)?g+"!":g:g+"!"}return[f,m]})),[]),a=(r!==void 0?[]:[["id","ID!"]]).concat(i),s="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(a.length===0)return"mutation { "+e+" { "+s+" } }";let l=a.map(d=>"$"+d[0]+": "+d[1]).join(", "),u=a.map(d=>{let f=d[0];return f+": $"+f}).join(", ");return"mutation "+e+"("+l+") { "+e+"("+u+") { "+s+" } }"}function Ise(e){let t=e.split(".");return F(t[t.length-1|0],e)}function Pse(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Ose(e){return ee(F(Vt(e),[]),t=>G(H(t),r=>{let n=i=>F(C(M(r,i),ce),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:C(M(r,"plugin"),ce)}}))}function o$(e,t){return ee(F(Vt(t),[]),r=>G(C(H(r),n=>{let i=C(M(n,"apiExposed"),hS);if(!Ne(i,!1))return n}),n=>{let i=g=>F(C(M(n,g),ce),""),o=i("name"),s=i("level")==="Instance"?"Instance":"Collection",l=F(G(M(n,"schema"),g=>fx(e,g)),null),u=i("mutationField"),d=C(M(n,"aggregateIdField"),ce),f=F(G(M(n,"references"),Ose),[]),h=G(C(M(n,"allowedStates"),Vt),g=>ee(g,ce)),p=C(M(n,"targetState"),ce),m=C(G(C(M(n,"requiredAccess"),Vt),g=>ee(g,ce)),g=>{if(g.length!==0)return g});return{name:o,label:Pse(Ise(o)),schema:l,mutationDocument:Fse(u,l,d),requiredRole:void 0,level:s,aggregateIdField:d,refFields:[],references:f,allowedStates:h,targetState:p,requiredAccess:m,ownerField:C(M(n,"ownerField"),ce)}}))}function hx(e){return ee(F(Vt(e),[]),t=>G(H(t),r=>{let n=m=>F(C(M(r,m),ce),""),i=m=>F(C(M(r,m),Vt),[]),o=(m,g)=>ee(F(C(M(m,g),Vt),[]),ce),a=n("pluginId"),s=m=>C(G(C(M(m,"requiredAccess"),Vt),g=>ee(g,ce)),g=>{if(g.length!==0)return g}),l=ee(i("readModels"),m=>G(H(m),g=>{let v=_=>F(C(M(g,_),ce),"");return{name:v("name"),schema:F(G(M(g,"schema"),_=>fx(a,_)),null),queryDocument:"",queryField:v("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(g,"linkedWriteSide"),labelField:v("labelField"),labelFieldSource:C(M(g,"labelFieldSource"),ce),searchableFields:o(g,"searchableFields"),statusField:C(M(g,"statusField"),ce),requiredAccess:s(g),ownerField:C(M(g,"ownerField"),ce)}})),u=ee(i("aggregates"),m=>G(H(m),g=>({name:(_=>F(C(M(g,_),ce),""))("name"),schema:null,commands:o$(a,F(M(g,"commands"),[])),linkedViews:o(g,"linkedViews")}))),d=m=>ee(i(m),g=>G(H(g),v=>{let _=x=>F(C(M(v,x),ce),"");return{name:_("name"),schema:F(G(M(v,"schema"),x=>fx(a,x)),null),queryField:_("queryField"),sortIndex:0,linkedWriteSide:o(v,"linkedWriteSide"),labelField:_("labelField"),labelFieldSource:C(M(v,"labelFieldSource"),ce),searchableFields:o(v,"searchableFields"),statusField:C(M(v,"statusField"),ce),requiredAccess:s(v),ownerField:C(M(v,"ownerField"),ce)}})),f=d("stateViewSlices"),h=d("internalQueryables"),p=ee(i("stateChangeSlices"),m=>G(H(m),g=>({name:(_=>F(C(M(g,_),ce),""))("name"),commands:o$(a,F(M(g,"commands"),[])),linkedViews:o(g,"linkedViews"),consistencyRead:C(M(g,"consistencyRead"),ce)})));return{id:a,name:a,readModels:l,aggregates:u,stateViewSlices:f,stateChangeSlices:p,internalQueryables:h}}))}function Mse(e){return F(G(C(C(C(me.object(e),t=>t.data),me.object),t=>t.Platform_ComponentDefinitions),hx),[])}function Lse(e){if(me.array(e)!==void 0)return{TAG:"Ok",_0:hx(e)};let r=Du(C(C(C(me.object(e),n=>n.data),me.object),n=>n.Platform_ComponentDefinitions),n=>De(me.array(n)));return r!==void 0?{TAG:"Ok",_0:hx(r)}:{TAG:"Error",_0:"expected a JSON array of component-definition entries (or a `{data:{Platform_ComponentDefinitions:[…]}}` envelope)"}}let zse=`{
42
+ Platform_ComponentDefinitions {
43
+ pluginId
44
+ readModels { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField requiredAccess ownerField }
45
+ aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews }
46
+ stateViewSlices { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField requiredAccess ownerField }
47
+ internalQueryables { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField requiredAccess ownerField }
48
+ stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews consistencyRead }
49
+ }
50
+ }`;function Use(e){return e.startsWith("https://")?"wss://"+e.slice(8):e.startsWith("http://")?"ws://"+e.slice(7):e.startsWith("/")?(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:e}let Bse="/ui-hints.json",jse="Reventless";function qse(e){let t=e.appName,r=e.platformName;return t!==void 0&&t.trim()!==""?t.trim():r!==void 0&&r.trim()!==""?vt(r):jse}function Vse(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function Gse(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function Kse(e){let t=me.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=s=>C(t[s],me.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=F(r("platformApiEndpoint"),n),o=s=>C(t[s],me.bool),a=s=>F(G(C(t[s],me.object),l=>Object.fromEntries(ee(Object.entries(l),u=>{let d=u[0];return G(me.string(u[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:F(r("platformApiSubscriptionEndpoint"),Use(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),clientEventsNamespace:r("clientEventsNamespace"),liveUpdates:F(o("liveUpdates"),!0),liveReconnectRefetch:F(o("liveReconnectRefetch"),!0),platformReadModelPrefixes:F(G(C(t.platformReadModelPrefixes,me.array),s=>ee(s,me.string)),SL),region:r("region"),authMode:F(G(r("authMode"),Gse),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:F(o("autoRedirectFirstPage"),!1),home:r("home"),mode:F(G(r("mode"),Vse),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:ee(F(C(t.accessTiers,me.array),[]),me.string),viewModes:ee(F(C(t.viewModes,me.array),[]),me.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),assetOrigins:a("assetOrigins"),uiHintsUrl:F(r("uiHintsUrl"),Bse),manifestUrl:r("manifestUrl"),journeyManifestUrls:fe(C(t.journeyManifestUrls,me.object),{},s=>{let l={};return Rj(s,(u,d)=>re(me.string(u),f=>{l[d]=f})),l}),deniedSurfaces:F(G(r("deniedSurfaces"),Hae),"Lock"),appName:r("appName"),logoUrl:r("logoUrl"),theme:C(r("theme"),s=>{let l=use(s);if(l!==void 0)return l;console.warn('[Shell] config.json: unknown theme "'+s+'" — expected '+lse.join(", ")+". Opening on the default instead.")}),elevatedGroups:ee(F(C(t.elevatedGroups,me.array),[]),me.string)}}}function Hse(e){return $t(fetch(e).then(t=>t.ok?t.json().then(Oae):(console.warn("[AutoUI] "+e+": not loaded (status "+t.status.toString()+") — no UI hints applied"),Promise.resolve({}))),t=>(console.warn("[AutoUI] "+e+": not loaded ("+String(t)+") — no UI hints applied"),Promise.resolve({})))}function Wse(e){return $t(fetch(e).then(t=>t.ok?$t(t.json().then(r=>{let n=Lse(r);return n.TAG==="Ok"?n:{TAG:"Error",_0:e+": "+n._0}}),r=>Promise.resolve({TAG:"Error",_0:e+": not valid JSON — "+String(r)})):Promise.resolve({TAG:"Error",_0:e+": fetch failed with status "+t.status.toString()})),t=>Promise.resolve({TAG:"Error",_0:e+": fetch threw — "+String(t)}))}function Jse(){return $t(fetch("/config.json").then(e=>e.ok?e.json().then(Kse):Promise.resolve({TAG:"Error",_0:"config.json: fetch failed with status "+e.status.toString()})),e=>Promise.resolve({TAG:"Error",_0:"config.json: fetch threw — "+String(e)}))}function Qse(e){let t=me.string(e);return t!==void 0?t:G(me.float(e),r=>r.toString())}function Yse(e){return G(me.object(e),t=>({message:F(C(t.message,me.string),""),path:ee(F(C(t.path,me.array),[]),Qse),code:C(C(C(t.extensions,me.object),r=>r.code),me.string)}))}function kL(e){let t=me.object(e);return{data:F(C(t,r=>r.data),null),errors:ee(F(C(C(t,r=>r.errors),me.array),[]),Yse)}}function Xse(e,t){return e.errors.find(r=>Ne(r.path[0],t))}function CL(e,t){let r=C(me.object(e.data),n=>n[t]);if(!(r!==void 0&&et(r)!=="JSONNull"))return Xse(e,t)}function RL(e){return e.errors.some(t=>Ne(t.code,"UNAUTHORIZED"))}function Zse(e){return t=>((r,n)=>{let i={contents:void 0};return e((a,s)=>t(a,s).then(l=>(i.contents=l,l.data)))(r,n).then(a=>{let s=i.contents;return s!==void 0?s:{data:a,errors:[]}})})}function ele(e,t,r,n){return(i,o)=>{let a=i.includes("Platform")||i.includes("platform")?t:e,s=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(s.Authorization="Bearer "+l),fetch(a,{method:"POST",headers:s,body:F(JSON.stringify({query:i,variables:o}),"")}).then(u=>(u.status===401&&n(),u.json())).then(u=>{let d=kL(u);return RL(d)&&n(),Promise.resolve(d)})}}let tle=Z4;class Cf extends Error{}Cf.prototype.name="InvalidTokenError";function rle(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function nle(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return rle(t)}catch{return atob(t)}}function ile(e,t){if(typeof e!="string")throw new Cf("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new Cf(`Invalid token specified: missing part #${r+1}`);let i;try{i=nle(n)}catch(o){throw new Cf(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new Cf(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let ole=(function(e){return e&&e.name?String(e.name):"UnknownError"}),ale=(function(e){return e&&e.message?String(e.message):""});function og(e){return{name:ole(e),message:ale(e)}}function ag(e){switch(e.name){case"PasswordResetRequiredException":return"Password reset required — contact your administrator";case"LimitExceededException":case"TooManyRequestsException":return"Too many attempts — please wait a moment and try again";case"UserNotConfirmedException":return"Account not confirmed — check your email";case"NotAuthorizedException":case"UserNotFoundException":return"Incorrect username or password";default:return"Sign-in failed. Please try again."}}const sle=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),lle=e=>({httpHandler:e.httpHandler()});var Nh;(function(e){e.HTTP="http",e.HTTPS="https"})(Nh||(Nh={}));var Dh;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(Dh||(Dh={}));const px="__smithy_context";class Xi{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const r=new Xi({...t,headers:{...t.headers}});return r.query&&(r.query=ule(r.query)),r}static isInstance(t){if(!t)return!1;const r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return Xi.clone(this)}}function ule(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class ud{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const cle=e=>t=>async r=>{if(!Xi.isInstance(r.request))return t(r);const{request:n}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return t(r)},dle={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},fle=e=>({applyToStack:t=>{t.add(cle(e),dle)}}),hle=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=s,d=l??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return a?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l}=s,u=l??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:o,input:u(r.input),error:n,metadata:n.$metadata}),n}},ple={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},mle=e=>({applyToStack:t=>{t.add(hle(),ple)}}),gle={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},vle=()=>e=>async t=>e(t),_le=e=>({applyToStack:t=>{t.add(vle(),gle)}}),Md=e=>e[px]||(e[px]={}),ls=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},ble=(e,t)=>{if(!t||t.length===0)return e;const r=[];for(const n of t)for(const i of e)i.schemeId.split("#")[1]===n&&r.push(i);for(const n of e)r.find(({schemeId:i})=>i===n.schemeId)||r.push(n);return r};function yle(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const xle=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),a=e.authSchemePreference?await e.authSchemePreference():[],s=ble(o,a),l=yle(e.httpAuthSchemes),u=Md(n),d=[];for(const f of s){const h=l.get(f.schemeId);if(!h){d.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const p=h.identityProvider(await t.identityProviderConfigProvider(e));if(!p){d.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},m),f.signingProperties=Object.assign(f.signingProperties||{},g),u.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(d.join(`
51
+ `));return r(i)},Sle={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},wle=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(xle(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),Sle)}}),Ele=e=>t=>{throw t},kle=(e,t)=>{},Cle=e=>(t,r)=>async n=>{if(!Xi.isInstance(n.request))return t(n);const o=Md(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:s,signer:l}=o,u=await t({...n,request:await l.sign(n.request,s,a)}).catch((l.errorHandler||Ele)(a));return(l.successHandler||kle)(u.response,a),u},Rle={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Ale=e=>({applyToStack:t=>{t.addRelativeTo(Cle(),Rle)}}),jf=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},AL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a$=Object.entries(AL).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),Tle=AL.split(""),Vc=6,qf=8,$le=63,xv=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let i=0;i<e.length;i+=4){let o=0,a=0;for(let u=i,d=i+3;u<=d;u++)if(e[u]!=="="){if(!(e[u]in a$))throw new TypeError(`Invalid character ${e[u]} in base64 string.`);o|=a$[e[u]]<<(d-u)*Vc,a+=Vc}else o>>=Vc;const s=i/4*3;o>>=a%qf;const l=Math.floor(a/qf);for(let u=0;u<l;u++){const d=(l-u-1)*qf;n.setUint8(s+u,(o&255<<d)>>d)}}return new Uint8Array(r)},cd=e=>new TextEncoder().encode(e),Fh=e=>typeof e=="string"?cd(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Gw=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function sg(e){let t;typeof e=="string"?t=cd(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let o=0;o<t.length;o+=3){let a=0,s=0;for(let u=o,d=Math.min(o+3,t.length);u<d;u++)a|=t[u]<<(d-u-1)*qf,s+=qf;const l=Math.ceil(s/Vc);a<<=l*Vc-s;for(let u=1;u<=l;u++){const d=(l-u)*Vc;i+=Tle[(a&$le<<d)>>d]}i+="==".slice(0,4-l)}return i}class ou extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?ou.mutate(xv(t)):ou.mutate(cd(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,ou.prototype),t}transformToString(t="utf-8"){return t==="base64"?sg(this):Gw(this)}}const au=e=>encodeURIComponent(e).replace(/[!'()*]/g,Nle),Nle=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Dle(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=au(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${au(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${au(n)}`),t.push(i)}}return t.join("&")}function s$(e,t){return new Request(e,t)}function Fle(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}const hb={supported:void 0};class Kw{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Kw(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),hb.supported===void 0&&(hb.supported=typeof Request<"u"&&"keepalive"in s$("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(r?.aborted){const x=l$(r);return Promise.reject(x)}let s=t.path;const l=Dle(t.query||{});l&&(s+=`?${l}`),t.fragment&&(s+=`#${t.fragment}`);let u="";if(t.username!=null||t.password!=null){const x=t.username??"",S=t.password??"";u=`${x}:${S}@`}const{port:d,method:f}=t,h=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${s}`,p=f==="GET"||f==="HEAD"?void 0:t.body,m={body:p,headers:new Headers(t.headers),method:f,credentials:a};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),typeof AbortController<"u"&&(m.signal=r),hb.supported&&(m.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(m,this.config.requestInit(t));let g=()=>{};const v=s$(h,m),_=[fetch(v).then(x=>{const S=x.headers,E={};for(const R of S.entries())E[R[0]]=R[1];return x.body!=null?{response:new ud({headers:E,reason:x.statusText,statusCode:x.status,body:x.body})}:x.blob().then(R=>({response:new ud({headers:E,reason:x.statusText,statusCode:x.status,body:R})}))}),Fle(i)];return r&&_.push(new Promise((x,S)=>{const E=()=>{const k=l$(r);S(k)};if(typeof r.addEventListener=="function"){const k=r;k.addEventListener("abort",E,{once:!0}),g=()=>k.removeEventListener("abort",E)}else r.onabort=E})),Promise.race(_).finally(g)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function l$(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=t,i}const n=new Error(String(t));return n.name="AbortError",n}const r=new Error("Request aborted");return r.name="AbortError",r}const Ile=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):Ple(e):Ole(e);async function Ple(e){const t=await Mle(e),r=xv(t);return new Uint8Array(r)}async function Ole(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:s,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=s}const o=new Uint8Array(i);let a=0;for(const s of t)o.set(s,a),a+=s.length;return o}function Mle(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const TL={},mx={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),TL[e]=t,mx[t]=e}function Lle(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in mx)t[r/2]=mx[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function su(e){let t="";for(let r=0;r<e.byteLength;r++)t+=TL[e[r]];return t}const gx=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return ou.mutate(e);if(!e)return ou.mutate(new Uint8Array);const r=t.streamCollector(e);return ou.mutate(await r)},a0=e=>typeof e=="function"?e():e,$L=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),zle=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=Md(r),[,a,s,l,u,d]=o??[];try{const f=await e.protocol.deserializeResponse($L(a,s,l,u,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
52
+ `+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof f.$responseBodyText<"u"&&f.$response&&(f.$response.body=f.$responseBodyText);try{if(ud.isInstance(i)){const{headers:p={}}=i,m=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:pb(/^x-[\w-]+-request-?id$/,m),extendedRequestId:pb(/^x-[\w-]+-id-2$/,m),cfId:pb(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw f}},pb=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function Ule(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in t?Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i}return t}const dd=e=>{if(typeof e=="string")return dd(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let a;return o&&(a=Ule(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:a}},Ble=e=>{if(typeof e=="object"){if("url"in e){const t=dd(e.url);if(e.headers){t.headers={};for(const r in e.headers)t.headers[r.toLowerCase()]=e.headers[r].join(", ")}return t}return e}return dd(e)},jle=e=>(t,r)=>async n=>{const{operationSchema:i}=Md(r),[,o,a,s,l,u]=i??[],d=r.endpointV2?async()=>Ble(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest($L(o,a,s,l,u),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},qle={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Vle={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Gle(e){return{applyToStack:t=>{t.add(jle(e),Vle),t.add(zle(e),qle),e.protocol.setSerdeContext(e)}}}const mb=[];function Rf(e){if(typeof e=="object")return e;if(e=e|0,mb[e])return mb[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return mb[e]=t}const sf={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},gb=[],vb={};class Sn{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=Sn.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const n=[];let i=t,o=t;for(this._isMemberSchema=!1;_b(i);)n.push(i[1]),i=i[0],o=a0(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){const s=n[a];Object.assign(this.memberTraits,Rf(s))}}else this.memberTraits=0;if(o instanceof Sn){const a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=a0(o),Kle(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){const r=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(gb[t])return gb[t]}else if(typeof t=="string"){if(vb[t])return vb[t]}else if(r&&t[sf.ns])return t[sf.ns];const n=a0(t);if(n instanceof Sn)return n;if(_b(n)){const[o,a]=n;if(o instanceof Sn)return Object.assign(o.getMergedTraits(),Rf(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new Sn(n);return r?t[sf.ns]=i:typeof n=="string"?vb[n]=i:typeof n=="number"?gb[n]=i:i}getSchema(){const t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){const{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const t=this.getSchema();if(typeof t!="object")return!1;const r=t[0];return r===3||r===-3||r===4}isUnionSchema(){const t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Rf(this.memberTraits)}getOwnTraits(){return Rf(this.traits)}getKeySchema(){const[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema(),i=t?15:n[4]??0;return lf([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],o=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||i)?t[3+t[0]]:r?15:void 0;if(o!=null)return lf([o,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){const n=r[4].indexOf(t),i=r[5][n];return lf(_b(i)?i:[i,0],t)}if(this.isDocumentSchema())return lf([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[r,n]of this.structIterator())t[r]=n}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),r=t[4].length;let n=t[sf.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],a=lf([t[5][i],0],o);yield n[i]=[o,a]}t[sf.it]=n}}function lf(e,t){if(e instanceof Sn)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=Sn;return new r(e,t)}const _b=e=>Array.isArray(e)&&e.length===2,Kle=e=>Array.isArray(e)&&e.length>=5;class Mi{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,n=new Map){this.namespace=t,this.schemas=r,this.exceptions=n}static for(t){return Mi.registries.has(t)||Mi.registries.set(t,new Mi(t)),Mi.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:n}=this;for(const[i,o]of t.schemas)r.has(i)||r.set(i,o);for(const[i,o]of t.exceptions)n.has(i)||n.set(i,o)}register(t,r){const n=this.normalizeShapeId(t);for(const i of[this,Mi.for(n.split("#")[0])])i.schemas.set(n,r)}getSchema(t){const r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){const n=t,i=n[1];for(const o of[this,Mi.for(i)])o.schemas.set(i+"#"+n[2],n),o.exceptions.set(n,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):Mi.for(r[1]).exceptions.get(r)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,r,n]=t,i=r+"#"+n;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){for(const r of this.schemas.values())if(t(r))return r}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const vx=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&tue.warn(eue(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Hle=Math.ceil(2**127*(2-2**-23)),u$=e=>{const t=vx(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Hle)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Wle=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},c$=e=>NL(e,16),d$=e=>NL(e,8),NL=(e,t)=>{const r=Wle(e);if(r!==void 0&&Jle(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Jle=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Qle=e=>vx(typeof e=="string"?Sv(e):e),Yle=e=>u$(typeof e=="string"?Sv(e):e),Xle=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Sv=e=>{const t=e.match(Xle);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},lg=e=>c$(typeof e=="string"?Sv(e):e),Zle=e=>d$(typeof e=="string"?Sv(e):e),eue=e=>String(new TypeError(e).stack||e).split(`
53
+ `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
54
+ `),tue={warn:console.warn},rue=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Hw=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nue(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,f=s<10?`0${s}`:`${s}`;return`${rue[n]}, ${l} ${Hw[r]} ${t} ${u}:${d}:${f} GMT`}const iue=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),oue=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=iue.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,a,s,l,u,d]=t,f=lg(Ih(n)),h=cl(i,"month",1,12),p=cl(o,"day",1,31),m=s0(f,h,p,{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&m.setTime(m.getTime()-vue(d)),m},aue=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),sue=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),lue=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),DL=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=aue.exec(e);if(t){const[r,n,i,o,a,s,l,u]=t;return s0(lg(Ih(o)),bb(i),cl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u})}if(t=sue.exec(e),t){const[r,n,i,o,a,s,l,u]=t;return fue(s0(cue(o),bb(i),cl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u}))}if(t=lue.exec(e),t){const[r,n,i,o,a,s,l,u]=t;return s0(lg(Ih(u)),bb(n),cl(i.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},uue=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=Qle(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},s0=(e,t,r,n)=>{const i=t-1;return pue(e,i,r),new Date(Date.UTC(e,i,r,cl(n.hours,"hour",0,23),cl(n.minutes,"minute",0,59),cl(n.seconds,"seconds",0,60),gue(n.fractionalMilliseconds)))},cue=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+lg(Ih(e));return r<t?r+100:r},due=50*365*24*60*60*1e3,fue=e=>e.getTime()-new Date().getTime()>due?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,bb=e=>{const t=Hw.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},hue=[31,28,31,30,31,30,31,31,30,31,30,31],pue=(e,t,r)=>{let n=hue[t];if(t===1&&mue(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${Hw[t]} in ${e}: ${r}`)},mue=e=>e%4===0&&(e%100!==0||e%400===0),cl=(e,t,r,n)=>{const i=Zle(Ih(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},gue=e=>e==null?0:Yle("0."+e)*1e3,vue=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(n*60+i)*60*1e3},Ih=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},f$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Hn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),FL=()=>{if(f$)return f$();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Hn[e[0]]+Hn[e[1]]+Hn[e[2]]+Hn[e[3]]+"-"+Hn[e[4]]+Hn[e[5]]+"-"+Hn[e[6]]+Hn[e[7]]+"-"+Hn[e[8]]+Hn[e[9]]+"-"+Hn[e[10]]+Hn[e[11]]+Hn[e[12]]+Hn[e[13]]+Hn[e[14]]+Hn[e[15]]},rl=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};rl.from=e=>e&&typeof e=="object"&&(e instanceof rl||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?rl(String(e)):rl(JSON.stringify(e));rl.fromObject=rl.from;const h$=/^-?\d*(\.\d+)?$/;class wa{string;type;constructor(t,r){if(this.string=t,this.type=r,!h$.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return wa.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&h$.test(r.string)}}class _ue{serdeContext;setSerdeContext(t){this.serdeContext=t}}class bue extends _ue{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=Mi.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Xi}getResponseType(){return ud}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[n,i]of r.url.searchParams.entries())t.query[n]=i;if(r.headers)for(const n in r.headers)t.headers[n]=r.headers[n].join(", ");return t}else{if(t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},r.headers)for(const n in r.headers)t.headers[n]=r.headers[n];return t}}setHostPrefix(t,r,n){if(this.serdeContext?.disableHostPrefix)return;const i=Sn.of(r.input),o=Rf(r.traits??{});if(o.endpoint){let a=o.endpoint?.[0];if(typeof a=="string"){for(const[s,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const u=n[s];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${s} in input must be a string as hostLabel.`);a=a.replace(`{${s}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Gm(async()=>{const{EventStreamSerde:r}=await import("./index-DYTDlj-s.js");return{EventStreamSerde:r}},__vite__mapDeps([3]));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,n,i,o){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class yue extends bue{async serializeRequest(t,r,n){const i=this.serializer,o={},a={},s=await n.endpoint(),l=Sn.of(t?.input),u=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new Xi({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:a,body:void 0});if(s&&(this.updateServiceEndpoint(h,s),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const m={};for(const[g,v]of l.structIterator())g!==p&&f[g]&&(i.write(v,f[g]),m[g]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:m})}}else i.write(u,f),d=i.flush()}return h.headers=Object.assign(h.headers,a),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=Sn.of(t.output),a={};if(n.statusCode>=300){const l=await gx(n.body,r);throw l.byteLength>0&&Object.assign(a,await i.read(15,l)),await this.handleError(t,r,n,a,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const u=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=u}const s=o.getEventStreamMember();if(s)a[s]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:a});else{const l=await gx(n.body,r);l.byteLength>0&&Object.assign(a,await i.read(o,l))}return a.$metadata=this.deserializeMetadata(n),a}}function IL(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:i,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||i?6:o||r?5:void 0:void 0)??t.timestampFormat.default}function xue(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class Sue{authSchemes=new Map;constructor(t){for(const r in t){const n=t[r];n!==void 0&&this.authSchemes.set(r,n)}}getIdentityProvider(t){return this.authSchemes.get(t)}}class wue{async sign(t,r,n){return t}}const Eue=e=>function(r){return PL(r)&&r.expiration.getTime()-Date.now()<e},kue=3e5,Cue=Eue(kue),PL=e=>e.expiration!==void 0,Rue=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,a,s=!1;const l=async u=>{o||(o=n(u));try{i=await o,a=!0,s=!1}finally{o=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await l(u)),s?i:r(i)?(t(i)&&await l(u),i):(s=!0,i))},Aue=void 0;function Tue(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function $ue(e){const t=jf(e.userAgentAppId??Aue),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!Tue(n)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?i?.warn("userAgentAppId must be a string or undefined."):n.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class Ww{nodes;root;conditions;results;constructor(t,r,n,i){this.nodes=t,this.root=r,this.conditions=n,this.results=i}static from(t,r,n,i){return new Ww(t,r,n,i)}}class Nue{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let o=0;for(;;){const{value:a,done:s}=i.next();if(this.data.delete(a),s||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const o=String(t[i]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}class Jo extends Error{constructor(t){super(t),this.name="EndpointError"}}const Due="endpoints";function ug(e){return typeof e!="object"||e==null?e:"ref"in e?`$${ug(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(ug).join(", ")})`:JSON.stringify(e,null,2)}const Jw={},Fue=(e,t)=>e===t;function Iue(...e){for(const t of e)if(t!=null)return t}const Pue=e=>{const t=e.split("."),r=[];for(const n of t){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new Jo(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new Jo(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},OL=(e,t)=>Pue(t).reduce((r,n)=>{if(typeof r!="object")throw new Jo(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(r)){const i=parseInt(n);return r[i<0?r.length+i:i]}return r[n]},e),Oue=e=>e!=null,Mue=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),wv=(e,t=!1)=>{if(!t)return Mue.test(e);const r=e.split(".");for(const n of r)if(!wv(n))return!1;return!0};function Lue(e,t,r){return e?t:r}const zue=e=>!e,Uue=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),ML=e=>Uue.test(e)||e.startsWith("[")&&e.endsWith("]"),yb={[Nh.HTTP]:80,[Nh.HTTPS]:443},Bue=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:m="",path:g="",query:v={}}=e,_=new URL(`${m}//${h}${p?`:${p}`:""}${g}`);return _.search=Object.entries(v).map(([x,S])=>`${x}=${S}`).join("&"),_}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:s}=t;if(s)return null;const l=a.slice(0,-1);if(!Object.values(Nh).includes(l))return null;const u=ML(i),d=r.includes(`${n}:${yb[l]}`)||typeof e=="string"&&e.includes(`${n}:${yb[l]}`),f=`${n}${d?`:${yb[l]}`:""}`;return{scheme:l,authority:f,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}};function jue(e,t,r){if(r===1)return[e];if(e==="")return[""];const n=e.split(t);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(t))}const que=(e,t)=>e===t,Vue=(e,t,r,n)=>e==null||t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),Gue=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Kue={booleanEquals:Fue,coalesce:Iue,getAttr:OL,isSet:Oue,isValidHostLabel:wv,ite:Lue,not:zue,parseURL:Bue,split:jue,stringEquals:que,substring:Vue,uriEncode:Gue},LL=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const a=e.indexOf("{",o);if(a===-1){r.push(e.slice(o));break}r.push(e.slice(o,a));const s=e.indexOf("}",a);if(s===-1){r.push(e.slice(a));break}e[a+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(a+1,s)),o=s+2);const l=e.substring(a+1,s);if(l.includes("#")){const[u,d]=l.split("#");r.push(OL(n[u]??i[u],d))}else r.push(n[l]??i[l]);o=s+1}return r.join("")},Hue=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],Ev=(e,t,r)=>{if(typeof e=="string")return LL(e,r);if(e.fn)return UL.callFunction(e,r);if(e.ref)return Hue(e,r);throw new Jo(`'${t}': ${String(e)} is not a string, function or reference.`)},zL=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let a=0;a<n.length;++a){const s=t[a];typeof s=="boolean"||typeof s=="number"?n[a]=s:n[a]=UL.evaluateExpression(s,"arg",r)}const i=e.indexOf(".");if(i!==-1){const s=Jw[e.slice(0,i)]?.[e.slice(i+1)];if(typeof s=="function")return s(...n)}const o=Kue[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},UL={evaluateExpression:Ev,callFunction:zL},Wue=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new Jo(`'${r}' is already defined in Reference Record.`);const n=zL(e,t);t.logger?.debug?.(`${Due} evaluateCondition: ${ug(e)} = ${ug(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},Jue=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const a=Ev(o,"Header value entry",t);if(typeof a!="string")throw new Jo(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),BL=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=qL.getEndpointProperty(i,t),r),{}),jL=(e,t)=>{if(Array.isArray(e))return e.map(r=>jL(r,t));switch(typeof e){case"string":return LL(e,t);case"object":if(e===null)throw new Jo(`Unexpected endpoint property: ${e}`);return qL.getEndpointProperties(e,t);case"boolean":return e;default:throw new Jo(`Unexpected endpoint property type: ${typeof e}`)}},qL={getEndpointProperty:jL,getEndpointProperties:BL},Que=(e,t)=>{const r=Ev(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new Jo(`Endpoint URL must be a string, got ${typeof r}`)},xb=1e8,Yue=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let a=n;const s={},l={referenceRecord:s,endpointParams:t.endpointParams,logger:t.logger};for(;a!==1&&a!==-1&&a<xb;){const u=3*(Math.abs(a)-1),[d,f,h]=[r[u],r[u+1],r[u+2]],[p,m,g]=o[d],v=Wue({fn:p,assign:g,argv:m},l);if(v.toAssign){const{name:_,value:x}=v.toAssign;s[_]=x}a=a>=0===v.result?f:h}if(a>=xb){const u=i[a-xb];if(u[0]===-1){const[,p]=u;throw new Jo(Ev(p,"Error",l))}const[d,f,h]=u;return{url:Que(d,l),properties:BL(f,l),headers:Jue(h??{},l)}}throw new Jo("No matching endpoint.")},VL=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!VL(r))return!1;return!0}return!(!wv(e)||e.length<3||e.length>63||e!==e.toLowerCase()||ML(e))},p$=":",Xue="/",Zue=e=>{const t=e.split(p$);if(t.length<6)return null;const[r,n,i,o,a,...s]=t;if(r!=="arn"||n===""||i===""||s.join(p$)==="")return null;const l=s.map(u=>u.split(Xue)).flat();return{partition:n,service:i,region:o,accountId:a,resourceId:l}},ece=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],tce={partitions:ece};let rce=tce;const nce=e=>{const{partitions:t}=rce;for(const n of t){const{regions:i,outputs:o}=n;for(const[a,s]of Object.entries(i))if(a===e)return{...o,...s}}for(const n of t){const{regionRegex:i,outputs:o}=n;if(new RegExp(i).test(e))return{...o}}const r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},GL={isVirtualHostableS3Bucket:VL,parseArn:Zue,partition:nce};Jw.aws=GL;function ice(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function Ga(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}var yl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(yl||(yl={}));const Vf=3,oce=yl.STANDARD,ace=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],sce=["TimeoutError","RequestTimeout","RequestTimeoutException"],lce=[500,502,503,504],uce=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],cce=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],dce=e=>e?.$retryable!==void 0,fce=e=>e.$metadata?.clockSkewCorrected,hce=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},KL=e=>e.$metadata?.httpStatusCode===429||ace.includes(e.name)||e.$retryable?.throttling==!0,Qw=(e,t=0)=>dce(e)||fce(e)||sce.includes(e.name)||uce.includes(e?.code||"")||cce.includes(e?.code||"")||lce.includes(e.$metadata?.httpStatusCode||0)||hce(e)||mce(e)||e.cause!==void 0&&t<=10&&Qw(e.cause,t+1),pce=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Qw(e)}return!1};function mce(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class Yw{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(t){let r;this.updateMeasuredRate();const n=t;if(n?.errorType==="THROTTLING"||KL(n?.error??t)){const a=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=a,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(a),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){const r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>Yw.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=t}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const HL=20*1e3,m$=500,gce=1,vce="amz-sdk-invocation-id",_ce="amz-sdk-request";var bce={};class oi{static v2026=typeof process<"u"&&bce?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return oi.v2026?50:100}static throttlingDelay(){return oi.v2026?1e3:500}static cost(){return oi.v2026?14:5}static throttlingCost(){return oi.v2026?5:10}static modifiedCostType(){return oi.v2026?"THROTTLING":"TRANSIENT"}}class yce{x=oi.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,HL);return Math.floor(i)}setDelayBase(t){this.x=t}}class g${delay;count;cost;longPoll;constructor(t,r,n,i){this.delay=t,this.count=r,this.cost=n,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(HL,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class _x{mode=yl.STANDARD;capacity=m$;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(t){typeof t=="number"?this.maxAttemptsProvider=async()=>t:typeof t=="function"?this.maxAttemptsProvider=t:t&&typeof t=="object"&&(this.maxAttemptsProvider=async()=>t.maxAttempts,this.baseDelay=t.baseDelay,this.retryBackoffStrategy=t.backoff),this.maxAttemptsProvider??=async()=>Vf,this.baseDelay??=oi.delay(),this.retryBackoffStrategy??=new yce}async acquireInitialRetryToken(t){return new g$(oi.delay(),0,void 0,oi.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,r){const n=await this.getMaxAttempts(),i=this.shouldRetry(t,r,n);if(i||t.isLongPoll?.()){const o=r.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?oi.throttlingDelay():this.baseDelay);const a=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let s=a;if(r.retryAfterHint instanceof Date&&(s=Math.max(a,Math.min(r.retryAfterHint.getTime()-Date.now(),a+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new g$(s,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:oi.v2026?s:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(m$,this.capacity+(t.getRetryCost()??gce))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Vf}`),Vf}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===oi.modifiedCostType()?oi.throttlingCost():oi.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class xce{mode=yl.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new Yw,this.standardRetryStrategy=r?new _x({maxAttempts:typeof t=="number"?t:3,...r}):new _x(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}const Sce=/\d{12}\.ddb/;async function wce(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Ga(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();if(typeof o.mode=="string")switch(o.mode){case yl.ADAPTIVE:Ga(e,"RETRY_MODE_ADAPTIVE","F");break;case yl.STANDARD:Ga(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Sce)&&Ga(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Ga(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Ga(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Ga(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&Ga(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,s]of Object.entries(o.$source??{}))Ga(e,a,s)}}const v$="user-agent",Sb="x-amz-user-agent",_$=" ",wb="/",Ece=/[^!$%&'*+\-.^_`|~\w]/g,kce=/[^!$%&'*+\-.^_`|~\w#]/g,b$="-",Cce=1024;function Rce(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Cce){t.length?t+=","+n:t+=n;continue}break}return t}const Ace=e=>(t,r)=>async n=>{const{request:i}=n;if(!Xi.isInstance(i))return t(n);const{headers:o}=i,a=r?.userAgent?.map(lm)||[],s=(await e.defaultUserAgentProvider()).map(lm);await wce(r,e,n);const l=r;s.push(`m/${Rce(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(lm)||[],d=await e.userAgentAppId();d&&s.push(lm(["app",`${d}`]));const f=[].concat([...s,...a,...u]).join(_$),h=[...s.filter(p=>p.startsWith("aws-sdk-")),...u].join(_$);return e.runtime!=="browser"?(h&&(o[Sb]=o[Sb]?`${o[v$]} ${h}`:h),o[v$]=f):o[Sb]=f,t({...n,request:i})},lm=e=>{const t=e[0].split(wb).map(a=>a.replace(Ece,b$)).join(wb),r=e[1]?.replace(kce,b$),n=t.indexOf(wb),i=t.substring(0,n);let o=t.substring(n+1);return i==="api"&&(o=o.toLowerCase()),[i,o,r].filter(a=>a&&a.length>0).reduce((a,s,l)=>{switch(l){case 0:return s;case 1:return`${a}/${s}`;default:return`${a}#${s}`}},"")},Tce={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},$ce=e=>({applyToStack:t=>{t.add(Ace(e),Tce)}}),Nce=!1,Dce=!1,y$=new Set,Fce=(e,t=wv)=>{if(!y$.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else y$.add(e)},WL=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Ice=e=>WL(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Pce=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const n=typeof t=="function"?await t():t,i=Ice(n);return Fce(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return WL(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},x$="content-length";function Oce(e){return t=>async r=>{const n=r.request;if(Xi.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(a=>a.toLowerCase()).indexOf(x$)===-1)try{const a=e(i);n.headers={...n.headers,[x$]:String(a)}}catch{}}return t({...r,request:n})}}const Mce={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Lce=e=>({applyToStack:t=>{t.add(Oce(e.bodyLengthChecker),Mce)}}),zce=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Vce(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!qce(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},Uce=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Bce=/(\d+\.){3}\d+/,jce=/\.\./,qce=e=>Uce.test(e)&&!Bce.test(e)&&!jce.test(e),Vce=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,a=!!(o&&r&&n&&i);if(o&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},Gce=(e,t,r,n=!1)=>{const i=async()=>{let o;return n?o=r.clientContextParams?.[e]??r[e]??r[t]:o=r[e]??r[t],typeof o=="function"?o():o};return e==="credentialScope"||t==="CredentialScope"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const o=await i();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){const{protocol:a,hostname:s,port:l,path:u}=o;return`${a}//${s}${l?":"+l:""}${u}`}}return o}:i},JL=async e=>{},QL=e=>{if(typeof e=="object"){if("url"in e){const t=dd(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return dd(e)},Kce=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await JL(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(QL(a)),r.isCustomEndpoint=!0)}const i=await Hce(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const a=await r.endpoint();if(a?.headers){o.headers??={};for(const[s,l]of Object.entries(a.headers))o.headers[s]=Array.isArray(l)?l:[l]}}return o},Hce=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=e[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await Gce(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await zce(n),n},Wce=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&xue(n,"ENDPOINT_OVERRIDE","N");const o=await Kce(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const a=n.authSchemes?.[0];if(a){n.signing_region=a.signingRegion,n.signing_service=a.signingName;const l=Md(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},Jce={name:"serializerMiddleware"},Qce={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Jce.name},Yce=(e,t)=>({applyToStack:r=>{r.addRelativeTo(Wce({config:e,instructions:t}),Qce)}}),Xce=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>QL(await ls(r)()):void 0,s=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ls(n??!1),useFipsEndpoint:ls(i??!1)});let l;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=JL(e.serviceId)),l),s},Zce=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),ede=e=>{const{retryStrategy:t,retryMode:r}=e,n=ls(e.maxAttempts??Vf);let i=t?Promise.resolve(t):void 0;const o=async()=>await ls(r)()===yl.ADAPTIVE?new xce(n):new _x(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},Ml=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},Ls=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,cg=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>S$[p.step]-S$[h.step]||w$[p.priority||"normal"]-w$[h.priority||"normal"]),o=f=>{let h=!1;const p=m=>{const g=Ml(m.name,m.aliases);if(g.includes(f)){h=!0;for(const v of g)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=f=>{let h=!1;const p=m=>{if(m.middleware===f){h=!0;for(const g of Ml(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>(e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),l=f=>{const h=[];return f.before.forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h.push(f),f.after.reverse().forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h},u=(f=!1)=>{const h=[],p=[],m={};return e.forEach(v=>{const _={...v,before:[],after:[]};for(const x of Ml(_.name,_.aliases))m[x]=_;h.push(_)}),t.forEach(v=>{const _={...v,before:[],after:[]};for(const x of Ml(_.name,_.aliases))m[x]=_;p.push(_)}),p.forEach(v=>{if(v.toMiddleware){const _=m[v.toMiddleware];if(_===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${Ls(v.name,v.aliases)} middleware ${v.relation} ${v.toMiddleware}`)}v.relation==="after"&&_.after.push(v),v.relation==="before"&&_.before.push(v)}}),i(h).map(l).reduce((v,_)=>(v.push(..._),v),[])},d={add:(f,h={})=>{const{name:p,override:m,aliases:g}=h,v={step:"initialize",priority:"normal",middleware:f,...h},_=Ml(p,g);if(_.length>0){if(_.some(x=>n.has(x))){if(!m)throw new Error(`Duplicate middleware name '${Ls(p,g)}'`);for(const x of _){const S=e.findIndex(k=>k.name===x||k.aliases?.some(R=>R===x));if(S===-1)continue;const E=e[S];if(E.step!==v.step||v.priority!==E.priority)throw new Error(`"${Ls(E.name,E.aliases)}" middleware with ${E.priority} priority in ${E.step} step cannot be overridden by "${Ls(p,g)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(S,1)}}for(const x of _)n.add(x)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:m,aliases:g}=h,v={middleware:f,...h},_=Ml(p,g);if(_.length>0){if(_.some(x=>n.has(x))){if(!m)throw new Error(`Duplicate middleware name '${Ls(p,g)}'`);for(const x of _){const S=t.findIndex(k=>k.name===x||k.aliases?.some(R=>R===x));if(S===-1)continue;const E=t[S];if(E.toMiddleware!==v.toMiddleware||E.relation!==v.relation)throw new Error(`"${Ls(E.name,E.aliases)}" middleware ${E.relation} "${E.toMiddleware}" middleware cannot be overridden by "${Ls(p,g)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(S,1)}}for(const x of _)n.add(x)}t.push(v)},clone:()=>s(cg()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):a(f),removeByTag:f=>{let h=!1;const p=m=>{const{tags:g,name:v,aliases:_}=m;if(g&&g.includes(f)){const x=Ml(v,_);for(const S of x)n.delete(S);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=s(cg());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:s,identify:()=>u(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return Ls(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of u().map(m=>m.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},S$={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},w$={high:3,normal:2,low:1};class tde{config;middlewareStack=cg();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){const i=typeof r!="function"?r:void 0,o=typeof r=="function"?r:n,a=i===void 0&&this.config.cacheMiddleware===!0;let s;if(a){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?s=l.get(t.constructor):(s=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,s))}else delete this.handlers,s=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)s(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return s(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Eb="***SensitiveInformation***";function bx(e,t){if(t==null)return t;const r=Sn.of(e);if(r.getMergedTraits().sensitive)return Eb;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return Eb}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return Eb}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[o,a]of r.structIterator())n[o]!=null&&(i[o]=bx(a,n[o]));return i}return t}class YL{middlewareStack=cg();schema;static classBuilder(){return new rde}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:d,CommandCtor:f}){for(const _ of i.bind(this)(f,t,r,n))this.middlewareStack.use(_);const h=t.concat(this.middlewareStack),{logger:p}=r,m={logger:p,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[px]:{commandInstance:this,...u},...d},{requestHandler:g}=r;let v=n??{};return u.eventStream&&(v={isEventStream:!0,...v}),h.resolve(_=>g.handle(_.request,v),m)}}class rde{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let r;return r=class extends YL{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,o){const a=t._operationSchema,s=a?.[4]??a?.input,l=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?bx.bind(null,s):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?bx.bind(null,l):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Rc extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const r=t;return Rc.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const r=t;return this===Rc?Rc.isInstance(t):Rc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const E$=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(e[n]==null||e[n]==="")&&(e[n]=i)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},nde=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},XL=Object.values(Dh),ide=e=>{const t=[];for(const r in Dh){const n=Dh[r];e[n]!==void 0&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}for(const[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>n});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};const n=r.algorithmId(),i=r.checksumConstructor();XL.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},ode=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();XL.includes(n)&&(t[n]=r.checksumConstructor())}),t},ade=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),sde=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},lde=e=>Object.assign(ide(e),ade(e)),ude=e=>Object.assign(ode(e),sde(e));class ZL{trace(){}debug(){}info(){}warn(){}error(){}}const cde=e=>e?.body instanceof ReadableStream;function dde(e,t){if(ud.isInstance(e))for(const r of Object.keys(e.headers)){const n=r.toLowerCase();if(n==="retry-after"){const i=e.headers[r];let o=NaN;if(i.endsWith("GMT"))try{o=(DL(i).getTime()-Date.now())/1e3}catch(a){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(a)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?o=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?o=Number(i):Date.parse(i)>=Date.now()&&(o=(Date.parse(i)-Date.now())/1e3);return isNaN(o)?void 0:new Date(Date.now()+o*1e3)}else if(n==="x-amz-retry-after"){const i=e.headers[r],o=Number(i);if(isNaN(o)){t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+o)}}}const fde=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(hde(i)){i=i;let a=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),s=new Error,l=0,u=0;const{request:d}=n,f=Xi.isInstance(d);for(f&&(d.headers[vce]=FL());;)try{f&&(d.headers[_ce]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=pde(h,e.logger);if(s=Zce(h),f&&cde(d))throw(r.logger instanceof ZL?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{a=await i.refreshRetryTokenForRetry(a,p)}catch(g){throw typeof g.$backoff=="number"&&await k$(g.$backoff),s.$metadata||(s.$metadata={}),s.$metadata.attempts=l+1,s.$metadata.totalRetryDelay=u,s}l=a.getRetryCount();const m=a.getRetryDelay();u+=m,await k$(m)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},k$=e=>new Promise(t=>setTimeout(t,e)),hde=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",pde=(e,t)=>{const r={error:e,errorType:mde(e)},n=dde(e.$response,t);return n&&(r.retryAfterHint=n),r},mde=e=>KL(e)?"THROTTLING":Qw(e)?"TRANSIENT":pce(e)?"SERVER_ERROR":"CLIENT_ERROR",gde={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},vde=e=>({applyToStack:t=>{t.add(fde(e),gde)}}),C$=e=>ud.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,e8=e=>new Date(Date.now()+e),_de=(e,t)=>Math.abs(e8(t).getTime()-e)>=3e5,R$=(e,t)=>{const r=Date.parse(e);return _de(r,t)?r-Date.now():t},Gf=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},bde=async e=>{const t=Gf("context",e.context),r=Gf("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await Gf("signer",r.signer)(n),a=e?.signingRegion,s=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:a,signingRegionSet:s,signingName:l}};class yde{async sign(t,r,n){if(!Xi.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await bde(n),{config:o,signer:a}=i;let{signingRegion:s,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[f,h]=u.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(s=h?.signingRegion??s,l=h?.signingName??l)}return await a.sign(t,{signingDate:e8(o.systemClockOffset),signingRegion:s,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??C$(r.$response);if(n){const i=Gf("config",t.config),o=i.systemClockOffset;i.systemClockOffset=R$(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=C$(t);if(n){const i=Gf("config",r.config);i.systemClockOffset=R$(n,i.systemClockOffset)}}}const xde=(e,t,r)=>{let n,i,o,a=!1;const s=async()=>{i||(i=e());try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await s()),n)},Sde="X-Amz-Algorithm",wde="X-Amz-Credential",t8="X-Amz-Date",Ede="X-Amz-SignedHeaders",kde="X-Amz-Expires",r8="X-Amz-Signature",n8="X-Amz-Security-Token",i8="authorization",o8=t8.toLowerCase(),Cde="date",Rde=[i8,o8,Cde],Ade=r8.toLowerCase(),yx="x-amz-content-sha256",Tde=n8.toLowerCase(),$de={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Nde=/^proxy-/,Dde=/^sec-/,kb="AWS4-HMAC-SHA256",Fde="AWS4-HMAC-SHA256-PAYLOAD",Ide="UNSIGNED-PAYLOAD",Pde=50,a8="aws4_request",Ode=3600*24*7,um={},Cb=[],Rb=(e,t,r)=>`${e}/${t}/${r}/${a8}`,Mde=async(e,t,r,n,i)=>{const o=await A$(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${su(o)}:${t.sessionToken}`;if(a in um)return um[a];for(Cb.push(a);Cb.length>Pde;)delete um[Cb.shift()];let s=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,a8])s=await A$(e,s,l);return um[a]=s},A$=(e,t,r)=>{const n=new e(t);return n.update(Fh(r)),n.digest()},T$=({headers:e},t,r)=>{const n={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const o=i.toLowerCase();(o in $de||t?.has(o)||Nde.test(o)||Dde.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},Lde=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",Ab=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===yx)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Lde(t)){const n=new r;return n.update(Fh(t)),su(await n.digest())}return Ide};class zde{format(t){const r=[];for(const o of Object.keys(t)){const a=cd(o);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,a)=>o+a.byteLength,0));let i=0;for(const o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(t.value,3),a;case"string":const s=cd(t.value),l=new DataView(new ArrayBuffer(3+s.byteLength));l.setUint8(0,7),l.setUint16(1,s.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(s,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Xw.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Ude.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Lle(t.value.replace(/\-/g,"")),1),f}}}var $$;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})($$||($$={}));const Ude=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Xw{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&N$(r),new Xw(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&N$(t),parseInt(su(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function N$(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Bde=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},jde=(e,t={})=>{const{headers:r,query:n={}}=Xi.clone(e);for(const i of Object.keys(r)){const o=i.toLowerCase();(o.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(o)||t.hoistableHeaders?.has(o))&&(n[i]=r[i],delete r[i])}return{...e,headers:r,query:n}},D$=e=>{e=Xi.clone(e);for(const t of Object.keys(e.headers))Rde.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},qde=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===Ade)continue;const i=au(n);t.push(i);const o=e[n];typeof o=="string"?r[i]=`${i}=${au(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((a,s)=>a.concat([`${i}=${au(s)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},Vde=e=>Gde(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Gde=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Kde{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ls(n),this.credentialProvider=ls(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
55
+ ${this.getCanonicalPath(t)}
56
+ ${qde(t)}
57
+ ${i.map(o=>`${o}:${r[o]}`).join(`
58
+ `)}
59
+
60
+ ${i.join(";")}
61
+ ${n}`}async createStringToSign(t,r,n,i){const o=new this.sha256;o.update(Fh(n));const a=await o.digest();return`${i}
62
+ ${t}
63
+ ${r}
64
+ ${su(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const o of t.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));const n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return au(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const r=Vde(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class F$ extends Kde{headerFormatter=new zde;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:s,hoistableHeaders:l,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=u??await this.regionProvider(),{longDate:p,shortDate:m}=this.formatDate(n);if(i>Ode)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=Rb(m,h,d??this.service),v=jde(D$(t),{unhoistableHeaders:a,hoistableHeaders:l});f.sessionToken&&(v.query[n8]=f.sessionToken),v.query[Sde]=kb,v.query[wde]=`${f.accessKeyId}/${g}`,v.query[t8]=p,v.query[kde]=i.toString(10);const _=T$(v,o,s);return v.query[Ede]=this.getCanonicalHeaderList(_),v.query[r8]=await this.getSignature(p,g,this.getSigningKey(f,h,m,d),this.createCanonicalRequest(v,_,await Ab(t,this.sha256))),v}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:a,eventStreamCredentials:s}){const l=o??await this.regionProvider(),{shortDate:u,longDate:d}=this.formatDate(n),f=Rb(u,l,a??this.service),h=await Ab({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const m=su(await p.digest()),g=[Fde,d,f,i,m,h].join(`
65
+ `);return this.signString(g,{signingDate:n,signingRegion:l,signingService:a,eventStreamCredentials:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature,eventStreamCredentials:o}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(a,s,l,i));return u.update(Fh(t)),su(await u.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:a}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const l=o??await this.regionProvider(),u=D$(t),{longDate:d,shortDate:f}=this.formatDate(r),h=Rb(f,l,a??this.service);u.headers[o8]=d,s.sessionToken&&(u.headers[Tde]=s.sessionToken);const p=await Ab(u,this.sha256);!Bde(yx,u.headers)&&this.applyChecksum&&(u.headers[yx]=p);const m=T$(u,i,n),g=await this.getSignature(d,h,this.getSigningKey(s,l,f,a),this.createCanonicalRequest(u,m,p));return u.headers[i8]=`${kb} Credential=${s.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${g}`,u}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,kb),a=new this.sha256(await n);return a.update(Fh(o)),su(await a.digest())}getSigningKey(t,r,n,i){return Mde(this.sha256,t,n,r,i||this.service)}}const Hde=e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(u){u&&u!==t&&u!==n&&(r=!0),t=u;const d=Wde(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=Jde(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const g=await f(p);return h&&(!g.$source||Object.keys(g.$source).length===0)?ice(g,"CREDENTIALS_CODE","e"):g},n.memoized=f.memoized,n.configBound=f.configBound,n.attributed=!0}else n=f},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:a}=e;let s;return e.signer?s=jf(e.signer):e.regionInfoProvider?s=()=>jf(e.region)().then(async u=>[await e.regionInfoProvider(u,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:f,signingService:h}=u;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||h||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},m=e.signerConstructor||F$;return new m(p)}):s=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await jf(e.region)(),properties:{}},u);const d=u.signingRegion,f=u.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},p=e.signerConstructor||F$;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:s})};function Wde(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=Rue(t,Cue,PL):r?n=jf(r(Object.assign({},e,{parentClientConfig:e}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function Jde(e,t){if(t.configBound)return t;const r=async n=>t({...n,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}const Qde=async(e,t,r)=>({operation:Md(t).operation,region:await ls(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Yde(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Ot(e){return{schemeId:"smithy.api#noAuth"}}const Xde=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(Ot());break}case"ChangePassword":{t.push(Ot());break}case"CompleteWebAuthnRegistration":{t.push(Ot());break}case"ConfirmDevice":{t.push(Ot());break}case"ConfirmForgotPassword":{t.push(Ot());break}case"ConfirmSignUp":{t.push(Ot());break}case"DeleteUser":{t.push(Ot());break}case"DeleteUserAttributes":{t.push(Ot());break}case"DeleteWebAuthnCredential":{t.push(Ot());break}case"ForgetDevice":{t.push(Ot());break}case"ForgotPassword":{t.push(Ot());break}case"GetDevice":{t.push(Ot());break}case"GetTokensFromRefreshToken":{t.push(Ot());break}case"GetUser":{t.push(Ot());break}case"GetUserAttributeVerificationCode":{t.push(Ot());break}case"GetUserAuthFactors":{t.push(Ot());break}case"GlobalSignOut":{t.push(Ot());break}case"InitiateAuth":{t.push(Ot());break}case"ListDevices":{t.push(Ot());break}case"ListWebAuthnCredentials":{t.push(Ot());break}case"ResendConfirmationCode":{t.push(Ot());break}case"RespondToAuthChallenge":{t.push(Ot());break}case"RevokeToken":{t.push(Ot());break}case"SetUserMFAPreference":{t.push(Ot());break}case"SetUserSettings":{t.push(Ot());break}case"SignUp":{t.push(Ot());break}case"StartWebAuthnRegistration":{t.push(Ot());break}case"UpdateAuthEventFeedback":{t.push(Ot());break}case"UpdateDeviceStatus":{t.push(Ot());break}case"UpdateUserAttributes":{t.push(Ot());break}case"VerifySoftwareToken":{t.push(Ot());break}case"VerifyUserAttribute":{t.push(Ot());break}default:t.push(Yde(e))}return t},Zde=e=>{const t=Hde(e);return Object.assign(t,{authSchemePreference:ls(e.authSchemePreference??[])})},efe=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),tfe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rfe="3.1033.0",nfe={version:rfe},ife=e=>new TextEncoder().encode(e);var ofe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ife;function Ph(e){return e instanceof Uint8Array?e:typeof e=="string"?ofe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function xx(e){return typeof e=="string"?e.length===0:e.byteLength===0}var s8={name:"SHA-256"},I$={name:"HMAC",hash:s8},afe=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const sfe={};function l0(){return typeof window<"u"?window:typeof self<"u"?self:sfe}var lfe=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!xx(t)){var r=Ph(t),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return l0().crypto.subtle.sign(I$,r,t.toHash).then(function(n){return new Uint8Array(n)})}):xx(this.toHash)?Promise.resolve(afe):Promise.resolve().then(function(){return l0().crypto.subtle.digest(s8,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){l0().crypto.subtle.importKey("raw",Ph(t.secret),I$,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function ufe(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{u(n.next(d))}catch(f){a(f)}}function l(d){try{u(n.throw(d))}catch(f){a(f)}}function u(d){d.done?o(d.value):i(d.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function cfe(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var no=64,dfe=32,ffe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),hfe=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],pfe=Math.pow(2,53)-1,u0=(function(){function e(){this.state=Int32Array.from(hfe),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>pfe)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===no&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%no>=no-8){for(var i=this.bufferLength;i<no;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<no-8;i++)r.setUint8(i,0);r.setUint32(no-8,Math.floor(t/4294967296),!0),r.setUint32(no-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(dfe),i=0;i<8;i++)o[i*4]=this.state[i]>>>24&255,o[i*4+1]=this.state[i]>>>16&255,o[i*4+2]=this.state[i]>>>8&255,o[i*4+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],d=n[6],f=n[7],h=0;h<no;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var p=this.temp[h-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(m+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var v=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(f+(ffe[h]+this.temp[h]|0)|0)|0,_=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&a^o&a)|0;f=d,d=u,u=l,l=s+v|0,s=a,a=o,o=i,i=v+_|0}n[0]+=i,n[1]+=o,n[2]+=a,n[3]+=s,n[4]+=l,n[5]+=u,n[6]+=d,n[7]+=f},e})(),mfe=(function(){function e(t){this.secret=t,this.hash=new u0,this.reset()}return e.prototype.update=function(t){if(!(xx(t)||this.error))try{this.hash.update(Ph(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return ufe(this,void 0,void 0,function(){return cfe(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new u0,this.secret){this.outer=new u0;var t=gfe(this.secret),r=new Uint8Array(no);r.set(t);for(var n=0;n<no;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();function gfe(e){var t=Ph(e);if(t.byteLength>no){var r=new u0;r.update(t),t=r.digest()}var n=new Uint8Array(no);return n.set(t),n}var vfe=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function _fe(e){if(bfe(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return yfe(t)}return!1}function bfe(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function yfe(e){return e&&vfe.every(function(t){return typeof e[t]=="function"})}var xfe=(function(){function e(t){_fe(l0())?this.hash=new lfe(t):this.hash=new mfe(t)}return e.prototype.update=function(t,r){this.hash.update(Ph(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const Sfe=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??P$.os(i)??"other",a=void 0,s=n?.userAgentData?.brands??[],l=s[s.length-1],u=l?.brand??P$.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},P$={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},wfe=e=>()=>Promise.reject(e),O$=typeof TextEncoder=="function"?new TextEncoder:null,Efe=e=>{if(typeof e=="string"){if(O$)return O$.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},kfe=["in-region","cross-region","mobile","standard","legacy"],Cfe=({defaultsMode:e}={})=>xde(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Rfe()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${kfe.join(", ")}, got ${t}`)}}),Rfe=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:n}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(n)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1};class Afe{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const n=r.getMemberSchemas(),i=Object.values(n).find(o=>!!o.getMergedTraits().httpPayload);if(i){const o=i.getMergedTraits().mediaType;return o||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(a=>{const{httpQuery:s,httpQueryParams:l,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!s&&!l&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,a){let s=t;t.includes("#")&&([,s]=t.split("#"));const l={$metadata:o,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:a?.(this.errorRegistry,s)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const m=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:s}),l),i)}const h=i,p=h?.message??h?.Message??h?.Error?.Message??h?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(p),{name:s},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=Mi.for(i),a=Mi.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(a),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=E$(t,r);n&&(i.message=n);const o=i.Error??{};o.Type=i.Error?.Type,o.Code=i.Error?.Code,o.Message=i.Error?.message??i.Error?.Message??n,i.Error=o;const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return E$(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),a=Object.keys(t),s={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<a.length;l++){const u=a[l];s[u==="message"?"Message":u]=t[u]}delete s.__type,t.Error=s}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>Sn.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class Zw{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Tfe{from;to;keys;constructor(t,r){this.from=t,this.to=r;const n=Object.keys(this.from),i=new Set(n);i.delete("__type"),this.keys=i}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}function $fe(e,t,r){if(r?.source){const n=r.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||n!==String(t)))return n.includes(".")?new wa(n,"bigDecimal"):BigInt(n)}return t}const Nfe=(e,t)=>gx(e,t).then(r=>(t?.utf8Encoder??Gw)(r)),Dfe=(e,t)=>Nfe(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),M$=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),Tb=e=>{let t=e;return typeof t=="number"&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},Ffe=(e,t)=>{const r=M$(e.headers,"x-amzn-errortype");if(r!==void 0)return Tb(e.headers[r]);if(t&&typeof t=="object"){const n=M$(t,"code");if(n&&t[n]!==void 0)return Tb(t[n]);if(t.__type!==void 0)return Tb(t.__type)}};class Ife extends Zw{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,$fe):await Dfe(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=Sn.of(t);if(n){if(i.isStructSchema()){const a=r,s=i.isUnionSchema(),l={};let u;const{jsonName:d}=this.settings;d&&(u={});let f;s&&(f=new Tfe(a,l));for(const[h,p]of i.structIterator()){let m=h;d&&(m=p.getMergedTraits().jsonName??m,u[m]=h),s&&f.mark(m),a[m]!=null&&(l[h]=this._read(p,a[m]))}if(s)f.writeUnknown();else if(typeof a.__type=="string")for(const h in a){const p=a[h],m=d?u[h]??h:h;m in l||(l[m]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const a=i.getValueSchema(),s=[];for(const l of r)s.push(this._read(a,l));return s}if(i.isMapSchema()){const a=i.getValueSchema(),s={};for(const l in r)s[l]=this._read(a,r[l]);return s}}if(i.isBlobSchema()&&typeof r=="string")return xv(r);const o=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&o)return o==="application/json"||o.endsWith("+json")?rl.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(IL(i,this.settings)){case 5:return oue(r);case 6:return DL(r);case 7:return uue(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(i.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(i.isBigDecimalSchema()&&r!=null){if(r instanceof wa)return r;const a=r;return a.type==="bigDecimal"&&"string"in a?new wa(a.string,a.type):new wa(String(r),"bigDecimal")}if(i.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(i.isDocumentSchema())if(n){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof wa?a[s]=l:a[s]=this._read(i,l)}return a}else return structuredClone(r);return r}}const L$="Ν";class Pfe{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,r)=>{if(r instanceof wa){const n=`${L$+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${L$+"b"+this.counter++}_`+n;return this.values.set(`"${i}"`,n),i}return r}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(const[r,n]of this.values)t=t.replace(r,n);return t}}class Ofe extends Zw{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=Sn.of(t),this.buffer=this._write(this.rootSchema,r)}flush(){const{rootSchema:t,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);const n=new Pfe;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(t,r){this.write(t,r),typeof this.buffer=="object"&&(this.buffer.__type=Sn.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=Sn.of(t);if(i){if(o.isStructSchema()){const a=r,s={},{jsonName:l}=this.settings;let u;l&&(u={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,a[f],o);if(p!==void 0){let m=f;l&&(m=h.getMergedTraits().jsonName??f,u[f]=m),s[m]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=a;if(Array.isArray(f)){const[h,p]=f;s[h]=this._write(15,p)}}else if(typeof a.__type=="string")for(const f in a){const h=a[f],p=l?u[f]??f:f;p in s||(s[p]=this._write(15,h))}return s}if(Array.isArray(r)&&o.isListSchema()){const a=o.getValueSchema(),s=[],l=!!o.getMergedTraits().sparse;for(const u of r)(l||u!=null)&&s.push(this._write(a,u));return s}if(o.isMapSchema()){const a=o.getValueSchema(),s={},l=!!o.getMergedTraits().sparse;for(const u in r){const d=r[u];(l||d!=null)&&(s[u]=this._write(a,d))}return s}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??sg)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(IL(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return nue(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof wa&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return FL();const a=o.getMergedTraits().mediaType;return r!=null&&a&&(a==="application/json"||a.endsWith("+json"))?rl.from(r):r}if(typeof r=="number"&&o.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&o.isBlobSchema())return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??sg)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof wa?(this.useReplacer=!0,a[s]=l):a[s]=this._write(o,l)}return a}else return structuredClone(r);return r}}}class Mfe extends Zw{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Ofe(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Ife(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Lfe extends yue{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=o??new Mfe({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new Afe(this.awsQueryCompatible)}async serializeRequest(t,r,n){const i=await super.serializeRequest(t,r,n);return i.path.endsWith("/")||(i.path+="/"),i.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,i.headers["x-amz-target"]=`${this.serviceTarget}.${t.name}`,this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),(a0(t.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(t,r,n,i,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const a=Ffe(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);const{errorSchema:s,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=Sn.of(s),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(s)??Error,h=new f(d),p={},m=this.codec.createDeserializer();for(const[g,v]of u.structIterator())i[g]!=null&&(p[g]=m.readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:u.getMergedTraits().error,message:d},p),i)}}class zfe extends Lfe{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const Oh="ref",Ll=-1,cm=!0,z$="isSet",l8="PartitionResult",dm="booleanEquals",$b="getAttr",uf="stringEquals",U$={[Oh]:"Endpoint"},Nb={[Oh]:l8},Af={[Oh]:"Region"},da={},B$=[Af],j$={conditions:[[z$,[U$]],[z$,B$],["aws.partition",B$,l8],[dm,[{[Oh]:"UseFIPS"},cm]],[dm,[{fn:$b,argv:[Nb,"supportsFIPS"]},cm]],[dm,[{[Oh]:"UseDualStack"},cm]],[dm,[{fn:$b,argv:[Nb,"supportsDualStack"]},cm]],[uf,[{fn:$b,argv:[Nb,"name"]},"aws"]],[uf,[Af,"us-east-1"]],[uf,[Af,"us-east-2"]],[uf,[Af,"us-west-1"]],[uf,[Af,"us-west-2"]]],results:[[Ll],[Ll,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Ll,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[U$,da],["https://cognito-idp-fips.us-east-1.amazonaws.com",da],["https://cognito-idp-fips.us-east-2.amazonaws.com",da],["https://cognito-idp-fips.us-west-1.amazonaws.com",da],["https://cognito-idp-fips.us-west-2.amazonaws.com",da],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",da],[Ll,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",da],[Ll,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",da],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",da],[Ll,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",da],[Ll,"Invalid Configuration: Missing Region"]]},Ufe=2,pn=1e8,Bfe=new Int32Array([-1,1,-1,0,17,3,1,4,pn+16,2,5,pn+16,3,9,6,5,7,pn+15,6,8,pn+14,7,pn+12,pn+13,4,11,10,5,pn+9,pn+11,5,12,pn+10,6,13,pn+9,8,pn+4,14,9,pn+5,15,10,pn+6,16,11,pn+7,pn+8,3,pn+1,18,5,pn+2,pn+3]),jfe=Ww.from(Bfe,Ufe,j$.conditions,j$.results),qfe=new Nue({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Vfe=(e,t={})=>qfe.get(e,()=>Yue(jfe,{endpointParams:e,logger:t.logger}));Jw.aws=GL;class Oe extends Rc{constructor(t){super(t),Object.setPrototypeOf(this,Oe.prototype)}}class eE extends Oe{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,eE.prototype)}}class tE extends Oe{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,tE.prototype)}}class rE extends Oe{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,rE.prototype),this.reasonCode=t.reasonCode}}class nE extends Oe{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,nE.prototype)}}class iE extends Oe{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,iE.prototype)}}class oE extends Oe{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,oE.prototype)}}class aE extends Oe{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,aE.prototype)}}class sE extends Oe{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,sE.prototype)}}class lE extends Oe{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,lE.prototype)}}class uE extends Oe{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,uE.prototype)}}class cE extends Oe{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,cE.prototype)}}class dE extends Oe{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,dE.prototype)}}class fE extends Oe{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,fE.prototype)}}class hE extends Oe{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,hE.prototype)}}class pE extends Oe{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,pE.prototype)}}class mE extends Oe{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,mE.prototype)}}class gE extends Oe{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,gE.prototype)}}class vE extends Oe{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,vE.prototype)}}class _E extends Oe{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,_E.prototype)}}class bE extends Oe{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,bE.prototype)}}class yE extends Oe{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,yE.prototype)}}class xE extends Oe{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,xE.prototype)}}class SE extends Oe{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,SE.prototype)}}class wE extends Oe{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,wE.prototype)}}class EE extends Oe{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,EE.prototype)}}class kE extends Oe{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,kE.prototype)}}class CE extends Oe{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,CE.prototype)}}class RE extends Oe{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,RE.prototype)}}class AE extends Oe{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,AE.prototype)}}class TE extends Oe{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,TE.prototype)}}class $E extends Oe{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,$E.prototype)}}class NE extends Oe{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,NE.prototype)}}class DE extends Oe{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,DE.prototype)}}class FE extends Oe{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,FE.prototype)}}class IE extends Oe{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,IE.prototype)}}class PE extends Oe{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,PE.prototype)}}class OE extends Oe{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,OE.prototype)}}class ME extends Oe{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,ME.prototype)}}class LE extends Oe{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,LE.prototype)}}class zE extends Oe{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,zE.prototype)}}class UE extends Oe{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,UE.prototype)}}class BE extends Oe{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,BE.prototype)}}class jE extends Oe{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,jE.prototype)}}class qE extends Oe{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,qE.prototype)}}class VE extends Oe{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,VE.prototype)}}class GE extends Oe{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,GE.prototype)}}class KE extends Oe{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,KE.prototype)}}class HE extends Oe{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,HE.prototype)}}class WE extends Oe{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,WE.prototype)}}class JE extends Oe{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,JE.prototype)}}class QE extends Oe{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,QE.prototype)}}class YE extends Oe{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,YE.prototype)}}class XE extends Oe{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,XE.prototype)}}class ZE extends Oe{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,ZE.prototype)}}class e2 extends Oe{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,e2.prototype)}}class t2 extends Oe{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,t2.prototype)}}class r2 extends Oe{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,r2.prototype)}}const Gfe="AvailableChallenges",Kfe="AccessDeniedException",Hfe="AliasExistsException",Wfe="AnalyticsEndpointId",Jfe="AuthFlow",Qfe="AnalyticsMetadata",Yfe="AnalyticsMetadataType",Xfe="AuthParameters",Zfe="AuthParametersType",ehe="AuthenticationResult",the="AuthenticationResultType",rhe="AccessToken",nhe="CodeDeliveryFailureException",ihe="ClientId",ohe="ClientIdType",ahe="ClientMetadata",she="CodeMismatchException",lhe="ConcurrentModificationException",uhe="ChallengeName",che="ChallengeParameters",dhe="DeviceGroupKey",fhe="DeviceKey",hhe="DeviceKeyExistsException",phe="DuplicateProviderException",mhe="ExpiredCodeException",ghe="EncodedData",vhe="ExpiresIn",_he="EnableSoftwareTokenMFAException",bhe="ForbiddenException",yhe="FeatureUnavailableInTierException",xhe="GroupExistsException",She="IpAddress",whe="InitiateAuthRequest",Ehe="InitiateAuthResponse",khe="InitiateAuth",Che="InternalErrorException",Rhe="InvalidEmailRoleAccessPolicyException",Ahe="InvalidLambdaResponseException",The="InvalidOAuthFlowException",$he="InvalidParameterException",Nhe="InvalidPasswordException",Dhe="InternalServerException",Fhe="InvalidSmsRoleAccessPolicyException",Ihe="InvalidSmsRoleTrustRelationshipException",Phe="IdToken",Ohe="InvalidUserPoolConfigurationException",Mhe="LimitExceededException",Lhe="MFAMethodNotFoundException",zhe="ManagedLoginBrandingExistsException",Uhe="NotAuthorizedException",Bhe="NewDeviceMetadata",jhe="NewDeviceMetadataType",qhe="PasswordHistoryPolicyViolationException",Vhe="PreconditionNotMetException",Ghe="PasswordResetRequiredException",Khe="ResourceNotFoundException",Hhe="RefreshToken",Whe="RefreshTokenReuseException",u8="Session",Jhe="ScopeDoesNotExistException",Qhe="SessionType",Yhe="SoftwareTokenMFANotFoundException",Xhe="TierChangeNotAllowedException",Zhe="TermsExistsException",epe="TooManyFailedAttemptsException",tpe="TooManyRequestsException",rpe="TokenModelType",npe="TokenType",ipe="UserContextDataType",ope="UserContextData",ape="UnauthorizedException",spe="UsernameExistsException",lpe="UserImportInProgressException",upe="UnsupportedIdentityProviderException",cpe="UnexpectedLambdaException",dpe="UserLambdaValidationException",fpe="UserNotConfirmedException",hpe="UserNotFoundException",ppe="UnsupportedOperationException",mpe="UserPoolAddOnNotEnabledException",gpe="UserPoolTaggingException",vpe="UnsupportedTokenTypeException",_pe="UnsupportedUserStateException",bpe="WebAuthnClientMismatchException",ype="WebAuthnConfigurationMissingException",xpe="WebAuthnChallengeNotFoundException",Spe="WebAuthnCredentialNotSupportedException",wpe="WebAuthnNotEnabledException",Epe="WebAuthnOriginNotAllowedException",kpe="WebAuthnRelyingPartyMismatchException",Ve="client",Ue="error",Ge="httpError",Be="message",Cpe="reasonCode",c8="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",d8="server",Te="com.amazonaws.cognitoidentityprovider",f8=Mi.for(c8);var Rpe=[-3,c8,"CognitoIdentityProviderServiceException",0,[],[]];f8.registerError(Rpe,Oe);const Le=Mi.for(Te);var Ape=[-3,Te,Kfe,{[Ue]:Ve,[Ge]:403},[Be],[0]];Le.registerError(Ape,eE);var Tpe=[-3,Te,Hfe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Tpe,xE);var $pe=[-3,Te,nhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError($pe,pE);var Npe=[-3,Te,she,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Npe,TE);var Dpe=[-3,Te,lhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Dpe,FE);var Fpe=[-3,Te,hhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Fpe,BE);var Ipe=[-3,Te,phe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Ipe,qE);var Ppe=[-3,Te,_he,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Ppe,r2);var Ope=[-3,Te,mhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Ope,$E);var Mpe=[-3,Te,yhe,{[Ue]:Ve,[Ge]:403},[Be],[0]];Le.registerError(Mpe,KE);var Lpe=[-3,Te,bhe,{[Ue]:Ve,[Ge]:403},[Be],[0]];Le.registerError(Lpe,IE);var zpe=[-3,Te,xhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(zpe,jE);var Upe=[-3,Te,Che,{[Ue]:d8},[Be],[0]];Le.registerError(Upe,tE);var Bpe=[-3,Te,Dhe,{[Ue]:d8},[Be],[0]];Le.registerError(Bpe,sE);var jpe=[-3,Te,Rhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(jpe,wE);var qpe=[-3,Te,Ahe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(qpe,cE);var Vpe=[-3,Te,The,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Vpe,JE);var Gpe=[-3,Te,$he,{[Ue]:Ve,[Ge]:400},[Be,Cpe],[0,0]];Le.registerError(Gpe,rE);var Kpe=[-3,Te,Nhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Kpe,mE);var Hpe=[-3,Te,Fhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Hpe,gE);var Wpe=[-3,Te,Ihe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Wpe,vE);var Jpe=[-3,Te,Ohe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Jpe,SE);var Qpe=[-3,Te,Mhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Qpe,lE);var Ype=[-3,Te,zhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Ype,VE);var Xpe=[-3,Te,Lhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Xpe,EE);var Zpe=[-3,Te,Uhe,{[Ue]:Ve,[Ge]:403},[Be],[0]];Le.registerError(Zpe,nE);var eme=[-3,Te,qhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(eme,NE);var tme=[-3,Te,Ghe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(tme,kE);var rme=[-3,Te,Vhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(rme,_E);var nme=[-3,Te,Whe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(nme,XE);var ime=[-3,Te,Khe,{[Ue]:Ve,[Ge]:404},[Be],[0]];Le.registerError(ime,iE);var ome=[-3,Te,Jhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(ome,QE);var ame=[-3,Te,Yhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(ame,DE);var sme=[-3,Te,Zhe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(sme,GE);var lme=[-3,Te,Xhe,{[Ue]:Ve,[Ge]:403},[Be],[0]];Le.registerError(lme,HE);var ume=[-3,Te,epe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(ume,dE);var cme=[-3,Te,tpe,{[Ue]:Ve,[Ge]:429},[Be],[0]];Le.registerError(cme,oE);var dme=[-3,Te,ape,{[Ue]:Ve,[Ge]:401},[Be],[0]];Le.registerError(dme,ZE);var fme=[-3,Te,cpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(fme,fE);var hme=[-3,Te,upe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(hme,YE);var pme=[-3,Te,ppe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(pme,CE);var mme=[-3,Te,vpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(mme,e2);var gme=[-3,Te,_pe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(gme,bE);var vme=[-3,Te,lpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(vme,aE);var _me=[-3,Te,dpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(_me,hE);var bme=[-3,Te,spe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(bme,yE);var yme=[-3,Te,fpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(yme,RE);var xme=[-3,Te,hpe,{[Ue]:Ve,[Ge]:404},[Be],[0]];Le.registerError(xme,uE);var Sme=[-3,Te,mpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Sme,AE);var wme=[-3,Te,gpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(wme,WE);var Eme=[-3,Te,xpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Eme,PE);var kme=[-3,Te,bpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(kme,OE);var Cme=[-3,Te,ype,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Cme,t2);var Rme=[-3,Te,Spe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Rme,ME);var Ame=[-3,Te,wpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Ame,LE);var Tme=[-3,Te,Epe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError(Tme,zE);var $me=[-3,Te,kpe,{[Ue]:Ve,[Ge]:400},[Be],[0]];Le.registerError($me,UE);const Nme=[f8,Le];var Dme=[0,Te,ohe,8,0],h8=[0,Te,Qhe,8,0],Db=[0,Te,rpe,8,0],Fme=[3,Te,Yfe,0,[Wfe],[0]],Ime=[3,Te,the,0,[rhe,vhe,npe,Hhe,Phe,Bhe],[[()=>Db,0],1,0,[()=>Db,0],[()=>Db,0],()=>Mme]],Pme=[3,Te,whe,0,[Jfe,ihe,Xfe,ahe,Qfe,ope,u8],[0,[()=>Dme,0],[()=>zme,0],128,()=>Fme,[()=>Lme,0],[()=>h8,0]],2],Ome=[3,Te,Ehe,0,[uhe,u8,che,ehe,Gfe],[0,[()=>h8,0],128,[()=>Ime,0],64]],Mme=[3,Te,jhe,0,[fhe,dhe],[0,0]],Lme=[3,Te,ipe,8,[She,ghe],[0,0]],zme=[2,Te,Zfe,8,0,0],Ume=[9,Te,khe,0,()=>Pme,()=>Ome];const Bme=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??xv,base64Encoder:e?.base64Encoder??sg,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Vfe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Xde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new yde},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new wue}],logger:e?.logger??new ZL,protocol:e?.protocol??zfe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:Nme,xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:e?.serviceId??"Cognito Identity Provider",urlParser:e?.urlParser??dd,utf8Decoder:e?.utf8Decoder??cd,utf8Encoder:e?.utf8Encoder??Gw}),jme=e=>{const t=Cfe(e),r=()=>t().then(nde),n=Bme(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Efe,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Sfe({serviceId:n.serviceId,clientVersion:nfe.version}),maxAttempts:e?.maxAttempts??Vf,region:e?.region??wfe("Region is missing"),requestHandler:Kw.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||oce),sha256:e?.sha256??xfe,streamCollector:e?.streamCollector??Ile,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nce)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Dce))}},qme=e=>({setRegion(t){e.region=t},region(){return e.region}}),Vme=e=>({region:e.region()}),Gme=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(a=>a.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},Kme=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Hme=(e,t)=>{const r=Object.assign(qme(e),lde(e),sle(e),Gme(e));return t.forEach(n=>n.configure(r)),Object.assign(e,Vme(r),ude(r),lle(r),Kme(r))};class p8 extends tde{config;constructor(...[t]){const r=jme(t||{});super(r),this.initConfig=r;const n=efe(r),i=$ue(n),o=ede(i),a=Pce(o),s=a,l=Xce(s),u=Zde(l),d=Hme(u,t?.extensions||[]);this.config=d,this.middlewareStack.use(Gle(this.config)),this.middlewareStack.use($ce(this.config)),this.middlewareStack.use(vde(this.config)),this.middlewareStack.use(Lce(this.config)),this.middlewareStack.use(fle(this.config)),this.middlewareStack.use(mle(this.config)),this.middlewareStack.use(_le(this.config)),this.middlewareStack.use(wle(this.config,{httpAuthSchemeParametersProvider:Qde,identityProviderConfigProvider:async f=>new Sue({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Ale(this.config))}destroy(){super.destroy()}}class m8 extends YL.classBuilder().ep(tfe).m(function(t,r,n,i){return[Yce(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(Ume).build(){}let Wme="reventless.auth.v1",Sx="reventless.role-switched",Jme=300*1e3,g8="activeRole",v8="availableRoles";function _8(e){return e.split(",").map(t=>t.trim()).filter(t=>t!=="")}function wx(e){let t=i=>F(C(e[i],me.string),""),r=ee(F(C(e.groups,me.array),[]),me.string),n=i=>C(C(C(e.claims,me.object),o=>o[i]),me.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider"),activeRole:n(g8),availableRoles:fe(n(v8),[],_8)}}function Qme(e){let t=[["userId",e.userId],["username",e.username],["groups",e.groups.map(a=>a)],["provider",e.provider]],r=e.activeRole,n=e.availableRoles,i,o=0;if(r!==void 0||n.length!==0?o=1:i=[],o===1){let a=[];re(r,s=>{a.push([g8,s])}),n.length!==0&&a.push([v8,n.join(",")]),i=[["claims",Object.fromEntries(a)]]}return Object.fromEntries(t.concat(i))}function Yme(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=me.object(r);if(n===void 0)return;let i=C(n.token,me.string),o=n.identity,a=C(n.refreshToken,me.string),s=C(n.expiresAt,me.float);return i!==void 0&&o!==void 0?G(me.object(o),l=>({token:i,identity:wx(l),refreshToken:a,expiresAt:s})):void 0}catch{return}}function fm(e,t){let r=[["token",t.token],["identity",Qme(t.identity)]],n=t.refreshToken,i=n!==void 0?r.concat([["refreshToken",n]]):r,o=t.expiresAt,a=o!==void 0?i.concat([["expiresAt",o]]):i,s=JSON.stringify(Object.fromEntries(a));localStorage.setItem(e,s)}function Xme(){return sessionStorage.getItem(Sx)==null?!1:(sessionStorage.removeItem(Sx),!0)}function Zme(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function e0e(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/switch-role"}function b8(e){let t=n=>C(e[n],me.string),r=ee(F(C(e["cognito:groups"],me.array),[]),me.string);return{userId:F(t("sub"),""),username:F(Aa(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito",activeRole:t("custom:activeRole"),availableRoles:fe(t("custom:availableRoles"),[],_8)}}function y8(e){try{return ile(e)}catch{return}}function t0e(e){let t=e.IdToken;if(t===void 0)return;let r=y8(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:b8(r),refreshToken:e.RefreshToken,expiresAt:i}}async function r0e(e,t,r,n){try{let i=new p8({region:t}),o=new m8({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),a=await i.send(o),s=C(a.AuthenticationResult,t0e);return s!==void 0?{TAG:"Ok",_0:s}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=dl(i);return{TAG:"Error",_0:ag(og(o))}}}async function n0e(e,t,r,n){try{let i=new p8({region:t}),o=new m8({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),s=(await i.send(o)).AuthenticationResult;if(s===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=s.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let u=y8(l),d=F(G(u,b8),n),f=s.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=s.RefreshToken;return{TAG:"Ok",_0:{token:l,identity:d,refreshToken:p!==void 0?p:r,expiresAt:h}}}catch(i){let o=dl(i);return{TAG:"Error",_0:ag(og(o))}}}let x8=ar(void 0),i0e=x8.Provider;function o0e(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,a=t!==void 0?t:Wme,s=de(()=>Yme(a)),l=s[1],u=s[0];$e(()=>{if(u===void 0)return;let x=u.refreshToken;if(x===void 0)return;let S=u.expiresAt;if(S===void 0)return;let E=u.identity;switch(o){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let k=Math.max(0,S-Date.now()-Jme),R=setTimeout(()=>{n0e(n,r,x,E).then(T=>{if(T.TAG==="Ok"){let A=T._0;return fm(a,A),l(N=>A)}localStorage.removeItem(a),l(A=>{})})},k);return()=>{clearTimeout(R)}}},[u,o,n,r]);let d;switch(o){case"Local":d=!0;break;case"Anonymous":case"Cognito":d=!1;break}let f=G(u,x=>x.identity),h=De(u);return br(i0e,{value:{identity:f,isAuthenticated:h,login:async(x,S)=>{try{let E=0;switch(o){case"Anonymous":case"Local":E=1;break;case"Cognito":if(n===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};if(r===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};let k=await r0e(n,r,x,S);if(k.TAG!=="Ok")return{TAG:"LoginErr",_0:k._0};let R=k._0;return fm(a,R),l(T=>R),"LoginOk"}if(E===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let k=await fetch(Zme(i),{method:"POST",headers:{"content-type":"application/json"},body:F(JSON.stringify({username:x,password:S}),"")}),R=await k.json();if(k.ok){let A=me.object(R);if(A===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=C(A.token,me.string),P=C(A.identity,me.object);if(N===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(P===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let O=wx(P),D={token:N,identity:O,refreshToken:void 0,expiresAt:void 0};return fm(a,D),l(U=>D),"LoginOk"}return{TAG:"LoginErr",_0:F(C(C(me.object(R),A=>A.error),me.string),"Login failed")}}}catch(E){let k=dl(E);return{TAG:"LoginErr",_0:ag(og(k))}}},switchRole:async x=>{try{let S=0;switch(o){case"Anonymous":case"Local":S=1;break;case"Cognito":return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"}}if(S===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};if(u===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let E=await fetch(e0e(i),{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+u.token},body:F(JSON.stringify({activeRole:F(x,"")}),"")}),k=await E.json();if(!E.ok)return{TAG:"LoginErr",_0:F(C(C(me.object(k),O=>O.error),me.string),"Could not switch role")};let R=me.object(k);if(R===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let T=C(R.token,me.string),A=C(R.identity,me.object);if(T===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};if(A===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let N=wx(A),P={token:T,identity:N,refreshToken:void 0,expiresAt:void 0};return fm(a,P),sessionStorage.setItem(Sx,"1"),l(O=>P),"LoginOk"}}catch(S){let E=dl(S);return{TAG:"LoginErr",_0:ag(og(E))}}},canSwitchRoles:d,logout:()=>{localStorage.removeItem(a),l(x=>{})},getToken:()=>G(u,x=>x.token)},children:e.children})}let a0e={make:o0e};function La(){return At(x8)}let s0e={background:"var("+y.surface+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+$.fontFamily+")",fontSize:"var("+$.sizeSm+")",fontWeight:"var("+$.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+Y.md+")",alignItems:"center",gap:"0.375rem"},l0e={color:"var("+y.textSecondary+")",fontSize:"0.625rem"},u0e={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+$.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+Y.md+")",boxShadow:"var("+kn.md+")"},c0e={background:"var("+y.brandSubtle+")",color:"var("+y.brand+")",display:"inline-block",fontSize:"var("+$.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+Y.full+")"},q$={border:"none",borderTop:"1px solid var("+y.borderSubtle+")",margin:"0.5rem 0"},d0e={background:"transparent",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",fontSize:"var("+$.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+Y.sm+")"},f0e={color:"var("+y.textSecondary+")",fontSize:"var("+$.sizeXs+")",letterSpacing:"0.04em",marginBottom:"0.25rem",textTransform:"uppercase"};function V$(e){return{background:e?"var("+y.surface+")":"transparent",border:"1px solid "+(e?"var("+y.border+")":"transparent"),color:"var("+y.textPrimary+")",cursor:e?"default":"pointer",display:"flex",fontSize:"var("+$.sizeSm+")",marginBottom:"0.125rem",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")",alignItems:"center",justifyContent:"space-between"}}let G$={color:"var("+y.textSecondary+")",fontSize:"var("+$.sizeXs+")"},h0e={color:"var("+y.error+")",fontSize:"var("+$.sizeXs+")",marginTop:"0.25rem"};function p0e(e,t){if(!e)return[];let r=t.availableRoles;return r.length!==0?r:t.groups}function m0e(e){let t=La(),r=de(()=>!1),n=r[1],i=r[0],o=de(()=>!1),a=o[1],s=o[0],l=de(()=>{});if(t===void 0)return null;let u=l[1],d=l[0],f=t.identity;if(f===void 0)return null;let h;if(i){let p=p0e(t.canSwitchRoles,f),m=p.length;h=L("div",{children:[b("div",{children:f.username,style:{fontSize:"var("+$.sizeMd+")",fontWeight:"var("+$.weightMedium+")",marginBottom:"0.25rem"}}),f.groups.length!==0?b("div",{children:f.groups.map(g=>b("span",{children:g,style:c0e},g)),style:{marginBottom:"0.25rem"}}):null,m!==1&&m!==0?L(Lr,{children:[b("hr",{style:q$}),b("div",{children:"Acting as",style:f0e}),p.map(g=>{let v=Ne(f.activeRole,g);return L("button",{children:[g,v?b("span",{children:"✓",style:G$}):null],style:V$(v),disabled:s,onClick:_=>{if(!v){a(x=>!0),u(x=>{}),t.switchRole(g).then(x=>{if(a(E=>!1),typeof x!="object")return n(E=>!1);let S=x._0;u(E=>S)});return}}},g)}),L("button",{children:["All roles",f.activeRole===void 0?b("span",{children:"✓",style:G$}):null],style:V$(f.activeRole===void 0),disabled:s,onClick:g=>{if(f.activeRole!==void 0){a(v=>!0),u(v=>{}),t.switchRole(void 0).then(v=>{if(a(x=>!1),typeof v!="object")return n(x=>!1);let _=v._0;u(x=>_)});return}}}),d!==void 0?b("div",{children:d,style:h0e}):null]}):null,b("hr",{style:q$}),b("button",{children:"Sign out",style:d0e,onClick:g=>{n(v=>!1),t.logout()}})],style:u0e})}else h=null;return L("div",{children:[L("button",{children:[f.username,b("span",{children:i?"▴":"▾",style:l0e})],"aria-label":"Signed in as "+f.username,style:s0e,onClick:p=>n(m=>!m)}),h],style:{position:"relative"}})}let g0e=m0e,v0e={background:"var("+y.surface+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+$.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+Y.md+")"},K$={color:"var("+y.textSecondary+")",display:"block",fontSize:"var("+$.sizeSm+")",marginBottom:"0.25rem"},H$={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",fontSize:"var("+$.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+Y.sm+")",boxSizing:"border-box"};function _0e(e){return{background:e?"var("+y.textDisabled+")":"var("+y.brand+")",border:"none",color:"var("+y.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+$.sizeMd+")",fontWeight:"var("+$.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+Y.sm+")"}}let b0e={color:"var("+y.error+")",fontSize:"var("+$.sizeSm+")",marginBottom:"0.75rem"};function y0e(e){let t=La(),r=de(()=>""),n=r[1],i=r[0],o=de(()=>""),a=o[1],s=o[0],l=de(()=>{}),u=l[1],d=l[0],f=de(()=>!1),h=f[1],p=f[0],m=g=>{g.preventDefault(),u(v=>{}),h(v=>!0),t!==void 0?$t(t.login(i,s).then(v=>{if(h(x=>!1),typeof v!="object")return;let _=v._0;u(x=>_)}),v=>(h(_=>!1),u(_=>"Unexpected error during sign-in"),Promise.resolve())):(u(v=>"Auth provider missing"),h(v=>!1),Promise.resolve())};return L("div",{children:[b("h1",{children:"Sign in",style:{fontSize:"var("+$.sizeXl+")",fontWeight:"var("+$.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[b("label",{children:"Username",style:K$}),b("input",{style:H$,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:g=>{let v=g.target.value;n(_=>v)}}),b("label",{children:"Password",style:K$}),b("input",{style:H$,autoComplete:"current-password",type:"password",value:s,onChange:g=>{let v=g.target.value;a(_=>v)}}),d!==void 0?b("div",{children:d,style:b0e}):null,b("button",{children:p?"Signing in…":"Sign in",style:_0e(p),disabled:p,type:"submit"})],onSubmit:m})],style:v0e})}let W$=y0e;function x0e(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return F(vj(e.routes,n),i)}let S0e=x0e;function w0e(e){return e.button===0&&!e.altKey&&!e.ctrlKey&&!e.metaKey?!e.shiftKey:!1}function E0e(e){let t=At(Ag),r=yI(t.prefix,e.route),n=i=>{if(!i.defaultPrevented&&w0e(i))return i.preventDefault(),cs(r)};return b("a",{children:e.children,href:r,onClick:n})}let k0e=E0e,mp=ar(void 0),C0e=mp.Provider;function R0e(e){let t=e.initialPages,r=t!==void 0?t:[],n=de(()=>r),i=n[1],o=de(()=>[]),a=o[1],s=n[0].concat(o[0]);return br(C0e,{value:{register:m=>i(g=>g.concat(m)),deregister:m=>i(g=>g.filter(v=>v.fragmentId!==m)),setPluginPages:m=>a(g=>m),getPages:()=>s,getPage:m=>s.find(g=>g.fragmentId===m)},children:e.children})}let A0e={make:R0e};function S8(){let e=At(mp);return e!==void 0?e.getPages():[]}function w8(e){return!F(e.menuEntry.hidden,!1)}let T0e=[];function $0e(e){return!1}let N0e={activeAccess:T0e,hasAccess:$0e},E8=ar(N0e),D0e=E8.Provider;function F0e(e){let t=e.access;return br(D0e,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function Tl(){return At(E8).hasAccess}let I0e=F0e;function Xl(e){return"var("+e+")"}let P0e=w([z("flex"),X("center"),c("gap",Xl(I.sm)),c("padding","6px var("+I.sm+") 6px 14px"),c("border-radius",Xl(Y.md)),c("color",Xl(y.textDisabled)),c("font-size",Xl($.sizeSm)),Ce("notAllowed"),JI("none")]),O0e=w([c("font-size","14px"),$n(0)]),M0e=w([Vn(1),c("font-weight",Xl($.weightMedium))]),L0e=w([c("font-size",Xl($.sizeXs)),c("color",Xl(y.brand)),Ce("pointer"),c("text-decoration","none"),$n(0)]);function z0e(e){return L("div",{children:[b("span",{children:"[locked]",className:O0e}),b("span",{children:e.label,className:M0e}),b("span",{children:"Upgrade",className:L0e})],className:P0e})}let U0e=z0e;function B0e(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function Ln(e){return"var("+e+")"}let j0e=w([z("flex"),ve("column"),c("gap","2px"),c("padding","var("+I.sm+")"),lr("& a",[c("text-decoration","none"),c("color","inherit"),c("display","block"),c("outline-offset","2px")])]),q0e=w([c("color",Ln(y.textDisabled)),c("font-size",Ln($.sizeXs)),c("font-weight",Ln($.weightBold)),c("letter-spacing","0.08em"),c("text-transform","uppercase"),c("padding","var("+I.xs+") var("+I.sm+")"),Yo(Re(12)),Jh(Re(2))]),J$=w([Ft("relative"),z("flex"),X("center"),c("gap",Ln(I.sm)),c("padding","6px var("+I.sm+") 6px 14px"),c("color",Ln(y.textSecondary)),c("font-size",Ln($.sizeMd)),c("line-height","1.4"),Ce("pointer"),c("border-radius",Ln(Y.md)),c("text-decoration","none"),c("transition","background-color 140ms ease, color 140ms ease, transform 140ms ease"),lr("&::before",[c("content","''"),Ft("absolute"),c("left","4px"),c("top","50%"),c("width","3px"),c("height","0"),c("border-radius",Ln(Y.full)),c("background",Ln(y.brand)),c("transform","translateY(-50%)"),c("transition","height 160ms ease")]),je([c("background",Ln(y.surfaceSubtle)),c("color",Ln(y.textPrimary)),c("transform","translateX(2px)")]),wS("(prefers-reduced-motion: reduce)",[c("transition","none"),je([c("transform","none")]),lr("&::before",[c("transition","none")])])]),V0e=w([c("background",Ln(y.brandSubtle)),c("color",Ln(y.textPrimary)),c("font-weight",Ln($.weightMedium)),lr("&::before",[c("height","56%")]),je([c("background",Ln(y.brandSubtle)),c("color",Ln(y.textPrimary)),c("transform","none")])]),G0e=w([c("font-size","14px"),c("line-height","1"),$n(0)]),K0e=w([c("white-space","nowrap"),c("overflow","hidden"),c("text-overflow","ellipsis")]),H0e=w([c("font-size","12px"),c("color",Ln(y.textDisabled)),Wh("auto"),$n(0)]);function W0e(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function J0e(e){let t=e.hasAccess,r=e.isActive,n=e.page,i=fe(n.requiredAccess,!1,l=>!t(l)),o=r?J$+" "+V0e:J$,a=L(Lr,{children:[fe(n.menuEntry.icon,null,l=>b("span",{children:l,"aria-hidden":!0,className:G0e})),b("span",{children:n.menuEntry.label,className:K0e}),i?b("span",{children:"[locked]",className:H0e}):null]}),s=n.url;return!i&&s!==void 0?b(k0e,{route:s,children:b("span",{children:a,"aria-current":r?"page":void 0,className:o})}):b("div",{children:a,className:o,role:"button"})}function Q$(e){let t=e.hasAccess,r=e.currentUrl,n=e.pages.toSorted((i,o)=>dS(i.menuEntry.sortOrder,o.menuEntry.sortOrder));return L(Lr,{children:[fe(e.label,null,i=>b("div",{children:i,className:q0e})),n.map(i=>b(J0e,{page:i,isActive:W0e(i,r),hasAccess:t},i.fragmentId))]})}function Q0e(e){let t=e.currentUrl,r=S8(),n=Tl(),i=r.filter(w8),o={};i.forEach(l=>{let u=F(l.menuEntry.group,""),d=F(o[u],[]);o[u]=d.concat([l])});let a=F(o[""],[]),s=Object.entries(o).filter(l=>l[0]!=="").toSorted((l,u)=>{let d=nt(l[1],999,(h,p)=>h<p.menuEntry.sortOrder?h:p.menuEntry.sortOrder),f=nt(u[1],999,(h,p)=>h<p.menuEntry.sortOrder?h:p.menuEntry.sortOrder);return dS(d,f)});return L("nav",{children:[a.length!==0?b(Q$,{label:void 0,pages:a,currentUrl:t,hasAccess:n}):null,s.map(l=>{let u=l[1],d=l[0];switch(B0e(u,n)){case"Active":return b(Q$,{label:d,pages:u,currentUrl:t,hasAccess:n},d);case"Locked":return b(U0e,{label:d},d);case"Absent":return null}})],"aria-label":"primary navigation",className:j0e})}let Y0e=Q0e,k8=ar(void 0),X0e=k8.Provider;function Z0e(e){return br(X0e,{value:e.target,children:e.children})}let ege={make:Z0e};function tge(){return At(k8)}function Y$(e,t){return e!==void 0?bI(t,zt(e)):t}function po(e){return"var("+e+")"}let C8="52px",rge=w([z("flex"),ve("row"),HI({NAME:"vh",VAL:100}),c("overflow","hidden"),c("background",po(y.background)),c("font-family",po($.fontFamily)),c("color",po(y.textPrimary))]),nge=w([z("flex"),ve("column"),c("width","236px"),$n(0),c("background",po(y.surface)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden")]),ige=w([z("flex"),X("center"),c("gap",po(I.sm)),c("height",C8),$n(0),c("padding","0 var("+I.md+")"),c("color",po(y.textPrimary)),c("font-size",po($.sizeLg)),c("font-weight",po($.weightBold)),c("letter-spacing","-0.01em")]),oge=w([c("white-space","nowrap"),c("overflow","hidden"),c("text-overflow","ellipsis")]),age=w([Vn(1),c("overflow-y","auto"),c("min-height","0")]),sge=w([z("flex"),ve("column"),Vn(1),c("min-width","0"),c("overflow","hidden")]),lge=w([z("flex"),X("center"),c("flex-wrap","nowrap"),c("gap",po(I.md)),c("min-height",C8),$n(0),c("padding","var("+I.xs+") var("+I.lg+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("background",po(y.surface))]),uge=w([z("flex"),X("center"),Vn(1),c("min-width","0")]),cge=w([z("flex"),X("center"),c("gap",po(I.sm)),$n(0),c("margin-left","auto")]),dge=w([z("flex"),ve("column"),Vn(1),c("overflow","auto"),c("padding","var("+I.md+") var("+I.lg+")"),c("background",po(y.background))]);function fge(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",a=n!==void 0?n:"404 — Page not found",s=r!==void 0?r:!0,l=t!==void 0?t:null,u=KB(),d=de(()=>{}),f=d[1],h=p=>{let m=p==null?void 0:Gt(p);f(g=>g!==void 0&&p!=null&&zt(g)===p?g:m)};return L("div",{children:[L("aside",{children:[L("div",{children:[fe(e.logoUrl,null,p=>b("img",{style:{height:"22px"},alt:o,src:p})),b("span",{children:o,className:oge,title:o})],className:ige}),b("div",{children:b(Y0e,{currentUrl:u}),className:age})],className:nge}),L("main",{children:[L("div",{children:[b("div",{ref:Gt(h),className:uge}),fe(e.headerSlot,null,p=>b("div",{children:p,className:cge}))],className:lge}),b("div",{children:b(ege.make,{target:d[0],children:s?b(S0e,{url:u,routes:e.router,children:a}):l}),className:dge})],className:sge})],className:rge})}let hge=fge,gp=ar(void 0),pge=gp.Provider;function mge(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=de(()=>n),a=o[1],s=de(()=>[]),l=s[1],u=o[0].concat(s[0]);return br(pge,{value:{register:_=>a(x=>x.concat(_)),deregister:_=>a(x=>x.filter(S=>S.extensionPackage!==_)),setPluginPanels:_=>l(x=>_),getPanel:_=>u.find(x=>x.fragmentId===_),getPanelsForPosition:_=>u.filter(x=>x.positions.some(S=>S===_)),hasAccess:_=>i.some(x=>x===_)},children:e.children})}let gge={make:mge};function vge(e){let t=At(gp);return t!==void 0?t.getPanelsForPosition(e):[]}function _ge(e){let t=At(gp);if(t!==void 0)return t.getPanel(e)}function n2(e){return"/"+e.environment+"/"+e.platformName}function R8(e){let t=e.split("?")[0],r=t.split("/").filter(l=>l!==""),n=r[0],i=r[1];if(n===void 0||i===void 0)return;let o={environment:n,platformName:i},a=n2(o),s=t.startsWith(a)?t.slice(a.length):"/";return[o,s===""?"/":s]}let bge=ar(void 0),yge=bge.Provider;function xge(e){return br(yge,{value:e.scope,children:e.children})}let A8={make:xge};function Sge(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}let T8=ar(void 0),$8=ar({routes:[],publicLinks:cu()}),N8=ar(!1),wge=T8.Provider;function Ege(e){return br(wge,{value:e.value,children:e.children})}let kge=$8.Provider;function Cge(e){return br(kge,{value:e.value,children:e.children})}let Rge=N8.Provider;function Age(e){return br(Rge,{value:e.value,children:e.children})}function Tge(e){let t=de(()=>({routes:[],publicLinks:cu()})),r=t[1],n=t[0],i=de(()=>({routes:[],publicLinks:cu()})),o=i[1],a=i[0],s=de(()=>!1),l=s[1],u=n.routes.concat(a.routes),d=i1(n.publicLinks,a.publicLinks),f={routes:u,publicLinks:d};return b(Ege,{value:{register:(g,v)=>r(_=>({routes:_.routes.concat(g),publicLinks:i1(_.publicLinks,v)})),setPluginRoutes:(g,v)=>{o(_=>({routes:g,publicLinks:v})),l(_=>!0)}},children:b(Age,{value:s[0],children:b(Cge,{value:f,children:b(wj.make,{registry:d,children:e.children})})})})}let $ge={make:Tge};function i2(){return At(T8)}function Nge(){return At(N8)}function Dge(){let e=At($8).routes;return Nt(()=>mj(Sge(e.toReversed())),[e])}function cf(e){return"var("+e+")"}let Fge=w([c("background",cf(y.surface)),c("color",cf(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",cf(Y.sm)),c("padding","4px 8px"),c("font-size",cf($.sizeSm)),c("font-family",cf($.fontFamily)),Ce("pointer")]);function Ige(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}let Pge=["Light","Dark","Neutral","HighContrast"];function Oge(e){let t=sse(),r=t.setPreset,n=i=>{let o=i.target.value;r(bL(o))};return b("select",{children:Pge.map(i=>{let o=ux(i);return b("option",{children:Ige(i),value:o},o)}),className:Fge,value:ux(t.preset),onChange:n})}let Mge=Oge;function X$(e){return Object.fromEntries([["eq",e]])}function Lge(e,t){let r=me.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=C(n.filter,me.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=X$(t.environment),o.platformName=X$(t.platformName),n.filter=o,n}let zge=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,Uge=/\$filter\s*:/,Z$={};function Bge(e){if(Z$[e]===void 0){Z$[e]=!0,console.warn("PlatformFilter: this query declares a `$filter` variable that is not a fleet-scope `<Type>Filter` input object, so it is left untouched. `$filter` is reserved for platform-scope injection in fleet mode — rename the variable (e.g. `$logFilter`) to avoid ambiguity. Query: "+e);return}}function jge(e){return t=>((r,n)=>zge.test(r)?t(r,Lge(n,e)):(Uge.test(r)&&Bge(r),t(r,n)))}let qge={background:"var("+y.surface+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+$.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+Y.md+")"},Vge={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+$.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")",alignItems:"center",justifyContent:"space-between"},Gge={background:"var("+y.brandSubtle+")",color:"var("+y.brand+")",fontSize:"var("+$.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+Y.full+")"};function Kge(e){let t=e.discover,r=hi(),n=de(()=>"Loading"),i=n[1],o=n[0];$e(()=>{r!==void 0?(i(s=>"Loading"),$t(t(r).then(s=>i(l=>({TAG:"Loaded",_0:s}))),s=>{let l=F(C(RB(s),u=>u.message),"Platform discovery failed");return i(u=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(s=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[De(r)]);let a;if(typeof o!="object")a=b("div",{children:"Discovering platforms…",style:{color:"var("+y.textSecondary+")"}});else if(o.TAG==="Loaded"){let s=o._0;a=s.length!==0?s.map(l=>L("button",{children:[l.platformName,b("span",{children:l.environment,style:Gge})],style:Vge,onClick:u=>cs(n2(l)+"/")},l.environment+"/"+l.platformName)):b("div",{children:"No platforms discovered.",style:{color:"var("+y.textSecondary+")"}})}else a=b("div",{children:o._0,style:{color:"var("+y.error+")",fontSize:"var("+$.sizeSm+")"}});return L("div",{children:[b("h1",{children:"Select a platform",style:{fontSize:"var("+$.sizeXl+")",fontWeight:"var("+$.weightBold+")",margin:"0 0 1.5rem"}}),a],style:qge})}let Hge=Kge;function Wge(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function Jge(e){let t=me.object(e);if(t===void 0)return;let r=s=>C(t[s],me.string),n=t.state,i=n!==void 0&&De(me.object(n))?n:void 0,o=C(r("changeKind"),Wge),a=r("id");if(o!==void 0&&a!==void 0)return{changeKind:o,id:a,sortKeyValue:r("sortKeyValue"),state:i,seq:r("seq")}}function eN(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let tN="default";function Qge(e,t){let r=eN(e);return typeof t!="object"?"/"+tN+"/"+r+"/*":"/"+tN+"/"+r+"/"+eN(t._0)}function Ex(e,t,r,n,i){let o=r!==void 0?r:!0,a=yv(),s=Qge(e,t),l=Fe(n);$e(()=>{l.current=n},[n]);let u=Fe(i);$e(()=>{u.current=i},[i]),$e(()=>{if(!o||a===void 0)return;let d=a.apiForReadModel(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let m=a.subscribe(d,s,v=>{let _=Jge(v);if(_!==void 0)return l.current(_)});f.contents=m;let g=a.registerReconnect(d,()=>re(u.current,v=>v()));h.contents=g},100);return()=>{clearTimeout(p);let m=f.contents;m!==void 0&&m();let g=h.contents;if(g!==void 0)return g()}},[s,o,a])}function pa(e){return C(C(H(e),t=>M(t,"id")),ce)}function D8(e){return F(G(C(C(H(e),t=>M(t,"properties")),H),t=>Object.keys(t)),[])}function Kf(e,t){return C(H(e),r=>M(r,t))}function Yge(e,t,r,n){let i=n!==void 0?n:[],o=H(e),a=H(t);if(o===void 0||a===void 0)return e;let s=Ye(Pe(o));return r.filter(l=>!i.includes(l)).forEach(l=>{let u=M(a,l),d=M(o,l);if(u!==void 0){s[l]=u;return}else if(d!==void 0){s[l]=null;return}else return}),s}function F8(e){return e.startsWith("__")?!0:e.startsWith("$")}function Xge(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")?!0:r>3?t.endsWith("ids"):!1}let I8="$offload";function kx(e){let t=et(e);if(typeof t!="object")return!1;switch(t.TAG){case"JSONObject":let r=t._0;return De(M(r,I8))?!0:Kh(r).some(kx);case"JSONArray":return t._0.some(kx);default:return!1}}function Cx(e){let t=et(e);if(typeof t=="object")switch(t.TAG){case"JSONObject":let r=t._0,n=C(M(r,I8),H);if(n===void 0)return nt(Kh(r),void 0,(o,a)=>Aa(o,Cx(a)));let i=C(M(n,"hash"),ce);return i!==void 0?i:C(M(n,"key"),ce);case"JSONArray":return nt(t._0,void 0,(o,a)=>Aa(o,Cx(a)));default:return}}function P8(e,t){return ee(t,r=>G(C(Kf(e,r),Cx),n=>[r,n]))}function Zge(e,t,r,n){let i=n!==void 0?n:[],o=r.some(l=>i.includes(l)?!1:fe(Kf(t,l),!1,kx)),s=fe(H(e),!1,l=>Object.keys(l).some(u=>F8(u)?!1:!r.includes(u)))&&r.some(l=>Xge(l)?Jc(Kf(e,l),Kf(t,l)):!1);return o?!1:!s}let rN=new Map;function eve(e,t){let r=fe(H(e),[],i=>Object.keys(i).filter(o=>F8(o)?!1:!t.includes(o)));if(r.length===0)return;let n=r.join(",");if(Wr(rN.get(n))){rN.set(n,!0),console.warn("AutoLiveApply: the live-update payload carries fields the state schema does not declare ("+n+") — they will not be merged. The persisted manifest is likely behind the deployed projection.");return}}function tve(e,t,r,n){return ee(P8(t,r),i=>{let o=i[1],a=i[0],s=n.some(u=>u[0]===a?u[1]===o:!1),l=fe(Kf(e,a),!1,u=>et(u)!=="JSONNull");if(s&&l)return a})}function O8(e,t,r,n){let i=n!==void 0?n:[],o=t.state;if(o===void 0)return;let a=D8(r);if(a.length===0)return;eve(o,a);let s=tve(e,o,a,i),l=Yge(e,o,a,s);if(Zge(e,l,a,s))return l}function rve(e,t){return O8({},e,t,void 0)}let nve=/^[0-9]+$/;function nN(e){if(!nve.test(e))return;let t=e.length,r=n=>{for(;;){let i=n;if(!(i<(t-1|0)&&Ne(e[i],"0")))return i;n=i+1|0}};return e.slice(r(0))}function ive(e,t){let r=nN(e),n=nN(t);if(r===void 0||n===void 0)return!0;let i=r.length,o=n.length;return i===o?r>n:i>o}function ove(){return new Map}function M8(e,t,r){if(r===void 0)return!0;let n=e.get(t);return n!==void 0?ive(r,n):!0}function ave(e,t,r){if(r!==void 0&&M8(e,t,r)){e.set(t,r);return}}let Qa={make:ove,shouldApply:M8,record:ave};function sve(){return new Map}function L8(e,t){return F(e.get(t),[])}function z8(e,t,r){if(r.length!==0){e.set(t,r);return}}function lve(e,t,r,n){let i=O8(t,r,n,L8(e,r.id)),o=r.state;return o!==void 0&&z8(e,r.id,P8(o,D8(n))),i}let Ac={make:sve,known:L8,record:z8,apply:lve};function U8(e,t,r,n,i,o){let a=t!==void 0?t:{},s=r!==void 0?r:"",l=n!==void 0?n:!0,u=i!==void 0?i:()=>{},d=hi(),f=dp(),h=de(()=>[]),p=h[1],m=de(()=>rL),g=m[1],v=m[0],_=de(()=>"Loading"),x=_[1],S=de(()=>0),E=S[1],k=de(()=>1),R=k[1],T=k[0],A=f!==void 0?(N,P)=>f(N,P).then(O=>[O.data,CL(O,e.queryField)]):d!==void 0?(N,P)=>d(N,P).then(O=>[O,void 0]):void 0;return $e(()=>{if(l)if(A!==void 0){x(P=>"Loading"),u();let N;if(o!==void 0){let P=Ye(fe(H(a),[],Pe));P.first=o*T|0,N=P}else N=a;$t(A(e.queryDocument,N).then(P=>{let O=P[1],D=P[0];return O!==void 0?x(U=>({TAG:"Refused",_0:O.message})):(p(U=>Uw(D,e.queryField)),g(U=>oL(D,e.queryField)),x(U=>"Loaded")),Promise.resolve()}),P=>(x(O=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else x(N=>({TAG:"Error",_0:"Not connected"}));else x(N=>"Loaded")},[S[0],s,l,T]),{rows:h[0],setRows:p,pageInfo:v,fetchState:_[0],refetch:()=>E(N=>N+1|0),loadMore:()=>R(N=>N+1|0),canLoadMore:v.hasNextPage}}function Ru(e,t,r){let n=t!==void 0?t:!0,o=U8(e,void 0,void 0,n,void 0,50),a=Fe(void 0),s=Fe(Qa.make()),l=Fe(Ac.make()),u=()=>{let p=a.current;p!==void 0&&clearTimeout(p),a.current=setTimeout(()=>{a.current=void 0,o.refetch()},250)},d=p=>{if(!Qa.shouldApply(s.current,p.id,p.seq))return;Qa.record(s.current,p.id,p.seq);let m=p.changeKind,g;return g=m==="Updated"?C(o.rows.find(v=>Ne(pa(v),p.id)),v=>Ac.apply(l.current,v,p,e.schema)):void 0,g!==void 0?o.setRows(v=>v.map(_=>Ne(pa(_),p.id)?g:_)):u()},f=yv(),h=n&&fe(f,!1,p=>p.isLive(e.queryField));return Ex(e.queryField,"All",h,d,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:h,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let uve=50,cve="The server did not confirm this command. It may not have been applied.";function B8(e){let t=C(C(H(e),n=>Kh(n)[0]),H),r=C(C(t,n=>M(n,"__typename")),ce);if(r===void 0)return{TAG:"NotExecuted",_0:cve};switch(r){case"CommandAccepted":return"Accepted";case"CommandPending":return"Pending";case"CommandRejected":let n=C(C(t,o=>M(o,"errorCode")),ce),i=C(C(t,o=>M(o,"errorDetail")),ce);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return{TAG:"NotExecuted",_0:"The server answered with an unexpected result type ("+r+")."}}}function dve(e){let t=B8(e.data);if(typeof t!="object"||t.TAG!=="NotExecuted")return t;let r=t._0,n=e.errors[0];return n!==void 0&&n.message!==""?{TAG:"NotExecuted",_0:n.message}:{TAG:"NotExecuted",_0:r}}function ia(e,t){let r=M(e,t);if(r===void 0)return;let n=ce(r);return n!==void 0?n:C(C(H(r),i=>M(i,"TAG")),ce)}function j8(e,t,r){if(r===void 0)return e;let n=ia(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function q8(e,t){return t!==void 0?(r,n)=>t(r,n).then(dve):e!==void 0?(r,n)=>e(r,n).then(B8):void 0}function vp(){let e=hi(),t=dp();return q8(e,t)}let iN=["message","body","text","title","content"],V8=["userId","recipientId","recipient","user","targetUserId"],fve=["createdAt","sentAt","notifiedAt","at","timestamp"],hve=["read","isRead","seen","acknowledged"];function o2(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function G8(e){return ee(Dr(e),t=>{if(Yh(t[1]))return t[0]})}function K8(e,t){return G8(e).find(r=>o2(r,t))}function pve(e){let t=K8(e,V8);if(t!==void 0)return t;let r=jn(e,void 0,void 0);return Dr(e).map(n=>n[0]).find(n=>fe(M(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function mve(e){return ee(Dr(e),t=>{if(Gg(t[1]))return t[0]}).find(t=>o2(t,fve))}function gve(e){return ee(Dr(e),t=>{if(Ne(JH(t[1]),"boolean"))return t[0]}).find(t=>o2(t,hve))}function vve(e,t){return ee(G8(e),r=>{let n=r.toLowerCase();if(!(r===t||n==="id"||!n.endsWith("id")))return{field:r,stem:r.slice(0,r.length-2|0)}})}function _ve(e){return fe(C(H(e),t=>M(t,"x-reventless-notifications")),!1,t=>{let r=et(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let bve=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function yve(e,t){let r=ee(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>bve.some(i=>n.name.toLowerCase().startsWith(i)))}let oN={contents:[]};function aN(e,t,r){if(!oN.contents.includes(e)){oN.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as notifications but has no '+t+" field — no notification bell is wired. The convention expects a string field named "+r.join(" | ")+"; see docs/guides/notifications-read-model-convention.md.");return}}function xve(e){return ee(e.readModels.filter(t=>_ve(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=K8(t.schema,iN),n=pve(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:mve(t.schema),readField:gve(t.schema),refFields:vve(t.schema,n),markReadCommand:yve(t,e)};aN(t.name,"recipient",V8);return}else{aN(t.name,"message",iN);return}})[0]}function Tc(e,t){return C(M(e,t),ce)}function Sve(e,t,r){let n=Tc(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function dg(e,t){return C(C(t.timestampField,r=>Tc(e,r)),qn)}function wve(e,t,r){let n=t.readField;if(n!==void 0){let o=G(M(e,n),et);return o==="JSONTrue"&&typeof o!="object"}let i=dg(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function Eve(e,t,r,n){return ee(t,i=>{let o=F(H(i),{});if(Sve(o,e,r))return o}).toSorted((i,o)=>{let a=dg(i,e),s=dg(o,e);return a!==void 0?s!==void 0?s-a:-1:s!==void 0?1:0}).map((i,o)=>({id:F(Tc(i,"id"),"#"+o.toString()),message:F(Tc(i,e.messageField),""),timestamp:C(e.timestampField,a=>Tc(i,a)),read:wve(i,e,n),refs:ee(e.refFields,a=>G(Tc(i,a.field),s=>[a.stem,s]))}))}function kve(e,t){return nt(t,void 0,(r,n)=>{let i=F(H(n),{}),o=dg(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function Cve(e,t){let r=F(C(e.markReadCommand,n=>n.aggregateIdField),"id");return Ye([[r,t]])}function Rve(e,t){let r=e.length,n=t.length,i=xI((r+1|0)*(n+1|0)|0,0),o=(u,d)=>i[(u*(n+1|0)|0)+d|0];for(let u=0;u<r;++u)for(let d=0;d<n;++d)i[((u+1|0)*(n+1|0)|0)+(d+1|0)|0]=e[u]===t[d]?o(u,d)+1|0:o(u,d+1|0)>o(u+1|0,d)?o(u,d+1|0):o(u+1|0,d);let a=[],s=r,l=n;for(;s>0||l>0;){let u=e[s-1|0],d=t[l-1|0];s>0&&l>0&&u===d?(a=[{kind:"Unchanged",text:u}].concat(a),s=s-1|0,l=l-1|0):l>0&&(s===0||o(s,l-1|0)>=o(s-1|0,l))?(a=[{kind:"Added",text:d}].concat(a),l=l-1|0):(a=[{kind:"Removed",text:u}].concat(a),s=s-1|0)}return a}function Zl(e){return"var("+e+")"}let Ave=w([c("font-family",Zl($.fontFamilyMono)),c("font-size",Zl($.sizeSm)),c("line-height",Zl($.lineHeightNormal)),c("border","1px solid var("+y.border+")"),c("border-radius",Zl(Y.md)),xs("auto")]),Fb=w([z("flex"),c("padding","1px var("+I.md+")")]),Tve=w([c("background","rgba(248,81,73,0.12)"),c("color",Zl(y.error))]),$ve=w([c("background","rgba(63,185,80,0.12)"),c("color",Zl(y.success))]),Nve=w([c("color",Zl(y.textSecondary))]),Dve=w([c("width","16px"),$n(0),c("user-select","none"),WI(Re(8))]);function Fve(e){let t=e.before.split(`
66
+ `),r=e.after.split(`
67
+ `),n=Rve(t,r);return b("div",{children:n.map((i,o)=>{let a=i.kind,s;switch(a){case"Removed":s=[Fb+" "+Tve,"-"];break;case"Added":s=[Fb+" "+$ve,"+"];break;case"Unchanged":s=[Fb+" "+Nve," "];break}return L("div",{children:[b("span",{children:s[1],className:Dve}),b("span",{children:i.text})],className:s[0]},o.toString())}),className:Ave})}let Ive=Fve;function kv(e,t){let r=new Date(t).getTime();if(Number.isNaN(r))return t;let n=(e-r)/1e3;return n<45?"just now":n<3600?Math.floor(n/60).toString()+"m ago":n<86400?Math.floor(n/3600).toString()+"h ago":n<1209600?Math.floor(n/86400).toString()+"d ago":t.slice(0,10)}function ui(e){return"var("+e+")"}let Pve=w([z("flex"),ve("column"),c("gap","2px"),c("font-family",ui($.fontFamily)),c("font-size",ui($.sizeSm))]),sN=w([z("flex"),X("flexStart"),c("gap","10px"),c("padding",ui(I.xs)+" "+ui(I.sm)),c("border-radius",ui(Y.sm))]),Ove=w([Ce("pointer"),je([c("background",ui(y.surfaceSubtle))])]),Mve=w([z("flex"),ve("column"),c("gap","2px"),c("min-width","0"),c("flex","1")]),Lve=w([c("color",ui(y.textPrimary))]),zve=w([c("font-weight",ui($.weightMedium))]),Uve=w([c("color",ui(y.textSecondary))]),Bve=w([z("inlineFlex"),X("center"),c("gap","6px"),c("color",ui(y.textSecondary)),c("font-size",ui($.sizeXs)),c("white-space","nowrap")]),jve=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("flex-shrink","0")]),qve=w([c("background","none"),c("border","none"),c("padding","0"),c("color",ui(y.brand)),c("font-size",ui($.sizeXs)),Ce("pointer"),c("text-align","left"),je([c("text-decoration","underline")])]),Vve=w([c("margin-top","4px"),c("max-width","560px")]),Gve=w([c("color",ui(y.textSecondary)),c("padding",ui(I.md)),Fa("center")]);function Kve(e){let t=e.onClick,r=e.entry,n=de(()=>!1),i=n[1],o=n[0],a=De(r.before)&&De(r.after),s=F(r.actor,r.subject),l=t!==void 0?sN+" "+Ove:sN,u=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[b(bd,{name:s,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[u!==void 0?b("span",{children:u+" ",className:zve}):null,b("span",{children:r.verb+" ",className:Uve}),r.subject],className:Lve}),L("span",{children:[d!==void 0?b("span",{className:jve,style:{background:d}}):null,f!==void 0?kv(e.nowMs,f):null],className:Bve}),a?b("button",{children:o?"Hide changes":"Show changes",className:qve,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&a?b("div",{children:b(Ive,{before:F(r.before,""),after:F(r.after,"")}),className:Vve}):null],className:Mve})],className:l,onClick:h=>re(t,p=>p(r))})}function Hve(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",a=t!==void 0?t:Date.now();return i.length===0?b("div",{children:o,className:Gve}):b("div",{children:i.map(s=>b(Kve,{entry:s,nowMs:a,onClick:r},s.id)),className:Pve})}let Wve=Hve;function Mt(e){return"var("+e+")"}let Jve=w([Ft("relative"),z("inlineBlock")]),Qve=w([Ft("relative"),z("inlineFlex"),X("center"),Xe("center"),c("background","none"),c("border","none"),c("border-radius",Mt(Y.md)),c("cursor","pointer"),c("color",Mt(y.textSecondary)),c("padding","6px"),je([c("background",Mt(y.surfaceSubtle)),c("color",Mt(y.textPrimary))])]),Yve=w([Ft("absolute"),Ss(Re(0)),Rl(Re(0)),z("inlineFlex"),X("center"),Xe("center"),c("min-width","16px"),c("height","16px"),c("padding","0 4px"),c("border-radius",Mt(Y.full)),c("background",Mt(y.brand)),c("color",Mt(y.textOnBrand)),c("font-family",Mt($.fontFamily)),c("font-size","10px"),c("font-weight",Mt($.weightBold)),c("line-height","1")]),Xve=w([Ft("absolute"),Rl(Re(0)),Ss({NAME:"percent",VAL:100}),Yo(Re(4)),c("width","320px"),c("background",Mt(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",Mt(Y.md)),c("box-shadow",Mt(kn.md)),c("z-index","200"),c("overflow","hidden"),c("font-family",Mt($.fontFamily))]),Zve=w([z("flex"),X("center"),Xe("spaceBetween"),c("padding","var("+I.sm+") var("+I.md+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",Mt(y.textSecondary)),c("font-size",Mt($.sizeSm)),c("font-weight",Mt($.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),e_e=w([c("background","none"),c("border","none"),c("color",Mt(y.brand)),c("font-size",Mt($.sizeXs)),c("text-transform","none"),c("letter-spacing","0"),Ce("pointer"),je([c("text-decoration","underline")])]),t_e=w([c("max-height","360px"),c("overflow-y","auto")]);function r_e(e){return w([z("flex"),X("flexStart"),c("gap",Mt(I.sm)),c("width","100%"),c("background","none"),c("border","none"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("text-align","left"),c("padding","var("+I.sm+") var("+I.md+")"),Ce(e?"pointer":"default"),je(e?[c("background",Mt(y.surfaceSubtle))]:[])])}function n_e(e){return w([c("width","8px"),c("height","8px"),c("border-radius",Mt(Y.full)),c("margin-top","5px"),c("flex-shrink","0"),c("background",e?"transparent":Mt(y.brand))])}let i_e=w([z("flex"),ve("column"),c("gap","2px"),c("min-width","0")]);function o_e(e){return w([c("color",Mt(y.textPrimary)),c("font-size",Mt($.sizeSm)),c("font-weight",Mt(e?$.weightNormal:$.weightMedium)),c("line-height",Mt($.lineHeightNormal)),c("word-break","break-word")])}let a_e=w([c("color",Mt(y.textDisabled)),c("font-size",Mt($.sizeXs))]),s_e=w([c("color",Mt(y.textDisabled)),c("font-size",Mt($.sizeSm)),c("padding",Mt(I.md)),c("text-align","center")]);function l_e(e){return L("svg",{children:[b("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),b("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],"aria-hidden":!0,height:"18",width:"18",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24"})}function u_e(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,a=e.onOpen,s=e.notifications,l=n!==void 0?n:"No notifications",u=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=de(()=>u),h=f[1],p=f[0],m=s.filter(v=>!v.read).length;$e(()=>{if(!p)return;let v=x=>h(S=>!1),_=x=>{if(x.key==="Escape")return h(S=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",_),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",_)}},[p]);let g=()=>{let v=!p;v&&re(i,_=>_()),h(_=>v)};return L("div",{children:[L("button",{children:[b(l_e,{}),m>0?b("span",{children:m>99?"99+":m.toString(),className:Yve}):null],"aria-label":m>0?"Notifications ("+m.toString()+" unread)":"Notifications",className:Qve,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),g()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&m>0?b("button",{children:"Mark all read",className:e_e,type:"button",onClick:v=>o()}):null],className:Zve}),s.length===0?b("div",{children:l,className:s_e}):b("div",{children:s.map(v=>{let _=v.timestamp;return L("button",{children:[b("span",{className:n_e(v.read)}),L("span",{children:[b("span",{children:v.message,className:o_e(v.read)}),_!==void 0?b("span",{children:kv(d,_),className:a_e}):null],className:i_e})],className:r_e(De(a)),type:"button",onClick:x=>{re(a,S=>S(v)),h(S=>!1)}},v.id)}),className:t_e})],className:Xve,onClick:v=>{v.stopPropagation()}}):null],className:Jve})}let c_e=u_e,H8=ar([]),W8=ar(e=>{}),d_e=H8.Provider,f_e=W8.Provider;function h_e(e){let t=e.initial,r=t!==void 0?t:[],n=de(()=>r),i=n[1],o=tn(a=>i(s=>a),[]);return br(f_e,{value:o,children:br(d_e,{value:n[0],children:e.children})})}let p_e={make:h_e};function m_e(){return At(H8)}function g_e(){return At(W8)}function J8(e){return"autoui.notifications.seen."+e}function v_e(e){let t=localStorage.getItem(J8(e));if(t!=null)return fs(t)}function __e(e,t){localStorage.setItem(J8(e),t.toString())}function b_e(e){let t=e.onData,r=Ru(e.binding.readModel,void 0);return $e(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function y_e(e){let t=m_e(),r=La(),n=hi(),i=vp(),o=Ia(),a=Cl(),s=de(()=>({})),l=s[1],u=s[0],f=de(()=>0)[1],h=k=>(R=>l(T=>{let A=Ye(Pe(T));return A[k]=R,A})),p=G(C(r,k=>k.identity),k=>({userId:k.userId,username:k.username})),m=t.flatMap(k=>{let R=fe(M(u,k.pluginId),[],T=>T.rows);return Eve(k.binding,R,p,v_e(k.pluginId)).map(T=>({key:k.pluginId+":"+T.id,appBinding:k,entry:T}))}).toSorted((k,R)=>{let T=C(k.entry.timestamp,qn),A=C(R.entry.timestamp,qn);return T!==void 0?A!==void 0?A-T:-1:A!==void 0?1:0}),g=(k,R)=>{let T=k.binding.markReadCommand;if(T!==void 0&&i!==void 0){$t(i(T.mutationDocument,Cve(k.binding,R)).then(A=>{if(typeof A!="object"){let N=k.pluginId;return re(M(u,N),P=>P.refetch())}A.TAG!=="Rejected"&&console.error("[AutoUI] notification markRead not executed — "+A._0)}),A=>Promise.resolve());return}},v=k=>re(m.find(R=>R.key===k.id),R=>{R.entry.read||g(R.appBinding,R.entry.id);let T=R.entry;re(WB(T.refs,A=>{let N=A[1];return G(Es(o,A[0]),P=>[P,N])}),A=>{let N=A[0];a(ps(N.pluginId,N.name,A[1],[]))})}),_=De(n)&&t.some(k=>De(k.binding.markReadCommand)),x=()=>{m.forEach(k=>{if(!k.entry.read)return g(k.appBinding,k.entry.id)})},S=()=>{t.forEach(k=>{let R=fe(M(u,k.pluginId),[],T=>T.rows);re(kve(k.binding,R),T=>__e(k.pluginId,T))}),f(k=>k+1|0)},E=m.map(k=>({id:k.key,message:k.entry.message,timestamp:k.entry.timestamp,read:k.entry.read}));return t.length===0?null:L(Lr,{children:[t.map(k=>b(b_e,{binding:k.binding,onData:h(k.pluginId)},k.pluginId)),b(c_e,{notifications:E,onOpen:v,onMarkAllRead:_?x:void 0,onPanelOpen:S})]})}let x_e=y_e;function S_e(e,t,r){if(e===void 0)return!0;let n=t.toLowerCase(),i=r.toLowerCase();return e.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o!=="").some(o=>o.startsWith(".")?n.endsWith(o):o.endsWith("/*")?i.startsWith(o.slice(0,o.length-1|0)):i===o)}function w_e(e){let t=["B","KB","MB","GB"],n=((s,l)=>{for(;;){let u=l,d=s;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function E_e(e,t){if(e)return[t,!1];let r=t.slice(0,1);return[r,r.length!==0]}function un(e){return"var("+e+")"}let lN=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap","6px"),c("padding",un(I.lg)),c("border","2px dashed var("+y.border+")"),c("border-radius",un(Y.md)),c("color",un(y.textSecondary)),c("font-family",un($.fontFamily)),c("font-size",un($.sizeSm)),Ce("pointer"),c("transition","border-color 120ms, background 120ms"),Fa("center")]),k_e=w([c("border-color",un(y.brand)),c("background",un(y.brandSubtle))]),C_e=w([c("font-size",un($.sizeXs))]),R_e=w([z("flex"),X("center"),c("gap","8px"),c("padding",un(I.xs)+" 0"),c("font-family",un($.fontFamily)),c("font-size",un($.sizeSm)),c("color",un(y.textPrimary))]),A_e=w([c("flex","1"),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),T_e=w([c("color",un(y.textSecondary)),c("font-size",un($.sizeXs)),c("white-space","nowrap")]),$_e=w([c("color",un(y.success))]),uN=w([c("color",un(y.error))]),N_e=w([c("width","120px")]),D_e=w([c("flex","0 0 auto"),c("border","none"),c("background","transparent"),c("padding","0 4px"),c("color",un(y.textSecondary)),c("font-size",un($.sizeMd)),mK({NAME:"abs",VAL:1}),Ce("pointer")]),F_e=w([c("width","40px"),c("height","40px"),c("flex","0 0 auto"),c("object-fit","cover"),c("border-radius",un(Y.sm)),c("border","1px solid var("+y.border+")")]);function I_e(e){let t=e.onRemoved,r=e.onUploaded,n=e.label,i=e.multiple,o=e.accept,a=e.adapter,s=i!==void 0?i:!0,l=n!==void 0?n:"Drop files here or click to browse",u=de(()=>[]),d=u[1],f=u[0],h=de(()=>!1),p=h[1],m=Fe(null),g=Fe(0),v=Fe([]),_=Fe([]);$e(()=>(()=>{v.current.forEach(O=>{URL.revokeObjectURL(O)})}),[]);let x=(O,D)=>d(U=>U.map(B=>B.key===O?{key:B.key,name:B.name,size:B.size,status:D,preview:B.preview}:B)),S=O=>re(O.preview,D=>{URL.revokeObjectURL(D),v.current=v.current.filter(U=>U!==D)}),E=O=>re(a.remove,D=>{$t(D(O).then(U=>{U.TAG!=="Ok"&&console.error("[FileDropzone] could not remove "+O+": "+U._0)}),U=>(console.error("[FileDropzone] could not remove "+O),Promise.resolve()))}),k=O=>{_.current=_.current.concat([O.key]),S(O);let D=O.status;if(D.TAG!=="Done")return;let U=D._0;re(t,B=>B(U)),E(U)},R=O=>{let D=E_e(s,O),U=D[1];U&&f.forEach(k),D[0].forEach((B,q)=>{let Q=U&&q===0;g.current=g.current+1|0;let J=g.current.toString()+":"+B.name,te=S_e(o,B.name,B.type),ae=te?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"},Z=B.type,W;if(Z.toLowerCase().startsWith("image/")){let be=URL.createObjectURL(B);v.current=v.current.concat([be]),W=be}else W=void 0;let le=B.name,oe=B.size,Se={key:J,name:le,size:oe,status:ae,preview:W};if(d(be=>Q?[Se]:be.concat([Se])),te){$t(a.upload(B,be=>x(J,{TAG:"Uploading",_0:be})).then(be=>{if(be.TAG==="Ok"){let ue=be._0;_.current.includes(J)?E(ue):(x(J,{TAG:"Done",_0:ue}),re(r,xe=>xe(B.name,ue)))}else x(J,{TAG:"Failed",_0:be._0});return Promise.resolve()}),be=>(x(J,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}})},T=O=>{O.preventDefault(),p(U=>!1);let D=O.dataTransfer;if(D!=null)return R(Array.from(D.files))},A=O=>{let D=O.target.files;D!=null&&R(Array.from(D)),O.target.value=""},N=()=>re(Wi(m.current),O=>O.click()),P=h[0]?lN+" "+k_e:lN;return L("div",{children:[L("div",{children:[b("span",{children:l}),o!==void 0?b("span",{children:"Accepted: "+o,className:C_e}):null],className:P,role:"button",onClick:O=>N(),onDragLeave:O=>p(D=>!1),onDragOver:O=>{O.preventDefault(),p(D=>!0)},onDrop:T}),b("input",{ref:Gt(m),style:{display:"none"},accept:o,multiple:s,type:"file",onChange:A}),f.map(O=>{let D=O.preview,U=O.status,B;switch(U.TAG){case"Uploading":B=b("span",{children:b(qP,{value:U._0,showValue:!1}),className:N_e});break;case"Done":B=b("span",{children:"Uploaded",className:$_e});break;case"Rejected":B=b("span",{children:"Rejected",className:uN,title:U._0});break;case"Failed":B=b("span",{children:"Failed",className:uN,title:U._0});break}return L("div",{children:[D!==void 0?b("img",{className:F_e,alt:O.name,src:D}):null,b("span",{children:O.name,className:A_e,title:O.name}),b("span",{children:w_e(O.size),className:T_e}),B,b("button",{children:"×","aria-label":"Remove "+O.name,className:D_e,title:"Remove "+O.name,type:"button",onClick:q=>{q.stopPropagation();let Q=O.key;re(f.find(J=>J.key===Q),k),d(J=>J.filter(te=>te.key!==Q))}})],className:R_e},O.key)})]})}let P_e=I_e;function Ib(e){switch(e){case"SubmitStarted":return!1;case"FormOpened":case"SubmitFailed":return!0}}let Q8=ar(void 0),O_e=Q8.Provider;function M_e(e){return br(O_e,{value:e.session,children:e.children})}let L_e={make:M_e};function z_e(){return At(Q8)}function U_e(e,t){return e.concat([t])}function B_e(e,t){return e.filter(r=>r!==t)}function j_e(e,t){return fe(e,[],r=>r.armed.current?t:[])}function Y8(e){if(e==="")return[];let t;try{t=Vt(JSON.parse(e))}catch{return[e]}return t!==void 0?ee(t,ce):[e]}function q_e(e){return{upload:(t,r)=>Promise.resolve({TAG:"Error",_0:e!==void 0?'No upload endpoint is configured for the store "'+e+'".':"No upload endpoint is configured."})}}function V_e(e){return Ne(C(C(H(cn(e)),t=>M(t,"type")),ce),"array")}function X8(e){let t=r=>C(Ta(r).storeTarget,PH);return Aa(t(e),C(DI(e),t))}function G_e(e,t,r){return Aa(C(X8(e),r),t)}function K_e(e,t,r){return F(G_e(e,t,r),q_e(X8(e)))}function H_e(e){let t=e.onChange,r=e.value,n=e.multiple,i=e.adapter,o=Fe(n?Y8(r):r===""?[]:[r]),a=Fe([]),s=z_e(),l=h=>n?JSON.stringify(h.map(p=>p)):F(h[0],""),u=(h,p)=>{let m=n?o.current.concat([p]):[p];o.current=m,a.current=U_e(a.current,p),t(l(m))},d=h=>{let p=o.current.filter(m=>m!==h);o.current=p,a.current=B_e(a.current,h),t(l(p))},f=h=>re(i.remove,p=>{$t(p(h).then(m=>{m.TAG!=="Ok"&&console.error("[FileDropzoneInput] could not release "+h+": "+m._0)}),m=>(console.error("[FileDropzoneInput] could not release "+h),Promise.resolve()))});return $e(()=>(()=>{j_e(s,a.current).forEach(f)}),[]),b(P_e,{adapter:i,accept:e.accept,multiple:n,onUploaded:u,onRemoved:d})}function W_e(e,t,r,n){if(n&&Y8(r).length===0)return"Required"}function J_e(e,t,r){let n=e!==void 0?e:a=>{},i=(a,s,l,u,d,f,h)=>b(H_e,{adapter:K_e(s,void 0,n),accept:t,multiple:F(r,V_e(s)),value:l,onChange:u}),o=a=>{let l={...F(Toe(a),{cell:(u,d,f)=>{},detail:(u,d,f)=>{}})};Ar(a,(l.validateInput=W_e,l.input=i,l))};o("File"),o("Image")}var Q_e={FRAGMENT:"Fragment",INLINE_DATA_FRAGMENT:"InlineDataFragment",LINKED_FIELD:"LinkedField",LITERAL:"Literal",LIST_VALUE:"ListValue",RELAY_LIVE_RESOLVER:"RelayLiveResolver",OBJECT_VALUE:"ObjectValue",REQUEST:"Request",SCALAR_FIELD:"ScalarField",SPLIT_OPERATION:"SplitOperation",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"},ju=Q_e,Y_e=function(e,t,r,n,i,o,a,s){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Me=Y_e;function Cv(e){return function(){return e}}var Ld=function(){};Ld.thatReturns=Cv;Ld.thatReturnsFalse=Cv(!1);Ld.thatReturnsTrue=Cv(!0);Ld.thatReturnsNull=Cv(null);Ld.thatReturnsThis=function(){return this};Ld.thatReturnsArgument=function(e){return e};var Rv=ju,_p=Me;function X_e(e){_p(!1)}function Rs(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function Z8(e){var t=Rs(e);return typeof t=="object"&&t!==null&&t.kind===Rv.FRAGMENT}function e5(e){var t=Rs(e);return typeof t=="object"&&t!==null&&t.kind===Rv.REQUEST}function Z_e(e){var t=Rs(e);return typeof t=="object"&&t!==null&&t.kind===Rv.UPDATABLE_QUERY}function t5(e){var t=Rs(e);return typeof t=="object"&&t!==null&&t.kind===Rv.INLINE_DATA_FRAGMENT}function a2(e){var t=Rs(e);return Z8(t)||_p(!1),t}function ebe(e){var t,r=a2(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch,i=n?.connection;return n===null||typeof n!="object"||i===null||typeof i!="object"?null:r}function tbe(e){var t,r=a2(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function rbe(e){var t=Rs(e);return e5(t)||_p(!1),t}function nbe(e){var t=Rs(e);return Z_e(t)||_p(!1),t}function ibe(e){var t=Rs(e);return t5(t)||_p(!1),t}var oa={getFragment:a2,getNode:Rs,getPaginationFragment:ebe,getRefetchableFragment:tbe,getRequest:rbe,getUpdatableQuery:nbe,getInlineDataFragment:ibe,graphql:X_e,isFragment:Z8,isRequest:e5,isInlineDataFragment:t5},r5={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(r5);var Ke=r5.exports,n5={exports:{}},i5={exports:{}},o5={exports:{}},a5={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(a5);var s5=a5.exports,l5={exports:{}};(function(e){var t=s5.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,i||"default");if(t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(l5);var obe=l5.exports;(function(e){var t=s5.default,r=obe;function n(i){var o=r(i,"string");return t(o)=="symbol"?o:o+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(o5);var u5=o5.exports;(function(e){var t=u5;function r(n,i,o){return(i=t(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(i5);var pi=i5.exports;(function(e){var t=pi;function r(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);o&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),a.push.apply(a,s)}return a}function n(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?r(Object(a),!0).forEach(function(s){t(i,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(a,s))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(n5);var Qt=n5.exports,c5={exports:{}},d5={exports:{}},f5={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,o=Array(n);i<n;i++)o[i]=r[i];return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(f5);var h5=f5.exports;(function(e){var t=h5;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var o={}.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(d5);var p5=d5.exports;(function(e){var t=p5;function r(n,i){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!o){if(Array.isArray(n)||(o=t(n))||i&&n&&typeof n.length=="number"){o&&(n=o);var a=0,s=function(){};return{s,n:function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
68
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,u=!0,d=!1;return{s:function(){o=o.call(n)},n:function(){var h=o.next();return u=h.done,h},e:function(h){d=!0,l=h},f:function(){try{u||o.return==null||o.return()}finally{if(d)throw l}}}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(c5);var Ur=c5.exports,m5=Ke.default,cN=m5(Qt),dN=m5(Ur),abe=Me;function sbe(e,t,r){var n=(0,dN.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,cN.default)((0,cN.default)({},o),{},{uiContext:r}))}}catch(u){n.e(u)}finally{n.f()}var a=(0,dN.default)(t),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(g5(l))switch(l.kind){case"relay_resolver.error":throw new Error("Relay: Resolver error at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'. Message: ").concat(l.error.message));case"relay_field_payload.error":throw new Error("Relay: Unexpected response payload - check server logs for details.");case"missing_expected_data.throw":throw new Error("Relay: Missing expected data at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.throw":throw new Error("Relay: Missing @required value at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.log":case"missing_expected_data.log":break;default:l.kind,abe(!1)}}}catch(u){a.e(u)}finally{a.f()}}function g5(e){switch(e.kind){case"relay_resolver.error":case"relay_field_payload.error":return e.shouldThrow&&!e.handled;case"missing_expected_data.throw":case"missing_required_field.throw":return!e.handled;case"missing_required_field.log":case"missing_expected_data.log":return!1;default:throw e.kind,new Error("Relay: Unexpected event kind")}}function lbe(e,t,r){t!=null&&sbe(e,t,r)}var bp={handlePotentialSnapshotErrors:lbe,eventShouldThrow:g5},v5={exports:{}},_5={exports:{}};(function(e){var t=h5;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(_5);var ube=_5.exports,b5={exports:{}};(function(e){function t(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(b5);var cbe=b5.exports,y5={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(y5);var dbe=y5.exports;(function(e){var t=ube,r=cbe,n=p5,i=dbe;function o(a){return t(a)||r(a)||n(a)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(v5);var $l=v5.exports,x5={DEFAULT_HANDLE_KEY:""},fbe=x5,hbe=fbe.DEFAULT_HANDLE_KEY,pbe=Me;function mbe(e,t,r){return t&&t!==hbe?"__".concat(t,"_").concat(e):(r==null&&pbe(!1),"__".concat(r,"_").concat(e))}var S5=mbe,gbe={ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_STORE_ID_COLLISION_LOGGING:!1,ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION:!1,MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD:!1,ENABLE_CYLE_DETECTION_IN_VARIABLES:!1,ENABLE_ACTIVITY_COMPATIBILITY:!1,ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX:!0,ENABLE_USE_PAGINATION_IS_LOADING_FIX:!1,DISALLOW_NESTED_UPDATES:!1,ENABLE_TYPENAME_PREFIXED_DATA_ID:!1,ENABLE_UI_CONTEXT_ON_RELAY_LOGGER:!1,CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES:!1},Ro=gbe;function Rx(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(Rx);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=Rx(e[t[n]]);return r}function w5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(!e||typeof e!="object")return!1;if(t.has(e))return!0;var r=new Set(t);r.add(e);var n=Array.isArray(e)?e:Object.values(e);return n.some(function(i){return w5(i,r)})}var qu={stableCopy:Rx,hasCycle:w5},vbe=Ke.default,_be=vbe($l),bbe=S5,Av=ju,ybe=Ro,xbe=qu,E5=xbe.stableCopy,Sbe=Me,wbe=Av.VARIABLE,Ebe=Av.LITERAL,kbe=Av.OBJECT_VALUE,Cbe=Av.LIST_VALUE,Rbe="__errors",Abe="__module_component_",Tbe="__module_operation_";function Ax(e,t){if(e.kind===wbe)return Ibe(e.variableName,t);if(e.kind===Ebe)return e.value;if(e.kind===kbe){var r={};return e.fields.forEach(function(i){r[i.name]=Ax(i,t)}),r}else if(e.kind===Cbe){var n=[];return e.items.forEach(function(i){i!=null&&n.push(Ax(i,t))}),n}}function s2(e,t,r){var n={};return r&&(n[C5.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=Ax(i,t)}),n}function $be(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,a=e.args,s=e.filters,l=bbe(n,i,o),u=null;return a&&s&&a.length!==0&&s.length!==0&&(u=a.filter(function(d){return s.indexOf(d.name)>-1})),r&&(u=u!=null?[r].concat((0,_be.default)(u)):[r]),u===null?l:l2(l,s2(u,t))}function k5(e,t){if(e.storageKey)return e.storageKey;var r=Dbe(e),n=e.name;return r&&r.length!==0?l2(n,s2(r,t)):n}function Nbe(e,t){var r=k5(e,t);return ybe.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function Dbe(e){if(e.kind==="RelayResolver"||e.kind==="RelayLiveResolver"){var t;if(e.args==null){var r;return(r=e.fragment)===null||r===void 0?void 0:r.args}return((t=e.fragment)===null||t===void 0?void 0:t.args)==null?e.args:e.args.concat(e.fragment.args)}var n=typeof e.args>"u"?void 0:e.args;return n}function Fbe(e,t){return l2(e,E5(t))}function l2(e,t){if(!t)return e;var r=[];for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i!=null){var o;r.push(n+":"+((o=JSON.stringify(i))!==null&&o!==void 0?o:"undefined"))}}return r.length===0?e:e+"(".concat(r.join(","),")")}function Ibe(e,t){return t.hasOwnProperty(e)||Sbe(!1),E5(t[e])}function Pbe(e){return"".concat(Abe).concat(e)}function Obe(e){return"".concat(Tbe).concat(e)}var C5={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"$isWithinUnmatchedTypeRefinement",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ERRORS_KEY:Rbe,ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",getArgumentValues:s2,getHandleStorageKey:$be,getStorageKey:k5,getReadTimeResolverStorageKey:Nbe,getStableStorageKey:Fbe,getModuleComponentKey:Pbe,getModuleOperationKey:Obe},yr=C5,Mbe=Ke.default,R5=Mbe(Qt),Lbe=yr,zbe=Lbe.getArgumentValues,Ube=Me;function Bbe(e,t,r){if(e.argumentDefinitions==null)return r;var n;return e.argumentDefinitions.forEach(function(i){if(!r.hasOwnProperty(i.name))switch(n=n||(0,R5.default)({},r),i.kind){case"LocalArgument":n[i.name]=i.defaultValue;break;case"RootArgument":if(!t.hasOwnProperty(i.name)){n[i.name]=void 0;break}n[i.name]=t[i.name];break;default:Ube(!1)}}),n||r}function jbe(e,t,r){var n={};return e.argumentDefinitions.forEach(function(i){var o=i.defaultValue;r[i.name]!=null&&(o=r[i.name]),n[i.name]=o}),t!=null&&Object.keys(t).forEach(function(i){n[i]=t[i].get()}),n}function qbe(e,t,r){if(t==null)return e;var n=(0,R5.default)({},e),i=r?zbe(r,e):{};return t.forEach(function(o){var a,s=(a=i[o.name])!==null&&a!==void 0?a:o.defaultValue;n[o.name]=s}),n}var Nl={getLocalVariables:qbe,getFragmentVariables:Bbe,getOperationVariables:jbe},Pb=[],Ob=[];/**
70
+ * Checks if two values are equal. Values may be primitives, arrays, or objects.
71
+ * Returns true if both arguments have the same keys and values.
72
+ *
73
+ * @see http://underscorejs.org
74
+ * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
75
+ * @license MIT
76
+ */function Vbe(e,t){var r=Pb.length?Pb.pop():[],n=Ob.length?Ob.pop():[],i=Tx(e,t,r,n);return r.length=0,n.length=0,Pb.push(r),Ob.push(n),i}function Tx(e,t,r,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;var i=Object.prototype.toString,o=i.call(e);if(o!=i.call(t))return!1;switch(o){case"[object String]":return e==String(t);case"[object Number]":return isNaN(e)||isNaN(t)?!1:e==Number(t);case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}for(var a=r.length;a--;)if(r[a]==e)return n[a]==t;r.push(e),n.push(t);var s=0;if(o==="[object Array]"){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!Tx(e[s],t[s],r,n))return!1}else{if(e.constructor!==t.constructor)return!1;if(e.hasOwnProperty("valueOf")&&t.hasOwnProperty("valueOf"))return e.valueOf()==t.valueOf();var l=Object.keys(e);if(l.length!=Object.keys(t).length)return!1;for(var u=0;u<l.length;u++)if(!Tx(e[l[u]],t[l[u]],r,n))return!1}return r.pop(),n.pop(),!0}var As=Vbe,Gbe=Nl,Kbe=Gbe.getFragmentVariables,yp=yr,Hbe=yp.CLIENT_EDGE_TRAVERSAL_PATH,Wbe=yp.FRAGMENT_OWNER_KEY,Jbe=yp.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,Qbe=yp.FRAGMENTS_KEY,A5=yp.ID_KEY,T5=As,xl=Me;function Tv(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||xl(!1);var r=t[A5],n=t[Qbe],i=t[Wbe],o=t[Hbe];if(typeof r=="string"&&typeof n=="object"&&n!==null&&typeof n[e.name]=="object"&&n[e.name]!==null&&typeof i=="object"&&i!==null&&(o==null||Array.isArray(o))){var a=i,s=o,l=n[e.name],u=Kbe(e,a.variables,l),d=l[Jbe]===!0;return O5(e,r,u,a,d,s)}return null}function $5(e,t){var r=null;return t.forEach(function(n,i){var o=n!=null?Tv(e,n):null;o!=null&&(r=r||[],r.push(o))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function N5(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||xl(!1),$5(e,t)):(Array.isArray(t)&&xl(!1),Tv(e,t))}function Ybe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=N5(i,o)}return r}function Xbe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=D5(i,o)}return r}function D5(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||xl(!1),Zbe(e,t)):(Array.isArray(t)&&xl(!1),F5(e,t))}function Zbe(e,t){var r=null;return t.forEach(function(n){var i=n!=null?F5(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function F5(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||xl(!1);var r=t[A5];return typeof r=="string"?r:null}function eye(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],a=I5(i,o);Object.assign(r,a)}return r}function I5(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||xl(!1),P5(e,t)):(Array.isArray(t)&&xl(!1),u2(e,t)||{})}function u2(e,t){var r=Tv(e,t);return r?r.variables:null}function P5(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=u2(e,n);o!=null&&Object.assign(r,o)}}),r}function fN(e,t){return e.dataID===t.dataID&&e.node===t.node&&T5(e.variables,t.variables)&&tye(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&rye(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function tye(e,t){return e===t?!0:e.identifier===t.identifier&&T5(e.cacheConfig,t.cacheConfig)}function rye(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=e.length;r--;){var n=e[r],i=t[r];if(n!==i&&(n==null||i==null||n.clientEdgeDestinationID!==i.clientEdgeDestinationID||n.readerClientEdge!==i.readerClientEdge))return!1}return!0}function nye(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?fN(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return fN(r,t.selectors[n])}):!1}function O5(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o=arguments.length>5?arguments[5]:void 0;return{kind:"SingularReaderSelector",dataID:t,isWithinUnmatchedTypeRefinement:i,clientEdgeTraversalPath:o??null,node:e,variables:r,owner:n}}function iye(e,t,r){return{dataID:t,node:e,variables:r}}var aa={areEqualSelectors:nye,createReaderSelector:O5,createNormalizationSelector:iye,getDataIDsFromFragment:D5,getDataIDsFromObject:Xbe,getSingularSelector:Tv,getPluralSelector:$5,getSelector:N5,getSelectorsFromObject:Ybe,getVariablesFromSingularFragment:u2,getVariablesFromPluralFragment:P5,getVariablesFromFragment:I5,getVariablesFromObject:eye},oye=oa,aye=oye.getFragment,sye=bp,lye=sye.eventShouldThrow,uye=aa,cye=uye.getSelector,hN=Me,Hf=[];function dye(e,t){Hf.push(e);try{return t()}finally{Hf.pop()}}function fye(e,t){if(!Hf.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Hf[Hf.length-1],n=aye(e),i=cye(n,t);i==null&&hN(!1),i.kind!=="SingularReaderSelector"&&hN(!1);var o=r.getDataForResolverFragment(i,t),a=o.data,s=o.isMissingData,l=o.fieldErrors;if(s||l!=null&&l.some(lye))throw M5;return a}var M5={},c2={readFragment:fye,withResolverContext:dye,RESOLVER_FRAGMENT_ERRORED_SENTINEL:M5},hye=c2;hye.readFragment;var L5={exports:{}};(function(e){function t(n,i,o,a,s,l,u){try{var d=n[l](u),f=d.value}catch(h){return void o(h)}d.done?i(f):Promise.resolve(f).then(a,s)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(a,s){var l=n.apply(i,o);function u(f){t(l,a,s,u,d,"next",f)}function d(f){t(l,a,s,u,d,"throw",f)}u(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(L5);var z5=L5.exports;function pye(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var U5=pye,mye=U5,Wa=xye,Mh=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){Wa=n},e.from=function(n){return gye(n)?vye(n):mye(n)?_ye(n):bye(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){a=d},next:o.next,complete:o.complete,error:o.error})}catch(u){o.error(u,!0)}}}),function(){return a.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,error:o.error,complete:function(){a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var a=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(u){Wa(u,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:a("start"),next:a("next"),error:a("error"),complete:a("complete"),unsubscribe:a("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var a=i.subscribe(o);return function(){a.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var a=!1,s;return s=i.subscribe({next:function(u){a=!0,o.next(u)},error:o.error,complete:function(){a?o.complete():s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.subscribe=function(n){return yye(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var a=i.subscribe({complete:o.complete,error:o.error,next:function(l){try{var u=n(l);o.next(u)}catch(d){o.error(d,!0)}}});return function(){a.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var a=[];function s(u){this._sub=u,a.push(u)}function l(){a.splice(a.indexOf(this._sub),1),a.length===0&&o.complete()}return i.subscribe({start:s,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:s,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){a.forEach(function(u){return u.unsubscribe()}),a.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var a,s,l=function u(){a=i.subscribe({next:o.next,error:o.error,complete:function(){s=setTimeout(u,n)}})};return l(),function(){clearTimeout(s),a.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var a=!1;n.subscribe({next:function(l){a||(a=!0,i(l))},error:o,complete:i})})},e})();function gye(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function vye(e){return e instanceof Mh?e:Mh.create(function(t){return e.subscribe(t)})}function _ye(e){return Mh.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function bye(e){return Mh.create(function(t){t.next(e),t.complete()})}function yye(e,t){var r=!1,n,i=function(u){return Object.defineProperty(u,"closed",{get:function(){return r}})};function o(){if(n){if(n.unsubscribe)n.unsubscribe();else try{n()}catch(l){Wa(l,!0)}n=void 0}}var a=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(a)}catch(u){Wa(u,!0)}finally{o()}}}});try{t.start&&t.start(a)}catch(l){Wa(l,!0)}if(r)return a;var s=i({next:function(u){if(!r&&t.next)try{t.next(u)}catch(d){Wa(d,!0)}},error:function(u,d){if(r||!t.error)r=!0,Wa(u,d||!1),o();else{r=!0;try{t.error(u)}catch(f){Wa(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(u){Wa(u,!0)}finally{o()}}}});try{n=e(s)}catch(l){s.error(l,!0)}return r&&o(),a}function xye(e,t){}var Dl=Mh,B5=Ke.default,Sye=B5(Ur),hm=B5(pi),wye=Dl,Eye=Me,kye=(function(){function e(){var r=this;(0,hm.default)(this,"_complete",!1),(0,hm.default)(this,"_events",[]),(0,hm.default)(this,"_sinks",new Set),(0,hm.default)(this,"_subscription",[]),this._observable=wye.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var a=i[o];switch(a.kind){case"complete":n.complete();break;case"error":n.error(a.error);break;case"next":n.next(a.data);break;default:a.kind,Eye(!1)}}return function(){r._sinks.delete(n)}})}var t=e.prototype;return t.complete=function(){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"complete"}),this._sinks.forEach(function(n){return n.complete()}))},t.error=function(n){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"error",error:n}),this._sinks.forEach(function(i){return i.error(n)}))},t.next=function(n){this._complete!==!0&&(this._events.push({kind:"next",data:n}),this._sinks.forEach(function(i){return i.next(n)}))},t.subscribe=function(n){var i=this._observable.subscribe(n);return this._subscription.push(i),i},t.unsubscribe=function(){var n=(0,Sye.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(a){n.e(a)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),j5=kye,d2=Dl,pN=j5,q5=Me,Cye=typeof WeakMap=="function",mN=Cye?new WeakMap:new Map;function Rye(e,t){return V5(e,t.request.identifier,function(){return e.execute({operation:t})})}function V5(e,t,r){return d2.create(function(n){var i=f2(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(s){o={identifier:t,subject:new pN,subjectForInFlightStatus:new pN,subscription:s,promise:null},i.set(t,o)},next:function(s){var l=pm(i,t);l.subject.next(s),l.subjectForInFlightStatus.next(s)},error:function(s){var l=pm(i,t);l.subject.error(s),l.subjectForInFlightStatus.error(s)},complete:function(){var s=pm(i,t);s.subject.complete(),s.subjectForInFlightStatus.complete()},unsubscribe:function(s){var l=pm(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&q5(!1),Aye(i,o).subscribe(n)})}function Aye(e,t){return d2.create(function(r){var n=t.subject.subscribe(r);return function(){n.unsubscribe();var i=e.get(t.identifier);if(i){var o=i.subscription;o!=null&&i.subject.getObserverCount()===0&&(o.unsubscribe(),e.delete(t.identifier))}}})}function G5(e,t,r){return d2.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(a){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function Tye(e,t){var r=f2(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,a){var s=!1;G5(e,r,n).subscribe({complete:o,error:a,next:function(u){s&&o(u)}}),s=!0});return i}function $ye(e,t){var r=f2(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:G5(e,r,n)}function f2(e){var t=mN.get(e);if(t!=null)return t;var r=new Map;return mN.set(e,r),r}function pm(e,t){var r=e.get(t);return r==null&&q5(!1),r}var $v={fetchQuery:Rye,fetchQueryDeduped:V5,getPromiseForActiveRequest:Tye,getObservableForActiveRequest:$ye},Nye=Ke.default;z5.default;var Dye=Nye(Ur),K5=Dl,Fye=$v,Iye=Fye.getObservableForActiveRequest,Pye=oa,Oye=Pye.getFragment,Mye=bp,Lye=Mye.handlePotentialSnapshotErrors,zye=aa,Uye=zye.getSelector,c0=Me;function Bye(e,t,r){var n,i=Oye(t),o=Uye(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&c0(!1),o==null&&c0(!1),o.kind){case"SingularReaderSelector":return jye(e,t,o);case"PluralReaderSelector":return qye(e,t,o)}c0(!1)}function jye(e,t,r){var n=e.lookup(r);return K5.create(function(i){i.next(fg(e,t,r.owner,n));var o=e.subscribe(n,function(a){i.next(fg(e,t,r.owner,a))});return function(){return o.dispose()}})}function qye(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return K5.create(function(i){var o=n.map(function(s,l){return fg(e,t,r.selectors[l].owner,s)});i.next(gN(o));var a=n.map(function(s,l){return e.subscribe(s,function(u){o[l]=fg(e,t,r.selectors[l].owner,u),i.next(gN(o))})});return function(){return a.forEach(function(s){return s.dispose()})}})}function fg(e,t,r,n){var i=n.missingLiveResolverFields!=null&&n.missingLiveResolverFields.length>0,o=n.missingClientEdges!=null&&n.missingClientEdges.length>0;if(i||o)return{state:"loading"};if(n.isMissingData&&(Iye(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{Lye(e,n.fieldErrors)}catch(a){return{error:a,state:"error"}}return n.data==null&&c0(!1),{state:"ok",value:n.data}}function gN(e){var t=[],r=(0,Dye.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.state==="ok")t.push(i.value);else return i}}catch(o){r.e(o)}finally{r.f()}return{state:"ok",value:t}}var h2={observeFragment:Bye};function H5(e){return Vye(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&H5(r)})),e}function Vye(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var W5=H5,Gye=qu,Kye=Gye.stableCopy,Hye=Me;function Wye(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&Hye(!1),r+JSON.stringify(Kye(t))}var J5=Wye,Jye=J5,Qye=Ro,Yye=qu,Xye=Yye.hasCycle,Zye=Nl,e1e=Zye.getOperationVariables,Q5=aa,t1e=Q5.createNormalizationSelector,r1e=Q5.createReaderSelector,n1e=yr,i1e=n1e.ROOT_ID,o1e=Me;function a1e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i1e,i=e.operation,o=e1e(i,e.params.providedVariables,t);Qye.ENABLE_CYLE_DETECTION_IN_VARIABLES&&Xye(o)&&o1e(!1);var a=Y5(e,o,r),s={fragment:r1e(e.fragment,n,o,a),request:a,root:t1e(i,n,o)};return s}function Y5(e,t,r){var n={identifier:Jye(e.params,t),node:e,variables:t,cacheConfig:r};return n}var Fl={createOperationDescriptor:a1e,createRequestDescriptor:Y5},s1e=Ke.default,l1e=s1e(pi),u1e=h2,c1e=u1e.observeFragment,d1e=Fl,f1e=d1e.createOperationDescriptor;function h1e(e,t,r){var n=f1e(t,r),i={__id:n.fragment.dataID,__fragments:(0,l1e.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return c1e(e,o,i)}var p1e={observeQuery:h1e},m1e=z5.default,g1e=h2,v1e=g1e.observeFragment;function _1e(e,t,r){return $x.apply(this,arguments)}function $x(){return $x=m1e(function*(e,t,r){var n;try{var i,o=yield new Promise(function(s,l){n=v1e(e,t,r).subscribe({next:function(d){d.state==="ok"?s(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(s){var a;throw(a=n)===null||a===void 0||a.unsubscribe(),s}}),$x.apply(this,arguments)}var b1e={waitForFragmentData:_1e},y1e=h2;y1e.observeFragment;var x1e=p1e;x1e.observeQuery;var S1e=b1e;S1e.waitForFragmentData;function w1e(e){return e.ok===!0}function E1e(e){return e.ok===!1}var k1e={isValueResult:w1e,isErrorResult:E1e},vN=new Map,C1e=1,R1e=A1e(),X5=" ",_N="\v";function A1e(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function T1e(e){return e[0]===X5&&R1e.has(e[1])||e[0]===_N?_N+e:e}function $1e(e,t){if(t==null||e.length<t)return T1e(e);var r=vN.get(e);return r!=null||(r=X5+C1e++,vN.set(e,r)),r}var Z5={intern:$1e},bN=Ro,N1e=Z5,D1e=N1e.intern,Lh="client:";function F1e(e,t,r){var n=bN.STRING_INTERN_LEVEL<=0?e:D1e(e,bN.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(Lh)!==0&&(i=Lh+i),i}function I1e(e){return e.indexOf(Lh)===0}var P1e=0;function O1e(){return"".concat(Lh,"local:").concat(P1e++)}function M1e(e,t,r){var n="".concat(Lh).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var za={generateClientID:F1e,generateClientObjectClientID:M1e,generateUniqueClientID:O1e,isClientID:I1e},L1e={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},yN={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},z1e={inject:function(t){yN=t},get:function(){return yN},isConnectionCall:function(t){return L1e.hasOwnProperty(t.name)}},p2=z1e,U1e=za,zh=U1e.generateClientID,B1e=yr,j1e=B1e.getStableStorageKey,ez=S5,Vu=p2,q1e=Me,tz="connection",Nx="__connection_next_edge_index";function V1e(e,t){var r=e.get(t.dataID);if(r){var n=Vu.get(),i=n.EDGES,o=n.END_CURSOR,a=n.HAS_NEXT_PAGE,s=n.HAS_PREV_PAGE,l=n.PAGE_INFO,u=n.PAGE_INFO_TYPE,d=n.START_CURSOR,f=r.getLinkedRecord(t.fieldKey),h=f&&f.getLinkedRecord(l);if(!f){r.setValue(null,t.handleKey,void 0,r.getErrors(t.fieldKey));return}var p=zh(r.getDataID(),t.handleKey),m=r.getLinkedRecord(t.handleKey),g=m??e.get(p),v=g&&g.getLinkedRecord(l);if(g){m==null&&r.setLinkedRecord(g,t.handleKey);var S=g,E=f.getLinkedRecords(i);E&&(E=E.map(function(te){return Dx(e,S,te)}));var k=S.getLinkedRecords(i),R=S.getLinkedRecord(l);S.copyFieldsFrom(f),k&&S.setLinkedRecords(k,i),R&&S.setLinkedRecord(R,l);var T=[],A=t.args;if(k&&E)if(A.after!=null){var N,P=(N=v)===null||N===void 0?void 0:N.getValue(o),O=h?.getValue(o),D=v&&A.after===P,U=v&&P===O;if(D||U){var B=new Set;mm(k,T,B),mm(E,T,B)}else return}else if(A.before!=null)if(v&&A.before===v.getValue(d)){var q=new Set;mm(E,T,q),mm(k,T,q)}else return;else T=E;else E?T=E:T=k;if(T!=null&&T!==k&&S.setLinkedRecords(T,i),v&&h){if(A.after==null&&A.before==null)v.copyFieldsFrom(h);else if(A.before!=null||A.after==null&&A.last){v.setValue(!!h.getValue(s),s);var Q=h.getValue(d);typeof Q=="string"&&v.setValue(Q,d)}else if(A.after!=null||A.before==null&&A.first){v.setValue(!!h.getValue(a),a);var J=h.getValue(o);typeof J=="string"&&v.setValue(J,o)}}}else{var _=e.create(p,f.getType());_.setValue(0,Nx),_.copyFieldsFrom(f);var x=f.getLinkedRecords(i);x&&(x=x.map(function(te){return Dx(e,_,te)}),_.setLinkedRecords(x,i)),r.setLinkedRecord(_,t.handleKey),v=e.create(zh(_.getDataID(),l),u),v.setValue(!1,a),v.setValue(!1,s),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),_.setLinkedRecord(v,l)}}}function G1e(e,t,r){var n=ez(tz,t,null);return e.getLinkedRecord(n,r)}function K1e(e,t,r){var n=ez(tz,t,null),i=j1e(n,r);return zh(e,i)}function H1e(e,t,r){var n=Vu.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=a.concat(t);else{s=[];for(var l=!1,u=0;u<a.length;u++){var d=a[u];if(s.push(d),d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}}l||s.push(t)}e.setLinkedRecords(s,o)}function W1e(e,t,r,n){var i=Vu.get(),o=i.NODE,a=zh(t.getDataID(),r.getDataID()),s=e.get(a);return s||(s=e.create(a,n)),s.setLinkedRecord(r,o),s.getValue("cursor")==null&&s.setValue(null,"cursor"),s}function J1e(e,t,r){var n=Vu.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=[t].concat(a);else{s=[];for(var l=!1,u=0;u<a.length;u++){var d=a[u];if(d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}s.push(d)}l||s.unshift(t)}e.setLinkedRecords(s,o)}function Q1e(e,t){var r=Vu.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var a,s=0;s<o.length;s++){var l=o[s],u=l&&l.getLinkedRecord(i);u!=null&&u.getDataID()===t?a===void 0&&(a=o.slice(0,s)):a!==void 0&&a.push(l)}a!==void 0&&e.setLinkedRecords(a,n)}}function Dx(e,t,r){if(r==null)return r;var n=Vu.get(),i=n.EDGES,o=t.getValue(Nx);typeof o!="number"&&q1e(!1);var a=zh(t.getDataID(),i,o),s=e.create(a,r.getType());return s.copyFieldsFrom(r),s.getValue("cursor")==null&&s.setValue(null,"cursor"),t.setValue(o+1,Nx),s}function mm(e,t,r){for(var n=Vu.get(),i=n.NODE,o=0;o<e.length;o++){var a=e[o];if(a){var s=a.getLinkedRecord(i),l=s&&s.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(a)}}}var Nv={buildConnectionEdge:Dx,createEdge:W1e,deleteNode:Q1e,getConnection:G1e,getConnectionID:K1e,insertEdgeAfter:H1e,insertEdgeBefore:J1e,update:V1e},Y1e=Ke.default,Uh=Y1e(Ur),Gu=Nv,rz=p2,Gc=Me;var X1e={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=n.getValue(r.fieldKey);typeof i=="string"?t.delete(i):Array.isArray(i)&&i.forEach(function(o){typeof o=="string"&&t.delete(o)})}}},Z1e={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&Gc(!1);var o=n.getValue(r.fieldKey),a=Array.isArray(o)?o:[o];a.forEach(function(s){if(typeof s=="string"){var l=(0,Uh.default)(i),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=t.get(d);f!=null&&Gu.deleteNode(f,s)}}catch(h){l.e(h)}finally{l.f()}}})}}},exe={update:nz(Gu.insertEdgeAfter)},txe={update:nz(Gu.insertEdgeBefore)},rxe={update:iz(Gu.insertEdgeAfter)},nxe={update:iz(Gu.insertEdgeBefore)};function nz(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs.connections;o==null&&Gc(!1);var a,s;try{a=i.getLinkedRecord(r.fieldKey)}catch{}if(!a)try{s=i.getLinkedRecords(r.fieldKey)}catch{}if(!(a==null&&s==null)){var l=rz.get(),u=l.NODE,d=l.EDGES,f=(n=s)!==null&&n!==void 0?n:[a],h=(0,Uh.default)(f),p;try{var m=function(){var x=p.value;if(x==null)return"continue";var S=x.getLinkedRecord("node");if(!S)return"continue";var E=S.getDataID(),k=(0,Uh.default)(o),R;try{for(k.s();!(R=k.n()).done;){var T=R.value,A=t.get(T);if(A!=null){var N=(g=A.getLinkedRecords(d))===null||g===void 0?void 0:g.some(function(O){var D;return(O==null||(D=O.getLinkedRecord(u))===null||D===void 0?void 0:D.getDataID())===E});if(!N){var P=Gu.buildConnectionEdge(t,A,x);P==null&&Gc(!1),e(A,P)}}}}catch(O){k.e(O)}finally{k.f()}};for(h.s();!(p=h.n()).done;)var g,v=m()}catch(_){h.e(_)}finally{h.f()}}}}}function iz(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,a=o.connections,s=o.edgeTypeName;a==null&&Gc(!1),s==null&&Gc(!1);var l,u;try{l=i.getLinkedRecord(r.fieldKey)}catch{}if(!l)try{u=i.getLinkedRecords(r.fieldKey)}catch{}if(!(l==null&&u==null)){var d=rz.get(),f=d.NODE,h=d.EDGES,p=(n=u)!==null&&n!==void 0?n:[l],m=(0,Uh.default)(p),g;try{var v=function(){var E=g.value;if(E==null)return"continue";var k=E.getDataID(),R=(0,Uh.default)(a),T;try{for(R.s();!(T=R.n()).done;){var A=T.value,N=t.get(A);if(N!=null){var P=(_=N.getLinkedRecords(h))===null||_===void 0?void 0:_.some(function(D){var U;return(D==null||(U=D.getLinkedRecord(f))===null||U===void 0?void 0:U.getDataID())===k});if(!P){var O=Gu.createEdge(t,N,E,s);O==null&&Gc(!1),e(N,O)}}}}catch(D){R.e(D)}finally{R.f()}};for(m.s();!(g=m.n()).done;)var _,x=v()}catch(S){m.e(S)}finally{m.f()}}}}}var ixe={AppendEdgeHandler:exe,DeleteRecordHandler:X1e,PrependEdgeHandler:txe,AppendNodeHandler:rxe,PrependNodeHandler:nxe,DeleteEdgeHandler:Z1e},oxe=Nv,uc=ixe,axe=Me;function sxe(e){switch(e){case"connection":return oxe;case"deleteRecord":return uc.DeleteRecordHandler;case"deleteEdge":return uc.DeleteEdgeHandler;case"appendEdge":return uc.AppendEdgeHandler;case"prependEdge":return uc.PrependEdgeHandler;case"appendNode":return uc.AppendNodeHandler;case"prependNode":return uc.PrependNodeHandler}axe(!1)}var lxe=sxe;function uxe(e){return!!(e&&e["@@RelayModernEnvironment"])}var m2=uxe,cxe=Ke.default,g2=cxe(Ur),$c=Nv;var dxe=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),fxe=Object.freeze({APPEND:"append",PREPEND:"prepend"});function hxe(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(a){switch(a.type){case"NODE_DELETE":var s=pxe(a,t);s&&(i.push(s),o.push(s));break;case"RANGE_ADD":var l=mxe(a,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var u=gxe(a,t);u&&(i.push(u),o.push(u));break}}),{optimisticUpdater:function(s,l){i.forEach(function(u){u(s,l)})},updater:function(s,l){o.forEach(function(u){u(s,l)})}}}function pxe(e,t){var r=e.deletedIDFieldName,n=v2(t);return n?function(i,o){var a=i.getRootField(n);if(a){var s=a.getValue(r),l=Array.isArray(s)?s:[s];l.forEach(function(u){u&&typeof u=="string"&&i.delete(u)})}}:null}function mxe(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=v2(t);return!n||!o?null:function(a,s){var l=a.get(r);if(l){var u=a.getRootField(o);if(u){var d=u.getLinkedRecord(i),f=(0,g2.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var m=$c.getConnection(l,p.key,p.filters);if(m){var g=$c.buildConnectionEdge(a,m,d);if(g)switch(p.rangeBehavior){case"append":$c.insertEdgeAfter(m,g);break;case"prepend":$c.insertEdgeBefore(m,g);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function gxe(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var a=v2(t);return a?function(s,l){if(l){var u=[],d=l[a];if(d&&Array.isArray(o)){var f=(0,g2.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(m){f.e(m)}finally{f.f()}Array.isArray(d)?d.forEach(function(m){m&&m.id&&typeof m=="object"&&typeof m.id=="string"&&u.push(m.id)}):d&&d.id&&typeof d.id=="string"&&u.push(d.id)}else d&&typeof o=="string"&&typeof d=="object"&&(d=d[o],typeof d=="string"?u.push(d):Array.isArray(d)&&d.forEach(function(m){typeof m=="string"&&u.push(m)}));vxe(r,n,i,s,u)}}:null}function vxe(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var a=o,s=1;s<r.length-1;s++)a&&(a=a.getLinkedRecord(r[s]));if(!(!t||!a)){var l=(0,g2.default)(t),u;try{var d=function(){var h=u.value,p=$c.getConnection(a,h.key,h.filters);p&&i.forEach(function(m){$c.deleteNode(p,m)})};for(l.s();!(u=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function v2(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var Dv={MutationTypes:dxe,RangeOperations:fxe,convert:hxe},_xe=oa,bxe=_xe.getRequest,yxe=m2,xxe=Fl,Sxe=xxe.createOperationDescriptor,wxe=Dv,Exe=Me;function kxe(e,t){yxe(e)||Exe(!1);var r=bxe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,a=t.variables,s=Sxe(r,a);if(i){var l=wxe.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:s,response:o,updater:n})}var Cxe=kxe;function Rxe(e,t){e.commitUpdate(t)}var Axe=Rxe,Txe=Ke.default;Txe(Qt);var $xe=Ke.default,xN=$xe($l),Nxe=oa,Dxe=Nxe.getRequest,Fxe=za,Ixe=Fxe.generateUniqueClientID,Pxe=m2,Oxe=Fl,Mxe=Oxe.createOperationDescriptor,Lxe=Dv,zxe=Me;function Uxe(e,t){Pxe(e)||zxe(!1);var r=Dxe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");if(r.kind!=="Request")throw new Error("commitMutation: Expected mutation to be of type request");var n=t.optimisticResponse,i=t.optimisticUpdater,o=t.updater,a=t.configs,s=t.cacheConfig,l=t.onError,u=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=Mxe(r,d,s,Ixe());if(typeof n=="function"&&(n=n()),a){var p=Lxe.convert(a,r,i,o);i=p.optimisticUpdater,o=p.updater}var m=[],g=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(_){var x;Array.isArray(_)?_.forEach(function(S){S.errors&&m.push.apply(m,(0,xN.default)(S.errors))}):_.errors&&m.push.apply(m,(0,xN.default)(_.errors)),(x=t.onNext)===null||x===void 0||x.call(t)},complete:function(){var _=t.onCompleted;if(_){var x=e.lookup(h.fragment);_(x.data,m.length!==0?m:null)}},error:l,unsubscribe:u});return{dispose:g.unsubscribe}}var Bxe=Uxe,jxe=typeof WeakMap=="function",Mb=jxe?new WeakMap:new Map;function oz(e,t){if(t!=null){var r={};return Object.assign(r,e),Object.keys(t).forEach(function(n){var i=t[n].get,o=i();if(!Mb.has(i))Mb.set(i,o),r[n]=o;else{var a=Mb.get(i);r[n]=a}}),r}else return e}oz.tests_only_resetDebugCache=void 0;var qxe=oz,SN=Dl;function Vxe(e){return function(r,n,i,o,a){var s=e(r,n,i,o,a);return s instanceof Error?SN.create(function(l){return l.error(s)}):SN.from(s)}}var Gxe={convertFetch:Vxe},Kxe=qxe,Hxe=Gxe,Wxe=Hxe.convertFetch,Lb=Me;function Jxe(e,t){var r=Wxe(e);function n(i,o,a,s,l){var u=Kxe(o,i.providedVariables);if(i.operationKind==="subscription")return t||Lb(!1),s&&Lb(!1),t(i,u,a);var d=a.poll;return d!=null?(s&&Lb(!1),r(i,u,{force:!0}).poll(d)):r(i,u,a,s,l)}return{execute:n}}var Qxe={create:Jxe},Yxe=Ke.default;Yxe(Qt);var Xxe=qu;Xxe.stableCopy;var Zxe=Ke.default,eSe=Zxe(Qt),tSe=Dl,rSe=Fl,nSe=rSe.createOperationDescriptor,iSe=bp,oSe=iSe.handlePotentialSnapshotErrors,aSe=$v,sSe=oa,lSe=sSe.getRequest,uSe=Me;function cSe(e,t,r,n){var i,o=lSe(t);o.params.operationKind!=="query"&&uSe(!1);var a=(0,eSe.default)({force:!0},n?.networkCacheConfig),s=nSe(o,r,a),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function u(d){return oSe(e,d.fieldErrors),d.data}switch(l){case"network-only":return wN(e,s).map(u);case"store-or-network":return e.check(s).status==="available"?tSe.from(e.lookup(s.fragment)).map(u):wN(e,s).map(u);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function wN(e,t){return aSe.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var dSe=cSe,fSe=Fl,hSe=fSe.createOperationDescriptor,pSe=oa,mSe=pSe.getRequest;function gSe(e,t,r,n){var i=mSe(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=hSe(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var vSe=gSe,_Se=(function(){function e(){this._preloadableQueries=new Map,this._callbacks=new Map}var t=e.prototype;return t.set=function(n,i){this._preloadableQueries.set(n,i);var o=this._callbacks.get(n);o?.forEach(function(a){try{a(i)}catch(s){setTimeout(function(){throw s},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,a=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;a.add(i);var s=function(){a.delete(i)};return this._callbacks.set(n,a),{dispose:s}},t.clear=function(){this._preloadableQueries.clear()},e})(),bSe=new _Se,ySe=bSe,xSe=$v,SSe=xSe.getPromiseForActiveRequest;function wSe(e,t,r){var n,i,o=[],a=SSe(e,r);if(a!=null)o=[r];else{var s,l,u=e.getOperationTracker(),d=u.getPendingOperationsAffectingOwner(r);o=(s=d?.pendingOperations)!==null&&s!==void 0?s:[],a=(l=d?.promise)!==null&&l!==void 0?l:null}if(!a)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(m){return m.node.params.name}).join(","))!==null&&n!==void 0?n:null;(f==null||f.length===0)&&(f="Unknown pending operation");var h=t.name,p=f===h?"Relay(".concat(f,")"):"Relay(".concat(f,":").concat(h,")");return a.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:a,pendingOperations:o}}var az=wSe;function ESe(e,t){return e===t&&(e===null||typeof e!="object")}var sz=ESe;function kSe(e,t){return Fx(e,t,!0)}function Fx(e,t,r){if(e===t||typeof e!="object"||!e||e.constructor!==Object&&!Array.isArray(e)||typeof t!="object"||!t||t.constructor!==Object&&!Array.isArray(t))return t;var n=!1,i=Array.isArray(e)?e:null,o=Array.isArray(t)?t:null;if(i&&o){var a=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,m){var g=i[m],v=Fx(g,p,a);return v!==o[m]&&a&&(o[m]=v),h&&v===i[m]},!0)&&i.length===o.length}else if(!i&&!o){var s=e,l=t,u=Object.keys(s),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var m=s[p],g=Fx(m,l[p],f);return g!==l[p]&&f&&(l[p]=g),h&&g===s[p]},!0)&&u.length===d.length}return n?e:t}var Fv=kSe,lz=Ke.default,EN=lz(Qt),_2=lz(pi),CSe=az,RSe=bp,ASe=RSe.handlePotentialSnapshotErrors,TSe=sz,$Se=Fv,uz=Ro,NSe=Fl,DSe=NSe.createRequestDescriptor,b2=aa,FSe=b2.areEqualSelectors,ISe=b2.createReaderSelector,PSe=b2.getSelectorsFromObject,OSe=As,kN=Me,MSe=(function(){function e(r,n,i,o,a){var s=this;(0,_2.default)(this,"_onChange",function(){s._stale=!0,typeof s._callback=="function"&&s._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=a,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&cz(this._resolvers[n])},t.resolve=function(){if(this._stale){var n=this._data,i;for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o],s=n[o];if(a){var l=a.resolve();(i||l!==s)&&(i=i||(0,EN.default)({},n),i[o]=l)}else{var u=this._props[o],d=u!==void 0?u:null;(i||!TSe(d,s))&&(i=i||(0,EN.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,uz.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=PSe(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var a=i[o],s=this._resolvers[o];a==null?(s?.dispose(),s=null):a.kind==="PluralReaderSelector"?s==null?s=new CN(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof CN||kN(!1),s.setSelector(a)):s==null?s=new Ix(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof Ix||kN(!1),s.setSelector(a)),this._props[o]=n[o],this._resolvers[o]=s}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o];a&&a.setVariables(n,i)}this._stale=!0},e})(),Ix=(function(){function e(r,n,i,o,a){var s=this;(0,_2.default)(this,"_onChange",function(u){s._data=u.data,s._isMissingData=u.isMissingData,s._fieldErrors=u.fieldErrors,s._callback()});var l=r.lookup(i);this._callback=a,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,uz.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?o&&(this._subscription=r.subscribe(l,this._onChange)):this._subscription=r.subscribe(l,this._onChange)}var t=e.prototype;return t.dispose=function(){this._subscription&&(this._subscription.dispose(),this._subscription=null)},t.resolve=function(){if(this._isMissingData===!0){var n=CSe(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,a=(o=n?.pendingOperations)!==null&&o!==void 0?o:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:a}),i}}return ASe(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&FSe(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=$Se(this._data,i.data),this._isMissingData=i.isMissingData,this._fieldErrors=i.fieldErrors,this._selector=n,this._subscription=this._environment.subscribe(i,this._onChange)}},t.setVariables=function(n,i){if(!OSe(n,this._selector.variables)){var o=DSe(i,n),a=ISe(this._selector.node,this._selector.dataID,n,o);this.setSelector(a)}},e})(),CN=(function(){function e(r,n,i,o,a){var s=this;(0,_2.default)(this,"_onChange",function(l){s._stale=!0,s._callback()}),this._callback=a,this._data=[],this._environment=r,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=n,this._subscribeOnConstruction=o,this.setSelector(i)}var t=e.prototype;return t.dispose=function(){this._resolvers.forEach(cz)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var a=n[o],s=this._resolvers[o].resolve();(i||s!==a)&&(i=i||n.slice(0,o),i.push(s))}!i&&this._resolvers.length!==n.length&&(i=n.slice(0,this._resolvers.length)),this._data=i||n,this._stale=!1}return this._data},t.setSelector=function(n){for(var i=n.selectors;this._resolvers.length>i.length;){var o=this._resolvers.pop();o.dispose()}for(var a=0;a<i.length;a++)a<this._resolvers.length?this._resolvers[a].setSelector(i[a]):this._resolvers[a]=new Ix(this._environment,this._rootIsQueryRenderer,i[a],this._subscribeOnConstruction,this._onChange);this._stale=!0},t.setVariables=function(n,i){this._resolvers.forEach(function(o){return o.setVariables(n,i)}),this._stale=!0},e})();function cz(e){e&&e.dispose()}var LSe=MSe,zSe=LSe;function USe(e,t,r,n,i,o){return new zSe(e,r,n,o,i)}var BSe=USe,jSe=Me,zb,RN;function qSe(e){return zb||(zb=e.createContext(null),RN=e),e!==RN&&jSe(!1),zb}var VSe=qSe,GSe=Me,Ub,AN;function KSe(e){return Ub||(Ub=e.createContext(null),AN=e),e!==AN&&GSe(!1),Ub}var HSe=KSe,dz=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function WSe(){return dz}function JSe(e){return e===dz}var Iv={isSuspenseSentinel:JSe,suspenseSentinel:WSe},fz={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.indexOf(o)!==-1)continue;i[o]=r[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(fz);var zd=fz.exports,Pv=Ke.default,QSe=Pv(pi),TN=Pv(zd),$N=Pv(u5),nl=Pv(Qt),YSe=W5,hz=za,pz=hz.generateClientObjectClientID;hz.isClientID;var XSe=Iv,mz=XSe.isSuspenseSentinel,Ts=yr,Px=Ts.ACTOR_IDENTIFIER_KEY,Un=Ts.ERRORS_KEY,y2=Ts.ID_KEY,ZSe=Ts.INVALIDATED_AT_KEY,Sl=Ts.REF_KEY,fd=Ts.REFS_KEY,gz=Ts.RELAY_RESOLVER_VALUE_KEY;Ts.ROOT_ID;var x2=Ts.TYPENAME_KEY,Bb=As,Au=Me;function ewe(e){return(0,nl.default)({},e)}function twe(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==y2&&r!==x2&&(t[r]=e[r])}function rwe(e,t){var r={};return r[y2]=e,r[x2]=t,r}function nwe(e){return e}function iwe(e){return e[y2]}function owe(e){return Un in e?Object.keys(e).filter(function(t){return t!==Un}):Object.keys(e)}function awe(e){return e[x2]}function swe(e,t){var r;return(r=e[Un])===null||r===void 0?void 0:r[t]}function S2(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(Sl)&&!r.hasOwnProperty(fd)||Au(!1)),r}function lwe(e,t){return t in e}function uwe(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[Sl]=="string"||Au(!1),n[Sl]}function cwe(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[Sl]=="string"}function dwe(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[fd])||Au(!1),r[fd])}function fwe(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[fd])&&r[fd].every(function(n){return typeof n=="string"})}function hwe(e){if(e==null)return null;var t=e[ZSe];return typeof t!="number"?null:t}function pwe(e,t){var r,n=e[Un],i=t[Un],o=null;if(n==null&&i==null){var a;for(var s in t)(o||!Bb(e[s],t[s]))&&(o=o!==null?o:(0,nl.default)({},e),o[s]=t[s]);return(a=o)!==null&&a!==void 0?a:e}for(var l in t)if(l!==Un){var u=t[l],d=i?.[l];if(o==null){var f=e[l],h=n?.[l];if(Bb(f,u)&&Bb(h,d))continue;o=(0,nl.default)({},e),n!=null&&(o[Un]=(0,nl.default)({},n))}_z(o,l,u),vz(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function mwe(e,t){if(Un in e||Un in t){var r=e[Un],n=(0,TN.default)(e,[Un].map($N.default)),i=t[Un],o=(0,TN.default)(t,[Un].map($N.default)),a=(0,nl.default)((0,nl.default)({},n),o);if(r==null&&i==null)return a;var s={};for(var l in r)o.hasOwnProperty(l)||(s[l]=r[l]);for(var u in i)s[u]=i[u];for(var d in s){a[Un]=s;break}return a}else return(0,nl.default)((0,nl.default)({},e),t)}function gwe(e){YSe(e)}function vz(e,t,r){var n=e[Un];if(r!=null&&r.length>0)n==null?e[Un]=(0,QSe.default)({},t,r):n[t]=r;else if(n!=null&&delete n[t]){for(var i in n)if(n.hasOwnProperty(i))return;delete e[Un]}}function _z(e,t,r){e[t]=r}function vwe(e,t,r){var n={};n[Sl]=r,e[t]=n}function _we(e,t,r){var n={};n[fd]=r,e[t]=n}function bwe(e,t,r,n){var i={};i[Sl]=n,i[Px]=r,e[t]=i}function ywe(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[Sl]=="string"&&r[Px]!=null||Au(!1),[r[Px],r[Sl]])}function xwe(e,t){var r=S2(e,gz);return r==null||mz(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&Au(!1),pz(t,r))}function Swe(e,t){var r=S2(e,gz);return r==null||mz(r)?null:(Array.isArray(r)||Au(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&Au(!1),pz(t,n))}))}function wwe(e){return e}var Zi={clone:ewe,copyFields:twe,create:rwe,freeze:gwe,fromObject:nwe,getDataID:iwe,getErrors:swe,getFields:owe,getInvalidationEpoch:hwe,getLinkedRecordID:uwe,getLinkedRecordIDs:dwe,getType:awe,getValue:S2,hasValue:lwe,hasLinkedRecordID:cwe,hasLinkedRecordIDs:fwe,merge:mwe,setErrors:vz,setValue:_z,setLinkedRecordID:vwe,setLinkedRecordIDs:_we,update:pwe,getActorLinkedRecordID:ywe,setActorLinkedRecordID:bwe,getResolverLinkedRecordID:xwe,getResolverLinkedRecordIDs:Swe,toJSON:wwe},Ewe={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},Ov=Ewe,kwe=Ke.default,Cwe=kwe(Ur),NN=Zi,w2=Ov,Rwe=w2.EXISTENT,Awe=w2.NONEXISTENT,Twe=w2.UNKNOWN,$we=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],a=NN.fromObject(o);n._records.set(i,a)})}e.create=function(n){return new e(n)};var t=e.prototype;return t.clear=function(){this._records=new Map},t.delete=function(n){this._records.set(n,null)},t.get=function(n){return this._records.get(n)},t.getRecordIDs=function(){return Array.from(this._records.keys())},t.getStatus=function(n){return this._records.has(n)?this._records.get(n)==null?Awe:Rwe:Twe},t.has=function(n){return this._records.has(n)},t.remove=function(n){this._records.delete(n)},t.set=function(n,i){this._records.set(n,i)},t.size=function(){return this._records.size},t.toJSON=function(){var n={},i=(0,Cwe.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a[0],l=a[1];n[s]=NN.toJSON(l)}}catch(u){i.e(u)}finally{i.f()}return n},e})(),Ku=$we,Nwe=Me,bz="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function Dwe(e){e!==bz&&Nwe(!1)}var E2={assertInternalActorIdentifier:Dwe,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:bz},Ox="actor_key",Fwe=E2,Iwe=Fwe.getActorIdentifier;function Pwe(e){if(e!=null&&typeof e=="object"&&typeof e[Ox]=="string")return Iwe(e[Ox])}var Owe={ACTOR_IDENTIFIER_FIELD_NAME:Ox,getActorIdentifierFromPayload:Pwe},Mv=Ke.default,DN=Mv(Qt),Mwe=Mv(zd),yz=Mv(Ur),Lwe=Mv($l),zwe=["path","locations"],Mx=Symbol("$SELF");function Uwe(e){if(e==null)return null;var t=new Map,r=(0,yz.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,a=i.locations,s=(0,Mwe.default)(i,zwe);if(o!=null){var l=o.length;if(l!==0){for(var u=l-1,d=t,f=0;f<u;f++){var h=o[f],p=d.get(h);if(p instanceof Map){d=p;continue}var m=new Map;Array.isArray(p)&&m.set(Mx,p),d.set(h,m),d=m}var g=o[u],v=d.get(g);v instanceof Map&&(d=v,v=d.get(g),g=Mx),Array.isArray(v)?v.push(s):d.set(g,[s])}}}}catch(_){r.e(_)}finally{r.f()}return t}function Bwe(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return xz(r,n),n}function xz(e,t){var r=(0,yz.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],a=i[1],s=t.length;if(Array.isArray(a)?t.push.apply(t,(0,Lwe.default)(a)):xz(a,t),o!==Mx)for(var l=t.length,u=s;u<l;u++){var d=t[u];d.path==null?t[u]=(0,DN.default)((0,DN.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function jwe(e,t){var r=e.get(t);return r instanceof Map?r:null}var qwe={buildErrorTrie:Uwe,getNestedErrorTrieByKey:jwe,getErrorsByKey:Bwe},Vwe="client:__type:",Gwe="__TypeSchema";function Kwe(e){return Vwe+e}var Lv={generateTypeID:Kwe,TYPE_SCHEMA_TYPE:Gwe},Sz=Ke.default,Hwe=Sz(Ur),df=Sz($l),wz=Owe;wz.ACTOR_IDENTIFIER_FIELD_NAME;var Wwe=wz.getActorIdentifierFromPayload,FN=Ro,Ez=za,jb=Ez.generateClientID,Jwe=Ez.isClientID,Qwe=Nl,Ywe=Qwe.getLocalVariables,k2=qwe,Xwe=k2.buildErrorTrie,Zwe=k2.getErrorsByKey,IN=k2.getNestedErrorTrieByKey,gt=Zi,eEe=aa,tEe=eEe.createNormalizationSelector,Hu=yr,rEe=Hu.ROOT_ID,nEe=Hu.TYPENAME_KEY,PN=Hu.getArgumentValues,iEe=Hu.getHandleStorageKey,oEe=Hu.getModuleComponentKey,aEe=Hu.getModuleOperationKey,qb=Hu.getStorageKey,kz=Lv,Vb=kz.TYPE_SCHEMA_TYPE,Gb=kz.generateTypeID,vi=Me;function sEe(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,u=new lEe(e,l,n,o??!1);return u.normalizeResponse(s,a,r,i)}var lEe=(function(){function e(r,n,i,o){this._actorIdentifier=i.actorIdentifier,this._getDataId=i.getDataID,this._handleFieldPayloads=[],this._treatMissingFieldsAsNull=i.treatMissingFieldsAsNull,this._incrementalPlaceholders=[],this._isClientExtension=!1,this._isUnmatchedAbstractType=!1,this._useExecTimeResolvers=o,this._followupPayloads=[],this._path=i.path?(0,df.default)(i.path):[],this._recordSource=r,this._variables=n,this._shouldProcessClientComponents=i.shouldProcessClientComponents,this._log=i.log}var t=e.prototype;return t.normalizeResponse=function(n,i,o,a){var s=this._recordSource.get(i);return s||vi(!1),this._assignClientAbstractTypes(n),this._errorTrie=Xwe(a),this._traverseSelections(n,s,o),{errors:a,fieldPayloads:this._handleFieldPayloads,incrementalPlaceholders:this._incrementalPlaceholders,followupPayloads:this._followupPayloads,source:this._recordSource,isFinal:!1}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,Hwe.default)(i[s]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=Gb(d),h=this._recordSource.get(f);h==null&&(h=gt.create(f,Vb),this._recordSource.set(f,h)),gt.setValue(h,s,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||vi(!1),this._variables[n]},t._getRecordType=function(n){var i=n[nEe];return i==null&&vi(!1),i},t._traverseSelections=function(n,i,o){for(var a=0;a<n.selections.length;a++){var s=n.selections[a];switch(s.kind){case"ScalarField":case"LinkedField":this._normalizeField(s,i,o);break;case"Condition":var l=!!this._getVariableValue(s.condition);l===s.passingValue&&this._traverseSelections(s,i,o);break;case"FragmentSpread":{var u=this._variables;this._variables=Ywe(this._variables,s.fragment.argumentDefinitions,s.args),this._traverseSelections(s.fragment,i,o),this._variables=u;break}case"InlineFragment":{var d=s.abstractKey;if(d==null){var f=gt.getType(i);f===s.type&&this._traverseSelections(s,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=gt.getType(i),m=Gb(p),g=this._recordSource.get(m);g==null&&(g=gt.create(m,Vb),this._recordSource.set(m,g)),gt.setValue(g,d,h),h&&this._traverseSelections(s,i,o)}break}case"TypeDiscriminator":{var v=s.abstractKey,_=Object.prototype.hasOwnProperty.call(o,v),x=gt.getType(i),S=Gb(x),E=this._recordSource.get(S);E==null&&(E=gt.create(S,Vb),this._recordSource.set(S,E)),gt.setValue(E,v,_);break}case"LinkedHandle":case"ScalarHandle":var k=s.args?PN(s.args,this._variables):{},R=qb(s,this._variables),T=iEe(s,this._variables);this._handleFieldPayloads.push({args:k,dataID:gt.getDataID(i),fieldKey:R,handle:s.handle,handleKey:T,handleArgs:s.handleArgs?PN(s.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(s,i,o);break;case"Defer":this._normalizeDefer(s,i,o);break;case"Stream":this._normalizeStream(s,i,o);break;case"ClientExtension":var A=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(s,i,o),this._isClientExtension=A;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(s.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(s,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(s,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(s.backingField,i,o);break;default:vi(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var a=n.if===null||this._getVariableValue(n.if);a===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,df.default)(this._path),selector:tEe(n,gt.getDataID(i),this._variables),typeName:gt.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,o){this._traverseSelections(n,i,o);var a=n.if===null||this._getVariableValue(n.if);a===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,df.default)(this._path),parentID:gt.getDataID(i),node:n,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeModuleImport=function(n,i,o){typeof o=="object"&&o||vi(!1);var a=gt.getType(i),s=oEe(n.documentName),l=n.componentModuleProvider||o[s];gt.setValue(i,s,l??null);var u=aEe(n.documentName),d=n.operationModuleProvider||o[u];gt.setValue(i,u,d??null),d!=null&&this._followupPayloads.push({kind:"ModuleImportPayload",args:n.args,data:o,dataID:gt.getDataID(i),operationReference:d,path:(0,df.default)(this._path),typeName:a,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||vi(!1);var a=n.alias||n.name,s=qb(n,this._variables),l=o[a],u=FN.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(l)&&l.length===0;if(l==null||u){if(l===void 0){var d=this._isClientExtension||this._isUnmatchedAbstractType;if(d)return;if(!this._treatMissingFieldsAsNull)return}n.kind==="ScalarField"&&this._validateConflictingFieldsWithIdenticalId(i,s,null),u?n.kind==="LinkedField"?gt.setLinkedRecordIDs(i,s,[]):gt.setValue(i,s,[]):gt.setValue(i,s,null);var f=this._errorTrie;if(f!=null){var h=Zwe(f,a);h!=null&&gt.setErrors(i,s,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,s,l),gt.setValue(i,s,l);else if(n.kind==="LinkedField"){this._path.push(a);var p=this._errorTrie;this._errorTrie=p==null?null:IN(p,a),n.plural?this._normalizePluralLink(n,i,s,l):this._normalizeLink(n,i,s,l),this._errorTrie=p,this._path.pop()}else vi(!1)},t._normalizeActorChange=function(n,i,o){var a,s=n.linkedField;typeof o=="object"&&o||vi(!1);var l=s.alias||s.name,u=qb(s,this._variables),d=o[l];if(d==null){if(d===void 0){var f=this._isClientExtension||this._isUnmatchedAbstractType;if(f)return;if(!this._treatMissingFieldsAsNull)return}gt.setValue(i,u,null);return}var h=Wwe(d);if(h==null){gt.setValue(i,u,null);return}var p=(a=s.concreteType)!==null&&a!==void 0?a:this._getRecordType(d),m=this._getDataId(d,p)||gt.getLinkedRecordID(i,u)||jb(gt.getDataID(i),u);typeof m!="string"&&vi(!1),gt.setActorLinkedRecordID(i,u,h,m),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:m,path:[].concat((0,df.default)(this._path),[l]),typeName:p,variables:this._variables,node:s,actorIdentifier:h})},t._normalizeLink=function(n,i,o,a){var s;typeof a=="object"&&a||vi(!1);var l=this._getDataId(a,(s=n.concreteType)!==null&&s!==void 0?s:this._getRecordType(a))||gt.getLinkedRecordID(i,o)||jb(gt.getDataID(i),o);typeof l!="string"&&vi(!1),this._validateConflictingLinkedFieldsWithIdenticalId(gt.getLinkedRecordID(i,o),l,o),gt.setLinkedRecordID(i,o,l);var u=this._recordSource.get(l);if(u)this._validateRecordType(u,n,a);else{var d=n.concreteType||this._getRecordType(a);u=gt.create(l,d),this._recordSource.set(l,u)}this._traverseSelections(n,u,a)},t._normalizePluralLink=function(n,i,o,a){var s=this;Array.isArray(a)||vi(!1);var l=gt.getLinkedRecordIDs(i,o),u=[];a.forEach(function(d,f){var h;if(d==null){u.push(d);return}s._path.push(String(f));var p=s._errorTrie;s._errorTrie=p==null?null:IN(p,f),typeof d!="object"&&vi(!1);var m=s._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:s._getRecordType(d))||l&&l[f]||jb(gt.getDataID(i),o,f);typeof m!="string"&&vi(!1),u.push(m);var g=s._recordSource.get(m);if(g)s._validateRecordType(g,n,d);else{var v=n.concreteType||s._getRecordType(d);g=gt.create(m,v),s._recordSource.set(m,g)}l&&s._validateConflictingLinkedFieldsWithIdenticalId(l[f],m,o),s._traverseSelections(n,g,d),s._errorTrie=p,s._path.pop()}),gt.setLinkedRecordIDs(i,o,u)},t._validateRecordType=function(n,i,o){if(FN.ENABLE_STORE_ID_COLLISION_LOGGING){var a,s=(a=i.concreteType)!==null&&a!==void 0?a:this._getRecordType(o),l=gt.getDataID(n),u=Jwe(l)&&l!==rEe||gt.getType(n)===s;if(!u){var d={name:"idCollision.typename",previous_typename:gt.getType(n),new_typename:s};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),Cz={normalize:sEe},zv=Ke.default,ON=zv(Qt),uEe=zv(Zi),cEe=zv(Ku),dEe=zv(Cz);function fEe(e,t,r,n,i){var o,a=e.data,s=e.errors,l=cEe.default.create(),u=uEe.default.create(t.dataID,r);l.set(t.dataID,u);var d=dEe.default.normalize(l,t,a,n,s,i);return(0,ON.default)((0,ON.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var hEe=fEe,pEe=oa,mEe=pEe.getInlineDataFragment,gEe=yr,vEe=gEe.FRAGMENTS_KEY,MN=Me;function _Ee(e,t){var r,n=mEe(e);if(t==null)return t;typeof t!="object"&&MN(!1);var i=(r=t[vEe])===null||r===void 0?void 0:r[n.name];return i==null&&MN(!1),i}var bEe=_Ee,yEe=1e5;function xEe(){return yEe++}var Rz=xEe,SEe=Rz;function wEe(e,t){return{execute:function(n,i,o,a,s,l,u,d){var f=SEe(),h={start:function(g){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(g){e.__log({name:"network.next",networkRequestId:f,response:g})},error:function(g){e.__log({name:"network.error",networkRequestId:f,error:g})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(g){e.__log({name:"network.info",networkRequestId:f,info:g})};return t.execute(n,i,o,a,p,l,u,d).do(h)}}}var EEe=wEe,kEe=Ke.default,ff=kEe(Ur),CEe=Me,REe=(function(){function e(){this._ownersToPendingOperations=new Map,this._pendingOperationsToOwners=new Map,this._ownersToPendingPromise=new Map}var t=e.prototype;return t.update=function(n,i){if(i.size!==0){var o=n.identifier,a=new Set,s=(0,ff.default)(i),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),a.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),a.add(d))}}catch(v){s.e(v)}finally{s.f()}if(a.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,ff.default)(a),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;this._resolveOwnerResolvers(g),h.add(g)}}catch(v){p.e(v)}finally{p.f()}this._pendingOperationsToOwners.set(o,h)}}},t.complete=function(n){var i=n.identifier,o=this._pendingOperationsToOwners.get(i);if(o!=null){var a=new Set,s=new Set,l=(0,ff.default)(o),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=this._ownersToPendingOperations.get(d);f&&(f.delete(i),f.size>0?s.add(d):a.add(d))}}catch(x){l.e(x)}finally{l.f()}var h=(0,ff.default)(a),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;this._resolveOwnerResolvers(m),this._ownersToPendingOperations.delete(m)}}catch(x){h.e(x)}finally{h.f()}var g=(0,ff.default)(s),v;try{for(g.s();!(v=g.n()).done;){var _=v.value;this._resolveOwnerResolvers(_)}}catch(x){g.e(x)}finally{g.f()}this._pendingOperationsToOwners.delete(i)}},t._resolveOwnerResolvers=function(n){var i=this._ownersToPendingPromise.get(n);i?.resolve(),this._ownersToPendingPromise.delete(n)},t.getPendingOperationsAffectingOwner=function(n){var i=n.identifier,o=this._ownersToPendingOperations.get(i);if(o==null||o.size===0)return null;var a=this._ownersToPendingPromise.get(i);if(a!=null)return{promise:a.promise,pendingOperations:a.pendingOperations};var s,l=new Promise(function(d){s=d});s==null&&CEe(!1);var u=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:s,pendingOperations:u}),{promise:l,pendingOperations:u}},e})(),AEe=REe;function TEe(e){var t=typeof v0<"u"?v0:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var $Ee=TEe,NEe=za,DEe=NEe.generateClientID,FEe=yr,IEe=FEe.ROOT_ID,PEe=DEe(IEe,"viewer"),OEe="Viewer",C2={VIEWER_ID:PEe,VIEWER_TYPE:OEe},Az=C2,MEe=Az.VIEWER_ID,LEe=Az.VIEWER_TYPE;function zEe(e,t){return t===LEe&&e.id==null?MEe:e.id}var Tz=zEe,UEe=function(t){},BEe=UEe,$z=ju,jEe=$z.REQUEST,qEe=$z.SPLIT_OPERATION;function VEe(e){switch(e.kind){case jEe:return e.operation;case qEe:default:return e}}var R2=VEe;function LN(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];var a=0,s=r.replace(/%s/g,function(){return String(i[a++])}),l=new Error(s),u=Object.assign(l,{name:t,messageFormat:r,messageParams:i,type:e,taalOpcodes:[2,2]});if(u.stack===void 0)try{throw u}catch{}return u}var GEe={create:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return LN.apply(void 0,["error",t,r].concat(i))},createWarning:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return LN.apply(void 0,["warn",t,r].concat(i))}},Kb,Hb,KEe=typeof window<"u"&&typeof((Kb=window)===null||Kb===void 0||(Hb=Kb.performance)===null||Hb===void 0?void 0:Hb.now)=="function";function zN(){return KEe?window.performance.now():Date.now()}function HEe(e){var t=zN(),r=e();return[t,zN()-t,r]}var WEe=HEe,Nz=Ke.default,hf=Nz(Ur),pf=Nz($l),Wb=Dl,JEe=Rz,Jb=R2,QEe=GEe,gm=Ro,YEe=qu,XEe=YEe.stableCopy,ZEe=WEe,Dz=za,UN=Dz.generateClientID,e2e=Dz.generateUniqueClientID,t2e=Nl,r2e=t2e.getLocalVariables,vm=Zi,Fz=aa,Qb=Fz.createNormalizationSelector,n2e=Fz.createReaderSelector,_m=Ku,A2=yr,BN=A2.ROOT_TYPE,i2e=A2.TYPENAME_KEY,o2e=A2.getStorageKey,Vr=Me;function a2e(e){return new s2e(e)}var s2e=(function(){function e(r){var n=this,i,o,a,s=r.actorIdentifier,l=r.getDataID,u=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,m=r.operationLoader,g=r.operationTracker,v=r.optimisticConfig,_=r.scheduler,x=r.shouldProcessClientComponents,S=r.sink,E=r.source,k=r.treatMissingFieldsAsNull,R=r.updater,T=r.log,A=r.normalizeResponse;this._actorIdentifier=s,this._getDataID=l,this._treatMissingFieldsAsNull=k,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=T,this._executeId=JEe(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=m,this._operationTracker=g,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(i=(o=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&o!==void 0?o:((a=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=u,this._scheduler=_,this._sink=S,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=R,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=x,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=A;var N=this._nextSubscriptionId++;gm.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),E.subscribe({complete:function(){return n._complete(N)},error:function(O){return n._error(O)},next:function(O){try{n._next(N,O)}catch(D){S.error(D)}},start:function(O){var D;n._start(N,O),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(D=n._operation.request.cacheConfig)!==null&&D!==void 0?D:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!gm.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1)}var t=e.prototype;return t.cancel=function(){var n=this;if(this._state!=="completed"){this._state="completed",this._operationExecutions.delete(this._operation.request.identifier),this._subscriptions.size!==0&&(this._subscriptions.forEach(function(o){return o.unsubscribe()}),this._subscriptions.clear());var i=this._optimisticUpdates;i!==null&&(this._optimisticUpdates=null,i.forEach(function(o){return n._getPublishQueueAndSaveActor().revertUpdate(o)}),this._runPublishQueue()),this._incrementalResults.clear(),this._asyncStoreUpdateDisposable!=null&&(this._asyncStoreUpdateDisposable.dispose(),this._asyncStoreUpdateDisposable=null),this._completeFns=[],this._completeOperationTracker(),this._disposeRetainedData()}},t._updateActiveState=function(){var n;switch(this._state){case"started":{n="active";break}case"loading_incremental":{n="active";break}case"completed":{n="inactive";break}case"loading_final":{n=this._pendingModulePayloadsCount>0||this._useExecTimeResolvers&&!this._execTimeResolverResponseComplete?"active":"inactive";break}default:this._state,Vr(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,a=this._scheduler;if(a!=null){var s=this._nextSubscriptionId++;Wb.create(function(l){var u=a.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return a.cancel(u)}}).subscribe({complete:function(){return o._complete(s)},error:function(u){return o._error(u)},start:function(u){return o._start(s,u)}})}else n()},t._complete=function(n){this._subscriptions.delete(n),this._subscriptions.size===0&&(this.cancel(),this._sink.complete(),this._log({name:"execute.complete",executeId:this._executeId}))},t._error=function(n){this.cancel(),this._sink.error(n),this._log({name:"execute.error",executeId:this._executeId,error:n})},t._start=function(n,i){this._subscriptions.set(n,i),this._updateActiveState()},t._next=function(n,i){var o=this,a=this._state==="loading_incremental"?"low":"default";this._schedule(function(){o._log({name:"execute.next.start",executeId:o._executeId,response:i,operation:o._operation}),o._handleNext(i),o._maybeCompleteSubscriptionOperationTracking(),o._log({name:"execute.next.end",executeId:o._executeId,response:i,operation:o._operation})},a)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(a){if(!(a.data===null&&a.extensions!=null&&!a.hasOwnProperty("errors")))if(a.data==null){var s=a.hasOwnProperty("errors")&&a.errors!=null?a.errors:null,l=s?s.map(function(f){var h=f.message;return h}).join(`
77
+ `):"(No errors)",u=QEe.create("RelayNetwork","No data returned for operation `"+i._operation.request.node.params.name+"`, got error(s):\n"+l+"\n\nSee the error `source` property for more information.");throw u.source={errors:s,operation:i._operation.request.node,variables:i._operation.request.variables},u.stack,u}else{var d=a;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(s){var l;return((l=s.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&Vr(!1),!1;var o=n[0],a=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return a&&this._state!=="started"&&Vr(!1),a?(this._processOptimisticResponse(o,null,this._treatMissingFieldsAsNull),this._sink.next(o),!0):!1},t._handleNext=function(n){if(this._state!=="completed"){this._seenActors.clear();var i=Array.isArray(n)?n:[n],o=this._handleErrorResponse(i);if(o.length===0){var a=i.some(function(A){var N;return((N=A.extensions)===null||N===void 0?void 0:N.is_final)===!0});a&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var s=this._handleOptimisticResponses(o);if(!s){var l=l2e(o),u=l[0],d=l[1],f=l[2],h=u.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var m=e2e();this._operation={request:this._operation.request,fragment:n2e(this._operation.fragment.node,m,this._operation.fragment.variables,this._operation.fragment.owner),root:Qb(this._operation.root.node,m,this._operation.root.variables)}}var g=this._processResponses(u);this._processPayloadFollowups(g)}if(p)for(var v=[],_=0;_<f.length;_++){var x,S=f[_],E=new _m(S.data),a=((x=S.extensions)===null||x===void 0?void 0:x.is_final)===!0,k={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:a,source:E};this._getPublishQueueAndSaveActor().commitPayload(this._operation,k,this._updater),v.push(k),this._execTimeResolverResponseComplete=a,a&&this._updateActiveState()}if(d.length>0){var R=this._processIncrementalResponses(d);this._processPayloadFollowups(R)}this._isSubscriptionOperation&&(o[0].extensions==null?o[0].extensions={__relay_subscription_root_id:this._operation.fragment.dataID}:o[0].extensions.__relay_subscription_root_id=this._operation.fragment.dataID);var T=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(T),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var a=this;if(this._optimisticUpdates!==null&&Vr(!1),!(n==null&&i==null)){var s=[];if(n){var l=this._normalizeResponse(n,this._operation.root,BN,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);jN(l),s.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,s)}else i&&s.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:_m.create(),isFinal:!1},updater:i});this._optimisticUpdates=s,s.forEach(function(d){return a._getPublishQueueAndSaveActor().applyUpdate(d)});var u=this._runPublishQueue();gm.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(u)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var o=n.followupPayloads,a=(0,hf.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;switch(l.kind){case"ModuleImportPayload":var u=this._expectOperationLoader(),d=u.get(l.operationReference);if(d==null)this._processAsyncOptimisticModuleImport(l);else{var f=this._processOptimisticModuleImport(d,l);i.push.apply(i,(0,pf.default)(f))}break;case"ActorPayload":break;default:Vr(!1)}}}catch(h){a.e(h)}finally{a.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=r2e(n.variables,i.argumentDefinitions,n.args):o=n.variables;var a=Qb(i,n.dataID,o),s={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(s,a,n.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:n.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers)},t._processOptimisticModuleImport=function(n,i){var o=Jb(n),a=[],s=this._normalizeFollowupPayload(i,o);return jN(s),a.push({operation:this._operation,payload:s,updater:null}),this._processOptimisticFollowups(s,a),a},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var a=i._processOptimisticModuleImport(o,n);if(a.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var s;(s=i._optimisticUpdates).push.apply(s,(0,pf.default)(a)),i._runPublishQueue()}}})},t._processResponses=function(n){var i=this;return this._log({name:"execute.normalize.start",operation:this._operation}),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(o){i._getPublishQueueAndSaveActor().revertUpdate(o)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),n.map(function(o){var a=i._normalizeResponse(o,i._operation.root,BN,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,a,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),a})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var a=o.incrementalPlaceholders,s=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),s&&s.length!==0&&s.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processFollowupPayload(d),i._actorIdentifier=h}),a&&a.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",a.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processIncrementalPlaceholder(o,d),i._actorIdentifier=h}),i._isClientPayload||i._state==="loading_final")){var u=[];a.forEach(function(d){d.kind==="defer"&&u.push(i._processDeferResponse(d.label,d.path,d,{data:d.data,extensions:{is_final:!0}}))}),u.length>0&&i._processPayloadFollowups(u)}})},t._maybeCompleteSubscriptionOperationTracking=function(){!this._isSubscriptionOperation&&!(this._useExecTimeResolvers&&this._execTimeResolverResponseComplete&&this._state==="loading_final")||this._pendingModulePayloadsCount===0&&this._incrementalPayloadsPending===!1&&this._completeOperationTracker()},t._processFollowupPayload=function(n){var i=this;switch(n.kind){case"ModuleImportPayload":var o=this._expectOperationLoader(),a=o.get(n.operationReference);if(a!=null)this._processFollowupPayloadWithNormalizationNode(n,Jb(a));else{var s=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},u=Wb.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));Wb.create(function(d){var f,h=u.subscribe({next:function(m){if(m!=null){var g=function(){try{var x=Jb(m),S=gm.BATCH_ASYNC_MODULE_UPDATES_FN,E=S!=null&&i._pendingModulePayloadsCount>1,k=ZEe(function(){if(i._handleFollowupPayload(n,x),E)i._scheduleAsyncStoreUpdate(S,d.complete);else{var A=i._runPublishQueue();i._updateOperationTracker(A)}}),R=k[0],T=k[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:x.name,duration:T}),E||d.complete()}catch(A){d.error(A)}},v=i._scheduler;v==null?g():f=v.schedule(g)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(s),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(s,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:Vr(!1)}},t._processFollowupPayloadWithNormalizationNode=function(n,i){this._handleFollowupPayload(n,i),this._maybeCompleteSubscriptionOperationTracking()},t._handleFollowupPayload=function(n,i){var o=this._normalizeFollowupPayload(n,i);this._getPublishQueueAndSaveActor().commitPayload(this._operation,o),this._processPayloadFollowups([o])},t._processIncrementalPlaceholder=function(n,i){var o,a=i.label,s=i.path,l=s.map(String).join("."),u=this._incrementalResults.get(a);u==null&&(u=new Map,this._incrementalResults.set(a,u));var d=u.get(l),f=d!=null&&d.kind==="response"?d.responses:null;u.set(l,{kind:"placeholder",placeholder:i});var h;i.kind==="stream"?h=i.parentID:i.kind==="defer"?h=i.selector.dataID:Vr(!1);var p=n.source.get(h),m=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(k){var R=UN(k.dataID,k.fieldKey);return k.dataID===h||R===h});p==null&&Vr(!1);var g,v,_=this._source.get(h);if(_!=null){g=vm.update(_.record,p);var x=new Map,S=function(R){var T=u2e(R);x.set(T,R)};_.fieldPayloads.forEach(S),m.forEach(S),v=Array.from(x.values())}else g=p,v=m;if(this._source.set(h,{record:g,fieldPayloads:v}),f!=null){var E=this._processIncrementalResponses(f);this._processPayloadFollowups(E)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(a){var s=a.label,l=a.path,u=a.response,d=i._incrementalResults.get(s);if(d==null&&(d=new Map,i._incrementalResults.set(s,d)),s.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[a]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(a);return}var p=h.placeholder;p.kind!=="defer"&&Vr(!1),o.push(i._processDeferResponse(s,l,p,u))}else{var m=l.slice(0,-2).map(String).join("."),g=d.get(m);if(g==null){g={kind:"response",responses:[a]},d.set(m,g);return}else if(g.kind==="response"){g.responses.push(a);return}var v=g.placeholder;v.kind!=="stream"&&Vr(!1),o.push(i._processStreamResponse(s,l,v,u))}}),o},t._processDeferResponse=function(n,i,o,a){var s,l=o.selector.dataID,u=this._actorIdentifier;this._actorIdentifier=(s=o.actorIdentifier)!==null&&s!==void 0?s:this._actorIdentifier;var d=this._normalizeResponse(a,o.selector,o.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:o.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,d);var f=this._source.get(l);f==null&&Vr(!1);var h=f.fieldPayloads;if(h.length!==0){var p,m={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:_m.create(),isFinal:((p=a.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,m)}return this._actorIdentifier=u,d},t._processStreamResponse=function(n,i,o,a){var s=o.parentID,l=o.node,u=o.variables,d=o.actorIdentifier,f=this._actorIdentifier;this._actorIdentifier=d??this._actorIdentifier;var h=l.selections[0];h!=null&&h.kind==="LinkedField"&&h.plural===!0||Vr(!1);var p=this._normalizeStreamItem(a,s,h,u,i,o.path),m=p.fieldPayloads,g=p.itemID,v=p.itemIndex,_=p.prevIDs,x=p.relayPayload,S=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,x,function(k){var R=k.get(s);if(R!=null){var T=R.getLinkedRecords(S);if(T!=null&&!(T.length!==_.length||T.some(function(N,P){return _[P]!==(N&&N.getDataID())}))){var A=(0,pf.default)(T);A[v]=k.get(g),R.setLinkedRecords(A,S)}}}),m.length!==0){var E={errors:null,fieldPayloads:m,incrementalPlaceholders:null,followupPayloads:null,source:_m.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,E)}return this._actorIdentifier=f,x},t._normalizeStreamItem=function(n,i,o,a,s,l){var u,d,f,h,p=n.data;typeof p!="object"&&Vr(!1);var m=(u=o.alias)!==null&&u!==void 0?u:o.name,g=o2e(o,a),v=this._source.get(i);v==null&&Vr(!1);var _=v.record,x=v.fieldPayloads,S=vm.getLinkedRecordIDs(_,g);S==null&&Vr(!1);var E=s[s.length-1],k=parseInt(E,10);k===E&&k>=0||Vr(!1);var R=(d=o.concreteType)!==null&&d!==void 0?d:p[i2e];typeof R!="string"&&Vr(!1);var T=(f=(h=this._getDataID(p,R))!==null&&h!==void 0?h:S?.[k])!==null&&f!==void 0?f:UN(i,g,k);typeof T!="string"&&Vr(!1);var A=Qb(o,T,a),N=vm.clone(_),P=(0,pf.default)(S);P[k]=T,vm.setLinkedRecordIDs(N,g,P),this._source.set(i,{record:N,fieldPayloads:x});var O=this._normalizeResponse(n,A,R,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,pf.default)(l),[m,String(k)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:x,itemID:T,itemIndex:k,prevIDs:S,relayPayload:O,storageKey:g}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var a=o._runPublishQueue();o._updateOperationTracker(a);var s=(0,hf.default)(o._completeFns),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;u()}}catch(d){s.e(d)}finally{s.f()}o._completeFns=[]}))},t._updateOperationTracker=function(n){n!=null&&n.length>0&&this._operationTracker.update(this._operation.request,new Set(n))},t._completeOperationTracker=function(){this._operationTracker.complete(this._operation.request)},t._getPublishQueueAndSaveActor=function(){return this._seenActors.add(this._actorIdentifier),this._getPublishQueue(this._actorIdentifier)},t._getActorsToVisit=function(){return this._seenActors.size===0?new Set([this._actorIdentifier]):this._seenActors},t._runPublishQueue=function(n){var i=new Set,o=(0,hf.default)(this._getActorsToVisit()),a;try{for(o.s();!(a=o.n()).done;){var s=a.value,l=this._getPublishQueue(s).run(n);l.forEach(function(u){return i.add(u)})}}catch(u){o.e(u)}finally{o.f()}return Array.from(i)},t._retainData=function(){var n=(0,hf.default)(this._getActorsToVisit()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;this._retainDisposables.has(o)||this._retainDisposables.set(o,this._getStore(o).retain(this._operation))}}catch(a){n.e(a)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,hf.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(a){n.e(a)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Vr(!1),n},e})();function l2e(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var a=i.label,s=i.path;(a==null||s==null)&&Vr(!1),r.push({label:a,path:s,response:i})}else((o=i.extensions)===null||o===void 0?void 0:o.is_normalized)===!0?n.push(i):t.push(i)}),[t,r,n]}function u2e(e){var t;return(t=JSON.stringify(XEe(e)))!==null&&t!==void 0?t:""}function jN(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Vr(!1)}var c2e={execute:a2e},d2e=Promise.resolve();function f2e(e){d2e.then(e).catch(h2e)}function h2e(e){setTimeout(function(){throw e},0)}var p2e=f2e,mn=Zi,m2e=Ov,qN=m2e.EXISTENT,Yb=Me,g2e=(function(){function e(r,n){this.__sources=[n,r],this._base=r,this._sink=n}var t=e.prototype;return t.unstable_getRawRecordWithChanges=function(n){var i=this._base.get(n),o=this._sink.get(n);if(o===void 0){if(i==null)return i;var a=mn.clone(i);return a}else{if(o===null)return null;if(i!=null){var s=mn.update(i,o);return s}else{var l=mn.clone(o);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var o=this._base.get(n);o||Yb(!1),i=mn.create(n,mn.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),a=this._base.get(n);o||a||Yb(!1);var s=this._getSinkRecord(i);a&&mn.copyFields(a,s),o&&mn.copyFields(o,s)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);mn.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==qN&&this._sink.getStatus(n)!==qN||Yb(!1);var o=mn.create(n,i);this._sink.set(n,o)},t.delete=function(n){this._sink.delete(n)},t.getStatus=function(n){return this._sink.has(n)?this._sink.getStatus(n):this._base.getStatus(n)},t.getType=function(n){for(var i=0;i<this.__sources.length;i++){var o=this.__sources[i].get(n);if(o)return mn.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=mn.getValue(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setValue=function(n,i,o){var a=this._getSinkRecord(n);mn.setValue(a,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=mn.getErrors(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setErrors=function(n,i,o){var a=this._getSinkRecord(n);mn.setErrors(a,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=mn.getLinkedRecordID(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordID=function(n,i,o){var a=this._getSinkRecord(n);mn.setLinkedRecordID(a,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=mn.getLinkedRecordIDs(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var a=this._getSinkRecord(n);mn.setLinkedRecordIDs(a,i,o)},e})(),Iz=g2e,v2e=Ke.default,Uv=v2e(Ur),_2e=yr,hd=_2e.getArgumentValues,b2e=["id","__id","__typename","js"];function y2e(e,t,r,n,i){var o={};return Bh(o,e,t,r,n,i),o}function Bh(e,t,r,n,i,o){var a,s=(0,Uv.default)(n),l;try{var u=function(){var p=l.value;switch(p.kind){case"LinkedField":p.plural?Object.defineProperty(e,(d=p.alias)!==null&&d!==void 0?d:p.name,{get:w2e(p,r,t,i,o),set:x2e(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:E2e(p,r,t,i,o),set:S2e(p,r,t,i)});break;case"ScalarField":var m=(a=p.alias)!==null&&a!==void 0?a:p.name;Object.defineProperty(e,m,{get:function(){var v,_=hd((v=p.args)!==null&&v!==void 0?v:[],r),x=t.getValue(p.name,_);return x==null&&(x=R2e(p,_,t,i,o)),x},set:b2e.includes(p.name)?void 0:function(g){var v,_=hd((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(g,p.name,_)}});break;case"InlineFragment":t.getType()===p.type&&Bh(e,t,r,p.selections,i,o);break;case"ClientExtension":Bh(e,t,r,p.selections,i,o);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":case"RelayLiveResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw p.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(s.s();!(l=s.n()).done;){var d,f;u()}}catch(h){s.e(h)}finally{s.f()}}function x2e(e,t,r,n){return function(o){var a,s=hd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=o.map(function(u){if(u==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var d=u.__id;if(d==null)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var f=n.get(d);if(f==null)throw new Error("Did not find item with data id ".concat(d," in the store."));return f});r.setLinkedRecords(l,e.name,s)}}function S2e(e,t,r,n){return function(o){var a,s=hd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)r.setValue(o,e.name,s);else{var l=o.__id;if(l==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var u=n.get(l);if(u==null)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(u,e.name,s)}}}function w2e(e,t,r,n,i){return function(){var o,a=hd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecords(e.name,a);return s===void 0&&(s=C2e(e,a,r,n,i)),s!=null?s.map(function(l){if(l!=null){var u={};return Bh(u,l,t,e.selections,n,i),u}else return l}):s}}function E2e(e,t,r,n,i){return function(){var o,a=hd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecord(e.name,a);if(s===void 0&&(s=k2e(e,a,r,n,i)),s!=null){var l={};return Bh(l,s,t,e.selections,n,i),l}else return s}}function k2e(e,t,r,n,i){var o=(0,Uv.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="linked"){var l=s.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(u){o.e(u)}finally{o.f()}}function C2e(e,t,r,n,i){var o=(0,Uv.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="pluralLinked"){var l=s.handle(e,r,t,n);if(l!=null)return l.map(function(u){if(u!=null)return n.get(u)})}}}catch(u){o.e(u)}finally{o.f()}}function R2e(e,t,r,n,i){var o=(0,Uv.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="scalar"){var l=s.handle(e,r,t,n);if(l!==void 0)return l}}}catch(u){o.e(u)}finally{o.f()}}var Pz={createUpdatableProxy:y2e},A2e=oa,T2e=A2e.getFragment,$2e=aa,N2e=$2e.getVariablesFromFragment,D2e=yr,F2e=D2e.ID_KEY,I2e=Pz,P2e=I2e.createUpdatableProxy,O2e=Me;function M2e(e,t,r,n){var i=T2e(e),o=N2e(i,t),a=t[F2e],s=r.get(a);return s==null&&O2e(!1),{updatableData:P2e(s,o,i.selections,r,n)}}var Oz={readUpdatableFragment:M2e},L2e=oa,z2e=L2e.getUpdatableQuery,U2e=Pz,B2e=U2e.createUpdatableProxy;function j2e(e,t,r,n){var i=z2e(e);return{updatableData:B2e(r.getRoot(),t,i.fragment.selections,r,n)}}var Mz={readUpdatableQuery:j2e},q2e=za,V2e=q2e.generateClientID,G2e=yr,zs=G2e.getStableStorageKey,bm=Me,K2e=(function(){function e(r,n,i){this._dataID=i,this._mutator=n,this._source=r}var t=e.prototype;return t.copyFieldsFrom=function(n){this._mutator.copyFields(n.getDataID(),this._dataID)},t.getDataID=function(){return this._dataID},t.getType=function(){var n=this._mutator.getType(this._dataID);return n==null&&bm(!1),n},t.getValue=function(n,i){var o=zs(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,a){return Lz(n)||bm(!1),this.setValue__UNSAFE(n,i,o,a)},t.getErrors=function(n,i){var o=zs(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,a){var s=zs(i,o);return this._mutator.setValue(this._dataID,s,n),a!=null&&(a.length===0?this._mutator.setErrors(this._dataID,s):this._mutator.setErrors(this._dataID,s,a)),this},t.getLinkedRecord=function(n,i){var o=zs(n,i),a=this._mutator.getLinkedRecordID(this._dataID,o);return a!=null?this._source.get(a):a},t.setLinkedRecord=function(n,i,o){n instanceof e||bm(!1);var a=zs(i,o),s=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,a,s),this},t.getOrCreateLinkedRecord=function(n,i,o){var a=this.getLinkedRecord(n,o);if(!a){var s,l=zs(n,o),u=V2e(this.getDataID(),l);a=(s=this._source.get(u))!==null&&s!==void 0?s:this._source.create(u,i),this.setLinkedRecord(a,n,o)}return a},t.getLinkedRecords=function(n,i){var o=this,a=zs(n,i),s=this._mutator.getLinkedRecordIDs(this._dataID,a);return s==null?s:s.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||bm(!1);var a=zs(i,o),s=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,a,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function Lz(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(Lz)}var H2e=K2e,W2e=Zi,zz=Ov,Xb=zz.EXISTENT,VN=zz.NONEXISTENT,Uz=yr,Zb=Uz.ROOT_ID,GN=Uz.ROOT_TYPE,J2e=Oz,Q2e=J2e.readUpdatableFragment,Y2e=Mz,X2e=Y2e.readUpdatableQuery,Z2e=H2e,ym=Me,eke=(function(){function e(r,n,i,o,a){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=a??function(s){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,a=n.getRecordIDs();a.forEach(function(s){var l=n.getStatus(s);if(l===Xb){var u=n.get(s);u&&(o.__mutator.getStatus(s)!==Xb&&o.create(s,W2e.getType(u)),o.__mutator.copyFieldsFromRecord(u,s))}else l===VN&&o.delete(s)}),i&&i.length&&i.forEach(function(s){var l=o._handlerProvider&&o._handlerProvider(s.handle);l||ym(!1),l.update(o,s)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var o=this.get(n);return o||ym(!1),o},t.delete=function(n){n===Zb&&ym(!1),delete this._proxies[n],this.__mutator.delete(n)},t.get=function(n){if(!this._proxies.hasOwnProperty(n)){var i=this.__mutator.getStatus(n);i===Xb?this._proxies[n]=new Z2e(this,this.__mutator,n):this._proxies[n]=i===VN?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(Zb);return n||(n=this.create(Zb,GN)),n&&n.getType()===GN||ym(!1),n},t.invalidateStore=function(){this._invalidatedStore=!0},t.isStoreMarkedForInvalidation=function(){return this._invalidatedStore},t.markIDForInvalidation=function(n){this._idsMarkedForInvalidation.add(n)},t.getIDsMarkedForInvalidation=function(){return this._idsMarkedForInvalidation},t.readUpdatableQuery=function(n,i){return X2e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return Q2e(n,i,this,this._missingFieldHandlers)},e})(),Bz=eke,tke=ju,KN=tke.LINKED_FIELD,rke=yr,nke=rke.getHandleStorageKey,ike=As,oke=Me;function ake(e,t,r){var n=t.find(function(o){return o.kind===KN&&o.name===e.name&&o.alias===e.alias&&ike(o.args,e.args)});n&&n.kind===KN||oke(!1);var i=nke(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var jz=ake,ske=ju,HN=ske.SCALAR_FIELD,lke=yr,uke=lke.getHandleStorageKey,cke=As,dke=Me;function fke(e,t,r){var n=t.find(function(o){return o.kind===HN&&o.name===e.name&&o.alias===e.alias&&cke(o.args,e.args)});n&&n.kind===HN||dke(!1);var i=uke(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var hke=fke,pke=Ke.default,xm=pke(Ur),mke=Iz,gke=Bz,vke=R2,_ke=za,bke=_ke.isClientID,yke=jz,xke=hke,Ske=Nl,WN=Ske.getLocalVariables,JN=Zi,qz=Ov,ey=qz.EXISTENT,wke=qz.UNKNOWN,T2=yr,Vz=Lv,Eke=Vz.TYPE_SCHEMA_TYPE,ty=Vz.generateTypeID,mf=Me,kke=T2.getModuleOperationKey,Sm=T2.getStorageKey,ry=T2.getArgumentValues;function Cke(e,t,r,n,i,o,a,s,l,u){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new Rke(e,t,r,h,i,o,a,s,l,u),m=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),m}var Rke=(function(){function e(r,n,i,o,a,s,l,u,d,f){this._getSourceForActor=r,this._getTargetForActor=n,this._getDataID=l,this._source=r(i),this._mutatorRecordSourceProxyCache=new Map;var h=this._getMutatorAndRecordProxyForActor(i),p=h[0],m=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=a,this._mutator=p,this._operationLoader=s??null,this._recordSourceProxy=m,this._recordWasMissing=!1,this._variables=o,this._shouldProcessClientComponents=u,this._log=d}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(n){var i=this._mutatorRecordSourceProxyCache.get(n);if(i==null){var o=this._getTargetForActor(n),a=new mke(this._getSourceForActor(n),o),s=new gke(a,this._getDataID,void 0,this._handlers,this._log);i=[a,s],this._mutatorRecordSourceProxyCache.set(n,i)}return i},t.check=function(n,i){return this._assignClientAbstractTypes(n),this._traverse(n,i),this._recordWasMissing===!0?{status:"missing",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}:{status:"available",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||mf(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&bke(i))){var o=n.args!=null?ry(n.args,this._variables):{},a=(0,xm.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="scalar"){var u=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(u!==void 0)return u}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?ry(n.args,this._variables):{},a=(0,xm.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="linked"){var u=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(u!==void 0&&(u===null||this._mutator.getStatus(u)===ey))return u}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,a=n.args!=null?ry(n.args,this._variables):{},s=(0,xm.default)(this._handlers),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(u.kind==="pluralLinked"){var d=u.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&o._mutator.getStatus(h)===ey});if(f)return d}else if(d===null)return null}}}catch(h){s.e(h)}finally{s.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===wke&&this._handleMissing(),o===ey){var a=this._source.get(i),s=JN.getInvalidationEpoch(a);s!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,s):s),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ScalarField":o._checkScalar(a,i);break;case"LinkedField":a.plural?o._checkPluralLink(a,i):o._checkLink(a,i);break;case"ActorChange":o._checkActorChange(a.linkedField,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":{var l=a.abstractKey;if(l==null){var u=o._mutator.getType(i);u===a.type&&o._traverseSelections(a.selections,i)}else{var d=o._mutator.getType(i);d==null&&mf(!1);var f=ty(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(a.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=yke(a,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var m=xke(a,n,o._variables);o._checkScalar(m,i);break}case"ModuleImport":o._checkModuleImport(a,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"FragmentSpread":var g=o._variables;o._variables=WN(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=g;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(a.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var _=a.abstractKey,x=o._mutator.getType(i);x==null&&mf(!1);var S=ty(x),E=o._mutator.getValue(S,_);E==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(a,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(a.backingField,i);break;default:mf(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&mf(!1);var a=kke(n.documentName),s=this._mutator.getValue(i,a);if(s==null){s===void 0&&this._handleMissing();return}var l=o.get(s);if(l!=null){var u=vke(l),d=this._variables;this._variables=WN(this._variables,u.argumentDefinitions,n.args),this._traverse(u,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=Sm(n,this._variables),a=this._mutator.getValue(i,o);a===void 0&&(a=this._handleMissingScalarField(n,i),a!==void 0&&this._mutator.setValue(i,o,a))},t._checkLink=function(n,i){var o=Sm(n,this._variables),a=this._mutator.getLinkedRecordID(i,o);a===void 0&&(a=this._handleMissingLinkField(n,i),a!=null?this._mutator.setLinkedRecordID(i,o,a):a===null&&this._mutator.setValue(i,o,null)),a!=null&&this._traverse(n,a)},t._checkPluralLink=function(n,i){var o=this,a=Sm(n,this._variables),s=this._mutator.getLinkedRecordIDs(i,a);s===void 0&&(s=this._handleMissingPluralLinkField(n,i),s!=null?this._mutator.setLinkedRecordIDs(i,a,s):s===null&&this._mutator.setValue(i,a,null)),s&&s.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=Sm(n,this._variables),a=this._source.get(i),s=a!=null?JN.getActorLinkedRecordID(a,o):a;if(s==null)s===void 0&&this._handleMissing();else{var l=s[0],u=s[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),m=p[0],g=p[1];this._source=this._getSourceForActor(l),this._mutator=m,this._recordSourceProxy=g,this._assignClientAbstractTypes(n),this._traverse(n,u),this._source=d,this._mutator=f,this._recordSourceProxy=h}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,xm.default)(i[s]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=ty(d);this._source.get(f)==null&&this._mutator.create(f,Eke),this._mutator.getValue(f,s)==null&&this._mutator.setValue(f,s,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),Ake={check:Cke},Tke=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},$ke=Zi,Nke=yr,Dke=Nke.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,Fke=Me;function Ike(e){var t=$ke.getValue(e,Dke);return t==null?null:(t instanceof Set||Fke(!1),t)}var Gz=Ike;function Pke(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var Oke=Pke,Mke=Ke.default,va=Mke(Ur),Lke=Fv,zke=ju,QN=zke.RELAY_LIVE_RESOLVER,Uke=Ro,YN=Tke,Kz=za,wm=Kz.generateClientID,ny=Kz.generateClientObjectClientID,rt=Zi,Bke=aa,jke=Bke.createNormalizationSelector,Em=Ku,qke=Cz,Vke=qke.normalize,Wu=yr,iy=Wu.RELAY_RESOLVER_ERROR_KEY,Lx=Wu.RELAY_RESOLVER_INVALIDATION_KEY,Gke=Wu.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,oy=Wu.RELAY_RESOLVER_SNAPSHOT_KEY,ay=Wu.RELAY_RESOLVER_VALUE_KEY,Kke=Wu.getReadTimeResolverStorageKey,Hke=Wu.getStorageKey,Wke=Gz,Jke=Oke,Qke=Iv,XN=Qke.isSuspenseSentinel,ma=Me,$2="__resolverLiveStateSubscription",km="__resolverLiveStateValue",Cm="__resolverLiveStateDirty",Hz="__RELAY_RESOLVER__",Yke="__relay_model_instance";function sy(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var Xke=(function(){function e(r,n){this._resolverIDToRecordIDs=new Map,this._recordIDToResolverIDs=new Map,this._getRecordSource=r,this._store=n,this._handlingBatch=!1,this._liveResolverBatchRecordSource=null}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){var l=this._getRecordSource(),u=Wf(l,n),d=Kke(i,o),f=rt.getLinkedRecordID(u,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,s)){var m;h!=null&&Jz(h),f=(m=f)!==null&&m!==void 0?m:wm(n,d),h=rt.create(f,Hz);var g=a();if(rt.setValue(h,oy,g.snapshot),rt.setValue(h,iy,g.error),i.kind===QN){if(g.resolverResult!=null){g.error!=null&&ma(!1);var v=g.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,g.resolverResult,i,o);l.set(f,h);var _=Wf(l,n),x=rt.clone(_);if(rt.setLinkedRecordID(x,d,f),l.set(n,x),i.fragment!=null){var S,E=Hke(i.fragment,o),k=wm(n,E);sy(this._resolverIDToRecordIDs,k,f),sy(this._recordIDToResolverIDs,n,k);var R=(S=g.snapshot)===null||S===void 0?void 0:S.seenRecords;if(R!=null){var T=(0,va.default)(R),A;try{for(T.s();!(A=T.n()).done;){var N=A.value;sy(this._recordIDToResolverIDs,N,k)}}catch(J){T.e(J)}finally{T.f()}}}}else if(i.kind===QN&&rt.getValue(h,Cm)){var P;f=(P=f)!==null&&P!==void 0?P:wm(n,d),h=rt.clone(h);var O=rt.getValue(h,km);Jke(O)||ma(!1),p=this._setLiveResolverValue(h,O,i,o),rt.setValue(h,Cm,!1),l.set(f,h)}var D=this._getResolverValue(h),U=rt.getValue(h,oy),B=rt.getValue(h,iy),q=null;if(XN(D)){var Q;q=(Q=f)!==null&&Q!==void 0?Q:wm(n,d)}return[D,f,B,U,q,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&ma(!1);var a=rt.getValue(o,km);return new Promise(function(s){var l=a.subscribe(function(){l(),s()})})},t._setLiveStateValue=function(n,i,o,a,s){var l=this._makeLiveStateHandler(i),u=o.subscribe(l);rt.setValue(n,km,o);var d=this._setLiveResolverValue(n,o,a,s);return rt.setValue(n,Cm,!1),rt.setValue(n,$2,u),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),a=o.get(n);if(a&&rt.hasValue(a,km)){var s=rt.clone(a);rt.setValue(s,Cm,!0),i._setLiveResolverUpdate(n,s)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=Em.create()),this._liveResolverBatchRecordSource.set(n,i);else{var o=Em.create();o.set(n,i),this._store.publish(o),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&ma(!1),this._handlingBatch=!0;try{n()}finally{this._liveResolverBatchRecordSource!=null&&(this._store.publish(this._liveResolverBatchRecordSource),this._store.notify()),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1}},t._setLiveResolverValue=function(n,i,o,a){var s=null,l=null;try{s=i.read()}catch(u){l=u}return rt.setValue(n,iy,l),this._setResolverValue(n,s,o,a)},t._setResolverValue=function(n,i,o,a){var s=o.normalizationInfo,l=null;if(i!=null&&s!=null&&!XN(i)){var u,d=Wke(n),f=new Set,h=this._getRecordSource();if(s.plural){Array.isArray(i)||ma(!1),u=[];for(var p=Em.create(),m=0;m<i.length;m++){var g=i[m];if(g!=null){typeof g!="object"&&ma(!1);var v=e3(s,g),_=ny(v,rt.getDataID(n),m),x=this._normalizeOutputTypeValue(_,g,a,s,[o.path,String(m)],v),S=(0,va.default)(x.getRecordIDs()),E;try{for(S.s();!(E=S.n()).done;){var k=E.value;p.set(k,Wf(x,k)),f.add(k)}}catch(D){S.e(D)}finally{S.f()}u.push(_)}}l=ZN(h,p,d)}else{typeof i!="object"&&ma(!1);var R=e3(s,i),T=ny(R,rt.getDataID(n)),A=this._normalizeOutputTypeValue(T,i,a,s,[o.path],R),N=(0,va.default)(A.getRecordIDs()),P;try{for(N.s();!(P=N.n()).done;){var O=P.value;f.add(O)}}catch(D){N.e(D)}finally{N.f()}u=T,l=ZN(h,A,d)}rt.setValue(n,Gke,f),YN(u),rt.setValue(n,ay,u)}else YN(i),rt.setValue(n,ay,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return rt.getValue(n,ay)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,a=Array.from(n);a.length;){var s=a.pop();o.add(s),n.add(s);var l=this._recordIDToResolverIDs.get(s);if(l!=null){var u=(0,va.default)(l),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;if(!o.has(f)){o.add(f);var h=this._resolverIDToRecordIDs.get(f);if(h==null)continue;var p=(0,va.default)(h),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;Wz(g,i),o.has(g)||(o.add(g),a.push(g))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){u.e(v)}finally{u.f()}}}},t._isInvalid=function(n,i){if(!rt.getValue(n,Lx))return!1;var o=rt.getValue(n,oy),a=o?.data,s=o?.selector;if(a==null||s==null)return!0;var l=i(s),u=l.data,d=Lke(a,u);if(d!==a)return!0;if(Uke.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=rt.clone(n);rt.setValue(f,Lx,!1);var h=this._getRecordSource();h.set(rt.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,a,s,l){var u=Em.create();switch(a.kind){case"OutputType":{var d=rt.create(n,l);u.set(n,d);var f=jke(a.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(s);return Vke(u,f,i,p,void 0,h).source}case"WeakModel":{var m=rt.create(n,l);return rt.setValue(m,Yke,i),u.set(n,m),u}default:a.kind,ma(!1)}},t.ensureClientRecord=function(n,i){var o=ny(i,n),a=this._getRecordSource();if(!a.has(o)){var s=rt.create(o,i);rt.setValue(s,"id",n),a.set(o,s)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return tCe(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,va.default)(n),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=this._getRecordSource().get(a);s!=null&&N2(s)&&this._getRecordSource().delete(a)}}catch(l){i.e(l)}finally{i.f()}}},e})();function ZN(e,t,r){var n=new Set;if(r!=null){var i=(0,va.default)(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;t.has(a)||(n.add(a),e.remove(a))}}catch(p){i.e(p)}finally{i.f()}}var s=(0,va.default)(t.getRecordIDs()),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=Wf(t,u);if(e.has(u)){var f=Wf(e,u),h=rt.update(f,d);h!==f&&(n.add(u),e.set(u,h),eCe(f,e))}else e.set(u,d)}}catch(p){s.e(p)}finally{s.f()}return n}function Zke(e){var t=new Set;return rt.getFields(e).forEach(function(r){if(rt.hasLinkedRecordID(e,r)){var n=rt.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(rt.hasLinkedRecordIDs(e,r)){var i;(i=rt.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function Wz(e,t){var r=t.get(e);if(r){var n=rt.clone(r);rt.setValue(n,Lx,!0),t.set(e,n)}}function eCe(e,t){var r=Zke(e),n=(0,va.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,a=t.get(o);a!=null&&N2(a)&&Wz(o,t)}}catch(s){n.e(s)}finally{n.f()}}function tCe(e,t){if(t.size!==0){var r=(0,va.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&N2(o)&&Jz(o)}}catch(a){r.e(a)}finally{r.f()}}}function N2(e){return rt.getType(e)===Hz}function Jz(e){var t=rt.getValue(e,$2);t?.()}function Wf(e,t){var r=e.get(t);return r==null&&ma(!1),r}function rCe(e){return e}function e3(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&ma(!1),n}var nCe={LiveResolverCache:Xke,getUpdatedDataIDs:rCe,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:$2},iCe=Ke.default,oCe=iCe(Qt),Qz=Zi,t3=Ku,aCe=Me,ly=Qz.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),Yz=(function(){function e(r){this._base=r,this._sink=t3.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==ly}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===ly?void 0:i}else return this._base.get(n)},t.getStatus=function(n){var i=this.get(n);return i===void 0?"UNKNOWN":i===null?"NONEXISTENT":"EXISTENT"},t.clear=function(){this._base=t3.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,ly)},t.set=function(n,i){this._sink.set(n,i)},t.getRecordIDs=function(){return Object.keys(this.toJSON())},t.size=function(){return Object.keys(this.toJSON()).length},t.toJSON=function(){var n=this,i=(0,oCe.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var a=n.get(o);a===void 0?delete i[o]:i[o]=Qz.toJSON(a)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function sCe(e){return new Yz(e)}function lCe(e){return e instanceof Yz||aCe(!1),e.getOptimisticRecordIDs()}var uCe={create:sCe,getOptimisticRecordIDs:lCe},cCe=ju,dCe=cCe.RELAY_LIVE_RESOLVER,r3=Me,fCe=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){i.kind===dCe&&r3(!1);var l=a(),u=l.resolverResult,d=l.snapshot,f=l.error;return[u,void 0,f,d,void 0,void 0]},t.invalidateDataIDs=function(n){},t.ensureClientRecord=function(n,i){r3(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),hCe={NoopResolverCache:fCe},Bv=Ke.default,n3=Bv(Qt),pCe=Bv(pi),mCe=Bv(zd),uy=Bv($l),gCe=["message"],i3=Ro,vCe=Iv,_Ce=vCe.isSuspenseSentinel,bCe=Nl,_i=Zi,Ua=yr,o3=Ua.CLIENT_EDGE_TRAVERSAL_PATH,yCe=Ua.FRAGMENT_OWNER_KEY,xCe=Ua.FRAGMENT_PROP_NAME_KEY,Rm=Ua.FRAGMENTS_KEY,Am=Ua.ID_KEY,SCe=Ua.MODULE_COMPONENT_KEY,wCe=Ua.ROOT_ID,d0=Ua.getArgumentValues,ECe=Ua.getModuleComponentKey,Tm=Ua.getStorageKey,kCe=hCe,CCe=kCe.NoopResolverCache,Xz=c2,RCe=Xz.RESOLVER_FRAGMENT_ERRORED_SENTINEL,ACe=Xz.withResolverContext,TCe=Lv,$Ce=TCe.generateTypeID,Gr=Me;function Zz(e,t,r,n){var i=new NCe(e,t,r??new CCe,n);return i.read()}var NCe=(function(){function e(r,n,i,o){var a,s,l,u;this._clientEdgeTraversalPath=(a=n.clientEdgeTraversalPath)!==null&&a!==void 0&&a.length?(0,uy.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(s=(l=this._owner.node.operation.use_exec_time_resolvers)!==null&&l!==void 0?l:((u=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||u===void 0?void 0:u.get())===!0)!==null&&s!==void 0?s:!1,this._recordSource=r,this._seenRecords=new Set,this._selector=n,this._variables=n.variables,this._resolverCache=i,this._fragmentName=n.node.name,this._updatedDataIDs=new Set,this._resolverContext=o}var t=e.prototype;return t.read=function(){var n,i=this._selector,o=i.node,a=i.dataID,s=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,u=this._recordSource.get(a),d=!s;if(d&&l==null&&u!=null&&(this._recordMatchesTypeCondition(u,o.type)||(d=!1)),d&&l!=null&&u!=null){var f=this._implementsInterface(u,l);f===!1&&(d=!1)}this._isWithinUnmatchedTypeRefinement=!d;var h=this._traverse(o,a,null),p=(n=this._selector.node.metadata)===null||n===void 0?void 0:n.catchTo;return p!=null&&(h=this._catchErrors(h,p,null)),this._updatedDataIDs.size>0&&(this._resolverCache.notifyUpdatedSubscribers(this._updatedDataIDs),this._updatedDataIDs.clear()),{data:h,isMissingData:this._isMissingData&&d,missingClientEdges:this._missingClientEdges.length?this._missingClientEdges:null,missingLiveResolverFields:this._missingLiveResolverFields,seenRecords:this._seenRecords,selector:this._selector,fieldErrors:this._fieldErrors}},t._maybeAddFieldErrors=function(n,i){var o=_i.getErrors(n,i);if(o!=null){var a=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var s=0;s<o.length;s++){var l,u,d,f=o[s];this._fieldErrors.push({kind:"relay_field_payload.error",owner:a,fieldPath:((l=f.path)!==null&&l!==void 0?l:[]).join("."),error:f,shouldThrow:(u=(d=this._selector.node.metadata)===null||d===void 0?void 0:d.throwOnFieldError)!==null&&u!==void 0?u:!1,handled:!1,uiContext:void 0})}}},t._markDataAsMissing=function(n){var i,o;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var a=this._fragmentName;if(this._fieldErrors.push((i=(o=this._selector.node.metadata)===null||o===void 0?void 0:o.throwOnFieldError)!==null&&i!==void 0&&i?{kind:"missing_expected_data.throw",owner:a,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:a,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var s=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];s!==null&&this._missingClientEdges.push({request:s.readerClientEdge.operation,clientEdgeDestinationID:s.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var a=this._recordSource.get(i);if(this._seenRecords.add(i),a==null)return a===void 0&&this._markDataAsMissing("<record>"),a;var s=o||{},l=this._traverseSelections(n.selections,a,s);return l?s:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Gr(!1),this._variables[n]},t._maybeReportUnexpectedNull=function(n){if(n.action!=="NONE"){var i=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var o;if(n.field.linkedField!=null){var a;o=(a=n.field.linkedField.alias)!==null&&a!==void 0?a:n.field.linkedField.name}else{var s;o=(s=n.field.alias)!==null&&s!==void 0?s:n.field.name}switch(n.action){case"THROW":this._fieldErrors.push({kind:"missing_required_field.throw",fieldPath:o,owner:i,handled:!1,uiContext:void 0});return;case"LOG":this._fieldErrors.push({kind:"missing_required_field.log",fieldPath:o,owner:i,uiContext:void 0});return;default:n.action}}},t._handleRequiredFieldValue=function(n,i){return i==null?(this._maybeReportUnexpectedNull(n),!1):!0},t._catchErrors=function(n,i,o){var a=n;switch(i){case"RESULT":a=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(a=null);break}var s=this._fieldErrors;if(this._fieldErrors=o,s!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<s.length;l++)this._fieldErrors.push(a3(s[l]))}return a},t._asResult=function(n){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:n};var i=this._fieldErrors.map(function(o){switch(o.kind){case"relay_field_payload.error":var a=o.error;a.message;var s=(0,mCe.default)(a,gCe);return s;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:o.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(o.fieldPath," in ").concat(o.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(o.fieldPath,"' in '").concat(o.owner,"'.")};case"missing_required_field.log":return null;default:o.kind,Gr(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var a=0;a<n.length;a++){var s=n[a];switch(s.kind){case"RequiredField":var l=this._readClientSideDirectiveField(s,i,o);if(!this._handleRequiredFieldValue(s,l))return!1;break;case"CatchField":{var u,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(s,i,o),m=(u=(d=s.field)===null||d===void 0?void 0:d.backingField)!==null&&u!==void 0?u:s.field,g=(f=m?.alias)!==null&&f!==void 0?f:m?.name;g==null&&Gr(!1),o[g]=this._catchErrors(p,s.to,h);break}case"ScalarField":this._readScalar(s,i,o);break;case"LinkedField":s.plural?this._readPluralLink(s,i,o):this._readLink(s,i,o);break;case"Condition":var v=!!this._getVariableValue(s.condition);if(v===s.passingValue){var _=this._traverseSelections(s.selections,i,o);if(!_)return!1}break;case"InlineFragment":{var x=this._readInlineFragment(s,i,o,!1);if(x===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(s,i,o):this._readResolverField(s,i,o);break}case"FragmentSpread":this._createFragmentPointer(s,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(s,i,o);break}case"ModuleImport":this._readModuleImport(s,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(s,i,o);break;case"Defer":case"ClientExtension":{var S=this._isMissingData,E=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var k=this._traverseSelections(s.selections,i,o);if(this._isMissingData=S||this._missingClientEdges.length>E||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!k)return!1;break}case"Stream":{var R=this._traverseSelections(s.selections,i,o);if(!R)return!1;break}case"ActorChange":this._readActorChange(s,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(s.backingField.kind==="RelayResolver"||s.backingField.kind==="RelayLiveResolver")){var T=s.linkedField;T.plural?this._readPluralLink(T,i,o):this._readLink(T,i,o)}else this._readClientEdge(s,i,o);break;default:Gr(!1)}}return!0},t._readClientSideDirectiveField=function(n,i,o){switch(n.field.kind){case"ScalarField":return this._readScalar(n.field,i,o);case"LinkedField":return n.field.plural?this._readPluralLink(n.field,i,o):this._readLink(n.field,i,o);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(n.field,i,o):this._readResolverField(n.field,i,o);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(n.field.backingField.kind==="RelayResolver"||n.field.backingField.kind==="RelayLiveResolver")){var a=n.field;return a.linkedField.plural?this._readPluralLink(a.linkedField,i,o):this._readLink(a.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,Gr(!1)}},t._readResolverField=function(n,i,o){var a,s=_i.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var u=this._readResolverFieldImpl(n,s),d=(a=n.alias)!==null&&a!==void 0?a:n.name;return this._prependPreviousErrors(l,d),o[d]=u,u},t._readResolverFieldImpl=function(n,i){var o=this,a=n.fragment,s,l=function(x){return s!=null?{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors}:(s=Zz(o._recordSource,x,o._resolverCache),{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors})},u=function(){if(a!=null){var x={__id:i,__fragmentOwner:o._owner,__fragments:(0,pCe.default)({},a.name,a.args?d0(a.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(x[o3]=(0,uy.default)(o._clientEdgeTraversalPath));var S={getDataForResolverFragment:l};return ACe(S,function(){var T=s3(n,o._variables,x,o._resolverContext),A=T[0],N=T[1];return{resolverResult:A,snapshot:s,error:N}})}else{var E=s3(n,o._variables,null,o._resolverContext),k=E[0],R=E[1];return{resolverResult:k,snapshot:void 0,error:R}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,u,l),f=d[0],h=d[1],p=d[2],m=d[3],g=d[4],v=d[5];return this._propagateResolverMetadata(n.path,m,p,h,g,v),f},t._propagateResolverMetadata=function(n,i,o,a,s,l){var u=this;if(i!=null){if(i.missingClientEdges!=null)for(var d=0;d<i.missingClientEdges.length;d++){var f=i.missingClientEdges[d];this._missingClientEdges.push(f)}if(i.missingLiveResolverFields!=null){this._isMissingData=this._isMissingData||i.missingLiveResolverFields.length>0;for(var h=0;h<i.missingLiveResolverFields.length;h++){var p=i.missingLiveResolverFields[h];this._missingLiveResolverFields.push(p)}}if(i.fieldErrors!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var m=0;m<i.fieldErrors.length;m++){var g,v=i.fieldErrors[m];((g=this._selector.node.metadata)===null||g===void 0?void 0:g.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(a3(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var _,x,S={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:o,shouldThrow:(_=(x=this._selector.node.metadata)===null||x===void 0?void 0:x.throwOnFieldError)!==null&&_!==void 0?_:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[S]:this._fieldErrors.push(S)}a!=null&&this._seenRecords.add(a),s!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(s)),l?.forEach(function(E){u._updatedDataIDs.add(E)})},t._readClientEdge=function(n,i,o){var a=this,s,l=n.backingField;l.kind==="ClientExtension"&&Gr(!1);var u=(s=l.alias)!==null&&s!==void 0?s:l.name,d={};this._traverseSelections([l],i,d);var f=d[u];if(f==null||_Ce(f))return o[u]=f,f;if(n.linkedField.plural){Array.isArray(f)||Gr(!1);var h;n.kind!=="ClientEdgeToClientObject"&&Gr(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var P,O=(P=n.concreteType)!==null&&P!==void 0?P:N.__typename;typeof O!="string"&&Gr(!1);var D=cy(N,l.path,a._owner.identifier),U=a._resolverCache.ensureClientRecord(D,O),B=n.modelResolvers;if(B!=null){var q=B[O];q===void 0&&Gr(!1);var Q=a._readResolverFieldImpl(q,U);return Q!=null?U:null}return U}):h=f.map(function(N){return cy(N,l.path,a._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var p=this._readLinkedIds(n.linkedField,h,i,o);return this._clientEdgeTraversalPath.pop(),o[u]=p,p}else{var m,g=cy(f,l.path,this._owner.identifier),v,_=(m=n.concreteType)!==null&&m!==void 0?m:f.__typename,x;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof _!="string"&&Gr(!1),v=this._resolverCache.ensureClientRecord(g,_),x=null):(v=g,x=null):(v=g,x={readerClientEdge:n,clientEdgeDestinationID:g});var S=n.modelResolvers;if(S!=null){typeof _!="string"&&Gr(!1);var E=S[_];E===void 0&&Gr(!1);var k=this._readResolverFieldImpl(E,v);if(k==null)return o[u]=null,null}this._clientEdgeTraversalPath.push(x);var R=o[u];R==null||typeof R=="object"||Gr(!1);var T=this._fieldErrors;this._fieldErrors=null;var A=this._traverse(n.linkedField,v,R);return this._prependPreviousErrors(T,u),this._clientEdgeTraversalPath.pop(),o[u]=A,A}},t._readScalar=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=Tm(n,this._variables),u=_i.getValue(i,l);return u===null||i3.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(u)&&u.length===0?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(s),o[s]=u,u},t._readLink=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=Tm(n,this._variables),u=_i.getLinkedRecordID(i,l);if(u==null)return o[s]=u,u===null?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(s),u;var d=o[s];d==null||typeof d=="object"||Gr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,u,d);return this._prependPreviousErrors(f,s),o[s]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var a=this._fieldErrors[o];a.owner===this._fragmentName&&(a.kind==="missing_expected_data.throw"||a.kind==="missing_expected_data.log"||a.kind==="missing_required_field.throw"||a.kind==="missing_required_field.log")&&(a.fieldPath="".concat(i,".").concat(a.fieldPath))}if(n!=null){for(var s=this._fieldErrors.length-1;s>=0;s--)n.push(this._fieldErrors[s]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=Tm(n,this._variables),u=_i.getActorLinkedRecordID(i,l);if(u==null)return o[s]=u,u===void 0?this._markDataAsMissing(s):u===null&&this._maybeAddFieldErrors(i,l),o[s];var d=u[0],f=u[1],h={};return this._createFragmentPointer(n.fragmentSpread,_i.fromObject({__id:f}),h),o[s]={__fragmentRef:h,__viewer:d},o[s]},t._readPluralLink=function(n,i,o){var a=Tm(n,this._variables),s=_i.getLinkedRecordIDs(i,a);return(s===null||i3.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(s)&&s.length===0)&&this._maybeAddFieldErrors(i,a),this._readLinkedIds(n,s,i,o)},t._readLinkedIds=function(n,i,o,a){var s=this,l,u=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return a[u]=i,i===void 0&&this._markDataAsMissing(u),i;var d=a[u];d==null||Array.isArray(d)||Gr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,m){if(p==null){p===void 0&&s._markDataAsMissing(String(m)),h[m]=p;return}var g=h[m];g==null||typeof g=="object"||Gr(!1);var v=s._fieldErrors;s._fieldErrors=null,h[m]=s._traverse(n,p,g),s._prependPreviousErrors(v,m)}),this._prependPreviousErrors(f,u),a[u]=h,h},t._readModuleImport=function(n,i,o){var a=ECe(n.documentName),s=_i.getValue(i,a),l=s!==void 0?s:n.componentModuleProvider;if(l==null){l===void 0&&this._markDataAsMissing("<module-import>");return}this._createFragmentPointer({kind:"FragmentSpread",name:n.fragmentName,args:n.args},i,o),o[xCe]=n.fragmentPropName,o[SCe]=l},t._readAliasedInlineFragment=function(n,i,o){var a=this._fieldErrors;this._fieldErrors=null;var s=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(a,n.name),s===!1&&(s=null),o[n.name]=s},t._readInlineFragment=function(n,i,o,a){if(n.type==null){var s=this._traverseSelections(n.selections,i,o);return s===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var s=this._traverseSelections(n.selections,i,o);if(!s)return!1}else return null;else{var u=this._implementsInterface(i,l);if(u===!1&&a)return null;var d=this._isMissingData,f=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=f||u===!1;var h=this._traverseSelections(n.selections,i,o);if(this._isWithinUnmatchedTypeRefinement=f,u===!1)return this._isMissingData=d,null;if(u==null)return;if(h===!1)return!1}return o},t._recordMatchesTypeCondition=function(n,i){var o=_i.getType(n);return o!=null&&o===i||_i.getDataID(n)===wCe},t._createFragmentPointer=function(n,i,o){var a=o[Rm];a==null&&(a=o[Rm]={}),typeof a=="object"&&a!=null||Gr(!1),o[Am]==null&&(o[Am]=_i.getDataID(i)),a[n.name]=d0(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[yCe]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[o3]=(0,uy.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var a=o[Rm];a==null&&(a=o[Rm]={}),typeof a=="object"&&a!=null||Gr(!1),o[Am]==null&&(o[Am]=_i.getDataID(i));var s={},l=this._fragmentName;this._fragmentName=n.name;var u=this._variables,d=n.args?d0(n.args,this._variables):{};this._variables=bCe.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,s),this._variables=u,this._fragmentName=l,a[n.name]=s},t._implementsInterface=function(n,i){var o=_i.getType(n),a=this._recordSource.get($Ce(o)),s=a!=null?_i.getValue(a,i):null;return s==null&&this._markDataAsMissing("<abstract-type-hint>"),s},e})();function a3(e){switch(e.kind){case"missing_expected_data.throw":case"missing_required_field.throw":case"relay_field_payload.error":case"relay_resolver.error":return(0,n3.default)((0,n3.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,Gr(!1)}}function s3(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,a=null;try{var s=[];e.fragment!=null&&s.push(r);var l=e.args?d0(e.args,t):void 0;s.push(l),s.push(n),o=i.apply(null,s)}catch(u){o=null,u!==RCe&&(a=u)}return[o,a]}function cy(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;Gr(!1)}var D2={read:Zz},DCe=Ke.default,l3=DCe(Ur),FCe=R2,ICe=jz,PCe=Gz,OCe=Nl,u3=OCe.getLocalVariables,Ka=Zi,jv=yr,MCe=Lv,c3=MCe.generateTypeID,dy=Me,LCe=jv.getReadTimeResolverStorageKey,d3=jv.getStorageKey,zCe=jv.getModuleOperationKey;function UCe(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,u=new BCe(e,l,r,n,i,o);u.mark(s,a)}var BCe=(function(){function e(r,n,i,o,a,s){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=s??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=a}var t=e.prototype;return t.mark=function(n,i){(n.kind==="Operation"||n.kind==="SplitOperation")&&(this._operationName=n.name),this._traverse(n,i)},t._traverse=function(n,i){this._references.add(i);var o=this._recordSource.get(i);o!=null&&this._traverseSelections(n.selections,o)},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||dy(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ActorChange":o._traverseLink(a.linkedField,i);break;case"LinkedField":a.plural?o._traversePluralLink(a,i):o._traverseLink(a,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":if(a.abstractKey==null){var l=Ka.getType(i);(l!=null&&l===a.type||l===jv.ROOT_TYPE)&&o._traverseSelections(a.selections,i)}else{var u=Ka.getType(i),d=c3(u);o._references.add(d),o._traverseSelections(a.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=u3(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=ICe(a,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=Ka.getType(i),m=c3(p);o._references.add(m);break}case"ModuleImport":o._traverseModuleImport(a,i);break;case"ClientExtension":o._traverseSelections(a.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(a,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(a,i);break;default:dy(!1)}})},t._traverseClientEdgeToClientObject=function(n,i){if(this._useExecTimeResolvers){this._traverseLink(n.linkedField,i);return}var o=this._traverseResolverField(n.backingField,i);if(o!=null){var a=this._recordSource.get(o);if(a!=null)if(n.backingField.isOutputType){var s=PCe(a);if(s!=null){var l=(0,l3.default)(s),u;try{for(l.s();!(u=l.n()).done;){var d=u.value;this._references.add(d)}}catch(x){l.e(x)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=Ka.getResolverLinkedRecordIDs(a,h);if(p!=null){var m=(0,l3.default)(p),g;try{for(m.s();!(g=m.n()).done;){var v=g.value;v!=null&&this._traverse(f,v)}}catch(x){m.e(x)}finally{m.f()}}}else{var _=Ka.getResolverLinkedRecordID(a,h);_!=null&&this._traverse(f,_)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=LCe(n,this._variables),a=Ka.getLinkedRecordID(i,o);a!=null&&this._references.add(a);var s=n.fragment;return s!=null&&this._traverseSelections([s],i),a}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&dy(!1);var a=zCe(n.documentName),s=Ka.getValue(i,a);if(s!=null){var l=o.get(s);if(l!=null){var u=FCe(l),d=this._variables;this._variables=u3(this._variables,u.argumentDefinitions,n.args),this._traverseSelections(u.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=d3(n,this._variables),a=Ka.getLinkedRecordID(i,o);a!=null&&this._traverse(n,a)},t._traversePluralLink=function(n,i){var o=this,a=d3(n,this._variables),s=Ka.getLinkedRecordIDs(i,a);s?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),jCe={mark:UCe},qCe=Symbol.iterator;function VCe(e,t){for(var r=e[qCe](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var GCe=VCe,KCe=yr,HCe=KCe.ROOT_ID,WCe=C2,JCe=WCe.VIEWER_ID,QCe=Symbol.iterator;function YCe(e,t){for(var r=e[QCe](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==HCe&&i!==JCe)return!0;n=r.next()}return!1}var XCe=YCe,f3=Fv,h3=Ro,ZCe=GCe,eRe=XCe,p3=D2,tRe=(function(){function e(r,n,i){this._subscriptions=new Set,this.__log=r,this._resolverCache=n,this._resolverContext=i}var t=e.prototype;return t.subscribe=function(n,i){var o=this,a={backup:null,callback:i,snapshot:n,stale:!1},s=function(){o._subscriptions.delete(a)};return this._subscriptions.add(a),{dispose:s}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var a=o.snapshot,s=p3.read(n,a.selector,i._resolverCache,i._resolverContext),l=f3(a.data,s.data);s.data=l,o.backup=s})},t.restoreSubscriptions=function(){this._subscriptions.forEach(function(n){var i=n.backup;n.backup=null,i?(i.data!==n.snapshot.data&&(n.stale=!0),n.snapshot={data:n.snapshot.data,isMissingData:i.isMissingData,missingClientEdges:i.missingClientEdges,missingLiveResolverFields:i.missingLiveResolverFields,seenRecords:i.seenRecords,selector:i.selector,fieldErrors:i.fieldErrors}):n.stale=!0})},t.updateSubscriptions=function(n,i,o,a){var s=this,l=i.size!==0;this._subscriptions.forEach(function(u){var d=s._updateSubscription(n,u,i,l,a);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,a,s){var l=i.backup,u=i.callback,d=i.snapshot,f=i.stale,h=a&&ZCe(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?p3.read(n,d.selector,this._resolverCache,this._resolverContext):l,m=f3(d.data,p.data);if(p={data:m,isMissingData:p.isMissingData,missingClientEdges:p.missingClientEdges,missingLiveResolverFields:p.missingLiveResolverFields,seenRecords:p.seenRecords,selector:p.selector,fieldErrors:p.fieldErrors},i.snapshot=p,i.stale=!1,p.data!==d.data)return this.__log&&h3.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:s,snapshot:d,nextSnapshot:p}),u(p),d.selector.owner;if(h3.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||eRe(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),rRe=tRe,e9=Ke.default,m3=e9(Ur),nRe=e9(pi),t9=E2,iRe=t9.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,g3=t9.assertInternalActorIdentifier,oRe=p2e,aRe=Ake,sRe=Tz,F2=nCe,lRe=F2.LiveResolverCache,uRe=F2.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,cRe=F2.getUpdatedDataIDs,eu=Zi,v3=uCe,dRe=D2,fRe=jCe,hRe=rRe,pRe=yr,r9=yr,fy=r9.ROOT_ID,mRe=r9.ROOT_TYPE,hy=Me,gRe=10,vRe=(function(){function e(r,n){var i=this,o,a,s,l,u,d,f,h;(0,nRe.default)(this,"_gcStep",function(){i._gcRun&&(i._gcRun.next().done?i._gcRun=null:i._gcScheduler(i._gcStep))}),this._currentWriteEpoch=0,this._gcHoldCounter=0,this._gcReleaseBufferSize=(o=n?.gcReleaseBufferSize)!==null&&o!==void 0?o:gRe,this._shouldRetainWithinTTL_EXPERIMENTAL=(a=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&a!==void 0?a:!1,this._gcRun=null,this._gcScheduler=(s=n?.gcScheduler)!==null&&s!==void 0?s:oRe,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:sRe,this._globalInvalidationEpoch=null,this._invalidationSubscriptions=new Set,this._invalidatedRecordIDs=new Set,this.__log=(u=n?.log)!==null&&u!==void 0?u:null,this._queryCacheExpirationTime=n?.queryCacheExpirationTime,this._operationLoader=(d=n?.operationLoader)!==null&&d!==void 0?d:null,this._optimisticSource=null,this._recordSource=r,this._releaseBuffer=[],this._roots=new Map,this._shouldScheduleGC=!1,this._resolverCache=new lRe(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new hRe(n?.log,this._resolverCache,this._resolverContext),this._updatedRecordIDs=new Set,this._shouldProcessClientComponents=(f=n?.shouldProcessClientComponents)!==null&&f!==void 0?f:!1,this._treatMissingFieldsAsNull=(h=n?.treatMissingFieldsAsNull)!==null&&h!==void 0?h:!1,this._actorIdentifier=n?.actorIdentifier,_Re(this._recordSource)}var t=e.prototype;return t.getSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getOperationLoader=function(){return this._operationLoader},t._getMutableRecordSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getLiveResolverPromise=function(n){return this._resolverCache.getLiveResolverPromise(n)},t.batchLiveStateUpdates=function(n){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});try{this._resolverCache.batchLiveStateUpdates(n)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}},t.check=function(n,i){var o,a,s,l,u,d,f,h=n.root,p=this._getMutableRecordSource(),m=this._globalInvalidationEpoch,g=(o=(a=n.request.node.operation.use_exec_time_resolvers)!==null&&a!==void 0?a:((s=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),_=v!=null?v.epoch:null;if(m!=null&&(_==null||_<=m))return{status:"stale"};var x=(l=i?.handlers)!==null&&l!==void 0?l:[],S=(u=i?.getSourceForActor)!==null&&u!==void 0?u:function(R){return g3(R),p},E=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(R){return g3(R),p},k=aRe.check(S,E,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:iRe,h,x,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,g);return yRe(k,_,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,a=!1,s=function(){if(!a){a=!0;var d=i._roots.get(o);if(d!=null&&(d.refCount--,d.refCount===0)){var f=i._queryCacheExpirationTime,h=d.fetchTime!=null&&f!=null&&d.fetchTime<=Date.now()-f;if(h)i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(o),i.scheduleGC();else if(i._releaseBuffer.push(o),i._releaseBuffer.length>i._gcReleaseBufferSize){var p=i._releaseBuffer.shift();i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(p),i.scheduleGC()}}}},l=this._roots.get(o);return l!=null?(l.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(u){return u!==o})),l.refCount+=1):this._roots.set(o,{operation:n,refCount:1,epoch:null,fetchTime:null}),{dispose:s}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),a=dRe.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),a},t.notify=function(n,i){var o=this,a=this.__log;a?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var s=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(s,this._updatedRecordIDs,l,n),this._invalidationSubscriptions.forEach(function(h){o._updateInvalidationSubscription(h,i===!0)}),n!=null){var u=n.request.identifier,d=this._roots.get(u);if(d!=null)d.epoch=this._currentWriteEpoch,d.fetchTime=Date.now();else if(n.request.node.params.operationKind==="query"&&this._gcReleaseBufferSize>0&&this._releaseBuffer.length<this._gcReleaseBufferSize){var f={operation:n,refCount:0,epoch:this._currentWriteEpoch,fetchTime:Date.now()};this._releaseBuffer.push(u),this._roots.set(u,f)}}return a?.({name:"store.notify.complete",sourceOperation:n,updatedRecordIDs:this._updatedRecordIDs,invalidatedRecordIDs:this._invalidatedRecordIDs,subscriptionsSize:this._storeSubscriptions.size(),updatedOwners:l}),this._updatedRecordIDs.clear(),this._invalidatedRecordIDs.clear(),l},t.publish=function(n,i){var o=this._getMutableRecordSource();bRe(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var a=this.__log;a?.({name:"store.publish",source:n,optimistic:o===this._optimisticSource})},t.subscribe=function(n,i){return this._storeSubscriptions.subscribe(n,i)},t.holdGC=function(){var n=this;this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._gcHoldCounter++;var i=function(){n._gcHoldCounter>0&&(n._gcHoldCounter--,n._gcHoldCounter===0&&n._shouldScheduleGC&&(n.scheduleGC(),n._shouldScheduleGC=!1))};return{dispose:i}},t.toJSON=function(){return"RelayModernStore()"},t.getEpoch=function(){return this._currentWriteEpoch},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t.lookupInvalidationState=function(n){var i=this,o=new Map;return n.forEach(function(a){var s,l=i.getSource().get(a);o.set(a,(s=eu.getInvalidationEpoch(l))!==null&&s!==void 0?s:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,a=n.invalidations;if(o.get("global")!==a.get("global"))return!0;var s=(0,m3.default)(n.dataIDs),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(o.get(u)!==a.get(u))return!0}}catch(d){s.e(d)}finally{s.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,a={callback:i,invalidationState:n},s=function(){o._invalidationSubscriptions.delete(a)};return this._invalidationSubscriptions.add(a),{dispose:s}},t._updateInvalidationSubscription=function(n,i){var o=this,a=n.callback,s=n.invalidationState,l=s.dataIDs,u=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});u&&a()},t.snapshot=function(){this._optimisticSource!=null&&hy(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=v3.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||hy(!1);var i=this.__log;i?.({name:"store.restore"});var o=v3.getOptimisticRecordIDs(n);this._resolverCache.unsubscribeFromLiveResolverRecords(o),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(o)},t.scheduleGC=function(){if(this._gcHoldCounter>0){this._shouldScheduleGC=!0;return}this._gcRun||(this._gcRun=this._collect(),this._gcScheduler(this._gcStep))},t.__gc=function(){if(this._optimisticSource==null)for(var n=this._collect();!n.next().done;);},t._collect=function*(){if(!(this._shouldRetainWithinTTL_EXPERIMENTAL&&this._queryCacheExpirationTime==null)){var n=this.__log;e:for(;;){n?.({name:"store.gc.start"});var i=this._currentWriteEpoch,o=new Set,a=(0,m3.default)(this._roots.entries()),s;try{for(a.s();!(s=a.n()).done;){var l,u,d,f=s.value,h=f[0],p=f[1],m=p.operation,g=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var _=this._queryCacheExpirationTime;_==null&&hy(!1);var x=v==null||v<=Date.now()-_,S=x&&g===0&&!this._releaseBuffer.includes(h);if(S)continue}var E=m.root,k=(l=(u=m.request.node.operation.use_exec_time_resolvers)!==null&&u!==void 0?u:((d=m.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(fRe.mark(this._recordSource,E,o,this._operationLoader,this._shouldProcessClientComponents,k),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(O){a.e(O)}finally{a.f()}for(var R=this._recordSource.getRecordIDs(),T=0;T<R.length;T++){var A=R[T];if(!o.has(A)){var N=this._recordSource.get(A);if(N!=null){var P=eu.getValue(N,uRe);P?.()}this._recordSource.remove(A),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(A)}}n?.({name:"store.gc.end",references:o});return}}},t.__getNormalizationOptions=function(n){return{path:n,getDataID:this._getDataID,log:this.__log,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents,actorIdentifier:this._actorIdentifier}},t.__notifyUpdatedSubscribers=function(n){var i=cRe(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function _Re(e){if(!e.has(fy)){var t=eu.create(fy,mRe);e.set(fy,t)}}function bRe(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),m=t.get(h);if(m!==null){var g;p!=null?g=eu.clone(p):g=m!=null?eu.clone(m):null,g&&(eu.setValue(g,pRe.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,g))}});for(var a=t.getRecordIDs(),s=0;s<a.length;s++){var l=a[s],u=t.get(l),d=e.get(l);if(u&&d){var f=eu.update(d,u);f!==d&&(i.add(l),e.set(l,f))}else u===null?(e.delete(l),d!==null&&i.add(l)):u&&(e.set(l,u),i.add(l))}}function yRe(e,t,r,n){var i=e.mostRecentlyInvalidatedAt,o=e.status;if(typeof i=="number"&&(t==null||i>t))return{status:"stale"};if(o==="missing")return{status:"missing"};if(r!=null&&n!=null){var a=r<=Date.now()-n;if(a)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var I2=vRe,n9=yr,xRe=n9.ROOT_TYPE,_3=n9.getStorageKey,SRe=Oz,wRe=SRe.readUpdatableFragment,ERe=Mz,kRe=ERe.readUpdatableQuery,b3=Me,CRe=(function(){function e(r,n,i,o){this.__mutator=r,this.__recordSource=n,this._readSelector=i,this._missingFieldHandlers=o}var t=e.prototype;return t.create=function(n,i){return this.__recordSource.create(n,i)},t.delete=function(n){this.__recordSource.delete(n)},t.get=function(n){return this.__recordSource.get(n)},t.getRoot=function(){return this.__recordSource.getRoot()},t.getOperationRoot=function(){var n=this.__recordSource.get(this._readSelector.dataID);return n||(n=this.__recordSource.create(this._readSelector.dataID,xRe)),n},t._getRootField=function(n,i,o){var a=n.node.selections.find(function(s){return s.kind==="LinkedField"&&s.name===i||s.kind==="RequiredField"&&s.field.name===i});return a&&a.kind==="RequiredField"&&(a=a.field),a&&a.kind==="LinkedField"||b3(!1),a.plural!==o&&b3(!1),a},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=_3(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=_3(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return kRe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return wRe(n,i,this,this._missingFieldHandlers)},e})(),RRe=CRe,py,my,gy=Iz,vy=Bz,y3=RRe,ARe=Ro,TRe=D2,x3=Ku,$m=Me,_y=typeof v0<"u"?v0:typeof window<"u"?window:void 0,by=(py=_y==null||(my=_y.ErrorUtils)===null||my===void 0?void 0:my.applyWithGuard)!==null&&py!==void 0?py:function(e,t,r,n,i){return e.apply(t,r)},$Re=(function(){function e(r,n,i,o,a){this._hasStoreSnapshot=!1,this._handlerProvider=n||null,this._pendingBackupRebase=!1,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=r,this._appliedOptimisticUpdates=new Set,this._gcHold=null,this._getDataID=i,this._missingFieldHandlers=o,this._log=a}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||$m(!1),this._pendingOptimisticUpdates.add(n)},t.revertUpdate=function(n){this._pendingOptimisticUpdates.has(n)?this._pendingOptimisticUpdates.delete(n):this._appliedOptimisticUpdates.has(n)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(n))},t.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},t.commitPayload=function(n,i,o){this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",operation:n,payload:i,updater:o})},t.commitUpdate=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"updater",updater:n})},t.commitSource=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:n})},t.run=function(n){var i=this._appliedOptimisticUpdates===0&&!!this._gcHold,o=!this._pendingBackupRebase&&this._pendingOptimisticUpdates.size===0&&!i;if(ARe.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&$m(!1),this._isRunning=!0,o)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var a=this._commitData();return(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size)&&(this._hasStoreSnapshot||(this._store.snapshot(),this._hasStoreSnapshot=!0),this._applyUpdates()),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._isRunning=!1,this._store.notify(n,a)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,a=n.operation,s=n.updater,l=o.source,u=o.fieldPayloads,d=new gy(this._store.getSource(),l),f=new vy(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(u&&u.length&&u.forEach(function(v){var _=i._handlerProvider&&i._handlerProvider(v.handle);_||$m(!1),_.update(f,v)}),s){var h=a.fragment;h==null&&$m(!1);var p=new y3(d,f,h,this._missingFieldHandlers),m=S3(l,h);s(p,m)}var g=f.getIDsMarkedForInvalidation();return this._store.publish(l,g),f.isStoreMarkedForInvalidation()},t._commitData=function(){var n=this;if(!this._pendingData.size)return!1;var i=!1;return this._pendingData.forEach(function(o){if(o.kind==="payload"){var a=n._publishSourceFromPayload(o);i=i||a}else if(o.kind==="source"){var s=o.source;n._store.publish(s)}else{var l=o.updater,u=x3.create(),d=new gy(n._store.getSource(),u),f=new vy(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);by(l,null,[f],null,"RelayPublishQueue:commitData"),i=i||f.isStoreMarkedForInvalidation();var h=f.getIDsMarkedForInvalidation();n._store.publish(u,h)}}),this._pendingData.clear(),i},t._applyUpdates=function(){var n=this,i=x3.create(),o=new gy(this._store.getSource(),i),a=new vy(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),s=function(u){if(u.storeUpdater){var d=u.storeUpdater;by(d,null,[a],null,"RelayPublishQueue:applyUpdates")}else{var f=u.operation,h=u.payload,p=u.updater,m=h.source,g=h.fieldPayloads;if(m&&a.publishSource(m,g),p){var v;m&&(v=S3(m,f.fragment));var _=new y3(o,a,f.fragment,n._missingFieldHandlers);by(p,null,[_,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(s),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){s(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function S3(e,t){var r=TRe.read(e,t).data;return r}var NRe=$Re,DRe=Ke.default,w3=DRe(Qt),FRe=lxe,i9=E2,E3=i9.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,Nm=i9.assertInternalActorIdentifier,yy=Dl,k3=EEe,IRe=AEe,PRe=$Ee,ORe=Tz,MRe=BEe,LRe=hEe,zRe=c2e,URe=I2,BRe=NRe,C3=Ku,o9=(function(){function e(r){var n=this,i,o,a,s,l,u,d,f,h,p,m;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var g=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new URe(new C3,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:qRe,this.relayFieldLogger=(a=r.relayFieldLogger)!==null&&a!==void 0?a:MRe,this._defaultRenderPolicy=(s=r.UNSTABLE_defaultRenderPolicy)!==null&&s!==void 0?s:"partial",this._operationLoader=g,this._operationExecutions=new Map,this._network=k3(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:ORe,this._missingFieldHandlers=(u=r.missingFieldHandlers)!==null&&u!==void 0?u:[],this._publishQueue=new BRe(v,(d=r.handlerProvider)!==null&&d!==void 0?d:FRe,this._getDataID,this._missingFieldHandlers,this.__log),this._scheduler=(f=r.scheduler)!==null&&f!==void 0?f:null,this._store=v,this.options=r.options,this._isServer=(h=r.isServer)!==null&&h!==void 0?h:!1,this._normalizeResponse=(p=r.normalizeResponse)!==null&&p!==void 0?p:LRe,this.__setNet=function(_){return n._network=k3(n,_)},this._operationTracker=(m=r.operationTracker)!==null&&m!==void 0?m:new IRe,this._shouldProcessClientComponents=r.shouldProcessClientComponents,PRe(this)}var t=e.prototype;return t.getStore=function(){return this._store},t.getNetwork=function(){return this._network},t.getOperationTracker=function(){return this._operationTracker},t.getScheduler=function(){return this._scheduler},t.isRequestActive=function(n){var i=this._operationExecutions.get(n);return i==="active"},t.UNSTABLE_getDefaultRenderPolicy=function(){return this._defaultRenderPolicy},t.applyUpdate=function(n){var i=this,o=function(){i._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})};return this._scheduleUpdates(function(){i._publishQueue.applyUpdate(n),i._publishQueue.run()}),{dispose:o}},t.revertUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})},t.replaceUpdate=function(n,i){var o=this;this._scheduleUpdates(function(){o._publishQueue.revertUpdate(n),o._publishQueue.applyUpdate(i),o._publishQueue.run()})},t.applyMutation=function(n){var i=this._execute({createSource:function(){return yy.create(function(a){})},isClientPayload:!1,operation:n.operation,optimisticConfig:n,updater:null}).subscribe({});return{dispose:function(){return i.unsubscribe()}}},t.check=function(n){return this._missingFieldHandlers.length===0&&!jRe(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return yy.from({data:i})},isClientPayload:!0,operation:n,optimisticConfig:null,updater:null}).subscribe({})},t.commitUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.commitUpdate(n),i._publishQueue.run()})},t.lookup=function(n){return this._store.lookup(n)},t.subscribe=function(n,i){return this._store.subscribe(n,i)},t.retain=function(n){return this._store.retain(n)},t.isServer=function(){return this._isServer},t._checkSelectorAndHandleMissingFields=function(n,i){var o=this,a=C3.create(),s=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:E3,getSourceForActor:function(d){return Nm(d),s},getTargetForActor:function(d){return Nm(d),a}});return a.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(a),o._publishQueue.run()}),l},t._scheduleUpdates=function(n){var i=this._scheduler;i!=null?i.schedule(n):n()},t.execute=function(n){var i=this,o=n.operation;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return i.check(o)})},isClientPayload:!1,operation:o,optimisticConfig:null,updater:null})},t.executeSubscription=function(n){var i=this,o=n.operation,a=n.updater;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null)},isClientPayload:!1,operation:o,optimisticConfig:null,updater:a})},t.executeMutation=function(n){var i=this,o=n.operation,a=n.optimisticResponse,s=n.optimisticUpdater,l=n.updater,u=n.uploadables,d;return(a||s)&&(d={operation:o,response:a,updater:s}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,w3.default)((0,w3.default)({},o.request.cacheConfig),{},{force:!0}),u)},isClientPayload:!1,operation:o,optimisticConfig:d,updater:l})},t.executeWithSource=function(n){var i=n.operation,o=n.source;return this._execute({createSource:function(){return o},isClientPayload:!1,operation:i,optimisticConfig:null,updater:null})},t.toJSON=function(){var n;return"RelayModernEnvironment(".concat((n=this.configName)!==null&&n!==void 0?n:"",")")},t._execute=function(n){var i=this,o=n.createSource,a=n.isClientPayload,s=n.operation,l=n.optimisticConfig,u=n.updater,d=this._publishQueue,f=this._store;return yy.create(function(h){var p=zRe.execute({actorIdentifier:E3,getDataID:i._getDataID,isClientPayload:a,log:i.__log,operation:s,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(g){return Nm(g),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(g){return Nm(g),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:u,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function jRe(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}o9.prototype["@@RelayModernEnvironment"]=!0;function qRe(){}var VRe=o9,GRe=Dv,KRe=oa,HRe=KRe.getRequest,WRe=Fl,JRe=WRe.createOperationDescriptor,QRe=aa,YRe=QRe.createReaderSelector;function XRe(e,t){var r=HRe(t.subscription);if(r.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var n=t.configs,i=t.onCompleted,o=t.onError,a=t.onNext,s=t.variables,l=t.cacheConfig,u=JRe(r,s,l),d=n?GRe.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:u,updater:f}).subscribe({next:function(m){if(a!=null){var g=u.fragment,v;if(Array.isArray(m)){var _,x;v=(_=m[0])===null||_===void 0||(x=_.extensions)===null||x===void 0?void 0:x.__relay_subscription_root_id}else{var S;v=(S=m.extensions)===null||S===void 0?void 0:S.__relay_subscription_root_id}typeof v=="string"&&(g=YRe(g.node,v,g.variables,g.owner));var E=e.lookup(g).data;a(E)}},error:o,complete:i});return{dispose:h.unsubscribe}}var ZRe=XRe,eAe=Ke.default;eAe(Qt);var a9=yr;a9.getModuleComponentKey;a9.getModuleOperationKey;var tAe=Object.prototype.hasOwnProperty;function rAe(e){for(var t in e)if(tAe.call(e,t))return!1;return!0}var nAe=rAe,P2=aa,iAe=P2.getDataIDsFromFragment,oAe=P2.getSelector,aAe=P2.getVariablesFromFragment,sAe=nAe,gf=Ro,lAe=qu,R3=lAe.stableCopy,uAe=Z5,A3=uAe.intern;function cAe(e,t){var r=oAe(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(u){return u.owner.identifier}).join(",")+"]",i=aAe(e,t),o=iAe(e,t);if(gf.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var a=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return a=gf.STRING_INTERN_LEVEL<=1?a:A3(a,gf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||sAe(i)?"{}":JSON.stringify(R3(i)))+"/"+a}else{var s,l=(s=JSON.stringify(o))!==null&&s!==void 0?s:"missing";return l=gf.STRING_INTERN_LEVEL<=1?l:A3(l,gf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(R3(i))+"/"+l}}var dAe=cAe,vf=Me;function fAe(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&vf(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&vf(!1);var o=i.operation.default?i.operation.default:i.operation,a=i.fragmentPathInResult;typeof o=="string"&&vf(!1);var s=i.identifierInfo;return s!=null&&(s.identifierField==null||typeof s.identifierField=="string"||vf(!1),s.identifierQueryVariableName==null||typeof s.identifierQueryVariableName=="string"||vf(!1)),{fragmentRefPathInResponse:a,identifierInfo:s,refetchableRequest:o,refetchMetadata:i}}var s9=fAe,hAe=s9,xy=Me;function pAe(e,t){var r,n,i=hAe(e),o=i.refetchableRequest,a=i.refetchMetadata,s=a.connection;s==null&&xy(!1);var l=s.path,u=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];u==null&&xy(!1);var d=a.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||xy(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:s,stream:u.stream===!0}}var mAe=pAe,l9=Ke.default,Dm=l9(pi),cc=l9(Qt),T3=Me;function gAe(e,t,r,n,i,o){var a,s=o.backward,l=o.forward;if(e==="backward"){var u;s!=null&&s.count!=null&&s.cursor!=null||T3(!1);var d=(0,cc.default)((0,cc.default)((0,cc.default)({},n),i),{},(u={},(0,Dm.default)(u,s.cursor,r),(0,Dm.default)(u,s.count,t),u));return l&&l.cursor&&(d[l.cursor]=null),l&&l.count&&(d[l.count]=null),d}l!=null&&l.count!=null&&l.cursor!=null||T3(!1);var f=(0,cc.default)((0,cc.default)((0,cc.default)({},n),i),{},(a={},(0,Dm.default)(a,l.cursor,r),(0,Dm.default)(a,l.count,t),a));return s&&s.cursor&&(f[s.cursor]=null),s&&s.count&&(f[s.count]=null),f}var vAe=gAe,_Ae=Ke.default,bAe=_Ae(Ur),$3=Me;function yAe(e,t){var r=e,n=(0,bAe.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(r==null)return null;typeof o=="number"?(Array.isArray(r)||$3(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||$3(!1),r=r[o])}}catch(a){n.e(a)}finally{n.f()}return r}var xAe=yAe,u9=k1e;u9.isErrorResult;u9.isValueResult;var SAe=Nv,wAe=p2,EAe=Cxe,kAe=Axe,CAe=Bxe,N3=Dv,RAe=Qxe,AAe=Dl,TAe=dSe,$Ae=vSe,Fm=$v,fa=oa,NAe=ySe,O2=za;O2.generateClientID;O2.generateUniqueClientID;O2.isClientID;var DAe=BSe,FAe=VSe,IAe=HSe,PAe=m2,c9=Iv;c9.isSuspenseSentinel;c9.suspenseSentinel;var OAe=bEe,D3=Nl,MAe=VRe,F3=Fl,Pi=aa,LAe=I2,zAe=Ku,ro=yr,UAe=c2,I3=C2,BAe=ZRe,jAe=W5,qAe=dAe,VAe=mAe,GAe=vAe,KAe=az,HAe=s9,WAe=J5,JAe=xAe,QAe=bp,YAe=QAe.handlePotentialSnapshotErrors,XAe=U5,ZAe=sz,eTe=Fv,tTe=x5,rTe=Ro,nTe=j5,d9=qu;d9.hasCycle;d9.stableCopy;var iTe={Environment:MAe,Network:RAe,Observable:AAe,RecordSource:zAe,ReplaySubject:nTe,Store:LAe,areEqualSelectors:Pi.areEqualSelectors,createFragmentSpecResolver:DAe,createNormalizationSelector:Pi.createNormalizationSelector,createOperationDescriptor:F3.createOperationDescriptor,createReaderSelector:Pi.createReaderSelector,createRequestDescriptor:F3.createRequestDescriptor,getArgumentValues:ro.getArgumentValues,getDataIDsFromFragment:Pi.getDataIDsFromFragment,getDataIDsFromObject:Pi.getDataIDsFromObject,getNode:fa.getNode,getFragment:fa.getFragment,getInlineDataFragment:fa.getInlineDataFragment,getModuleComponentKey:ro.getModuleComponentKey,getModuleOperationKey:ro.getModuleOperationKey,getPaginationFragment:fa.getPaginationFragment,getPluralSelector:Pi.getPluralSelector,getRefetchableFragment:fa.getRefetchableFragment,getRequest:fa.getRequest,getRequestIdentifier:WAe,getSelector:Pi.getSelector,getSelectorsFromObject:Pi.getSelectorsFromObject,getSingularSelector:Pi.getSingularSelector,getStorageKey:ro.getStorageKey,getVariablesFromFragment:Pi.getVariablesFromFragment,getVariablesFromObject:Pi.getVariablesFromObject,getVariablesFromPluralFragment:Pi.getVariablesFromPluralFragment,getVariablesFromSingularFragment:Pi.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:YAe,graphql:fa.graphql,isFragment:fa.isFragment,isInlineDataFragment:fa.isInlineDataFragment,isRequest:fa.isRequest,readInlineData:OAe,readFragment:UAe.readFragment,MutationTypes:N3.MutationTypes,RangeOperations:N3.RangeOperations,ConnectionHandler:SAe,VIEWER_ID:I3.VIEWER_ID,VIEWER_TYPE:I3.VIEWER_TYPE,applyOptimisticMutation:EAe,commitLocalUpdate:kAe,commitMutation:CAe,fetchQuery:TAe,fetchQuery_DEPRECATED:$Ae,isRelayModernEnvironment:PAe,requestSubscription:BAe,ConnectionInterface:wAe,PreloadableQueryRegistry:NAe,RelayFeatureFlags:rTe,DEFAULT_HANDLE_KEY:tTe.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:ro.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:ro.FRAGMENT_OWNER_KEY,ID_KEY:ro.ID_KEY,REF_KEY:ro.REF_KEY,REFS_KEY:ro.REFS_KEY,ROOT_ID:ro.ROOT_ID,ROOT_TYPE:ro.ROOT_TYPE,TYPENAME_KEY:ro.TYPENAME_KEY,deepFreeze:jAe,isPromise:XAe,isScalarAndEqual:ZAe,recycleNodesInto:eTe,getFragmentIdentifier:qAe,getRefetchMetadata:HAe,getPaginationMetadata:VAe,getPaginationVariables:GAe,getPendingOperationsForFragment:KAe,getValueAtPath:JAe,__internal:{createRelayContext:FAe,createRelayLoggingContext:IAe,getOperationVariables:D3.getOperationVariables,getLocalVariables:D3.getLocalVariables,fetchQuery:Fm.fetchQuery,fetchQueryDeduped:Fm.fetchQueryDeduped,getPromiseForActiveRequest:Fm.getPromiseForActiveRequest,getObservableForActiveRequest:Fm.getObservableForActiveRequest}},_t=iTe,oTe=I2,f9=oTe;const h9=kB(f9),aTe=CB({__proto__:null,default:h9},[f9]);let P3={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==_t.ROOT_TYPE))return o}};function sTe(e,t,r){return new _t.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function lTe(e,t,r){return new h9(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function uTe(e,t,r){return new aTe(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let cTe={make:sTe,makeLiveStore:lTe,_makeLiveStoreCjs:uTe};function dTe(e,t,r,n,i,o,a){return new _t.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([P3]):[P3],relayFieldLogger:o,isServer:a})}function p9(e,t,r){let n=[],i=e.getStore().getSource()._records.get(r);return i!==void 0&&Object.entries(i).forEach(o=>{if(o[0].startsWith("__"+t+"_connection")){n.push(o[1].__ref);return}}),n}function fTe(e,t,r,n){let i=n!==void 0?n:[];_t.commitLocalUpdate(e,o=>{p9(e,t,r).forEach(a=>{if(!i.includes(a))return re(Wi(o.get(a)),s=>{s.invalidateRecord()})})})}let hTe={make:dTe,findAllConnectionIds:p9,invalidateAllOfConnection:fTe};var pTe=St,mTe=_t,gTe=mTe.__internal.createRelayContext,Ud=gTe(pTe),m9={exports:{}};(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var o in i)({}).hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(m9);var qv=m9.exports,g9={exports:{}};(function(e){function t(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(g9);var Vv=g9.exports,v9={exports:{}},_9={exports:{}};(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_9);var vTe=_9.exports;(function(e){var t=vTe;function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,t(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(v9);var Gv=v9.exports,O3=Me;function _Te(e,t){t&&typeof t=="object"||O3(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||O3(!1)}}var bTe=_Te;function b9(e){return e.displayName||e.name||"Component"}function yTe(e){return"Relay("+b9(e)+")"}var Kv={getComponentName:b9,getContainerName:yTe},xTe=St,y9=xTe.createContext({rootIsQueryRenderer:!1}),STe=Ke.default,wTe=STe(qv),ETe=bTe,x9=Kv,kTe=x9.getComponentName,CTe=x9.getContainerName,RTe=Ud,ATe=y9,TTe=Me,zx=St,$Te=_t,NTe=$Te.getFragment,M3=zx.useContext;function DTe(e,t,r){var n=CTe(e);ETe(kTe(e),t);var i={};for(var o in t)i[o]=NTe(t[o]);var a=r(e,i);a.displayName=n;function s(u,d){var f,h=M3(RTe);h==null&&TTe(!1);var p=M3(ATe);return zx.createElement(a,(0,wTe.default)({},u,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:u.componentRef||d}))}s.displayName=n;var l=zx.forwardRef(s);return l}var M2=DTe;function FTe(e){return typeof e=="object"&&e!==null&&typeof e.check=="function"&&typeof e.lookup=="function"&&typeof e.retain=="function"&&typeof e.execute=="function"&&typeof e.subscribe=="function"}var ITe=FTe,PTe=ITe,OTe=Me;function MTe(e){return LTe(e)||OTe(!1),e}function LTe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&PTe(e.environment)}var L2={assertRelayContext:MTe},xp=Ke.default,zTe=xp(qv),UTe=xp(zd),BTe=xp(Vv),jTe=xp(Gv),L3=xp(pi),qTe=["componentRef","__relayContext","__rootIsQueryRenderer"],VTe=M2,GTe=Kv,KTe=GTe.getContainerName,HTe=L2,z3=HTe.assertRelayContext,WTe=As,U3=St,z2=_t,B3=z2.createFragmentSpecResolver,j3=z2.getDataIDsFromObject,JTe=z2.isScalarAndEqual;function QTe(e,t){var r,n=KTe(e);return r=(function(i){(0,jTe.default)(o,i);function o(s){var l,u;u=i.call(this,s)||this,(0,L3.default)((0,BTe.default)(u),"_handleFragmentDataUpdate",function(){var p=u.state.resolver;u.setState(function(m){return p===m.resolver?{data:m.resolver.resolve(),relayProp:Im(m.relayProp.environment)}:null})});var d=z3(s.__relayContext),f=(l=s.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=B3(d,n,t,s,f);return u.state={data:h.resolve(),prevProps:s,prevPropsContext:d,relayProp:Im(d.environment),resolver:h},u}o.getDerivedStateFromProps=function(l,u){var d,f=u.prevProps,h=z3(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,m=j3(t,f),g=j3(t,l),v=u.resolver;if(u.prevPropsContext.environment!==h.environment||!WTe(m,g))return v=B3(h,n,t,l,p),{data:v.resolve(),prevPropsContext:h,prevProps:l,relayProp:Im(h.environment),resolver:v};v.setProps(l);var _=v.resolve();return _!==u.data?{data:_,prevProps:l,prevPropsContext:h,relayProp:Im(h.environment)}:null};var a=o.prototype;return a.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.componentDidUpdate=function(l,u){this.state.resolver!==u.resolver?(u.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.componentWillUnmount=function(){this.state.resolver.dispose()},a.shouldComponentUpdate=function(l,u){if(u.data!==this.state.data)return!0;for(var d=Object.keys(l),f=0;f<d.length;f++){var h=d[f];if(h==="__relayContext"){if(u.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(h)&&!JTe(l[h],this.props[h]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();u!==f&&this.setState({data:f})},a._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();d.setCallback(this.props,this._handleFragmentDataUpdate),u!==f&&this.setState({data:f})},a.render=function(){var l=this.props,u=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,UTe.default)(l,qTe);return U3.createElement(e,(0,zTe.default)({},d,this.state.data,{ref:u,relay:this.state.relayProp}))},o})(U3.Component),(0,L3.default)(r,"displayName",n),r}function Im(e){return{environment:e}}function YTe(e,t){return VTe(e,t,QTe)}var XTe={createContainer:YTe},Hv=St,U2=_t;U2.createOperationDescriptor;U2.deepFreeze;U2.getRequest;Hv.useLayoutEffect;Hv.useState;Hv.useRef;Hv.useMemo;var ZTe=Ke.default,q3=ZTe(Qt),e$e=_t,t$e=e$e.getSelector;function r$e(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,a,s=e[n],l=t[n],u=t$e(s,l),d=u!=null&&u.kind==="PluralReaderSelector"?(i=(o=u.selectors[0])===null||o===void 0?void 0:o.owner.variables)!==null&&i!==void 0?i:{}:(a=u?.owner.variables)!==null&&a!==void 0?a:{};r=(0,q3.default)((0,q3.default)({},r),d)}),r}var S9=r$e,n$e=Ke.default,V3=n$e(pi),Sy=Me,B2=_t,i$e=B2.__internal.fetchQuery,o$e=B2.createOperationDescriptor,a$e=B2.isRelayModernEnvironment,s$e=(function(){function e(r){(0,V3.default)(this,"_selectionReferences",[]),(0,V3.default)(this,"_didFetchFinish",!1),r!=null&&(this._cacheSelectionReference=r.cacheSelectionReference,this._selectionReferences=r.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(n,i,o){return(o==="store-and-network"||o==="store-or-network")&&n.check(i).status==="available"?(this._retainCachedOperation(n,i),n.lookup(i.fragment)):null},t.getFetchResult=function(){if(this._didFetchFinish){if(this._error!=null)return{error:this._error};if(this._snapshot!=null)return{snapshot:this._snapshot}}else return null},t.execute=function(n){var i=this,o=n.environment,a=n.operation,s=n.preservePreviousReferences,l=s===void 0?!1:s,u=o.retain(a),d=function(){i._selectionReferences=i._selectionReferences.concat(u)},f=function(){l||i.disposeSelectionReferences(),i._selectionReferences=i._selectionReferences.concat(u)},h=function(){i._selectionReferences=i._selectionReferences.concat(u)};return a$e(o)?i$e(o,a).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:a}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||Sy(!1),typeof n=="function"&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(n),this._didFetchFinish&&(this._error!=null?n({error:this._error}):this._snapshot!=null&&n({snapshot:this._snapshot})))},t.fetch=function(n,i){var o=this,a=n.environment,s=n.operation,l=n.onDataChange,u=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:a,onDataChangeCallbacks:f||[],operation:s},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?o$e(s.request.node,s.request.variables,i):s,p=this.execute({environment:a,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:u})},error:function(g){o._didFetchFinish=!0,o._error=g,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;u?v&&v.forEach(function(_){_({error:g})}):d=g}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},u=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||Sy(!1),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},n)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(n,i){this._disposeCacheSelectionReference(),this._cacheSelectionReference=n.retain(i)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(n){return n.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(n){var i=this,o=n.notifyFirstResult;this._fetchOptions||Sy(!1);var a=this._fetchOptions,s=a.environment,l=a.onDataChangeCallbacks,u=a.operation;if(!this._snapshot&&(this._snapshot=s.lookup(u.fragment),this._rootSubscription=s.subscribe(this._snapshot,function(f){if(i._fetchOptions!=null){var h=i._fetchOptions.onDataChangeCallbacks;Array.isArray(h)&&h.forEach(function(p){return p({snapshot:f})})}}),this._snapshot&&o&&Array.isArray(l))){var d=this._snapshot;l.forEach(function(f){return f({snapshot:d})})}},e})(),j2=s$e,Bd=Ke.default,l$e=Bd(qv),wy=Bd(zd),_f=Bd(Vv),u$e=Bd(Gv),Bl=Bd(pi),ii=Bd(Qt),c$e=["componentRef"],d$e=["componentRef","__relayContext","__rootIsQueryRenderer"],f$e=["componentRef","__relayContext","__rootIsQueryRenderer"],h$e=M2,Ey=S9,w9=Kv,p$e=w9.getComponentName,m$e=w9.getContainerName,g$e=Ud,v$e=j2,_$e=L2,ky=_$e.assertRelayContext,Cy=As,_a=Me,Ry=St,$s=_t,G3=$s.ConnectionInterface,K3=$s.Observable,Pm=$s.RelayFeatureFlags,Om=$s.createFragmentSpecResolver,b$e=$s.createOperationDescriptor,H3=$s.getDataIDsFromObject,y$e=$s.getRequest,x$e=$s.getVariablesFromObject,S$e=$s.isScalarAndEqual,W3="forward";function w$e(e){var t=e.path;return t||_a(!1),function(r){for(var n=r[e.fragmentName],i=0;i<t.length;i++){if(!n||typeof n!="object")return null;n=n[t[i]]}return n}}function E$e(e){var t=e.count;return t||_a(!1),function(r,n){return(0,ii.default)((0,ii.default)({},r),{},(0,Bl.default)({},t,n))}}function k$e(e){var t=null,r=!1;for(var n in e){var i=e[n],o=i.metadata&&i.metadata.connection;i.metadata!==void 0&&(r=!0),o&&(o.length!==1&&_a(!1),t&&_a(!1),t=(0,ii.default)((0,ii.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||_a(!1),t||{}}function J3(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function C$e(e,t,r){var n;p$e(e);var i=m$e(e),o=k$e(t),a=r.getConnectionFromProps||w$e(o),s=r.direction||o.direction;s||_a(!1);var l=r.getFragmentVariables||E$e(o);return n=(function(u){(0,u$e.default)(d,u);function d(h){var p,m;m=u.call(this,h)||this,(0,Bl.default)((0,_f.default)(m),"_handleFragmentDataUpdate",function(){m.setState({data:m._resolver.resolve()})}),(0,Bl.default)((0,_f.default)(m),"_hasMore",function(){var _=m._getConnectionData();return!!(_&&_.hasMore&&_.cursor)}),(0,Bl.default)((0,_f.default)(m),"_isLoading",function(){return!!m._refetchSubscription}),(0,Bl.default)((0,_f.default)(m),"_refetchConnection",function(_,x,S){if(!m._canFetchPage("refetchConnection"))return{dispose:function(){}};m._refetchVariables=S;var E={count:_,cursor:null,totalCount:_},k=m._fetchPage(E,J3(x),{force:!0});return{dispose:k.unsubscribe}}),(0,Bl.default)((0,_f.default)(m),"_loadMore",function(_,x,S){if(!m._canFetchPage("loadMore"))return{dispose:function(){}};var E=J3(x),k=m._getConnectionData();if(!k)return K3.create(function(O){return O.complete()}).subscribe(E),null;var R=k.edgeCount+_;if(S&&S.force)return m._refetchConnection(R,x);var T=G3.get();T.END_CURSOR,T.START_CURSOR;var A=k.cursor,N={count:_,cursor:A,totalCount:R},P=m._fetchPage(N,E,S);return{dispose:P.unsubscribe}});var g=ky(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return m._isARequestInFlight=!1,m._refetchSubscription=null,m._refetchVariables=null,Pm.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?m._resolver=Om(g,i,t,h,v):m._resolver=Om(g,i,t,h,v,m._handleFragmentDataUpdate),m.state={data:m._resolver.resolve(),prevContext:g,contextForChildren:g,relayProp:m._buildRelayProp(g),resolverGeneration:0},m._isUnmounted=!1,m._hasFetched=!1,m}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,Pm.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,m){Pm.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(m.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var m=this,g,v=ky(p.__relayContext),_=(g=p.__rootIsQueryRenderer)!==null&&g!==void 0?g:!1,x=H3(t,this.props),S=H3(t,p),E=Ey(t,this.props),k=Ey(t,p);v.environment!==this.state.prevContext.environment||!Cy(E,k)||!Cy(x,S)?(this._cleanup(),Pm.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=Om(v,i,t,p,_):this._resolver=Om(v,i,t,p,_,this._handleFragmentDataUpdate),this.setState(function(T){return{prevContext:v,contextForChildren:v,relayProp:m._buildRelayProp(v),resolverGeneration:T.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var R=this._resolver.resolve();R!==this.state.data&&this.setState({data:R})},f.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},f.shouldComponentUpdate=function(p,m){if(m.data!==this.state.data||m.relayProp!==this.state.relayProp||m.resolverGeneration!==this.state.resolverGeneration)return!0;for(var g=Object.keys(p),v=0;v<g.length;v++){var _=g[v];if(_==="__relayContext"){if(m.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(_)&&!S$e(p[_],this.props[_]))return!0}return!1},f._buildRelayProp=function(p){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:p.environment}},f._rerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();p!==m&&this.setState({data:m})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==m&&this.setState({data:m})},f._getConnectionData=function(){var p=this.props;p.componentRef;var m=(0,wy.default)(p,c$e),g=(0,ii.default)((0,ii.default)({},m),this.state.data),v=a(g);if(v==null)return null;var _=G3.get(),x=_.EDGES,S=_.PAGE_INFO,E=_.HAS_NEXT_PAGE,k=_.HAS_PREV_PAGE,R=_.END_CURSOR,T=_.START_CURSOR;typeof v!="object"&&_a(!1);var A=v[x],N=v[S];if(A==null||N==null)return null;Array.isArray(A)||_a(!1),typeof N!="object"&&_a(!1);var P=s===W3?N[E]:N[k],O=s===W3?N[R]:N[T];return typeof P!="boolean"||A.length!==0&&typeof O>"u"?null:{cursor:O,edgeCount:A.length,hasMore:P}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new v$e),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,m,g){var v=this,_=ky(this.props.__relayContext),x=_.environment,S=this.props;S.componentRef,S.__relayContext,S.__rootIsQueryRenderer;var E=(0,wy.default)(S,d$e),k=(0,ii.default)((0,ii.default)({},E),this.state.data),R,T=Ey(t,E);R=x$e(t,E),R=(0,ii.default)((0,ii.default)((0,ii.default)({},T),R),this._refetchVariables);var A=r.getVariables(k,{count:p.count,cursor:p.cursor},R);typeof A=="object"&&A!==null||_a(!1),A=(0,ii.default)((0,ii.default)({},A),this._refetchVariables),R=(0,ii.default)((0,ii.default)({},A),R);var N=g?{force:!!g.force}:void 0;N!=null&&g?.metadata!=null&&(N.metadata=g?.metadata);var P=y$e(r.query),O=b$e(P,A,N),D=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var U=function(Q,J){var te=v._resolver.resolve();v._resolver.setVariables(l(R,p.totalCount),O.request.node);var ae=v._resolver.resolve();Cy(te,ae)?J():v.setState({data:ae,contextForChildren:{environment:v.props.__relayContext.environment}},J)},B=function(){v._refetchSubscription===D&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,D=this._getQueryFetcher().execute({environment:x,operation:O,preservePreviousReferences:!0}).mergeMap(function(q){return K3.create(function(Q){U(q,function(){Q.next(),Q.complete()})})}).do({error:B,complete:B,unsubscribe:B}).subscribe(m||{}),this._refetchSubscription=this._isARequestInFlight?D:null,D},f._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},f.render=function(){var p=this.props,m=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var g=(0,wy.default)(p,f$e);return Ry.createElement(g$e.Provider,{value:this.state.contextForChildren},Ry.createElement(e,(0,l$e.default)({},g,this.state.data,{ref:m,relay:this.state.relayProp})))},d})(Ry.Component),(0,Bl.default)(n,"displayName",i),n}function R$e(e,t,r){return h$e(e,t,function(n,i){return C$e(n,i,r)})}var A$e={createContainer:R$e},Wv=Ke.default,E9=Wv(Qt),T$e=Wv(Vv),$$e=Wv(Gv),N$e=Wv(pi),D$e=Ud,hg=j2,F$e=y9,I$e=As,Ay=St,q2=_t,P$e=q2.createOperationDescriptor;q2.deepFreeze;var V2=q2.getRequest,io={},O$e={rootIsQueryRenderer:!0};Ay.Component;function Ux(){return{error:null,props:null,retry:null}}function M$e(){return{error:null,props:{},retry:null}}function f0(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(o){var a=r.retry(o);a&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:a}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function G2(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function Q3(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=V2(r),a=G2(o.params,e.variables);i=io[a]?io[a].queryFetcher:new hg(n)}else i=new hg(n);return(0,E9.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},k9(e,i,t.retryCallbacks))}function k9(e,t,r,n){var i=e.environment,o=e.query,a=e.variables,s=e.cacheConfig,l=i;if(o){var u=V2(o),d=P$e(u,a,s),f={environment:l};if(typeof n=="string"&&io[n]){var h=io[n].snapshot;return h?{error:null,relayContext:f,renderProps:f0(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:Ux(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),m=t.fetch({environment:l,onDataChange:null,operation:d}),g=m||p;return n=n||G2(u.params,e.variables),io[n]={queryFetcher:t,snapshot:g},g?{error:null,relayContext:f,renderProps:f0(null,g,t,r),snapshot:g,requestCacheKey:n}:{error:null,relayContext:f,renderProps:Ux(),snapshot:null,requestCacheKey:n}}catch(_){return{error:_,relayContext:f,renderProps:f0(_,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var v={environment:l};return{error:null,relayContext:v,renderProps:M$e(),requestCacheKey:null}}}var jd=Ke.default,L$e=jd(qv),z$e=jd(zd),dc=jd(Qt),Y3=jd(Vv),U$e=jd(Gv),Ty=jd(pi),B$e=["componentRef","__relayContext","__rootIsQueryRenderer"],j$e=M2,$y=S9,q$e=Kv,V$e=q$e.getContainerName,G$e=Ud,K$e=j2,H$e=L2,Ny=H$e.assertRelayContext,X3=As,Dy=St,Ju=_t,W$e=Ju.Observable,Z3=Ju.createFragmentSpecResolver,J$e=Ju.createOperationDescriptor,eD=Ju.getDataIDsFromObject,Q$e=Ju.getRequest,Y$e=Ju.getVariablesFromObject,X$e=Ju.isScalarAndEqual;function Z$e(e,t,r){var n,i=V$e(e);return n=(function(o){(0,U$e.default)(a,o);function a(l){var u,d;d=o.call(this,l)||this,(0,Ty.default)((0,Y3.default)(d),"_handleFragmentDataUpdate",function(){var m=d.state.resolver;d.setState(function(g){return m===g.resolver?{data:g.resolver.resolve()}:null})}),(0,Ty.default)((0,Y3.default)(d),"_refetch",function(m,g,v,_){if(d._isUnmounted)return{dispose:function(){}};var x=Ny(d.props.__relayContext),S=x.environment,E=$y(t,d.props),k=typeof m=="function"?m(d._getFragmentVariables()):m;k=(0,dc.default)((0,dc.default)({},E),k);var R=g?(0,dc.default)((0,dc.default)({},k),g):k,T=_?{force:!!_.force}:void 0;T!=null&&_?.metadata!=null&&(T.metadata=_?.metadata);var A=typeof v=="function"?{next:v,error:v}:v||{},N=Q$e(r),P=J$e(N,k,T);d.state.localVariables=k,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var O,D=d._getQueryFetcher().lookupInStore(S,P,_?.fetchPolicy);return D!=null?(d.state.resolver.setVariables(R,P.request.node),d.setState(function(U){return{data:U.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){A.next&&A.next(),A.complete&&A.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:S,operation:P,preservePreviousReferences:!0}).mergeMap(function(U){return d.state.resolver.setVariables(R,P.request.node),W$e.create(function(B){return d.setState(function(q){return{data:q.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){B.next(),B.complete()})})}).finally(function(){d._refetchSubscription===O&&(d._refetchSubscription=null)}).subscribe((0,dc.default)((0,dc.default)({},A),{},{start:function(B){d._refetchSubscription=O=B,A.start&&A.start(B)}})),{dispose:function(){O&&O.unsubscribe()}})});var f=Ny(l.__relayContext),h=(u=l.__rootIsQueryRenderer)!==null&&u!==void 0?u:!1;d._refetchSubscription=null;var p=Z3(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:tD(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var s=a.prototype;return s.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(u,d){this.state.resolver!==d.resolver?(d.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.getDerivedStateFromProps=function(u,d){var f,h=d.prevProps,p=Ny(u.__relayContext),m=(f=u.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,g=eD(t,h),v=eD(t,u),_=$y(t,h),x=$y(t,u),S=d.resolver;if(d.prevPropsContext.environment!==p.environment||!X3(_,x)||!X3(g,v))return S=Z3(p,i,t,u,m),{data:S.resolve(),localVariables:null,prevProps:u,prevPropsContext:p,contextForChildren:p,relayProp:tD(p.environment,d.relayProp.refetch),resolver:S};d.localVariables||S.setProps(u);var E=S.resolve();return E!==d.data?{data:E,prevProps:u}:null},s.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},s.shouldComponentUpdate=function(u,d){if(d.data!==this.state.data||d.relayProp!==this.state.relayProp)return!0;for(var f=Object.keys(u),h=0;h<f.length;h++){var p=f[h];if(p==="__relayContext"){if(this.state.prevPropsContext.environment!==d.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(p)&&!X$e(u[p],this.props[p]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();d!==h&&this.setState({data:h})},s._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();f.setCallback(this.props,this._handleFragmentDataUpdate),d!==h&&this.setState({data:h})},s._getFragmentVariables=function(){return Y$e(t,this.props)},s._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new K$e),this._queryFetcher},s.render=function(){var u=this.props,d=u.componentRef;u.__relayContext,u.__rootIsQueryRenderer;var f=(0,z$e.default)(u,B$e),h=this.state,p=h.relayProp,m=h.contextForChildren;return Dy.createElement(G$e.Provider,{value:m},Dy.createElement(e,(0,L$e.default)({},f,this.state.data,{ref:d,relay:p})))},a})(Dy.Component),(0,Ty.default)(n,"displayName",i),n}function tD(e,t){return{environment:e,refetch:t}}function eNe(e,t,r){return j$e(e,t,function(n,i){return Z$e(n,i,r)})}var tNe={createContainer:eNe},rNe=St;rNe.createContext({wrapPrepareQueryResource:function(t){return t()}});var nNe=Ud,iNe=Me,oNe=St,aNe=oNe.useContext;function sNe(){var e=aNe(nNe);return e==null&&iNe(!1),e.environment}var C9=sNe,R9=St;R9.useContext;R9.useEffect;var lNe=Ke.default,rD=lNe(Qt),uNe=Me,Qu=_t,nD=Qu.__internal.fetchQueryDeduped,iD=Qu.Observable,oD=Qu.PreloadableQueryRegistry,aD=Qu.ReplaySubject,sD=Qu.createOperationDescriptor,cNe=Qu.getRequest,dNe=Qu.getRequestIdentifier,lD=100001;function fNe(e,t,r,n,i){var o;lD++;var a=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",s=(0,rD.default)((0,rD.default)({},n?.networkCacheConfig),{},{force:!0}),l,u=!1,d=function(Z,W){return u=!0,e.executeWithSource({operation:Z,source:W})},f=new aD,h=iD.create(function(ae){return f.subscribe(ae)}),p,m=null,g=!1,v=function(Z,W){g=!0;var le=new aD,oe="raw-network-request-"+dNe(Z,r),Se=nD(e,oe,function(){var xe=e.getNetwork();return xe.execute(Z,r,s,void 0,void 0,void 0,void 0,W)}),be=Se.subscribe({error:function(ot){m=ot,le.error(ot)},next:function(ot){le.next(ot)},complete:function(){le.complete()}}),ue=be.unsubscribe;return p=ue,iD.create(function(xe){var ot=le.subscribe(xe);return function(){ot.unsubscribe(),p()}})},_,x=function(Z,W){g=!0;var le=nD(e,Z.request.identifier,W).subscribe({error:function(Se){f.error(Se)},next:function(Se){f.next(Se)},complete:function(){f.complete()}});_=le.unsubscribe},S=function(Z){var W=sD(Z,r,s);if(l=e.retain(W),a!=="store-only"){var le=a!=="store-or-network"||e.check(W).status!=="available";le&&x(W,function(){var oe=v(Z.params,function(){return e.check(W)}),Se=d(W,oe);return Se})}},E,k,R;if(t.kind==="PreloadableConcreteRequest"){var T=t;E=T.params;var A=E;R=A.id,R===null&&uNe(!1);var N=oD.get(R);if(N!=null)S(N);else{var P=a==="store-only"?null:v(E),O=oD.onLoad(R,function(ae){k();var Z=sD(ae,r,s);l=e.retain(Z),P!=null&&x(Z,function(){return d(Z,P)})});k=O.dispose}}else{var D=t,U=cNe(D);E=U.params,R=E.cacheID!=null?E.cacheID:E.id,S(U)}var B=!1,q=!1,Q=!1,J=function(){q||(l&&l.dispose(),q=!0)},te=function(){Q||(u?_&&_():p&&p(),k&&k(),Q=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){B||(J(),te(),B=!0)},releaseQuery:J,cancelNetworkRequest:te,fetchKey:lD,id:R,get isDisposed(){return B||q},get networkError(){return m},name:E.name,networkCacheConfig:s,fetchPolicy:a,source:g?h:void 0,variables:r}}var Jv={loadQuery:fNe},hNe=Jv;hNe.loadQuery;var pNe=St;pNe.useMemo;var mNe=Me,gNe=(function(){function e(r){this._capacity=r,this._capacity>0||mNe(!1),this._map=new Map}var t=e.prototype;return t.set=function(n,i){if(this._map.delete(n),this._map.set(n,i),this._map.size>this._capacity){var o=this._map.keys().next();o.done||this._map.delete(o.value)}},t.get=function(n){var i=this._map.get(n);return i!=null&&(this._map.delete(n),this._map.set(n,i)),i},t.has=function(n){return this._map.has(n)},t.delete=function(n){this._map.delete(n)},t.size=function(){return this._map.size},t.capacity=function(){return this._capacity-this._map.size},t.clear=function(){this._map.clear()},e})();function vNe(e){return new gNe(e)}var _Ne={create:vNe},bNe=Ke.default,Fy=bNe(pi),yNe=300*1e3,xNe=(function(){function e(r){var n=this;(0,Fy.default)(this,"_retainCount",0),(0,Fy.default)(this,"_retainDisposable",null),(0,Fy.default)(this,"_releaseTemporaryRetain",null),this._retain=function(i){return n._retainCount++,n._retainCount===1&&(n._retainDisposable=r(i)),{dispose:function(){n._retainCount=Math.max(0,n._retainCount-1),n._retainCount===0&&n._retainDisposable!=null&&(n._retainDisposable.dispose(),n._retainDisposable=null)}}}}var t=e.prototype;return t.temporaryRetain=function(n){var i=this,o;if(n.isServer())return{dispose:function(){}};var a=this._retain(n),s=null,l=function(){clearTimeout(s),s=null,i._releaseTemporaryRetain=null,a.dispose()};return s=setTimeout(l,yNe),(o=this._releaseTemporaryRetain)===null||o===void 0||o.call(this),this._releaseTemporaryRetain=l,{dispose:function(){var d;(d=i._releaseTemporaryRetain)===null||d===void 0||d.call(i)}}},t.permanentRetain=function(n){var i=this._retain(n);return this.releaseTemporaryRetain(),i},t.releaseTemporaryRetain=function(){var n;(n=this._releaseTemporaryRetain)===null||n===void 0||n.call(this),this._releaseTemporaryRetain=null},t.getRetainCount=function(){return this._retainCount},e})(),SNe=xNe,A9=Ke.default,Mm=A9(Qt),T9=A9(pi),wNe=_Ne,ENe=SNe,kNe=Me,CNe=_t,RNe=CNe.isPromise,ANe=1e3,$9="store-or-network",N9="store-and-network",TNe=typeof WeakMap=="function";function pg(e){return e.request.node.params.metadata.live!==void 0}function Bx(e,t,r,n,i){var o=r??(pg(t)?N9:$9),a=n??e.UNSTABLE_getDefaultRenderPolicy(),s="".concat(o,"-").concat(a,"-").concat(t.request.identifier);return i!=null?"".concat(s,"-").concat(i):s}function uD(e,t){var r={__id:e.fragment.dataID,__fragments:(0,T9.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var $Ne=2e5;function Iy(e,t,r,n,i,o){var a=pg(t),s=n,l=i,u=new ENe(function(f){var h=f.retain(t);return{dispose:function(){a&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:$Ne++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return s},setValue:function(h){s=h},setNetworkSubscription:function(h){a&&l!=null&&l.unsubscribe(),l=h},temporaryRetain:function(h){return u.temporaryRetain(h)},permanentRetain:function(h){return u.permanentRetain(h)},releaseTemporaryRetain:function(){u.releaseTemporaryRetain()}};return d}var NNe=(function(){function e(r){var n=this;(0,T9.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=wNe.create(ANe)}var t=e.prototype;return t.prepare=function(n,i,o,a,s,l,u){var d=Bx(this._environment,n,o,a,l);return this.prepareWithIdentifier(d,n,i,o,a,s,u)},t.prepareWithIdentifier=function(n,i,o,a,s,l,u){var d=this._environment,f=a??(pg(i)?N9:$9),h=s??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),m=null,g=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,u,(0,Mm.default)((0,Mm.default)({},l),{},{unsubscribe:function(x){m?.dispose();var S=l?.unsubscribe;S&&S(x)}}))),m=p.temporaryRetain(d);var v=p.getValue();if(RNe(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:g,operation:i,queryAvailability:p.operationAvailability,renderPolicy:h}),v;if(v instanceof Error)throw v;return v},t.retain=function(n,i){var o=this._environment,a=n.cacheIdentifier,s=n.operation,l=this._getOrCreateCacheEntry(a,s,null,n,null),u=l.permanentRetain(o);return o.__log({name:"queryresource.retain",profilerContext:i,resourceID:l.id}),{dispose:function(){u.dispose()}}},t.releaseTemporaryRetain=function(n){var i=this._cache.get(n.cacheIdentifier);i?.releaseTemporaryRetain()},t.TESTS_ONLY__getCacheEntry=function(n,i,o,a){var s=this._environment,l=Bx(s,n,i,o,a);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,a,s){var l=this._cache.get(n);return l==null&&(l=Iy(n,i,o,a,s,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,a,s,l,u){var d=this,f=this._environment,h=f.check(i),p=h.status,m=p==="available",g=m||s==="partial"&&p!=="stale",v,_,x=function(){};switch(a){case"store-only":{v=!1,_=!0;break}case"store-or-network":{v=!m,_=g;break}case"store-and-network":{v=!0,_=g;break}case"network-only":default:{v=!0,_=!1;break}}if(_){var S=uD(i,n),E=Iy(n,i,h,S,null,this._clearCacheEntry);this._cache.set(n,E)}if(v){var k=uD(i,n),R;o.subscribe({start:function(D){R=D;var U=d._cache.get(n);U&&U.setNetworkSubscription(R);var B=u?.start;if(B){var q=(0,Mm.default)((0,Mm.default)({},D),{},{unsubscribe:function(){pg(i)&&D.unsubscribe()}});B(q)}},next:function(){var D=d._getOrCreateCacheEntry(n,i,h,k,R);D.processedPayloadsCount+=1,D.setValue(k),x();var U=u?.next;if(U!=null){var B=f.lookup(i.fragment);U(B)}},error:function(D){var U=d._getOrCreateCacheEntry(n,i,h,D,R);U.processedPayloadsCount===0&&U.setValue(D),x(),R=null,U.setNetworkSubscription(null);var B=u?.error;B&&B(D)},complete:function(){x(),R=null;var D=d._cache.get(n);D&&D.setNetworkSubscription(null);var U=u?.complete;U&&U()},unsubscribe:u?.unsubscribe});var T=this._cache.get(n);if(!T){var A=new Promise(function(O){x=O});A.displayName="Relay("+i.fragment.node.name+")",T=Iy(n,i,h,A,R,this._clearCacheEntry),this._cache.set(n,T)}}else{var N=u?.complete;N&&N()}var P=this._cache.get(n);return P==null&&kNe(!1),f.__log({name:"queryresource.fetch",resourceID:P.id,operation:i,profilerContext:l,fetchPolicy:a,renderPolicy:s,queryAvailability:h,shouldFetch:v}),P},e})();function DNe(e){return new NNe(e)}var cD=TNe?new WeakMap:new Map;function FNe(e){var t=cD.get(e);if(t)return t;var r=DNe(e);return cD.set(e,r),r}var Sp={getQueryResourceForEnvironment:FNe,getQueryCacheIdentifier:Bx},INe=St;INe.useMemo;var D9=St;D9.useCallback;D9.useEffect;var PNe=St,ONe=_t,MNe=ONe.__internal.createRelayLoggingContext,LNe=MNe(PNe),zNe=LNe,UNe=St,BNe=UNe.useContext;function jNe(){return BNe(zNe)}var F9=jNe,K2=Ke.default,dD=K2(Qt),wl=K2(Ur),qNe=K2($l),VNe=Sp,I9=VNe.getQueryResourceForEnvironment,GNe=C9,KNe=F9,jl=Me,wp=St;wp.useDebugValue;var Py=wp.useEffect,Oy=wp.useMemo,fD=wp.useRef,Lm=wp.useState,Ns=_t,P9=Ns.__internal,HNe=P9.fetchQuery,WNe=P9.getPromiseForActiveRequest,zm=Ns.RelayFeatureFlags,hD=Ns.areEqualSelectors,JNe=Ns.createOperationDescriptor,QNe=Ns.getPendingOperationsForFragment,YNe=Ns.getSelector,XNe=Ns.getVariablesFromFragment,pD=Ns.handlePotentialSnapshotErrors,mD=Ns.recycleNodesInto;function ZNe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function e3e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,wl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,wl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function t3e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,wl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,wl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function r3e(e,t,r){if(t.kind==="singular")pD(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,wl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;pD(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function mg(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=mD(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=mD(u.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==u.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&jl(!1),[a,{kind:"plural",snapshots:s,epoch:r}]}}function n3e(e,t,r,n,i){var o=XNe(t,r),a=(0,dD.default)((0,dD.default)({},o),{},{id:n.clientEdgeDestinationID}),s=JNe(n.request,a,i?.networkCacheConfig),l=I9(e),u=l.prepare(s,HNe(e,s),i?.fetchPolicy);return[u,WNe(e,s.request)]}function i3e(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(a){r(function(s){if(s.kind!=="singular"||s.snapshot.selector!==a.selector){var l=mg(e,s);if(l!=null){var u=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),n.current=u,u?d:s}else return s}return n.current=!0,{kind:"singular",snapshot:a,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(a,s){return e.subscribe(a,function(l){r(function(u){var d;if(u.kind!=="plural"||((d=u.snapshots[s])===null||d===void 0?void 0:d.selector)!==l.selector){var f=mg(e,u);if(f!=null){var h=f[0],p=f[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),n.current=n.current||h,h?p:u}else return u}var m=(0,qNe.default)(u.snapshots);return m[s]=l,n.current=!0,{kind:"plural",snapshots:m,epoch:e.getStore().getEpoch()}})})});return function(){var a=(0,wl.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;l.dispose()}}catch(u){a.e(u)}finally{a.f()}}}}function gD(e,t){return t==null?{kind:"bailout"}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch()}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch()}}function o3e(e,t,r,n){var i,o,a=Oy(function(){return YNe(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||jl(!1):Array.isArray(t)&&jl(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||jl(!1);var l=GNe(),u;zm.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=KNe());var d=Lm(function(){return gD(l,a)}),f=d[0],h=d[1],p=f,m=Lm(p),g=m[0],v=m[1],_=g,x=Lm(a),S=x[0],E=x[1],k=Lm(l),R=k[0],T=k[1];if(!hD(a,S)||l!==R){E(a),T(l);var A=gD(l,a);h(A),v(A),p=A,_=A}var N=fD(!1);if(Py(function(){N.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||zm.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var P=Oy(function(){var le=e3e(p),oe,Se=[];if(le!=null&&le.length){oe=[];var be=(0,wl.default)(le),ue;try{for(be.s();!(ue=be.n()).done;){var xe=ue.value,ot=n3e(l,e,t,xe,n),rr=ot[0],It=ot[1];oe.push(rr),It!=null&&Se.push(It)}}catch(mi){be.e(mi)}finally{be.f()}}return[oe,Se]},[p,l,e,t,n]),O=P[0],D=P[1];if(D.length)throw Promise.all(D);Py(function(){var le=I9(l);if(O!=null&&O.length){var oe=[],Se=(0,wl.default)(O),be;try{for(Se.s();!(be=Se.n()).done;){var ue=be.value;oe.push(le.retain(ue))}}catch(xe){Se.e(xe)}finally{Se.f()}return function(){for(var xe=0,ot=oe;xe<ot.length;xe++){var rr=ot[xe];rr.dispose()}}}},[l,O])}if(ZNe(p)){var U=t3e(p);if(U!=null&&U.length>0)throw Promise.all(U.map(function(le){return l.getStore().getLiveResolverPromise(le)}));if(zm.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==R||!N.current||!hD(N.current,a)){a==null&&jl(!1);var B=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,q=QNe(l,e,B);if(q)throw q.promise}}r3e(l,p,u);var Q=fD(!1);if(Py(function(){var le=_,oe=mg(l,_);if(oe!==null){var Se=oe[0],be=oe[1];Se&&h(be),le=be}return i3e(l,le,h,Q)},[l,_]),Q.current){var J=mg(l,p);if(J!=null){var te=J[0],ae=J[1];te&&(h(ae),p=ae)}Q.current=!1}var Z;if(s){var W=t==null;Z=Oy(function(){return p.kind==="bailout"?W?null:[]:(p.kind!=="plural"&&jl(!1),p.snapshots.map(function(le){return le.data}))},[p,W])}else p.kind==="bailout"?Z=null:(p.kind!=="singular"&&jl(!1),Z=p.snapshot.data);return zm.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(Z===void 0||Array.isArray(Z)&&Z.length>0&&Z.every(function(le){return le===void 0})),Z}var a3e=o3e,H2=Ke.default,vD=H2(Qt),El=H2(Ur),s3e=H2($l),l3e=Sp,O9=l3e.getQueryResourceForEnvironment,u3e=C9,c3e=F9,ql=Me,Ep=St;Ep.useDebugValue;var Um=Ep.useEffect,My=Ep.useMemo,_D=Ep.useRef,d3e=Ep.useState,Ds=_t,M9=Ds.__internal,f3e=M9.fetchQuery,h3e=M9.getPromiseForActiveRequest,Bm=Ds.RelayFeatureFlags,bD=Ds.areEqualSelectors,p3e=Ds.createOperationDescriptor,m3e=Ds.getPendingOperationsForFragment,g3e=Ds.getSelector,v3e=Ds.getVariablesFromFragment,yD=Ds.handlePotentialSnapshotErrors,xD=Ds.recycleNodesInto;function _3e(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function b3e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,El.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,El.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function y3e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,El.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,El.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function x3e(e,t,r){if(t.kind==="singular")yD(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,El.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;yD(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function jx(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=xD(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r,selector:t.selector,environment:t.environment}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=xD(u.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==u.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&ql(!1),[a,{kind:"plural",snapshots:s,epoch:r,selector:t.selector,environment:t.environment}]}}function S3e(e,t,r,n,i){var o=v3e(t,r),a=(0,vD.default)((0,vD.default)({},o),{},{id:n.clientEdgeDestinationID}),s=p3e(n.request,a,i?.networkCacheConfig),l=O9(e),u=l.prepare(s,f3e(e,s),i?.fetchPolicy),d=h3e(e,s.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[u,d]}function SD(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(a){var s=null;if(a.kind!=="singular"||a.snapshot.selector!==o.selector||a.environment!==e){var l=jx(a.environment,a);if(l!=null){var u=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),s=u?d:a}else s=a}else s={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return s})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,a){return e.subscribe(o,function(s){r(function(l){var u,d=null;if(l.kind!=="plural"||((u=l.snapshots[a])===null||u===void 0?void 0:u.selector)!==s.selector||l.environment!==e){var f=jx(l.environment,l);if(f!=null){var h=f[0],p=f[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),d=h?p:l}else d=l}else{var m=(0,s3e.default)(l.snapshots);m[a]=s,d={kind:"plural",snapshots:m,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,El.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;s.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function wD(e,t){return t==null?{kind:"bailout",environment:e}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch(),selector:t,environment:e}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch(),selector:t,environment:e}}function w3e(e,t,r,n){var i,o,a=My(function(){return g3e(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||ql(!1):Array.isArray(t)&&ql(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||ql(!1);var l=u3e(),u;Bm.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=c3e());var d=d3e(function(){return wD(l,a)}),f=d[0],h=d[1],p=f,m=p.environment;if(!bD(a,p.selector)||l!==p.environment){var g=wD(l,a);h(g),p=g}var v=_D(!1);if(Um(function(){v.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||Bm.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var _=My(function(){var D=b3e(p),U,B=[];if(D!=null&&D.length){U=[];var q=(0,El.default)(D),Q;try{for(q.s();!(Q=q.n()).done;){var J=Q.value,te=S3e(l,e,t,J,n),ae=te[0],Z=te[1];U.push(ae),Z!=null&&B.push(Z)}}catch(W){q.e(W)}finally{q.f()}}return[U,B]},[p,l,e,t,n]),x=_[0],S=_[1];if(S.length){var E=Promise.all(S);throw E.displayName="RelayClientEdge(".concat(S.map(function(D){return D.displayName}).join(","),")"),E}Um(function(){var D=O9(l);if(x!=null&&x.length){var U=[],B=(0,El.default)(x),q;try{for(B.s();!(q=B.n()).done;){var Q=q.value;U.push(D.retain(Q))}}catch(J){B.e(J)}finally{B.f()}return function(){for(var J=0,te=U;J<te.length;J++){var ae=te[J];ae.dispose()}}}},[l,x])}if(_3e(p)){var k=y3e(p);if(k!=null&&k.length>0){var R=Promise.all(k.map(function(D){return l.getStore().getLiveResolverPromise(D)}));throw R.displayName="RelayLiveResolver("+e.name+")",R}if(Bm.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==m||!v.current||!bD(v.current,a)){a==null&&ql(!1);var T=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,A=m3e(l,e,T);if(A)throw A.promise}}x3e(l,p,u);var N=_D(null);Um(function(){var D=N.current;if(D!=null){if(p.environment===D.environment&&p.selector===D.selector)return;D.dispose()}if(p.kind!=="bailout"){var U=p,B=jx(p.environment,p);if(B!==null){var q=B[0],Q=B[1];if(q){h(Q);return}U=Q}var J=SD(p.environment,U,h);N.current={dispose:J,selector:p.selector,environment:p.environment}}},[p]),Um(function(){if(N.current==null&&p.kind!=="bailout"){var D=SD(p.environment,p,h);N.current={dispose:D,selector:p.selector,environment:p.environment}}return function(){var U;(U=N.current)===null||U===void 0||U.dispose(),N.current=null}},[]);var P;if(s){var O=t==null;P=My(function(){return p.kind==="bailout"?O?null:[]:(p.kind!=="plural"&&ql(!1),p.snapshots.map(function(D){return D.data}))},[p,O])}else p.kind==="bailout"?P=null:(p.kind!=="singular"&&ql(!1),P=p.snapshot.data);return Bm.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(P===void 0||Array.isArray(P)&&P.length>0&&P.every(function(D){return D===void 0})),P}var E3e=w3e,L9=Ke.default;L9(a3e);L9(E3e);var z9=Sp;z9.getQueryCacheIdentifier;z9.getQueryResourceForEnvironment;var Qv=St;Qv.useContext;Qv.useEffect;Qv.useState;Qv.useRef;var k3e=St;k3e.useState;var C3e=St,U9=_t;U9.createOperationDescriptor;U9.getRequest;C3e.useMemo;var R3e=_t;R3e.__internal.fetchQuery;var A3e=Ke.default;A3e(Qt);var B9=St;B9.useEffect;B9.useRef;var T3e=Ke.default;T3e(Ur);var Yv=St;Yv.useCallback;Yv.useEffect;Yv.useRef;Yv.useState;var $3e=St;$3e.useDebugValue;var N3e=_t;N3e.getFragment;var D3e=Ke.default;D3e(Qt);var Xv=St,F3e=_t;F3e.commitMutation;Xv.useState;Xv.useEffect;Xv.useRef;Xv.useCallback;var j9=_t;j9.ConnectionInterface;j9.getValueAtPath;var W2=St,q9=_t;q9.__internal.getObservableForActiveRequest;q9.getSelector;W2.useEffect;W2.useState;W2.useMemo;var I3e=Ke.default;I3e(Qt);var J2=St;J2.useCallback;J2.useRef;J2.useState;var kp=_t;kp.__internal.fetchQuery;kp.createOperationDescriptor;kp.getPaginationVariables;kp.getRefetchMetadata;kp.getSelector;var P3e=Ke.default;P3e(Qt);var Q2=St;Q2.useCallback;Q2.useEffect;Q2.useState;var qd=_t;qd.__internal.fetchQuery;qd.RelayFeatureFlags;qd.createOperationDescriptor;qd.getPaginationVariables;qd.getRefetchMetadata;qd.getSelector;var V9=Ke.default;V9(Qt);V9(Ur);var O3e=Sp;O3e.getQueryResourceForEnvironment;var Yu=_t;Yu.__internal.fetchQuery;Yu.RelayFeatureFlags;Yu.createOperationDescriptor;Yu.getPendingOperationsForFragment;Yu.getSelector;Yu.getVariablesFromFragment;Yu.handlePotentialSnapshotErrors;var M3e=Ke.default;M3e(Ur);var L3e=Jv;L3e.loadQuery;var Cp=St;Cp.useCallback;Cp.useEffect;Cp.useInsertionEffect;Cp.useRef;Cp.useState;var z3e=_t;z3e.getRequest;var U3e=Ke.default;U3e(Ur);var B3e=Jv;B3e.loadQuery;var Zv=St;Zv.useCallback;Zv.useEffect;Zv.useRef;Zv.useState;var G9=_t;G9.RelayFeatureFlags;G9.getRequest;var j3e=Ke.default;j3e(Qt);var q3e=Sp;q3e.getQueryResourceForEnvironment;var Y2=St;Y2.useCallback;Y2.useContext;Y2.useReducer;var Vd=_t;Vd.__internal.fetchQuery;Vd.createOperationDescriptor;Vd.getFragmentIdentifier;Vd.getRefetchMetadata;Vd.getSelector;Vd.getValueAtPath;var V3e=Ke.default;V3e(Qt);var X2=St;X2.useCallback;X2.useDebugValue;X2.useState;var e_=_t;e_.RelayFeatureFlags;e_.getFragment;e_.getFragmentIdentifier;e_.getPaginationMetadata;var G3e=Ke.default;G3e(Qt);var Xu=St;Xu.useCallback;Xu.useDebugValue;Xu.useEffect;Xu.useLayoutEffect;Xu.useMemo;Xu.useRef;Xu.useState;var Z2=_t;Z2.getFragment;Z2.getFragmentIdentifier;Z2.getPaginationMetadata;var t_=_t;t_.ConnectionInterface;t_.RelayFeatureFlags;t_.getSelector;t_.getValueAtPath;var K3e=St;K3e.useDebugValue;var H3e=_t,K9=H3e.__internal;K9.fetchQueryDeduped;K9.fetchQuery;var W3e=St;W3e.useDebugValue;var J3e=_t;J3e.getFragment;var H9=St;H9.useEffect;H9.useRef;var Q3e=St;Q3e.useEffect;var Y3e=_t;Y3e.requestSubscription;var X3e=Ud,Z3e=XTe,eDe=A$e,tDe=tNe,rDe=Jv;rDe.loadQuery;var No=_t,nDe={ConnectionHandler:No.ConnectionHandler,MutationTypes:No.MutationTypes,RangeOperations:No.RangeOperations,ReactRelayContext:X3e,applyOptimisticMutation:No.applyOptimisticMutation,commitLocalUpdate:No.commitLocalUpdate,commitMutation:No.commitMutation,createFragmentContainer:Z3e.createContainer,createPaginationContainer:eDe.createContainer,createRefetchContainer:tDe.createContainer,fetchQuery_DEPRECATED:No.fetchQuery_DEPRECATED,graphql:No.graphql,readInlineData:No.readInlineData,requestSubscription:No.requestSubscription,fetchQuery:No.fetchQuery},iDe=nDe;function oDe(e){let t=iDe.ReactRelayContext.Provider;return br(t,{value:{environment:e.environment},children:e.children})}let aDe={make:oDe},sDe={Provider:aDe};function qx(e){return RL(kL(e))}function lDe(e,t,r){let n=async(i,o,a,s)=>{let l=F(Wi(i.text),""),u=l.includes("Platform")||l.includes("platform")?e.platformApiEndpoint:e.apiEndpoint,d=Object.fromEntries([["content-type","application/json"]]),f=t();f!==void 0&&(d.Authorization="Bearer "+f);let p=(await fetch(u,{method:"POST",headers:d,body:F(JSON.stringify({query:l,variables:o}),"")})).json,m=await p();return qx(m)&&r(),m};return hTe.make(_t.Network.create(n),cTe.make(new _t.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function uDe(e){let t=e.config,r=La(),n=Nt(()=>lDe(t,()=>C(r,i=>i.getToken()),()=>re(r,i=>i.logout())),[t,r]);return b(sDe.Provider.make,{environment:n,children:e.children})}let cDe=uDe;function ED(e){return C(e,t=>{if(t.trim()!=="")return t})}function bf(e,t,r,n){let i=C(n,o=>o.nav);return{label:F(ED(C(i,o=>o.label)),t),icon:void 0,group:F(ED(C(i,o=>o.group)),e),sortOrder:F(C(i,o=>o.order),r),hidden:C(i,o=>o.hidden)}}function dDe(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function fDe(e,t){return e+"_"+t+"EventHistory"}function hDe(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
78
+ `+e+`(
79
+ filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
80
+ first: $first
81
+ after: $after
82
+ ) {
83
+ edges {
84
+ node {
85
+ position
86
+ eventType
87
+ payload
88
+ tags { key value }
89
+ meta { user time correlationId causationId }
90
+ recordedAt
91
+ }
92
+ cursor
93
+ }
94
+ pageInfo { hasNextPage endCursor }
95
+ }
96
+ }`}function pDe(e){return fe(C(H(e),t=>M(t,"x-reventless-audit")),!1,t=>{let r=et(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let kD={contents:[]};function CD(e){if(!kD.contents.includes(e)){kD.contents.push(e),console.error('[AutoUI] View "'+e+'" opted into an audit trail but no event log could be resolved for it — the view declares no linked write side, so there is no `…EventHistory` field to query. Remove the audit hint, or check that the read model projects an aggregate or slice.');return}}function mDe(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=dDe(e.queryField);if(r!==void 0){if(n!==void 0){let i=fDe(n,r);return{queryField:i,queryDocument:hDe(i),displayName:r}}CD(e.name);return}CD(e.name)}function Us(e,t){return C(M(e,t),ce)}function gDe(e){let t=F(H(e),{}),r=F(C(M(t,"meta"),H),{}),n=ee(F(C(M(t,"tags"),Vt),[]),s=>{let l=F(H(s),{}),u=Us(l,"key"),d=Us(l,"value");if(u!==void 0&&d!==void 0)return[u,d]}),i=Us(t,"position"),o=Us(t,"eventType");if(i===void 0||o===void 0)return;let a=F(Us(r,"time"),F(Us(t,"recordedAt"),""));return{position:i,eventType:o,payload:F(M(t,"payload"),{}),tags:n,actor:Us(r,"user"),time:a,recordedAt:F(Us(t,"recordedAt"),a)}}function vDe(e,t){return ee(Uw(e,t),gDe)}function _De(e,t){let r=oL(e,t);return[r.hasNextPage,r.endCursor]}function bDe(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return vt(r).toLowerCase()}function yDe(e){return F(G(H(e),Pe),[]).filter(t=>t[0]!=="TAG")}function xDe(e){let t={};return e.map(r=>{let n=JSON.stringify(Ye(Pe(t)),null,2);yDe(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(Ye(Pe(t)),null,2);return[n,i]})}let SDe="System";function wDe(e,t){let r=xDe(e);return e.map((n,i)=>{let o=F(r[i],["",""]),a=fe(n.tags[0],t,s=>t+" "+s[1]);return{id:n.position,verb:bDe(n.eventType,t),subject:a,actor:F(n.actor,SDe),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function EDe(e){let t=[];return e.forEach(r=>re(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(Wc)}function kDe(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(Wc)}function zi(e){return"var("+e+")"}let CDe=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap",zi(I.lg)),c("padding",zi(I.xxl)),Xo({NAME:"percent",VAL:100}),HI({NAME:"percent",VAL:100}),Fa("center"),c("min-height","400px")]),RDe=w([c("font-size","48px"),c("line-height","1")]),ADe=w([c("color",zi(y.textPrimary)),c("font-size",zi($.sizeXxl)),c("font-weight",zi($.weightBold)),on(Re(0))]),TDe=w([c("color",zi(y.textSecondary)),c("font-size",zi($.sizeLg)),c("line-height",zi($.lineHeightRelaxed)),c("max-width","480px"),on(Re(0))]),$De=w([c("background",zi(y.brand)),c("color",zi(y.textOnBrand)),c("border-radius",zi(Y.md)),c("padding","var("+I.sm+") var("+I.lg+")"),c("font-size",zi($.sizeMd)),c("font-weight",zi($.weightMedium)),c("border","none"),c("cursor","pointer"),Yo(Re(8))]);function NDe(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:RDe}),b("h2",{children:t.title,className:ADe}),b("p",{children:fe(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:TDe}),b("button",{children:"Upgrade to unlock",className:$De})],className:CDe})}let DDe=NDe;function FDe(e){let t=e.children,r=e.definition,n=Tl(),i=r.requiredAccess;return i!==void 0&&!n(i)?b(DDe,{definition:r}):t}let jm=FDe,IDe=M;function RD(e,t){let r=C(t[0],n=>M(e,n));if(r!==void 0&&t.every(n=>Ne(M(e,n),r)))return r}function gg(e,t,r){let n=M(e,t);return n!==void 0?r(n):!0}function ek(e,t,r){return ee(t,n=>{let i=M(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}let tk=["body","text","message","comment","content"],PDe=["author","createdby","user","commenter","postedby"],ODe=["createdat","postedat","at","commentedat"];function W9(e){return ee(Dr(e),t=>{if(Yh(t[1]))return t[0]})}function rk(e,t){return W9(e).find(r=>t.includes(r.toLowerCase()))}function MDe(e){let t=jn(e,void 0,void 0),r=Dr(e).map(n=>n[0]).find(n=>fe(M(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:rk(e,PDe)}function LDe(e){return ee(Dr(e),t=>{if(Gg(t[1]))return t[0]}).find(t=>ODe.includes(t.toLowerCase()))}function J9(e){return W9(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function zDe(e,t){let r=Lo(t).toLowerCase();return J9(e).find(n=>n.toLowerCase()===r+"id")}function UDe(e){let t=J9(e);if(t.length===1)return t[0]}function BDe(e){return fe(C(H(e),t=>M(t,"x-reventless-comments")),!1,t=>{let r=et(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function AD(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=Lo(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let jDe=["addcomment","postcomment","comment","writecomment","leavecomment"];function qDe(e,t){let r=ee(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>jDe.some(i=>n.name.toLowerCase().startsWith(i)))}let TD={contents:[]};function VDe(e){if(!TD.contents.includes(e)){TD.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as comments but has no body field — no comment thread is wired. The convention expects a string field named '+tk.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function GDe(e,t){return ee(e.readModels.filter(r=>r.name!==t?BDe(r.schema)?!0:AD(r.name,t):!1),r=>{let n=zDe(r.schema,t),i=n!==void 0?n:AD(r.name,t)?UDe(r.schema):void 0,o=rk(r.schema,tk);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:MDe(r.schema),timestampField:LDe(r.schema),postCommand:qDe(r,e)}:void 0;VDe(r.name)})[0]}function fc(e,t){return C(M(e,t),ce)}function KDe(e,t,r){let n=ee(t,o=>{let a=F(H(o),{});if(Ne(fc(a,e.entityField),r))return a}),i=o=>C(C(e.timestampField,a=>fc(o,a)),qn);return n.toSorted((o,a)=>{let s=i(o),l=i(a);return s!==void 0?l!==void 0?s-l:-1:l!==void 0?1:0}).map((o,a)=>({id:F(fc(o,"id"),"#"+a.toString()),body:F(fc(o,e.bodyField),""),author:C(e.authorField,s=>fc(o,s)),timestamp:C(e.timestampField,s=>fc(o,s))}))}function HDe(e,t,r){let n=e.postCommand,i=F(C(n,a=>a.aggregateIdField),e.entityField),o=F(C(n,a=>rk(a.schema,tk)),e.bodyField);return Ye([[i,t],[o,r]])}function ba(e){return"var("+e+")"}function Q9(e){switch(e){case"Success":return y.success;case"Warning":return y.warning;case"Error":return y.error;case"Info":return y.info}}function WDe(e){return w([z("flex"),X("flexStart"),c("gap",ba(I.sm)),c("padding","var("+I.sm+") var("+I.md+")"),c("border-radius",ba(Y.md)),c("border-left","3px solid var("+Q9(e)+")"),c("background",ba(y.surfaceElevated)),c("font-size",ba($.sizeMd)),c("line-height",ba($.lineHeightNormal))])}function JDe(e){return w([c("color",ba(Q9(e))),c("font-size","16px"),$n(0),Yo(Re(1))])}let QDe=w([Vn(1)]),YDe=w([c("font-weight",ba($.weightMedium)),c("color",ba(y.textPrimary)),Jh(Re(2))]),XDe=w([c("color",ba(y.textSecondary))]),ZDe=w([c("background","none"),CK(Re(0),"none",NK),Ce("pointer"),c("color",ba(y.textSecondary)),c("font-size","16px"),c("line-height","1"),c("padding","0"),$n(0)]);function eFe(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function tFe(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[b("span",{children:eFe(r),className:JDe(r)}),L("div",{children:[fe(e.title,null,n=>b("div",{children:n,className:YDe})),b("div",{children:e.message,className:XDe})],className:QDe}),fe(e.onDismiss,null,n=>b("button",{children:"×","aria-label":"Dismiss",className:ZDe,onClick:i=>n()}))],className:WDe(r),role:"alert"})}let nk=tFe;function Ra(e){return"var("+e+")"}let rFe=w([Ft("fixed"),Ss(Re(0)),vd(Re(0)),Rl(Re(0)),xS(Re(0)),c("background","rgba(0,0,0,0.5)"),z("flex"),X("center"),Xe("center"),c("z-index","1000"),c("backdrop-filter","blur(2px)")]),nFe=w([c("background",Ra(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Ra(Y.lg)),c("box-shadow",Ra(kn.lg)),z("flex"),ve("column"),c("max-height","90vh"),c("max-width","90vw"),c("min-width","400px"),c("overflow","hidden")]),iFe=w([z("flex"),X("center"),Xe("spaceBetween"),c("padding","var("+I.md+") var("+I.lg+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),$n(0)]),oFe=w([c("color",Ra(y.textPrimary)),c("font-size",Ra($.sizeLg)),c("font-weight",Ra($.weightMedium)),on(Re(0))]),aFe=w([c("background","none"),c("border","none"),c("cursor","pointer"),c("color",Ra(y.textSecondary)),c("font-size","18px"),c("padding","0"),c("line-height","1"),je([c("color",Ra(y.textPrimary))])]),sFe=w([c("padding",Ra(I.lg)),c("overflow-y","auto"),Vn(1)]),lFe=w([z("flex"),X("center"),Xe("flexEnd"),c("gap",Ra(I.sm)),c("padding","var("+I.md+") var("+I.lg+")"),c("border-top","1px solid var("+y.borderSubtle+")"),$n(0)]);function uFe(e){let t=e.onClose,r=e.isOpen;return $e(()=>{if(!r)return;let n=i=>{if(i.key==="Escape")return t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[r]),r?b("div",{children:L("div",{children:[L("div",{children:[b("h2",{children:e.title,className:oFe}),b("button",{children:"x",className:aFe,onClick:n=>t()})],className:iFe}),b("div",{children:e.children,className:sFe}),fe(e.footer,null,n=>b("div",{children:n,className:lFe}))],className:nFe,style:fe(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:rFe,onClick:n=>t()}):null}let ik=uFe;function Ki(e){return"var("+e+")"}let cFe=w([z("flex"),ve("column"),c("gap",Ki(I.sm))]),dFe=w([c("overflow-x","auto")]),fFe=w([c("border-collapse","collapse"),c("font-size",Ki($.sizeSm)),c("min-width","min-content")]),ok=[c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("background",Ki(y.surfaceSubtle)),c("white-space","nowrap"),c("font-weight",Ki($.weightMedium))],hFe=w(ok.concat([c("text-align","left"),c("color",Ki(y.textSecondary))])),pFe=w(ok.concat([c("text-align","right"),c("color",Ki(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Ki($.sizeXs))])),mFe=w(ok.concat([c("text-align","left"),c("color",Ki(y.textPrimary))]));function gFe(e){return w([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("text-align","right"),c("white-space","nowrap"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("color",e>=.55?Ki(y.textOnBrand):e<=0?Ki(y.textDisabled):Ki(y.textPrimary))])}let vFe=w([z("flex"),X("center"),c("gap","6px"),c("font-size",Ki($.sizeXs)),c("color",Ki(y.textSecondary))]);function _Fe(e){return w([c("width","18px"),c("height","10px"),c("background","color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("border","1px solid var("+y.borderSubtle+")")])}function Y9(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function bFe(e){return nt(e,0,(t,r)=>nt(r,t,(n,i)=>i.value>n?i.value:n))}let X9=[.12,.35,.6,.85,1];function yFe(e){let t=e.cells,r=e.colHeaders,n=bFe(t);return L("div",{children:[b("div",{children:L("table",{children:[b("thead",{children:L("tr",{children:[b("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:hFe,scope:"col"}),r.map(i=>b("th",{children:i.label,className:pFe,scope:"col"},i.value))]})}),b("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[b("th",{children:i.label,className:mFe,scope:"row"}),r.map((a,s)=>{let l=F(C(t[o],u=>u[s]),{value:0,display:""});return b("td",{children:b("span",{children:l.display,title:i.label+" × "+a.label+": "+l.display}),className:gFe(Y9(l.value,n))},i.value+":"+a.value)})]},i.value))})],className:fFe}),className:dFe}),L("div",{children:["0",X9.map(i=>b("span",{className:_Fe(i)},i.toString())),e.maxLabel],className:vFe})],className:cFe})}let xFe=yFe;function SFe(e,t){let r=a=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(a,s,l)=>{if(typeof a!="object")switch(a){case"Function":case"Lazy":s[l]=r;return;case"Class":s[l]=[r,r,r,0];return}else{if(a.TAG!=="Module"){s[l]=a._0;return}let u=a._0,d={};s[l]=d;let f=u.length;for(let h=0;h<f;++h){let p=u[h];n(p[0],d,p[1])}return}},i={},o="dummy";return n(t,i,o),i[o]}function wFe(e,t,r){let n=(i,o,a,s,l)=>{if(typeof i!="object")switch(i){case"Function":s[l]=a;return;case"Lazy":case"Class":Object.assign(o,a);return}else{if(i.TAG!=="Module")return;let u=i._0;for(let d=0,f=u.length;d<f;++d){let h=u[d],p=h[1];n(h[0],o[p],a[p],o,p)}return}};if(typeof e!="object")throw{RE_EXN_ID:"Assert_failure",_1:["Primitive_module.res",68,9],Error:new Error};{let i=e._0;for(let o=0,a=i.length;o<a;++o){let s=i[o],l=s[1];n(s[0],t[l],r[l],t,l)}return}}function Vx(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function EFe(e,t,r){let n=C(M(e,t),Vx);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let a=o,s=i;if(a>r)return!0;let l=C(M(e,s),Vx);if(l===void 0)return!1;if(l===t)return!0;o=a+1|0,i=l}}}else return!1}function kFe(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},a={contents:0};e.forEach(l=>{let u=Vx(l);if(u!==void 0){if(M(t,u)!==void 0){if(EFe(t,l.key,r)){a.contents=a.contents+1|0,i.push(l.key);return}let f=F(M(n,u),[]);n[u]=f.concat([l.key]);return}o.contents=o.contents+1|0,i.push(l.key);return}i.push(l.key)});let s=(l,u)=>{let d=M(t,l);if(d===void 0)return;let f=u>=r?[]:ee(F(M(n,l),[]),h=>s(h,u+1|0));return{node:d,children:f}};return{roots:ee(i,l=>s(l,0)),detached:o.contents,cycles:a.contents}}function Z9(e){return nt(e.children,e.children.length,(t,r)=>t+Z9(r)|0)}let CFe="14px";function En(e){return"var("+e+")"}let RFe=w([z("flex"),ve("column"),c("gap",En(I.sm))]),AFe=w([c("overflow-x","auto"),c("padding-bottom","4px")]),TFe=w([z("flex"),X("flexStart"),Xe("center"),c("gap",En(I.lg)),c("min-width","min-content"),c("padding","var("+I.xs+") 0")]),$Fe=w([z("flex"),ve("column"),X("center"),c("min-width","min-content")]);function NFe(e){return w([z("flex"),ve("column"),c("gap","2px"),c("min-width","132px"),c("max-width","180px"),c("padding","var("+I.xs+") var("+I.sm+")"),c("border","1px solid var("+y.borderSubtle+")"),c("border-top","3px solid "+e),c("border-radius",En(Y.md)),c("background",En(y.surface)),c("text-align","left"),Ce("pointer"),je([c("background",En(y.surfaceSubtle))])])}let DFe=w([c("font-size",En($.sizeSm)),c("font-weight",En($.weightMedium)),c("color",En(y.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),FFe=w([c("font-size",En($.sizeXs)),c("color",En(y.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),IFe=w([c("margin-top","2px"),c("padding","0 6px"),c("border","1px solid var("+y.border+")"),c("border-radius","10px"),c("background",En(y.surface)),c("color",En(y.textSecondary)),c("font-size",En($.sizeXs)),c("line-height","16px"),Ce("pointer"),je([c("color",En(y.textPrimary))])]),$D=w([c("width","1px"),c("height",CFe),c("background",En(y.border))]),PFe=w([z("flex"),X("flexStart"),c("min-width","min-content")]),OFe=w([z("flex"),ve("column"),X("center"),c("min-width","min-content")]),MFe=w([c("padding","0 var("+I.xs+")")]),LFe=w([z("flex"),c("width","100%"),c("height","1px")]);function ND(e){return w([c("flex","1 1 50%"),c("background",e?En(y.border):"transparent")])}let zFe=w([c("font-size",En($.sizeXs)),c("color",En(y.textDisabled))]),UFe="var("+y.brand+")",ak=SFe(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function BFe(e){let t=e.depth,r=e.tree,n=de(()=>!1),i=n[1],o=n[0],a=Z9(r),s=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[b("span",{children:r.node.title,className:DFe}),l!==void 0&&l!==""?b("span",{children:l,className:FFe}):null],className:NFe(F(r.node.accent,UFe)),title:r.node.title,onClick:u=>re(r.node.onOpen,d=>d())}),s===0?null:L(Lr,{children:[b("button",{children:o?"+"+a.toString():"−","aria-expanded":!o,className:IFe,title:o?"Expand":"Collapse",onClick:u=>i(d=>!d)}),o?null:L(Lr,{children:[b("div",{className:$D}),b("div",{children:r.children.map((u,d)=>L("div",{children:[L("div",{children:[b("div",{className:ND(d>0)}),b("div",{className:ND(d<(s-1|0))})],className:LFe}),b("div",{className:$D}),b("div",{children:b(ak.make,{tree:u,depth:t+1|0}),className:MFe})],className:OFe},u.node.key)),className:PFe})]})]})],className:$Fe})}wFe({_0:[["Function","make"]]},ak,{make:BFe});function jFe(e){let t=kFe(e.nodes);if(t.roots.length===0)return b(_d,{title:"Nothing to chart",description:"No rows in this window."});let r=ee([e.windowNote,t.detached>0?t.detached.toString()+" item(s) whose parent is outside this window":void 0,t.cycles>0?t.cycles.toString()+" item(s) in a parent loop, shown as roots":void 0],n=>n);return L("div",{children:[b("div",{children:b("div",{children:t.roots.map(n=>b(ak.make,{tree:n,depth:0},n.node.key)),className:TFe}),className:AFe}),r.length===0?null:b("span",{children:r.join(" · "),className:zFe})],className:RFe})}let qFe=jFe;function Hi(e){return"var("+e+")"}let VFe=w([Ft("relative"),c("padding-left","28px"),z("flex"),ve("column"),c("gap",Hi(I.md))]),GFe=w([Ft("absolute"),vd(Re(7)),Ss(Re(8)),xS(Re(0)),c("width","2px"),c("background",Hi(y.borderSubtle))]),KFe=w([Ft("absolute"),vd(Re(-21)),Ss(Re(6)),c("width","10px"),c("height","10px"),c("border-radius","50%"),c("background",Hi(y.brand)),c("border","2px solid var("+y.surface+")"),$n(0)]),e7=w([Ft("relative"),z("flex"),ve("column"),c("gap","2px")]),HFe=zr([e7,w([c("background","none"),c("border","none"),c("padding","0"),Fa("left"),Ce("pointer"),je([c("opacity","0.85")])])]),WFe=w([z("flex"),X("center"),c("gap",Hi(I.sm))]),JFe=w([c("color",Hi(y.textDisabled)),c("font-size",Hi($.sizeXs)),c("font-family",Hi($.fontFamilyMono))]),QFe=w([c("color",Hi(y.textPrimary)),c("font-size",Hi($.sizeMd)),c("font-weight",Hi($.weightMedium))]),YFe=w([c("color",Hi(y.textSecondary)),c("font-size",Hi($.sizeSm)),c("line-height",Hi($.lineHeightNormal)),Wh(Re(0))]);function XFe(e){let t=e.onSelect,r=n=>L(Lr,{children:[b("div",{className:KFe,style:G(n.accent,i=>({background:i}))}),L("div",{children:[b("span",{children:n.timestamp,className:JFe}),fe(n.variant,null,i=>b(ds,{variant:i,label:n.label})),fe(n.variant,b("span",{children:n.label,className:QFe}),i=>null)],className:WFe}),fe(n.detail,null,i=>b("div",{children:i,className:YFe}))]});return L("div",{children:[b("div",{className:GFe}),e.entries.map(n=>t!==void 0?b("button",{children:r(n),className:HFe,type:"button",onClick:i=>t(n.id)},n.id):b("div",{children:r(n),className:e7},n.id))],className:VFe})}let ZFe=XFe;function eIe(e){let t=e[0];if(t===void 0)return;let r=nt(e,t.start,(i,o)=>o.start<i?o.start:i),n=nt(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[li(r),mo(li(n),1)]}function tIe(e,t){let r=(t-e)/UP;return r<=21?"Days":r<=120?"Weeks":"Months"}function DD(e){let t=new Date(e).getMonth()|0;return F(LP[t],"").slice(0,3)}function rIe(e,t){switch(t){case"Days":return ms(e);case"Weeks":return zP(e).toString()+" "+DD(e);case"Months":let r=new Date(e).getFullYear().toString();return DD(e)+" '"+r.slice(2)}}function nIe(e,t,r){let n=l=>{switch(r){case"Days":return mo(li(e),l);case"Weeks":return mo(Kg(e),l*7|0);case"Months":return DP(FP(e),l)}},i=[],o=0;for(;n(o)<t&&o<2e3;){let l=n(o);l>=e&&i.push(l),o=o+1|0}let a=i.length,s=a<=40?1:(a/40|0)+1|0;return fS(i,(l,u)=>{if(Ho(u,s)===0)return[l,rIe(l,r)]})}function vg(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function Jf(e){return e<0?0:e>100?100:e}function Gx(e,t,r){let n=Jf(vg(e.start,t,r)),o=Jf(vg(e.end_>e.start?e.end_:e.start,t,r))-n,a=o<.6?.6:o;return[n+a>100?100-a:n,a]}function t7(e){return e.map(t=>ee(t.dependsOn,r=>G(e.find(n=>n.key===r?n.key!==t.key:!1),n=>({from:n.key,to_:t.key,violated:t.start<n.end_})))).flat()}function iIe(e){return nt(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function r7(e){return t7(e).filter(t=>t.violated)}function oIe(e,t){return r7(e).some(r=>r.to_===t)}let sk="184px";function or(e){return"var("+e+")"}let aIe=w([z("flex"),ve("column"),c("gap",or(I.sm))]),sIe=w([z("flex"),X("center"),Xe("spaceBetween"),ei("wrap"),c("gap",or(I.sm))]),lIe=w([z("inlineFlex"),X("center"),c("gap",or(I.xs))]),n7=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",or(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",or(y.textSecondary)),c("font-size",or($.sizeSm)),Ce("pointer"),je([c("background",or(y.surfaceSubtle)),c("color",or(y.textPrimary))])]),uIe=zr([n7,w([c("background",or(y.surfaceSubtle)),c("color",or(y.textPrimary)),c("font-weight",or($.weightMedium))])]),cIe=w([c("font-size",or($.sizeMd)),c("font-weight",or($.weightMedium)),c("color",or(y.textPrimary))]),dIe=w([c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",or(Y.md)),c("overflow","hidden")]),i7=w([z("flex"),X("stretch")]),fIe=zr([i7,w([c("background",or(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")")])]),hIe=w([c("flex","0 0 "+sk),c("padding","4px var("+I.sm+")"),c("font-size",or($.sizeXs)),c("color",or(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),pIe=w([Ft("relative"),c("flex","1 1 auto"),c("height","22px"),c("overflow","hidden")]),mIe=w([Ft("absolute"),c("top","4px"),c("padding-left","3px"),c("border-left","1px solid var("+y.borderSubtle+")"),c("font-size",or($.sizeXs)),c("color",or(y.textSecondary)),c("white-space","nowrap"),c("pointer-events","none")]),gIe=w([Ft("relative")]),vIe=zr([i7,w([c("height","30px"),c("border-top","1px solid var("+y.borderSubtle+")")])]),_Ie=w([c("flex","0 0 "+sk),z("flex"),X("center"),c("gap","4px"),c("padding","0 var("+I.sm+")"),c("font-size",or($.sizeSm)),c("color",or(y.textPrimary)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden")]),bIe=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),yIe=w([c("color",or(y.warning)),c("font-size",or($.sizeXs)),c("flex","0 0 auto")]),xIe=w([Ft("relative"),c("flex","1 1 auto")]),SIe=w([Ft("absolute"),c("top","0"),c("bottom","0"),c("width","1px"),c("background",or(y.borderSubtle)),c("opacity","0.6"),c("pointer-events","none")]);function wIe(e){return w([Ft("absolute"),c("top","5px"),c("height","19px"),c("border","none"),c("border-radius",or(Y.sm)),c("background",e),c("padding","0"),Ce("pointer"),je([c("filter","brightness(1.12)")])])}let EIe=w([c("outline","2px solid var("+y.warning+")"),c("outline-offset","1px")]),kIe=w([Ft("absolute"),c("top","0"),c("left",sk),c("right","0"),c("bottom","0"),c("pointer-events","none")]),CIe=w([c("display","block"),c("width","100%"),c("height","100%")]),RIe=w([c("font-size",or($.sizeXs)),c("color",or(y.textDisabled))]),AIe="var("+y.brand+")";function il(e){return(Math.round(e*100)/100).toString()}function TIe(e,t){let r=mo(t,-1);return lo(e)===lo(r)?lo(e):lo(e)+" – "+lo(r)}function $Ie(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=E=>n.findIndex(k=>k.key===E),a=o(i.from),s=o(i.to_),l=n[a],u=n[s];if(l===void 0||u===void 0)return null;let d=Gx(l,r,t),h=Gx(u,r,t)[0],p=d[0]+d[1],m=a*30+30/2,g=s*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,_;if(h>p){let E=Jf((p+h)/2);_=[[p,m],[E,m],[E,g],[h,g]]}else{let E=Jf(p+1.4),k=Jf(h-1.4),R=(m+g)/2;_=[[p,m],[E,m],[E,R],[k,R],[k,g],[h,g]]}let x=i.violated?"var("+y.warning+")":"var("+y.border+")",S=_.length-2|0;return b("g",{children:_.map((E,k)=>{let R=_[k+1|0];return R!==void 0?b("line",{markerEnd:k===S?"url(#"+v+")":void 0,stroke:x,strokeWidth:"1.5",x1:il(E[0])+"%",x2:il(R[0])+"%",y1:il(E[1]),y2:il(R[1])},k.toString()):null})})}function NIe(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=yB(),o=de(()=>t),a=o[1],s="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,u=eIe(n);if(u===void 0)return b(_d,{title:"Nothing scheduled",description:"No row in this window carries a start and end date."});let d=u[1],f=u[0],h=F(o[0],tIe(f,d)),p=nIe(f,d,h),m=t7(n),g=iIe(n),v=r7(n).length,_=(E,k)=>b("button",{children:k,className:h===E?uIe:n7,onClick:R=>a(T=>E)}),x,S=0;if(r!==void 0||g!==0||v!==0?S=1:x=null,S===1){let E=ee([r,g>0?g.toString()+" dependency link(s) outside this window":void 0,v>0?v.toString()+" start(s) before a dependency ends":void 0],k=>k);x=b("span",{children:E.join(" · "),className:RIe})}return L("div",{children:[L("div",{children:[b("span",{children:TIe(f,d),className:cIe}),L("div",{children:[_("Days","Days"),_("Weeks","Weeks"),_("Months","Months")],className:lIe})],className:sIe}),L("div",{children:[L("div",{children:[b("div",{children:"Task",className:hIe}),b("div",{children:p.map(E=>{let k=E[0];return b("span",{children:E[1],className:mIe,style:{left:il(vg(k,f,d))+"%"}},k.toString())}),className:pIe})],className:fIe}),L("div",{children:[n.map(E=>{let k=Gx(E,f,d),R=oIe(n,E.key),T=wIe(F(E.accent,AIe)),A=R?T+" "+EIe:T;return L("div",{children:[L("div",{children:[R?b("span",{children:"▲",className:yIe,title:"Starts before a dependency ends"}):null,b("span",{children:E.title,className:bIe,title:E.title})],className:_Ie}),L("div",{children:[p.map(N=>{let P=N[0];return b("div",{className:SIe,style:{left:il(vg(P,f,d))+"%"}},P.toString())}),b("button",{className:A,style:{left:il(k[0])+"%",width:il(k[1])+"%"},title:E.title+" · "+ms(E.start)+" → "+ms(E.end_),onClick:N=>E.onOpen()})],className:xIe})],className:vIe},E.key)}),b("div",{children:L("svg",{children:[L("defs",{children:[b("marker",{children:b("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+y.border+")"}),id:s,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"}),b("marker",{children:b("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+y.warning+")"}),id:l,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"})]}),m.map(E=>b($Ie,{edge:E,tasks:n,from:f,to_:d,arrowId:s,arrowBadId:l},E.from+"->"+E.to_))],className:CIe}),className:kIe})],className:gIe})],className:dIe}),x],className:aIe})}let DIe=NIe;function Zn(e){return"var("+e+")"}let FIe=w([c("overflow-x","auto")]),IIe=w([c("border-collapse","collapse"),c("font-size",Zn($.sizeSm)),c("color",Zn(y.textPrimary)),c("min-width","min-content")]),lk=[c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("text-align","right"),c("white-space","nowrap")],PIe=w(lk),OIe=w(lk.concat([c("color",Zn(y.textDisabled))])),MIe=w([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("text-align","left"),c("color",Zn(y.textSecondary)),c("font-weight",Zn($.weightMedium)),c("white-space","nowrap")]),LIe=w([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("text-align","right"),c("background",Zn(y.surfaceSubtle)),c("color",Zn(y.textSecondary)),c("font-weight",Zn($.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Zn($.sizeXs)),c("white-space","nowrap")]),zIe=w([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("text-align","left"),c("background",Zn(y.surfaceSubtle)),c("color",Zn(y.textPrimary)),c("font-weight",Zn($.weightMedium)),c("white-space","nowrap")]),Ly=w(lk.concat([c("font-weight",Zn($.weightMedium))])),FD=w([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+I.sm+")"),c("background",Zn(y.surfaceSubtle)),c("color",Zn(y.textSecondary)),c("font-weight",Zn($.weightMedium)),c("white-space","nowrap")]),ID="Total";function UIe(e){let t=e.colTotals,r=e.rowTotals,n=e.cells,i=e.colHeaders;return b("div",{children:L("table",{children:[b("thead",{children:L("tr",{children:[b("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:MIe,scope:"col"}),i.map(o=>b("th",{children:o.label,className:LIe,scope:"col"},o.value)),b("th",{children:ID,className:FD,scope:"col"})]})}),b("tbody",{children:e.rowHeaders.map((o,a)=>{let s=F(n[a],[]);return L("tr",{children:[b("th",{children:o.label,className:zIe,scope:"row"}),i.map((l,u)=>{let d=F(s[u],{display:"",empty:!0});return b("td",{children:d.empty?"—":d.display,className:d.empty?OIe:PIe},l.value)}),b("td",{children:F(r[a],""),className:Ly})]},o.value)})}),b("tfoot",{children:L("tr",{children:[b("th",{children:ID,className:FD,scope:"row"}),i.map((o,a)=>b("td",{children:F(t[a],""),className:Ly},o.value)),b("td",{children:e.grandTotal,className:Ly})]})})],className:IIe}),className:FIe})}let BIe=UIe;function jIe(e){let t=e.label,r=e.size;return b(nx,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let Kx=jIe;function Ci(e){return"var("+e+")"}let qIe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",Ci(I.md))]),VIe=w([z("flex"),ve("column"),X("stretch"),c("gap",Ci(I.xs)),c("padding","0"),c("background","none"),c("border","none"),c("text-align","left"),Ce("pointer"),je([c("opacity","0.88")])]),GIe=w([c("width","100%"),c("aspect-ratio","4 / 3"),c("object-fit","cover"),c("background",Ci(y.surfaceSubtle)),c("border","1px solid var("+y.border+")"),c("border-radius",Ci(Y.md))]),KIe=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Ci(I.sm))]),HIe=w([c("color",Ci(y.textPrimary)),c("font-size",Ci($.sizeSm)),c("font-weight",Ci($.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),WIe=w([c("color",Ci(y.textSecondary)),c("font-size",Ci($.sizeXs)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),JIe=w([c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",Ci(Y.md)),c("color","#f5f5f5"),c("padding","4px var("+I.sm+")"),c("font-size",Ci($.sizeSm)),Ce("pointer"),je([c("background","rgba(255,255,255,0.22)")])]),QIe=w([c("color",Ci(y.textDisabled)),c("font-size",Ci($.sizeSm))]);function YIe(e){return ee(e,t=>G(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function XIe(e){let t=e.onOpen,r=e.items,n=de(()=>{}),i=n[1],o=n[0],a=YIe(r);if(r.length===0)return b("span",{children:"(empty)",className:QIe});let s;if(o!==void 0){let l=C(t,u=>G(a[o],d=>b("button",{children:"Open record →",className:JIe,type:"button",onClick:f=>{i(h=>{}),u(d.key)}})));s=b(NP,{slides:a,index:o,onIndexChange:u=>i(d=>u),onClose:()=>i(u=>{}),action:l})}else s=null;return L(Lr,{children:[b("div",{children:r.map(l=>{let u=l.src,d=l.onUpload,f=l.caption;return L("button",{children:[u!==void 0?b("img",{className:GIe,alt:l.title,src:u}):d!==void 0?b(Kx,{size:"Tile",label:"Add image"}):b(Kx,{size:"Tile"}),L("div",{children:[b("span",{children:l.title,className:HIe}),F(l.badge,null)],className:KIe}),f!==void 0?b("span",{children:f,className:WIe}):null],className:VIe,title:Wr(l.src)&&De(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,m=l.onUpload;if(p===void 0)return m!==void 0?m():re(t,v=>v(l.key));let g=a.findIndex(v=>v.key===l.key);return g!==-1?i(v=>g):re(t,v=>v(l.key))}},l.key)}),className:qIe}),s]})}let ZIe=XIe;const r_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gd(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function uk(e){return"nodeType"in e}function Fi(e){var t,r;return e?Gd(e)?e:uk(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function ck(e){const{Document:t}=Fi(e);return e instanceof t}function Rp(e){return Gd(e)?!1:e instanceof Fi(e).HTMLElement}function o7(e){return e instanceof Fi(e).SVGElement}function Kd(e){return e?Gd(e)?e.document:uk(e)?ck(e)?e:Rp(e)||o7(e)?e.ownerDocument:document:document:document}const kl=r_?_I:$e;function dk(e){const t=Fe(e);return kl(()=>{t.current=e}),tn(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function ePe(){const e=Fe(null),t=tn((n,i)=>{e.current=setInterval(n,i)},[]),r=tn(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function jh(e,t){t===void 0&&(t=[e]);const r=Fe(e);return kl(()=>{r.current!==e&&(r.current=e)},t),r}function Ap(e,t){const r=Fe();return Nt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function _g(e){const t=dk(e),r=Fe(null),n=tn(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function Hx(e){const t=Fe();return $e(()=>{t.current=e},[e]),t.current}let zy={};function n_(e,t){return Nt(()=>{if(t)return t;const r=zy[e]==null?0:zy[e]+1;return zy[e]=r,e+"-"+r},[e,t])}function a7(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[l,u]of s){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const Kc=a7(1),bg=a7(-1);function tPe(e){return"clientX"in e&&"clientY"in e}function s7(e){if(!e)return!1;const{KeyboardEvent:t}=Fi(e.target);return t&&e instanceof t}function rPe(e){if(!e)return!1;const{TouchEvent:t}=Fi(e.target);return t&&e instanceof t}function Wx(e){if(rPe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return tPe(e)?{x:e.clientX,y:e.clientY}:null}const PD="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function nPe(e){return e.matches(PD)?e:e.querySelector(PD)}const iPe={display:"none"};function oPe(e){let{id:t,value:r}=e;return ao.createElement("div",{id:t,style:iPe},r)}function aPe(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ao.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function sPe(){const[e,t]=de("");return{announce:tn(n=>{n!=null&&t(n)},[]),announcement:e}}const l7=ar(null);function lPe(e){const t=At(l7);$e(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function uPe(){const[e]=de(()=>new Set),t=tn(n=>(e.add(n),()=>e.delete(n)),[e]);return[tn(n=>{let{type:i,event:o}=n;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const cPe={draggable:`
97
+ To pick up a draggable item, press the space bar.
98
+ While dragging, use the arrow keys to move the item.
99
+ Press space again to drop the item in its new position, or press escape to cancel.
100
+ `},dPe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function fPe(e){let{announcements:t=dPe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=cPe}=e;const{announce:o,announcement:a}=sPe(),s=n_("DndLiveRegion"),[l,u]=de(!1);if($e(()=>{u(!0)},[]),lPe(Nt(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=ao.createElement(ao.Fragment,null,ao.createElement(oPe,{id:n,value:i.draggable}),ao.createElement(aPe,{id:s,announcement:a}));return r?bI(d,r):d}var ln;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ln||(ln={}));function yg(){}function OD(e,t){return Nt(()=>({sensor:e,options:t??{}}),[e,t])}function hPe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Nt(()=>[...t].filter(n=>n!=null),[...t])}const Qo=Object.freeze({x:0,y:0});function pPe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function mPe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function gPe(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const l=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const vPe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const l=gPe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(pPe)};function _Pe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function u7(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Qo}function bPe(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...r})}}const yPe=bPe(1);function xPe(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function SPe(e,t,r){const n=xPe(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,l=e.left-a-(1-i)*parseFloat(r),u=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const wPe={ignoreTransform:!1};function Tp(e,t){t===void 0&&(t=wPe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Fi(e).getComputedStyle(e);u&&(r=SPe(r,u,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}function MD(e){return Tp(e,{ignoreTransform:!0})}function EPe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function kPe(e,t){return t===void 0&&(t=Fi(e).getComputedStyle(e)),t.position==="fixed"}function CPe(e,t){t===void 0&&(t=Fi(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?r.test(o):!1})}function fk(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(ck(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Rp(i)||o7(i)||r.includes(i))return r;const o=Fi(e).getComputedStyle(i);return i!==e&&CPe(i,o)&&r.push(i),kPe(i,o)?r:n(i.parentNode)}return e?n(e):r}function c7(e){const[t]=fk(e,1);return t??null}function Uy(e){return!r_||!e?null:Gd(e)?e:uk(e)?ck(e)||e===Kd(e).scrollingElement?window:Rp(e)?e:null:null}function d7(e){return Gd(e)?e.scrollX:e.scrollLeft}function f7(e){return Gd(e)?e.scrollY:e.scrollTop}function Jx(e){return{x:d7(e),y:f7(e)}}var vn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(vn||(vn={}));function h7(e){return!r_||!e?!1:e===document.scrollingElement}function p7(e){const t={x:0,y:0},r=h7(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const RPe={x:.2,y:.2};function APe(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=RPe);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=p7(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(p.y=vn.Backward,m.y=n*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=vn.Forward,m.y=n*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=vn.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=vn.Backward,m.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function TPe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function m7(e){return e.reduce((t,r)=>Kc(t,Jx(r)),Qo)}function $Pe(e){return e.reduce((t,r)=>t+d7(r),0)}function NPe(e){return e.reduce((t,r)=>t+f7(r),0)}function DPe(e,t){if(t===void 0&&(t=Tp),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);c7(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const FPe=[["x",["left","right"],$Pe],["y",["top","bottom"],NPe]];class hk{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=fk(r),i=m7(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of FPe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(n),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Qf{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function IPe(e){const{EventTarget:t}=Fi(e);return e instanceof t?e:Kd(e)}function By(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var oo;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(oo||(oo={}));function LD(e){e.preventDefault()}function PPe(e){e.stopPropagation()}var cr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(cr||(cr={}));const g7={start:[cr.Space,cr.Enter],cancel:[cr.Esc],end:[cr.Space,cr.Enter,cr.Tab]},OPe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case cr.Right:return{...r,x:r.x+25};case cr.Left:return{...r,x:r.x-25};case cr.Down:return{...r,y:r.y+25};case cr.Up:return{...r,y:r.y-25}}};class pk{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Qf(Kd(r)),this.windowListeners=new Qf(Fi(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(oo.Resize,this.handleCancel),this.windowListeners.add(oo.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(oo.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&DPe(n),r(Qo)}handleKeyDown(t){if(s7(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=g7,coordinateGetter:a=OPe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:Qo;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=bg(f,d),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const v=t.code,{isTop:_,isRight:x,isLeft:S,isBottom:E,maxScroll:k,minScroll:R}=p7(g),T=TPe(g),A={x:Math.min(v===cr.Right?T.right-T.width/2:T.right,Math.max(v===cr.Right?T.left:T.left+T.width/2,f.x)),y:Math.min(v===cr.Down?T.bottom-T.height/2:T.bottom,Math.max(v===cr.Down?T.top:T.top+T.height/2,f.y))},N=v===cr.Right&&!x||v===cr.Left&&!S,P=v===cr.Down&&!E||v===cr.Up&&!_;if(N&&A.x!==f.x){const O=g.scrollLeft+h.x,D=v===cr.Right&&O<=k.x||v===cr.Left&&O>=R.x;if(D&&!h.y){g.scrollTo({left:O,behavior:s});return}D?p.x=g.scrollLeft-O:p.x=v===cr.Right?g.scrollLeft-k.x:g.scrollLeft-R.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(P&&A.y!==f.y){const O=g.scrollTop+h.y,D=v===cr.Down&&O<=k.y||v===cr.Up&&O>=R.y;if(D&&!h.x){g.scrollTo({top:O,behavior:s});return}D?p.y=g.scrollTop-O:p.y=v===cr.Down?g.scrollTop-k.y:g.scrollTop-R.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Kc(bg(f,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}pk.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=g7,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function zD(e){return!!(e&&"distance"in e)}function UD(e){return!!(e&&"delay"in e)}class mk{constructor(t,r,n){var i;n===void 0&&(n=IPe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=Kd(a),this.documentListeners=new Qf(this.document),this.listeners=new Qf(n),this.windowListeners=new Qf(Fi(a)),this.initialCoordinates=(i=Wx(o))!=null?i:Qo,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(oo.Resize,this.handleCancel),this.windowListeners.add(oo.DragStart,LD),this.windowListeners.add(oo.VisibilityChange,this.handleCancel),this.windowListeners.add(oo.ContextMenu,LD),this.documentListeners.add(oo.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(UD(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(zD(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(oo.Click,PPe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(oo.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(r=Wx(t))!=null?r:Qo,u=bg(i,l);if(!n&&s){if(zD(s)){if(s.tolerance!=null&&By(u,s.tolerance))return this.handleCancel();if(By(u,s.distance))return this.handleStart()}if(UD(s)&&By(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===cr.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const MPe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class gk extends mk{constructor(t){const{event:r}=t,n=Kd(r.target);super(t,MPe,n)}}gk.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];const LPe={move:{name:"mousemove"},end:{name:"mouseup"}};var Qx;(function(e){e[e.RightClick=2]="RightClick"})(Qx||(Qx={}));class zPe extends mk{constructor(t){super(t,LPe,Kd(t.event.target))}}zPe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===Qx.RightClick?!1:(n?.({event:r}),!0)}}];const jy={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class UPe extends mk{constructor(t){super(t,jy)}static setup(){return window.addEventListener(jy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(jy.move.name,t)};function t(){}}}UPe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n?.({event:r}),!0)}}];var Yf;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Yf||(Yf={}));var xg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(xg||(xg={}));function BPe(e){let{acceleration:t,activator:r=Yf.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=xg.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=qPe({delta:f,disabled:!o}),[m,g]=ePe(),v=Fe({x:0,y:0}),_=Fe({x:0,y:0}),x=Nt(()=>{switch(r){case Yf.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Yf.DraggableRect:return i}},[r,i,l]),S=Fe(null),E=tn(()=>{const R=S.current;if(!R)return;const T=v.current.x*_.current.x,A=v.current.y*_.current.y;R.scrollBy(T,A)},[]),k=Nt(()=>s===xg.TreeOrder?[...u].reverse():u,[s,u]);$e(()=>{if(!o||!u.length||!x){g();return}for(const R of k){if(n?.(R)===!1)continue;const T=u.indexOf(R),A=d[T];if(!A)continue;const{direction:N,speed:P}=APe(R,A,x,t,h);for(const O of["x","y"])p[O][N[O]]||(P[O]=0,N[O]=0);if(P.x>0||P.y>0){g(),S.current=R,m(E,a),v.current=P,_.current=N;return}}v.current={x:0,y:0},_.current={x:0,y:0},g()},[t,E,n,g,o,a,JSON.stringify(x),JSON.stringify(p),m,u,k,d,JSON.stringify(h)])}const jPe={x:{[vn.Backward]:!1,[vn.Forward]:!1},y:{[vn.Backward]:!1,[vn.Forward]:!1}};function qPe(e){let{delta:t,disabled:r}=e;const n=Hx(t);return Ap(i=>{if(r||!n||!i)return jPe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[vn.Backward]:i.x[vn.Backward]||o.x===-1,[vn.Forward]:i.x[vn.Forward]||o.x===1},y:{[vn.Backward]:i.y[vn.Backward]||o.y===-1,[vn.Forward]:i.y[vn.Forward]||o.y===1}}},[r,t,n])}function VPe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return Ap(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function GPe(e,t){return Nt(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var qh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qh||(qh={}));var Yx;(function(e){e.Optimized="optimized"})(Yx||(Yx={}));const BD=new Map;function KPe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=de(null),{frequency:s,measure:l,strategy:u}=i,d=Fe(e),f=v(),h=jh(f),p=tn(function(_){_===void 0&&(_=[]),!h.current&&a(x=>x===null?_:x.concat(_.filter(S=>!x.includes(S))))},[h]),m=Fe(null),g=Ap(_=>{if(f&&!r)return BD;if(!_||_===BD||d.current!==e||o!=null){const x=new Map;for(let S of e){if(!S)continue;if(o&&o.length>0&&!o.includes(S.id)&&S.rect.current){x.set(S.id,S.rect.current);continue}const E=S.node.current,k=E?new hk(l(E),E):null;S.rect.current=k,k&&x.set(S.id,k)}return x}return _},[e,o,r,f,l]);return $e(()=>{d.current=e},[e]),$e(()=>{f||p()},[r,f]),$e(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),$e(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...n]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(u){case qh.Always:return!1;case qh.BeforeDragging:return r;default:return!r}}}function v7(e,t){return Ap(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function HPe(e,t){return v7(e,t)}function WPe(e){let{callback:t,disabled:r}=e;const n=dk(t),i=Nt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return $e(()=>()=>i?.disconnect(),[i]),i}function i_(e){let{callback:t,disabled:r}=e;const n=dk(t),i=Nt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return $e(()=>()=>i?.disconnect(),[i]),i}function JPe(e){return new hk(Tp(e),e)}function jD(e,t,r){t===void 0&&(t=JPe);const[n,i]=de(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??r)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=WPe({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=i_({callback:o});return kl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),n}function QPe(e){const t=v7(e);return u7(e,t)}const qD=[];function YPe(e){const t=Fe(e),r=Ap(n=>e?n&&n!==qD&&e&&t.current&&e.parentNode===t.current.parentNode?n:fk(e):qD,[e]);return $e(()=>{t.current=e},[e]),r}function XPe(e){const[t,r]=de(null),n=Fe(e),i=tn(o=>{const a=Uy(o.target);a&&r(s=>s?(s.set(a,Jx(a)),new Map(s)):null)},[]);return $e(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(l=>{const u=Uy(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Jx(u)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=Uy(l);u?.removeEventListener("scroll",i)})}},[i,e]),Nt(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Kc(o,a),Qo):m7(e):Qo,[e,t])}function VD(e,t){t===void 0&&(t=[]);const r=Fe(null);return $e(()=>{r.current=null},t),$e(()=>{const n=e!==Qo;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?bg(e,r.current):Qo}function ZPe(e){$e(()=>{if(!r_)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function eOe(e,t){return Nt(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function _7(e){return Nt(()=>e?EPe(e):null,[e])}const GD=[];function tOe(e,t){t===void 0&&(t=Tp);const[r]=e,n=_7(r?Fi(r):null),[i,o]=de(GD);function a(){o(()=>e.length?e.map(l=>h7(l)?n:new hk(t(l),l)):GD)}const s=i_({callback:a});return kl(()=>{s?.disconnect(),a(),e.forEach(l=>s?.observe(l))},[e]),i}function rOe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Rp(t)?t:e}function nOe(e){let{measure:t}=e;const[r,n]=de(null),i=tn(u=>{for(const{target:d}of u)if(Rp(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=i_({callback:i}),a=tn(u=>{const d=rOe(u);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[s,l]=_g(a);return Nt(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const iOe=[{sensor:gk,options:{}},{sensor:pk,options:{}}],oOe={current:{}},h0={draggable:{measure:MD},droppable:{measure:MD,strategy:qh.WhileDragging,frequency:Yx.Optimized},dragOverlay:{measure:Tp}};class Xf extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const aOe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Xf,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:yg},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:h0,measureDroppableContainers:yg,windowRect:null,measuringScheduled:!1},sOe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:yg,draggableNodes:new Map,over:null,measureDroppableContainers:yg},o_=ar(sOe),lOe=ar(aOe);function uOe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xf}}}function cOe(e,t){switch(t.type){case ln.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ln.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ln.DragEnd:case ln.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ln.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Xf(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case ln.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Xf(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case ln.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Xf(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function dOe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=At(o_),o=Hx(n),a=Hx(r?.id);return $e(()=>{if(!t&&!n&&o&&a!=null){if(!s7(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=nPe(d);if(f){f.focus();break}}})}},[n,t,i,a,o]),null}function fOe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function hOe(e){return Nt(()=>({draggable:{...h0.draggable,...e?.draggable},droppable:{...h0.droppable,...e?.droppable},dragOverlay:{...h0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function pOe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=Fe(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;kl(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const d=r(u),f=u7(d,n);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=c7(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,n,r])}const b7=ar({...Qo,scaleX:1,scaleY:1});var Vs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Vs||(Vs={}));const y7=xB(function(t){var r,n,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:d=iOe,collisionDetection:f=vPe,measuring:h,modifiers:p,...m}=t;const g=SB(cOe,void 0,uOe),[v,_]=g,[x,S]=uPe(),[E,k]=de(Vs.Uninitialized),R=E===Vs.Initialized,{draggable:{active:T,nodes:A,translate:N},droppable:{containers:P}}=v,O=T!=null?A.get(T):null,D=Fe({initial:null,translated:null}),U=Nt(()=>{var Zt;return T!=null?{id:T,data:(Zt=O?.data)!=null?Zt:oOe,rect:D}:null},[T,O]),B=Fe(null),[q,Q]=de(null),[J,te]=de(null),ae=jh(m,Object.values(m)),Z=n_("DndDescribedBy",a),W=Nt(()=>P.getEnabled(),[P]),le=hOe(h),{droppableRects:oe,measureDroppableContainers:Se,measuringScheduled:be}=KPe(W,{dragging:R,dependencies:[N.x,N.y],config:le.droppable}),ue=VPe(A,T),xe=Nt(()=>J?Wx(J):null,[J]),ot=eo(),rr=HPe(ue,le.draggable.measure);pOe({activeNode:T!=null?A.get(T):null,config:ot.layoutShiftCompensation,initialRect:rr,measure:le.draggable.measure});const It=jD(ue,le.draggable.measure,rr),mi=jD(ue?ue.parentElement:null),Gn=Fe({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),sa=P.getNodeFor((r=Gn.current.over)==null?void 0:r.id),Yt=nOe({measure:le.dragOverlay.measure}),Nn=(n=Yt.nodeRef.current)!=null?n:ue,dn=R?(i=Yt.rect)!=null?i:It:null,Ze=!!(Yt.nodeRef.current&&Yt.rect),pe=QPe(Ze?null:It),Ie=_7(Nn?Fi(Nn):null),ze=YPe(R?sa??ue:null),Qe=tOe(ze),Sr=fOe(p,{transform:{x:N.x-pe.x,y:N.y-pe.y,scaleX:1,scaleY:1},activatorEvent:J,active:U,activeNodeRect:It,containerNodeRect:mi,draggingNodeRect:dn,over:Gn.current.over,overlayNodeRect:Yt.rect,scrollableAncestors:ze,scrollableAncestorRects:Qe,windowRect:Ie}),K=xe?Kc(xe,N):null,ye=XPe(ze),He=VD(ye),Ee=VD(ye,[It]),we=Kc(Sr,He),lt=dn?yPe(dn,Sr):null,ft=U&&lt?f({active:U,collisionRect:lt,droppableRects:oe,droppableContainers:W,pointerCoordinates:K}):null,bt=mPe(ft,"id"),[wt,Xt]=de(null),Kt=Ze?Sr:Kc(Sr,Ee),Et=_Pe(Kt,(o=wt?.rect)!=null?o:null,It),mt=Fe(null),Tr=tn((Zt,at)=>{let{sensor:Pt,options:Br}=at;if(B.current==null)return;const jr=A.get(B.current);if(!jr)return;const Fr=Zt.nativeEvent,an=new Pt({active:B.current,activeNode:jr,event:Fr,options:Br,context:Gn,onAbort(pr){if(!A.get(pr))return;const{onDragAbort:Kn}=ae.current,Dn={id:pr};Kn?.(Dn),x({type:"onDragAbort",event:Dn})},onPending(pr,to,Kn,Dn){if(!A.get(pr))return;const{onDragPending:sn}=ae.current,ut={id:pr,constraint:to,initialCoordinates:Kn,offset:Dn};sn?.(ut),x({type:"onDragPending",event:ut})},onStart(pr){const to=B.current;if(to==null)return;const Kn=A.get(to);if(!Kn)return;const{onDragStart:Dn}=ae.current,sr={activatorEvent:Fr,active:{id:to,data:Kn.data,rect:D}};Op(()=>{Dn?.(sr),k(Vs.Initializing),_({type:ln.DragStart,initialCoordinates:pr,active:to}),x({type:"onDragStart",event:sr}),Q(mt.current),te(Fr)})},onMove(pr){_({type:ln.DragMove,coordinates:pr})},onEnd:Ir(ln.DragEnd),onCancel:Ir(ln.DragCancel)});mt.current=an;function Ir(pr){return async function(){const{active:Kn,collisions:Dn,over:sr,scrollAdjustedTranslate:sn}=Gn.current;let ut=null;if(Kn&&sn){const{cancelDrop:Fn}=ae.current;ut={activatorEvent:Fr,active:Kn,collisions:Dn,delta:sn,over:sr},pr===ln.DragEnd&&typeof Fn=="function"&&await Promise.resolve(Fn(ut))&&(pr=ln.DragCancel)}B.current=null,Op(()=>{_({type:pr}),k(Vs.Uninitialized),Xt(null),Q(null),te(null),mt.current=null;const Fn=pr===ln.DragEnd?"onDragEnd":"onDragCancel";if(ut){const gi=ae.current[Fn];gi?.(ut),x({type:Fn,event:ut})}})}}},[A]),la=tn((Zt,at)=>(Pt,Br)=>{const jr=Pt.nativeEvent,Fr=A.get(Br);if(B.current!==null||!Fr||jr.dndKit||jr.defaultPrevented)return;const an={active:Fr};Zt(Pt,at.options,an)===!0&&(jr.dndKit={capturedBy:at.sensor},B.current=Br,Tr(Pt,at))},[A,Tr]),ti=GPe(d,la);ZPe(d),kl(()=>{It&&E===Vs.Initializing&&k(Vs.Initialized)},[It,E]),$e(()=>{const{onDragMove:Zt}=ae.current,{active:at,activatorEvent:Pt,collisions:Br,over:jr}=Gn.current;if(!at||!Pt)return;const Fr={active:at,activatorEvent:Pt,collisions:Br,delta:{x:we.x,y:we.y},over:jr};Op(()=>{Zt?.(Fr),x({type:"onDragMove",event:Fr})})},[we.x,we.y]),$e(()=>{const{active:Zt,activatorEvent:at,collisions:Pt,droppableContainers:Br,scrollAdjustedTranslate:jr}=Gn.current;if(!Zt||B.current==null||!at||!jr)return;const{onDragOver:Fr}=ae.current,an=Br.get(bt),Ir=an&&an.rect.current?{id:an.id,rect:an.rect.current,data:an.data,disabled:an.disabled}:null,pr={active:Zt,activatorEvent:at,collisions:Pt,delta:{x:jr.x,y:jr.y},over:Ir};Op(()=>{Xt(Ir),Fr?.(pr),x({type:"onDragOver",event:pr})})},[bt]),kl(()=>{Gn.current={activatorEvent:J,active:U,activeNode:ue,collisionRect:lt,collisions:ft,droppableRects:oe,draggableNodes:A,draggingNode:Nn,draggingNodeRect:dn,droppableContainers:P,over:wt,scrollableAncestors:ze,scrollAdjustedTranslate:we},D.current={initial:dn,translated:lt}},[U,ue,ft,lt,A,Nn,dn,oe,P,wt,ze,we]),BPe({...ot,delta:N,draggingRect:lt,pointerCoordinates:K,scrollableAncestors:ze,scrollableAncestorRects:Qe});const fn=Nt(()=>({active:U,activeNode:ue,activeNodeRect:It,activatorEvent:J,collisions:ft,containerNodeRect:mi,dragOverlay:Yt,draggableNodes:A,droppableContainers:P,droppableRects:oe,over:wt,measureDroppableContainers:Se,scrollableAncestors:ze,scrollableAncestorRects:Qe,measuringConfiguration:le,measuringScheduled:be,windowRect:Ie}),[U,ue,It,J,ft,mi,Yt,A,P,oe,wt,Se,ze,Qe,le,be,Ie]),ri=Nt(()=>({activatorEvent:J,activators:ti,active:U,activeNodeRect:It,ariaDescribedById:{draggable:Z},dispatch:_,draggableNodes:A,over:wt,measureDroppableContainers:Se}),[J,ti,U,It,_,Z,A,wt,Se]);return ao.createElement(l7.Provider,{value:S},ao.createElement(o_.Provider,{value:ri},ao.createElement(lOe.Provider,{value:fn},ao.createElement(b7.Provider,{value:Et},u)),ao.createElement(dOe,{disabled:s?.restoreFocus===!1})),ao.createElement(fPe,{...s,hiddenTextDescribedById:Z}));function eo(){const Zt=q?.autoScrollEnabled===!1,at=typeof l=="object"?l.enabled===!1:l===!1,Pt=R&&!Zt&&!at;return typeof l=="object"?{...l,enabled:Pt}:{enabled:Pt}}}),mOe=ar(null),KD="button",gOe="Draggable";function x7(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=n_(gOe),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=At(o_),{role:p=KD,roleDescription:m="draggable",tabIndex:g=0}=i??{},v=l?.id===t,_=At(v?b7:mOe),[x,S]=_g(),[E,k]=_g(),R=eOe(a,t),T=jh(r);kl(()=>(f.set(t,{id:t,key:o,node:x,activatorNode:E,data:T}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const A=Nt(()=>({role:p,tabIndex:g,"aria-disabled":n,"aria-pressed":v&&p===KD?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[n,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:A,isDragging:v,listeners:n?void 0:R,node:x,over:h,setNodeRef:S,setActivatorNodeRef:k,transform:_}}const vOe="Droppable",_Oe={timeout:25};function S7(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=n_(vOe),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=At(o_),d=Fe({disabled:r}),f=Fe(!1),h=Fe(null),p=Fe(null),{disabled:m,updateMeasurementsFor:g,timeout:v}={..._Oe,...i},_=jh(g??n),x=tn(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(_.current)?_.current:[_.current]),p.current=null},v)},[v]),S=i_({callback:x,disabled:m||!a}),E=tn((A,N)=>{S&&(N&&(S.unobserve(N),f.current=!1),A&&S.observe(A))},[S]),[k,R]=_g(E),T=jh(t);return $e(()=>{!S||!k.current||(S.disconnect(),f.current=!1,S.observe(k.current))},[k,S]),$e(()=>(s({type:ln.RegisterDroppable,element:{id:n,key:o,disabled:r,node:k,rect:h,data:T}}),()=>s({type:ln.UnregisterDroppable,key:o,id:n})),[n]),$e(()=>{r!==d.current.disabled&&(s({type:ln.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:h,isOver:l?.id===n,node:k,over:l,setNodeRef:R}}function w7(e,t){re(Wi(e.onPointerDown),r=>r(t))}function E7(e,t){re(Wi(e.onKeyDown),r=>r(t))}function k7(e){return G(e==null?void 0:Gt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}function Mr(e){return"var("+e+")"}let bOe=w([z("flex"),X("stretch"),c("gap",Mr(I.md)),c("overflow-x","auto"),c("padding-bottom",Mr(I.sm))]),qy=w([z("flex"),ve("column"),c("gap",Mr(I.sm)),c("flex","0 0 240px"),c("padding",Mr(I.sm)),c("background",Mr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Mr(Y.md)),c("min-height","120px")]),yOe=w([c("border-color",Mr(y.brand))]),xOe=w([is(.45)]),SOe=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Mr(I.sm)),c("font-size",Mr($.sizeSm)),c("font-weight",Mr($.weightMedium)),c("color",Mr(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),HD=w([z("flex"),ve("column"),X("stretch"),c("gap","4px"),c("padding",Mr(I.sm)),c("background",Mr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Mr(Y.sm)),c("text-align","left"),Ce("pointer"),je([c("border-color",Mr(y.brand))])]),wOe=w([Ce("grab")]),EOe=w([is(.85),c("z-index","10"),Ce("grabbing")]),kOe=w([c("font-size",Mr($.sizeSm)),c("font-weight",Mr($.weightMedium)),c("color",Mr(y.textPrimary))]),COe=w([c("font-size",Mr($.sizeXs)),c("color",Mr(y.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),ROe=w([c("color",Mr(y.textDisabled)),c("font-size",Mr($.sizeSm))]);function AOe(e){let t=e.onClick,r=e.draggable,n=e.card,i=x7({id:n.key,disabled:!r}),o=r?HD+" "+wOe:HD,a=i.isDragging?o+" "+EOe:o,s=k7(i.transform),l=s!==void 0?{transform:s}:void 0,u=i.listeners,d=u==null?void 0:Gt(u),f=n.meta;return L("div",{children:[b("span",{children:n.title,className:kOe}),f!==void 0?b("span",{children:f,className:COe,title:f}):null],ref:Gt(i.setNodeRef),className:a,role:"button",style:l,tabIndex:0,onKeyDown:h=>re(d,p=>E7(p,h)),onClick:h=>re(t,p=>p(n.key)),onPointerDown:h=>re(d,p=>w7(p,h))})}function TOe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,a=S7({id:i.value,disabled:!o}),s=a.isOver,l=o?s?qy+" "+yOe:qy:qy+" "+xOe;return L("div",{children:[L("div",{children:[b("span",{children:i.label}),b(If,{count:i.cards.length,label:""})],className:SOe}),i.cards.length===0?b("span",{children:"—",className:ROe}):i.cards.map(u=>b(AOe,{card:u,draggable:n,onClick:r},u.key))],ref:Gt(a.setNodeRef),className:l})}function $Oe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=De(r),a=hPe(OD(gk,{activationConstraint:{distance:5}}),OD(pk,{})),s=de(()=>{}),l=s[1],u=s[0],d=h=>t!==void 0&&u!==void 0?t(u,h.value):!0,f=h=>{l(v=>{});let p=h.over;if(r===void 0||p==null)return;let m=i.find(v=>v.cards.some(_=>_.key===h.active.id));if(fe(t,!0,v=>v(h.active.id,p.id))&&fe(m,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return b(y7,{sensors:Gt(a),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:b("div",{children:i.map(h=>b(TOe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:bOe})})}let NOe=$Oe;function pt(e){return"var("+e+")"}let DOe=w([z("flex"),ve("column"),c("gap",pt(I.sm))]),FOe=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",pt(I.sm))]),WD=w([z("inlineFlex"),X("center"),c("gap",pt(I.xs))]),Tf=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",pt(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",pt(y.textSecondary)),c("font-size",pt($.sizeSm)),Ce("pointer"),je([c("background",pt(y.surfaceSubtle)),c("color",pt(y.textPrimary))])]),IOe=zr([Tf,w([c("background",pt(y.surfaceSubtle)),c("color",pt(y.textPrimary)),c("font-weight",pt($.weightMedium))])]),POe=w([c("font-size",pt($.sizeMd)),c("font-weight",pt($.weightMedium)),c("color",pt(y.textPrimary))]),OOe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px")]),MOe=w([c("font-size",pt($.sizeXs)),c("color",pt(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("padding","2px var("+I.xs+")")]),LOe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px"),c("background",pt(y.borderSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",pt(Y.md)),c("overflow","hidden")]),C7=w([z("flex"),ve("column"),c("gap","2px"),c("min-height","96px"),c("padding","4px"),c("background",pt(y.surface))]),zOe=zr([C7,w([c("opacity","0.55")])]),R7=w([c("font-size",pt($.sizeXs)),c("color",pt(y.textSecondary))]),UOe=zr([R7,w([c("color",pt(y.brand)),c("font-weight",pt($.weightMedium))])]);function BOe(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",pt(Y.sm)),c("background",pt(y.surfaceSubtle)),c("color",pt(y.textPrimary)),c("font-size",pt($.sizeXs)),c("padding","1px var("+I.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Ce("pointer"),je([c("background",pt(y.surfaceElevated))])])}let jOe=w([c("background","none"),c("border","none"),c("padding","0"),c("text-align","left"),c("font-size",pt($.sizeXs)),c("color",pt(y.brand)),Ce("pointer"),je([c("text-decoration","underline")])]);function qOe(e){return w([z("grid"),c("grid-template-columns","repeat("+e.toString()+", 1fr)"),c("gap","1px"),c("background",pt(y.borderSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",pt(Y.md)),c("overflow","hidden")])}let VOe=w([z("flex"),ve("column"),c("gap","2px"),c("min-height","200px"),c("padding","4px"),c("background",pt(y.surface))]),GOe=w([c("font-size",pt($.sizeXs)),c("color",pt(y.textSecondary)),c("padding-bottom","2px"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),KOe=w([z("flex"),ei("wrap"),X("center"),c("gap",pt(I.md)),c("font-size",pt($.sizeXs)),c("color",pt(y.textSecondary))]);function HOe(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e),c("margin-right","4px")])}let WOe=w([c("font-size",pt($.sizeXs)),c("color",pt(y.textDisabled))]),JOe="var("+y.brand+")";function QOe(e){return F(e.end_,e.start)}function JD(e,t){return e.filter(r=>PP(r.start,QOe(r),t)).toSorted((r,n)=>r.start-n.start)}function YOe(e,t){return MP(e.start)||!IP(e.start,t)?e.title:OP(e.start)+" "+e.title}function XOe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],a=de(()=>"Month"),s=a[1],l=a[0],u=de(()=>li(F(t,Date.now()))),d=u[1],f=u[0],h=li(Date.now()),p=E=>d(k=>{switch(l){case"Month":return DP(k,E);case"Week":return mo(k,E*7|0);case"Day":return mo(k,E)}}),m=(E,k)=>b("button",{children:YOe(E,k),className:BOe(F(E.accent,JOe)),title:E.title,onClick:R=>E.onOpen()},E.key),g=()=>{let E=cJ(f);return L(Lr,{children:[b("div",{children:NS.map(k=>b("div",{children:k,className:MOe},k)),className:OOe}),b("div",{children:E.map(k=>{let R=JD(i,k),T=R.slice(0,3),A=R.length-T.length|0;return L("div",{children:[b("span",{children:zP(k).toString(),className:k===h?UOe:R7}),T.map(N=>m(N,k)),A>0?b("button",{children:"+"+A.toString()+" more",className:jOe,onClick:N=>{d(P=>k),s(P=>"Day")}}):null],className:dJ(k,f)?C7:zOe},k.toString())}),className:LOe})]})},v=E=>b("div",{children:E.map(k=>L("div",{children:[b("div",{children:ms(k),className:GOe}),JD(i,k).map(R=>m(R,k))],className:VOe},k.toString())),className:qOe(E.length)}),_;switch(l){case"Month":_=g();break;case"Week":_=v(fl(7,E=>mo(Kg(f),E)));break;case"Day":_=v([li(f)]);break}let x;switch(l){case"Month":case"Week":x=lo(f);break;case"Day":x=ms(f)+" — "+lo(f);break}let S=(E,k)=>b("button",{children:k,className:l===E?IOe:Tf,onClick:R=>s(T=>E)});return L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:Tf,onClick:E=>p(-1)}),b("button",{children:"Today",className:Tf,onClick:E=>d(k=>h)}),b("button",{children:"›",className:Tf,onClick:E=>p(1)}),b("span",{children:x,className:POe})],className:WD}),L("div",{children:[S("Month","Month"),S("Week","Week"),S("Day","Day")],className:WD})],className:FOe}),o.length!==0?b("div",{children:o.map(E=>L("span",{children:[b("span",{className:HOe(E.accent)}),E.label]},E.label)),className:KOe}):null,_,r!==void 0?b("span",{children:r,className:WOe}):null],className:DOe})}let ZOe=XOe;function xr(e){return"var("+e+")"}let e6e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),c("gap",xr(I.md))]),t6e=w([z("flex"),ve("column"),X("stretch"),c("gap",xr(I.sm)),c("padding",xr(I.md)),c("background",xr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",xr(Y.md)),c("text-align","left"),je([c("border-color",xr(y.brand)),c("background",xr(y.surfaceSubtle))])]),r6e=w([z("flex"),ve("column"),X("stretch"),c("gap",xr(I.sm)),c("background","none"),c("border","none"),c("padding","0"),c("font","inherit"),c("color","inherit"),c("text-align","left"),Ce("pointer")]),n6e=w([z("flex"),ei("wrap"),c("gap","4px")]),i6e=w([c("background",xr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",xr(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",xr(y.textPrimary)),c("font-size",xr($.sizeSm)),Ce("pointer"),je([c("border-color",xr(y.brand)),c("color",xr(y.brand))])]),o6e=w([c("width","100%"),c("height","96px"),c("object-fit","cover"),c("border-radius",xr(Y.sm))]),a6e=w([c("width","100%"),c("height","96px")]),s6e=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",xr(I.sm))]),l6e=w([c("font-size",xr($.sizeMd)),c("font-weight",xr($.weightMedium)),c("color",xr(y.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),u6e=w([z("flex"),X("baseline"),c("gap",xr(I.sm)),c("font-size",xr($.sizeSm))]),c6e=w([c("color",xr(y.textSecondary)),c("white-space","nowrap"),$n(0)]),d6e=w([c("color",xr(y.textPrimary)),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis")]),f6e=w([c("color",xr(y.textDisabled)),c("font-size",xr($.sizeSm))]);function h6e(e){let t=e.cards;if(t.length===0)return b("span",{children:"(empty)",className:f6e});let r=e.onCardClick;return b("div",{children:t.map(n=>{let i=n.media,o;o=i!==void 0?typeof i!="object"?b("span",{children:b(Kx,{size:"Fill"}),className:a6e}):b("img",{className:o6e,alt:n.title,src:i._0}):null;let a=n.actions;return L("div",{children:[L("button",{children:[o,L("div",{children:[b("span",{children:n.title,className:l6e,title:n.title}),F(n.badge,null)],className:s6e}),n.fields.map(s=>L("div",{children:[b("span",{children:s.label,className:c6e}),b("span",{children:s.value,className:d6e})],className:u6e},s.label))],className:r6e,onClick:s=>re(r,l=>l(n.key))}),a!==void 0&&a.length!==0?b("div",{children:a.map(s=>b("button",{children:s.label,className:i6e,onClick:l=>s.onClick()},s.label)),className:n6e}):null],className:t6e},n.key)}),className:e6e})}let p6e=h6e;function m6e(e,t){let r=e.indexOf(t);return e.map((n,i)=>{let o=r<0?"Upcoming":i<r?"Done":i===r?"Current":"Upcoming";return[n,o]})}function g6e(e,t,r){return m6e(Zo(e,t),r).map(n=>{let i=n[0];return{key:i,label:vt(i),state:n[1]}})}function ko(e){return"var("+e+")"}let v6e=w([z("flex"),X("flexStart"),c("gap","0"),c("width","100%")]),_6e=w([z("flex"),ve("column"),X("center"),c("gap","4px"),c("flex","0 0 auto")]);function b6e(e){return w([c("flex","1 1 auto"),c("height","2px"),c("margin","0 6px"),c("margin-top","11px"),c("min-width","16px"),c("background",ko(e?y.brand:y.borderSubtle))])}let vk=[z("inlineFlex"),X("center"),Xe("center"),c("width","24px"),c("height","24px"),c("border-radius","50%"),c("font-size",ko($.sizeXs)),c("font-weight",ko($.weightMedium)),c("box-sizing","border-box")],y6e=w(vk.concat([c("background",ko(y.brand)),c("color","#fff")])),x6e=w(vk.concat([c("background",ko(y.surface)),c("color",ko(y.brand)),c("border","2px solid var("+y.brand+")")])),S6e=w(vk.concat([c("background",ko(y.surface)),c("color",ko(y.textDisabled)),c("border","1px solid var("+y.border+")")])),A7=[c("font-size",ko($.sizeXs)),c("text-align","center"),c("max-width","96px")],w6e=w(A7.concat([c("color",ko(y.textPrimary))])),E6e=w(A7.concat([c("color",ko(y.textDisabled))])),k6e=w([c("display","none")]);function C6e(e){switch(e){case"Done":return y6e;case"Current":return x6e;case"Upcoming":return S6e}}function R6e(e){switch(e){case"Done":case"Current":return w6e;case"Upcoming":return E6e}}function A6e(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function T6e(e){let t=e.compact,r=t!==void 0?t:!1;return b("div",{children:e.steps.map((n,i)=>{let o=i===0?null:b("div",{className:b6e(n.state==="Done"||n.state==="Current")},n.key+":c"),a=r?k6e:R6e(n.state);return L(cS,{children:[o,L("div",{children:[b("span",{children:A6e(n.state,i),className:C6e(n.state)}),b("span",{children:n.label,className:a})],className:_6e,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:v6e,role:"list"})}let T7=T6e;function $7(e){switch(e.toLowerCase().replaceAll("_","").replaceAll("-","")){case"accepted":case"approve":case"approved":case"confirmed":case"granted":case"signed":return"Approved";case"awaiting":case"escalated":case"inreview":case"pending":case"submitted":case"underreview":return"Pending";case"na":case"notrequired":case"skipped":case"waived":return"Skipped";case"declined":case"denied":case"refused":case"reject":case"rejected":case"withdrawn":return"Rejected";default:return{TAG:"Other",_0:e}}}function $6e(e){if(typeof e=="object")return vt(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function N6e(e){if(typeof e=="object")return"Neutral";switch(e){case"Approved":return"Success";case"Rejected":return"Error";case"Pending":return"Info";case"Skipped":return"Neutral"}}function D6e(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function F6e(e){if(typeof e=="object")return"var("+y.border+")";switch(e){case"Approved":return"var("+y.success+")";case"Rejected":return"var("+y.error+")";case"Pending":return"var("+y.info+")";case"Skipped":return"var("+y.border+")"}}function Rn(e){return"var("+e+")"}let I6e=w([z("flex"),ve("column"),c("gap",Rn(I.md)),c("font-family",Rn($.fontFamily))]),P6e=w([z("flex"),ve("column")]),O6e=w([z("flex"),X("stretch"),c("gap",Rn(I.sm))]),M6e=w([z("flex"),ve("column"),X("center"),c("flex","0 0 22px")]);function L6e(e){return w([z("inlineFlex"),X("center"),Xe("center"),c("width","20px"),c("height","20px"),c("border-radius","50%"),c("box-sizing","border-box"),c("border","2px solid "+e),c("color",e),c("background",Rn(y.surface)),c("font-size","11px"),c("line-height","1"),c("flex","0 0 auto")])}let z6e=w([c("flex","1 1 auto"),c("width","1px"),c("min-height","12px"),c("background",Rn(y.borderSubtle))]),QD=w([z("flex"),ve("column"),c("gap","2px"),c("flex","1 1 auto"),c("min-width","0"),c("padding-bottom",Rn(I.sm))]),U6e=w([Ce("pointer"),je([c("background",Rn(y.surfaceSubtle))]),c("border-radius",Rn(Y.sm)),c("padding-left","4px"),c("margin-left","-4px")]),B6e=w([z("flex"),X("center"),ei("wrap"),c("gap",Rn(I.xs))]),j6e=w([c("font-size",Rn($.sizeSm)),c("font-weight",Rn($.weightMedium)),c("color",Rn(y.textPrimary))]),q6e=w([z("flex"),X("center"),c("gap","6px"),c("font-size",Rn($.sizeXs)),c("color",Rn(y.textSecondary))]),V6e=w([c("font-size",Rn($.sizeSm)),c("color",Rn(y.textSecondary)),c("white-space","pre-wrap")]),G6e=w([c("font-size",Rn($.sizeXs)),c("color",Rn(y.textDisabled))]);function K6e(e){let t=e.entries;if(t.length===0)return b(_d,{title:"No approvals",description:"Nothing in this window carries a decision."});let r=e.windowNote,n=e.nowMs,i=e.steps,o=t.length-1|0;return L("div",{children:[i!==void 0&&i.length>1?b(T7,{steps:i}):null,b("div",{children:t.map((a,s)=>{let l=De(a.onOpen),u=a.actor,d=a.at,f,h=0;u!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[u!==void 0?L(Lr,{children:[b(bd,{name:u,src:a.actorImageUrl,size:"Small"}),b("span",{children:u})]}):null,d!==void 0?b("span",{children:kv(F(n,Date.now()),d),title:F(ih(d),d)}):null],className:q6e}));let p=a.note;return L("div",{children:[L("div",{children:[b("span",{children:D6e(a.decision),className:L6e(F6e(a.decision))}),s===o?null:b("div",{className:z6e})],className:M6e}),L("div",{children:[L("div",{children:[b("span",{children:a.step,className:j6e}),b(ds,{variant:N6e(a.decision),label:$6e(a.decision)})],className:B6e}),f,p!==void 0&&p!==""?b("div",{children:p,className:V6e}):null],className:l?QD+" "+U6e:QD,onClick:m=>re(a.onOpen,g=>g())})],className:O6e},a.key)}),className:P6e}),r!==void 0?b("span",{children:r,className:G6e}):null],className:I6e})}let H6e=K6e;function Go(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let W6e=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],J6e=["decision","outcome","verdict","approval","approvalstatus","result"],Q6e=["step","stage","level","tier","approvalstep","approvallevel","phase"],Y6e=["note","notes","comment","comments","reason","remarks","justification","rationale"];function X6e(e){let t=Fu(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function Z6e(e){return e.filter(t=>W6e.includes(Go(t))).length>=2}function N7(e){return ee(Dr(e),t=>{let r=t[1],n=t[0];if(Yh(r))return G(X6e(r),i=>[n,i])})}function eMe(e){let t=N7(e),r=t.find(n=>J6e.includes(Go(n[0])));return r!==void 0?r:t.find(n=>Z6e(n[1]))}function tMe(e,t){let r=Dr(e).map(n=>n[0]).find(n=>fe(M(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:Dr(e).map(n=>n[0]).find(n=>fe(ld(n),!1,mP))}function D7(e,t){let r=F(t,jn(e,void 0,void 0)),n=eMe(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],a=N7(e).find(s=>{let l=s[0];return l!==o?Q6e.includes(Go(l)):!1});return{decisionField:o,dateSpan:i,stepField:G(a,s=>s[0]),stepValues:fe(a,[],s=>s[1]),actorField:tMe(e,r),noteField:ee(Dr(e),s=>{let l=s[0];if(Yh(s[1])&&Y6e.includes(Go(l)))return l})[0]}}function rMe(e){return De(D7(e,void 0))}function _k(e){return e.rows.map((t,r)=>{let n=F(H(t),{});return{key:F(C(M(n,"id"),ce),"#"+r.toString()),json:t,dict:n}})}function Wl(e,t){return C(M(e,t),ce)}function YD(e,t){return C(Iu(t,e),qn)}function XD(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>Go(n)===Go(t));return r!==-1?r:e.length}function nMe(e,t,r){let n=r!==void 0?r:f=>f,a=_k(e).map(f=>{let h=C(t.stepField,m=>Wl(f.dict,m)),p=Wl(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?a.sort((f,h)=>XD(t.stepValues,f[1])-XD(t.stepValues,h[1])|0):a.sort((f,h)=>{let p=YD(f[0].dict,t.dateSpan),m=YD(h[0].dict,t.dateSpan);return p!==void 0?m!==void 0?p-m:-1:m!==void 0?1:0});let l=a.map(f=>{let h=f[0];return{key:h.key,step:F(G(f[1],vt),F(C(e.semantics.labelField,p=>Wl(h.dict,p)),"Decision")),decision:fe(f[2],"Pending",$7),actor:G(C(t.actorField,p=>Wl(h.dict,p)),n),at:Iu(t.dateSpan,h.dict),note:C(t.noteField,p=>Wl(h.dict,p)),onOpen:()=>e.onOpenRow(h.key,h.json)}}),u=ee(a,f=>G(f[1],Go)),d=t.stepValues.filter(f=>!u.includes(Go(f))).map(f=>({key:"pending:"+f,step:vt(f),decision:"Pending"}));return l.concat(d)}function iMe(e,t){let r=t.stepField;if(r===void 0)return[];let n=_k(e),i=ee(n,a=>{let s=Wl(a.dict,r),l=Wl(a.dict,t.decisionField);if(s===void 0||l===void 0)return;let u=$7(l);if(!(typeof u!="object"&&u==="Pending"))return Go(s)}),o=t.stepValues.find(a=>!i.includes(Go(a)));return t.stepValues.map(a=>({key:a,label:vt(a),state:i.includes(Go(a))?"Done":Ne(o,a)?"Current":"Upcoming"}))}function Fs(e){return e.rows.map((t,r)=>{let n=F(H(t),{});return{key:F(C(M(n,"id"),ce),"#"+r.toString()),json:t,dict:n}})}function Tu(e,t){return C(M(e,t),ce)}function Zu(e,t){return F(C(e.semantics.labelField,r=>Tu(t.dict,r)),t.key)}function oMe(e,t){return G(e.semantics.imageField,r=>{let n=C(Tu(t.dict,r),i=>{if(i!=="")return i});return n!==void 0?{TAG:"Picture",_0:du(n)}:"EmptySlot"})}function F7(e,t,r){re(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function I7(e,t,r){return b("span",{children:pp(e,t,r!==void 0?r:"item"),style:{color:"var("+y.textDisabled+")",fontSize:"var("+$.sizeXs+")"}})}function a_(e,t,r,n){return L("div",{children:[e,I7(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+I.sm+")"}})}function aMe(e){let t=e.source,r=Ia(),n=Dg(),i=Fs(t),o=Mo(t.schema,"List"),a=hp(i.map(h=>h.dict),o,r,t.ownEntity,Wr(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(h,p)=>fp(a,h,r,p),isMissing:(h,p)=>bv(a,h,r,p)},u=ee([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField,"id"],h=>h),d=o.filter(h=>!u.includes(h.key)).slice(0,4),f=i.map(h=>{let p=G(C(t.semantics.statusField,v=>ia(h.dict,v)),v=>b(ds,{variant:"Neutral",label:vt(v),dot:!1})),m=oMe(t,h),g=G(t.rowActionsFor,v=>v(h.key,h.json).map(_=>({label:_.label,onClick:_.run})));return{key:h.key,title:Zu(t,h),media:m,badge:p,fields:d.map(v=>({label:v.label,value:iu(v.key,v.kind,v.propSchema,M(h.dict,v.key),v.ann,r,n,l,t.ownEntity)})),actions:g}});return a_(b(p6e,{cards:f,onCardClick:h=>F7(t,i,h)}),[t],void 0,void 0)}function sMe(e){let t=Fs(e),r=F(e.semantics.statusField,""),n=Zo(e.schema,r),i=s=>F(ia(s.dict,r),""),o=s=>s.map(l=>({value:l,label:l===""?"(no status)":vt(l),cards:t.filter(u=>i(u)===l).map(u=>{let d=ee(Vg(e.schema),f=>{if(f!==r)return Tu(u.dict,f)})[0];return{key:u.key,title:Zu(e,u),meta:d}})})),a=nt(t.map(i).filter(s=>!n.includes(s)),[],(s,l)=>s.includes(l)?s:s.concat([l]));return o(n).concat(o(a))}function lMe(e){let t=e.source,r=Fs(t),n=F(t.semantics.statusField,""),i=sMe(t),o=f=>F(C(r.find(h=>h.key===f),h=>ia(h.dict,n)),""),a=(f,h)=>C(t.statusCommandFor,p=>p(o(f),h)),s=t.onCommand,l=s!==void 0&&De(t.statusCommandFor)?(f,h)=>re(a(f,h),p=>s(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>De(a(f,h)):void 0;return a_(b(NOe,{columns:i,onCardClick:f=>F7(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let pd=["var("+y.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function bk(e,t){return F(e.accent,pd[Ho(t,pd.length)])}function uMe(e){return e.map((t,r)=>{let n=bk(t,r),i=t.semantics.dateSpan;return i!==void 0?ee(Fs(t),o=>G(C(Iu(i,o.dict),qn),a=>{let s=C(RS(i,o.dict),qn);return{key:r.toString()+":"+o.key,title:Zu(t,o),start:a,end_:s,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function cMe(e){let t=e.sources,r=uMe(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:bk(i,o)})):[];return b(ZOe,{events:r,legend:n,windowNote:pp(t,void 0,void 0)})}function dMe(e){return e.map((r,n)=>{let i=r.semantics.dateSpan,o=bk(r,n);return Fs(r).map(a=>{let s=C(i,f=>Iu(f,a.dict)),l=C(s,qn),u=s!==void 0?F(ih(s),s):"",d=G(C(r.semantics.statusField,f=>ia(a.dict,f)),vt);return{entry:{id:n.toString()+":"+a.key,timestamp:u,label:Zu(r,a),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(a.key,a.json)}})}).flat().toSorted((r,n)=>{let i=r.sort,o=n.sort;return i!==void 0?o!==void 0?o-i:-1:o!==void 0?1:0})}function fMe(e){let t=e.sources,r=dMe(t),n=i=>re(r.find(o=>o.entry.id===i),o=>o.open_());return a_(b(ZFe,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function P7(e,t){let r=M(e,t);if(r===void 0)return[];let n=ce(r);return n!==void 0?[n]:ee(F(Vt(r),[]),ce)}function hMe(e,t){let r=t.map(n=>n.key);return ee(Dr(e.schema),n=>{let i=n[0];return G(ld(i),o=>i)}).filter(n=>t.some(i=>P7(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function pMe(e){let t=Fs(e),r=hMe(e,t),n=Du(e.semantics.dateSpan,hP);return n!==void 0?ee(t,i=>G(C(Iu(n,i.dict),qn),o=>{let a=F(C(RS(n,i.dict),qn),o);return{key:i.key,title:Zu(e,i),start:o,end_:a<o?o:a,accent:e.accent,dependsOn:r.map(s=>P7(i.dict,s)).flat(),onOpen:()=>e.onOpenRow(i.key,i.json)}})):[]}function mMe(e){let t=e.source,r=pMe(t),n=t.rows.length,i=r.length,o=pp([t],i,void 0),a=i===n?o:o+" (the rest carry no start date)";return b(DIe,{tasks:r,windowNote:a})}function gMe(e,t){let r=e.semantics.labelField,n=C(e.semantics.statusField,i=>Tu(t.dict,i));return n!==void 0?n:C(Vg(e.schema).find(i=>Jc(i,r)?Jc(i,e.semantics.parentField):!1),i=>Tu(t.dict,i))}function vMe(e){let t=Fs(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:Zu(e,n),subtitle:gMe(e,n),parent:C(r,i=>Tu(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function _Me(e){let t=e.source,r=vMe(t);return b(qFe,{nodes:r,windowNote:pp([t],void 0,void 0)})}function bMe(e){let t=e.source,r=Ia(),n=_k(t),i=Mo(t.schema,"List"),o=hp(n.map(h=>h.dict),i,r,t.ownEntity,Wr(t.refLabels)),a=t.refLabels,s=a!==void 0?a.lookupLabel:(h,p)=>fp(o,h,r,p),l=D7(t.schema,t.semantics);if(l===void 0)return null;let d=nMe(t,l,h=>{let p=C(l.actorField,ld);return p!==void 0?F(s(p,h),h):h}),f=iMe(t,l);return b(H6e,{entries:d,steps:f,windowNote:pp([t],void 0,"decision")})}function yMe(e){return ee(Dr(e),t=>{let r=Fu(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function O7(e){let t=yMe(e),r=jn(e,void 0,void 0).statusField,n=r!==void 0&&t.some(a=>a[0]===r)?t.filter(a=>a[0]===r).concat(t.filter(a=>a[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function xMe(e){return G(O7(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],a=o[1],s=o[0],l=Fs(e),u=(_,x)=>F(ia(_.dict,x),""),d=(_,x)=>nt(l.map(S=>u(S,_)).filter(S=>!x.includes(S)),[],(S,E)=>S.includes(E)?S:S.concat([E])),f=a.concat(d(s,a)),h=n.concat(d(i,n)),p=f.map(_=>h.map(x=>nt(l,0,(S,E)=>u(E,s)===_&&u(E,i)===x?S+1|0:S))),m=p.map(_=>nt(_,0,(x,S)=>x+S|0)),g=h.map((_,x)=>nt(p,0,(S,E)=>S+E[x]|0)),v=nt(m,0,(_,x)=>_+x|0);return{rowField:s,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:m,colTotals:g,grandTotal:v}})}function SMe(e,t){return eP(e.toString(),tH(t))}function wMe(e){let t=e.source,r=de(()=>"Numbers"),n=r[1],i=r[0],o=xMe(t);if(o===void 0)return null;let a=g=>g===""?"(none)":vt(g),s=vt(o.rowField),l=vt(o.colField),u=o.rowValues.map(g=>[g,a(g)]),d=o.colValues.map(g=>[g,a(g)]),f=nt(o.counts,0,(g,v)=>nt(v,g,(_,x)=>x>_?x:_)),h=g=>SMe(g,jw([t])),p=(g,v)=>b("button",{children:v,style:{background:"none",backgroundColor:i===g?"var("+y.surfaceSubtle+")":"transparent",border:"1px solid var("+y.border+")",color:i===g?"var("+y.textPrimary+")":"var("+y.textSecondary+")",cursor:"pointer",fontSize:"var("+$.sizeSm+")",padding:"2px var("+I.sm+")",borderRadius:"var("+Y.sm+")"},type:"button",onClick:_=>n(x=>g)}),m;return m=i==="Numbers"?b(BIe,{rowDimLabel:s,colDimLabel:l,rowHeaders:u.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):b(xFe,{rowDimLabel:s,colDimLabel:l,rowHeaders:u.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({value:v,display:v.toString()}))),maxLabel:f.toString()}),L("div",{children:[L("div",{children:[p("Numbers","Numbers"),p("Heat","Heat")],style:{display:"inline-flex",alignSelf:"flex-end",gap:"var("+I.xs+")"}}),m,I7([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+I.sm+")"}})}function EMe(e){return e.map((t,r)=>{let n=t.semantics.imageField;return Fs(t).map(i=>{let o=C(C(n,u=>Tu(i.dict,u)),u=>{if(u!=="")return du(u)}),a=G(C(t.semantics.statusField,u=>ia(i.dict,u)),vt),s=t.fillSlot,l=o!==void 0||s===void 0||n===void 0?void 0:s(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:Zu(t,i),caption:a,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function kMe(e){let t=e.sources,r=EMe(t),n=i=>re(r.find(o=>o.item.key===i),o=>o.open_());return a_(b(ZIe,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function Is(e){return b("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function Hd(e,t){let r=e[0];return r!==void 0?t(r):null}na({id:"cards",label:"Cards",icon:Is("▤"),arity:"Single",isCapable:(e,t)=>!0,render:e=>Hd(e,t=>b(aMe,{source:t})),capability:"always — richer with label/image semantics and summary fields"});na({id:"board",label:"Board",icon:Is("▥"),arity:"Single",isCapable:(e,t)=>fe(t.statusField,!1,r=>Zo(e,r).length!==0),render:e=>Hd(e,t=>b(lMe,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});na({id:"calendar",label:"Calendar",icon:Is("▣"),arity:{TAG:"Multi",min:1},isCapable:(e,t)=>De(t.dateSpan),render:e=>b(cMe,{sources:e}),capability:"dateSpan — a `date-range` field, a start*/end* date-time pair, or a lone non-infrastructure date field"});na({id:"timeline",label:"Timeline",icon:Is("▚"),arity:{TAG:"Multi",min:2},isCapable:(e,t)=>De(t.dateSpan),render:e=>b(fMe,{sources:e}),capability:"dateSpan — a date field to place rows on a most-recent-first chronological stream; several sources merge into one stream, accent-coded per source"});na({id:"gantt",label:"Gantt",icon:Is("▬"),arity:"Single",isCapable:(e,t)=>fe(t.dateSpan,!1,hP),render:e=>Hd(e,t=>b(mMe,{source:t})),capability:"dateSpan stating an end — a `date-range` field or a start*/end* date-time pair; dependency connectors come from entity-ref fields whose ids point at other loaded rows"});na({id:"hierarchy",label:"Hierarchy",icon:Is("⑂"),arity:"Single",isCapable:(e,t)=>De(t.parentField),render:e=>Hd(e,t=>b(_Me,{source:t})),capability:"parentField — a parent*/manager/reportsTo/supervisor string field (or one annotated `parent-ref`) whose values point at other rows of the same collection"});na({id:"approvals",label:"Approvals",icon:Is("✓"),arity:"Single",isCapable:(e,t)=>rMe(e),render:e=>Hd(e,t=>b(bMe,{source:t})),capability:"a decision enum — a small string enum named decision/outcome/verdict/approval/result, or any small enum declaring two or more approval values (approved/rejected/pending/…) — plus a date field to sequence the chain"});na({id:"pivot",label:"Pivot",icon:Is("⊞"),arity:"Single",isCapable:(e,t)=>De(O7(e)),render:e=>Hd(e,t=>b(wMe,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});na({id:"gallery",label:"Gallery",icon:Is("▨"),arity:"Single",isCapable:(e,t)=>De(t.imageField),render:e=>b(kMe,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function ZD(e,t){return e===t?0:e<t?-1:1}function CMe(e){return typeof e!="object"?e==="KBoolean"?[["true","Yes"],["false","No"]]:void 0:e.TAG==="KEnum"?e._0.map(t=>[t,t]):void 0}function $f(e,t){if(t===void 0)return"";let r=et(t),n=0;if(typeof r!="object"){if(r==="JSONNull")return"";n=2}else switch(r.TAG){case"JSONString":return r._0;case"JSONNumber":return r._0.toString();case"JSONObject":return JSON.stringify(t);default:n=2}if(n===2&&typeof e!="object")switch(e){case"KBoolean":return typeof r!="object"?r==="JSONFalse"?"No":"Yes":JSON.stringify(t);case"KArrayOfStrings":if(typeof r=="object")return ee(r._0,ce).join(", ");break}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function RMe(e,t,r){let n=a=>a!==void 0?et(a)==="JSONNull":!0,i=n(t),o=n(r);if(i)return o?0:1;if(o)return-1;if(typeof e!="object")switch(e){case"KBoolean":let a=u=>{if(u===void 0)return 0;let d=et(u);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return a(t)-a(r);case"KDate":return ZD($f(e,t),$f(e,r));case"KNumber":let s=F(C(t,Ji),0),l=F(C(r,Ji),0);return s-l}return ZD($f(e,t),$f(e,r))}function AMe(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?fe(C(t,ce),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=G(t,et);if(n===void 0||typeof n=="object")return!1;switch(n){case"JSONFalse":return r==="false";case"JSONTrue":return r==="true";default:return!1}}function TMe(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>$f(i.kind,M(e,i.key)).toLowerCase().includes(n))}function $Me(e,t,r){let n=Pe(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let a=o[0],s=t.find(l=>l.key===a);return s!==void 0?AMe(s.kind,M(i,a),o[1]):!0}))}function NMe(e,t,r){return r===""?e:e.filter(n=>TMe(n,t,r))}function DMe(e,t,r,n){if(r===void 0)return e;let i=t.find(a=>a.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((a,s)=>RMe(i.kind,M(a,r),M(s,r))*o)}function FMe(e,t){return ee(e,r=>{if(!uae(r.kind))return;let n=CMe(r.kind);if(n===void 0)return;let i=n.map(o=>({label:o[1],value:o[0]}));return{key:r.key,label:r.label,options:i,value:F(M(t,r.key),"")}})}function Po(e){return"var("+e+")"}let IMe=w([Ft("relative"),z("inlineFlex"),X("center")]),PMe=w([c("background",Po(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Po(Y.md)),c("padding","var("+I.xs+") var("+I.md+")"),c("padding-left","32px"),c("font-size",Po($.sizeMd)),c("color",Po(y.textPrimary)),c("outline","none"),c("width","240px"),ws([c("border-color",Po(y.brand))]),kK([c("color",Po(y.textDisabled))])]),OMe=w([Ft("absolute"),vd(Re(10)),c("color",Po(y.textDisabled)),c("font-size",Po($.sizeSm)),c("pointer-events","none")]),MMe=w([Ft("absolute"),Rl(Re(8)),c("background","none"),c("border","none"),c("cursor","pointer"),c("color",Po(y.textDisabled)),c("font-size",Po($.sizeSm)),c("padding","0"),c("line-height","1"),je([c("color",Po(y.textSecondary))])]);function LMe(e){let t=e.placeholder,r=e.onChange,n=e.value,i=t!==void 0?t:"Search...";return L("div",{children:[b("span",{children:"/",className:OMe}),b("input",{className:PMe,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?b("button",{children:"x",className:MMe,onClick:o=>r("")}):null],className:IMe})}let M7=LMe;function Ws(e){return"var("+e+")"}let zMe=w([z("flex"),X("center"),c("gap",Ws(I.sm)),ei("wrap")]),UMe=w([z("flex"),X("center"),c("gap","4px")]),BMe=w([c("color",Ws(y.textSecondary)),c("font-size",Ws($.sizeSm)),c("white-space","nowrap")]),jMe=w([c("background",Ws(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Ws(Y.sm)),c("padding","2px var("+I.sm+")"),c("font-size",Ws($.sizeSm)),c("color",Ws(y.textPrimary)),c("cursor","pointer"),c("outline","none"),ws([c("border-color",Ws(y.brand))])]);function qMe(e){let t=e.onChange,r=e.filter;return L("div",{children:[b("span",{children:r.label+":",className:BMe}),L("select",{children:[b("option",{children:"All",value:""}),r.options.map(n=>b("option",{children:n.label,value:n.value},n.value))],className:jMe,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:UMe})}function VMe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?b(M7,{value:r,onChange:t}):null,e.filters.map(i=>b(qMe,{filter:i,onChange:n},i.key))],className:zMe})}let L7=VMe;function yk(){let e=de(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(s=>{});let a=o._0;t(s=>a)};return{element:r!==void 0?b(nk,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function eF(e){try{return decodeURIComponent(e)}catch{return e}}function GMe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function tF(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[eF(r),eF(n)]}function ji(e){return"var("+e+")"}let KMe=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap",ji(I.md)),Vn(1),c("min-height","160px"),Fa("center"),c("padding",ji(I.lg))]),HMe=w([c("font-size","32px"),c("color",ji(y.error)),c("line-height","1")]),WMe=w([c("color",ji(y.textPrimary)),c("font-size",ji($.sizeLg)),c("font-weight",ji($.weightMedium)),on(Re(0))]),JMe=w([c("color",ji(y.textSecondary)),c("font-size",ji($.sizeSm)),c("line-height",ji($.lineHeightNormal)),on(Re(0))]),QMe=w([c("background",ji(y.brand)),c("color",ji(y.textOnBrand)),c("border","none"),c("border-radius",ji(Y.md)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",ji($.sizeSm)),c("cursor","pointer"),Yo(Re(4))]);function YMe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[b("div",{children:"X",className:HMe}),b("h3",{children:r,className:WMe}),fe(e.detail,null,n=>b("p",{children:n,className:JMe})),fe(e.onRetry,null,n=>b("button",{children:"Try again",className:QMe,onClick:i=>n()}))],className:KMe})}let Js=YMe,XMe=Ye([["ProductsNotAvailable",{template:"These products aren't available yet: {{missing}}.",idFields:[{field:"missing",entityStem:"product"}]}],["OrderAlreadyPlaced",{template:"This order has already been placed.",idFields:[]}],["CategoryAlreadyArchived",{template:"This category is already archived.",idFields:[]}]]);function ZMe(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function rF(e,t){return fe(C(H(e),r=>M(r,t)),[],r=>{let n=et(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return ee(n._0,ce).filter(o=>o!=="");default:return[]}})}function e4e(e){return C(e,t=>{try{return JSON.parse(t)}catch{return}})}function nF(e,t){return nt(Pe(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function t4e(e,t,r,n){let i=Es(t,r);if(i===void 0)return Promise.resolve(n);let o=i.queryField,a=i.labelField,s=a==="id"?"id":"id "+a,l="query($ids: [ID!]) { "+o+"(first: "+n.length.toString()+", filter: {ids: $ids}) { edges { node { "+s+" } } } }",u={};return u.ids=n.map(d=>d),$t(e(l,u).then(d=>{let f=aL(d,o,a);return Promise.resolve(n.map(h=>{let p=M(f,h);return p!==void 0?p:h}))}),d=>Promise.resolve(n))}function $p(e,t,r,n){let i=ZMe(r,n);if(r===void 0)return Promise.resolve(i);let o=M(XMe,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let a=e4e(n);if(a===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(u=>{let d=u.field,f=rF(a,d);return f.length===0?Promise.resolve([d,""]):t4e(e,t,u.entityStem,f).then(h=>Promise.resolve([d,h.join(", ")]))});return Promise.all(l).then(u=>{let d={};return u.forEach(f=>{d[f[0]]=f[1]}),Promise.resolve(nF(o.template,d))})}let s={};return o.idFields.forEach(l=>{let u=l.field,d=rF(a,u);s[u]=d.join(", ")}),Promise.resolve(nF(o.template,s))}let r4e="The request failed — the change was not sent.",iF="This command could not be sent. See the console for details.";function n4e(e,t,r){let n={};return Pe(F(H(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[F(e.aggregateIdField,"id")]=t,n}function xk(e,t,r,n,i,o,a,s,l){let u=a!==void 0?a:[],d=s!==void 0?s:m=>{},f=l!==void 0?l:m=>{},h=r.filter(m=>m.level==="Instance"),p=q8(e,t);return(m,g,v)=>{let _=h.find(x=>x.name===m);if(p!==void 0)if(_!==void 0){f(g),$t(p(_.mutationDocument,n4e(_,g,v)).then(x=>{if(typeof x!="object")return x==="Accepted"?(i||o(),d("Cleared"),Promise.resolve()):(i||setTimeout(()=>o(),500),d("Cleared"),Promise.resolve());{if(x.TAG==="Rejected"){let E=x._0;return console.warn("[AutoUI] "+n+": command "+m+" rejected"+fe(E.errorCode,"",k=>" ("+k+")")),o(),$p(e,u,E.errorCode,E.detail).then(k=>(d({TAG:"Failed",_0:{command:_.label,reason:k}}),Promise.resolve()))}let S=x._0;return console.error("[AutoUI] "+n+": command "+m+" not executed — "+S),o(),d({TAG:"Failed",_0:{command:_.label,reason:S}}),Promise.resolve()}}),x=>(console.error("[AutoUI] "+n+": command "+m+" failed to reach the server"),d({TAG:"Failed",_0:{command:_.label,reason:r4e}}),o(),Promise.resolve()));return}else return console.error("[AutoUI] "+n+': command "'+m+'" is not an instance command of this view'),d({TAG:"Failed",_0:{command:m,reason:iF}});else return console.error("[AutoUI] "+n+': command "'+m+'" not sent — no GraphQL executor in context'),d({TAG:"Failed",_0:{command:m,reason:iF}})}}let i4e=500;function co(e){return"var("+e+")"}let o4e=w([Ft("relative"),z("inlineBlock")]),a4e=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",co(Y.sm)),c("cursor","pointer"),c("color",co(y.textSecondary)),c("padding","2px var("+I.sm+")"),c("font-size",co($.sizeSm)),je([c("background",co(y.surfaceSubtle)),c("color",co(y.textPrimary))])]),s4e=w([Ft("absolute"),Rl(Re(0)),Ss({NAME:"percent",VAL:100}),Yo(Re(4)),c("background",co(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",co(Y.md)),c("box-shadow",co(kn.md)),c("min-width","160px"),c("z-index","200"),c("overflow","hidden"),wK(Re(4),Re(0))]);function l4e(e){return w([z("block"),Xo({NAME:"percent",VAL:100}),c("background","none"),c("border","none"),c("text-align","left"),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",co($.sizeMd)),c("color",co(e?y.error:y.textPrimary)),Ce("pointer"),je([c("background",co(y.surfaceSubtle))])])}let u4e=w([c("border","none"),c("border-top","1px solid var("+y.borderSubtle+")"),vK(Re(4),Re(0))]);function c4e(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=de(()=>!1),i=n[1],o=n[0];return $e(()=>{if(!o)return;let a=s=>i(l=>!1);return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[o]),L("div",{children:[b("button",{children:r,className:a4e,onClick:a=>{a.stopPropagation(),i(s=>!s)}}),o?b("div",{children:e.items.map((a,s)=>{if(typeof a!="object")return b("hr",{className:u4e},s.toString());let l=a.onClick,u=a.label;return b("button",{children:u,className:l4e(a.danger),onClick:d=>{i(f=>!1),l()}},u)}),className:s4e,onClick:a=>{a.stopPropagation()}}):null],className:o4e})}let d4e=c4e;function Xx(e){return"var("+e+")"}let f4e=w([z("grid"),c("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),c("gap",Xx(I.lg)),c("align-items","start"),wS("(max-width: 720px)",[c("grid-template-columns","minmax(0, 1fr)")])]),z7=w([c("min-width","0"),c("overflow","auto")]),h4e=zr([z7,w([c("border-left","1px solid var("+y.border+")"),c("padding-left",Xx(I.lg)),wS("(max-width: 720px)",[c("border-left","none"),c("padding-left","0"),c("border-top","1px solid var("+y.border+")"),c("padding-top",Xx(I.lg))])])]);function p4e(e){return L("div",{children:[b("div",{children:e.master,className:z7}),b("div",{children:e.detail,className:h4e})],className:f4e})}let m4e=p4e;function Vh(e){return"var("+e+")"}let g4e=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap",Vh(I.md)),Vn(1),c("min-height","160px"),c("color",Vh(y.textSecondary))]),v4e=w([c("width","32px"),c("height","32px"),c("border","3px solid var("+y.borderSubtle+")"),c("border-top-color",Vh(y.brand)),c("border-radius","50%"),c("animation","rv-spin 0.7s linear infinite")]),_4e=w([c("font-size",Vh($.sizeSm)),c("color",Vh(y.textSecondary))]);DK("@keyframes rv-spin",[lr("from",[c("transform","rotate(0deg)")]),lr("to",[c("transform","rotate(360deg)")])]);function b4e(e){return L("div",{children:[b("div",{className:v4e}),fe(e.label,null,t=>b("span",{children:t,className:_4e}))],className:g4e})}let Zf=b4e;function y4e(e,t){return F(C(M(e,t),ce),"")}function x4e(e,t,r){let n={},i=[];e.forEach(a=>{let s=y4e(a,t),l=M(n,s);l!==void 0?l.push(a):(n[s]=[a],i.push(s))});let o=a=>{if(a==="")return r.length+1|0;let s=r.indexOf(a);return s!==-1?s:r.length};return i.toSorted((a,s)=>{let l=o(a),u=o(s);return l!==u?l-u|0:a<s?-1:a>s?1:0}).map(a=>[a,F(M(n,a),[])])}let oF=21;function U7(e,t,r){return ee(iL(e,t),n=>{let i=C(M(n,"id"),ce),o=F(C(M(n,r),ce),F(i,""));return G(i,a=>({id:a,label:o}))})}function S4e(e,t){let r=hi(),n=de(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return $e(()=>{let o={contents:!1};if(i(a=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let a=t==="id"?"id":"id "+t,s="query { "+e+"(first: "+oF.toString()+") { edges { node { "+a+" } } } }";$t(r(s,{}).then(l=>{if(!o.contents){let u=U7(l,e,t),d=u.length>=oF,f=d?u.slice(0,20):u;i(h=>({loading:!1,options:f,hasMore:d}))}return Promise.resolve()}),l=>(o.contents||(console.warn("[AutoUI] RefField "+e+" fetch failed",l),i(u=>({loading:!1,options:[],hasMore:!1}))),Promise.resolve()))}else o.contents||i(a=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function w4e(e,t,r){let n=hi(),i=de(()=>({loading:!1,options:[],error:!1})),o=i[1];return $e(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let a={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let s=setTimeout(()=>{if(a.contents)return;if(n===void 0)return o(f=>({loading:!1,options:[],error:!1}));let l=t==="id"?"id":"id "+t,u="query($q: String!) { "+e+"(first: 20, filter: {searchPrefix: $q}) { edges { node { "+l+" } } } }",d={};d.q=r,$t(n(u,d).then(f=>{if(!a.contents){let h=U7(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(a.contents||(console.warn("[AutoUI] RefField "+e+" searchPrefix failed; falling back to client-side filter",f),o(h=>({loading:!1,options:[],error:!0}))),Promise.resolve()))},250);return()=>{a.contents=!0,clearTimeout(s)}},[n,r,e]),i[0]}function E4e(e,t,r){let n=hi(),i=de(()=>{}),o=i[1];return $e(()=>{let a={contents:!1},s=0;if(n!==void 0&&t!==void 0&&t!==""){let l=r==="id"?"id":"id "+r,u="query($id: ID!) { "+e+"(id: $id) { "+l+" } }",d={};d.id=t,$t(n(u,d).then(f=>{if(!a.contents){let h=H(f),p=F(C(C(h,_=>M(_,"data")),H),{}),m=M(p,e),g=m!==void 0?m:C(h,_=>M(_,e)),v=C(g,H);if(v!==void 0){let _=F(C(M(v,"id"),ce),t),x=F(C(M(v,r),ce),_);o(S=>({id:_,label:x}))}else o(_=>{})}return Promise.resolve()}),f=>Promise.resolve())}else s=1;return s===1&&o(l=>{}),()=>{a.contents=!0}},[n,t,r]),i[0]}function kr(e){return"var("+e+")"}function Nf(e){if(e==="")return[];let t=Vt(JSON.parse(e));return t!==void 0?ee(t,ce):[e]}function k4e(e){return JSON.stringify(e.map(t=>t))}let C4e=w([Ft("relative"),Xo({NAME:"percent",VAL:100})]),aF=w([c("background",kr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",kr(Y.sm)),c("padding","var("+I.xs+") var("+I.sm+")"),c("font-size",kr($.sizeMd)),c("color",kr(y.textPrimary)),c("outline","none"),Xo({NAME:"percent",VAL:100}),yK(Re(34)),z("flex"),X("center"),ei("wrap"),c("gap","4px"),Ce("pointer"),Fa("left"),ws([c("border-color",kr(y.brand))])]),R4e=w([c("border-color",kr(y.brand))]),A4e=w([c("border-color",kr(y.error))]),T4e=w([c("color",kr(y.textSecondary))]),$4e=w([z("inlineFlex"),X("center"),c("background",kr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",kr(Y.sm)),c("padding","2px 6px"),c("font-size",kr($.sizeSm)),c("gap","4px")]),N4e=w([Ce("pointer"),c("color",kr(y.textSecondary)),c("font-weight",kr($.weightBold))]),D4e=w([c("border","none"),c("background","transparent"),c("outline","none"),c("color",kr(y.textPrimary)),c("font-size",kr($.sizeMd)),Vn(1),SS(Re(40))]),F4e=w([Ft("absolute"),Ss({NAME:"percent",VAL:100}),vd("zero"),Rl("zero"),Yo(Re(2)),c("background",kr(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",kr(Y.sm)),c("box-shadow",kr(kn.md)),gK("none"),on("zero"),SK("zero"),_K(Re(240)),xK("auto"),EK(20)]),I4e=w([c("padding","var("+I.xs+") var("+I.sm+")"),Ce("pointer"),c("color",kr(y.textPrimary)),c("font-size",kr($.sizeMd))]),P4e=w([c("background",kr(y.surfaceSubtle))]),O4e=w([c("background",kr(y.brandSubtle))]),sF=w([c("padding","var("+I.xs+") var("+I.sm+")"),c("color",kr(y.textSecondary)),c("font-size",kr($.sizeSm))]),M4e=(function(e,t){return e.contains(t)});function L4e(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,a=Math.max(120,Math.min(240,i?n:r));return[i,a]}function z4e(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.required,s=e.multi,l=e.labelField,u=e.queryField,d=e.fieldKey,f=n!==void 0?n:()=>{},h=r!==void 0?r:!1,p=t!==void 0?t:!1,m=S4e(u,l),g=m.options,v=m.loading,_=Fe(void 0),x;if(s)x="Search";else{let Ze=_.current;if(Ze!==void 0)x=Ze;else if(v)x="Inline";else{let pe=m.hasMore?"Search":"Inline";_.current=pe,x=pe}}let S=de(()=>!1),E=S[1],k=S[0],R=de(()=>0),T=R[1],A=R[0],N=de(()=>""),P=N[1],O=N[0],D=de(()=>[!1,240]),U=D[1],B=D[0],q=Fe(null),Q=Fe(null),J=s||o===""?!1:!g.some(Ze=>Ze.id===o),te=E4e(e.singleQueryField,J?o:void 0,l),ae=Ze=>{let pe=G(g.find(ze=>ze.id===Ze),ze=>ze.label),Ie=C(te,ze=>{if(ze.id===Ze)return ze.label});return pe!==void 0?pe:Ie!==void 0?Ie:Ze};$e(()=>{if(!k)return;let Ze=pe=>{let Ie=pe.target,ze=q.current;if(ze!=null&&!M4e(ze,Ie))return E(Qe=>!1)};return document.addEventListener("mousedown",Ze),()=>{document.removeEventListener("mousedown",Ze)}},[k]),_I(()=>{if(k){let Ze=q.current;Ze!=null&&U(pe=>L4e(Ze))}},[k]);let Z=x==="Search"&&O!=="",W=w4e(u,l,Z?O:""),le;if(O==="")le=g;else{let Ze=O.toLowerCase();le=g.filter(pe=>pe.label.toLowerCase().startsWith(Ze))}let oe=Z&&!W.error?W.options:le,Se=oe.length,be=v||Z&&W.loading,ue=Ze=>{let pe=Nf(o),Ie=pe.some(Qe=>Qe===Ze)?pe.filter(Qe=>Qe!==Ze):pe.concat([Ze]);i(d,JSON.stringify(Ie.map(Qe=>Qe))),P(Qe=>""),T(Qe=>0);let ze=Q.current;if(ze!=null){ze.focus();return}},xe=Ze=>{let pe=oe[Ze];if(pe!==void 0){if(s)return ue(pe.id);{let Ie=pe.id;return i(d,Ie),E(ze=>!1),P(ze=>"")}}},ot=Ze=>{switch(Ze.key){case"ArrowDown":return Ze.preventDefault(),k?T(Qe=>Se===0?0:Ho(Qe+1|0,Se)):E(Qe=>!0);case"ArrowUp":return Ze.preventDefault(),T(Qe=>Se===0?0:Ho((Qe-1|0)+Se|0,Se));case"Backspace":if(!(s&&O===""))return;let Ie=Nf(o);if(Ie.length===0)return;let ze=Ie.slice(0,Ie.length-1|0);return i(d,JSON.stringify(ze.map(Qe=>Qe)));case"Enter":return k?(Ze.preventDefault(),xe(A)):void 0;case"Escape":return k?E(Qe=>!1):void 0;default:return}},rr=k?aF+" "+R4e:aF,It=h?rr+" "+A4e:rr,mi=()=>Nf(o).map(pe=>L("span",{children:[ae(pe),b("span",{children:"×",className:N4e,onClick:Ie=>{Ie.stopPropagation(),ue(pe)}})],className:$4e},pe)),Gn=(B[1]|0).toString()+"px",sa=B[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:Gn,top:"auto"}:{maxHeight:Gn},Yt;if(be)Yt=b("li",{children:"Loading…",className:sF});else if(Se===0)Yt=b("li",{children:O===""?"No options":"No matches",className:sF});else{let Ze=s?Nf(o):o===""?[]:[o];Yt=oe.map((pe,Ie)=>{let ze=Ze.some(K=>K===pe.id),Sr=tj([[I4e],Ie===A?[P4e]:[],ze?[O4e]:[]]).join(" ");return b("li",{children:pe.label,"aria-selected":ze,className:Sr,role:"option",onMouseDown:K=>{K.preventDefault(),xe(Ie)},onMouseEnter:K=>T(ye=>Ie)},pe.id)})}let Nn=b("ul",{children:Yt,className:F4e,role:"listbox",style:sa}),dn;return dn=x==="Inline"?b("button",{children:o===""?b("span",{children:a?"Select…":"—",className:T4e}):ae(o),className:It,autoFocus:p,type:"button",onKeyDown:ot,onBlur:Ze=>f(),onClick:Ze=>E(pe=>!pe)}):L("div",{children:[s?mi():null,b("input",{ref:Gt(Q),className:D4e,autoFocus:p,placeholder:a?"Search…":"—",type:"text",value:s||k?O:o===""?"":ae(o),onKeyDown:ot,onFocus:Ze=>E(pe=>!0),onBlur:Ze=>f(),onChange:Ze=>{let pe=Ze.target.value;P(Ie=>pe)}})],className:It,onClick:Ze=>E(pe=>!0)}),L("div",{children:[dn,k?Nn:null],ref:Gt(q),className:C4e})}let U4e=z4e;function B4e(e,t,r,n){return C(e.find(i=>i.id===t),i=>{let o=i.aggregates.find(a=>a.name===r);return o!==void 0?G(o.commands.find(a=>a.name===n),a=>({plugin:i,enclosingAggregate:o,command:a})):C(i.stateChangeSlices.find(a=>a.name===r),a=>G(a.commands.find(s=>s.name===n),s=>({plugin:i,enclosingAggregate:void 0,command:s})))})}function B7(e,t,r){return e}function j4e(e,t,r){let n=r!==void 0?r:B7;return G(B4e(t,e.pluginId,e.slice,e.command),i=>{let o=i.plugin,a=n(i.command,i.enclosingAggregate,o.id);return{label:F(e.label,a.label),pluginId:o.id,command:a,field:e.field,navigateTo:C(e.then,s=>{if(s.trim()!=="")return s})}})}function q4e(e,t,r){let n=r!==void 0?r:B7;return ee(F(C(e,i=>i.rowActions),[]),i=>j4e(i,t,n))}function V4e(e,t){let r=e.refFields.find(n=>n.propertyKey===t);return r!==void 0?r.multi:F(C(C(C(G(C(C(C(H(e.schema),n=>M(n,"properties")),H),n=>M(n,t)),cn),H),n=>M(n,"type")),ce),"")==="array"}function G4e(e,t){return Ye([[e.field,V4e(e.command,e.field)?k4e([t]):t]])}function Dt(e){return"var("+e+")"}let j7="168px",K4e=w([z("flex"),ve("column"),c("gap",Dt(I.sm))]),H4e=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Dt(I.sm))]),lF=w([z("inlineFlex"),X("center"),c("gap",Dt(I.xs))]),Df=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Dt(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",Dt(y.textSecondary)),c("font-size",Dt($.sizeSm)),Ce("pointer"),je([c("background",Dt(y.surfaceSubtle)),c("color",Dt(y.textPrimary))])]),W4e=zr([Df,w([c("background",Dt(y.surfaceSubtle)),c("color",Dt(y.textPrimary)),c("font-weight",Dt($.weightMedium))])]),J4e=w([c("font-size",Dt($.sizeMd)),c("font-weight",Dt($.weightMedium)),c("color",Dt(y.textPrimary))]),Q4e=w([c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Dt(Y.md)),c("overflow","hidden")]),q7=w([z("flex"),X("stretch")]),Y4e=zr([q7,w([c("background",Dt(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")")])]),X4e=zr([q7,w([c("border-top","1px solid var("+y.borderSubtle+")")])]),Z4e=w([c("flex","0 0 "+j7),c("padding","4px var("+I.sm+")"),c("font-size",Dt($.sizeXs)),c("color",Dt(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),V7=w([c("flex","0 0 "+j7),c("padding","6px var("+I.sm+")"),c("font-size",Dt($.sizeSm)),c("font-weight",Dt($.weightMedium)),c("color",Dt(y.textPrimary)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),eLe=zr([V7,w([c("color",Dt(y.textDisabled)),c("font-style","italic")])]);function Zx(e){return w([z("grid"),c("flex","1 1 auto"),c("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let tLe=w([c("background",Dt(y.surfaceSubtle))]),rLe=w([c("padding","4px var("+I.xs+")"),c("font-size",Dt($.sizeXs)),c("color",Dt(y.textSecondary)),c("border-left","1px solid var("+y.borderSubtle+")")]),G7=w([z("flex"),ve("column"),c("gap","2px"),c("min-height","48px"),c("padding","3px"),c("border-left","1px solid var("+y.borderSubtle+")")]),nLe=zr([G7,w([c("background",Dt(y.surfaceSubtle))])]);function uF(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",Dt(Y.sm)),c("background",Dt(y.surfaceSubtle)),c("color",Dt(y.textPrimary)),c("font-size",Dt($.sizeXs)),c("padding","1px var("+I.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Ce("pointer"),je([c("background",Dt(y.surfaceElevated))])])}let iLe=w([Ce("grab")]),oLe=w([is(.85),c("z-index","10"),Ce("grabbing")]),aLe=w([c("font-size",Dt($.sizeXs)),c("color",Dt(y.textDisabled))]),cF="var("+y.brand+")";function sLe(e){return F(e.end_,e.start)}function lLe(e,t){return e.filter(r=>PP(r.start,sLe(r),t)).toSorted((r,n)=>r.start-n.start)}function uLe(e,t){return MP(e.start)||!IP(e.start,t)?e.title:OP(e.start)+" "+e.title}function cLe(e){let t=e.draggable,r=e.event,n=x7({id:r.key,disabled:!t}),i=t?uF(F(r.accent,cF))+" "+iLe:uF(F(r.accent,cF)),o=n.isDragging?i+" "+oLe:i,a=G(k7(n.transform),u=>({transform:u})),s=n.listeners,l=s==null?void 0:Gt(s);return b("button",{children:uLe(r,e.day),ref:Gt(n.setNodeRef),className:o,style:a,title:r.title,onKeyDown:u=>re(l,d=>E7(d,u)),onClick:u=>r.onOpen(),onPointerDown:u=>re(l,d=>w7(d,u))})}function dLe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,a=S7({id:o}),s=!i.unassigned&&a.isOver?Zx(n.length)+" "+tLe:Zx(n.length);return L("div",{children:[b("div",{children:i.label,className:i.unassigned?eLe:V7}),b("div",{children:n.map(l=>b("div",{children:lLe(i.events,l).map(u=>b(cLe,{event:u,day:l,draggable:t},u.key)),className:l===r?nLe:G7},l.toString())),ref:Gt(a.setNodeRef),className:s})],className:X4e})}function fLe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=de(()=>"Week"),a=o[1],s=o[0],l=de(()=>li(F(r,Date.now()))),u=l[1],d=l[0],f=li(Date.now()),h=De(t),p;p=s==="Week"?fl(7,x=>mo(Kg(d),x)):[li(d)];let m=x=>u(S=>s==="Week"?mo(S,x*7|0):mo(S,x)),g=x=>{let S=x.over;if(t===void 0||S==null||S.id==="")return;let E=i.find(k=>k.events.some(R=>R.key===x.active.id));if(fe(E,!0,k=>k.resourceId!==S.id))return t(x.active.id,S.id)},v=(x,S)=>b("button",{children:S,className:s===x?W4e:Df,onClick:E=>a(k=>x)}),_;return _=s==="Week"?lo(d):ms(d)+" — "+lo(d),L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:Df,onClick:x=>m(-1)}),b("button",{children:"Today",className:Df,onClick:x=>u(S=>f)}),b("button",{children:"›",className:Df,onClick:x=>m(1)}),b("span",{children:_,className:J4e})],className:lF}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:lF})],className:H4e}),b(y7,{onDragEnd:g,children:L("div",{children:[L("div",{children:[b("div",{children:"Resource",className:Z4e}),b("div",{children:p.map(x=>b("div",{children:ms(x),className:rLe},x.toString())),className:Zx(p.length)})],className:Y4e}),i.map(x=>b(dLe,{lane:x,days:p,today:f,draggable:h},x.unassigned?"\0unassigned":x.resourceId))],className:Q4e})}),n!==void 0?b("span",{children:n,className:aLe}):null],className:K4e})}let hLe=fLe;function K7(e,t){let r=C(C(C(H(e),o=>M(o,"properties")),H),o=>M(o,t));if(r===void 0)return;let n=C(C(H(r),o=>M(o,"const")),ce);if(n!==void 0)return n;let i=Fu(r);if(i!==void 0&&i.length===1)return i[0]}function H7(e){return e.filter(t=>t.level==="Instance")}function pLe(e,t,r){return t!==void 0&&Zo(e,t).length!==0?H7(r).some(n=>{let i=n.allowedStates;return i!==void 0?i.length!==0:!1}):!1}function mLe(e,t,r){let n=H7(r),i=Zo(e,t),o=l=>({commandName:l.name,label:l.label,toState:K7(l.schema,t)}),a=i.map(l=>{let u=ee(n,d=>{let f=d.allowedStates;if(f!==void 0&&f.includes(l))return o(d)});return{value:l,label:vt(l),terminal:u.length===0,outgoing:u}}),s=n.filter(l=>Wr(l.allowedStates)).map(o);return{statusField:t,states:a,anyState:s}}function _r(e){return"var("+e+")"}let gLe=w([z("flex"),ve("column"),c("gap",_r(I.md))]),vLe=w([c("font-size",_r($.sizeLg)),c("font-weight",_r($.weightMedium)),c("color",_r(y.textPrimary)),on(Re(0))]),_Le=w([c("font-size",_r($.sizeXs)),c("color",_r(y.textDisabled))]),bLe=w([z("flex"),c("flex-wrap","wrap"),X("flexStart"),c("gap",_r(I.md))]),yLe=w([z("flex"),ve("column"),c("gap",_r(I.sm)),c("flex","0 1 240px"),c("padding",_r(I.md)),c("background",_r(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",_r(Y.md))]),xLe=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",_r(I.sm))]),SLe=w([c("font-size",_r($.sizeXs)),c("color",_r(y.textDisabled)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),wLe=w([z("flex"),ve("column"),c("gap","4px")]),ELe=w([z("inlineFlex"),X("center"),c("gap","4px"),c("align-self","flex-start"),c("padding","2px var("+I.sm+")"),c("background",_r(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",_r(Y.sm)),c("font-size",_r($.sizeSm)),c("color",_r(y.textPrimary))]),kLe=w([c("color",_r(y.textSecondary))]),CLe=w([c("font-size",_r($.sizeXs)),c("color",_r(y.textDisabled))]),RLe=w([z("flex"),ve("column"),c("gap",_r(I.sm)),c("padding-top",_r(I.sm))]),ALe=w([c("font-size",_r($.sizeXs)),c("font-weight",_r($.weightMedium)),c("color",_r(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),TLe=w([z("flex"),c("flex-wrap","wrap"),c("gap","6px")]);function dF(e){let t=e.toState;return L("span",{children:[e.label,t!==void 0?b("span",{children:" → "+vt(t),className:kLe}):null],className:ELe},e.commandName)}function $Le(e){let t=e.title,r=e.statusField,n=mLe(e.schema,r,e.commands);return L("div",{children:[t!==void 0?b("h3",{children:t,className:vLe}):null,b("div",{children:"Lifecycle on “"+vt(r)+"”",className:_Le}),b("div",{children:n.states.map(i=>L("div",{children:[L("div",{children:[b(ds,{variant:"Neutral",label:i.label,dot:!0}),i.terminal?b("span",{children:"end",className:SLe}):null],className:xLe}),i.terminal?b("span",{children:"No commands available",className:CLe}):b("div",{children:i.outgoing.map(dF),className:wLe})],className:yLe},i.value)),className:bLe}),n.anyState.length!==0?L("div",{children:[b("span",{children:"Any state",className:ALe}),b("div",{children:n.anyState.map(dF),className:TLe})],className:RLe}):null],className:gLe})}let NLe=$Le;function DLe(e){switch(e){case"Hints":return"hints";case"DeclaredTarget":return"declared-target";case"SchemaTarget":return"schema-target";case"StemMatch":return"stem-match";case"Setter":return"setter"}}function FLe(e,t){return e+"→"+t}function Sk(e){return F(G(C(C(H(e),t=>M(t,"properties")),H),t=>Object.keys(t)),[])}function wk(e){return ee(F(C(C(H(e),t=>M(t,"required")),Vt),[]),ce).filter(t=>t!=="TAG")}function Vy(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9]+/g," ").toLowerCase().split(" ").filter(t=>t.length>=3)}function ILe(e,t,r){let n=Vy(e).concat(Vy(t)),i=Vy(r);return n.some(o=>i.some(a=>a.startsWith(o)?!0:o.startsWith(a)))}function PLe(e){return e.filter(t=>t.level==="Instance")}function Gy(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function OLe(e,t,r){return Sk(e.schema).includes(t)?Ye([[t,r]]):{}}function MLe(e,t){let r=e.filter(n=>Sk(n.schema).includes(t)?wk(n.schema).every(i=>i===t||i==="id"?!0:Ne(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function Ky(e){if(e.length===1)return e[0]}function Ek(e,t,r){let n=PLe(t),i=MLe(n,e);return(o,a)=>{let s=(h,p)=>{if(Gy(h,o))return{command:h.name,patch:OLe(h,e,a),tier:p}},l=C(C(C(r,h=>h[a]),h=>n.find(p=>p.name===h)),h=>s(h,"Hints"));if(l!==void 0)return l;let u=C(Ky(n.filter(h=>Gy(h,o)?Ne(h.targetState,a):!1)),h=>s(h,"DeclaredTarget"));if(u!==void 0)return u;let d=C(Ky(n.filter(h=>Gy(h,o)?Ne(K7(h.schema,e),a):!1)),h=>s(h,"SchemaTarget"));if(d!==void 0)return d;let f=C(Ky(n.filter(h=>{let p=h.allowedStates;return p!==void 0&&p.includes(o)?ILe(h.name,h.label,a):!1})),h=>s(h,"StemMatch"));return f!==void 0?f:C(i,h=>s(h,"Setter"))}}function LLe(e,t,r,n){let i=Ek(t,r,n),o=Zo(e,t),a={};return o.forEach(s=>{o.forEach(l=>{if(s!==l)return re(i(s,l),u=>{a[FLe(s,l)]=u})})}),a}let $u="resources",Nu="events";function zLe(e){return e.find(t=>Ne(t.role,$u))}function W7(e){return e.filter(t=>Ne(t.role,Nu))}function ULe(e,t){return e.toString()+"::"+t}function BLe(e){let t=e.indexOf("::");if(t!==-1)return G(SI(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function yf(e,t){return C(M(e,t),ce)}function jLe(e){let t=zLe(e),r=W7(e),n=t!==void 0?t.rows.map(d=>{let f=F(H(d),{}),h=F(yf(f,"id"),""),p=F(C(t.semantics.labelField,m=>yf(f,m)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>ee(d.rows,h=>{let p=F(H(h),{}),m=F(yf(p,"id"),""),g=d.semantics.dateSpan;if(g!==void 0)return G(C(Iu(g,p),qn),v=>{let _=C(RS(g,p),qn),x=F(C(d.semantics.labelField,A=>yf(p,A)),m),S=F(C(d.resourceRef,A=>yf(p,A)),""),E=ULe(f,m),k=d.accent;return[S,{key:E,title:x,start:v,end_:_,accent:k,onOpen:()=>d.onOpenRow(m,h)}]})})).flat(),a=d=>ee(o,f=>{if(d(f[0]))return f[1]}),s=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:a(h=>h===f)}}),l=a(d=>!i.includes(d)),u=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return s.concat(u)}function qLe(e){let t=e.sources,r=jLe(t),n=W7(t),o=n.some(l=>De(l.onCommand)&&De(l.assignCommand)?De(l.resourceRef):!1)?(l,u)=>re(BLe(l),d=>{let f=d[1];re(n[d[0]],h=>{let p=h.onCommand,m=h.assignCommand,g=h.resourceRef;if(p!==void 0&&m!==void 0&&g!==void 0)return p(m,f,Ye([[g,u]]))})}):void 0,a=nt(n,0,(l,u)=>l+u.rows.length|0),s=ZI(jw(t),a,void 0,"scheduled item");return b(hLe,{lanes:r,windowNote:s,onReassign:o})}let VLe=b("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),Ff="scheduler";function J7(e){return De(jn(e,void 0,void 0).dateSpan)?Dr(e).some(t=>De(ld(t[0]))):!1}function GLe(e,t,r){return r?!1:J7(t)}function Q7(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>Sk(i.schema).includes(t)?wk(i.schema).every(o=>o===t||o==="id"?!0:Ne(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function KLe(e,t,r){let n=r!==void 0?r:(o,a)=>{},i={};return ig().filter(o=>{let a=o.arity;return typeof a!="object"?!1:a.TAG!=="Multi"}).forEach(o=>{let a={},s={},l=(u,d,f)=>{let h=M(u,d);h!==void 0?h.push(f):u[d]=[f]};e.forEach(u=>{let d=C(t,p=>xi(p,u.name)),f=F(C(d,p=>p.canvas),o.label),h=C(d,p=>p.role);if(h!==void 0)return h===$u?l(a,f,u):h===Nu?re(C(d,p=>p.resourceRef),p=>l(s,f,[u,p])):void 0}),Pe(s).forEach(u=>{let d=u[0],f=F(M(a,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];u[1].forEach(m=>{i[m[0].name]={resource:p,resourceRef:m[1]}})})}),i}na({id:Ff,label:"Scheduler",icon:VLe,arity:{TAG:"Slots",_0:[{role:$u,min:1,max:1},{role:Nu,min:1}]},isCapable:(e,t)=>J7(e),render:e=>b(qLe,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function us(e){return"var("+e+")"}let qm=w([z("inlineFlex"),X("center"),c("gap","6px"),c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",us(Y.full)),c("padding","2px var("+I.sm+")"),c("color",us(y.textSecondary)),c("font-size",us($.sizeXs)),c("line-height","1.5")]),Hy=w([Ce("pointer"),je([c("background",us(y.surfaceSubtle)),c("color",us(y.textPrimary))])]),HLe=w([is(.6),Ce("notAllowed")]);function kk(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let WLe=kk(us(y.success)),JLe=kk(us(y.border)),QLe=kk(us(y.border)),YLe=FK([[0,[is(.4)]],[50,[is(1)]],[100,[is(.4)]]]),XLe=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",us(y.warning)),RK(YLe),AK({NAME:"ms",VAL:1200}),TK("infinite"),$K("easeInOut")]);function ZLe(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,a=n?i&&o?[qm+" "+Hy,XLe,"Reconnecting…"]:i?[qm+" "+Hy,WLe,"Live"]:[qm+" "+Hy,JLe,"Snapshot"]:[qm+" "+HLe,QLe,"Off"],s=n?u=>t():void 0,l=n?i&&o?"Live updates on — reconnecting to the server":i?"Live updates on — click for snapshot mode":"Snapshot mode — click for live updates":"Live updates disabled globally";return L("button",{children:[b("span",{className:a[1]}),a[2]],className:a[0],title:l,disabled:!n,type:"button",onClick:s})}let e8e=ZLe;function xf(e){return"var("+e+")"}let t8e=w([z("inlineFlex"),X("center"),c("gap","6px"),c("background",xf(y.brand)),c("color",xf(y.textOnBrand)),c("border","none"),c("border-radius",xf(Y.full)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",xf($.sizeSm)),c("font-weight",xf($.weightMedium)),Ce("pointer"),je([c("opacity","0.85")])]),r8e=w([z("flex"),X("center"),Xe("center"),c("padding","var("+I.xs+") 0")]);function n8e(e){let t=e.onClick,r=e.count,n=r===1?"1 new item — click to refresh":r.toString()+" new items — click to refresh";return b("div",{children:b("button",{children:n,className:t8e,type:"button",onClick:i=>t()}),className:r8e})}let i8e=n8e;function Y7(){try{return Wi(globalThis.localStorage)}catch{return}}let X7="reventless.live.";function fF(e){let t=Y7();if(t===void 0)return!1;try{let r=zt(t).getItem(X7+e);return r==null?!1:r==="true"}catch{return!1}}function o8e(e,t){let r=Y7();if(r!==void 0)try{zt(r).setItem(X7+e,t?"true":"false");return}catch{return}}function a8e(e){let t=de(()=>fF(e)),r=t[1],n=t[0];$e(()=>{r(o=>fF(e))},[e]);let i=tn(()=>{let o=!n;o8e(e,o),r(a=>o)},[n,e]);return[n,i]}function s8e(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function l8e(e){return s8e(e)}function Ck(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function Ao(e){return[e._0,Ck(e)]}function Z7(e,t){return EI(t,e,(r,n)=>n(r))}function To(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}function eU(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function u8e(e){return t=>{let r=Ao(t),n=r[0];return n>=e?To(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+eU(e.toString()),tl:r[1]}}}}function c8e(e){return t=>{let r=Ao(t),n=r[0];return n<=e?To(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+eU(e.toString()),tl:r[1]}}}}function d8e(e){let t=Ao(e),r=t[0];return isFinite(r)&&(r|0)===r?To(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}function Sg(e,t){let r=G(M(e,t),et);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function hF(e,t){let r=G(M(e,t),et);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function wg(e,t){let r=G(M(e,t),et);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function f8e(e){let t=wg(e,"format");if(wg(e,"x-reventless-format")==="cuid")return"Cuid";if(t!==void 0)switch(t){case"date-time":return"DateTime";case"email":return"Email";case"uri":return"Url";case"uuid":return"Uuid";default:return}}function pF(e){let t=Sg(e,"minLength"),r=Sg(e,"maxLength"),n=G(wg(e,"pattern"),a=>new RegExp(a)),i=f8e(e),o=wg(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function mF(e,t){let r=hF(e,"minimum"),n=hF(e,"maximum");return{min:r,max:n,integer:t}}function h8e(e){let t=Sg(e,"minItems"),r=Sg(e,"maxItems");return{minItems:t,maxItems:r}}function s_(e){if(typeof e!="object")return!1;switch(e.TAG){case"TextField":case"NumberField":return e.required;case"EnumField":return e.required;case"RefField":return e.required;case"ItemsField":return e.required}}function tU(e){let t=e.indexOf("[]");if(t===-1)return;let r=e.slice(0,t),n=e.slice(t+2|0),i=n.startsWith(".")?n.slice(1):n;if(!(r===""||i===""||i.includes("[]")))return[r,i]}function rU(e){return C(M(e,"items"),t=>{let r=C(H(t),n=>M(n,"type"));if(r!==void 0&&Ne(ce(r),"object"))return t})}function Rk(e,t){let r=t!==void 0?t:[],n={},i={};r.forEach(f=>{let h=tU(f.propertyKey);if(h!==void 0){let p=h[0],m=F(M(i,p),[]);m.push({propertyKey:h[1],queryField:f.queryField,singleQueryField:f.singleQueryField,labelField:f.labelField,multi:f.multi,required:f.required,entityName:f.entityName,entityNamePlural:f.entityNamePlural}),i[p]=m;return}n[f.propertyKey]=f});let o=et(e);if(typeof o!="object")return[];if(o.TAG!=="JSONObject")return[];let a=o._0,s=M(a,"required"),l;if(s!==void 0){let f=et(s);l=typeof f!="object"?[]:f.TAG==="JSONArray"?ee(f._0,h=>{let p=et(h);if(!(typeof p!="object"||p.TAG!=="JSONString"))return p._0}):[]}else l=[];let u=M(a,"properties");if(u===void 0)return[];let d=et(u);return typeof d!="object"?[]:d.TAG==="JSONObject"?ee(Pe(d._0),f=>{let h=f[1],p=f[0],m=et(h);if(typeof m!="object"||m.TAG!=="JSONObject")return;let g=m._0;if(De(M(g,"const")))return;let v=M(g,"type"),_;if(v!==void 0){let A=et(v);_=typeof A!="object"||A.TAG!=="JSONString"?"string":A._0}else _="string";let x=l.some(A=>A===p),S=M(n,p),E;if(S!==void 0)E=S.multi?S.entityNamePlural:S.entityName;else{let A=M(g,"title");if(A!==void 0){let N=et(A);E=typeof N!="object"||N.TAG!=="JSONString"?vt(p):N._0}else E=vt(p)}let k=M(g,"enum"),R;if(k!==void 0){let A=et(k);R=typeof A!="object"||A.TAG!=="JSONArray"?void 0:ee(A._0,N=>{let P=et(N);if(!(typeof P!="object"||P.TAG!=="JSONString"))return P._0})}else R=void 0;let T;if(S!==void 0)T={TAG:"RefField",queryField:S.queryField,singleQueryField:S.singleQueryField,labelField:S.labelField,multi:S.multi,required:x,constraints:S.multi?h8e(g):{}};else if(_==="boolean")T="BoolField";else if(R!==void 0)T={TAG:"EnumField",options:R,required:x};else switch(_){case"array":let A=rU(g);T=A!==void 0?{TAG:"ItemsField",itemSchema:A,itemRefFields:F(M(i,p),[]),required:x}:{TAG:"TextField",required:x,constraints:pF(g)};break;case"integer":T={TAG:"NumberField",required:x,constraints:mF(g,!0)};break;case"number":T={TAG:"NumberField",required:x,constraints:mF(g,!1)};break;default:T={TAG:"TextField",required:x,constraints:pF(g)}}return G(T,A=>({key:p,label:E,fieldType:A,propSchema:h}))}):[]}function Ak(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;if(typeof n!="object")i="false";else switch(n.TAG){case"EnumField":i=F(n.options[0],"");break;case"ItemsField":i="[]";break;default:i=""}t[r.key]=i}),t}function p8e(e){return F(C(C(H(e),t=>M(t,"properties")),H),{})}function nU(e,t){return C(G(M(e,t),cn),H)}function m8e(e,t){return F(C(C(nU(e,t),r=>M(r,"type")),ce),"string")}function g8e(e,t){return De(C(C(nU(e,t),r=>M(r,"enum")),Vt))}function v8e(e,t,r){let n=t!==void 0?t:!1,i=0,o=0,a=0;if(r===""){if(n)return null;a=3}else a=3;if(a===3)switch(e){case"array":if(r==="")return[];try{return JSON.parse(r)}catch{return[r]}case"boolean":case"integer":case"number":case"object":o=2;break;default:i=1}if(o===2){if(r==="")return null;i=1}if(i===1){let s=0;switch(e){case"boolean":return r==="true";case"integer":case"number":s=2;break;case"object":try{return JSON.parse(r)}catch{return null}default:return r}if(s===2)return F(G(fs(r),l=>l),r)}}function l_(e,t){let r=p8e(e),n=EL(e),i=a=>n!==void 0?!n.includes(a):!1,o={};return Pe(t).forEach(a=>{let s=a[1],l=a[0],u=m8e(r,l),d=g8e(r,l);if(!(s===""&&i(l)&&(d||u!=="string"))){o[l]=v8e(u,d,s);return}}),o}function _8e(e){let t=et(e);if(typeof t!="object")switch(t){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return""}else switch(t.TAG){case"JSONString":return t._0;case"JSONNumber":return t._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function iU(e){let t={};return re(H(e),r=>{Pe(r).forEach(n=>{t[n[0]]=_8e(n[1])})}),t}let b8e="Must not be empty";function y8e(e){let t=Ao(e),r=t[0];return r.length>0?To(e):{TAG:"Invalid",_0:r,_1:{hd:b8e,tl:t[1]}}}let x8e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function S8e(e){let t=Ao(e),r=t[0];return x8e.exec(r)!==null?To(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function w8e(e){let t=Ao(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?To(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let E8e=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function k8e(e){let t=Ao(e),r=t[0];return E8e.exec(r)!==null?To(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let C8e=/^c[a-z0-9]{23,24}$/;function R8e(e){let t=Ao(e),r=t[0];return C8e.exec(r)!==null?To(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function A8e(e){let t=Ao(e),r=t[0],n=Date.parse(r);return Number.isNaN(n)?{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid ISO 8601 date-time",tl:t[1]}}:To(e)}function T8e(e){return t=>{let r=Ao(t),n=r[0];return n.length>=e?To(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function $8e(e){return t=>{let r=Ao(t),n=r[0];return n.length<=e?To(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function N8e(e,t){return r=>{let n=Ao(r),i=n[0];return e.exec(i)!==null?To(r):{TAG:"Invalid",_0:i,_1:{hd:F(t,"Does not match the required pattern"),tl:n[1]}}}}function Tk(e){let t=Ck(e);if(t!==0)return t.hd}function D8e(e){switch(e){case"Email":return S8e;case"Url":return w8e;case"Uuid":return k8e;case"Cuid":return R8e;case"DateTime":return A8e}}function F8e(e,t,r){if(e==="")return t?y8e({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return re(r.minLength,i=>{n.push(T8e(i))}),re(r.maxLength,i=>{n.push($8e(i))}),re(r.format,i=>{n.push(D8e(i))}),re(r.pattern,i=>{n.push(N8e(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:Z7({TAG:"Pending",_0:e},$g(n))}function I8e(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=fs(e);if(n===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Must be a number",tl:0}};let i=[];F(r.integer,!1)&&i.push(d8e),re(r.min,s=>{i.push(u8e(s))}),re(r.max,s=>{i.push(c8e(s))});let o=Z7({TAG:"Pending",_0:n},$g(i)),a=Ck(o);return a!==0?{TAG:"Invalid",_0:e,_1:a}:{TAG:"Valid",_0:e}}function P8e(e,t,r){let i=Nf(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return re(r.maxItems,s=>{if(i>s){o.contents={hd:"Select at most "+s.toString()+" items",tl:o.contents};return}}),re(r.minItems,s=>{if(i<s&&(t||i>0)){o.contents={hd:"Select at least "+s.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function gF(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function $k(e,t){let r=e.propSchema;if(r!==void 0&&Doe(e.key,r)){let i=s_(e.fieldType),o=Ioe(e.key,r,t,i);return o!==void 0?{TAG:"Invalid",_0:t,_1:{hd:o,tl:0}}:{TAG:"Valid",_0:t}}let n=e.fieldType;if(typeof n!="object")return{TAG:"Valid",_0:t};switch(n.TAG){case"TextField":return F8e(t,n.required,n.constraints);case"NumberField":return I8e(t,n.required,n.constraints);case"EnumField":return gF(t,n.required);case"RefField":return n.multi?P8e(t,n.required,n.constraints):gF(t,n.required);case"ItemsField":return O8e(t,n.required,n.itemSchema,n.itemRefFields)}}function O8e(e,t,r,n){let i;if(e==="")i=[];else try{i=Vt(JSON.parse(e))}catch{i=void 0}if(i===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Not a valid list",tl:0}};if(i.length===0)return t?{TAG:"Invalid",_0:e,_1:{hd:"Add at least one row",tl:0}}:{TAG:"Valid",_0:e};let o=Rk(r,n),a=ee(i.map((s,l)=>{let u=iU(s);return ee(o,d=>G(Tk($k(d,F(M(u,d.key),""))),f=>"Row "+(l+1|0).toString()+": "+f))[0]}),s=>s);return a.length!==0?{TAG:"Invalid",_0:e,_1:$g(a)}:{TAG:"Valid",_0:e}}function Wt(e){return"var("+e+")"}let M8e=w([z("flex"),ve("column"),c("gap",Wt(I.md))]),L8e=w([z("flex"),ve("column"),c("gap","4px")]),oU=w([c("color",Wt(y.textSecondary)),c("font-size",Wt($.sizeSm)),c("font-weight",Wt($.weightMedium))]),z8e=w([c("color",Wt(y.error)),Wh(Re(2))]),vF=w([c("background",Wt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Wt(Y.sm)),c("padding","var("+I.xs+") var("+I.sm+")"),c("font-size",Wt($.sizeMd)),c("color",Wt(y.textPrimary)),c("outline","none"),Xo({NAME:"percent",VAL:100}),c("transition","border-color 120ms, box-shadow 120ms"),ws([c("border-color",Wt(y.brand))])]),U8e=w([c("border-color",Wt(y.error)),ws([c("border-color",Wt(y.error)),c("box-shadow","0 0 0 2px color-mix(in srgb, var("+y.error+") 25%, transparent)")])]),B8e=w([c("color",Wt(y.error)),c("font-size",Wt($.sizeXs)),c("min-height","1.1em"),c("line-height","1.1"),Yo(Re(2))]),j8e=w([Ce("pointer"),WI(Re(6))]),_F=w([c("background",Wt(y.brand)),c("color",Wt(y.textOnBrand)),c("border","none"),c("border-radius",Wt(Y.sm)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",Wt($.sizeMd)),Ce("pointer"),KI("flexStart"),c("transition","opacity 120ms")]),q8e=w([is(.5),Ce("notAllowed")]),V8e=w([z("flex"),ve("column"),c("gap",Wt(I.sm)),c("border","1px solid var("+y.border+")"),c("border-radius",Wt(Y.sm)),c("padding",Wt(I.sm))]),G8e=w([c("color",Wt(y.textSecondary)),c("font-size",Wt($.sizeSm))]),K8e=w([z("flex"),X("flexStart"),c("gap",Wt(I.sm)),c("padding-bottom",Wt(I.sm)),c("border-bottom","1px solid var("+y.border+")")]),H8e=w([z("flex"),ei("wrap"),c("gap",Wt(I.sm)),Vn(1),SS(Re(0))]),bF=w([c("background",Wt(y.surface)),c("color",Wt(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",Wt(Y.sm)),c("padding","var("+I.xs+") var("+I.sm+")"),c("font-size",Wt($.sizeSm)),Ce("pointer")]),W8e=w([c("margin-top","1.4em")]),J8e=w([KI("flexStart")]);function aU(e){let t=e.error;return L("div",{children:[L("label",{children:[e.label,e.required?b("span",{children:"*",className:z8e}):null],className:oU}),e.children,b("div",{children:t!==void 0?t:null,className:B8e})],className:L8e})}function sU(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.field,s=r!==void 0?r:!1,l=t!==void 0?t:!1,u=s_(a.fieldType),d=s?vF+" "+U8e:vF,f=g=>n(a.key),h=a.propSchema,p=h!==void 0?Foe(a.key,h,o,g=>i(a.key,g),()=>n(a.key),u,s):void 0;if(p!==void 0)return p;let m=a.fieldType;if(typeof m!="object")return L("label",{children:[b("input",{className:j8e,checked:o==="true",type:"checkbox",onBlur:f,onChange:g=>i(a.key,g.target.checked?"true":"false")}),"Enabled"],className:oU});switch(m.TAG){case"TextField":let g=m.constraints.format,v;if(g!==void 0)switch(g){case"Email":v="email";break;case"Url":v="url";break;default:v="text"}else v="text";return b("input",{className:d,autoFocus:l,type:v,value:o,onBlur:f,onChange:_=>i(a.key,_.target.value)});case"NumberField":return b("input",{className:d,autoFocus:l,type:"number",value:o,onBlur:f,onChange:_=>i(a.key,_.target.value)});case"EnumField":return b("select",{children:m.options.map(_=>b("option",{children:_,value:_},_)),className:d,value:o,onBlur:f,onChange:_=>i(a.key,_.target.value)});case"RefField":return b(U4e,{fieldKey:a.key,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:m.multi,required:m.required,value:o,onChange:i,onBlur:()=>n(a.key),hasError:s,autoFocus:l});case"ItemsField":return b("input",{className:d,autoFocus:l,type:"text",value:o,onBlur:f,onChange:_=>i(a.key,_.target.value)})}}function Q8e(e,t){let r=Ak(t),n;if(e==="")n=[];else{let i;try{i=Vt(JSON.parse(e))}catch{i=void 0}n=i!==void 0?i:[]}return n.map(i=>{let o=Ye(Pe(r));return Pe(iU(i)).forEach(a=>{o[a[0]]=a[1]}),o})}function Y8e(e,t){return JSON.stringify(e.map(r=>l_(t,r)))}function X8e(e){let t=e.showError,r=e.onBlur,n=e.onChange,i=e.itemRefFields,o=e.itemSchema,a=e.fieldKey,s=Nt(()=>Rk(o,i),[o,i]),l=Q8e(e.value,s),u=f=>n(a,Y8e(f,o)),d=f=>u(l.concat([Ak(s)]));return L("div",{children:[l.length===0?b("div",{children:"No rows yet.",className:G8e}):null,l.map((f,h)=>L("div",{children:[b("div",{children:s.map(p=>{let m=F(M(f,p.key),""),g=t?Tk($k(p,m)):void 0;return b(aU,{label:p.label,required:s_(p.fieldType),error:g,children:b(sU,{field:p,value:m,onChange:(v,_)=>u(l.map((x,S)=>{if(S!==h)return x;let E=Ye(Pe(x));return E[v]=_,E})),onBlur:v=>r(a),hasError:De(g)})},p.key)}),className:H8e}),b("button",{children:"Remove","aria-label":"Remove row "+(h+1|0).toString(),className:bF+" "+W8e,type:"button",onClick:p=>u(l.filter((m,g)=>g!==h))})],className:K8e},h.toString())),b("button",{children:"Add row",className:bF+" "+J8e,type:"button",onClick:d})],className:V8e})}function Z8e(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,a=e.value,s=e.field,l=r!==void 0?r:!1,u=t!==void 0?t:!1,d=s_(s.fieldType),f=l&&De(n),h=s.fieldType,p,m=0;return typeof h!="object"||h.TAG!=="ItemsField"?m=1:p=b(X8e,{fieldKey:s.key,itemSchema:h.itemSchema,itemRefFields:h.itemRefFields,value:a,onChange:o,onBlur:i,showError:l}),m===1&&(p=b(sU,{field:s,value:a,onChange:o,onBlur:i,hasError:f,autoFocus:u})),b(aU,{label:s.label,required:d,error:f?n:void 0,children:p})}function e5e(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,a=n!==void 0?n:"Submit",s=t!==void 0?t:[],l=Nt(()=>Rk(o,s),[o,s]),u=de(()=>{let P=Ak(l);return re(r,O=>{Pe(O).forEach(D=>{P[D[0]]=D[1]})}),P}),d=u[1],f=u[0],h=de(()=>({})),p=h[1],m=h[0],g=de(()=>!1),v=g[1],_=g[0],x=Nt(()=>l.map(P=>{let O=F(M(f,P.key),"");return[P.key,$k(P,O)]}),[l,f]),S=x.every(P=>l8e(P[1])),E={};x.forEach(P=>{let O=Tk(P[1]);if(O!==void 0){E[P[0]]=O;return}});let k=(P,O)=>d(D=>{let U=Ye(Pe(D));return U[P]=O,U}),R=P=>p(O=>{let D=Ye(Pe(O));return D[P]=!0,D}),T=P=>{if(P.preventDefault(),v(O=>!0),S)return i(f)},A=_&&!S,N=A?_F+" "+q8e:_F;return L("form",{children:[l.map((P,O)=>{let D=F(M(m,P.key),!1);return b(Z8e,{field:P,value:F(M(f,P.key),""),onChange:k,onBlur:R,errorMessage:M(E,P.key),showError:D||_,autoFocus:O===0},P.key)}),b("button",{children:a,className:N,disabled:A,type:"submit"})],className:M8e,noValidate:!0,onSubmit:T})}let t5e=e5e;function r5e(e){return"var("+e+")"}let n5e=w([z("flex"),ve("column"),c("gap",r5e(I.md))]);function i5e(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.ownerValue,o=e.ownerField,a=e.injectNewId,s=e.aggregateIdField,l=e.aggregateId,u=e.schema,d=a!==void 0?a:!1,f=n!==void 0?n:[],h=t!==void 0?t:"Submit",p=de(()=>{}),m=p[1],g=de(()=>!1),v=g[1],x=de(()=>crypto.randomUUID())[0],S=Fe(Ib("FormOpened")),E=Nt(()=>({armed:S}),[]),k=o!==void 0&&i!==void 0?[o,i]:void 0,R=P=>{let O=Ye(Pe(P));re(k,D=>{O[D[0]]=D[1]}),re(l,D=>{O[F(s,"id")]=D}),d&&(O[F(s,"id")]=x),v(D=>!0),m(D=>{}),S.current=Ib("SubmitStarted"),r(O).then(D=>{if(v(U=>!1),typeof D=="object"){let U=D._0;S.current=Ib("SubmitFailed"),m(B=>U)}return Promise.resolve()})},A=ee([l!==void 0?s!==void 0||d?s:void 0:d?s:void 0,G(k,P=>P[0])],P=>P),N=A.length===0?u:F(G(H(u),P=>{let O=Ye(Pe(P));return re(C(M(O,"properties"),H),D=>{let U=Ye(Pe(D).filter(B=>!A.includes(B[0])));O.properties=U}),O}),u);return b(L_e.make,{session:E,children:L("div",{children:[fe(p[0],null,P=>b(nk,{variant:"Error",message:P})),g[0]?b(Zf,{label:"Submitting..."}):null,b(t5e,{schema:N,onSubmit:R,submitLabel:h,initialValues:e.initialValues,refFields:f})],className:n5e})})}let Nk=i5e;function o5e(e){let t={},r=e.startsWith("?")?e.slice(1):e;return r===""||r.split("&").forEach(n=>{let i=n.split("="),o=i.length;if(!(o>=3))switch(o){case 0:return;case 1:let a=i[0];if(a!==""){t[decodeURIComponent(a)]="";return}else return;case 2:let s=i[0],l=i[1];if(s!==""){t[decodeURIComponent(s)]=decodeURIComponent(l);return}else return}}),t}function a5e(e,t){return e===t?0:e<t?-1:1}function lU(e){let t=Pe(e).filter(r=>r[1]!=="").toSorted((r,n)=>a5e(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function s5e(e){if(e.path===0)return"/";let r=[];return ej(e.path,n=>{r.push(n)}),"/"+r.join("/")}function yF(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=Pe(e).filter(o=>{let a=o[0];return r.includes(a)?!1:!n.some(s=>s[0]===a)});return Ye(i.concat(n))}function l5e(){let e=zB(),t=o5e(e.search),r=s5e(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let u=lU(l);cs(r+u+n)};return{params:t,get:l=>M(t,l),set:(l,u)=>i(yF(t,[[l,u]])),setMany:l=>i(yF(t,l))}}function yo(e){return"var("+e+")"}let u5e=w([z("flex"),ve("column"),X("center"),Xe("center"),c("gap",yo(I.md)),Vn(1),c("min-height","160px"),Fa("center"),c("padding",yo(I.lg))]),c5e=w([c("font-size","32px"),c("color",yo(y.warning)),c("line-height","1")]),d5e=w([c("color",yo(y.textPrimary)),c("font-size",yo($.sizeLg)),c("font-weight",yo($.weightMedium)),on(Re(0))]),f5e=w([c("color",yo(y.textSecondary)),c("font-size",yo($.sizeSm)),c("line-height",yo($.lineHeightNormal)),c("max-width","440px"),on(Re(0))]),h5e=w([c("background","transparent"),c("color",yo(y.textSecondary)),c("border","1px solid var("+y.border+")"),c("border-radius",yo(Y.md)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",yo($.sizeSm)),c("cursor","pointer"),Yo(Re(4))]);function p5e(e){let t=e.title,r=t!==void 0?t:"Unavailable";return L("div",{children:[b("div",{children:"( ! )",className:c5e}),b("h3",{children:r,className:d5e}),b("p",{children:e.detail,className:f5e}),fe(e.onRetry,null,n=>b("button",{children:"Try again",className:h5e,onClick:i=>n()}))],className:u5e})}let p0=p5e;function Dk(e){return fe(C(C(H(e),t=>M(t,"properties")),H),[],Pe)}function m5e(e,t){return G(Dk(e).find(r=>r[0]===t),r=>r[1])}function Fk(e){if(e.length===1)return Gt(e[0])}function g5e(e,t){return wk(e.schema).every(r=>r===t||r==="id"?!0:Ne(r,e.aggregateIdField))}function eS(e,t){return G(Fk(Dk(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function xF(e,t,r){return Fk(ee(e,n=>C(eS(n,r),i=>{if(g5e(n,i))return{command:n,argument:i,tier:t}})))}function uU(e,t){return Ne(Ta(e).storeTarget,t)}function v5e(e,t,r,n){let i=t.field;return i!==void 0?Dk(e.schema).some(o=>o[0]===i)?i:void 0:Aa(C(n,o=>eS(e,(a,s)=>uU(s,o))),eS(e,(o,a)=>o===r))}let SF={contents:[]};function wF(e,t,r){let n=e+"."+t.command+"."+F(t.field,"")+"."+r;if(!SF.contents.some(i=>i===n)){SF.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function _5e(e,t,r,n){let i=Fk(e.filter(o=>o.name===t.command));if(i!==void 0){let o=v5e(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};wF(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}wF(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function cU(e,t,r){return C(m5e(e,t),n=>{let i=Ta(n),o=i.storeTarget,a=r.filter(u=>u.level==="Instance"),s=i.setter;if(s!==void 0)return _5e(a,s,t,o);let l=C(o,u=>xF(a,"StoreMatch",(d,f)=>uU(f,u)));return l!==void 0?l:xF(a,"NameMatch",(u,d)=>u===t)})}function dU(e,t){let r=e.requiredRole;return r!==void 0?t.includes(r):!0}function u_(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||De(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||De(e.index)||e.scanSort;return{filter:t,sort:r}}function EF(e){return u_(e.ann)}function fU(e){let t=De(BH(e)),r=Vg(e).length!==0,n=ES(e).length!==0;return{search:t||r||n}}function tS(e){let r=F(G(C(C(H(e),a=>M(a,"properties")),H),Pe),[]).map(a=>u_(Ta(a[1]))),n=r.some(a=>a.filter),i=r.some(a=>a.sort),o=fU(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function kF(e,t){let r={},n={};return Pe(e).forEach(i=>{let o=i[1];if(o==="")return;let a=i[0],s=t.find(l=>l.key===a);if(s!==void 0){u_(s.ann).filter?r[a]=o:n[a]=o;return}n[a]=o}),[r,n]}function CF(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?u_(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function b5e(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),Pe(e).forEach(o=>{let a=o[1],s=o[0],l=n.find(f=>f.key===s),u=G(l,f=>f.kind),d;if(u!==void 0&&typeof u!="object")switch(u){case"KBoolean":d=a==="true";break;case"KNumber":d=F(G(fs(a),f=>f),a);break;default:d=a}else d=a;i[s+"Eq"]=d}),Pe(i).length!==0)return i}function y5e(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return Ye([["field",e._0],["direction",t]])}function x5e(e){let t=e.resource,r=Ru(t,void 0),n=t.name,i=r.rows,o=t.schema,a=e.resourceSemantics,s=w0(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:a,window:s,onOpenRow:(A,N)=>{},role:$u},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,m=e.eventSemantics,g=e.eventAccent,v=e.eventWindow,_=e.onOpenEvent,x=e.onCommand,S=Nu,E=e.resourceRef,k=e.assignCommand,R={readModelName:f,rows:h,schema:p,semantics:m,accent:g,window:v,onOpenRow:_,onCommand:x,role:S,resourceRef:E,assignCommand:k},T=r.fetchState;return typeof T!="object"?T==="Loading"?b(Zf,{}):e.mode.render([d,R]):T.TAG==="Error"?b(Js,{detail:T._0,onRetry:()=>r.refetch()}):b(p0,{detail:T._0,onRetry:()=>r.refetch()})}let S5e=x5e,hU=ar(void 0),w5e=hU.Provider;function E5e(e){return br(w5e,{value:e.refresh,children:e.children})}let RF={make:E5e};function k5e(){return At(hU)}function C5e(e){try{return Wi(localStorage.getItem(e))}catch{return}}function R5e(e,t){try{return localStorage.setItem(e,t)}catch{return}}function gr(e){return"var("+e+")"}let Wy=w([z("flex"),ve("column"),c("gap",gr(I.lg))]),AF=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",gr(I.md)),c("margin-bottom",gr(I.sm))]),TF=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",gr(I.md)),c("flex-wrap","wrap"),Vn(1),c("min-width","0")]),A5e=w([c("font-size",gr($.sizeXl)),c("font-weight",gr($.weightMedium)),c("color",gr(y.textPrimary)),on(Re(0)),c("white-space","nowrap"),c("overflow","hidden"),c("text-overflow","ellipsis")]),T5e=w([z("flex"),X("center"),c("flex-wrap","wrap"),c("gap",gr(I.sm))]),$5e=w([z("flex"),ve("column"),c("gap",gr(I.lg))]),N5e=w([z("flex"),ve("column"),c("gap",gr(I.sm))]),D5e=w([c("font-size",gr($.sizeSm)),c("font-weight",gr($.weightMedium)),c("color",gr(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),on(Re(0))]),F5e=w([c("background",gr(y.brand)),c("color",gr(y.textOnBrand)),c("border","none"),c("border-radius",gr(Y.md)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",gr($.sizeSm)),c("cursor","pointer")]),I5e=w([z("inlineFlex"),X("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","0"),c("color",gr(y.brand)),c("font-size",gr($.sizeSm)),Ce("pointer"),c("text-decoration","none"),je([c("text-decoration","underline")])]),P5e=w([z("flex"),X("center"),Xe("flexEnd"),c("gap",gr(I.xs)),c("padding-top",gr(I.sm))]),$F=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",gr(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",gr(y.textSecondary)),c("font-size",gr($.sizeSm)),Ce("pointer"),je([c("background",gr(y.surfaceSubtle)),c("color",gr(y.textPrimary))]),QI([c("opacity","0.4"),Ce("notAllowed")])]);function O5e(e,t,r){return t!==void 0&&t!==""?[["before",t],["last",r]]:e!==void 0?e!==""?[["first",r],["after",e]]:[["first",r]]:[["first",r]]}let NF={contents:[]},DF={contents:[]};function M5e(e,t,r){let n=F(e,"<no-plugin>")+"."+t+"."+r;if(!NF.contents.some(i=>i===n)){NF.contents.push(n),console.warn("[AutoUI] Read model "+t+' declared statusField="'+r+`" but the list-view rows don't include that field; per-row command filtering is disabled.`);return}}function L5e(e,t,r){let n=F(e,"<no-plugin>")+"."+t;if(!DF.contents.some(i=>i===n)){DF.contents.push(n),console.warn("[AutoUI] Read model "+t+' statusField="'+r+'" value is neither a string nor a TAG-shaped object; per-row command filter cannot match against allowedStates.');return}}let FF={contents:[]};function z5e(e,t){let r=F(e,"<no-plugin>")+"."+t;if(!FF.contents.some(n=>n===r)){FF.contents.push(r),console.warn("[AutoUI] Read model "+t+" produced duplicate row keys — row identity is ambiguous and row clicks may open the wrong row. Give each row a unique id, or annotate the distinguishing field with @subId.");return}}function U5e(e){let t=e.rowActions,r=e.schedulerJoin,n=e.uiHints,i=e.liveOffered,o=e.sortKeyField,a=e.byIdsQueryDocument,s=e.byIdsQueryField,l=e.detailQueryDocument,u=e.singleQueryField,d=e.drillPath,f=e.openRowId,h=e.pluginId,p=e.detailView,m=e.rows,g=e.readModel,v=d!==void 0?d:[],_=i!==void 0?i:!0,x=t!==void 0?t:[],S=hi(),E=dp(),k=vp(),R=de(()=>{}),T=R[1],A=de(()=>{}),N=A[1],P=A[0],O=de(()=>({})),D=O[1],U=O[0],B=de(()=>"Loaded"),q=B[1],Q=B[0],J=de(()=>{}),te=J[1],ae=J[0],Z=yv(),W=fe(Z,!1,j=>j.isLive(g.queryField)),le=a8e(F(h,"default")+"."+g.name),oe=le[0],be=W&&_&&oe,ue=C(n,j=>xi(j,g.name)),xe=pL(g.schema,ue),ot=fe(C(ue,j=>j.suppress),!1,j=>j.includes(Ff)),rr;if(r!==void 0&&GLe(!0,g.schema,ot)){let j=sL(Ff);rr=j!==void 0&&!xe.some(he=>he.id===j.id)?xe.concat([j]):xe}else rr=xe;let It=uL(h,g.name,void 0),mi=de(()=>qw(It)),Gn=mi[1],sa=j=>{lL(It,j),Gn(he=>j)},Yt=mL(mi[0],ue,uP(g.schema),rr),Nn=r!==void 0&&Yt!==void 0?Yt.id===Ff:!1,dn=De(p)&&!Nn,Ze="reventless.layout."+F(h,"default")+"."+g.name,pe=de(()=>C5e(Ze)),Ie=pe[1],ze=Vae(pe[0],ue,GH(g.schema),dn),Qe=Z!==void 0&&be?Z.statusFor(Z.apiForReadModel(g.queryField))!=="Open":!1,Sr=be&&!Qe,K=de(()=>0),ye=K[1],He=K[0],Ee=Fe({}),we=Fe(void 0),lt=Fe(Qa.make()),ft=Fe(Qa.make()),bt=Fe(Ac.make()),wt=Fe(Ac.make()),Xt=Fe(new Map),Kt=j=>{Xt.current.set(j,Date.now())},Et=j=>{let he=Xt.current.get(j);return he!==void 0?Date.now()-he<6e4:!1},mt=l5e(),Tr=lU(mt.params),la=Cl(),ti=G(h,j=>Ya(Bs(j,g.name))+Tr),fn=kS(g.schema),ri=j=>G(C(M(j,"id"),ce),he=>{let ge=C(fn,ke=>C(M(j,ke),ce));return ge!==void 0?GMe(he,ge):he}),eo=j=>fn!==void 0?tF(j)[0]:j,Zt=j=>{if(fn===void 0)return Ye([["id",j]]);let he=tF(j),ge=he[1],ke=he[0];return Ye(ge!==void 0?[["id",ke],["subId",ge]]:[["id",ke]])},at=f!==void 0?f:P,Pt=j=>h!==void 0?la(ps(h,g.name,j,[])+Tr):N(he=>j),Br=()=>ti!==void 0?la(ti):N(j=>{}),jr=tS(g.schema),Fr=fU(g.schema),an=jr.hasFilter||jr.hasSort||jr.hasSearch,Ir=Mo(g.schema,void 0),pr=[];Pe(mt.params).forEach(j=>{let he=j[1];if(he==="")return;let ge=j[0];if(ge==="after"||ge==="before"){pr.push(ge+"="+he);return}if(!an)return;if(ge==="sort"||ge==="dir"){pr.push(ge+"="+he);return}if(ge==="q"&&Fr.search){pr.push(ge+"="+he);return}if(!ge.startsWith("f."))return;let ke=ge.slice(2);if(fe(Ir.find(Je=>Je.key===ke),!1,Je=>EF(Je).filter)){pr.push(ge+"="+he);return}});let to=pr.toSorted((j,he)=>j===he?0:j<he?-1:1).join("|"),Kn={};if(an){let j={};Pe(mt.params).forEach(hn=>{let nr=hn[0];if(nr.startsWith("f.")){j[nr.slice(2)]=hn[1];return}});let he=kF(j,Ir),ge=F(mt.get("q"),""),ke=b5e(he[0],ge,Fr,Ir),Je=mt.get("dir")==="desc"?"Desc":"Asc",kt=CF(mt.get("sort"),Je,Ir),er=y5e(kt);re(ke,hn=>{Kn.filter=hn}),re(er,hn=>{Kn.orderBy=hn})}O5e(mt.get("after"),mt.get("before"),uve).forEach(j=>{Kn[j[0]]=j[1]});let Dn=U8(g,Kn,to,void 0,()=>D(j=>({})),void 0),sr=Dn.refetch,sn=Dn.fetchState,ut=Dn.pageInfo,Fn=Dn.setRows,gi=Dn.rows,Bk=(j,he,ge)=>E!==void 0?()=>E(j,Zt(ge)).then(ke=>[ke.data,CL(ke,he)]):S!==void 0?()=>S(j,Zt(ge)).then(ke=>[ke,void 0]):void 0,Wd=j=>{if(l===void 0||u===void 0)return;let he=Bk(l,u,j);if(he!==void 0){q(ge=>"Loading"),$t(he().then(ge=>{let ke=ge[1],We=C(H(ge[0]),kt=>M(kt,u)),Je=0;return ke!==void 0||We===void 0||et(We)==="JSONNull"?Je=1:(D(kt=>{let er=Ye(Pe(kt));return er[j]=We,er}),q(kt=>"Loaded")),Je===1&&(D(kt=>Ye(Pe(kt).filter(er=>er[0]!==j))),q(kt=>ke!==void 0?{TAG:"Refused",_0:ke.message}:{TAG:"Error",_0:"Detail not found"})),Promise.resolve()}),ge=>(q(ke=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}},Dp=()=>{if(re(at,Wd),!Sr)return sr()};$e(()=>{let j=f!==void 0?f:P;j!==void 0&&(Wr(M(U,j))?Wd(j):q(he=>"Loaded"))},[f,P]);let Ii=Ia(),f_=Dg(),Jd=yk(),h_=fe(C(La(),j=>j.identity),[],j=>j.groups),ec=(j,he)=>G(Du(cU(g.schema,he,g.commands),ge=>dU(ge.command,h_)),ge=>(()=>T(ke=>({command:ge.command,rowId:j,formKey:ge.command.name+":"+j})))),jk=j=>{let he=C(M(j,"id"),ce);return he!==void 0?x.map(ge=>({label:ge.label,run:()=>T(ke=>({command:ge.command,rowId:void 0,initialValues:G4e(ge,he),navigateTo:ge.navigateTo,formKey:ge.command.name+":"+he}))})):[]},WU=(j,he)=>jk(F(H(he),{})),JU=(j,he)=>C(C(M(j,"id"),ce),ge=>ec(ge,he)),QU=(m!==void 0?m:gi).map(j=>F(H(j),{})),p_=G(h,j=>({pluginId:j,viewName:g.name})),qk=hp(QU,Ir,Ii,p_,void 0),Vk={lookupLabel:(j,he)=>fp(qk,j,Ii,he),isMissing:(j,he)=>bv(qk,j,Ii,he)},Gk=gae(mt.get("after"),mt.get("before")),m_=vae(ut,Gk),g_=_ae(ut,Gk),Kk=m_||g_,Hk=cae(Ir,Ii,f_,M,!0,Vk,p_,JU).map(j=>{if(!j.sortable||!Kk)return j;let he=fe(Ir.find(ge=>ge.key===j.key),!1,ge=>EF(ge).sort);return{key:j.key,label:j.label,render:j.render,sortable:he,width:j.width}}),Wk=mt.get("sort"),Fp=mt.get("dir")==="desc"?"Desc":"Asc",v_=j=>Fn(he=>he.map(ge=>{let ke=pa(ge);if(ke===void 0)return ge;let We=j.find(Je=>Ne(pa(Je),ke));return We!==void 0?We:ge})),Ip=o!==void 0?ee(gi,j=>C(C(H(j),he=>M(he,o)),ce)):[],Jk=j=>{let he=ut.hasNextPage,ge=Ip.length;if(j===void 0||o===void 0||!he||ge<=0)return!1;let ke=Ip[0];if(Fp==="Asc"){let Je=nt(Ip,ke,(kt,er)=>kt>er?kt:er);return j>Je}let We=nt(Ip,ke,(Je,kt)=>Je<kt?Je:kt);return j<We},YU=()=>{let j=Object.keys(Ee.current);if(Ee.current={},we.current=void 0,j.length!==0){if(j.length>10)return sr();if(s!==void 0&&a!==void 0&&S!==void 0){let he=Ye([["ids",j.map(ge=>ge)]]);$t(S(a,he).then(ge=>{let ke=F(C(C(H(ge),We=>M(We,s)),Vt),[]);return v_(ke),Promise.resolve()}),ge=>Promise.resolve());return}if(fn!==void 0||u===void 0||l===void 0||S===void 0)return sr();j.forEach(he=>{let ge=Ye([["id",he]]);$t(S(l,ge).then(ke=>{let We=C(H(ke),Je=>M(Je,u));return We!==void 0&&et(We)!=="JSONNull"&&v_([We]),Promise.resolve()}),ke=>Promise.resolve())})}},__=j=>{Ee.current[j]=!0;let he=we.current;he!==void 0&&clearTimeout(he),we.current=setTimeout(YU,150)},b_=j=>Fn(he=>{let ge=he.map(Je=>{let kt=pa(Je);if(kt===void 0)return Je;let er=j.find(hn=>Ne(pa(hn),kt));return er!==void 0?er:Je}),ke=ee(ge,pa),We=j.filter(Je=>{let kt=pa(Je);return kt!==void 0?!ke.includes(kt):!1});return ge.concat(We)}),XU=j=>gi.find(he=>Ne(pa(he),j)),ZU=j=>{if(!Qa.shouldApply(lt.current,j.id,j.seq))return;Qa.record(lt.current,j.id,j.seq);let he=XU(j.id),ge=De(he);switch(j.changeKind){case"Added":if(!Et(j.id))return Jk(j.sortKeyValue)?void 0:ye(er=>er+1|0);if(Xt.current.delete(j.id),ge)return;let We=rve(j,g.schema);if(fn!==void 0||We===void 0){let er=j.id;if(fn!==void 0)return sr();if(s!==void 0&&a!==void 0&&S!==void 0){let nr=Ye([["ids",[er]]]);$t(S(a,nr).then(In=>{let Os=F(C(C(H(In),rc=>M(rc,s)),Vt),[]);return b_(Os),Promise.resolve()}),In=>Promise.resolve());return}if(u===void 0||l===void 0||S===void 0)return sr();let hn=Ye([["id",er]]);$t(S(l,hn).then(nr=>{let In=C(H(nr),Os=>M(Os,u));return In!==void 0&&et(In)!=="JSONNull"&&b_([In]),Promise.resolve()}),nr=>Promise.resolve());return}else return b_([We]);case"Updated":if(fn!==void 0)return ge?__(j.id):void 0;if(he===void 0)return;let Je=Jk(j.sortKeyValue),kt=Ac.apply(bt.current,he,j,g.schema);return Je||kt===void 0?__(j.id):v_([kt]);case"Removed":return ge?fn!==void 0?__(j.id):Fn(er=>er.filter(hn=>Jc(pa(hn),j.id))):void 0;case"BulkInvalidated":return ye(er=>0),sr()}},eB=()=>sr();Ex(g.queryField,"All",be,ZU,eB);let tB=j=>{if(at===void 0||j.id!==eo(at)||!Qa.shouldApply(ft.current,j.id,j.seq))return;Qa.record(ft.current,j.id,j.seq);let he=j.changeKind;if(fn!==void 0)switch(he){case"Updated":case"Removed":return Wd(at);case"Added":case"BulkInvalidated":return}else switch(he){case"Updated":let ge=C(M(U,at),ke=>Ac.apply(wt.current,ke,j,g.schema));return ge!==void 0?(D(ke=>{let We=Ye(Pe(ke));return We[at]=ge,We}),q(ke=>"Loaded")):Wd(at);case"Removed":return te(ke=>at);case"Added":case"BulkInvalidated":return}},rB=()=>{if(at!==void 0&&l!==void 0&&u!==void 0&&S!==void 0){$t(S(l,Zt(at)).then(j=>{let he=C(H(j),ke=>M(ke,u)),ge=0;return he!==void 0&&et(he)!=="JSONNull"?(D(ke=>{let We=Ye(Pe(ke));return We[at]=he,We}),q(ke=>"Loaded")):ge=1,ge===1&&te(ke=>at),Promise.resolve()}),j=>Promise.resolve());return}};Ex(g.queryField,{_0:F(G(at,eo),"")},be&&De(at),tB,rB),$e(()=>{te(j=>{})},[F(at,"")]);let y_=F(mt.get("q"),""),x_={};Pe(mt.params).forEach(j=>{let he=j[0];if(he.startsWith("f.")){x_[he.slice(2)]=j[1];return}});let Qk=FMe(Ir,x_),nB=Qk.length!==0,iB=G(Wk,j=>({key:j,direction:Fp==="Asc"?"Asc":"Desc"})),oB=(j,he)=>{let ge=he==="Asc"?"asc":"desc";mt.setMany([["sort",j],["dir",ge],["after",""],["before",""]])},Yk=j=>mt.setMany([["q",j],["after",""],["before",""]]),aB=(j,he)=>mt.setMany([["f."+j,he],["after",""],["before",""]]),sB=()=>re(ut.endCursor,j=>mt.setMany([["after",j],["before",""]])),lB=()=>re(ut.startCursor,j=>mt.setMany([["before",j],["after",""]])),Qd=g.commands.filter(j=>j.level==="Instance"),uB=Qd.length!==0||x.length!==0,tc;if(uB){let ge={key:"__actions",label:"",render:ke=>{let We=C(M(ke,"id"),ce),Je=g.statusField;Je!==void 0&&(M(ke,Je)!==void 0?ia(ke,Je)===void 0&&L5e(h,g.name,Je):M5e(h,g.name,Je));let er=j8(Qd,ke,g.statusField).map(nr=>({TAG:"Action",label:nr.label,onClick:()=>T(In=>({command:nr,rowId:We,formKey:nr.name+":"+F(We,"")})),danger:!1})),hn=jk(ke).map(nr=>({TAG:"Action",label:nr.label,onClick:nr.run,danger:!1}));return b(d4e,{items:er.concat(hn),triggerLabel:"..."})},sortable:!1,width:"56px"};tc=Hk.concat([ge])}else tc=Hk;let cB=g.commands.filter(j=>j.level==="Collection"),Xk=j=>{let he=j.map(er=>F(H(er),{})),ge=kF(x_,Ir),We=an&&Fr.search?"":y_,Je=CF(Wk,Fp,Ir),kt;return kt=typeof Je!="object"||Je.TAG==="ServerSort"?[void 0,Fp]:[Je._0,Je._1],DMe(NMe($Me(he,Ir,ge[1]),Ir,We),Ir,kt[0],kt[1])},Zk=j=>{if(Yt!==void 0&&Yt.id!==bs){let he=jn(g.schema,C(n,$o=>ys($o,g.name)),{field:g.labelField,source:g.labelFieldSource}),ge=G(he.statusField,$o=>Ek($o,Qd,C(ue,Ms=>Ms.transitions))),ke=xk(S,E,Qd,g.name,be,()=>sr(),Ii,Jd.onNotice,Kt),We=Xk(j).map($o=>$o),Je=ZK(g_,m_);if(r!==void 0&&Yt.id===Ff){let $o=jn(r.resource.schema,C(n,Ms=>ys(Ms,r.resource.name)),{field:r.resource.labelField,source:r.resource.labelFieldSource});return b(S5e,{mode:Yt,resource:r.resource,resourceSemantics:$o,resourceRef:r.resourceRef,assignCommand:Q7(Qd,r.resourceRef),eventReadModelName:g.name,eventSchema:g.schema,eventRows:We,eventWindow:Je,eventSemantics:he,eventAccent:C(ue,Ms=>Ms.accent),onOpenEvent:(Ms,vB)=>re(C(H(vB),ri),Pt),onCommand:ke})}let kt=g.name,er=g.schema,hn=C(ue,$o=>$o.accent),nr=Je,In=($o,Ms)=>re(C(H(Ms),ri),Pt),Os=G(ge,$o=>ke),rc=ec,k_=x.length===0?void 0:WU,gB={readModelName:kt,rows:We,schema:er,semantics:he,accent:hn,window:nr,onOpenRow:In,onCommand:Os,statusCommandFor:ge,fillSlot:rc,rowActionsFor:k_,ownEntity:p_,refLabels:Vk};return Yt.render([gB])}else{let he=Xk(j),ge=G(p,nr=>(In=>re(ri(In),Pt))),ke=nr=>F(ri(nr),JSON.stringify(nr)),We=(nr,In)=>{let Os=In.map(ke),rc={};return Os.forEach(k_=>{rc[k_]=!0}),Object.keys(rc).length!==Os.length&&z5e(h,g.name),b(S0,{columns:nr,data:In,keyFn:ke,sortState:iB,onSort:oB,onRowClick:ge,activeKey:at})},Je=jH(g.schema);if(Je===void 0)return We(tc,he);let kt=x4e(he,Je,Zo(g.schema,Je)),er=kt.length;if(er===1||er===0)return We(tc,he);let hn=tc.filter(nr=>nr.key!==Je);return b("div",{children:kt.map(nr=>{let In=nr[0];return L("div",{children:[b("div",{children:vt(In),className:D5e}),We(hn,nr[1])],className:N5e},In)}),className:$5e})}},dB=m!==void 0?Zk(m):typeof sn!="object"?sn==="Loading"?b(Zf,{}):Zk(gi):sn.TAG==="Error"?b(Js,{detail:sn._0,onRetry:()=>sr()}):b(p0,{detail:sn._0,onRetry:()=>sr()}),Ps;if(at!==void 0&&p!==void 0){let he=(m!==void 0?m:gi).find(We=>Ne(C(H(We),ri),at)),ge=M(U,at);Ps=[at,p,ge!==void 0?ge:he]}else Ps=void 0;let eC=j=>{let he=j[2],ge=j[0];if(Ne(ae,ge))return b(Js,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>Br()});if(he!==void 0)return j[1](eo(ge),v,zt(he));let ke=0,We=0,Je=0;if(typeof sn!="object"){if(sn==="Loading")return b(Zf,{});if(typeof Q!="object"){if(Q!=="Loading")return b(Js,{title:"Row not found",detail:"The row data is no longer in the current page."});Je=4}else{if(Q.TAG!=="Error")return b(p0,{detail:Q._0,onRetry:()=>sr()});ke=2}}else Je=4;if(Je===4)if(typeof Q!="object"){if(Q==="Loading")return b(Zf,{});We=3}else We=3;if(We===3&&typeof sn=="object"){if(sn.TAG==="Error")return b(Js,{detail:sn._0,onRetry:()=>sr()});ke=2}return ke===2&&typeof Q=="object"&&Q.TAG==="Error"?b(Js,{detail:Q._0,onRetry:()=>sr()}):b(p0,{detail:sn._0,onRetry:()=>sr()})},fB=dn?b("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(j=>{let he=j[1],ge=j[0],ke;return ke=ze==="Full"?ge==="full":ge==="split",L("button",{children:[b("span",{children:j[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),b("span",{children:he})],className:ke?kf.Style.btnActive:kf.Style.btn,title:he,onClick:We=>{R5e(Ze,ge),Ie(Je=>ge)}},ge)}),"aria-label":"Layout",className:kf.Style.group,role:"group"}):null,Pp=tge(),hB=L("div",{children:[b("h2",{children:g.name,className:A5e}),L("div",{children:[rr.length>1?b(kf.make,{modes:rr,activeId:fe(Yt,bs,j=>j.id),onSelect:sa}):null,fB,_?b(e8e,{live:oe,canBeLive:W,reconnecting:Qe,onToggle:le[1]}):null,cB.map(j=>b("button",{children:"+ "+j.label,className:F5e,onClick:he=>T(ge=>({command:j,rowId:void 0,formKey:j.name}))},j.name))],className:T5e})],className:De(Pp)?TF:AF}),tC=Y$(Pp,hB),pB=L(Lr,{children:[nB?b(L7,{filters:Qk,onFilterChange:aB,searchValue:y_,onSearchChange:Yk}):b(M7,{value:y_,onChange:Yk}),He>0?b(i8e,{count:He,onClick:()=>{ye(j=>0),mt.setMany([["after",""],["before",""]]),sr()}}):null]}),mB=Kk?L("div",{children:[b("button",{children:"‹ Prev",className:$F,disabled:!g_,onClick:j=>lB()}),b("button",{children:"Next ›",className:$F,disabled:!m_,onClick:j=>sB()})],className:P5e}):null,S_=KH(g.schema),w_;if(S_!==void 0){let j=S_.matchedGroups,he=j.length,ge=he!==1?he!==0?j.join(" / "):"an elevated role":j[0];w_=b(nk,{variant:"Info",title:"Viewing as "+ge,message:"This list is not filtered to you — it shows rows for every "+S_.ownerLabel+"."})}else w_=null;let rC=L(Lr,{children:[pB,w_,Jd.element,dB,mB]}),E_;if(ze==="Full")E_=Ps!==void 0?b(RF.make,{refresh:Dp,children:L("div",{children:[Y$(Pp,b("div",{children:b("button",{children:"← "+g.name,className:I5e,onClick:j=>Br()}),className:De(Pp)?TF:AF})),eC([Ps[0],Ps[1],Ps[2]])],className:Wy})}):L("div",{children:[tC,rC],className:Wy});else{let j=Ps!==void 0?eC(Ps):b(_d,{title:"Select an item",description:"Choose a row on the left to see its details here."});E_=b(RF.make,{refresh:Dp,children:L("div",{children:[tC,b(m4e,{master:rC,detail:j})],className:Wy})})}return L(Lr,{children:[E_,fe(R[0],null,j=>b(ik,{isOpen:!0,onClose:()=>T(he=>{}),title:j.command.label,children:b(Nk,{schema:j.command.schema,aggregateId:j.rowId,aggregateIdField:j.command.aggregateIdField,injectNewId:j.command.level==="Collection",ownerField:j.command.ownerField,ownerValue:j.command.ownerValue,initialValues:j.initialValues,refFields:j.command.refFields,onSubmit:he=>{if(k!==void 0){let ge=j.rowId;return ge!==void 0?Kt(ge):re(M(he,F(j.command.aggregateIdField,"id")),Kt),$t(k(j.command.mutationDocument,l_(j.command.schema,he)).then(ke=>{if(typeof ke!="object")return ke==="Accepted"?(T(We=>{}),Sr||sr(),re(j.navigateTo,cs),Promise.resolve("Ok")):(T(We=>{}),!Sr&&Wr(j.navigateTo)&&setTimeout(()=>sr(),i4e),re(j.navigateTo,cs),Promise.resolve("Ok"));{if(ke.TAG==="Rejected"){let Je=ke._0;return $p(S,Ii,Je.errorCode,Je.detail).then(kt=>Promise.resolve({TAG:"Err",_0:kt}))}let We=ke._0;return console.error("[AutoUI] "+g.name+": command "+j.command.name+" not executed — "+We),Promise.resolve({TAG:"Err",_0:We})}}),ke=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return T(ge=>{}),Promise.resolve("Ok")},submitLabel:"Execute"},j.formKey)}))]})}let B5e=U5e;function j5e(e,t,r){if(e.length<2)return[];let n=nt(e,Number.MAX_VALUE,(s,l)=>s<l?s:l),o=nt(e,Number.MIN_VALUE,(s,l)=>s>l?s:l)-n,a=t/(e.length-1|0);return e.map((s,l)=>({x:l*a,y:o===0?r/2:r-(s-n)/o*r}))}function q5e(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function V5e(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,a=t!==void 0?t:"",s=j5e(e.values,i,o),l=a===""?"var("+y.brand+")":a;return s.length<2?null:b("svg",{children:b("polyline",{fill:"none",points:q5e(s),stroke:l,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),style:{display:"block",overflow:"visible"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let G5e=V5e;function si(e){return"var("+e+")"}let K5e=w([z("flex"),ve("column"),c("gap",si(I.xs)),c("padding",si(I.lg)),c("background",si(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",si(Y.md))]),H5e=w([c("color",si(y.textSecondary)),c("font-size",si($.sizeSm)),c("font-weight",si($.weightMedium))]),W5e=w([z("flex"),X("baseline"),c("gap",si(I.sm))]),J5e=w([c("color",si(y.textPrimary)),c("font-size",si($.sizeXxl)),c("font-weight",si($.weightBold)),c("line-height",si($.lineHeightTight))]);function Q5e(e){switch(e){case"Up":return y.success;case"Down":return y.error;case"Neutral":return y.textDisabled}}function Y5e(e){return w([c("color",si(Q5e(e))),c("font-size",si($.sizeSm)),c("font-weight",si($.weightMedium))])}function X5e(e){let t=e.trendLabel,r=e.trend,n;if(r!==void 0&&t!==void 0){let i;switch(r){case"Up":i="^";break;case"Down":i="v";break;case"Neutral":i="-";break}n=b("span",{children:i+" "+t,className:Y5e(r)})}else n=null;return L("div",{children:[b("div",{children:e.label,className:H5e}),L("div",{children:[b("span",{children:e.value,className:J5e}),n],className:W5e}),fe(e.sublabel,null,i=>b("div",{children:i,style:{color:"var("+y.textDisabled+")",fontSize:"var("+$.sizeXs+")"}})),F(e.footer,null)],className:K5e})}let Z5e=X5e;function pU(e){return"var("+e+")"}let eze=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",pU(I.md))]),tze=w([Ce("pointer"),c("border-radius",pU(Y.md)),je([c("filter","brightness(0.98)")])]);function rze(e){let t=e.kpis;return t.length===0?null:b("div",{children:t.map(r=>{let n=G(r.spark,a=>b(G5e,{values:a,width:120,height:24})),i=b(Z5e,{label:r.label,value:r.value,trend:r.trend,trendLabel:r.trendLabel,sublabel:r.sublabel,footer:n}),o=r.onOpen;return o!==void 0?b("div",{children:i,className:tze,role:"button",tabIndex:0,onKeyDown:a=>{if(a.key==="Enter")return o()},onClick:a=>o()},r.key):b("div",{children:i},r.key)}),className:eze})}let nze=rze,Eg=["var("+y.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function mU(e,t){return F(e.color,Eg[Ho(t,Eg.length)])}function ize(e){let t=nt(e,0,(n,i)=>n+(i.value>0?i.value:0));if(t<=0)return[];let r={contents:0};return e.map(n=>{let i=r.contents,o=(n.value>0?n.value:0)/t;return r.contents=i+o,[i,i+o]})}function Vm(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function Xr(e){return(Math.round(e*1e3)/1e3).toString()}function Jy(e,t,r,n,i,o){let a=Vm(e,t,r,i),s=a[1],l=a[0],u=Vm(e,t,r,o),d=u[1],f=u[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+Xr(e)+" "+Xr(t)+" L "+Xr(l)+" "+Xr(s)+" A "+Xr(r)+" "+Xr(r)+" 0 "+h+" 1 "+Xr(f)+" "+Xr(d)+" Z";let p=Vm(e,t,n,i),m=Vm(e,t,n,o);return"M "+Xr(l)+" "+Xr(s)+" A "+Xr(r)+" "+Xr(r)+" 0 "+h+" 1 "+Xr(f)+" "+Xr(d)+" L "+Xr(m[0])+" "+Xr(m[1])+" A "+Xr(n)+" "+Xr(n)+" 0 "+h+" 0 "+Xr(p[0])+" "+Xr(p[1])+" Z"}function oze(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,a=ize(n);if(a.length===0)return null;let s=i/2,l=i/2-1,u=o>0?l*o:0;return b("svg",{children:a.map((d,f)=>{let h=d[1],p=d[0],m=n[f],g=mU(m,f),v=h-p>=.999?Jy(s,s,l,u,p,p+.5)+" "+Jy(s,s,l,u,p+.5,h):Jy(s,s,l,u,p,h);return b("path",{children:b("title",{children:m.label}),d:v,fill:g},m.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let aze=oze,sze=["var("+y.brand+")","var("+y.success+")"];function lze(e){let t=e.flatMap(i=>i.values),r=nt(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=nt(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function uze(e){let t=e.height,r=e.width,n=e.series,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0||n.every(m=>m.values.length<2))return null;let a=lze(n),s=a[0],l=a[1]-s,u=l===0?1:l,d=o-16,f=nt(n,0,(m,g)=>m>g.values.length?m:g.values.length),h=i/(f-1|0),p=8+d;return b("svg",{children:n.map((m,g)=>{let v=F(m.color,F(sze[g],"var("+y.brand+")")),x=m.values.map((k,R)=>{let T=R*h,A=8+d-(k-s)/u*d;return[T,A]}).map(k=>k[0].toString()+","+k[1].toString()).join(" "),S=(m.values.length-1|0)*h,E="0,"+p.toString()+" "+x+(" "+S.toString()+","+p.toString());return L("g",{children:[b("polygon",{fill:v,fillOpacity:"0.15",points:E,stroke:"none"}),b("polyline",{fill:"none",points:x,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},m.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let cze=uze;function dze(e){let t=e.size,r=t!==void 0?t:120;return b(aze,{slices:e.slices,size:r,innerRatio:.6})}let fze=dze;function lu(e){return"var("+e+")"}function hze(e){return w([z("flex"),ve("column"),X("center"),c("gap","2px"),c("width","100%"),c("max-width",e.toString()+"px")])}let pze=w([Ft("relative"),c("width","100%"),c("line-height","0")]),mze=w([Ft("absolute"),c("left","0"),c("right","0"),c("bottom","0"),c("text-align","center"),c("line-height","1.1"),c("font-size",lu($.sizeXl)),c("font-weight",lu($.weightMedium)),c("color",lu(y.textPrimary))]),gze=w([z("flex"),Xe("spaceBetween"),c("width","100%"),c("font-size",lu($.sizeXs)),c("color",lu(y.textDisabled))]),vze=w([c("font-size",lu($.sizeSm)),c("color",lu(y.textSecondary))]);function _ze(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function Pn(e){return(Math.round(e*100)/100).toString()}function IF(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function PF(e,t,r,n,i){let o=IF(e,t,r,n),a=IF(e,t,r,i);return"M "+Pn(o[0])+" "+Pn(o[1])+" A "+Pn(r)+" "+Pn(r)+" 0 0 1 "+Pn(a[0])+" "+Pn(a[1])}function bze(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,a=i!==void 0?i:0,s=t!==void 0?t:160;if(n<=a)return null;let l=_ze(o,a,n),u=s*.09,d=s/2,f=s/2-u/2,h=f+u/2,p=h+u/2;return L("div",{children:[L("div",{children:[L("svg",{children:[b("path",{d:PF(d,h,f,0,1),fill:"none",stroke:"var("+y.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:Pn(u)}),l<=0?null:b("path",{d:PF(d,h,f,0,l),fill:"none",stroke:"var("+y.brand+")",strokeLinecap:"round",strokeWidth:Pn(u)})],"aria-label":Pn(o)+" of "+Pn(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:Pn(p),width:Pn(s),viewBox:"0 0 "+Pn(s)+" "+Pn(p)}),b("div",{children:F(e.display,Pn(o)),className:mze})],className:pze}),L("div",{children:[b("span",{children:Pn(a)}),b("span",{children:Pn(n)})],className:gze}),r!==void 0?b("div",{children:r,className:vze}):null],className:hze(s)})}let yze=bze;function eh(e){return"var("+e+")"}let xze=w([z("flex"),ve("column"),c("gap","6px")]),Sze=w([c("overflow-x","auto")]),wze=w([z("flex"),c("gap","4px"),X("flexStart")]);function Eze(e){return w([z("grid"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px"),X("center"),c("font-size",eh($.sizeXs)),c("color",eh(y.textDisabled)),c("line-height","1")])}function kze(e){return w([z("grid"),c("grid-auto-flow","column"),c("grid-auto-columns",e.toString()+"px"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px")])}function Cze(e){return w([c("border-radius","2px"),c("border","1px solid var("+y.borderSubtle+")"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let Rze=w([c("visibility","hidden")]),Aze=w([z("flex"),X("center"),ei("wrap"),c("gap",eh(I.md)),c("font-size",eh($.sizeXs)),c("color",eh(y.textSecondary))]),Tze=w([z("flex"),X("center"),c("gap","4px")]);function $ze(e){return w([c("width","10px"),c("height","10px"),c("border-radius","2px"),c("border","1px solid var("+y.borderSubtle+")"),c("background","color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function Nze(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function Dze(e){let t=e[0];if(t===void 0)return[];let r=fl(Nze(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return fl(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function Fze(e){return nt(e,0,(t,r)=>r.value>t?r.value:t)}function OF(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function Ize(e){return e%2===0?F(NS[e],""):""}function Pze(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=Dze(r);if(i.length===0)return null;let o=Fze(r),a=r[0],s=r[r.length-1|0],l=a!==void 0&&s!==void 0?lo(a.time)+" – "+lo(s.time):"";return L("div",{children:[b("div",{children:L("div",{children:[b("div",{children:fl(7,u=>b("span",{children:Ize(u)},u.toString())),className:Eze(n)}),b("div",{children:i.map((u,d)=>u.map((f,h)=>f!==void 0?b("div",{className:Cze(Y9(f.value,o)),title:ms(f.time)+" "+lo(f.time)+": "+OF(f.value)},f.time.toString()):b("div",{className:Rze},"b:"+d.toString()+":"+h.toString()))),className:kze(n)})],className:wze}),className:Sze}),L("div",{children:[b("span",{children:l}),L("span",{children:["less",X9.map(u=>b("span",{className:$ze(u)},u.toString())),"more (max "+OF(o)+")"],className:Tze})],className:Aze})],className:xze})}let Oze=Pze;function $i(e){return"var("+e+")"}let Mze=w([z("flex"),ve("column"),c("gap","2px")]),Lze=w([z("flex"),ve("column"),c("gap","3px")]),zze=w([z("flex"),Xe("spaceBetween"),X("baseline"),c("gap",$i(I.sm)),c("font-size",$i($.sizeSm))]),Uze=w([c("color",$i(y.textPrimary))]),Bze=w([c("color",$i(y.textPrimary)),c("font-weight",$i($.weightMedium)),c("white-space","nowrap")]),jze=w([c("color",$i(y.textSecondary)),c("font-weight",$i($.weightNormal))]),qze=w([c("background",$i(y.surfaceSubtle)),c("border-radius",$i(Y.sm)),c("height","14px"),xs("hidden")]);function Vze(e,t){return w([c("background",t),c("border-radius",$i(Y.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let Gze=w([c("padding","2px 0 4px"),c("font-size",$i($.sizeXs)),c("color",$i(y.textDisabled))]),Kze=w([c("padding-top","4px"),c("font-size",$i($.sizeXs)),c("color",$i(y.textDisabled))]);function MF(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function Hze(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function Wze(e){let t=fe(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:MF(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?MF(i.value-r.value,i.value):void 0}})}function Jze(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=Wze(t),i=fe(t[0],0,o=>o.value);return L("div",{children:[t.map((o,a)=>{let s=n[a],l=i<=0?0:o.value/i*100,u=C(s,d=>d.dropOff);return L("div",{children:[u!==void 0?b("div",{children:"↓ "+u.toString()+"% drop-off",className:Gze}):null,L("div",{children:[L("div",{children:[b("span",{children:o.label,className:Uze}),L("span",{children:[Hze(o.value),a===0?null:b("span",{children:" · "+fe(s,0,d=>d.conversion).toString()+"%",className:jze})],className:Bze})],className:zze}),b("div",{children:b("div",{className:Vze(l,F(o.color,"var("+y.brand+")"))}),className:qze})],className:Lze})]},o.label+":"+a.toString())}),r!==void 0?b("div",{children:r,className:Kze}):null],className:Mze})}let Qze=Jze;function th(e){return"var("+e+")"}let Yze=w([z("flex"),ve("column"),c("gap","2px")]),Xze=w([z("flex"),c("gap","4px")]),gU=[c("font-size",th($.sizeXs)),c("color",th(y.textDisabled)),c("white-space","nowrap")],Zze=w(gU.concat([z("flex"),ve("column"),Xe("spaceBetween"),c("text-align","right")]));function e9e(e){return w(gU.concat([z("flex"),Xe("spaceBetween"),c("margin-left",e.toString()+"px")]))}let t9e=w([z("flex"),Xe("spaceBetween"),c("gap",th(I.sm)),c("font-size",th($.sizeXs)),c("color",th(y.textSecondary))]);function r9e(e){let t=e[0];if(t!==void 0)return nt(e,{xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y},(r,n)=>({xMin:n.x<r.xMin?n.x:r.xMin,xMax:n.x>r.xMax?n.x:r.xMax,yMin:n.y<r.yMin?n.y:r.yMin,yMax:n.y>r.yMax?n.y:r.yMax}))}function qr(e){return(Math.round(e*100)/100).toString()}function LF(e,t,r){return r<=t?.5:(e-t)/(r-t)}function n9e(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,a=r!==void 0?r:320,s=t!==void 0?t:200,l=r9e(o);if(l===void 0)return null;let u=3.5+1,d=a-u*2,f=s-u*2,h,p=0;return i!==void 0||n!==void 0?p=1:h=null,p===1&&(h=L("div",{children:[b("span",{children:"↑ "+F(n,"y")}),b("span",{children:F(i,"x")+" →"})],className:t9e})),L("div",{children:[L("div",{children:[L("div",{children:[b("span",{children:qr(l.yMax)}),b("span",{children:qr(l.yMin)})],className:Zze,style:{width:"34px"}}),L("svg",{children:[b("line",{stroke:"var("+y.borderSubtle+")",strokeWidth:"1",x1:qr(u),x2:qr(a-u),y1:qr(s-u),y2:qr(s-u)}),b("line",{stroke:"var("+y.borderSubtle+")",strokeWidth:"1",x1:qr(u),x2:qr(u),y1:qr(u),y2:qr(s-u)}),o.map((m,g)=>{let v=u+LF(m.x,l.xMin,l.xMax)*d,_=u+(1-LF(m.y,l.yMin,l.yMax))*f;return b("circle",{children:b("title",{children:m.label+" — "+F(i,"x")+": "+qr(m.x)+", "+F(n,"y")+": "+qr(m.y)}),cx:qr(v),cy:qr(_),fill:F(m.color,"var("+y.brand+")"),fillOpacity:"0.75",r:qr(3.5)},m.label+":"+g.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:qr(s),width:qr(a),viewBox:"0 0 "+qr(a)+" "+qr(s)})],className:Xze}),L("div",{children:[b("span",{children:qr(l.xMin)}),b("span",{children:qr(l.xMax)})],className:e9e(38)}),h],className:Yze})}let i9e=n9e;function Ko(e){return"var("+e+")"}let o9e=w([z("flex"),ve("column"),c("gap","6px"),on(Re(0)),c("padding","0"),c("list-style","none")]),vU=[z("grid"),c("grid-template-columns","1.5rem 1fr auto"),X("center"),c("gap",Ko(I.sm)),c("font-size",Ko($.sizeSm)),c("color",Ko(y.textPrimary))],a9e=w(vU),s9e=w(vU.concat([Ce("pointer"),c("background","transparent"),c("border","none"),c("padding","2px 0"),c("text-align","left"),c("width","100%"),c("font","inherit"),je([c("color",Ko(y.brand))])])),l9e=w([c("align-self","start"),c("font-size",Ko($.sizeXs)),c("color",Ko(y.textDisabled)),c("text-align","right"),c("font-variant-numeric","tabular-nums")]),u9e=w([z("flex"),ve("column"),c("gap","3px"),SS(Re(0))]),c9e=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),d9e=w([c("background",Ko(y.surfaceSubtle)),c("border-radius",Ko(Y.sm)),c("height","6px"),xs("hidden")]);function f9e(e){return w([c("background",Ko(y.brand)),c("border-radius",Ko(Y.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let h9e=w([c("align-self","start"),c("font-weight",Ko($.weightMedium)),c("white-space","nowrap"),c("font-variant-numeric","tabular-nums")]);function p9e(e,t){return t<=0||e<=0?0:e/t*100}function m9e(e){let t=e.limit,r=t!==void 0?t:10,n=e.entries.slice(0,r);if(n.length===0)return null;let i=nt(n,0,(o,a)=>a.value>o?a.value:o);return b("ol",{children:n.map((o,a)=>{let s=L(Lr,{children:[b("span",{children:(a+1|0).toString(),className:l9e}),L("span",{children:[b("span",{children:o.label,className:c9e,title:o.label}),b("span",{children:b("span",{className:f9e(p9e(o.value,i))}),className:d9e})],className:u9e}),b("span",{children:o.display,className:h9e})]}),l=o.onOpen;return b("li",{children:l!==void 0?b("button",{children:s,className:s9e,type:"button",onClick:u=>l()}):b("div",{children:s,className:a9e})},o.key)}),className:o9e})}let g9e=m9e;function v9e(e){return nt(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function _9e(e){let t=e.height,r=e.width,n=e.bars,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0)return null;let a=nt(n,0,(f,h)=>{let p=v9e(h);return f>p?f:p}),s=a===0?1:a,l=n.length,u=(i-2*(l+1|0))/l,d=o-4;return b("svg",{children:n.map((f,h)=>{let p=2+h*(u+2),m={contents:o};return b("g",{children:f.segments.map((g,v)=>{let _=g.value>0?g.value:0,x=_/s*d,S=m.contents-x;return m.contents=S,_===0?null:b("rect",{children:b("title",{children:f.label+" — "+g.key+": "+_.toString()}),height:x.toString(),width:u.toString(),fill:F(g.color,"var("+y.brand+")"),x:p.toString(),y:S.toString()},g.key+":"+v.toString())})},f.label+":"+h.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let b9e=_9e;function Cr(e){return"var("+e+")"}let y9e=w([z("flex"),ve("column"),c("gap",Cr(I.lg))]),x9e=w([c("font-size",Cr($.sizeXl)),c("font-weight",Cr($.weightMedium)),c("color",Cr(y.textPrimary)),on(Re(0))]),S9e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),c("gap",Cr(I.md))]),bc=w([z("flex"),ve("column"),c("gap",Cr(I.sm)),c("padding",Cr(I.lg)),c("background",Cr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Cr(Y.md))]),yc=w([c("font-size",Cr($.sizeSm)),c("font-weight",Cr($.weightMedium)),c("color",Cr(y.textSecondary))]),w9e=w([z("flex"),X("center"),c("gap",Cr(I.lg))]),zF=w([z("flex"),ve("column"),c("gap","4px"),c("font-size",Cr($.sizeSm)),c("color",Cr(y.textSecondary))]),UF=w([z("flex"),X("center"),c("gap","6px")]);function BF(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let jF=w([c("font-size",Cr($.sizeXs)),c("color",Cr(y.textDisabled))]),E9e=w([z("flex"),Xe("spaceBetween"),X("center"),c("gap",Cr(I.sm))]),k9e=w([z("inlineFlex"),c("gap",Cr(I.xs))]);function C9e(e){return w([c("background",e?Cr(y.surfaceSubtle):"transparent"),c("border","1px solid var("+y.border+")"),c("border-radius",Cr(Y.sm)),c("padding","2px var("+I.sm+")"),c("font-size",Cr($.sizeXs)),c("color",Cr(e?y.textPrimary:y.textSecondary)),Ce("pointer")])}function kg(e,t){return C(M(e,t),r=>{let n=Ji(r);return n!==void 0?n:G(gv(r),i=>moe(i[0],i[1]))})}function Np(e){return e.map(t=>F(H(t),{}))}function rS(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=ee(Np(e),o=>kg(o,r)),i=nt(n,0,(o,a)=>o+a);return t==="sum"?i:n.length===0?0:i/n.length}function Cg(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function R9e(e,t,r){return eP(e,r&&(t==="count"||t==="sum"))}function A9e(e,t,r,n){return r?t==="avg"?e+" · avg of the first "+n.toString()+" loaded":e+" · over the first "+n.toString()+" loaded":e}function Ha(e){let t=F(e.aggregate,"count"),r=e.label;if(r!==void 0)return r;let n=e.field;switch(t){case"avg":return n!==void 0?e.view+" — avg "+vt(n):e.view;case"sum":return n!==void 0?e.view+" — total "+vt(n):e.view;default:return e.view}}function _U(e,t,r,n){let i=fl(r,o=>[]);return Np(e).forEach(o=>re(C(Iu(t,o),qn),a=>{let s=Math.floor((n-a)/864e5)|0;if(s>=0&&s<r)return re(i[(r-1|0)-s|0],l=>{l.push(o)})})),i}function nS(e,t,r,n,i,o){return _U(e,t,r,n).map(a=>rS(a.map(s=>s),i,o))}function bU(e,t){return ee(Np(e),r=>ia(r,t))}function yU(e,t,r){let n=Zo(t,r),i=nt(e.filter(o=>!n.includes(o)),[],(o,a)=>o.includes(a)?o:o.concat([a]));return n.concat(i)}function T9e(e,t,r){let n=bU(e,r);return ee(yU(n,t,r),i=>{let o=n.filter(a=>a===i).length;if(o!==0)return{label:vt(i),value:o}})}function xU(e){return Eg[Ho(e,Eg.length)]}function $9e(e,t,r,n,i,o){let a=_U(e,t,r,n),s=f=>ee(f,h=>ia(h,o)),l=a.flatMap(s),u=yU(l,i,o).filter(f=>l.some(h=>h===f)),d=a.map((f,h)=>{let p=s(f);return{label:ms(n-((r-1|0)-h|0)*864e5),segments:u.map((m,g)=>({key:vt(m),value:p.filter(v=>v===m).length,color:xU(g)}))}});return{statuses:u,bars:d}}function N9e(e,t,r){let n=Zo(t,r),i=bU(e,r),o=ee(i,a=>{let s=n.indexOf(a);if(!(s<0))return s});return{stages:n.map((a,s)=>({label:vt(a),value:o.filter(l=>l>=s).length})),excluded:i.length-o.length|0}}function D9e(e,t){return G(Dr(e).find(r=>r[0]===t),r=>r[1])}function SU(e,t){return G(M(e.semantics,t),r=>r.semantic)}function F9e(e,t,r){let n=D9e(e,t);if(n===void 0)return;let i=oh(n,"maximum");if(i===void 0)return Ne(SU(r,t),"Percent")?{min:0,max:100}:void 0;let o=F(oh(n,"minimum"),0);if(i>o)return{min:o,max:i}}function qF(e,t,r){let n=SU(e,t);if(n===void 0)return Cg(r);switch(n){case"Percent":return V4(r);case"Bytes":return G4(r);case"Duration":return Nw(r);case"Currency":case"Money":return $w(r);default:return Cg(r)}}function I9e(e,t,r,n){return ee(Np(e),i=>G(kg(i,t),o=>{let a=F(C(M(i,"id"),ce),"");return{id:a,label:F(C(M(i,r),ce),a===""?"—":a),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function P9e(e,t,r,n){return ee(Np(e),i=>{let o=kg(i,t),a=kg(i,r);if(o!==void 0&&a!==void 0)return{label:F(C(M(i,n),ce),F(C(M(i,"id"),ce),"—")),x:o,y:a}})}function O9e(e,t,r,n,i,o){return nS(e,t,r,n,i,o).map((a,s)=>({time:li(n-((r-1|0)-s|0)*UP),value:a}))}function M9e(e){let t=de(()=>"Days30"),r=t[1],n=t[0],i=(a,s)=>b("button",{children:s,className:C9e(n===a),type:"button",onClick:l=>r(u=>a)}),o;return o=n==="Days30"?e.body:b(Oze,{days:e.yearDays}),L("div",{children:[L("div",{children:[b("span",{children:e.title,className:yc}),L("div",{children:[i("Days30","30 days"),i("Year","Year")],className:k9e})],className:E9e}),o],className:bc})}function L9e(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,a=e.pluginId,s=t!==void 0?t:{},l=Cl(),u=Tl(),d=ee(nt(o.map(D=>D.view),[],(D,U)=>D.includes(U)?D:D.concat([U])),D=>i.find(U=>U.name===D)),f=d.map(D=>{let U=gg(s,D.name,u),B=Ru(D,U&&Wr(r));return[D,U,B]}),h=D=>r!==void 0?F(M(r,D),[]):fe(f.find(U=>U[0].name===D),[],U=>U[2].rows),p=D=>r!==void 0?!1:fe(f.find(U=>U[0].name===D),!1,U=>U[2].canLoadMore),m=Date.now(),g=ee(o,D=>G(d.find(U=>U.name===D.view?gg(s,U.name,u):!1),U=>({metric:D,readModel:U,rows:h(U.name),partial:p(U.name),semantics:jn(U.schema,C(n,B=>ys(B,U.name)),{field:U.labelField,source:U.labelFieldSource})}))),v=g.map((D,U)=>{let B=F(D.metric.aggregate,"count"),q=G(D.semantics.dateSpan,Q=>nS(D.rows,Q,14,m,B,D.metric.field));return{key:U.toString()+":"+D.readModel.name,label:Ha(D.metric),value:R9e(Cg(rS(D.rows,B,D.metric.field)),B,D.partial),sublabel:A9e(D.readModel.name,B,D.partial,D.rows.length),spark:q,onOpen:()=>l(Ya(Bs(a,D.readModel.name)))}}),_=D=>{let U=D.readModel.statusField;return U!==void 0?U:D.semantics.statusField},x=ee(g,D=>G(D.semantics.dateSpan,U=>{let B=F(D.metric.aggregate,"count"),q=Ha(D.metric)+" — trend",Q=_(D),J;if(B==="count"&&Q!==void 0){let ae=$9e(D.rows,U,30,m,D.readModel.schema,Q),Z=ae.statuses;J=Z.length===0?void 0:L(Lr,{children:[b(b9e,{bars:ae.bars}),b("div",{children:Z.map((W,le)=>L("span",{children:[b("span",{className:BF(xU(le))}),vt(W)],className:UF},W)),className:zF})]})}else J=void 0;let te;if(J!==void 0)te=J;else{let ae=nS(D.rows,U,30,m,B,D.metric.field);te=b(cze,{series:[{label:Ha(D.metric),values:ae}]})}return b(M9e,{title:q,body:te,yearDays:O9e(D.rows,U,365,m,B,D.metric.field)},"trend:"+Ha(D.metric))})),S=ee(g,D=>{let U=D.metric.aggregate,B=D.metric.field;if(U==="avg"&&B!==void 0)return G(F9e(D.readModel.schema,B,D.semantics),q=>{let Q=rS(D.rows,"avg",B);return L("div",{children:[b("span",{children:Ha(D.metric),className:yc}),b(yze,{value:Q,min:q.min,max:q.max,display:qF(D.semantics,B,Q),caption:D.readModel.name+" · "+vt(B)})],className:bc},"gauge:"+Ha(D.metric))})}),E=[],k=ee(g,D=>{let U=D.metric.aggregate,B=D.metric.field;if(U===void 0)return;switch(U){case"avg":case"sum":break;default:return}if(B===void 0||E.includes(D.readModel.name+":"+B))return;E.push(D.readModel.name+":"+B);let q=I9e(D.rows,B,D.readModel.labelField,10).map(Q=>({key:Q.id===""?Q.label:Q.id,label:Q.label,display:qF(D.semantics,B,Q.value),value:Q.value,onOpen:Q.id===""?void 0:()=>l(ps(a,D.readModel.name,Q.id,[]))}));if(q.length!==0)return L("div",{children:[b("span",{children:D.readModel.name+" — top by "+vt(B),className:yc}),b(g9e,{entries:q})],className:bc},"top:"+D.readModel.name+":"+B)}),R=ee(g,D=>{let U=D.metric.viz,B=D.metric.field,q=D.metric.xField;if(U===void 0||U!=="scatter"||B===void 0||q===void 0)return;let Q=P9e(D.rows,q,B,D.readModel.labelField);if(Q.length!==0)return L("div",{children:[b("span",{children:D.readModel.name+" — "+vt(B)+" by "+vt(q),className:yc}),b(i9e,{points:Q,xLabel:vt(q),yLabel:vt(B)})],className:bc},"scatter:"+Ha(D.metric))}),T=ee(g,D=>{let U=D.metric.viz,B=_(D);if(U===void 0||U!=="funnel"||B===void 0)return;let q=N9e(D.rows,D.readModel.schema,B),Q=q.stages;if(Q.length===0)return;let J=q.excluded;return L("div",{children:[b("span",{children:Ha(D.metric)+" — "+vt(B)+" funnel",className:yc}),b(Qze,{stages:Q,note:J===0?void 0:J.toString()+" row(s) with an unlisted "+vt(B)+" excluded"})],className:bc},"funnel:"+Ha(D.metric))}),A=ee(g,D=>{let U=F(D.metric.aggregate,"count"),B=Ne(D.metric.viz,"funnel")?void 0:_(D);if(U!=="count"||B===void 0)return;let q=T9e(D.rows,D.readModel.schema,B);if(q.length!==0)return L("div",{children:[b("span",{children:D.readModel.name+" — by "+vt(B),className:yc}),L("div",{children:[b(fze,{slices:q}),b("div",{children:q.map((Q,J)=>L("span",{children:[b("span",{className:BF(mU(Q,J))}),Q.label+" ("+Cg(Q.value)+")"],className:UF},Q.label)),className:zF})],className:w9e})],className:bc},"status:"+D.readModel.name)}),N=(De(r)?[]:ee(f,D=>{let U=D[0],B=D[2].fetchState;if(D[1])return typeof B!="object"?B==="Loading"?U.name+": loading…":void 0:(B.TAG,U.name+": "+B._0)})).concat(ek(s,d.map(D=>D.name),u)),P=[T,R,S,x,k,A].flatMap(D=>D),O=nt(ee(g,D=>{if(D.partial)return D.readModel.name}),[],(D,U)=>D.includes(U)?D:D.concat([U]));return L("div",{children:[b("h2",{children:"Dashboard",className:x9e}),b(nze,{kpis:v}),P.length!==0?b("div",{children:P,className:S9e}):null,O.length!==0?b("span",{children:"Figures cover the rows loaded for: "+O.join(", "),className:jF}):null,N.length!==0?b("span",{children:N.join(" · "),className:jF}):null],className:y9e})}let z9e=L9e,wU={actor:"",eventType:"",timeFrom:"",timeTo:""};function VF(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function wn(e){return"var("+e+")"}let U9e=w([z("flex"),ve("column"),c("gap",wn(I.sm))]),B9e=w([z("flex"),X("center"),c("gap",wn(I.md)),ei("wrap"),c("padding-bottom",wn(I.xs)),c("border-bottom","1px solid var("+y.border+")")]),j9e=w([z("flex"),X("center"),c("gap","4px")]),GF=w([c("color",wn(y.textSecondary)),c("font-size",wn($.sizeSm)),c("white-space","nowrap")]),KF=w([c("background",wn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",wn(Y.sm)),c("padding","2px var("+I.sm+")"),c("font-size",wn($.sizeSm)),c("color",wn(y.textPrimary)),c("outline","none"),ws([c("border-color",wn(y.brand))])]),q9e=w([c("background","none"),c("border","none"),c("padding","0"),c("color",wn(y.brand)),c("font-size",wn($.sizeSm)),Ce("pointer"),je([c("text-decoration","underline")])]),V9e=w([z("flex"),Xe("center"),c("padding-top",wn(I.xs))]),G9e=w([c("background",wn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",wn(Y.sm)),c("padding","4px var("+I.md+")"),c("font-size",wn($.sizeSm)),c("color",wn(y.textPrimary)),Ce("pointer"),je([c("border-color",wn(y.brand))])]);function K9e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,a=e.filter,s=i!==void 0?i:!1,l=n!==void 0?n:!1,u=t!==void 0?t:"No recorded history for this record",d=ee([["actor","Actor",e.actors.map(h=>({label:h,value:h})),a.actor],["eventType","Event",e.eventTypes.map(h=>({label:vt(h),value:h})),a.eventType]],h=>{let p=h[2];if(p.length!==0)return{key:h[0],label:h[1],options:p,value:h[3]}});return L("div",{children:[L("div",{children:[b(L7,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:a.timeTo});case"eventType":return o({actor:a.actor,eventType:p,timeFrom:a.timeFrom,timeTo:a.timeTo});default:return}}}),L("div",{children:[b("span",{children:"From:",className:GF}),b("input",{className:KF,type:"date",value:a.timeFrom,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:h.target.value,timeTo:a.timeTo})}),b("span",{children:"To:",className:GF}),b("input",{className:KF,type:"date",value:a.timeTo,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:h.target.value})})],className:j9e}),VF(a)?b("button",{children:"Clear filters",className:q9e,onClick:h=>o(wU)}):null],className:B9e}),b(Wve,{entries:e.entries,emptyLabel:VF(a)?"No events match these filters":u,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),s?b("div",{children:b("button",{children:l?"Loading…":"Load earlier events",className:G9e,disabled:l,onClick:h=>re(r,p=>p())}),className:V9e}):null],className:U9e})}let H9e=K9e;function W9e(e){if(e!=="")return e+"T00:00:00.000Z"}function J9e(e){if(e!=="")return e+"T23:59:59.999Z"}function Q9e(e,t,r){let n={};return n.entityId=e,n.first=50,re(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),re(W9e(t.timeFrom),i=>{n.timeFrom=i}),re(J9e(t.timeTo),i=>{n.timeTo=i}),n}function Y9e(e){let t=e.entityId,r=e.binding,n=hi(),i=Tl(),o=fe(e.requiredAccess,!1,D=>!i(D)),a=de(()=>[]),s=a[1],l=a[0],u=de(()=>wU),d=u[1],f=u[0],h=de(()=>!0),p=h[1],m=de(()=>{}),g=m[1],v=m[0],_=de(()=>!1),x=_[1],E=de(()=>{})[1],k=de(()=>0),R=k[1],T=k[0],A=Fe(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;$e(()=>{if(!o)if(n!==void 0){let D=T===0,U=D?void 0:A.current;p(B=>!0),g(B=>{}),$t(n(r.queryDocument,Q9e(t,f,U)).then(B=>{let q=vDe(B,r.queryField),Q=_De(B,r.queryField),J=Q[1],te=Q[0];return s(ae=>D?q:q.concat(ae)),x(ae=>te),E(ae=>J),A.current=J,p(ae=>!1),Promise.resolve()}),B=>(p(q=>!1),g(q=>"Could not load the history for this record."),Promise.resolve()))}else g(D=>"Not connected")},[N,T,o]);let P=D=>{A.current=void 0,R(U=>0),s(U=>[]),d(U=>D)},O=()=>R(D=>D+1|0);return o?null:v!==void 0?b(Js,{title:"History unavailable",detail:v,onRetry:()=>R(D=>D+1|0)}):b(H9e,{entries:wDe(l,r.displayName),actors:EDe(l),eventTypes:kDe(l),filter:f,onFilterChange:P,hasMore:_[0],loading:h[0],onLoadMore:O})}let X9e=Y9e;function Qn(e){return"var("+e+")"}let Z9e=w([z("flex"),ve("column"),c("gap",Qn(I.lg))]),e7e=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Qn(I.md))]),t7e=w([c("font-size",Qn($.sizeXl)),c("font-weight",Qn($.weightMedium)),c("color",Qn(y.textPrimary)),on(Re(0))]),r7e=w([z("flex"),ei("wrap"),X("center"),c("gap",Qn(I.md)),c("font-size",Qn($.sizeSm)),c("color",Qn(y.textSecondary))]),n7e=w([z("inlineFlex"),X("center"),c("gap","4px"),Ce("pointer")]);function i7e(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let HF=w([c("font-size",Qn($.sizeXs)),c("color",Qn(y.textDisabled))]),o7e=w([z("flex"),X("center"),c("gap",Qn(I.sm))]),a7e=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Qn(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",Qn(y.textSecondary)),c("font-size",Qn($.sizeSm)),Ce("pointer"),je([c("background",Qn(y.surfaceSubtle)),c("color",Qn(y.textPrimary))])]);function s7e(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},a=Cl(),s=Tl(),l=hi(),u=dp(),d=Ia(),f=yk(),h=de(()=>[]),p=h[1],m=h[0],g=n.map((k,R)=>{let T=gg(o,k.name,s),A=T&&!m.includes(k.name),N=Ru(k,A);return[k,R,A,T,N]}),v=(k,R)=>F(C(C(r,T=>xi(T,k.name)),T=>T.accent),pd[Ho(R,pd.length)]),_=ee(g,k=>{let R=k[4],T=k[0],A=C(r,D=>xi(D,T.name)),N=jn(T.schema,C(r,D=>ys(D,T.name)),{field:T.labelField,source:T.labelFieldSource}),P=G(N.statusField,D=>Ek(D,T.commands,C(A,U=>U.transitions))),O=xk(l,u,T.commands,T.name,R.isLive,R.refetch,d,f.onNotice,void 0);if(k[2])return{readModelName:T.name,rows:R.rows,schema:T.schema,semantics:N,accent:v(T,k[1]),window:w0(R.canLoadMore),onOpenRow:(D,U)=>a(ps(i,T.name,D,[])),onCommand:G(P,D=>O),statusCommandFor:P,ownEntity:{pluginId:i,viewName:T.name}}}),x=ee(g,k=>{if(k[2]&&k[4].canLoadMore)return k[0].name}),S=()=>{g.forEach(k=>{let R=k[4];if(k[2]&&R.canLoadMore)return R.loadMore()})},E=ee(g,k=>{let R=k[0],T=k[4].fetchState;if(k[2])return typeof T!="object"?T==="Loading"?R.name+": loading…":void 0:(T.TAG,R.name+": "+T._0)}).concat(ek(o,n.map(k=>k.name),s));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:t7e}),className:e7e}),b("div",{children:g.filter(k=>k[3]).map(k=>{let R=k[0];return L("label",{children:[b("input",{checked:k[2],type:"checkbox",onChange:T=>{let A=R.name;p(N=>N.includes(A)?N.filter(P=>P!==A):N.concat([A]))}}),b("span",{className:i7e(v(R,k[1]))}),R.name],className:n7e},R.name)}),className:r7e}),f.element,e.mode.render(_),x.length!==0?L("div",{children:[b("button",{children:"Load more",className:a7e,onClick:k=>S()}),b("span",{children:"More rows available: "+x.join(", "),className:HF})],className:o7e}):null,E.length!==0?b("span",{children:E.join(" · "),className:HF}):null],className:Z9e})}let l7e=s7e;function uu(e){return"var("+e+")"}let u7e=w([z("flex"),X("center"),c("gap",uu(I.xs)),c("font-size",uu($.sizeSm)),c("color",uu(y.textSecondary))]),c7e=w([c("color",uu(y.brand)),c("text-decoration","none"),je([c("text-decoration","underline")])]),d7e=w([c("color",uu(y.textPrimary)),c("font-weight",uu($.weightMedium))]),f7e=w([c("color",uu(y.textDisabled)),JI("none")]);function h7e(e){let t=e.crumbs;return b("nav",{children:t.map((r,n)=>{let i=n===(t.length-1|0);return L(cS,{children:[n>0?b("span",{children:"/","aria-hidden":!0,className:f7e}):null,i||Wr(r.href)?b("span",{children:r.label,className:d7e}):b("a",{children:r.label,className:c7e,href:F(r.href,"#")})]},r.label)}),"aria-label":"breadcrumbs",className:u7e})}let p7e=h7e;function yt(e){return"var("+e+")"}let m7e=w([z("flex"),ve("column"),c("gap",yt(I.lg)),c("padding","0 var("+I.md+")"),c("min-width","0")]),g7e=w([z("flex"),X("center"),c("font-size",yt($.sizeMd)),c("padding","var("+I.sm+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),v7e=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",yt(I.md)),c("padding-bottom",yt(I.md)),c("border-bottom","1px solid var("+y.borderSubtle+")")]),_7e=w([c("font-size",yt($.sizeXl)),c("font-weight",yt($.weightMedium)),c("color",yt(y.textPrimary)),on(Re(0))]),b7e=w([z("flex"),ei("wrap"),c("gap",yt(I.sm)),c("padding-bottom",yt(I.sm))]),y7e=w([c("background",yt(y.surface)),c("color",yt(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",yt(Y.md)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",yt($.sizeSm)),Ce("pointer"),je([c("background",yt(y.surfaceElevated))])]),x7e=w([z("flex"),ve("column"),c("gap",yt(I.sm)),c("min-width","0")]),WF=w([z("flex"),X("start"),c("gap",yt(I.md)),c("padding","var("+I.xs+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")"),XI([c("border-bottom","none")])]),JF=w([c("color",yt(y.textSecondary)),c("font-size",yt($.sizeMd)),c("font-weight",yt($.weightMedium)),c("white-space","nowrap"),c("padding-top","2px"),$n(0),c("min-width","200px")]),Qy=w([c("color",yt(y.textPrimary)),c("font-size",yt($.sizeMd)),c("word-break","break-word"),c("min-width","0")]),S7e=w([z("flex"),X("start"),c("gap",yt(I.md)),c("padding","var("+I.xs+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")"),XI([c("border-bottom","none")])]),w7e=w([c("color",yt(y.textSecondary)),c("font-size",yt($.sizeMd)),c("font-weight",yt($.weightMedium)),c("padding-top","2px"),$n(0),c("min-width","200px")]),E7e=w([z("flex"),ve("column"),c("gap",yt(I.sm)),Vn(1),c("padding",yt(I.md)),c("background",yt(y.surfaceSubtle)),c("border-radius",yt(Y.md)),c("border","1px solid var("+y.borderSubtle+")"),c("min-width","0")]),k7e=w([z("flex"),ve("column"),c("gap",yt(I.sm)),c("min-width","0")]),C7e=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",yt(I.md)),c("padding-bottom",yt(I.xs)),c("border-bottom","1px solid var("+y.borderSubtle+")")]),R7e=w([c("color",yt(y.textPrimary)),c("font-size",yt($.sizeMd)),c("font-weight",yt($.weightMedium))]),QF=w([c("overflow-x","auto"),c("max-width","100%"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",yt(Y.md))]),xc=w([c("color",yt(y.textDisabled)),c("font-size",yt($.sizeSm))]);function EU(e,t){return F(C(C(H(e),r=>M(r,"title")),ce),vt(t))}function YF(e){return C(C(H(e),t=>M(t,"type")),ce)}function XF(e){return C(C(H(e),t=>M(t,"format")),ce)}function A7e(e){return C(H(e),t=>M(t,"items"))}function ZF(e){return De(C(C(H(e),t=>M(t,"properties")),H))}function T7e(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function eI(e){let t=e.toLowerCase(),r=e.length,n=a=>{let s=a.length;if(r>s&&t.endsWith(a))return e.slice(0,r-s|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function $7e(e,t){let r=cn(t),n=YF(r);if(n!==void 0)switch(n){case"array":let o=A7e(r);if(o===void 0)return"ArrayOfScalars";let a=YF(o);if(ZF(o)||Ne(a,"object"))return{TAG:"ArrayOfObjects",_0:o};if(!Ne(a,"string"))return"ArrayOfScalars";let s=eI(e);return s!==void 0?{TAG:"EntityRefArray",_0:s}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return ZF(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!T7e(e))return{TAG:"Scalar",_0:F(n,"string"),_1:XF(r)};let i=eI(e);return i!==void 0?{TAG:"EntityRef",_0:i}:{TAG:"Scalar",_0:F(n,"string"),_1:XF(r)}}function Yy(e,t,r,n){let i=et(e);if(typeof i!="object")switch(i){case"JSONFalse":return b(ds,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return b(ds,{variant:"Success",label:"true",dot:!1});case"JSONNull":return b("span",{children:"—",className:xc})}else switch(i.TAG){case"JSONString":let o=i._0;return t==="date-time"?qg(o):F(iP(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function N7e(e){return F(G(Vt(e),t=>t.map(r=>{let n=et(r);if(typeof n!="object")switch(n){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":return n._0;case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}})),[])}function tI(e){return F(G(Vt(e),t=>ee(t,H)),[])}function kU(e,t){let r=C(M(e,"id"),ce);if(r!==void 0)return r;let n=C(M(e,"compositeId"),ce);return n!==void 0?n:"#"+t.toString()}function rI(e){return e.map((t,r)=>({key:kU(t,r),row:t}))}function D7e(e,t,r){for(;;){let n=t,i=n[0];if(i===void 0)return e;let o=e[e.length-1|0];if(o===void 0)return;let a=De(H(o.data)),s=Vt(o.data),l;if(a){let u=F(H(o.data),{}),d=C(C(H(o.schema),p=>M(p,"properties")),H),f=C(d,p=>M(p,i)),h=M(u,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:EU(f,i)}:void 0}else if(De(s)){let u=F(s,[]),d=F(C(H(o.schema),h=>M(h,"items")),o.schema),f=u.find((h,p)=>{let m=F(H(h),{});return kU(m,p)===i});l=f!==void 0?{data:f,schema:d,label:i}:void 0}else l=void 0;if(l===void 0)return;e.push(l),r.push(i),t=n.slice(1)}}function F7e(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,a=e.drillPath,s=e.labelField,l=e.aggregateId,u=e.statusField,d=e.commands,f=e.rootLabel,h=e.schema,p=e.data,m=d!==void 0?d:[],g=a!==void 0?a:[],v=hi(),_=vp(),x=Ia(),S=Dg(),E=k5e(),k=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,R=Cl(),T=de(()=>[]),A=T[1],N=de(()=>{}),P=N[1],O=de(()=>({})),D=O[1],U=O[0],B=De(o)&&De(i),q=B?g:T[0],Q=pe=>{if(o!==void 0&&i!==void 0&&l!==void 0)return R(ps(o,i,l,pe));A(Ie=>pe)},J=D7e([{data:p,schema:h,label:f}],q,[]),te=F(H(p),{}),ae=Mo(h,"Drill"),Z=hp([te],ae,x,k,void 0),oe={lookupLabel:(pe,Ie)=>fp(Z,pe,x,Ie),isMissing:(pe,Ie)=>bv(Z,pe,x,Ie)},Se=fe(C(La(),pe=>pe.identity),[],pe=>pe.groups),be=pe=>{if(l!==void 0)return G(Du(cU(h,pe,m),Ie=>dU(Ie.command,Se)),Ie=>(()=>P(ze=>Ie.command)))},ue=(pe,Ie,ze)=>L("div",{children:[b("div",{children:Ie,className:JF}),b("div",{children:ze,className:Qy})],className:WF},pe),xe=(pe,Ie,ze)=>{if($h(pe,x,k))return ze;let Qe=Es(x,pe);if(Qe===void 0)return ze;let Sr=Qe.name.endsWith("s");return Ie?Sr?Qe.name:Qe.name+"s":Sr?Qe.name.slice(0,Qe.name.length-1|0):Qe.name},ot=pe=>{let Ie=et(pe.data);if(typeof Ie!="object"){if(Ie==="JSONNull")return b("span",{children:"—",className:xc})}else switch(Ie.TAG){case"JSONObject":let ze=F(H(pe.data),{}),Qe=Mo(pe.schema,"Drill");return Qe.length===0?b("span",{children:"(no fields)",className:xc}):b("div",{children:Qe.map(Ee=>{let we=Ee.key,lt=Ee.propSchema,ft=M(ze,we),bt=EU(lt,we),wt=$7e(we,lt);if(ft===void 0)return ue(we,bt,F(Noe(we,lt),b("span",{children:"—",className:xc})));if(typeof wt!="object")switch(wt){case"Bool":return ue(we,bt,Yy(ft,void 0,we))}else switch(wt.TAG){case"Scalar":let Xt=ox(we,lt,ft);return Xt!==void 0?ue(we,bt,Xt):ue(we,bt,Yy(ft,wt._1,we));case"EntityRef":let Kt=wt._0;return ue(we,xe(Kt,!1,bt),ax(we,Kt,ft,x,S,oe,k,void 0,void 0));case"EntityRefArray":let Et=wt._0;return ue(we,xe(Et,!0,bt),ax(we,Et,ft,x,S,oe,k,void 0,void 0));case"NestedObject":let mt=ox(we,lt,ft);if(mt!==void 0)return ue(we,bt,mt);let Tr=Mo(wt._0,"Drill"),la=F(C(M(ze,we),H),{});return L("div",{children:[b("div",{children:bt,className:w7e}),b("div",{children:Tr.map(ut=>{let Fn=M(la,ut.key);return L("div",{children:[b("div",{children:ut.label,className:JF}),b("div",{children:iu(ut.key,ut.kind,ut.propSchema,Fn,void 0,x,S,oe,k),className:Qy})],className:WF},ut.key)}),className:E7e})],className:S7e},we);case"ArrayOfObjects":let ti=wt._0,fn=rI(tI(ft)),ri=fn.length,eo=F(i,f),Zt=eo+"."+we,at=C(n,ut=>xi(ut,Zt)),Pt=pL(ti,at),Br=uL(o,eo,we),jr=M(U,we),Fr=jr!==void 0?jr:qw(Br),an=mL(Fr,at,uP(ti),Pt),Ir=ut=>{lL(Br,ut),D(Fn=>{let gi=Ye(Pe(Fn));return gi[we]=ut,gi})},pr=F(Vt(ft),[]),to=ut=>{let Fn=jn(ti,C(n,Ii=>ys(Ii,Zt)),void 0),gi=C(at,Ii=>Ii.accent),Dp={readModelName:Zt,rows:pr,schema:ti,semantics:Fn,accent:gi,window:"Complete",onOpenRow:(Ii,f_)=>{let Jd=HB(pr,ec=>ec===f_),h_=Jd!==void 0?fe(fn[Jd],Ii,ec=>ec.key):Ii;Q(q.concat([we,h_]))}};return ut.render([Dp])},Dn=Mo(ti,"Drill").map(ut=>({key:ut.key,label:ut.label,render:Fn=>iu(ut.key,ut.kind,ut.propSchema,M(Fn.row,ut.key),void 0,x,S,oe,k),sortable:!1,width:ut.width})),sr=ri===0?b("span",{children:"(empty)",className:xc}):b("div",{children:b(S0,{columns:Dn,data:fn,keyFn:ut=>ut.key,onRowClick:ut=>Q(q.concat([we,ut.key])),density:"Comfortable"}),className:QF}),sn=an!==void 0&&an.id!==bs?to(an):sr;return L("div",{children:[L("div",{children:[b("span",{children:bt,className:R7e}),L("span",{children:[Pt.length>1?b(kf.make,{modes:Pt,activeId:fe(an,bs,ut=>ut.id),onSelect:Ir}):null,b(If,{count:ri,label:"items",onClick:()=>Q(q.concat([we]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:C7e}),sn],className:k7e},we)}return ue(we,bt,b(nP,{items:N7e(ft)}))}),className:x7e});case"JSONArray":let Sr=rI(tI(pe.data)),K=F(C(H(pe.schema),Ee=>M(Ee,"items")),pe.schema),He=Mo(K,"Drill").map(Ee=>({key:Ee.key,label:Ee.label,render:we=>iu(Ee.key,Ee.kind,Ee.propSchema,M(we.row,Ee.key),void 0,x,S,oe,k),sortable:!1,width:Ee.width}));return Sr.length===0?b("span",{children:"(empty)",className:xc}):b("div",{children:b(S0,{columns:He,data:Sr,keyFn:Ee=>Ee.key,onRowClick:Ee=>Q(q.concat([Ee.key])),density:"Comfortable"}),className:QF})}return b("div",{children:Yy(pe.data,void 0,void 0),className:Qy})},rr=s!==void 0&&s!=="id"?C(C(C(H(p),pe=>M(pe,s)),ce),pe=>{if(pe!=="")return pe}):void 0,It=F(rr,F(l,f)),mi=pe=>o!==void 0&&i!==void 0&&l!==void 0?ps(o,i,l,q.slice(0,pe)):"#",Gn=J!==void 0?J.map((pe,Ie)=>{let ze=Ie===(J.length-1|0);return{label:Ie===0?It:pe.label,href:ze?void 0:mi(Ie)}}):[{label:It,href:void 0}],sa=pe=>{let Ie=pe.target,ze=Ie.tagName,Qe=pe.metaKey||pe.ctrlKey||pe.shiftKey||pe.altKey||pe.button!==0;if(ze!=="A"||Qe)return;if(pe.preventDefault(),B){let Ee=Ie.pathname,we=Ie.search;return R(Ee+we)}let ye=Ie.parentNode.querySelectorAll("a").findIndex(Ee=>Ee===Ie),He=ye<0?0:ye;Q(q.slice(0,He))},Yt;if(J!==void 0){let pe=J[J.length-1|0];Yt=pe!==void 0?ot(pe):null}else Yt=b(Js,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>Q([])});let Nn=q.length===0,dn=Nn?j8(m.filter(pe=>pe.level==="Instance"),te,u):[],Ze;if(Nn&&u!==void 0){let pe=g6e(h,u,F(ia(te,u),""));Ze=pe.length!==0?b(T7,{steps:pe}):void 0}else Ze=void 0;return L("div",{children:[Nn?L("div",{children:[b("h2",{children:It,className:_7e}),t!==void 0&&l!==void 0?t(l):null],className:v7e}):b("div",{children:b(p7e,{crumbs:Gn}),className:g7e,onClick:sa}),F(Ze,null),dn.length!==0?b("div",{children:dn.map(pe=>b("button",{children:pe.label,className:y7e,onClick:Ie=>P(ze=>pe)},pe.name)),className:b7e}):null,Nn?b(sP.make,{fill:be,children:Yt}):Yt,Nn&&r!==void 0&&l!==void 0?r(l):null,fe(N[0],null,pe=>b(ik,{isOpen:!0,onClose:()=>P(Ie=>{}),title:pe.label,children:b(Nk,{schema:pe.schema,aggregateId:l,aggregateIdField:pe.aggregateIdField,ownerField:pe.ownerField,ownerValue:pe.ownerValue,refFields:pe.refFields,onSubmit:Ie=>_!==void 0?$t(_(pe.mutationDocument,l_(pe.schema,Ie)).then(ze=>{if(typeof ze!="object")return ze==="Accepted"?(P(Qe=>{}),re(E,Qe=>Qe()),Promise.resolve("Ok")):(P(Qe=>{}),re(E,Qe=>{setTimeout(Qe,500)}),Promise.resolve("Ok"));{if(ze.TAG==="Rejected"){let Sr=ze._0;return $p(v,x,Sr.errorCode,Sr.detail).then(K=>Promise.resolve({TAG:"Err",_0:K}))}let Qe=ze._0;return console.error("[AutoUI] "+pe.name+": command not executed — "+Qe),Promise.resolve({TAG:"Err",_0:Qe})}}),ze=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(P(ze=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},pe.name+":"+F(l,""))}))],className:m7e})}let nI=F7e;function Ea(e){return"var("+e+")"}let I7e=w([z("flex"),ve("column"),c("gap",Ea(I.md))]),P7e=w([z("flex"),X("center"),Xe("spaceBetween"),c("padding-bottom",Ea(I.sm)),c("border-bottom","1px solid var("+y.border+")")]),O7e=w([c("font-size",Ea($.sizeLg)),c("font-weight",Ea($.weightMedium)),c("color",Ea(y.textPrimary)),on(Re(0))]),M7e=w([z("flex"),ei("wrap"),c("gap",Ea(I.sm))]),L7e=w([c("background",Ea(y.surface)),c("color",Ea(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",Ea(Y.md)),c("padding","var("+I.xs+") var("+I.md+")"),c("font-size",Ea($.sizeSm)),c("cursor","pointer")]);function z7e(e){let t=e.contextId,r=e.slice,n=hi(),i=vp(),o=Ia(),a=de(()=>{}),s=a[1];return L("div",{children:[b("div",{children:b("h2",{children:r.name,className:O7e}),className:P7e}),b("div",{children:r.commands.map(l=>b("button",{children:l.label,className:L7e,onClick:u=>s(d=>l)},l.name)),className:M7e}),fe(a[0],null,l=>b(ik,{isOpen:!0,onClose:()=>s(u=>{}),title:l.label,children:b(Nk,{schema:l.schema,aggregateId:t,aggregateIdField:l.aggregateIdField,injectNewId:l.level==="Collection",ownerField:l.ownerField,ownerValue:l.ownerValue,refFields:l.refFields,onSubmit:u=>i!==void 0?$t(i(l.mutationDocument,l_(l.schema,u)).then(d=>{if(typeof d=="object"){if(d.TAG==="Rejected"){let h=d._0;return $p(n,o,h.errorCode,h.detail).then(p=>Promise.resolve({TAG:"Err",_0:p}))}let f=d._0;return console.error("[AutoUI] "+l.name+": command not executed — "+f),Promise.resolve({TAG:"Err",_0:f})}return s(f=>{}),Promise.resolve("Ok")}),d=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(s(d=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},l.name+":"+F(t,""))}))],className:I7e})}let U7e=z7e;function ol(e){return"var("+e+")"}let B7e=w([z("flex"),ve("column"),c("gap",ol(I.xl))]),j7e=w([c("font-size",ol($.sizeXl)),c("font-weight",ol($.weightMedium)),c("color",ol(y.textPrimary)),on(Re(0))]),q7e=w([z("flex"),ve("column"),c("gap",ol(I.md)),c("padding",ol(I.lg)),c("background",ol(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",ol(Y.md))]);function CU(e){return e.filter(t=>pLe(t.schema,t.statusField,t.commands))}function V7e(e){let t=CU(e.views);return L("div",{children:[b("h2",{children:"Lifecycles",className:j7e}),t.length!==0?t.map(r=>b("div",{children:b(NLe,{schema:r.schema,statusField:F(r.statusField,""),commands:r.commands,title:r.name}),className:q7e},r.name)):b(_d,{title:"No lifecycles",description:"No view in this plugin declares a status enum with state-scoped commands."})],className:B7e})}let G7e=V7e;function xt(e){return"var("+e+")"}let K7e=w([z("flex"),ve("column"),c("gap",xt(I.md)),c("font-family",xt($.fontFamily))]),H7e=w([z("flex"),X("center"),c("gap",xt(I.sm)),c("color",xt(y.textSecondary)),c("font-size",xt($.sizeSm)),c("font-weight",xt($.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),W7e=w([z("inlineFlex"),X("center"),c("padding","0 6px"),c("border-radius",xt(Y.full)),c("background",xt(y.surfaceElevated)),c("color",xt(y.textPrimary)),c("font-size",xt($.sizeXs)),c("letter-spacing","0")]),J7e=w([z("flex"),ve("column"),c("gap",xt(I.md))]),Q7e=w([z("flex"),X("flexStart"),c("gap",xt(I.sm))]),Y7e=w([z("flex"),ve("column"),c("gap","2px"),c("min-width","0"),Vn(1)]),X7e=w([z("flex"),X("baseline"),c("gap",xt(I.sm))]),Z7e=w([c("color",xt(y.textPrimary)),c("font-size",xt($.sizeSm)),c("font-weight",xt($.weightMedium))]),eUe=w([c("color",xt(y.textDisabled)),c("font-size",xt($.sizeXs))]),tUe=w([c("color",xt(y.textPrimary)),c("font-size",xt($.sizeSm)),c("line-height",xt($.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word")]),rUe=w([c("color",xt(y.textDisabled)),c("font-size",xt($.sizeSm)),c("padding","var("+I.sm+") 0")]),nUe=w([z("flex"),ve("column"),X("flexEnd"),c("gap",xt(I.sm))]),iUe=w([c("width","100%"),c("min-height","64px"),c("padding",xt(I.sm)),c("background",xt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",xt(Y.md)),c("color",xt(y.textPrimary)),c("font-family",xt($.fontFamily)),c("font-size",xt($.sizeSm)),c("resize","vertical")]),oUe=w([c("background",xt(y.brand)),c("border","none"),c("border-radius",xt(Y.md)),c("color",xt(y.textOnBrand)),c("padding","4px var("+I.md+")"),c("font-size",xt($.sizeSm)),c("font-weight",xt($.weightMedium)),Ce("pointer"),QI([c("opacity","0.5"),Ce("default")])]),aUe=w([c("color",xt(y.error)),c("font-size",xt($.sizeXs)),c("align-self","flex-start")]);function sUe(e){let t=e.comment,r=t.timestamp;return L("div",{children:[b(bd,{name:F(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[b("span",{children:F(t.author,"Unknown"),className:Z7e}),r!==void 0?b("span",{children:kv(e.nowMs,r),className:eUe}):null],className:X7e}),b("span",{children:t.body,className:tUe})],className:Y7e})],className:Q7e})}function lUe(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,a=e.title,s=e.comments,l=a!==void 0?a:"Comments",u=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=de(()=>""),p=h[1],m=h[0],g=m.trim(),v=g!==""&&!d,_=()=>{if(v)return re(i,x=>x(g)),p(x=>"")};return L("div",{children:[L("div",{children:[l,b("span",{children:s.length.toString(),className:W7e})],className:H7e}),s.length===0?b("div",{children:u,className:rUe}):b("div",{children:s.map(x=>b(sUe,{comment:x,nowMs:f},x.id)),className:J7e}),i!==void 0?L("div",{children:[b("textarea",{className:iUe,disabled:d,placeholder:"Write a comment…",value:m,onKeyDown:x=>{if(x.key==="Enter"&&(x.metaKey||x.ctrlKey))return x.preventDefault(),_()},onChange:x=>{let S=x.target.value;p(E=>S)}}),r!==void 0?b("span",{children:r,className:aUe}):null,b("button",{children:d?"Posting…":"Comment",className:oUe,disabled:!v,onClick:x=>_()})],className:nUe}):null],className:K7e})}let uUe=lUe;function cUe(e){let t=e.entityId,r=e.binding,n=hi(),i=vp(),o=Ia(),a=Tl(),s=fe(e.requiredAccess,!1,_=>!a(_)),l=Ru(r.readModel,!s),u=de(()=>!1),d=u[1],f=de(()=>{}),h=f[1],p=_=>{let x=r.postCommand;if(i!==void 0&&x!==void 0){d(S=>!0),h(S=>{}),$t(i(x.mutationDocument,HDe(r,t,_)).then(S=>{if(d(E=>!1),typeof S!="object")return l.refetch(),Promise.resolve();{if(S.TAG==="Rejected"){let k=S._0;return $p(n,o,k.errorCode,k.detail).then(R=>(h(T=>R),Promise.resolve()))}let E=S._0;return console.error("[AutoUI] comment not posted — "+E),h(k=>E),Promise.resolve()}}),S=>(d(E=>!1),h(E=>"Could not post the comment."),Promise.resolve()));return}};if(s)return null;let m=KDe(r,l.rows,t),g=r.postCommand;return b(uUe,{comments:m,onPost:n!==void 0&&g!==void 0?p:void 0,posting:u[0],error:f[0]})}let dUe=cUe;function Yn(e){return"var("+e+")"}let fUe=w([z("flex"),ve("column"),c("gap",Yn(I.lg))]),hUe=w([z("flex"),X("center"),Xe("spaceBetween"),c("gap",Yn(I.md))]),pUe=w([c("font-size",Yn($.sizeXl)),c("font-weight",Yn($.weightMedium)),c("color",Yn(y.textPrimary)),on(Re(0))]),mUe=w([z("flex"),ei("wrap"),X("center"),c("gap",Yn(I.md)),c("font-size",Yn($.sizeSm)),c("color",Yn(y.textSecondary))]),gUe=w([z("inlineFlex"),X("center"),c("gap","4px"),Ce("pointer")]);function vUe(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let iI=w([c("font-size",Yn($.sizeXs)),c("color",Yn(y.textDisabled))]),_Ue=w([z("flex"),X("center"),c("gap",Yn(I.sm))]),bUe=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Yn(Y.sm)),c("padding","2px var("+I.sm+")"),c("color",Yn(y.textSecondary)),c("font-size",Yn($.sizeSm)),Ce("pointer"),je([c("background",Yn(y.surfaceSubtle)),c("color",Yn(y.textPrimary))])]);function yUe(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,a=t!==void 0?t:{},s=Cl(),l=Tl(),u=hi(),d=dp(),f=Ia(),h=yk(),p=de(()=>[]),m=p[1],g=p[0],v=W=>jn(W.schema,C(r,le=>ys(le,W.name)),{field:W.labelField,source:W.labelFieldSource}),_=Ru(i,!0),x=i.name,S=_.rows,E=i.schema,k=v(i),R=w0(_.canLoadMore),T=(W,le)=>s(ps(o,i.name,W,[])),A=$u,N={pluginId:o,viewName:i.name},P={readModelName:x,rows:S,schema:E,semantics:k,window:R,onOpenRow:T,role:A,ownEntity:N},O=n.map((W,le)=>{let oe=gg(a,W.readModel.name,l),Se=oe&&!g.includes(W.readModel.name),be=Ru(W.readModel,Se);return[W,le,Se,oe,be]}),D=(W,le)=>F(C(C(r,oe=>xi(oe,W.name)),oe=>oe.accent),pd[Ho(le,pd.length)]),U=ee(O,W=>{let le=W[4],oe=W[0],Se=Q7(oe.readModel.commands,oe.resourceRef),be=xk(u,d,oe.readModel.commands,oe.readModel.name,le.isLive,le.refetch,f,h.onNotice,void 0);if(W[2])return{readModelName:oe.readModel.name,rows:le.rows,schema:oe.readModel.schema,semantics:v(oe.readModel),accent:D(oe.readModel,W[1]),window:w0(le.canLoadMore),onOpenRow:(ue,xe)=>s(ps(o,oe.readModel.name,ue,[])),onCommand:G(Se,ue=>be),role:Nu,resourceRef:oe.resourceRef,assignCommand:Se,ownEntity:{pluginId:o,viewName:oe.readModel.name}}}),B=[P].concat(U),q=(_.canLoadMore?[i.name]:[]).concat(ee(O,W=>{if(W[2]&&W[4].canLoadMore)return W[0].readModel.name})),Q=()=>{_.canLoadMore&&_.loadMore(),O.forEach(W=>{let le=W[4];if(W[2]&&le.canLoadMore)return le.loadMore()})},J=_.fetchState,te,ae=0;typeof J!="object"?te=J==="Loading"?[i.name+": loading…"]:[]:ae=1,ae===1&&(te=[i.name+": "+J._0]);let Z=te.concat(ee(O,W=>{let le=W[0],oe=W[4].fetchState;if(W[2])return typeof oe!="object"?oe==="Loading"?le.readModel.name+": loading…":void 0:(oe.TAG,le.readModel.name+": "+oe._0)}).concat(ek(a,n.map(W=>W.readModel.name),l)));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:pUe}),className:hUe}),b("div",{children:O.filter(W=>W[3]).map(W=>{let le=W[0];return L("label",{children:[b("input",{checked:W[2],type:"checkbox",onChange:oe=>{let Se=le.readModel.name;m(be=>be.includes(Se)?be.filter(ue=>ue!==Se):be.concat([Se]))}}),b("span",{className:vUe(D(le.readModel,W[1]))}),le.readModel.name],className:gUe},le.readModel.name)}),className:mUe}),h.element,e.mode.render(B),q.length!==0?L("div",{children:[b("button",{children:"Load more",className:bUe,onClick:W=>Q()}),b("span",{children:"More rows available: "+q.join(", "),className:iI})],className:_Ue}):null,Z.length!==0?b("span",{children:Z.join(" · "),className:iI}):null],className:fUe})}let xUe=yUe;function SUe(e){return e}function oI(e){return e.map(t=>({name:t.name,schema:t.schema,commands:t.commands,declaredLabelField:t.labelField,declaredLabelSource:t.labelFieldSource}))}function Ik(e){if(typeof e=="object")return"heuristic:"+e._0;switch(e){case"Annotation":return"annotation";case"Type":return"type";case"Hint":return"hint"}}function RU(e,t,r){return t!==void 0?Object.entries(LLe(e.schema,t,e.commands,C(r,n=>n.transitions))):[]}function AU(e){return G(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function TU(e,t){return fe(Du(e.declaredLabelSource,r=>Ne(e.declaredLabelField,t)),t,r=>t+" ("+r+")")}function $U(e,t){if(t.TAG==="Pair"){let n=t.endField,i=t.startField;return n!==void 0?i+".."+n:i}let r=t._0;return fe(M(e.semantics,r),r,n=>r+" ("+Ik(n.provenance)+")")}function NU(e,t){if(t.TAG==="Paired")return t.latField+"/"+t.lngField;let r=t._0;return fe(M(e.semantics,r),r,n=>r+" ("+Ik(n.provenance)+")")}function wUe(e,t,r){let n=e.name,i=e.schema,o=jn(i,t,AU(e)),a=Pe(o.semantics).map(d=>{let f=d[1];return Ye([["field",d[0]],["semantic",yd(f.semantic)],["provenance",Ik(f.provenance)]])}),s=[];re(o.geo,d=>{s.push(["geo",NU(o,d)])}),re(o.dateSpan,d=>{s.push(["dateSpan",$U(o,d)])}),re(o.statusField,d=>{s.push(["status",d])}),re(o.labelField,d=>{s.push(["label",TU(e,d)])}),re(o.imageField,d=>{s.push(["image",d])}),re(o.parentField,d=>{s.push(["parent",d])});let l=Bw(i).map(d=>d.id),u=RU(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+DLe(f.tier)+")"]});return Ye([["view",n],["capableModes",l],["roles",Ye(s)],["transitions",Ye(u)],["fields",a]])}function DU(e,t,r,n){return Ye([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(SUe)],["views",t.map(o=>wUe(o,C(r,a=>ys(a,o.name)),C(r,a=>xi(a,o.name))))]])}function EUe(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=jn(i,C(t,m=>ys(m,n)),AU(r)),a=Bw(i).map(m=>m.id).join(", "),s=[];re(o.geo,m=>{s.push("geo="+NU(o,m))}),re(o.dateSpan,m=>{s.push("dateSpan="+$U(o,m))}),re(o.statusField,m=>{s.push("status="+m)}),re(o.labelField,m=>{s.push("label="+TU(r,m))}),re(o.imageField,m=>{s.push("image="+m)}),re(o.parentField,m=>{s.push("parent="+m)});let l=s.length===0?"":"; "+s.join("; "),u=Object.keys(o.semantics).length,d=RU(r,o.statusField,C(t,m=>xi(m,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"";return n+": modes "+a+l+p+"; "+u.toString()+" field semantic(s)"})}function kUe(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),EUe(t,r).forEach(o=>{console.log(" "+o)}),console.log(JSON.stringify(DU(e,t,r,i),null,2))}function Xy(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function CUe(e,t,r){return"/"+Xy(e)+"/"+Xy(t)+"/"+Xy(r)}function RUe(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function AUe(e){let t=me.object(e);if(t===void 0)return;let r=o=>C(t[o],me.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:F(C(t.sentAt,me.float),0),body:F(t.body,null)}}function TUe(e,t,r,n,i){let o=n!==void 0?n:!0,a=yv(),s=C(a,h=>h.clientNamespace()),l=o&&De(s)&&fe(a,!1,h=>h.clientChannelsAvailable()),u=s!==void 0?CUe(s,e,t):void 0,d=Fe(i);return d.current=i,$e(()=>{let h=l?a:void 0;if(h!==void 0&&u!==void 0)return h.subscribe("Domain",u,p=>{let m=AUe(p);if(m!==void 0&&m.senderId!==r)return d.current(m)})},[l,F(u,""),r]),{available:l,publish:(h,p)=>{let m=l?a:void 0;if(m===void 0||u===void 0)return;let g=Date.now(),v={kind:h,senderId:r,sentAt:g,body:p};m.publish("Domain",u,[RUe(v)]).then(_=>{_.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+u+" failed: "+_._0)})}}}let iS="heartbeat",oS="hello",FU="leave";function aI(e){let t=me.object(e);if(t===void 0)return;let r=i=>C(t[i],me.string),n=r("userId");if(n!==void 0&&n!=="")return[n,F(r("username"),n)]}function $Ue(e,t,r){let n=t.kind;if(n===FU){let s=aI(t.body);if(s===void 0)return e;let l=s[0];return e.filter(u=>u.userId!==l)}if(n!==iS&&n!==oS)return e;let i=aI(t.body);if(i===void 0)return e;let o=i[0];return e.filter(s=>s.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function NUe(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function DUe(e,t){return Object.fromEntries([["userId",e],["username",t]])}function FUe(e,t,r,n,i){let o="presence",a=i!==void 0?i:!0,s=de(()=>[]),l=s[1],u=Fe(void 0),f=TUe(o,t,r,a&&r!=="",m=>{if(l(v=>$Ue(v,m,Date.now())),m.kind!==oS)return;let g=u.current;if(g!==void 0){setTimeout(()=>g(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return $e(()=>{if(!h)return;let m=DUe(r,n),g=()=>p(iS,m);u.current=g,p(oS,m),p(iS,m);let v=setInterval(g,1e4);return()=>{clearInterval(v),u.current=void 0,p(FU,m)}},[h,r,n,t]),$e(()=>{if(!h)return;let m=setInterval(()=>l(g=>NUe(g,Date.now())),1e4);return()=>{clearInterval(m)}},[h]),h?s[0]:[]}function m0(e){return"var("+e+")"}let IUe=w([z("inlineFlex"),X("center"),c("gap",m0(I.xs))]),PUe=w([c("font-family",m0($.fontFamily)),c("font-size",m0($.sizeSm)),c("color",m0(y.textSecondary)),c("white-space","nowrap")]);function OUe(e){return e===1?"1 other here":e.toString()+" others here"}function MUe(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",a=r!==void 0?r:4,s=t!==void 0?t:!0;if(i.length===0)return null;let l=i.map(u=>({name:u.username,imageUrl:u.imageUrl}));return L("span",{children:[b(oP,{members:l,size:o,max:a}),s?b("span",{children:OUe(i.length),className:PUe}):null],className:IUe,title:i.map(u=>u.username).join(", ")})}let LUe=MUe;function zUe(e){let t=La(),r=C(t,s=>s.identity),n=fe(r,"",s=>s.userId),i=fe(r,"",s=>s.username),a=FUe(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(s=>({userId:s.userId,username:s.username}));return b(LUe,{people:a})}let UUe=zUe;function IU(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}let aS={contents:[]},sS={contents:[]};function PU(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!aS.contents.some(i=>i===n)){aS.contents.push(n),console.warn("[AutoUI] Entity "+n+' has labelField="id" — dropdown labels will render as raw UUIDs. Add a @displayName annotation on the source state to fix.');return}}function OU(e,t,r,n){if(r==="id"||n.length!==0&&n.some(o=>o===r))return;let i=e+"."+t;if(!sS.contents.some(o=>o===i)){sS.contents.push(i),console.warn("[AutoUI] Entity "+i+' labelField="'+r+'" is not @searchable; searchPrefix will scan the table — OK at small scale, consider annotating for production.');return}}function MU(e){let t=[];return e.forEach(r=>{let n=(o,a,s,l)=>{PU(r.id,o,s),OU(r.id,o,s,l),t.push({pluginId:r.id,name:o,queryField:a,singleQueryField:Lo(a),labelField:s})};r.readModels.forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields)),r.stateViewSlices.concat(F(r.internalQueryables,[])).forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields))}),t}function g0(e,t){let r=e.toLowerCase(),n=o=>{let a=o.length,s=e.length;if(s>a&&r.endsWith(o))return e.slice(0,s-a|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function Pk(e){return[Lo(e),Fg(e)]}function md(e,t){return e.find(r=>r.name===t)}function Ok(e,t){let r=IU(t),n=Fg(r),i=md(e,n);return i!==void 0?i:md(e,r)}function Mk(e){return ee(F(C(C(H(e),t=>M(t,"required")),Vt),[]),ce)}function LU(e,t,r,n){return ee(e.references,i=>{let o=i.fieldName.includes("[]"),a=tU(i.fieldName),s;if(a!==void 0){let g=a[1],v=C(C(M(n,a[0]),H),rU),_=C(C(C(C(v,H),x=>M(x,"properties")),H),x=>M(x,g));s=_!==void 0?[_,!0,F(G(v,Mk),[]).some(x=>x===g)]:[void 0,!1,!1]}else s=o?[void 0,!1,!1]:[M(n,i.fieldName),!0,r.some(g=>g===i.fieldName)];let l=C(s[0],H),u=C(C(l,g=>M(g,"type")),ce),d=Ne(u,"array"),f=i.plugin,h=f!==void 0?t.filter(g=>g.pluginId===f):t,p=md(h,i.entity),m=p!==void 0?p:Ok(h,i.entity);if(s[1]){if(m!==void 0){let g=Pk(m.name);return{propertyKey:i.fieldName,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:d,required:s[2],entityName:g[0],entityNamePlural:g[1]}}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+': explicit @ref to "'+i.entity+'" did not resolve to a registered entity. Falling back to text input.');return}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+": explicit @ref path does not name a property of a record array on this command. Falling back to text input.")})}function zU(e,t,r,n,i,o){let a=[];return i!==void 0&&Pe(i).forEach(s=>{let l=s[0],u=H(s[1]);if(De(C(u,S=>M(S,"const"))))return;let f=C(C(u,S=>M(S,"type")),ce),h=C(C(C(C(u,S=>M(S,"items")),H),S=>M(S,"type")),ce),p;if(f!==void 0)switch(f){case"array":p=h==="string"?!0:void 0;break;case"string":p=!1;break;default:p=void 0}else p=void 0;if(p===void 0)return;let m=!1;if(e.level==="Collection"&&!p){let S;if(t!==void 0)if(Ne(e.aggregateIdField,l))S=!0;else{let E=g0(l,!1);S=E!==void 0?E.toLowerCase()===t.name.toLowerCase():!1}else S=Ne(e.aggregateIdField,l);m=S}if(m)return;let g=e.aggregateIdField,v;if(g!==void 0&&t!==void 0&&g===l&&!p){let S=md(r,Fg(t.name));v=S!==void 0?S:md(r,t.name)}else v=void 0;let _;if(v!==void 0)_=v;else{let S=g0(l,p);_=S!==void 0?Ok(r,S):void 0}if(_!==void 0){_.pluginId!==o&&console.warn("[AutoUI] Command "+e.name+" field "+l+' resolved cross-plugin to "'+_.name+'" in plugin "'+_.pluginId+'" via naming heuristic. Add @ref("'+_.pluginId+"."+_.name+'") to make the cross-plugin reference explicit, or @ref("<LocalEntity>") to target a same-plugin entity.');let S=Pk(_.name),E=_.queryField,k=_.singleQueryField,R=_.labelField,T=n.some(O=>O===l),A=S[0],N=S[1],P={propertyKey:l,queryField:E,singleQueryField:k,labelField:R,multi:p,required:T,entityName:A,entityNamePlural:N};a.push(P);return}if(g0(l,p)!==void 0){console.warn("[AutoUI] Command "+e.name+" field "+l+" looks like a reference but no matching entity was registered. Falling back to text input.");return}}),a}function Lk(e,t,r,n){let i=Mk(e.schema),o=C(C(H(e.schema),s=>M(s,"properties")),H);if(e.references.length===0)return zU(e,t,r,i,o,n);let a=F(o,{});return LU(e,r,i,a)}function UU(e,t){let r=(i,o)=>{let a={...i};return a.refFields=Lk(i,o,t,e.id),a},n={...e};return n.stateChangeSlices=e.stateChangeSlices.map(i=>({name:i.name,commands:i.commands.map(o=>r(o,void 0)),linkedViews:i.linkedViews,consistencyRead:i.consistencyRead})),n.aggregates=e.aggregates.map(i=>({name:i.name,schema:i.schema,commands:i.commands.map(o=>r(o,i)),linkedViews:i.linkedViews})),n.readModels=e.readModels.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n}let BUe={capitalize:IU,singularize:Lo,warnedIdLabel:aS,warnedUnsearchable:sS,warnIfIdLabel:PU,warnIfUnsearchable:OU,buildRegistry:MU,stemFromKey:g0,entityDisplayNames:Pk,findByName:md,findByStem:Ok,requiredSet:Mk,resolveExplicitRefs:LU,resolveByHeuristic:zU,resolveForCommand:Lk,enrichPlugin:UU};function c_(e){let t=me.object(e);if(t===void 0)return;let r=C(t.properties,me.object);if(r!==void 0)return r;let n=C(C(C(t.items,me.object),i=>i.properties),me.object);return n!==void 0?n:nt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:C(C(t[o],me.array),a=>nt(a,void 0,(s,l)=>s!==void 0?s:c_(l))))}function BU(e,t,r){let n=t!==void 0?t:3,i=r!==void 0?r:!0,o=Object.keys(e);return(i&&!o.includes("id")?["id"].concat(o):o).map(s=>{if(n<=0)return s;let l=C(e[s],c_);return l!==void 0?s+" { "+BU(l,n-1|0,!1)+" }":s}).join(" ")}function jUe(e,t){return Object.keys(e).filter(i=>{let o=e[i];return o!==void 0?Wr(c_(o)):!0}).join(" ")}function jU(e,t,r){let n=Object.keys(e),i=n.includes("id")?n:["id"].concat(n);return ee(i,o=>{let a=e[o];if(a===void 0)return o;let s=c_(a);if(s===void 0)return o;let l=jUe(s);if(l!=="")return o+" { "+l+" }"}).join(" ")}function d_(e){return F(C(C(me.object(e),t=>t.properties),me.object),{})}function sI(e,t,r,n,i,o){let a=n!==void 0?n:!1,s=i!==void 0?i:!1,l=o!==void 0?o:!1,u=jU(d_(t)),d=a||l,f=["$first: Int","$after: String","$last: Int","$before: String"],h=["first: $first","after: $after","last: $last","before: $before"],p;if(r!==void 0){let v=d?["$filter: "+r+"Filter"].concat(f):f,_=d?["filter: $filter"].concat(h):h,x=s?v.concat(["$orderBy: "+r+"OrderBy"]):v,S=s?_.concat(["orderBy: $orderBy"]):_;p=[x,S]}else p=[f,h];let m=p[0].join(", "),g=p[1].join(", ");return"query("+m+") { "+e+"("+g+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+u+" } } } }"}function lI(e,t){let r=BU(d_(t),void 0,void 0),n=kS(t);return n!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+n+": $subId) { "+r+" } }":"query($id: ID!) { "+e+"(id: $id) { "+r+" } }"}function qUe(e,t){let r=jU(d_(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function VUe(e){return ES(e).length===0?Wr(kS(e)):!1}function GUe(e){let t=Object.keys(d_(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function KUe(e,t,r,n,i,o,a,s,l,u,d,f,h){let p=[],m=i!==void 0?i:[],g=o!==void 0?o:[],v=a!==void 0?a:[],_=s!==void 0?s:[],x={},S=u!==void 0?u:{},E=d!==void 0?d:{},k=fe(f,[],K=>qae(K,e,g)),R=m.length===0?[e]:m,T=MU(R),A=UU(e,T),N={},P=(K,ye)=>{let He=M(N,K);He!==void 0?N[K]=He.concat(ye):N[K]=ye};A.aggregates.forEach(K=>{K.linkedViews.forEach(ye=>P(ye,K.commands))}),A.stateChangeSlices.forEach(K=>{let ye=K.commands.filter(Ee=>Ee.level==="Collection"),He=K.commands.filter(Ee=>Ee.level==="Instance");K.linkedViews.forEach(Ee=>P(Ee,ye)),re(K.consistencyRead,Ee=>P(Ee,He))});let O=[],D=cu(),U=A.id,B=(K,ye,He,Ee,we,lt)=>{let ft=VUe(K.schema),bt=ft?K.queryField+"ByIds":void 0,wt=ft?qUe(K.queryField,K.schema):void 0,Xt=GUe(K.schema),Kt=VH(K.schema),Et=K.name,mt=Ya(Bs(U,Et)),Tr=M(S,Et),la=He+Et,ti=bf(A.name,Et,K.sortIndex,C(f,Pt=>xi(Pt,Et))),ri={fragmentId:la,title:Et,menuEntry:ti,requiredAccess:Tr,url:mt},eo=q4e(C(f,Pt=>xi(Pt,Et)),R,(Pt,Br,jr)=>{let Fr={...Pt};return Fr.refFields=Lk(Pt,Br,T,jr),Fr}),Zt=U+"."+Et,at=(Pt,Br)=>b(B5e,{readModel:K,detailView:ye,pluginId:U,openRowId:Pt,drillPath:Br,singleQueryField:Ee,detailQueryDocument:we,byIdsQueryField:bt,byIdsQueryDocument:wt,sortKeyField:Xt,liveOffered:Kt,uiHints:f,schedulerJoin:lt,rowActions:eo},Zt);return O.push(hc(mc(U,Et),Pt=>{let Br=gW(Pt);return b(jm,{definition:ri,children:at(Br[0],Br[1])})})),yj(D,U,Et,Bs(U,Et)),ri},q=A.readModels.filter(K=>!v.includes(K.name)).map(K=>{let ye=F(M(N,K.name),K.commands),He=Lo(K.queryField),Ee=tS(K.schema);if(K.queryDocument===""){let lt={...K};return lt.commands=ye,lt.queryDocument=sI(K.queryField,K.schema,He,Ee.hasFilter,Ee.hasSort,Ee.hasSearch),lt}let we={...K};return we.commands=ye,we}),Q=A.stateViewSlices.filter(K=>!v.includes(K.name)).map(K=>{let ye=F(M(N,K.name),[]),He=Lo(K.queryField),Ee=tS(K.schema),we=sI(K.queryField,K.schema,He,Ee.hasFilter,Ee.hasSort,Ee.hasSearch);return{name:K.name,schema:K.schema,queryDocument:we,queryField:K.queryField,sortIndex:K.sortIndex,commands:ye,linkedWriteSide:K.linkedWriteSide,labelField:K.labelField,labelFieldSource:K.labelFieldSource,searchableFields:K.searchableFields,statusField:K.statusField,ownerField:K.ownerField}}),J=KLe(q.concat(Q),f,(K,ye)=>{console.warn("[AutoUI] "+A.id+': scheduler canvas "'+K+'" has '+ye.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),te={...A};te.readModels=q;let ae=K=>G(GDe(te,K),ye=>{let He=M(S,ye.readModel.name);return Ee=>b(dUe,{binding:ye,entityId:Ee,requiredAccess:He})}),Z=K=>{let ye=F(f,sx),He=Gae(xi(ye,K.name),pDe(K.schema));return G(mDe(K,He),Ee=>{let we=M(S,K.name);return lt=>b(X9e,{binding:Ee,entityId:lt,requiredAccess:we})})},W=K=>{let ye=F(f,sx);if(Kae(xi(ye,K.name)))return He=>b(UUe,{readModel:K.name,entityId:He})},le=K=>{let ye=ae(K.name),He=Z(K);if(!(ye===void 0&&He===void 0))return Ee=>L(Lr,{children:[fe(ye,null,we=>we(Ee)),fe(He,null,we=>we(Ee))]})},oe=q.map(K=>{let ye=Lo(K.queryField),He=lI(ye,K.schema),Ee=F(G(ee(K.linkedWriteSide,ft=>A.aggregates.find(bt=>bt.name===ft))[0],ft=>ft.commands),K.commands),we=M(x,K.name);return B(K,we!==void 0?we:(ft,bt,wt)=>b(nI,{data:wt,schema:K.schema,rootLabel:K.name,commands:Ee,statusField:K.statusField,aggregateId:ft,labelField:K.labelField,drillPath:bt,pluginId:A.id,viewName:K.name,uiHints:f,entityPanel:le(K),headerAccessory:W(K)}),A.id+".",ye,He,M(J,K.name))}),Se=Q.map(K=>{let ye=Lo(K.queryField),He=lI(ye,K.schema),Ee=M(x,K.name);return B(K,Ee!==void 0?Ee:(lt,ft,bt)=>b(nI,{data:bt,schema:K.schema,rootLabel:K.name,commands:K.commands,statusField:K.statusField,aggregateId:lt,labelField:K.labelField,drillPath:ft,pluginId:A.id,viewName:K.name,uiHints:f,entityPanel:le(K),headerAccessory:W(K)}),A.id+".slice.",ye,He,M(J,K.name))}),be=A.stateChangeSlices.filter(K=>!_.includes(K.name)).map(K=>({fragmentId:A.id+".commands."+K.name,title:K.name,description:"Auto-generated command panel for "+K.name,extensionPackage:A.id,positions:p,component:ye=>b(U7e,{slice:K,contextId:ye.contextId}),requiredAccess:M(E,K.name),minWidth:void 0})),ue=q.concat(Q).toSorted((K,ye)=>K.sortIndex===ye.sortIndex?Wc(K.name,ye.name):dS(K.sortIndex,ye.sortIndex));De(qw("autoui.inferenceReport"))&&kUe(A.id,oI(ue),f,k),re(h,K=>K(DU(A.id,oI(ue),f,k)));let xe=ue.map(K=>[K,jn(K.schema,void 0,void 0)]),ot=ee(ig(),K=>{let ye=K.arity;if(!(typeof ye!="object"||ye.TAG!=="Multi"))return[K,ye.min]}).flatMap(K=>{let ye=K[1],He=K[0],Ee={};return xe.forEach(we=>{let lt=we[0],ft=C(f,Kt=>xi(Kt,lt.name)),bt=fe(C(ft,Kt=>Kt.suppress),!1,Kt=>Kt.includes(He.id));if(!(He.isCapable(lt.schema,we[1])&&!bt))return;let wt=F(C(ft,Kt=>Kt.canvas),He.label),Xt=M(Ee,wt);Xt!==void 0?Xt.push(lt):Ee[wt]=[lt]}),ee(Pe(Ee),we=>{let lt=we[1];if(lt.length>=ye)return[He,we[0],lt]})}),rr=(K,ye)=>ot.some(He=>He[1]===ye?He[0].id!==K.id:!1)?ye+" — "+K.label:ye,It=ot.map(K=>{let ye=K[2],He=K[0],Ee=rr(He,K[1]),we=A.id+".canvas."+Ee,lt=bf(A.name,Ee,900,void 0),ft=RD(S,ye.map(Xt=>Xt.name)),bt=Ya(Bs(U,Ee)),wt={fragmentId:we,title:Ee,menuEntry:lt,requiredAccess:ft,url:bt};return O.push(hc(mc(U,Ee),Xt=>b(jm,{definition:wt,children:b(l7e,{pluginId:U,mode:He,canvasName:Ee,readModels:ye,uiHints:f,viewAccess:S})}))),wt}),mi=ee(ig(),K=>{let ye=K.arity;if(!(typeof ye!="object"||ye.TAG==="Multi"))return[K,ye._0]}).flatMap(K=>{let ye=K[1],He=K[0],Ee={},we={},lt=(Xt,Kt,Et)=>{let mt=M(Xt,Kt);mt!==void 0?mt.push(Et):Xt[Kt]=[Et]};ue.forEach(Xt=>{let Kt=C(f,Tr=>xi(Tr,Xt.name)),Et=F(C(Kt,Tr=>Tr.canvas),He.label),mt=C(Kt,Tr=>Tr.role);if(mt!==void 0)return mt===$u?lt(Ee,Et,Xt):mt===Nu?re(C(Kt,Tr=>Tr.resourceRef),Tr=>lt(we,Et,[Xt,Tr])):void 0});let ft=(Xt,Kt)=>fe(ye.find(Et=>Et.role===Xt),Kt,Et=>Et.min),bt=ft($u,1),wt=ft(Nu,1);return ee(Pe(Ee),Xt=>{let Kt=Xt[1],Et=Xt[0],mt=F(M(we,Et),[]),Tr=Kt[0];if(Tr===void 0||!(Kt.length>=bt&&mt.length>=wt))return;let la=mt.map(at=>({readModel:at[0],resourceRef:at[1]})),ti=A.id+".scheduler."+Et,fn=bf(A.name,Et,910,void 0),ri=IDe(S,Tr.name),eo=Ya(Bs(U,Et)),Zt={fragmentId:ti,title:Et,menuEntry:fn,requiredAccess:ri,url:eo};return O.push(hc(mc(U,Et),at=>b(jm,{definition:Zt,children:b(xUe,{pluginId:U,canvasName:Et,mode:He,resource:Tr,events:la,uiHints:f,viewAccess:S})}))),Zt})}),Gn=q.concat(Q).flatMap(K=>UH(K.schema).map(ye=>({view:K.name,label:ye[2],field:ye[0],aggregate:ye[1]}))),sa=q.concat(Q).flatMap(K=>uW(K.schema,C(f,ye=>ys(ye,K.name))).map(ye=>({view:K.name,field:ye,aggregate:"sum"}))),Yt=F(C(f,K=>K.dashboard),[]),Nn=Yt.map(K=>[K.view,F(K.field,"")]),dn=(K,ye)=>!K.some(He=>He[0]===ye.view?He[1]===F(ye.field,""):!1),Ze=Gn.filter(K=>dn(Nn,K)),pe=Nn.concat(Ze.map(K=>[K.view,F(K.field,"")])),Ie=Yt.concat(Ze).concat(sa.filter(K=>dn(pe,K))),ze;if(Ie.length!==0){let K="Dashboard",ye=q.concat(Q),He=A.id+".dashboard",Ee=bf(A.name,K,-100,void 0),we=RD(S,nt(Ie.map(bt=>bt.view),[],(bt,wt)=>bt.includes(wt)?bt:bt.concat([wt])).filter(bt=>ye.some(wt=>wt.name===bt))),lt=Ya(Bs(U,K)),ft={fragmentId:He,title:K,menuEntry:Ee,requiredAccess:we,url:lt};O.push(hc(mc(U,K),bt=>b(jm,{definition:ft,children:b(z9e,{pluginId:U,metrics:Ie,readModels:ye,uiHints:f,viewAccess:S})}))),ze=[ft]}else ze=[];let Qe=CU(q.concat(Q)),Sr;if(Qe.length!==0){let K="Lifecycles",ye=A.id+".lifecycles",He=bf(A.name,K,-50,void 0),Ee=Ya(Bs(U,K)),we={fragmentId:ye,title:K,menuEntry:He,requiredAccess:void 0,url:Ee};O.push(hc(mc(U,K),lt=>b(G7e,{views:Qe}))),Sr=[we]}else Sr=[];return{pages:ze.concat(Sr.concat(oe.concat(Se.concat(It.concat(mi))))),panels:be,routes:O,publicLinks:D}}function HUe(e,t){if(e.length===0)return"Unknown";let r=t.filter(n=>e.includes(n));return r.length!==0?{TAG:"Elevated",_0:r}:"Scoped"}function WUe(e,t){let r=H(e);if(r===void 0)return e;let n=C(M(r,"properties"),H);if(n===void 0)return e;let i=C(M(n,t),H);if(i===void 0)return e;let o=Ye(Pe(i));o["x-reventless-hidden"]=!0;let a=Ye(Pe(n));a[t]=o;let s=Ye(Pe(r));return s.properties=a,s}function JUe(e,t,r){let n=H(e);if(n===void 0)return e;let i={};i.field=t,i.as=r.map(a=>a);let o=Ye(Pe(n));return o["x-reventless-owner-unscoped"]=i,o}function QUe(e,t,r){if(typeof e!="object"){if(e==="Unknown"||t==="")return r;let n=o=>o.map(a=>{if(a.ownerField===void 0)return a;let l={...a};return l.ownerValue=t,l}),i=(o,a)=>a!==void 0?WUe(o,a):o;return r.map(o=>{let a={...o};return a.internalQueryables=G(o.internalQueryables,s=>s.map(l=>{let u={...l};return u.schema=i(l.schema,l.ownerField),u})),a.stateChangeSlices=o.stateChangeSlices.map(s=>({name:s.name,commands:n(s.commands),linkedViews:s.linkedViews,consistencyRead:s.consistencyRead})),a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.aggregates=o.aggregates.map(s=>({name:s.name,schema:s.schema,commands:n(s.commands),linkedViews:s.linkedViews})),a.readModels=o.readModels.map(s=>{let l={...s};return l.commands=n(s.commands),l.schema=i(s.schema,s.ownerField),l}),a})}else{let n=e._0,i=(o,a)=>a!==void 0?JUe(o,a,n):o;return r.map(o=>{let a={...o};return a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a})}}let uI=new Map;function YUe(e,t){let r=uI.get(e);if(!(r!==void 0?r===t:!1)){vI.registerRemotes([{name:e,entry:t}]),uI.set(e,t);return}}async function XUe(e,t,r){YUe(e,r);try{let n=await vI.loadRemote(e+"/"+t);return n==null?{TAG:"Error",_0:"Module Federation returned null for "+e+"/"+t+" — the plugin's vite federation config probably doesn't expose this fragment."}:{TAG:"Ok",_0:n.default}}catch(n){let i=dl(n);if(i.RE_EXN_ID!==Rg)return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r};let o=F(i._1.message,"unknown error");return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r+": "+o}}}const ZUe=ar(null),Zy={didCatch:!1,error:null};class eBe extends wB{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Zy}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(Zy)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&tBe(t.resetKeys,i)){var o,a;(o=(a=this.props).onReset)===null||o===void 0||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Zy)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:a}=this.state;let s=t;if(o){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(l);else if(n)s=br(n,l);else if(i!==void 0)s=i;else throw a}return br(ZUe.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function tBe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}function rBe(e){let t=F(e.error.message,"unknown error");return b("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function nBe(e,t){console.error("Fragment crashed:",e)}function iBe(e){let t=e.fallbackComponent;return br(eBe,{FallbackComponent:t!==void 0?t:rBe,onError:nBe,children:e.children})}let oBe=iBe;function aBe(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=de(()=>"Loading"),o=i[1],a=i[0];return $e(()=>{o(l=>"Loading");let s={contents:!1};return XUe(n,r,t).then(l=>{if(s.contents)return;if(l.TAG==="Ok"){let d=l._0;return o(f=>({TAG:"Loaded",_0:d}))}let u=l._0;o(d=>({TAG:"Failed",_0:u}))}),()=>{s.contents=!0}},[n,r,t]),typeof a!="object"?b("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):a.TAG==="Loaded"?b(oBe,{children:br(a._0,e.panelProps)}):b("div",{children:"Panel error: "+a._0,style:{color:"#a00",padding:"0.75rem"}})}let sBe=aBe;function bi(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Vl(e){return bi(e)==="object"}function lBe(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function cI(e,t){return e.length<124?e:t}const uBe="graphql-transport-ws";var Oi;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(Oi||(Oi={}));var Kr;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(Kr||(Kr={}));function qU(e){if(!Vl(e))throw new Error(`Message is expected to be an object, but got ${bi(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${bi(e.type)}`);switch(e.type){case Kr.ConnectionInit:case Kr.ConnectionAck:case Kr.Ping:case Kr.Pong:{if(e.payload!=null&&!Vl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case Kr.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Vl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${bi(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${bi(e.payload.query)}`);if(e.payload.variables!=null&&!Vl(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${bi(e.payload.variables)}`);if(e.payload.operationName!=null&&bi(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${bi(e.payload.operationName)}`);if(e.payload.extensions!=null&&!Vl(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${bi(e.payload.extensions)}`);break}case Kr.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Vl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${bi(e.payload)}`);break}case Kr.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!lBe(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case Kr.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function cBe(e,t){return qU(typeof e=="string"?JSON.parse(e,t):e)}function Sf(e,t){return qU(e),JSON.stringify(e,t)}var Hc=function(e){return this instanceof Hc?(this.v=e,this):new Hc(e)},dBe=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(m){return Promise.resolve(m).then(p,f)}}function s(p,m){n[p]&&(i[p]=function(g){return new Promise(function(v,_){o.push([p,g,v,_])>1||l(p,g)})},m&&(i[p]=m(i[p])))}function l(p,m){try{u(n[p](m))}catch(g){h(o[0][3],g)}}function u(p){p.value instanceof Hc?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,m){p(m),o.shift(),o.length&&l(o[0][0],o[0][1])}};function fBe(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:a=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(Q){let J=1e3;for(let te=0;te<Q;te++)J*=2;await new Promise(te=>setTimeout(te,J+Math.floor(Math.random()*2700+300)))},shouldRetry:f=e1,isFatalConnectionProblem:h,on:p,webSocketImpl:m,generateID:g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Q=>{const J=Math.random()*16|0;return(Q=="x"?J:J&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:_}=e;let x;if(m){if(!pBe(m))throw new Error("Invalid WebSocket implementation provided");x=m}else typeof WebSocket<"u"?x=WebSocket:typeof global<"u"?x=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(x=window.WebSocket||window.MozWebSocket);if(!x)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const S=x,E=(()=>{const q=(()=>{const J={};return{on(te,ae){return J[te]=ae,()=>{delete J[te]}},emit(te){var ae;"id"in te&&((ae=J[te.id])===null||ae===void 0||ae.call(J,te))}}})(),Q={connecting:p?.connecting?[p.connecting]:[],opened:p?.opened?[p.opened]:[],connected:p?.connected?[p.connected]:[],ping:p?.ping?[p.ping]:[],pong:p?.pong?[p.pong]:[],message:p?.message?[q.emit,p.message]:[q.emit],closed:p?.closed?[p.closed]:[],error:p?.error?[p.error]:[]};return{onMessage:q.on,on(J,te){const ae=Q[J];return ae.push(te),()=>{ae.splice(ae.indexOf(te),1)}},emit(J,...te){for(const ae of[...Q[J]])ae(...te)}}})();function k(q){const Q=[E.on("error",J=>{Q.forEach(te=>te()),q(J)}),E.on("closed",J=>{Q.forEach(te=>te()),q(J)})]}let R,T=0,A,N=!1,P=0,O=!1;async function D(){clearTimeout(A);const[q,Q]=await(R??(R=new Promise((ae,Z)=>(async()=>{if(N){if(await d(P),!T)return R=void 0,Z({code:1e3,reason:"All Subscriptions Gone"});P++}E.emit("connecting",N);const W=new S(typeof t=="function"?await t():t,uBe);let le,oe;function Se(){isFinite(a)&&a>0&&(clearTimeout(oe),oe=setTimeout(()=>{W.readyState===S.OPEN&&(W.send(Sf({type:Kr.Ping})),E.emit("ping",!1,void 0))},a))}k(ue=>{R=void 0,clearTimeout(le),clearTimeout(oe),Z(ue),ue instanceof dI&&(W.close(4499,"Terminated"),W.onerror=null,W.onclose=null)}),W.onerror=ue=>E.emit("error",ue),W.onclose=ue=>E.emit("closed",ue),W.onopen=async()=>{try{E.emit("opened",W);const ue=typeof r=="function"?await r():r;if(W.readyState!==S.OPEN)return;W.send(Sf(ue?{type:Kr.ConnectionInit,payload:ue}:{type:Kr.ConnectionInit},v)),isFinite(l)&&l>0&&(le=setTimeout(()=>{W.close(Oi.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Se()}catch(ue){E.emit("error",ue),W.close(Oi.InternalClientError,cI(ue instanceof Error?ue.message:new Error(ue).message,"Internal client error"))}};let be=!1;W.onmessage=({data:ue})=>{try{const xe=cBe(ue,_);if(E.emit("message",xe),xe.type==="ping"||xe.type==="pong"){E.emit(xe.type,!0,xe.payload),xe.type==="pong"?Se():s||(W.send(Sf(xe.payload?{type:Kr.Pong,payload:xe.payload}:{type:Kr.Pong})),E.emit("pong",!1,xe.payload));return}if(be)return;if(xe.type!==Kr.ConnectionAck)throw new Error(`First message cannot be of type ${xe.type}`);clearTimeout(le),be=!0,E.emit("connected",W,xe.payload,N),N=!1,P=0,ae([W,new Promise((ot,rr)=>k(rr))])}catch(xe){W.onmessage=null,E.emit("error",xe),W.close(Oi.BadResponse,cI(xe instanceof Error?xe.message:new Error(xe).message,"Bad response"))}}})())));q.readyState===S.CLOSING&&await Q;let J=()=>{};const te=new Promise(ae=>J=ae);return[q,J,Promise.race([te.then(()=>{if(!T){const ae=()=>q.close(1e3,"Normal Closure");isFinite(o)&&o>0?A=setTimeout(()=>{q.readyState===S.OPEN&&ae()},o):ae()}}),Q])]}function U(q){if(e1(q)&&(hBe(q.code)||[Oi.InternalServerError,Oi.InternalClientError,Oi.BadRequest,Oi.BadResponse,Oi.Unauthorized,Oi.SubprotocolNotAcceptable,Oi.SubscriberAlreadyExists,Oi.TooManyInitialisationRequests].includes(q.code)))throw q;if(O)return!1;if(e1(q)&&q.code===1e3)return T>0;if(!u||P>=u||!f(q)||h?.(q))throw q;return N=!0}n||(async()=>{for(T++;;)try{const[,,q]=await D();await q}catch(q){try{if(!U(q))return}catch(Q){return i?.(Q)}}})();function B(q,Q){const J=g(q);let te=!1,ae=!1,Z=()=>{T--,te=!0};return(async()=>{for(T++;;)try{const[W,le,oe]=await D();if(te)return le();const Se=E.onMessage(J,be=>{switch(be.type){case Kr.Next:{Q.next(be.payload);return}case Kr.Error:{ae=!0,te=!0,Q.error(be.payload),Z();return}case Kr.Complete:{te=!0,Z();return}}});W.send(Sf({id:J,type:Kr.Subscribe,payload:q},v)),Z=()=>{!te&&W.readyState===S.OPEN&&W.send(Sf({id:J,type:Kr.Complete},v)),T--,te=!0,le()},await oe.finally(Se);return}catch(W){if(!U(W))return}})().then(()=>{ae||Q.complete()}).catch(W=>{Q.error(W)}),()=>{te||Z()}}return{on:E.on,subscribe:B,iterate(q){const Q=[],J={done:!1,error:null,resolve:()=>{}},te=B(q,{next(Z){Q.push(Z),J.resolve()},error(Z){J.done=!0,J.error=Z,J.resolve()},complete(){J.done=!0,J.resolve()}}),ae=(function(){return dBe(this,arguments,function*(){for(;;){for(Q.length||(yield Hc(new Promise(le=>J.resolve=le)));Q.length;)yield yield Hc(Q.shift());if(J.error)throw J.error;if(J.done)return yield Hc(void 0)}})})();return ae.throw=async Z=>(J.done||(J.done=!0,J.error=Z,J.resolve()),{done:!0,value:void 0}),ae.return=async()=>(te(),{done:!0,value:void 0}),ae},async dispose(){if(O=!0,R){const[q]=await R;q.close(1e3,"Normal Closure")}},terminate(){R&&E.emit("closed",new dI)}}}class dI extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function e1(e){return Vl(e)&&"code"in e&&"reason"in e}function hBe(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function pBe(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function mBe(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return fBe({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function Gh(e,t){return C(e[t],me.string)}function jo(e,t){return F(Gh(e,t),"")}function gBe(e,t){return G(C(e[t],me.float),r=>r|0)}function vBe(e,t){return ee(F(C(e[t],me.array),[]),me.string)}function _Be(e){let t=me.object(e);return t!==void 0?{label:jo(t,"label"),icon:Gh(t,"icon"),group:Gh(t,"group"),sortOrder:F(gBe(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function bBe(e){return G(me.object(e),t=>({fragmentId:jo(t,"fragmentId"),title:jo(t,"title"),description:jo(t,"description"),positions:vBe(t,"positions"),requiredAccess:Gh(t,"requiredAccess")}))}function yBe(e){return G(me.object(e),t=>({fragmentId:jo(t,"fragmentId"),title:jo(t,"title"),menuEntry:F(G(t.menuEntry,_Be),{label:jo(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:Gh(t,"requiredAccess")}))}function xBe(e){return G(me.object(e),t=>({pluginId:jo(t,"pluginId"),remoteEntryUrl:jo(t,"remoteEntryUrl"),panels:ee(F(C(t.panels,me.array),[]),bBe),pages:ee(F(C(t.pages,me.array),[]),yBe),registeredAt:jo(t,"registeredAt"),updatedAt:jo(t,"updatedAt")}))}function SBe(e){return ee(F(C(C(C(C(me.object(e),t=>t.data),me.object),t=>t.Platform_UIFragments),me.array),[]),xBe)}let wBe=`{
101
+ Platform_UIFragments {
102
+ pluginId
103
+ remoteEntryUrl
104
+ panels { fragmentId title description positions requiredAccess }
105
+ pages {
106
+ fragmentId
107
+ title
108
+ menuEntry { label icon group sortOrder }
109
+ requiredAccess
110
+ }
111
+ registeredAt
112
+ updatedAt
113
+ }
114
+ }`;function lS(e,t){return e+"/"+t}function EBe(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(lS(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(lS(r.pluginId,i.fragmentId),n)});return}}),t}function kBe(e,t,r){return e.get(lS(t,r))}function CBe(e,t,r){return e.map(n=>{let i=kBe(r,t,n.fragmentId);return i!==void 0?{fragmentId:n.fragmentId,title:n.title,description:n.description,extensionPackage:n.extensionPackage,positions:n.positions,component:o=>b(sBe,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function fI(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return F(G([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function RBe(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>fI(n.fragmentId,e)),r.panels.map(n=>fI(n.fragmentId,e))]:[[],[]]}let VU={contents:[]};function hI(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),$t(fetch(e,{method:"POST",headers:n,body:F(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function ABe(e,t,r,n,i,o,a,s,l,u,d,f){let h=EBe(a),p=Yae(u,l,o),m=p[2],g=p[1],v=QUe(d,f,p[0]);n(BUe.buildRegistry(v)),i(ee(v,k=>G(xve(k),R=>({pluginId:k.id,binding:R}))));let _=[],x=[],S=[],E={contents:cu()};v.forEach(k=>{let R=RBe(k.id,a),T=KUe(k,void 0,void 0,void 0,v,o,R[0],R[1],void 0,g,m,s[k.id],void 0),A=CBe(T.panels,k.id,h);T.pages.forEach(N=>{_.push(N)}),A.forEach(N=>{x.push(N)}),T.routes.forEach(N=>{S.push(N)}),E.contents=i1(E.contents,T.publicLinks)}),re(e,k=>k.setPluginPages(_)),VU.contents=ee(_,k=>k.url),re(t,k=>k.setPluginPanels(x)),re(r,k=>k.setPluginRoutes(S,E.contents)),a.forEach(k=>{})}let TBe="Admin";function $Be(e,t){return Aa(C(t,r=>e.journeyManifestUrls[r]),e.manifestUrl)}function GU(e,t,r,n){if(e.manifestUrl!==void 0&&(typeof t!="object"||!r.includes(TBe)))return $Be(e,n)}function NBe(e){if(!Xme())return;let t=VU.contents,r=o=>o==="/"?!0:t.some(a=>o===a?!0:o.startsWith(a+"/")),n="/"+Ng(UB(void 0).path).join("/");if(r(n))return;let i=Du(C(G(e.home,o=>o.trim()),o=>{if(o!=="")return o}),r);cs(F(Aa(i,t[0]),"/"))}function pI(e,t,r,n,i,o,a,s,l,u,d,f,h,p){let m=(x,S)=>ABe(n,i,o,a,s,x,S,l,u,e.deniedSurfaces,d,f),g=GU(e,d,h,p);if(g!==void 0)return Wse(g).then(x=>{if(x.TAG!=="Ok")return x._0;m(x._0,[])});let v=hI(e.platformApiEndpoint,zse,t),_=hI(e.platformApiEndpoint,wBe,t);return Promise.all([v,_]).then(x=>{let S=x[1],E=x[0];(qx(E)||qx(S))&&r(),m(Mse(E),SBe(S))})}let DBe=`subscription OnPluginStatusChange {
115
+ onPluginStatusChange { pluginId status }
116
+ }`,FBe=`subscription OnUIFragmentChange {
117
+ onUIFragmentChange { pluginId changeKind }
118
+ }`;function IBe(e,t,r,n){return Wr(GU(e,t,r,n))}function PBe(e){return L("div",{children:[b("strong",{children:"Component manifest could not be loaded"}),b("p",{children:e.message,style:{margin:"0.5rem 0 0",whiteSpace:"pre-wrap"}})],role:"alert",style:{background:"var("+y.surfaceSubtle+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.error+")",margin:"1rem",padding:"1rem 1.25rem",borderRadius:"0.375rem"}})}function OBe(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=At(mp),o=At(gp),a=i2(),s=pW(),l=g_e(),u=La(),d=C(u,S=>S.getToken()),f=fe(C(u,S=>S.identity),[],S=>S.groups),h=C(C(u,S=>S.identity),S=>S.activeRole),p=f.concat(r.accessTiers),m=HUe(r.elevatedGroups,f),g=fe(C(u,S=>S.identity),"",S=>S.userId),v=de(()=>{}),_=v[1],x=v[0];return $e(()=>{pI(r,d,()=>re(u,S=>S.logout()),i,o,a,s,l,n,p,m,g,f,h).then(S=>{re(S,E=>{console.error("[Shell] "+E)}),_(E=>S),NBe(r)})},[d]),$e(()=>{if(IBe(r,m,f,h))try{let S=mBe(r.platformApiSubscriptionEndpoint,d),E=()=>{pI(r,d,()=>re(u,T=>T.logout()),i,o,a,s,l,n,p,m,g,f,h)},k=S.subscribe({query:DBe,variables:void 0},{next:T=>E(),error:T=>{},complete:()=>{}}),R=S.subscribe({query:FBe,variables:void 0},{next:T=>E(),error:T=>{},complete:()=>{}});return()=>{k(),R(),S.dispose()}}catch{return}},[d]),x!==void 0?b(PBe,{message:x}):null}let MBe=OBe;function qi(e){return"var("+e+")"}let LBe=w([c("background",qi(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",qi(Y.md)),c("padding",qi(I.lg)),z("flex"),ve("column"),X("center"),Xe("center"),c("gap",qi(I.sm)),c("min-height","160px"),Fa("center"),Xo({NAME:"percent",VAL:100}),c("box-sizing","border-box")]),zBe=w([c("font-size","32px"),c("line-height","1"),Jh(Re(4))]),UBe=w([c("color",qi(y.textPrimary)),c("font-size",qi($.sizeMd)),c("font-weight",qi($.weightMedium)),Jh(Re(4))]),BBe=w([c("color",qi(y.textSecondary)),c("font-size",qi($.sizeSm)),c("line-height",qi($.lineHeightNormal))]),jBe=w([c("color",qi(y.textDisabled)),c("font-size",qi($.sizeXs)),c("font-family",qi($.fontFamilyMono)),Yo(Re(8))]);function qBe(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:zBe}),b("div",{children:t.title,className:UBe}),b("div",{children:t.description,className:BBe}),b("div",{children:t.extensionPackage,className:jBe})],className:LBe})}let VBe=qBe,GBe=w([z("flex"),X("center"),Xe("center"),c("min-height","160px"),c("color","var("+y.textSecondary+")"),c("font-size","var("+$.sizeSm+")")]);function KBe(e){return b("div",{children:"Loading…",className:GBe})}w([z("flex"),X("center"),Xe("center"),c("min-height","160px"),c("color","var("+y.error+")"),c("font-size","var("+$.sizeSm+")")]);function HBe(e){let t=Tl(),r=_ge(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?b(VBe,{definition:r}):b(EB,{children:r.component(e.props),fallback:b(KBe,{})})}let WBe=HBe;function JBe(e){let t=vge(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?b("div",{children:t.map(o=>b(WBe,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let QBe=JBe;function YBe(e){return L("div",{children:[L("header",{children:[b("h1",{children:"Platform overview",style:{margin:"0"}}),b("p",{children:"Summary panels contributed by connected plugins appear below.",style:{color:"#666",margin:"0.25rem 0 0"}})]}),b(QBe,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let XBe=YBe,ZBe="host.home",zk="/",eje={label:"Home",icon:void 0,group:void 0,sortOrder:0},tje=zk,rje={fragmentId:ZBe,title:"Home",menuEntry:eje,requiredAccess:void 0,url:tje};function nje(e){return C(G(e.home,t=>t.trim()),t=>{if(!(t===""||t===zk))return t})}function ije(e){let t=e.config,r=At(mp),n=i2(),i=S8(),o=Tg(void 0),a=nje(t);return $e(()=>{!t.autoRedirectFirstPage&&Wr(a)&&(re(r,s=>s.register([rje])),re(n,s=>s.register([hc(AI(l=>l),b(XBe,{}))],cu())))},[]),$e(()=>{if((o===""||o===zk)&&i.length!==0){if(a!==void 0)cs(a);else if(t.autoRedirectFirstPage){let l=i.find(u=>De(u.url)?w8(u):!1);if(l!==void 0){let u=l.url;u!==void 0&&cs(u)}}}},[i.length,o]),null}let oje=ije,aje=`mutation UploadPresign($store: ID!, $fileName: String!, $contentType: String) {
119
+ Upload_Presign(store: $store, fileName: $fileName, contentType: $contentType) {
120
+ uploadUrl
121
+ storageRef
122
+ }
123
+ }`,sje=`mutation UploadRelease($store: ID!, $storageRef: String!) {
124
+ Upload_Release(store: $store, storageRef: $storageRef) {
125
+ released
126
+ reason
127
+ }
128
+ }`;function KU(e,t){return C(C(H(e),r=>M(r,t)),H)}function lje(e){return C(KU(e,"Upload_Presign"),t=>{let r=C(M(t,"uploadUrl"),ce),n=C(M(t,"storageRef"),ce);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function uje(e){let t=KU(e,"Upload_Release");return t!==void 0?Ne(C(M(t,"released"),hS),!0)?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:F(C(M(t,"reason"),ce),"Could not release the uploaded file")}:{TAG:"Error",_0:"Could not release the uploaded file"}}function cje(e,t,r,n,i){return new Promise((o,a)=>{let s=new XMLHttpRequest;s.open("PUT",e),s.setRequestHeader("Content-Type",n),s.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},s.onload=()=>{let l=s.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},s.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),s.send(r)})}function dje(e,t){return{upload:(r,n)=>{let i=r.type;return $t(e()(aje,Ye([["store",t],["fileName",r.name],["contentType",i]])).then(o=>{let a=lje(o);return a!==void 0?cje(a.uploadUrl,a.storageRef,r,i,n):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})}),o=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))},remove:r=>$t(e()(sje,Ye([["store",t],["storageRef",r]])).then(uje),n=>Promise.resolve({TAG:"Error",_0:"Release request failed"}))}}let fje=[],hje=[],pje=[],mje={pages:fje,panels:hje,routes:pje};function HU(e){return L("div",{children:[b("h1",{children:"Shell failed to boot"}),b("pre",{children:e.message})],style:{color:"#a00",fontFamily:"system-ui",padding:"2rem"}})}function Uk(e){return b("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function gje(e){let t=e.extensions,r=At(mp),n=At(gp),i=i2();return $e(()=>{t.pages.length!==0&&re(r,o=>o.register(t.pages)),t.panels.length!==0&&re(n,o=>o.register(t.panels)),t.routes.length!==0&&re(i,o=>o.register(t.routes,cu()))},[]),null}function uS(e){let t=e.config,r=Dge(),n=Nge(),i=qse(t),o=L(Lr,{children:[b(x_e,{}),b(Mge,{}),b(g0e,{})]});return $e(()=>{document.title=i},[i]),L(Lr,{children:[b(oje,{config:t}),b(MBe,{config:t,uiHints:e.uiHints}),b(gje,{extensions:e.extensions}),b(hge,{appName:i,logoUrl:t.logoUrl,router:r,headerSlot:o,routesReady:n,loading:b(Uk,{})})]})}function vje(e){let t=e.discoverPlatforms,r=Tg(void 0),n=R8(r);if(n===void 0)return t!==void 0?b(Hge,{discover:t}):b(HU,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return b(A8.make,{scope:i,children:b(qB,{value:{prefix:n2(i),path:n[1]},children:b(uS,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function mI(e){let t=e.access;return b(I0e,{access:t,children:b(A0e.make,{children:b(gge.make,{access:t,children:b($ge.make,{children:b(hW.make,{children:b(p_e.make,{children:e.children})})})})})})}function _je(e){let t=e.uiHints,r=e.extensions,n=e.config,i=La(),o=n.mode,a;if(o==="Single"){let u=n.environment,d=n.platformName;a=u!==void 0&&d!==void 0?b(A8.make,{scope:{environment:u,platformName:d},children:b(uS,{config:n,extensions:r,uiHints:t})}):b(uS,{config:n,extensions:r,uiHints:t})}else a=b(vje,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return b(mI,{access:n.accessTiers,children:a});if(i===void 0)return b(W$,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?b(mI,{access:l.groups.concat(n.accessTiers),children:a}):b(W$,{})}function bje(e){let t=e.config,r=La();Ej(t.assetOrigins);let n=Tg(void 0),i=t.mode,o;o=i==="Single"?void 0:G(R8(n),p=>p[0]);let a=fe(o,"",p=>p.environment+"|"+p.platformName),s=Nt(()=>{let p=ele(t.apiEndpoint,t.platformApiEndpoint,()=>C(r,g=>g.getToken()),()=>re(r,g=>g.logout())),m=o!==void 0?Zse(jge(o))(p):p;return[tle(m),m]},[t,r,a]),l=s[0],u=()=>C(r,p=>p.getToken()),d=Fe(l);d.current=l,dae.contents=l,$e(()=>{let p={},m=g=>{let v=p[g];if(v!==void 0)return v;let _=dje(()=>d.current,g);return p[g]=_,_};J_e(g=>m(g),void 0,void 0)},[]);let f=F(t.theme,"Light"),h=fe(C(r,p=>p.identity),"anonymous",p=>p.userId+"|"+p.groups.toSorted(Wc).join(","));return b(mae.make,{execute:l,executeResult:s[1],children:b(cDe,{config:t,children:b(Ase.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,platformReadModelPrefixes:t.platformReadModelPrefixes,getToken:u,children:b(fse.make,{initialPreset:f,children:b(_je,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})})})},h)}function yje(e,t){let r=de(()=>{}),n=r[1];return $e(()=>{Hse(e.uiHintsUrl).then(i=>n(o=>i))},[e.uiHintsUrl]),G(r[0],i=>Mae(i,F(t.uiHints,{})))}function xje(e){let t=e.extensions,r=e.config,n=yje(r,t);return b(a0e.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:n!==void 0?b(bje,{config:r,extensions:t,uiHints:n,discoverPlatforms:e.discoverPlatforms}):b(Uk,{})})}function Sje(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:mje,i=de(()=>"LoadingConfig"),o=i[1],a=i[0];return $e(()=>{Jse().then(s=>{if(s.TAG==="Ok"){let u=s._0;return t!==void 0?$t(t(u).then(()=>o(d=>({TAG:"Ready",_0:u}))),d=>(console.error("[ShellApp] optional view modes failed to register — continuing without them: "+String(d)),o(f=>({TAG:"Ready",_0:u})),Promise.resolve())):(o(d=>({TAG:"Ready",_0:u})),Promise.resolve())}let l=s._0;return o(u=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof a!="object"?b(Uk,{}):a.TAG==="Ready"?b(xje,{config:a._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):b(HU,{message:a._0})}let wje={make:Sje},gI=document.querySelector("#root");gI!=null&&_B(gI).render(b(wje.make,{registerModes:NB}));export{$t as $,Wi as A,De as B,y as C,Ji as D,Ar as E,dae as F,Gw as G,cd as H,Y as R,I as S,$ as T,Ta as a,Dr as b,eae as c,ce as d,F as e,ee as f,M as g,vt as h,C as i,Vt as j,Ye as k,re as l,fe as m,Gt as n,Ho as o,Fs as p,F7 as q,nt as r,Tu as s,Zu as t,sse as u,zt as v,pp as w,na as x,Lje as y,H as z};