@reventlessdev/reventless-host-shell 3.0.0-alpha.48 → 3.0.0-alpha.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Geocoder.res-C0MRLgw3.js → Geocoder.res-p3AUOmOW.js} +1 -1
- package/dist/assets/{GraphMode.res-D3XFRdxg.js → GraphMode.res-C5hfkBfg.js} +1 -1
- package/dist/assets/{MapMode.res-BEYjdL-s.js → MapMode.res-DwpJCYUp.js} +1 -1
- package/dist/assets/{index-B-TPa9BE.js → index-BLVhdQNl.js} +1 -1
- package/dist/assets/index-ttdQLNPH.js +117 -0
- package/dist/mf-entry-bootstrap-0.js +1 -1
- package/package.json +5 -5
- package/dist/assets/index-DAJ2TyQG.js +0 -117
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-C5hfkBfg.js","assets/MapMode.res-DwpJCYUp.js","assets/Geocoder.res-p3AUOmOW.js","assets/index-BLVhdQNl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import"./virtualExposes-DN39MDG_.js";import{d as oF}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-dsc9aHJC.js";import{_ as A0}from"./preload-helper-BlTxHScW.js";import{_ as f7}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 Br}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 ue,b as Te,c as ur,d as Sr,e as It,f as Qr,g as Qe,h as Mt,i as Tx,j as h7,k as sF,l as Gi,m as p7,n as g7,o as m7,p as v7}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuHP-S1B.js";import{c as Z0,_ as _t}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function _7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{a as xp,b as b7}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Df1FMNLk.js";import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function y7(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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).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 Wt(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 vs(e){if(e!=null)return Wt(e)}function or(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 um="JsExn";function x7(e){if(e.RE_EXN_ID===um)return Wt(e._1)}function S7(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function Eu(e){return S7(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let E7=["map","graph"];async function w7(e,t){switch(e){case"graph":return(await A0(()=>import("./GraphMode.res-C5hfkBfg.js"),__vite__mapDeps([0])).then(s=>s.init))(t.graphLayout,void 0);case"map":let n=await A0(()=>import("./MapMode.res-DwpJCYUp.js"),__vite__mapDeps([1])).then(s=>s.init),i=t.geocoderEndpoint,o;return i!==void 0?o=(await A0(()=>import("./Geocoder.res-p3AUOmOW.js"),__vite__mapDeps([2])).then(a=>a.fromEndpoint))(i):o=void 0,n(t.mapStyle,o,void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+E7.join(", "));return}}async function k7(e){await Promise.all(e.viewModes.map(async t=>{try{return await w7(t,e)}catch(r){let n=Eu(r);if(n.RE_EXN_ID===um){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function C7(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function lk(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),s=(i.length!==2?n:i[0]).split("/").filter(u=>u.length!==0),a=s.length-1|0,l=0;for(;;){let u=l,d=a;if(d<0)return u;l={hd:s[d],tl:u},a=d-1|0}}}function R7(e,t){let r=globalThis.window;return e!==void 0?lk(e):r!==void 0?lk(or(r).location.pathname):0}function A7(){let e=globalThis.window;if(e===void 0)return"";let t=or(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function uk(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function T7(e,t){let r=globalThis.window;return e!==void 0?uk(e):r!==void 0?uk(or(r).location.search):""}function zc(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){or(t).pushState(null,"",e),or(r).dispatchEvent(C7("popstate"));return}}function $7(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 wy(e,t){return{path:R7(e),hash:A7(),search:T7(e)}}function N7(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(wy(void 0));return or(t).addEventListener("popstate",r),r}function D7(e){let t=globalThis.window;if(t!==void 0){or(t).removeEventListener("popstate",e);return}}function F7(e,t){let r=ue(()=>wy(void 0)),n=r[1],i=r[0];return Te(()=>{let o=N7(a=>n(l=>a)),s=wy(void 0);return $7(s,i)&&n(a=>s),()=>D7(o)},[]),i}let cm=ur({prefix:"",path:""}),I7=cm.Provider;function P7(e){return Sr(I7,{value:e.value,children:e.children})}let O7=P7;function ky(){let e=globalThis.window;return e!==void 0?or(e).location.pathname:""}function M7(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(ky());return or(t).addEventListener("popstate",r),r}function dm(e,t){let r=ue(()=>ky()),n=r[1],i=r[0];return Te(()=>{let o=M7(a=>n(l=>a)),s=ky();return s!==i&&n(a=>s),()=>{let a=globalThis.window;if(a!==void 0){or(a).removeEventListener("popstate",o);return}}},[]),i}function yl(){let t=It(cm).prefix;return r=>t===""||r.startsWith(t)?zc(r):zc(t+r)}function L7(){let t=It(cm).path,r=dm();return t===""?r:t}function fm(e,t){if(e!==void 0&&t(or(e)))return e}function ae(e,t){if(e!==void 0)return t(or(e))}function fe(e,t,r){return e!==void 0?r(or(e)):t}function J(e,t){if(e!==void 0)return Wt(t(or(e)))}function R(e,t){if(e!==void 0)return t(or(e))}function D(e,t){return e!==void 0?or(e):t}function Dh(e,t){return e!==void 0?e:t}function Le(e){return e!==void 0}function Pi(e){return e===void 0}function Vt(e,t){return e.catch(r=>t(Eu(r)))}function $x(e,t){return e<t?-1:e===t?0:1}function Lo(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function aF(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function nl(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 it(e,t,r){return e.reduce(r,t)}function z7(e,t){let r=e.findIndex(t);if(r!==-1)return r}function oe(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let s=e[o],a=t(s);a!==void 0&&(n[i]=or(a),i=i+1|0)}return n.length=i,n}function lF(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let s=e[o],a=t(s,o);a!==void 0&&(n[i]=or(a),i=i+1|0)}return n.length=i,n}function U7(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 uF(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function B7(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 j7(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return B7(e.tl,r).tl=t,r}function q7(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 V7(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 Nx(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 Dx(e){let t=q7(e),r=new Array(t);return V7(r,0,e),r}function K7(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function cF(e){return K7(e,0)}function H7(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function dF(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function W7(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 s=0,a=o.length;s<a;++s)n[r]=o[s],r=r+1|0}return n}function G7(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let fF=G7;function hc(e){return e!==void 0?e.h:0}function Zo(e,t,r,n){let i=hc(e),o=hc(n);return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n}}function J7(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function Q7(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function ck(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 hc(l)>=hc(u)?Zo(l,e.k,e.v,Zo(u,t,r,n)):Zo(Zo(l,e.k,e.v,u.l),u.k,u.v,Zo(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 s=n.l,a=n.r;return hc(a)>=hc(s)?Zo(Zo(e,t,r,s),n.k,n.v,a):Zo(Zo(e,t,r,s.l),s.k,s.v,Zo(s.r,n.k,n.v,a))}function jf(e,t){return e===t?0:e<t?-1:1}function Y7(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Wt(r.v);e=t<n?r.l:r.r}}function Cy(e,t,r){if(e===void 0)return J7(t,r);let n=e.k;if(t===n)return Q7(e,r);let i=e.v;return t<n?ck(Cy(e.l,t,r),n,i,e.r):ck(e.l,n,i,Cy(e.r,t,r))}let hF=Y7;function pF(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=Nx(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 Ry={parsers:0,children:void 0,capture:void 0,wildcard:!1};function X7(e,t){let r=e,n=t;for(;;){let i=n,o=r,s=o.parsers,a=0;if(s!==0)a=1;else{if(i===0)return 0;a=1}if(a===1){let l=o.capture,u=0;if(i===0)return s;if(i.hd===""){if(i.tl===0)return s;u=2}else u=2;if(u===2){if(o.wildcard)return s;let d=i.tl,f=hF(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 Z7(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 s=o.capture,a=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,s!==void 0?s:Ry);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=u._0,f=hF(a,d),p=n(l,f!==void 0?f:Ry);return{parsers:o.parsers,children:Cy(a,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function eU(e){return{prefix:0,matched:pF(e)}}function tU(e){return Dx({hd:"",tl:e.matched}).join("/")}function rU(e){return Dx({hd:"",tl:e.prefix}).join("/")}function nU(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function eg(e,t){return{TAG:"Match",_0:e,_1:t}}function Ay(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:Ay(e._1)}:{hd:"Capture",tl:Ay(e._1)}}function iU(e,t){let r=i=>e("/"+Dx(i).join("/")),n=(i,o)=>{for(;;){let s=o,a=i;if(typeof s!="object")return s==="End"?a(0):d=>a(j7(d.matched,0));if(s.TAG==="Match"){let d=s._0;o=s._1,i=f=>a({hd:d,tl:f});continue}let l=s._1,u=s._0.to_;return d=>n(f=>a({hd:u(d),tl:f}),l)}};return n(r,t)}function oU(e){return iU(t=>t,e)}function sU(e,t,r){let n=e,i=t,o=0,s=r;for(;;){let a=s,l=o,u=i,d=n;if(typeof d!="object")return d==="End"?a!==0?a.hd===""&&a.tl===0?{TAG:"MatchWithTrailingSlash",_0:u}:"NoMatch":{TAG:"FullMatch",_0:u}:{TAG:"FullMatch",_0:u({prefix:cF(l),matched:a})};if(d.TAG==="Match"){if(a===0)return"NoMatch";let p=a.hd;if(d._0!==p)return"NoMatch";s=a.tl,o={hd:p,tl:l},n=d._1;continue}if(a===0)return"NoMatch";let f=a.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";s=a.tl,o={hd:f,tl:l},i=u(or(h)),n=d._1}}function aU(e){let t=cF(e);return dF(t,Ry,(r,n)=>{let i=Ay(n._0);return Z7(i,n,r)})}function lU(e,t){let r=pF(t),i=X7(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let s=o.hd,a=s._2,l=sU(s._0,s._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:a(l._0)}:{TAG:"MatchWithTrailingSlash",_0:a(l._0)};i=o.tl}}function uU(e,t){let r=lU(e,t);if(typeof r=="object")return Wt(r._0)}function gF(e){return e("End")}let mF={prefix:rU,wildcard_match:tU,of_parts:eU},cU="Wildcard",qs=oU,nc=nU;function nu(){return{}}let vF=ur({});function dU(e,t){return e+("."+t)}function fU(e,t,r,n){return e[dU(t,r)]=qs(n),e}function Ty(e,t){return Object.assign(Object.assign({},e),t)}function hm(){return It(vF)}let hU=vF.Provider;function pU(e){return Sr(hU,{value:e.registry,children:e.children})}let gU={make:pU},_F={contents:{}};function mU(e){_F.contents=e}function vU(e){let t=e.startsWith("/")?e.slice(1):e,r=t.indexOf("/");if(r!==-1)return t.slice(0,r)}function Uc(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=vU(e);if(t===void 0)return e;let r=_F.contents[t];if(r===void 0)return e;let n=e.startsWith("/")?e:"/"+e;return(r.endsWith("/")?r.slice(0,r.length-1|0):r)+n}function _U(e){if(typeof e=="boolean")return e}function bU(e){if(e===null)return null}function yU(e){if(typeof e=="string")return e}function xU(e){if(typeof e=="number")return e}function SU(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function EU(e){if(Array.isArray(e))return e}let _e={bool:_U,$$null:bU,string:yU,float:xU,object:SU,array:EU};function M(e,t){if(t in e)return Wt(e[t])}function Ge(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 Fx(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 dt(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}function rt(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 de(e){if(typeof e=="string")return e}function _s(e){if(typeof e=="number")return e}function Y(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function mr(e){if(Array.isArray(e))return e}function bF(e){if(typeof e=="boolean")return e}let dk=(function(e,t){for(var r in e)t(r)});function We(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 s=e.length|0,a=t.length|0;if(s===a)if(Array.isArray(e)){let l=0;for(;;){let u=l;if(u===s)return!0;if(!We(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)||!We(t[f],e[f])){l.contents=!1;return}};return dk(e,u),l.contents&&dk(t,d),l.contents}}else return!1}function qf(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!We(e,t)}function ui(e){let t=Y(e);if(t===void 0)return e;let r=M(t,"type"),n=M(t,"properties");return r!==void 0||n!==void 0?e:D(J(it(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:R(R(M(t,o),mr),s=>s.find(a=>qf(R(R(Y(a),l=>M(l,"type")),de),"null")))),ui),e)}function wU(e,t){return t.startsWith(e)}function kU(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let Zr={initial:"initial",inherit_:"inherit_",unset:"unset",toString:kU};function CU(e){return{NAME:"var",VAL:e}}function RU(e,t){return{NAME:"varDefault",VAL:[e,t]}}function fk(e){return wU("--",e)?e:"--"+e}function pm(e){if(e.NAME==="var")return"var("+fk(e.VAL)+")";let t=e.VAL;return"var("+fk(t[0])+","+t[1]+")"}function AU(e){return{NAME:"s",VAL:e}}function TU(e){return{NAME:"ms",VAL:e}}function $U(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let NU={s:AU,ms:TU,toString:$U};function Ix(e){return e.VAL.toString()+"%"}function DU(e){return{NAME:"ch",VAL:e}}function FU(e){return{NAME:"em",VAL:e}}function IU(e){return{NAME:"ex",VAL:e}}function PU(e){return{NAME:"rem",VAL:e}}function OU(e){return{NAME:"vh",VAL:e}}function MU(e){return{NAME:"vw",VAL:e}}function LU(e){return{NAME:"vmin",VAL:e}}function zU(e){return{NAME:"vmax",VAL:e}}function UU(e){return{NAME:"px",VAL:e}}function BU(e){return{NAME:"pxFloat",VAL:e}}function jU(e){return{NAME:"cm",VAL:e}}function qU(e){return{NAME:"mm",VAL:e}}function VU(e){return{NAME:"inch",VAL:e}}function KU(e){return{NAME:"pc",VAL:e}}function HU(e){return{NAME:"pt",VAL:e}}function $y(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 yF={ch:DU,em:FU,ex:IU,rem:PU,vh:OU,vw:MU,vmin:LU,vmax:zU,px:UU,pxFloat:BU,cm:jU,mm:qU,inch:VU,pc:KU,pt:HU,zero:"zero",toString:$y};function WU(e,t){return{NAME:"min",VAL:[e,t]}}function GU(e,t){return{NAME:"max",VAL:[e,t]}}function wo(e){if(typeof e!="object")return $y(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+wo(n[0])+" - "+wo(n[1])+")"}if(t==="percent")return Ix(e);if(t==="add"){let n=e.VAL;return"calc("+wo(n[0])+" + "+wo(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+wo(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+wo(n[0])+", "+wo(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+wo(n[0])+", "+wo(n[1])+")"}if(t!=="mul")return $y(e);let r=e.VAL;return"calc("+wo(r[0])+" * "+r[1].toString()+")"}let Yr={min:WU,max:GU,toString:wo};function JU(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 QU(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let YU={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:QU};function XU(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let xF={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:XU};function ZU(e){return"auto"}let eB={auto:"auto",toString:ZU};function tB(e,t){return{NAME:"steps",VAL:[e,t]}}function rB(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function nB(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 iB(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 oB={toString:iB};function sB(e){return typeof e=="object"?e.VAL.toString():"infinite"}let aB={toString:sB};function lB(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 uB={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:lB};function cB(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function dB(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function fB(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function hB(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function pB(e){return{NAME:"hex",VAL:e}}function hk(e){let t=e.NAME;return t==="var"||t==="varDefault"?pm(e):JU(e)}function pk(e){let t=e.NAME;return t==="percent"?Ix(e):t==="num"?e.VAL.toString():pm(e)}function Sp(e){return e.NAME==="percent"?Ix(e):pm(e)}function Ep(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()+", "+pk(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+hk(n[0])+", "+Sp(n[1])+", "+Sp(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("+hk(r[0])+", "+Sp(r[1])+", "+Sp(r[2])+", "+pk(r[3])+")"}function gB(e){if(typeof e!="object"||e.NAME!=="lightDark")return Ep(e);let t=e.VAL;return"light-dark("+Ep(t[0])+", "+Ep(t[1])+")"}function mB(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 vB={toString:mB};function _B(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let bB={toString:_B};function yB(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let xB={toString:yB};function SB(e){return"list-item"}let EB={toString:SB};function wB(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 kB={toString:wB};function CB(e){return e==="contents"?"contents":"none"}let RB={toString:CB};function AB(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let TB={toString:AB};function $B(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 Px={toString:$B};function NB(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let SF={toString:NB};function DB(e){return"normal"}let FB={toString:DB};function IB(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let PB={toString:IB};function OB(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let MB={toString:OB};function LB(e){return e==="normal"?"normal":"stretch"}let zB={toString:LB};function UB(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let BB={toString:UB};function jB(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let qB={toString:jB};function VB(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let KB={toString:VB};function HB(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let WB={toString:HB};function GB(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let Ox={toString:GB};function JB(e){return"none"}let gm={toString:JB};function QB(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let Mx={toString:QB},Vr={$$var:CU,varDefault:RU,toString:pm},YB={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:tB,cubicBezier:rB,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:nB},Ny={rgb:cB,rgba:dB,hsl:fB,hsla:hB,hex:pB,transparent:"transparent",currentColor:"currentColor",toString:gB},XB=gm,ZB=gm,ej=gm,tj=gm,rj=Ny.transparent;function nj(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]=ql(t._1);break;case"PseudoClass":e[":"+t._0]=ql(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=ql(t._2);break}return e}function ql(e){return fF(e,{},nj)}function ij(e){let t=p=>e.injectRaw(p),r=(p,g)=>e.renderRaw(p,g),n=(p,g)=>e.injectRules(p,ql(g)),i=(p,g,m)=>e.renderRules(p,g,ql(m)),o=p=>e.make(ql(p)),s=p=>e.mergeStyles(p),a=(p,g)=>e.mergeStyles([p,g]),l=(p,g,m)=>e.mergeStyles([p,g,m]),u=(p,g,m,v)=>e.mergeStyles([p,g,m,v]),d=p=>fF(p,{},(g,m)=>(g[m[0].toString()+"%"]=ql(m[1]),g));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:s,merge2:a,merge3:l,merge4:u,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,g)=>e.renderKeyframes(p,d(g))}}function mm(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?Vr.toString(e):Yr.toString(e)}function oj(e){if(typeof e!="object")return Ny.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Vr.toString(e):Ny.toString(e)}function sj(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?SF.toString(e):e==="normal"||e==="stretch"?zB.toString(e):Px.toString(e)}}function aj(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?Vr.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?Px.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?SF.toString(e):BB.toString(e)}}function lj(e){return{TAG:"D",_0:"animationDuration",_1:NU.toString(e)}}function uj(e){return{TAG:"D",_0:"animationIterationCount",_1:aB.toString(e)}}function cj(e){return{TAG:"D",_0:"animationTimingFunction",_1:YB.toString(e)}}function dj(e){return{TAG:"D",_0:"bottom",_1:mm(e)}}function fj(e){return{TAG:"D",_0:"cursor",_1:uB.toString(e)}}function hj(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?Vr.toString(e):e==="table"||e==="grid"||e==="flex"?xB.toString(e):e==="contents"||e==="none"?RB.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?TB.toString(e):e==="block"||e==="inline"||e==="runIn"?bB.toString(e):e==="listItem"?EB.toString(e):kB.toString(e)}}function pj(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):KB.toString(e)}}function gj(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function mj(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function vj(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?Vr.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?qB.toString(e):Zr.toString(e)}}function _j(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Vr.toString(e):Yr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):Mx.toString(e);return{TAG:"D",_0:"height",_1:t}}function bj(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?Vr.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?PB.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="normal"?FB.toString(e):Px.toString(e)}}function yj(e){return{TAG:"D",_0:"left",_1:mm(e)}}function xj(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):oB.toString(e)}}function iu(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):eB.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Vr.toString(e):Yr.toString(e)}function Sj(e){return{TAG:"D",_0:"margin",_1:iu(e)}}function Ej(e,t){return{TAG:"D",_0:"margin",_1:iu(e)+(" "+iu(t))}}function wj(e){return{TAG:"D",_0:"marginLeft",_1:iu(e)}}function kj(e){return{TAG:"D",_0:"marginRight",_1:iu(e)}}function Cj(e){return{TAG:"D",_0:"marginTop",_1:iu(e)}}function Rj(e){return{TAG:"D",_0:"marginBottom",_1:iu(e)}}function Aj(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Vr.toString(e):Yr.toString(e)}else t=e==="none"?ej.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):Mx.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function Tj(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Vr.toString(e):Yr.toString(e)}else t=e==="none"?XB.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):Ox.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function $j(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Vr.toString(e):Yr.toString(e)}else t=e==="none"?tj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):Mx.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function Nj(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Vr.toString(e):Yr.toString(e)}else t=e==="none"?ZB.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):Ox.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function Dj(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function Fj(e){return{TAG:"D",_0:"overflow",_1:xF.toString(e)}}function Ij(e){return{TAG:"D",_0:"overflowY",_1:xF.toString(e)}}function Pj(e){return{TAG:"D",_0:"padding",_1:Yr.toString(e)}}function Oj(e,t){return{TAG:"D",_0:"padding",_1:Yr.toString(e)+(" "+Yr.toString(t))}}function Mj(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):YU.toString(e)}}function Lj(e){return{TAG:"D",_0:"right",_1:mm(e)}}function zj(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):MB.toString(e)}}function Uj(e){return{TAG:"D",_0:"top",_1:mm(e)}}function Bj(e,t){return{TAG:"D",_0:e,_1:t}}function jj(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):WB.toString(e)}}function qj(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Vr.toString(e):Yr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Yr.toString(e):Ox.toString(e);return{TAG:"D",_0:"width",_1:t}}function Vj(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function Kj(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function Hj(e,t){return{TAG:"S",_0:e,_1:t}}function Wj(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function Gj(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function Jj(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function Qj(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function Yj(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function Xj(e){return{TAG:"S",_0:"::placeholder",_1:e}}let Zj=yF.px;function eq(e){return typeof e=="object"?Vr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):vB.toString(e)}function tq(e,t,r){return{TAG:"D",_0:"border",_1:yF.toString(e)+" "+eq(t)+" "+oj(r)}}function rq(e){return{TAG:"D",_0:"animationName",_1:e}}function nq(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 iq(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 oq=(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(iq(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=nq(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})(),Dn="-ms-",tg="-moz-",Nt="-webkit-",EF="comm",Lx="rule",zx="decl",sq="@import",wF="@keyframes",aq="@layer",lq=Math.abs,vm=String.fromCharCode,uq=Object.assign;function cq(e,t){return Cn(e,0)^45?(((t<<2^Cn(e,0))<<2^Cn(e,1))<<2^Cn(e,2))<<2^Cn(e,3):0}function kF(e){return e.trim()}function dq(e,t){return(e=t.exec(e))?e[0]:e}function Dt(e,t,r){return e.replace(t,r)}function Dy(e,t){return e.indexOf(t)}function Cn(e,t){return e.charCodeAt(t)|0}function Vf(e,t,r){return e.slice(t,r)}function os(e){return e.length}function Ux(e){return e.length}function wp(e,t){return t.push(e),e}function fq(e,t){return e.map(t).join("")}var _m=1,Bc=1,CF=0,ci=0,Ur=0,sd="";function bm(e,t,r,n,i,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:_m,column:Bc,length:s,return:""}}function Bd(e,t){return uq(bm("",null,null,"",null,null,0),e,{length:-e.length},t)}function hq(){return Ur}function pq(){return Ur=ci>0?Cn(sd,--ci):0,Bc--,Ur===10&&(Bc=1,_m--),Ur}function Ni(){return Ur=ci<CF?Cn(sd,ci++):0,Bc++,Ur===10&&(Bc=1,_m++),Ur}function ps(){return Cn(sd,ci)}function T0(){return ci}function Fh(e,t){return Vf(sd,e,t)}function Kf(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 RF(e){return _m=Bc=1,CF=os(sd=e),ci=0,[]}function AF(e){return sd="",e}function $0(e){return kF(Fh(ci-1,Fy(e===91?e+2:e===40?e+1:e)))}function gq(e){for(;(Ur=ps())&&Ur<33;)Ni();return Kf(e)>2||Kf(Ur)>3?"":" "}function mq(e,t){for(;--t&&Ni()&&!(Ur<48||Ur>102||Ur>57&&Ur<65||Ur>70&&Ur<97););return Fh(e,T0()+(t<6&&ps()==32&&Ni()==32))}function Fy(e){for(;Ni();)switch(Ur){case e:return ci;case 34:case 39:e!==34&&e!==39&&Fy(Ur);break;case 40:e===41&&Fy(e);break;case 92:Ni();break}return ci}function vq(e,t){for(;Ni()&&e+Ur!==57;)if(e+Ur===84&&ps()===47)break;return"/*"+Fh(t,ci-1)+"*"+vm(e===47?e:Ni())}function _q(e){for(;!Kf(ps());)Ni();return Fh(e,ci)}function bq(e){return AF(N0("",null,null,null,[""],e=RF(e),0,[0],e))}function N0(e,t,r,n,i,o,s,a,l){for(var u=0,d=0,f=s,h=0,p=0,g=0,m=1,v=1,_=1,y=0,E="",S=i,k=o,C=n,$=E;v;)switch(g=y,y=Ni()){case 40:if(g!=108&&Cn($,f-1)==58){Dy($+=Dt($0(y),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:$+=$0(y);break;case 9:case 10:case 13:case 32:$+=gq(g);break;case 92:$+=mq(T0()-1,7);continue;case 47:switch(ps()){case 42:case 47:wp(yq(vq(Ni(),T0()),t,r),l);break;default:$+="/"}break;case 123*m:a[u++]=os($)*_;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:_==-1&&($=Dt($,/\f/g,"")),p>0&&os($)-f&&wp(p>32?mk($+";",n,r,f-1):mk(Dt($," ","")+";",n,r,f-2),l);break;case 59:$+=";";default:if(wp(C=gk($,t,r,u,d,i,a,E,S=[],k=[],f),o),y===123)if(d===0)N0($,t,C,C,S,o,f,a,k);else switch(h===99&&Cn($,3)===110?100:h){case 100:case 108:case 109:case 115:N0(e,C,C,n&&wp(gk(e,C,C,0,0,i,a,E,i,S=[],f),k),i,k,f,a,n?S:k);break;default:N0($,C,C,C,[""],k,0,a,k)}}u=d=p=0,m=_=1,E=$="",f=s;break;case 58:f=1+os($),p=g;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&pq()==125)continue}switch($+=vm(y),y*m){case 38:_=d>0?1:($+="\f",-1);break;case 44:a[u++]=(os($)-1)*_,_=1;break;case 64:ps()===45&&($+=$0(Ni())),h=ps(),d=f=os(E=$+=_q(T0())),y++;break;case 45:g===45&&os($)==2&&(m=0)}}return o}function gk(e,t,r,n,i,o,s,a,l,u,d){for(var f=i-1,h=i===0?o:[""],p=Ux(h),g=0,m=0,v=0;g<n;++g)for(var _=0,y=Vf(e,f+1,f=lq(m=s[g])),E=e;_<p;++_)(E=kF(m>0?h[_]+" "+y:Dt(y,/&\f/g,h[_])))&&(l[v++]=E);return bm(e,t,r,i===0?Lx:a,l,u,d)}function yq(e,t,r){return bm(e,t,r,EF,vm(hq()),Vf(e,2,-2),0)}function mk(e,t,r,n){return bm(e,t,r,zx,Vf(e,0,n),Vf(e,n+1,-1),n)}function yc(e,t){for(var r="",n=Ux(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function xq(e,t,r,n){switch(e.type){case aq:if(e.children.length)break;case sq:case zx:return e.return=e.return||e.value;case EF:return"";case wF:return e.return=e.value+"{"+yc(e.children,n)+"}";case Lx:e.value=e.props.join(",")}return os(r=yc(e.children,n))?e.return=e.value+"{"+r+"}":""}function Sq(e){var t=Ux(e);return function(r,n,i,o){for(var s="",a=0;a<t;a++)s+=e[a](r,n,i,o)||"";return s}}function Eq(e){return function(t){t.root||(t=t.return)&&e(t)}}function wq(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var kq=function(t,r,n){for(var i=0,o=0;i=o,o=ps(),i===38&&o===12&&(r[n]=1),!Kf(o);)Ni();return Fh(t,ci)},Cq=function(t,r){var n=-1,i=44;do switch(Kf(i)){case 0:i===38&&ps()===12&&(r[n]=1),t[n]+=kq(ci-1,r,n);break;case 2:t[n]+=$0(i);break;case 4:if(i===44){t[++n]=ps()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=vm(i)}while(i=Ni());return t},Rq=function(t,r){return AF(Cq(RF(t),r))},vk=new WeakMap,Aq=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&&!vk.get(n))&&!i){vk.set(t,!0);for(var o=[],s=Rq(r,o),a=n.props,l=0,u=0;l<s.length;l++)for(var d=0;d<a.length;d++,u++)t.props[u]=o[l]?s[l].replace(/&\f/g,a[d]):a[d]+" "+s[l]}}},Tq=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function TF(e,t){switch(cq(e,t)){case 5103:return Nt+"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 Nt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Nt+e+tg+e+Dn+e+e;case 6828:case 4268:return Nt+e+Dn+e+e;case 6165:return Nt+e+Dn+"flex-"+e+e;case 5187:return Nt+e+Dt(e,/(\w+).+(:[^]+)/,Nt+"box-$1$2"+Dn+"flex-$1$2")+e;case 5443:return Nt+e+Dn+"flex-item-"+Dt(e,/flex-|-self/,"")+e;case 4675:return Nt+e+Dn+"flex-line-pack"+Dt(e,/align-content|flex-|-self/,"")+e;case 5548:return Nt+e+Dn+Dt(e,"shrink","negative")+e;case 5292:return Nt+e+Dn+Dt(e,"basis","preferred-size")+e;case 6060:return Nt+"box-"+Dt(e,"-grow","")+Nt+e+Dn+Dt(e,"grow","positive")+e;case 4554:return Nt+Dt(e,/([^-])(transform)/g,"$1"+Nt+"$2")+e;case 6187:return Dt(Dt(Dt(e,/(zoom-|grab)/,Nt+"$1"),/(image-set)/,Nt+"$1"),e,"")+e;case 5495:case 3959:return Dt(e,/(image-set\([^]*)/,Nt+"$1$`$1");case 4968:return Dt(Dt(e,/(.+:)(flex-)?(.*)/,Nt+"box-pack:$3"+Dn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Nt+e+e;case 4095:case 3583:case 4068:case 2532:return Dt(e,/(.+)-inline(.+)/,Nt+"$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(os(e)-1-t>6)switch(Cn(e,t+1)){case 109:if(Cn(e,t+4)!==45)break;case 102:return Dt(e,/(.+:)(.+)-([^]+)/,"$1"+Nt+"$2-$3$1"+tg+(Cn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Dy(e,"stretch")?TF(Dt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Cn(e,t+1)!==115)break;case 6444:switch(Cn(e,os(e)-3-(~Dy(e,"!important")&&10))){case 107:return Dt(e,":",":"+Nt)+e;case 101:return Dt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Nt+(Cn(e,14)===45?"inline-":"")+"box$3$1"+Nt+"$2$3$1"+Dn+"$2box$3")+e}break;case 5936:switch(Cn(e,t+11)){case 114:return Nt+e+Dn+Dt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Nt+e+Dn+Dt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Nt+e+Dn+Dt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Nt+e+Dn+e+e}return e}var $q=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case zx:t.return=TF(t.value,t.length);break;case wF:return yc([Bd(t,{value:Dt(t.value,"@","@"+Nt)})],i);case Lx:if(t.length)return fq(t.props,function(o){switch(dq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return yc([Bd(t,{props:[Dt(o,/:(read-\w+)/,":"+tg+"$1")]})],i);case"::placeholder":return yc([Bd(t,{props:[Dt(o,/:(plac\w+)/,":"+Nt+"input-$1")]}),Bd(t,{props:[Dt(o,/:(plac\w+)/,":"+tg+"$1")]}),Bd(t,{props:[Dt(o,/:(plac\w+)/,Dn+"input-$1")]})],i)}return""})}},Nq=[$q],Dq=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(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||Nq,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;a.push(m)});var l,u=[Aq,Tq];{var d,f=[xq,Eq(function(m){d.insert(m)})],h=Sq(u.concat(i,f)),p=function(v){return yc(bq(v),h)};l=function(v,_,y,E){d=y,p(v?v+"{"+_.styles+"}":_.styles),E&&(g.inserted[_.name]=!0)}}var g={key:r,sheet:new oq({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g};function Fq(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 Iq={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},Pq=/[A-Z]|^ms/g,Oq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$F=function(t){return t.charCodeAt(1)===45},_k=function(t){return t!=null&&typeof t!="boolean"},Jv=wq(function(e){return $F(e)?e:e.replace(Pq,"-$&").toLowerCase()}),bk=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Oq,function(n,i,o){return Ba={name:i,styles:o,next:Ba},i})}return Iq[t]!==1&&!$F(t)&&typeof r=="number"&&r!==0?r+"px":r};function rg(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 Ba={name:i.name,styles:i.styles,next:Ba},i.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Ba={name:s.name,styles:s.styles,next:Ba},s=s.next;var a=o.styles+";";return a}return Mq(e,t,r)}}var l=r;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function Mq(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=rg(e,t,r[i])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?n+=o+"{"+t[a]+"}":_k(a)&&(n+=Jv(o)+":"+bk(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)_k(s[l])&&(n+=Jv(o)+":"+bk(o,s[l])+";");else{var u=rg(e,t,s);switch(o){case"animation":case"animationName":{n+=Jv(o)+":"+u+";";break}default:n+=o+"{"+u+"}"}}}return n}var yk=/label:\s*([^\s;{]+)\s*(;|$)/g,Ba;function Qv(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="";Ba=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=rg(r,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=rg(r,t,e[a]),n){var l=o;i+=l[a]}yk.lastIndex=0;for(var u="",d;(d=yk.exec(i))!==null;)u+="-"+d[1];var f=Fq(i)+u;return{name:f,styles:i,next:Ba}}function NF(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var Lq=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},zq=function(t,r,n){Lq(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 xk(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Sk(e,t,r){var n=[],i=NF(e,n,r);return n.length<2?r:i+t(n)}var Uq=function(t){var r=Dq(t);r.sheet.speedy=function(a){this.isSpeedy=a},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=Qv(u,r.registered,void 0);return zq(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=Qv(u,r.registered),h="animation-"+f.name;return xk(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=Qv(u,r.registered);xk(r,f)},s=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return Sk(r.registered,n,Bq(u))};return{css:n,cx:s,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:NF.bind(null,r.registered),merge:Sk.bind(null,r.registered,n)}},Bq=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 s in i)i[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},ym=Uq({key:"css"}),jq=ym.cx,xm=ym.injectGlobal,DF=ym.keyframes,qq=ym.css;function Vq(e,t){xm(t)}function Kq(e,t){xm(dt([[e,t]]))}function Hq(e,t,r){xm(dt([[t,r]]))}function Wq(e){return DF(e)}function Gq(e,t){return DF(t)}let Sm=ij({injectRaw:e=>{xm(e)},renderRaw:Vq,injectRules:Kq,renderRules:Hq,make:e=>qq(e),mergeStyles:e=>jq(e),makeKeyframes:Wq,renderKeyframes:Gq}),c=Bj,ee=sj,Jq=aj,Bx=dj,Ee=fj,z=hj,me=pj,mo=gj,pi=mj,gi=vj,FF=_j,Ye=bj,ad=yj,Qq=xj,yn=Sj,Yq=Ej,Ih=wj,IF=kj,Es=Cj,Em=Rj,Xq=Aj,Zq=Tj,eV=$j,PF=Nj,Qs=Dj,ua=Fj,tV=Ij,rV=Pj,nV=Oj,Pt=Mj,xl=Lj,ca=zj,da=Uj,OF=jj,jo=qj,iV=Vj,br=Hj,MF=Kj,LF=Wj,fa=Gj,zF=Jj,He=Qj,UF=Yj,oV=Xj,Re=Zj,sV=tq,aV=rq,lV=lj,uV=uj,cV=cj,dV=rj,fV=Sm.global,w=Sm.style,Rr=Sm.merge,hV=Sm.keyframes,x={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"},F={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},T={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"},Z={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},mn={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function eo(e){return"var("+e+")"}let pV=w([z("flex"),me("column"),ee("center"),Ye("center"),c("gap",eo(F.md)),mo(1),c("min-height","200px"),ca("center"),c("padding",eo(F.xxl))]),gV=w([c("font-size","40px"),c("color",eo(x.textDisabled)),c("line-height","1")]),mV=w([c("color",eo(x.textPrimary)),c("font-size",eo(T.sizeLg)),c("font-weight",eo(T.weightMedium)),yn(Re(0))]),vV=w([c("color",eo(x.textSecondary)),c("font-size",eo(T.sizeMd)),c("max-width","360px"),yn(Re(0))]),_V=w([c("background",eo(x.brand)),c("color",eo(x.textOnBrand)),c("border","none"),c("border-radius",eo(Z.md)),c("padding","var("+F.sm+") var("+F.lg+")"),c("font-size",eo(T.sizeMd)),c("cursor","pointer"),Es(Re(8))]);function bV(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[b("div",{children:"( )",className:gV}),b("h3",{children:r,className:mV}),fe(e.description,null,n=>b("p",{children:n,className:vV})),fe(e.action,null,n=>{let i=n[1];return b("button",{children:n[0],className:_V,onClick:o=>i()})})],className:pV})}let ld=bV;function oi(e){return"var("+e+")"}let yV=w([jo({NAME:"percent",VAL:100}),c("border-collapse","collapse"),c("font-size",oi(T.sizeMd))]),xV=w([c("background",oi(x.surfaceSubtle)),c("border-bottom","2px solid var("+x.border+")")]),Ek=w([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",oi(x.textSecondary)),c("font-weight",oi(T.weightMedium)),c("font-size",oi(T.sizeSm)),c("text-align","left"),c("white-space","nowrap"),c("user-select","none")]),SV=w([c("padding","var("+F.sm+") var("+F.md+")"),c("font-size",oi(T.sizeMd))]),EV=w([Ee("pointer"),He([c("color",oi(x.textPrimary))])]),wV=w([c("color",oi(x.textPrimary))]),kV=w([Ih(Re(4)),c("font-size",oi(T.sizeXs)),c("color",oi(x.brand))]),wk=w([c("border-bottom","1px solid var("+x.borderSubtle+")"),He([c("background",oi(x.surfaceSubtle))])]),CV=w([c("min-height","44px")]),RV=w([Ee("pointer")]),AV=w([c("background",oi(x.surfaceSubtle)),c("box-shadow","inset 3px 0 0 0 var("+x.brand+")")]),kk=w([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",oi(x.textPrimary)),c("vertical-align","middle")]),TV=w([c("padding","var("+F.sm+") var("+F.md+")")]),$V=w([ca("center"),c("padding",oi(F.xxl))]);function NV(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?Ek+" "+SV:Ek;return b("thead",{children:b("tr",{children:e.columns.map(i=>{let o=fe(r,!1,l=>l.key===i.key),s=fe(r,"Asc",l=>l.direction),a=i.sortable?n+" "+EV+(o?" "+wV:""):n;return L("th",{children:[i.label,o?b("span",{children:s==="Asc"?"^":"v",className:kV}):null],className:a,style:fe(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return ae(t,u=>{let d=o&&s==="Asc"?"Desc":"Asc";u(i.key,d)})}},i.key)})}),className:xV})}function DV(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,s=e.columns,a=r!==void 0?r:"Compact",l=a==="Comfortable"?kk+" "+TV:kk,u=a==="Comfortable"?wk+" "+CV:wk;return L("table",{children:[b(NV,{columns:s,sortState:e.sortState,onSort:e.onSort,density:a}),b("tbody",{children:o.length===0?b("tr",{children:b("td",{children:D(e.emptyView,b(ld,{title:"No data"})),className:l+" "+$V,colSpan:s.length})}):o.map(d=>{let f=i(d),h=fe(n,u,g=>u+" "+RV),p=We(t,f)?h+" "+AV:h;return b("tr",{children:s.map(g=>b("td",{children:g.render(d),className:l},g.key)),className:p,onClick:g=>ae(n,m=>m(d))},f)})})],className:yV})}let ng=DV;function ig(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function FV(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function IV(e){let t=oe(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 Ck(e,t){return e.toString()+" "+t+(e===1?"":"s")}function BF(e,t,r,n){let i=n!==void 0?n:"item",o=D(r,t),s=o===t?Ck(o,i):o.toString()+" of "+Ck(t,i);if(e===void 0)return"Showing the "+s+" loaded";if(typeof e!="object")return"Showing all "+s;switch(e._0){case"FromStart":return"Showing the first "+s+" — more available";case"Between":return"Showing "+s+" — more before and after";case"ToEnd":return"Showing the last "+s+" — more before"}}function jF(e,t){return t?e+"+":e}function PV(e){return typeof e=="object"}function qF(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let VF=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function OV(e){let t={contents:5381};return e.split("").forEach(r=>{let n=D(r.codePointAt(0),0);t.contents=(t.contents*33|0)+n&2147483647}),Lo(t.contents,VF.length)}function MV(e){let t=oe(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 Yv(e){return"var("+e+")"}let LV=w([z("inlineFlex"),ee("center"),Ye("center"),c("border-radius",Yv(Z.full)),c("color","#ffffff"),c("font-family",Yv(T.fontFamily)),c("font-weight",Yv(T.weightMedium)),c("flex-shrink","0"),c("user-select","none"),c("vertical-align","middle"),c("overflow","hidden")]),zV=w([c("width","100%"),c("height","100%"),c("object-fit","cover")]);function UV(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=ue(()=>!1),s=o[1],a=qF(i),l=a.toString()+"px",u=r!==void 0?r!==""&&!o[0]:!1,d={background:u?"transparent":VF[OV(n)],fontSize:((a/2|0)-1|0).toString()+"px",height:l,width:l};return b("span",{children:u?b("img",{className:zV,alt:n,src:D(r,""),onError:f=>s(h=>!0)}):MV(n),"aria-label":n,className:LV,role:"img",style:d,title:n})}let ud=UV;function Oa(e){return"var("+e+")"}let BV=w([z("flex"),gi("wrap"),c("gap",Oa(F.xs)),ee("center")]),jV=w([z("inlineFlex"),ee("center"),c("padding","2px 8px"),c("border-radius",Oa(Z.full)),c("background",Oa(x.surfaceElevated)),c("color",Oa(x.textSecondary)),c("font-size",Oa(T.sizeXs)),c("font-weight",Oa(T.weightMedium)),c("line-height","1.5"),c("white-space","nowrap")]),qV=w([c("color",Oa(x.textDisabled)),c("font-size",Oa(T.sizeSm))]);function VV(e){let t=e.items;return t.length===0?b("span",{children:"—",className:qV}):b("div",{children:t.map((r,n)=>b("span",{children:r,className:jV},n.toString()+":"+r)),className:BV})}let KF=VV,KV=[["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"]],HV=dt(KV);function Xv(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function Zv(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function WV(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 GV(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 s=e.charAt(o);if(s==="_"||s==="-"||s===" ")i();else if(Xv(s)){let a=o>0&&Zv(e.charAt(o-1|0)),l=(o+1|0)<t&&Zv(e.charAt(o+1|0)),u=o>0&&Xv(e.charAt(o-1|0));(a||u&&l)&&i(),n.contents=n.contents+s}else if(WV(s)){let a=!1;if(o>0){let l=e.charAt(o-1|0);a=Xv(l)||Zv(l)}a&&i(),n.contents=n.contents+s}else n.contents=n.contents+s}return i(),r}function JV(e){let t=e.toLowerCase(),r=M(HV,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function mt(e){let t=GV(e);return t.length!==0?t.map(JV).join(" "):e}function Ul(e){return"var("+e+")"}let Rk=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("background","transparent"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Ul(Z.sm)),c("padding","1px 6px"),c("color",Ul(x.textSecondary)),c("font-size",Ul(T.sizeXs)),c("line-height","1"),Ee("pointer"),He([c("background",Ul(x.surfaceElevated)),c("color",Ul(x.textPrimary))])]),QV=w([c("color",Ul(x.success)),c("border-color",Ul(x.success))]);function YV(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=ue(()=>!1),o=i[1],s=i[0],a=u=>{u.stopPropagation(),u.preventDefault(),Vt(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=s?Rk+" "+QV:Rk;return b("button",{children:s?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:a})}let XV=YV;function og(e){return"var("+e+")"}let ZV=w([z("inlineFlex"),ee("center"),c("gap",og(F.xs)),c("min-width","0")]),eK=w([c("color",og(x.brand)),c("text-decoration","none"),c("max-width","260px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),He([c("text-decoration","underline")])]),tK=w([c("color",og(x.textPrimary)),c("font-family","var(--rv-font-mono, ui-monospace, monospace)"),c("font-size",og(T.sizeSm)),c("max-width","200px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]);function rK(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function nK(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,s=yl();return L("span",{children:[i!==void 0?b("a",{children:n,className:eK,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(),s(i)}}):b("span",{children:rK(n,18),className:tK,title:r}),o?b(XV,{value:r}):null],className:ZV})}let iK=nK;function Vs(e){return"var("+e+")"}let Ak=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",Vs(Z.full)),c("background",Vs(x.surfaceElevated)),c("color",Vs(x.textSecondary)),c("font-size",Vs(T.sizeXs)),c("font-weight",Vs(T.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("border","none")]),oK=w([Ee("pointer"),He([c("background",Vs(x.surface)),c("color",Vs(x.textPrimary))])]),sK=w([c("font-weight",Vs(T.weightBold)),c("color",Vs(x.textPrimary))]);function aK(e){let t=e.onClick,r=fe(t,Ak,i=>Ak+" "+oK),n=L(Br,{children:[b("span",{children:e.count.toString(),className:sK})," "+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 Sf=aK;function jd(e){let t=e.toString();return t.length<2?"0"+t:t}function jx(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,s=t.getHours()|0,a=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+jd(i)+"-"+jd(o)+" "+jd(s)+":"+jd(a)+":"+jd(l)}let lK=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function qx(e){if(lK.test(e))return jx(e)}function uK(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function HF(e,t){if(!fe(e,!1,uK))return qx(t)}function cK(e,t){return e>t?e-t|0:0}function ic(e){return"var("+e+")"}let dK=w([z("inlineFlex"),ee("center"),c("vertical-align","middle")]),Tk=w([z("inlineFlex"),c("border-radius",ic(Z.full)),c("box-shadow","0 0 0 2px var("+x.surface+")")]),fK=w([z("inlineFlex"),ee("center"),Ye("center"),c("border-radius",ic(Z.full)),c("background",ic(x.surfaceElevated)),c("color",ic(x.textSecondary)),c("font-family",ic(T.fontFamily)),c("font-weight",ic(T.weightMedium)),c("flex-shrink","0"),c("user-select","none")]);function hK(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,s=cK(n.length,o),a=s>0?n.slice(0,o):n,l=s>0?n.slice(o):[],u=qF(i),d=(-u|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((a.length+1|0)-h|0).toString()});return L("span",{children:[a.map((h,p)=>b("span",{children:b(ud,{name:h.name,src:h.imageUrl,size:i}),className:Tk,style:f(p)},p.toString())),s>0?b("span",{children:"+"+s.toString(),className:Tk+" "+fK,style:{fontSize:((u/2|0)-2|0).toString()+"px",height:u.toString()+"px",marginLeft:d.toString()+"px",width:u.toString()+"px",zIndex:(a.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:dK})}let WF=hK;function e_(e){return"var("+e+")"}function pK(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[x.success,x.background];case"Warning":return[x.warning,x.background];case"Error":return[x.error,x.background];case"Info":return[x.info,x.background];case"Neutral":return[x.surfaceElevated,x.textSecondary]}}function gK(e,t){return w([z("inlineFlex"),ee("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",e_(Z.full)),c("font-size",e_(T.sizeXs)),c("font-weight",e_(T.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 mK(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=pK(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:gK(o[0],o[1])})}let ra=mK,GF=ur(void 0),vK=GF.Provider;function _K(e){return Sr(vK,{value:e.fill,children:e.children})}let JF={make:_K};function bK(e){return R(It(GF),t=>t(e))}function yK(e){return J(e.plugin,t=>t+"."+e.store)}let QF={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 es(e,t){let r=J(M(e,t),rt);return r==="JSONTrue"&&typeof r!="object"}function qd(e,t){return R(M(e,t),de)}function xK(e){return R(R(M(e,"x-reventless-semantic-target"),Y),t=>J(R(M(t,"store"),de),r=>({plugin:R(M(t,"plugin"),de),store:r})))}function SK(e){return R(R(M(e,"x-reventless-setter"),Y),t=>J(R(M(t,"command"),de),r=>({command:r,field:R(M(t,"field"),de)})))}function EK(e){let t=J(M(e,"x-reventless-index"),rt);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function wK(e){let t=Y(e);if(t===void 0)return;let r=Y(ui(e));if(r===void 0||r===t)return t;let n=dt(Ge(r));return Ge(t).forEach(i=>{n[i[0]]=i[1]}),n}function bs(e){let t=wK(e);return t!==void 0?{isId:es(t,"x-reventless-id"),isCompositeId:es(t,"x-reventless-compositeId"),isSubId:es(t,"x-reventless-subId"),isCompositeSubId:es(t,"x-reventless-compositeSubId"),index:EK(t),hidden:es(t,"x-reventless-hidden"),summary:es(t,"x-reventless-summary"),groupBy:es(t,"x-reventless-group-by"),drillTarget:J(qd(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:qd(t,"x-reventless-drillTargetKey")})),collapsed:es(t,"x-reventless-collapsed"),scan:es(t,"x-reventless-scan"),scanSort:es(t,"x-reventless-scanSort"),semantic:qd(t,"x-reventless-semantic"),semanticFromType:We(qd(t,"x-reventless-semantic-source"),"type"),storeTarget:xK(t),channel:qd(t,"x-reventless-channel"),setter:SK(t)}:QF}function Ph(e,t){return D(J(R(R(Y(e),r=>M(r,"properties")),Y),r=>oe(Ge(r),n=>{if(t(bs(n[1])))return n[0]})),[])}function kK(e){return D(J(R(R(Y(e),t=>M(t,"properties")),Y),t=>oe(Ge(t),r=>{let n=r[0];return R(R(R(Y(r[1]),i=>M(i,"x-reventless-metric")),Y),i=>{let o=R(M(i,"aggregate"),de),s=R(M(i,"label"),de);return J(o,a=>[n,a,s])})})),[])}function wm(e){return Ph(e,t=>t.summary)}function CK(e){return Ph(e,t=>t.isId)[0]}function RK(e){return Ph(e,t=>t.groupBy)[0]}function Vx(e){return Ph(e,t=>t.isCompositeId)}function Kx(e){return Ph(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function AK(e){return R(R(Y(e),t=>M(t,"x-reventless-live")),t=>{let r=rt(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function YF(e){return R(R(Y(e),t=>M(t,"x-reventless-viewmode")),de)}function TK(e){return R(R(Y(e),t=>M(t,"x-reventless-layout")),de)}function cd(e){return R(J(R(R(Y(ui(e)),t=>M(t,"enum")),mr),t=>oe(t,de)),t=>{if(t.length!==0)return t})}function qo(e,t){return D(R(R(R(R(Y(e),r=>M(r,"properties")),Y),r=>M(r,t)),cd),[])}function Oh(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"}}let $K=["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"],NK="storageRef";function Hx(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"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":return"GeoPoint";case"image":return"Image";case"label":return"Label";case"markdown":return"Markdown";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 Xr(e){return D(J(R(R(Y(ui(e)),t=>M(t,"properties")),Y),Ge),[]).map(t=>[t[0],ui(t[1])])}function Gr(e,t){return R(R(Y(ui(e)),r=>M(r,t)),de)}function DK(e){return Gr(e,"type")}function il(e){let t=Gr(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function km(e){return We(Gr(e,"type"),"string")}function Wx(e){let t=Gr(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let XF=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function ZF(e){return XF.includes(e.toLowerCase())}function sg(e,t){return t.some(r=>e.endsWith(r))}function FK(e){return sg(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function IK(e){let t=Gr(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 $k(e){return fe(cd(e),0,t=>t.length)}function Hf(e,t){return R(R(Y(ui(e)),r=>M(r,t)),_s)}function PK(e,t){if(!il(t))return;let r=Hf(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 OK=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function MK(e){let t=Xr(e);return OK.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let LK=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function zK(e){return LK.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function UK(e,t){let r=e.toLowerCase(),n=PK(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&$k(t)>0?$k(t)<=8?["Status","name:status-enum"]:void 0:We(Gr(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:il(t)&&sg(r,["price","amount","total"])?["Currency","name:currency"]:We(Gr(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:We(Gr(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:We(Gr(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:We(Gr(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||sg(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:il(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:We(Gr(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:We(Gr(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:We(Gr(t,"type"),"string")&&zK(r)?["ParentRef","name:parent-ref"]:We(Gr(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:We(Gr(t,"type"),"string")&&XF.includes(r)?["UserRef","name:user"]:void 0}function eI(e){return["lat","latitude"].includes(e)}function tI(e){return["lng","lon","long","longitude"].includes(e)}function BK(e){let t=Xr(e),r=t.some(i=>eI(i[0].toLowerCase())?il(i[1]):!1),n=t.some(i=>tI(i[0].toLowerCase())?il(i[1]):!1);return r?n:!1}function jK(e){return["createdat","updatedat","deletedat"].includes(e)}let Nk={contents:[]};function rI(e,t,r){let n=e+"."+t+"."+r;if(Nk.contents.some(o=>o===n))return;Nk.contents.push(n);let i=$K.map(Oh).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function Cm(e,t){let r=ui(t),n=bs(r),i=n.semanticFromType?"Type":"Annotation",o=We(n.semantic,NK),s=R(n.semantic,d=>{if(o)return;let f=Hx(d);if(f!==void 0)return{semantic:f,provenance:i};rI("x-reventless-semantic",e,d)});if(s!==void 0)return s;let a=e.toLowerCase(),l=We(Gr(r,"type"),"object")&&MK(r)?["Address","shape:address"]:We(Gr(r,"type"),"object")&&BK(r)?["GeoPoint","shape:geo-point"]:eI(a)&&il(r)?["GeoLat","name:geo-pair"]:tI(a)&&il(r)?["GeoLng","name:geo-pair"]:void 0,u;if(l!==void 0)u=l;else if(We(Gr(r,"type"),"string")&&FK(a))u=["FileUrl","name:file-url"];else{let d=IK(r);u=d!==void 0?d:UK(e,r)}return Dh(J(u,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function jr(e,t,r){let n=Xr(e),i={};n.forEach(_=>{let y=_[0],E=R(R(t,S=>M(S,y)),S=>{let k=Hx(S);if(k!==void 0)return{semantic:k,provenance:"Hint"};rI("uiHints.fields",y,S)});if(E!==void 0){i[y]=E;return}else return ae(Cm(y,_[1]),S=>{i[y]=S})});let o=_=>n.map(y=>y[0]).find(y=>fe(M(i,y),!1,E=>E.semantic===_)),s=R(fm(r,_=>_.field!=="id"),_=>J(n.find(y=>y[0]===_.field?We(Gr(y[1],"type"),"string"):!1),y=>y[0])),a=fe(r,!1,_=>We(_.source,"annotation")),l=n.map(_=>_[0]).find(_=>fe(M(i,_),!1,y=>y.semantic==="Label"?y.provenance==="Hint":!1)),u;if(l!==void 0)u=l;else{let _=0;if(s!==void 0&&a?u=s:_=1,_===1){let y=o("Label");u=y!==void 0?y:s}}if(u!==void 0&&s!==void 0&&u===s){let y={semantic:"Label",provenance:a?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},E=M(i,u);if(E!==void 0){let S=0,k=E.provenance;(typeof k=="object"||k!=="Hint")&&(S=1),S===1&&E.semantic==="Label"&&(i[u]=y)}else i[u]=y}let d=o("GeoLat"),f=o("GeoLng"),h=d!==void 0&&f!==void 0?{latField:d,lngField:f}:void 0,p=oe(n,_=>{let y=_[0];if(fe(M(i,y),!1,E=>E.semantic==="DateTime")||Wx(_[1]))return y}),g=p.find(_=>_.toLowerCase().startsWith("start")),m=p.find(_=>_.toLowerCase().startsWith("end")),v=g!==void 0?m!==void 0?{startField:g,endField:m}:{startField:g}:J(p.find(_=>{let y=_.toLowerCase();return jK(y)?!1:sg(y,["at","date"])?!0:y==="date"}),_=>({startField:_}));return{semantics:i,geo:h,dateSpan:v,statusField:o("Status"),labelField:u,imageField:o("Image"),parentField:o("ParentRef")}}let nI=ur([]),iI=ur(e=>{}),qK=nI.Provider,VK=iI.Provider;function KK(e){let t=e.initial,r=t!==void 0?t:[],n=ue(()=>r),i=n[1],o=Qr(s=>i(a=>s),[]);return Sr(VK,{value:o,children:Sr(qK,{value:n[0],children:e.children})})}let HK={make:KK};function ws(){return It(nI)}function WK(){return It(iI)}function GK(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function JK(e){return e.endsWith("s")?e:e+"s"}function ha(e,t){let r=GK(t),n=JK(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function Da(e,t){return gF(r=>eg(e,eg(encodeURIComponent(t),r)))}function oc(e,t){return eg(e,eg(encodeURIComponent(t),cU))}function na(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return qs(oc(e,t))(mF.of_parts(i.join("/")))}function QK(e){let r=mF.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=J(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}function ol(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}var Bl=(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))(Bl||{});const YK=[0,1],oI=[1,0],sI=[2,3],aI=[3,2],XK={L:YK,M:oI,Q:sI,H:aI},ZK=/^\d*$/,eH=/^[A-Z0-9 $%*+./:-]*$/,t_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Gx=1,Jx=40,Dk=3,tH=3,kp=40,rH=10,lI=[[-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]],uI=[[-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 nH=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<Gx||t>Jx)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 a=0;a<this.size;a++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),i===-1){let a=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u<a&&(i=l,a=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,Bl.Timing),this.setFunctionModule(n,6,n%2===0,Bl.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,Fs(i,o));this.setFunctionModule(8,7,Fs(i,6)),this.setFunctionModule(8,8,Fs(i,7)),this.setFunctionModule(7,8,Fs(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,Fs(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,Fs(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,Fs(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=Fs(r,n),o=this.size-11+n%3,s=Math.floor(n/3);this.setFunctionModule(o,s,i),this.setFunctionModule(s,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)),s=t+i,a=r+n;s>=0&&s<this.size&&a>=0&&a<this.size&&this.setFunctionModule(s,a,o!==2&&o!==4,Bl.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,Bl.Alignment)}setFunctionModule(t,r,n,i=Bl.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==D0(r,n))throw new RangeError("Invalid argument");const i=uI[n[0]][r],o=lI[n[0]][r],s=Math.floor(Iy(r)/8),a=i-s%i,l=Math.floor(s/i),u=[],d=fH(o);for(let h=0,p=0;h<i;h++){const g=t.slice(p,p+l-o+(h<a?0:1));p+=g.length;const m=hH(g,d);h<a&&g.push(0),u.push(g.concat(m))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,g)=>{(h!==l-o||g>=a)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(Iy(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 s=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][s]&&r<t.length*8&&(this.modules[l][s]=Fs(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 s=!1,a=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[o][u]===s?(a++,a===5?t+=Dk:a>5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*kp),s=this.modules[o][u],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*kp}for(let o=0;o<this.size;o++){let s=!1,a=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][o]===s?(a++,a===5?t+=Dk:a>5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*kp),s=this.modules[u][o],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*kp}for(let o=0;o<this.size-1;o++)for(let s=0;s<this.size-1;s++){const a=this.modules[o][s];a===this.modules[o][s+1]&&a===this.modules[o+1][s]&&a===this.modules[o+1][s+1]&&(t+=tH)}let r=0;for(const o of this.modules)r=o.reduce((s,a)=>s+(a?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*rH,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 Ks(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 Fs(e,t){return(e>>>t&1)!==0}class Qx{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 iH=[1,10,12,14],oH=[2,9,11,13],sH=[4,8,16,16];function cI(e,t){return e[Math.floor((t+7)/17)+1]}function dI(e){const t=[];for(const r of e)Ks(r,8,t);return new Qx(sH,e.length,t)}function aH(e){if(!fI(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);Ks(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new Qx(iH,e.length,t)}function lH(e){if(!hI(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=t_.indexOf(e.charAt(r))*45;n+=t_.indexOf(e.charAt(r+1)),Ks(n,11,t)}return r<e.length&&Ks(t_.indexOf(e.charAt(r)),6,t),new Qx(oH,e.length,t)}function uH(e){return e===""?[]:fI(e)?[aH(e)]:hI(e)?[lH(e)]:[dI(dH(e))]}function fI(e){return ZK.test(e)}function hI(e){return eH.test(e)}function cH(e,t){let r=0;for(const n of e){const i=cI(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function dH(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 Iy(e){if(e<Gx||e>Jx)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 D0(e,t){return Math.floor(Iy(e)/8)-lI[t[0]][e]*uI[t[0]][e]}function fH(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]=Py(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=Py(r,2)}return t}function hH(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,s)=>r[s]^=Py(o,i))}return r}function Py(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 pH(e,t,r=1,n=40,i=-1,o=!0){if(!(Gx<=r&&r<=n&&n<=Jx)||i<-1||i>7)throw new RangeError("Invalid value");let s,a;for(s=r;;s++){const f=D0(s,t)*8,h=cH(e,s);if(h<=f){a=h;break}if(s>=n)throw new RangeError("Data too long")}for(const f of[oI,sI,aI])o&&a<=D0(s,f)*8&&(t=f);const l=[];for(const f of e){Ks(f.mode[0],4,l),Ks(f.numChars,cI(f.mode,s),l);for(const h of f.getData())l.push(h)}const u=D0(s,t)*8;Ks(0,Math.min(4,u-l.length),l),Ks(0,(8-l.length%8)%8,l);for(let f=236;l.length<u;f^=253)Ks(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 nH(s,t,d,i)}function gH(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:s=-1,border:a=1}=t||{},l=typeof e=="string"?uH(e):Array.isArray(e)?[dI(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=pH(l,XK[r],i,o,s,n),d=mH({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},a);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function mH(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let s=0;s<t;s++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},s=>!1)),e.data.push(Array.from({length:n},s=>!1));const i=Bl.Border;e.types.forEach(o=>{for(let s=0;s<t;s++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},s=>i)),e.types.push(Array.from({length:n},s=>i));return e}function vH(e){return"var("+e+")"}let _H=w([z("inlineBlock"),c("background","#ffffff"),c("padding","6px"),c("border-radius",vH(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),c("line-height","0")]),bH=w([c("color","#000000"),c("display","block")]);function yH(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function xH(e){if(e.trim()!=="")try{return gH(e,{ecc:"M",border:4})}catch{return}}function SH(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=xH(r);if(i===void 0)return null;let o=i.size.toString();return b("span",{children:b("svg",{children:b("path",{d:yH(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:bH,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:_H})}let EH=SH,wH=["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 Fk(e){return e>="0"?e<="9":!1}function kH(e){let t=[],r=0,n=e.length;for(;r<n;)if(Fk(D(e[r],""))){let i=r;for(;r<n&&Fk(D(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function CH(e){let t={};return kH(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,s=n-o|0;if(s<=0)return;let a=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(s/2|0)|0)+(a?0:1)|0)<n){t[(i+o|0).toString()]=s;return}}),t}function RH(e){let t=e.length;if(t===0||e.split("").some(l=>{let u=D(l.codePointAt(0),0);return u<32?!0:u>126}))return;let n=CH(e),i=[],o=Le(n[0]);i.push(o?105:104);let s=o?"C":"B",a=0;for(;a<t;){let l=n[a.toString()];if(l!==void 0){s!=="C"&&(i.push(99),s="C");for(let u=0,d=l/2|0;u<d;++u){let f=e.substring(a+(u<<1)|0,(a+(u<<1)|0)+2|0);i.push(D(uF(f),0))}a=a+l|0}else s==="C"&&(i.push(100),s="B"),i.push(D(e.codePointAt(a),32)-32|0),a=a+1|0}return i}function AH(e){return J(RH(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=>wH[n]).join("")})}function TH(e,t,r){let n=r.toString(),i=[],o=0,s=e.length;for(;o<s;)if(We(e[o],"1")){let a=o;for(;o<s&&We(e[o],"1");)o=o+1|0;let l=(o-a|0).toString();i.push("M"+(a+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function $H(e){return"var("+e+")"}let NH=w([z("inlineBlock"),Zq({NAME:"percent",VAL:100}),c("overflow-x","auto"),c("background","#ffffff"),c("padding","6px"),c("border-radius",$H(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),c("line-height","0")]),DH=w([c("color","#000000"),c("display","block")]);function FH(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,s=AH(n);if(s===void 0)return null;let a=s.length+20|0;return b("span",{children:b("svg",{children:b("path",{d:TH(s,10,40),fill:"currentColor"}),"aria-label":D(e.title,"Barcode for "+n),className:DH,role:"img",height:i.toString(),width:(a*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+a.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:NH})}let IH=FH;function Oi(e){return"var("+e+")"}let PH=w([Pt("fixed"),da(Re(0)),ad(Re(0)),xl(Re(0)),Bx(Re(0)),c("background","rgba(0,0,0,0.82)"),z("flex"),me("column"),ee("center"),Ye("center"),c("gap",Oi(F.md)),c("padding",Oi(F.lg)),c("z-index","1100")]),OH=w([c("max-width","min(92vw, 1400px)"),c("max-height","78vh"),c("object-fit","contain"),c("border-radius",Oi(Z.sm)),c("box-shadow",Oi(mn.lg))]),MH=w([z("flex"),ee("center"),c("gap",Oi(F.md)),c("max-width","100%")]),LH=w([z("flex"),ee("center"),c("gap",Oi(F.md)),c("max-width","92vw"),c("color","#f5f5f5"),c("font-size",Oi(T.sizeSm))]),zH=w([c("font-size",Oi(T.sizeMd)),c("font-weight",Oi(T.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),UH=w([c("color","#c8c8c8")]),BH=w([c("font-family",Oi(T.fontFamilyMono)),c("color","#c8c8c8")]),pI=w([z("inlineFlex"),ee("center"),Ye("center"),c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",Oi(Z.md)),c("color","#f5f5f5"),c("padding","4px var("+F.sm+")"),c("font-size",Oi(T.sizeSm)),Ee("pointer"),He([c("background","rgba(255,255,255,0.22)")])]),Ik=Rr([pI,w([c("width","40px"),c("height","40px"),c("border-radius","50%"),c("font-size",Oi(T.sizeLg)),pi(0)])]),jH=Rr([pI,w([Pt("absolute"),da(Re(16)),xl(Re(16)),c("width","32px")])]);function Wu(e,t,r){return t===0?0:Lo(Lo(e+r|0,t)+t|0,t)}function qH(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,s=o>1;Te(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return s?r(Wu(n,o,-1)):void 0;case"ArrowRight":return s?r(Wu(n,o,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,o]);let a=i[Wu(n,o,0)];if(a===void 0)return null;let l=a.title,u=a.caption;return L("div",{children:[b("button",{children:"✕",className:jH,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[s?b("button",{children:"‹",className:Ik,title:"Previous",type:"button",onClick:d=>r(Wu(n,o,-1))}):null,b("img",{className:OH,alt:D(a.title,""),src:a.src}),s?b("button",{children:"›",className:Ik,title:"Next",type:"button",onClick:d=>r(Wu(n,o,1))}):null],className:MH,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?b("span",{children:l,className:zH,title:l}):null,u!==void 0?b("span",{children:u,className:UH}):null,s?b("span",{children:(Wu(n,o,0)+1|0).toString()+" / "+o.toString(),className:BH}):null,D(e.action,null)],className:LH,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:PH,role:"dialog",onClick:d=>t()})}let gI=qH;function Vl(e){return"var("+e+")"}function VH(e){return w([c("width","100%"),c("height",e),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Vl(Z.md)),c("background",Vl(x.surfaceSubtle)),ua("hidden")])}let KH=w([z("flex"),me("column"),ee("center"),Ye("center"),c("gap",Vl(F.sm)),c("height","100%"),c("padding",Vl(F.lg)),c("color",Vl(x.textSecondary)),c("font-size",Vl(T.sizeSm)),c("text-align","center")]),HH=w([c("color",Vl(x.brand)),c("text-decoration","none"),He([c("text-decoration","underline")])]);function WH(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function GH(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:HH,href:n,rel:"noopener noreferrer",target:"_blank"})],className:KH}),"aria-label":i,className:VH(o),data:n,type:"application/pdf"})}let JH=GH;function mI(e){return e==="Small"?"13px":"18px"}let vI="★";function QH(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function ou(e){return"var("+e+")"}function YH(e){return w([z("inlineFlex"),Pt("relative"),c("font-size",mI(e)),c("line-height","1"),c("letter-spacing","1px"),c("white-space","nowrap"),c("vertical-align","-1px")])}let XH=w([c("color",ou(x.borderSubtle))]);function ZH(e){return w([Pt("absolute"),c("top","0"),c("left","0"),c("width",(e*100).toString()+"%"),ua("hidden"),c("white-space","nowrap"),c("color",ou(x.warning)),c("pointer-events","none")])}let Pk=w([z("inlineFlex"),c("gap","2px"),ee("center")]);function eW(e,t){return w([c("background","none"),c("border","none"),c("padding","0 1px"),c("font-size",mI(t)),c("line-height","1"),Ee("pointer"),c("color",ou(e?x.warning:x.borderSubtle)),c("transition","color 120ms, transform 120ms"),He([c("transform","scale(1.15)")]),br("&:focus-visible",[c("outline","2px solid var("+x.brand+")"),c("outline-offset","1px"),c("border-radius","2px")])])}let Ok=w([c("color",ou(x.textSecondary)),c("font-size",ou(T.sizeSm))]),tW=w([z("inlineFlex"),ee("center"),c("gap","6px")]),rW=w([c("border","1px solid var("+x.error+")"),c("border-radius",ou(Z.sm)),c("padding","2px 4px")]);function nW(e){return aF(e<=0?0:e,vI).join("")}function iW(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,s=e.max,a=e.value,l=s!==void 0?s: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=nW(h),g=D(e.label,(Math.round(a*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[nl(h,m=>m+1|0).map(m=>{let v=m<=a;return b("button",{children:vI,"aria-label":m.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:eW(v,u),title:m.toString()+" of "+h.toString(),type:"button",onBlur:_=>ae(r,y=>y()),onClick:_=>{_.stopPropagation(),n(m===a?0:m)}},m.toString())}),d?b("span",{children:a<=0?"—":a.toString(),className:Ok}):null],"aria-label":g,className:f?Pk+" "+rW:Pk,role:"group"}):L("span",{children:[L("span",{children:[b("span",{children:p,className:XH}),b("span",{children:p,className:ZH(QH(a,h))})],"aria-label":g,className:YH(u),role:"img",title:g}),d?b("span",{children:(Math.round(a*10)/10).toString()+" / "+h.toString(),className:Ok}):null],className:tW})}let r_=iW;function su(e){return"var("+e+")"}let oW=w([z("flex"),me("column"),c("gap","4px")]),sW=w([z("flex"),Ye("spaceBetween"),c("font-size",su(T.sizeSm))]),aW=w([c("color",su(x.textSecondary))]),lW=w([c("color",su(x.textPrimary)),c("font-weight",su(T.weightMedium))]),uW=w([c("background",su(x.surfaceSubtle)),c("border-radius",su(Z.full)),c("height","8px"),ua("hidden")]);function cW(e,t){return w([c("background",t!==void 0?t:"var("+x.brand+")"),c("border-radius",su(Z.full)),c("height","100%"),c("width",e.toString()+"%"),c("transition","width 0.3s ease")])}function dW(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,s=o<0?0:o;return L("div",{children:[Le(r)||i?L("div",{children:[fe(r,null,a=>b("span",{children:a,className:aW})),i?b("span",{children:Math.round(s).toString()+"%",className:lW}):null],className:sW}):null,b("div",{children:b("div",{className:cW(s,e.color)}),className:uW})],className:oW})}let _I=dW,Rm={};function bI(e){Rm[e.id]=e}function yI(e){return M(Rm,e)}let xI={};function fW(e){return fe(M(Rm,e),xI,t=>t.constraints)}let Mk={contents:[]};function hW(e,t){if(Mk.contents.some(n=>n===e))return;Mk.contents.push(e);let r=Fx(Rm).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 SI="#111111";function Ao(e){return"var("+e+")"}let Lk=w([z("flex"),me("column"),c("gap",Ao(F.xs))]);function pW(e){return w([c("background","#ffffff"),c("border",e?"1px solid var("+x.error+")":"1px dashed var("+x.border+")"),c("border-radius",Ao(Z.md)),c("touch-action","none"),c("max-width","100%"),c("width","100%"),c("height","auto"),Ee("crosshair"),c("display","block")])}let gW=w([c("fill","#9ca3af"),c("font-size","13px"),c("pointer-events","none"),c("user-select","none")]),mW=w([c("stroke","#e5e7eb"),c("stroke-width","1")]),zk=w([z("flex"),ee("center"),c("gap",Ao(F.sm)),c("font-size",Ao(T.sizeXs)),c("color",Ao(x.textSecondary))]),Uk=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Ao(Z.sm)),c("color",Ao(x.textSecondary)),c("font-size",Ao(T.sizeXs)),c("padding","2px 8px"),Ee("pointer"),He([c("border-color",Ao(x.brand)),c("color",Ao(x.brand))])]),vW=w([c("background","#ffffff"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Ao(Z.md)),c("padding","4px"),c("display","inline-block"),c("line-height","0")]),_W=w([c("display","block"),c("max-width","100%"),c("height","auto")]);function ri(e){return(Math.round(e*10)/10).toString()}function EI(e){return e.map(t=>ri(t.x)+","+ri(t.y)).join(" ")}function bW(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let s=o.length===1?o.concat(o):o;return'<polyline points="'+EI(s)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+ri(t)+" "+ri(r)+'" width="'+ri(t)+'" height="'+ri(r)+'"><g fill="none" stroke="'+SI+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function Bk(e){return e.trim().startsWith("<svg")}function wI(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function yW(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function xW(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,s=e.value,a=n!==void 0?n:480,l=r!==void 0?r:160,u=t!==void 0?t:!1,d=Qe(null),f=ue(()=>[]),h=f[1],p=f[0],g=ue(()=>!1),m=g[1],v=Qe(!1),_=A=>J(vs(d.current),N=>{let O=N.getBoundingClientRect(),P=O.width===0?1:a/O.width,I=O.height===0?1:l/O.height;return{x:(A.clientX-O.left)*P,y:(A.clientY-O.top)*I}}),y=A=>o(bW(A,a,l)),E=A=>{A.preventDefault();let N=_(A);if(N!==void 0)return v.current=!0,ae(vs(d.current),O=>{O.setPointerCapture(A.pointerId)}),h(O=>O.concat([[N]]))},S=A=>{if(!v.current)return;let N=_(A);if(N!==void 0)return h(O=>{let P=O[O.length-1|0];if(P===void 0)return O;let I=P[P.length-1|0];return I!==void 0&&!yW(N,I)?O:O.slice(0,O.length-1|0).concat([P.concat([N])])})},k=A=>{if(v.current)return v.current=!1,y(p),ae(i,N=>N())},C=()=>{h(A=>[]),m(A=>!0),o("")},$=p.length!==0;return s.trim().startsWith("<svg")&&!$&&!g[0]?L("div",{children:[b("span",{children:b("img",{className:_W,alt:"Signature",src:wI(s)}),className:vW}),b("div",{children:b("button",{children:"Sign again",className:Uk,type:"button",onClick:A=>C()}),className:zk})],className:Lk}):L("div",{children:[L("svg",{children:[b("line",{className:mW,x1:ri(a*.06),x2:ri(a*.94),y1:ri(l*.78),y2:ri(l*.78)}),$?null:b("text",{children:"Sign here",className:gW,textAnchor:"middle",x:ri(a/2),y:ri(l*.7)}),b("g",{children:p.map((A,N)=>b("polyline",{points:EI(A.length===1?A.concat(A):A)},N.toString())),fill:"none",stroke:SI,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Wt(d),"aria-label":"Signature pad",className:pW(u),role:"img",onPointerDown:E,onPointerMove:S,onPointerUp:k,onPointerCancel:k,viewBox:"0 0 "+ri(a)+" "+ri(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[$?b("button",{children:"Clear",className:Uk,type:"button",onClick:A=>C()}):null,b("span",{children:"Draw your signature above"})],className:zk})],className:Lk})}let SW=xW;function EW(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function to(e){return"var("+e+")"}let wW=w([z("flex"),me("column"),c("gap",to(F.sm))]),kW=w([z("flex"),c("gap","4px")]),jk=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",to(Z.sm)),c("color",to(x.textSecondary)),c("font-size",to(T.sizeXs)),c("padding","2px 8px"),Ee("pointer")]),CW=w([c("background",to(x.brandSubtle)),c("border-color",to(x.brand)),c("color",to(x.textPrimary))]),RW=w([jo({NAME:"percent",VAL:100}),c("min-height","220px"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",to(Z.sm)),c("background","#ffffff")]),AW=w([c("margin","0"),c("font-family",to(T.fontFamilyMono)),c("font-size",to(T.sizeXs)),c("line-height",to(T.lineHeightRelaxed)),c("color",to(x.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]);function TW(e){let t=e.textAlternative,r=ue(()=>!1),n=r[1],i=r[0],o=(l,u,d)=>b("button",{children:l,className:u?jk+" "+CW:jk,type:"button",onClick:d}),s,a=0;return i&&t!==void 0?s=b("pre",{children:t,className:AW}):a=1,a===1&&(s=b("iframe",{className:RW,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:kW}):null,s],className:wW})}function $W(e,t){return b(TW,{html:e.body,textAlternative:e.textAlternative})}function NW(){bI({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:$W})}const qk={};function DW(e){let t=qk[e];if(t)return t;t=qk[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 jc(e,t){typeof t!="string"&&(t=jc.defaultChars);const r=DW(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,s=n.length;o<s;o+=3){const a=parseInt(n.slice(o+1,o+3),16);if(a<128){i+=r[a];continue}if((a&224)===192&&o+3<s){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const u=a<<6&1984|l&63;u<128?i+="��":i+=String.fromCharCode(u),o+=3;continue}}if((a&240)===224&&o+6<s){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=a<<12&61440|l<<6&4032|u&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((a&248)===240&&o+9<s){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=a<<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})}jc.defaultChars=";/?:@&=+$,#";jc.componentChars="";const Vk={};function FW(e){let t=Vk[e];if(t)return t;t=Vk[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 Mh(e,t,r){typeof t!="string"&&(r=t,t=Mh.defaultChars),typeof r>"u"&&(r=!0);const n=FW(t);let i="";for(let o=0,s=e.length;o<s;o++){const a=e.charCodeAt(o);if(r&&a===37&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(a<128){i+=n[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s){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}Mh.defaultChars=";/?:@&=+$,-_.!~*'()#";Mh.componentChars="-_.!~*'()";function Yx(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 ag(){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 IW=/^([a-z0-9.+-]+:)/i,PW=/:[0-9]*$/,OW=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,MW=["<",">",'"',"`"," ","\r",`
|
|
3
|
+
`," "],LW=["{","}","|","\\","^","`"].concat(MW),zW=["'"].concat(LW),Kk=["%","/","?",";","#"].concat(zW),Hk=["/","?","#"],UW=255,Wk=/^[+a-z0-9A-Z_-]{0,63}$/,BW=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Gk={javascript:!0,"javascript:":!0},Jk={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Xx(e,t){if(e&&e instanceof ag)return e;const r=new ag;return r.parse(e,t),r}ag.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=OW.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=IW.exec(o);if(s&&(s=s[0],r=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(s&&Gk[s])&&(o=o.substr(2),this.slashes=!0)),!Gk[s]&&(i||s&&!Jk[s])){let u=-1;for(let g=0;g<Hk.length;g++)n=o.indexOf(Hk[g]),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 g=0;g<Kk.length;g++)n=o.indexOf(Kk[g]),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 g=this.hostname.split(/\./);for(let m=0,v=g.length;m<v;m++){const _=g[m];if(_&&!_.match(Wk)){let y="";for(let E=0,S=_.length;E<S;E++)_.charCodeAt(E)>127?y+="x":y+=_[E];if(!y.match(Wk)){const E=g.slice(0,m),S=g.slice(m+1),k=_.match(BW);k&&(E.push(k[1]),S.unshift(k[2])),S.length&&(o=S.join(".")+o),this.hostname=E.join(".");break}}}}this.hostname.length>UW&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=o.indexOf("#");a!==-1&&(this.hash=o.substr(a),o=o.slice(0,a));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),Jk[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ag.prototype.parseHost=function(e){let t=PW.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 jW=Object.freeze(Object.defineProperty({__proto__:null,decode:jc,encode:Mh,format:Yx,parse:Xx},Symbol.toStringTag,{value:"Module"})),kI=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,CI=/[\0-\x1F\x7F-\x9F]/,qW=/[\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]/,Zx=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,RI=/[\$\+<->\^`\|~\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]/,AI=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,VW=Object.freeze(Object.defineProperty({__proto__:null,Any:kI,Cc:CI,Cf:qW,P:Zx,S:RI,Z:AI},Symbol.toStringTag,{value:"Module"})),KW=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),HW=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var n_;const WW=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]]),GW=(n_=String.fromCodePoint)!==null&&n_!==void 0?n_: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 JW(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=WW.get(e))!==null&&t!==void 0?t:e}var cn;(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"})(cn||(cn={}));const QW=32;var ja;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ja||(ja={}));function Oy(e){return e>=cn.ZERO&&e<=cn.NINE}function YW(e){return e>=cn.UPPER_A&&e<=cn.UPPER_F||e>=cn.LOWER_A&&e<=cn.LOWER_F}function XW(e){return e>=cn.UPPER_A&&e<=cn.UPPER_Z||e>=cn.LOWER_A&&e<=cn.LOWER_Z||Oy(e)}function ZW(e){return e===cn.EQUALS||XW(e)}var on;(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"})(on||(on={}));var Hs;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Hs||(Hs={}));class eG{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=on.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Hs.Strict}startEntity(t){this.decodeMode=t,this.state=on.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case on.EntityStart:return t.charCodeAt(r)===cn.NUM?(this.state=on.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=on.NamedEntity,this.stateNamedEntity(t,r));case on.NumericStart:return this.stateNumericStart(t,r);case on.NumericDecimal:return this.stateNumericDecimal(t,r);case on.NumericHex:return this.stateNumericHex(t,r);case on.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|QW)===cn.LOWER_X?(this.state=on.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=on.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(Oy(i)||YW(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(Oy(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===cn.SEMI)this.consumed+=1;else if(this.decodeMode===Hs.Strict)return 0;return this.emitCodePoint(JW(this.result),this.consumed),this.errors&&(t!==cn.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&ja.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const s=t.charCodeAt(r);if(this.treeIndex=tG(n,i,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Hs.Attribute&&(o===0||ZW(s))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&ja.VALUE_LENGTH)>>14,o!==0){if(s===cn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Hs.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]&ja.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]&~ja.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case on.NamedEntity:return this.result!==0&&(this.decodeMode!==Hs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case on.NumericDecimal:return this.emitNumericEntity(0,2);case on.NumericHex:return this.emitNumericEntity(0,3);case on.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case on.EntityStart:return 0}}}function TI(e){let t="";const r=new eG(e,n=>t+=GW(n));return function(i,o){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),r.startEntity(o);const u=r.write(i,a+1);if(u<0){s=a+r.end();break}s=a+u,a=u===0?s+1:s}const l=t+i.slice(s);return t="",l}}function tG(e,t,r,n){const i=(t&ja.BRANCH_LENGTH)>>7,o=t&ja.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 s=r,a=s+i-1;for(;s<=a;){const l=s+a>>>1,u=e[l];if(u<n)s=l+1;else if(u>n)a=l-1;else return e[l+i]}return-1}const $I=TI(KW);TI(HW);function rG(e,t=Hs.Legacy){return $I(e,t)}function nG(e){return $I(e,Hs.Strict)}function iG(e){return Object.prototype.toString.call(e)}function eS(e){return iG(e)==="[object String]"}const oG=Object.prototype.hasOwnProperty;function sG(e,t){return oG.call(e,t)}function Am(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 NI(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function tS(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 Wf(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 DI=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,aG=/&([a-z#][a-z0-9]{1,31});/gi,lG=new RegExp(DI.source+"|"+aG.source,"gi"),uG=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function cG(e,t){if(t.charCodeAt(0)===35&&uG.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return tS(n)?Wf(n):e}const r=rG(e);return r!==e?r:e}function dG(e){return e.indexOf("\\")<0?e:e.replace(DI,"$1")}function qc(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(lG,function(t,r,n){return r||cG(t,n)})}const fG=/[&<>"]/,hG=/[&<>"]/g,pG={"&":"&","<":"<",">":">",'"':"""};function gG(e){return pG[e]}function sl(e){return fG.test(e)?e.replace(hG,gG):e}const mG=/[.?*+^$[\]\\(){}|-]/g;function vG(e){return e.replace(mG,"\\$&")}function nr(e){switch(e){case 9:case 32:return!0}return!1}function Gf(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 FI(e){return Zx.test(e)||RI.test(e)}function Jf(e){return FI(Wf(e))}function Qf(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 Tm(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Qk(e){return e===32||e===9||e===10||e===13}function $m(e){let t=0;for(;t<e.length&&Qk(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&Qk(e.charCodeAt(r));r--);return e.slice(t,r+1)}const _G={mdurl:jW,ucmicro:VW},bG=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:NI,asciiTrim:$m,assign:Am,escapeHtml:sl,escapeRE:vG,fromCodePoint:Wf,has:sG,isMdAsciiPunct:Qf,isPunctChar:FI,isPunctCharCode:Jf,isSpace:nr,isString:eS,isValidEntityCode:tS,isWhiteSpace:Gf,lib:_G,normalizeReference:Tm,unescapeAll:qc,unescapeMd:dG},Symbol.toStringTag,{value:"Module"}));function yG(e,t,r){let n,i,o,s;const a=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(s=e.pos,e.md.inline.skipToken(e),o===91){if(s===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 xG(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=qc(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let s=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&&(s++,s>32))return o;if(n===41){if(s===0)break;s--}i++}return t===i||s!==0||(o.str=qc(e.slice(t,i)),o.pos=i,o.ok=!0),o}function SG(e,t,r,n){let i,o=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)s.str=n.str,s.marker=n.marker;else{if(o>=r)return s;let a=e.charCodeAt(o);if(a!==34&&a!==39&&a!==40)return s;t++,o++,a===40&&(a=41),s.marker=a}for(;o<r;){if(i=e.charCodeAt(o),i===s.marker)return s.pos=o+1,s.str+=qc(e.slice(t,o)),s.ok=!0,s;if(i===40&&s.marker===41)return s;i===92&&o+1<r&&o++,o++}return s.can_continue=!0,s.str+=qc(e.slice(t,o)),s}const EG=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:xG,parseLinkLabel:yG,parseLinkTitle:SG},Symbol.toStringTag,{value:"Module"})),ks={};ks.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+sl(o.content)+"</code>"};ks.code_block=function(e,t,r,n,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+sl(e[t].content)+`</code></pre>
|
|
4
|
+
`};ks.fence=function(e,t,r,n,i){const o=e[t],s=o.info?qc(o.info).trim():"";let a="",l="";if(s){const d=s.split(/(\s+)/g);a=d[0],l=d.slice(2).join("")}let u;if(r.highlight?u=r.highlight(o.content,a,l)||sl(o.content):u=sl(o.content),u.indexOf("<pre")===0)return u+`
|
|
5
|
+
`;if(s){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+a]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+a);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${u}</code></pre>
|
|
6
|
+
`}return`<pre><code${i.renderAttrs(o)}>${u}</code></pre>
|
|
7
|
+
`};ks.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)};ks.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
+
`:`<br>
|
|
9
|
+
`};ks.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
+
`:`<br>
|
|
11
|
+
`:`
|
|
12
|
+
`};ks.text=function(e,t){return sl(e[t].content)};ks.html_block=function(e,t){return e[t].content};ks.html_inline=function(e,t){return e[t].content};function dd(){this.rules=Am({},ks)}dd.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+sl(t.attrs[r][0])+'="'+sl(t.attrs[r][1])+'"';return i};dd.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 s=!1;if(i.block&&(s=!0,i.nesting===1&&r+1<t.length)){const a=t[r+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(s=!1)}return o+=s?`>
|
|
14
|
+
`:">",o};dd.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const a=e[o].type;typeof i[a]<"u"?n+=i[a](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};dd.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};dd.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const a=e[o].type;a==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[a]<"u"?n+=i[a](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function di(){this.__rules__=[],this.__cache__=null}di.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};di.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))})})};di.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};di.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};di.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};di.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};di.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};di.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};di.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};di.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Vo(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}Vo.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};Vo.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Vo.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};Vo.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};Vo.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 II(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}II.prototype.Token=Vo;const wG=/\r\n?|\n/g,kG=/\0/g;function CG(e){let t;t=e.src.replace(wG,`
|
|
16
|
+
`),t=t.replace(kG,"�"),e.src=t}function RG(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 AG(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 TG(e){return/^<a[>\s]/i.test(e)}function $G(e){return/^<\/a\s*>/i.test(e)}function NG(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 s=i.length-1;s>=0;s--){const a=i[s];if(a.type==="link_close"){for(s--;i[s].level!==a.level&&i[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(TG(a.content)&&o>0&&o--,$G(a.content)&&o++),!(o>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const l=a.content;let u=e.md.linkify.match(l);const d=[];let f=a.level,h=0;u.length>0&&u[0].index===0&&s>0&&i[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const g=u[p].url,m=e.md.normalizeLink(g);if(!e.md.validateLink(m))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 y=new e.Token("link_open","a",1);y.attrs=[["href",m]],y.level=f++,y.markup="linkify",y.info="auto",d.push(y);const E=new e.Token("text","",0);E.content=v,E.level=f,d.push(E);const S=new e.Token("link_close","a",-1);S.level=--f,S.markup="linkify",S.info="auto",d.push(S),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=NI(i,s,d)}}}}const PI=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,DG=/\((c|tm|r)\)/i,FG=/\((c|tm|r)\)/ig,IG={c:"©",r:"®",tm:"™"};function PG(e,t){return IG[t.toLowerCase()]}function OG(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(FG,PG)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function MG(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&PI.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 LG(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(DG.test(e.tokens[t].content)&&OG(e.tokens[t].children),PI.test(e.tokens[t].content)&&MG(e.tokens[t].children))}const zG=/['"]/,Yk=/['"]/g,Xk="’";function Cp(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function UG(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 BG(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const s=e[o],a=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=a);r--);if(n.length=r+1,s.type!=="text")continue;const l=s.content;let u=0;const d=l.length;e:for(;u<d;){Yk.lastIndex=u;const f=Yk.exec(l);if(!f)break;let h=!0,p=!0;u=f.index+1;const g=f[0]==="'";let m=32;if(f.index-1>=0)m=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){m=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 _=Qf(m)||Jf(m),y=Qf(v)||Jf(v),E=Gf(m),S=Gf(v);if(S?h=!1:y&&(E||_||(h=!1)),E?p=!1:_&&(S||y||(p=!1)),v===34&&f[0]==='"'&&m>=48&&m<=57&&(p=h=!1),h&&p&&(h=_,p=y),!h&&!p){g&&Cp(i,o,f.index,Xk);continue}if(p)for(r=n.length-1;r>=0;r--){let k=n[r];if(n[r].level<a)break;if(k.single===g&&n[r].level===a){k=n[r];let C,$;g?(C=t.md.options.quotes[2],$=t.md.options.quotes[3]):(C=t.md.options.quotes[0],$=t.md.options.quotes[1]),Cp(i,o,f.index,$),Cp(i,k.token,k.pos,C),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:g,level:a}):p&&g&&Cp(i,o,f.index,Xk)}}Object.keys(i).forEach(function(o){e[o].content=UG(e[o].content,i[o])})}function jG(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!zG.test(e.tokens[t].content)||BG(e.tokens[t].children,e)}function qG(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 s=n[o].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=r=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==r&&(s[r]=s[t]),r++);t!==r&&(s.length=r)}}const i_=[["normalize",CG],["block",RG],["inline",AG],["linkify",NG],["replacements",LG],["smartquotes",jG],["text_join",qG]];function rS(){this.ruler=new di;for(let e=0;e<i_.length;e++)this.ruler.push(i_[e][0],i_[e][1])}rS.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};rS.prototype.State=II;function Cs(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,s=0,a=0,l=0,u=i.length,d=!1;s<u;s++){const f=i.charCodeAt(s);if(!d)if(nr(f)){a++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||s===u-1)&&(f!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,o=s+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}Cs.prototype.push=function(e,t,r){const n=new Vo(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};Cs.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Cs.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Cs.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!nr(n))break}return t};Cs.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!nr(this.src.charCodeAt(--t)))return t+1;return t};Cs.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};Cs.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};Cs.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let s=0,a=t;a<r;a++,s++){let l=0;const u=this.bMarks[a];let d=u,f;for(a+1<r||i?f=this.eMarks[a]+1:f=this.eMarks[a];d<f&&l<n;){const h=this.src.charCodeAt(d);if(nr(h))h===9?l+=4-(l+this.bsCount[a])%4:l++;else if(d-u<this.tShift[a])l++;else break;d++}l>n?o[s]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[s]=this.src.slice(d,f)}return o.join("")};Cs.prototype.Token=Vo;const VG=65536;function o_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function Zk(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,s=0,a="";for(;n<r;)i===124&&(o?(a+=e.substring(s,n-1),s=n):(t.push(a+e.substring(s,n)),a="",s=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(a+e.substring(s)),t}function KG(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 s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!nr(a)||s===45&&nr(a))return!1;for(;o<e.eMarks[i];){const S=e.src.charCodeAt(o);if(S!==124&&S!==45&&S!==58&&!nr(S))return!1;o++}let l=o_(e,t+1),u=l.split("|");const d=[];for(let S=0;S<u.length;S++){const k=u[S].trim();if(!k){if(S===0||S===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=Zk(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"),g=e.push("table_open","table",1),m=[t,0];g.map=m;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 S=0;S<u.length;S++){const k=e.push("th_open","th",1);d[S]&&(k.attrs=[["style","text-align:"+d[S]]]);const C=e.push("inline","",0);C.content=u[S].trim(),C.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,E=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let S=!1;for(let C=0,$=p.length;C<$;C++)if(p[C](e,i,r,!0)){S=!0;break}if(S||(l=o_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(u=Zk(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),E+=f-u.length,E>VG))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=y=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[i,i+1];for(let C=0;C<f;C++){const $=e.push("td_open","td",1);d[C]&&($.attrs=[["style","text-align:"+d[C]]]);const A=e.push("inline","",0);A.content=u[C]?u[C].trim():"",A.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=i),e.push("table_close","table",-1),m[1]=i,e.parentType=h,e.line=i,!0}function HG(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 WG(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 s=e.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let a=i;i=e.skipChars(i,s);let l=i-a;if(l<3)return!1;const u=e.src.slice(a,i),d=e.src.slice(i,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=a=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,s),!(i-a<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 GG(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const a=[],l=[],u=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,g;for(g=t;g<r;g++){const E=e.sCount[g]<e.blkIndent;if(i=e.bMarks[g]+e.tShift[g],o=e.eMarks[g],i>=o)break;if(e.src.charCodeAt(i++)===62&&!E){let k=e.sCount[g]+1,C,$;e.src.charCodeAt(i)===32?(i++,k++,$=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[g]+k)%4===3?(i++,k++,$=!1):$=!0):C=!1;let A=k;for(a.push(e.bMarks[g]),e.bMarks[g]=i;i<o;){const N=e.src.charCodeAt(i);if(nr(N))N===9?A+=4-(A+e.bsCount[g]+($?1:0))%4:A++;else break;i++}p=i>=o,l.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(C?1:0),u.push(e.sCount[g]),e.sCount[g]=A-k,d.push(e.tShift[g]),e.tShift[g]=i-e.bMarks[g];continue}if(p)break;let S=!1;for(let k=0,C=f.length;k<C;k++)if(f[k](e,g,r,!0)){S=!0;break}if(S){e.lineMax=g,e.blkIndent!==0&&(a.push(e.bMarks[g]),l.push(e.bsCount[g]),d.push(e.tShift[g]),u.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}a.push(e.bMarks[g]),l.push(e.bsCount[g]),d.push(e.tShift[g]),u.push(e.sCount[g]),e.sCount[g]=-1}const m=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,g);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=s,e.parentType=h,_[1]=e.line;for(let E=0;E<d.length;E++)e.bMarks[E+t]=a[E],e.tShift[E+t]=d[E],e.sCount[E+t]=u[E],e.bsCount[E+t]=l[E];return e.blkIndent=m,!0}function JG(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 s=e.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<i;){const u=e.src.charCodeAt(o++);if(u!==s&&!nr(u))return!1;u===s&&a++}if(a<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(a+1).join(String.fromCharCode(s)),!0}function eC(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(!nr(o))return-1}return n}function tC(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),!nr(o))?-1:i}function QG(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 YG(e,t,r,n){let i,o,s,a,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=tC(e,l))>=0){if(f=!0,s=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(s,p-1)),d&&h!==1)return!1}else if((p=eC(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const g=e.src.charCodeAt(p-1),m=e.tokens.length;f?(a=e.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);const v=[l,0];a.map=v,a.markup=String.fromCharCode(g);let _=!1;const y=e.md.block.ruler.getRules("list"),E=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const S=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let k=S;for(;o<i;){const V=e.src.charCodeAt(o);if(V===9)k+=4-(k+e.bsCount[l])%4;else if(V===32)k++;else break;o++}const C=o;let $;C>=i?$=1:$=k-S,$>4&&($=1);const A=S+$;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const N=[l,0];a.map=N,f&&(a.info=e.src.slice(s,p-1));const O=e.tight,P=e.tShift[l],I=e.sCount[l],U=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=A,e.tight=!0,e.tShift[l]=C-e.bMarks[l],e.sCount[l]=k,C>=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]=P,e.sCount[l]=I,e.tight=O,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),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 V=0,W=y.length;V<W;V++)if(y[V](e,l,r,!0)){B=!0;break}if(B)break;if(f){if(p=tC(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=eC(e,l),p<0)break;if(g!==e.src.charCodeAt(p-1))break}return f?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),v[1]=l,e.line=l,e.parentType=E,u&&QG(e,m),!0}function XG(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function a(y){const E=e.lineMax;if(y>=E||e.isEmpty(y))return null;let S=!1;if(e.sCount[y]-e.blkIndent>3&&(S=!0),e.sCount[y]<0&&(S=!0),!S){const $=e.md.block.ruler.getRules("reference"),A=e.parentType;e.parentType="reference";let N=!1;for(let O=0,P=$.length;O<P;O++)if($[O](e,y,E,!0)){N=!0;break}if(e.parentType=A,N)return null}const k=e.bMarks[y]+e.tShift[y],C=e.eMarks[y];return e.src.slice(k,C+1)}let l=e.src.slice(i,o+1);o=l.length;let u=-1;for(i=1;i<o;i++){const y=l.charCodeAt(i);if(y===91)return!1;if(y===93){u=i;break}else if(y===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(y===92&&(i++,i<o&&l.charCodeAt(i)===10)){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(i=u+2;i<o;i++){const y=l.charCodeAt(i);if(y===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(!nr(y))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=s,g=i;for(;i<o;i++){const y=l.charCodeAt(i);if(y===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(!nr(y))break}let m=e.md.helpers.parseLinkTitle(l,i,o);for(;m.can_continue;){const y=a(s);if(y===null)break;l+=y,i=o,o=l.length,s++,m=e.md.helpers.parseLinkTitle(l,i,o,m)}let v;for(i<o&&g!==i&&m.ok?(v=m.str,i=m.pos):(v="",i=h,s=p);i<o;){const y=l.charCodeAt(i);if(!nr(y))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,s=p;i<o;){const y=l.charCodeAt(i);if(!nr(y))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const _=Tm(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=s),!0):!1}const ZG=["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"],eJ="[a-zA-Z_:][a-zA-Z0-9:._-]*",tJ="[^\"'=<>`\\x00-\\x20]+",rJ="'[^']*'",nJ='"[^"]*"',iJ="(?:"+tJ+"|"+rJ+"|"+nJ+")",oJ="(?:\\s+"+eJ+"(?:\\s*=\\s*"+iJ+")?)",OI="<[A-Za-z][A-Za-z0-9\\-]*"+oJ+"*\\s*\\/?>",MI="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",sJ="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",aJ="<[?][\\s\\S]*?[?]>",lJ="<![A-Za-z][^>]*>",uJ="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",cJ=new RegExp("^(?:"+OI+"|"+MI+"|"+sJ+"|"+aJ+"|"+lJ+"|"+uJ+")"),dJ=new RegExp("^(?:"+OI+"|"+MI+")"),Tl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+ZG.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(dJ.source+"\\s*$"),/^$/,!1]];function fJ(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 s=e.src.slice(i,o),a=0;for(;a<Tl.length&&!Tl[a][0].test(s);a++);if(a===Tl.length)return!1;if(n)return Tl[a][2];let l=t+1;const u=Tl[a][1].test("");if(!Tl[a][1].test(s)){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],s=e.src.slice(i,o),Tl[a][1].test(s)){s.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 hJ(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 s=e.src.charCodeAt(i);if(s!==35||i>=o)return!1;let a=1;for(s=e.src.charCodeAt(++i);s===35&&i<o&&a<=6;)a++,s=e.src.charCodeAt(++i);if(a>6||i<o&&!nr(s))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&nr(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const u=e.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[t,e.line];const d=e.push("inline","",0);d.content=$m(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function pJ(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,s,a=t+1;for(;a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const g=e.eMarks[a];if(p<g&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(e.sCount[a]<0)continue;let h=!1;for(let p=0,g=n.length;p<g;p++)if(n[p](e,a,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=$m(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),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(s),e.parentType=i,!0}function gJ(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 s=$m(e.getLines(t,o,e.blkIndent,!1));e.line=o;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const Rp=[["table",KG,["paragraph","reference"]],["code",HG],["fence",WG,["paragraph","reference","blockquote","list"]],["blockquote",GG,["paragraph","reference","blockquote","list"]],["hr",JG,["paragraph","reference","blockquote","list"]],["list",YG,["paragraph","reference","blockquote"]],["reference",XG],["html_block",fJ,["paragraph","reference","blockquote"]],["heading",hJ,["paragraph","reference","blockquote"]],["lheading",pJ],["paragraph",gJ]];function Nm(){this.ruler=new di;for(let e=0;e<Rp.length;e++)this.ruler.push(Rp[e][0],Rp[e][1],{alt:(Rp[e][2]||[]).slice()})}Nm.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let s=t,a=!1;for(;s<r&&(e.line=s=e.skipEmptyLines(s),!(s>=r||e.sCount[s]<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,s,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=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<r&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};Nm.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)};Nm.prototype.State=Cs;function Lh(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}Lh.prototype.pushPending=function(){const e=new Vo("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Lh.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new Vo(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};Lh.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 s=o-e;let a=o<r?this.src.charCodeAt(o):32;if((a&64512)===55296){const v=this.src.charCodeAt(o+1);a=(v&64512)===56320?65536+(a-55296<<10)+(v-56320):65533}else(a&64512)===56320&&(a=65533);const l=Qf(i)||Jf(i),u=Qf(a)||Jf(a),d=Gf(i),f=Gf(a),h=!f&&(!u||d||l),p=!d&&(!l||f||u);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||u),length:s}};Lh.prototype.Token=Vo;function mJ(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 vJ(e,t){let r=e.pos;for(;r<e.posMax&&!mJ(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const _J=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function bJ(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(_J);if(!i)return!1;const o=i[1],s=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;let l=a.length;for(;l>0&&a.charCodeAt(l-1)===42;)l--;l!==a.length&&(a=a.slice(0,l));const u=e.md.normalizeLink(a);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(a);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=a.length-o.length,!0}function yJ(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&&nr(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const nS=[];for(let e=0;e<256;e++)nS.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){nS[e.charCodeAt(0)]=1});function xJ(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),!!nr(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const a=e.src.charCodeAt(r+1);a>=56320&&a<=57343&&(o+=e.src[r+1],r++)}const s="\\"+o;if(!t){const a=e.push("text_special","",0);i<256&&nS[i]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return e.pos=r+1,!0}function SJ(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 s=e.src.slice(i,r),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=i)return t||(e.pending+=s),e.pos+=a,!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===a){if(!t){const f=e.push("code_inline","code",0);f.markup=s,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+=s),e.pos+=a,!0}function EJ(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 s=String.fromCharCode(n);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=e.push("text","",0),a.content=s+s,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 rC(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const s=t[o];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];r=e.tokens[s.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[a.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&n.push(a.token-1)}for(;n.length;){const o=n.pop();let s=o+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,o!==s&&(r=e.tokens[s],e.tokens[s]=e.tokens[o],e.tokens[o]=r)}}function wJ(e){const t=e.tokens_meta,r=e.tokens_meta.length;rC(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&rC(e,t[n].delimiters)}const LI={tokenize:EJ,postProcess:wJ};function kJ(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 s=e.push("text","",0);s.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 nC(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],s=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,a=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=e.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function CJ(e){const t=e.tokens_meta,r=e.tokens_meta.length;nC(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&nC(e,t[n].delimiters)}const zI={tokenize:kJ,postProcess:CJ};function RJ(e,t){let r,n,i,o,s="",a="",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 g=p+1;if(g<f&&e.src.charCodeAt(g)===40){for(u=!1,g++;g<f&&(r=e.src.charCodeAt(g),!(!nr(r)&&r!==10));g++);if(g>=f)return!1;if(l=g,i=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?g=i.pos:s="",l=g;g<f&&(r=e.src.charCodeAt(g),!(!nr(r)&&r!==10));g++);if(i=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<f&&l!==g&&i.ok)for(a=i.str,g=i.pos;g<f&&(r=e.src.charCodeAt(g),!(!nr(r)&&r!==10));g++);}(g>=f||e.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof e.env.references>"u")return!1;if(g<f&&e.src.charCodeAt(g)===91?(l=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?n=e.src.slice(l,g++):g=p+1):g=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[Tm(n)],!o)return e.pos=d,!1;s=o.href,a=o.title}if(!t){e.pos=h,e.posMax=p;const m=e.push("link_open","a",1),v=[["href",s]];m.attrs=v,a&&v.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=f,!0}function AJ(e,t){let r,n,i,o,s,a,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,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!nr(r)&&r!==10));o++);if(o>=h)return!1;for(u=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(d=e.md.normalizeLink(a.str),e.md.validateLink(d)?o=a.pos:d=""),u=o;o<h&&(r=e.src.charCodeAt(o),!(!nr(r)&&r!==10));o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<h&&(r=e.src.charCodeAt(o),!(!nr(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=g+1):o=g+1,i||(i=e.src.slice(p,g)),s=e.env.references[Tm(i)],!s)return e.pos=f,!1;d=s.href,l=s.title}if(!t){n=e.src.slice(p,g);const m=[];e.md.inline.parse(n,e.md,e.env,m);const v=e.push("image","img",0),_=[["src",d],["alt",""]];v.attrs=_,v.children=m,v.content=n,l&&_.push(["title",l])}return e.pos=o,e.posMax=h,!0}const TJ=/^([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])?)*)$/,$J=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function NJ(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 s=e.src.charCodeAt(r);if(s===60)return!1;if(s===62)break}const o=e.src.slice(n+1,r);if($J.test(o)){const s=e.md.normalizeLink(o);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.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(TJ.test(o)){const s=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.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 DJ(e){return/^<a[>\s]/i.test(e)}function FJ(e){return/^<\/a\s*>/i.test(e)}function IJ(e){const t=e|32;return t>=97&&t<=122}function PJ(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&&!IJ(i))return!1;const o=e.src.slice(n).match(cJ);if(!o)return!1;if(!t){const s=e.push("html_inline","",0);s.content=o[0],DJ(s.content)&&e.linkLevel++,FJ(s.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const OJ=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,MJ=/^&([a-z][a-z0-9]{1,31});/i;function LJ(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(OJ);if(o){if(!t){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=e.push("text_special","",0);a.content=tS(s)?Wf(s):Wf(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(MJ);if(o){const s=nG(o[0]);if(s!==o[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function iC(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let s=0;s<r;s++){const a=e[s];if(o.push(0),(e[n].marker!==a.marker||i!==a.token-1)&&(n=s),i=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[a.marker][(a.open?3:0)+a.length%3];let u=n-o[n]-1,d=u;for(;u>l;u-=o[u]+1){const f=e[u];if(f.marker===a.marker&&f.open&&f.end<0){let h=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(h=!0),!h){const p=u>0&&!e[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,f.end=s,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function zJ(e){const t=e.tokens_meta,r=e.tokens_meta.length;iC(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&iC(t[n].delimiters)}function UJ(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 s_=[["text",vJ],["linkify",bJ],["newline",yJ],["escape",xJ],["backticks",SJ],["strikethrough",LI.tokenize],["emphasis",zI.tokenize],["link",RJ],["image",AJ],["autolink",NJ],["html_inline",PJ],["entity",LJ]],a_=[["balance_pairs",zJ],["strikethrough",LI.postProcess],["emphasis",zI.postProcess],["fragments_join",UJ]];function zh(){this.ruler=new di;for(let e=0;e<s_.length;e++)this.ruler.push(s_[e][0],s_[e][1]);this.ruler2=new di;for(let e=0;e<a_.length;e++)this.ruler2.push(a_[e][0],a_[e][1])}zh.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 s=!1;if(e.level<i){for(let a=0;a<n;a++)if(e.level++,s=r[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos};zh.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 s=!1;if(e.level<i){for(let a=0;a<r;a++)if(s=t[a](e,!1),s){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};zh.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](i)};zh.prototype.State=Lh;function BJ(e){const t={};e=e||{},t.src_Any=kI.source,t.src_Cc=CI.source,t.src_Z=AI.source,t.src_P=Zx.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 My(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function Dm(e){return Object.prototype.toString.call(e)}function jJ(e){return Dm(e)==="[object String]"}function qJ(e){return Dm(e)==="[object Object]"}function VJ(e){return Dm(e)==="[object RegExp]"}function oC(e){return Dm(e)==="[object Function]"}function KJ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const UI={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function HJ(e){return Object.keys(e||{}).reduce(function(t,r){return t||UI.hasOwnProperty(r)},!1)}const WJ={"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}}},GJ="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]",JJ="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function QJ(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function sC(){return function(e,t){t.normalize(e)}}function lg(e){const t=e.re=BJ(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(GJ),r.push(t.src_xn),t.src_tlds=r.join("|");function n(a){return a.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(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){const l=e.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(e.__compiled__[a]=u,qJ(l)){VJ(l.validate)?u.validate=QJ(l.validate):oC(l.validate)?u.validate=l.validate:o(a,l),oC(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=sC();return}if(jJ(l)){i.push(a);return}o(a,l)}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:sC()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(KJ).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","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 BI(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 Mi(e,t){if(!(this instanceof Mi))return new Mi(e,t);t||HJ(e)&&(t=e,e={}),this.__opts__=My({},UI,t),this.__schemas__=My({},WJ,e),this.__compiled__={},this.__tlds__=JJ,this.__tlds_replaced__=!1,this.re={},lg(this)}Mi.prototype.add=function(t,r){return this.__schemas__[t]=r,lg(this),this};Mi.prototype.set=function(t){return this.__opts__=My(this.__opts__,t),this};Mi.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)};Mi.prototype.pretest=function(t){return this.re.pretest.test(t)};Mi.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};Mi.prototype.match=function(t){const r=[],n=[],i=[],o=[];let s,a,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;(s=l.exec(t))!==null;)a=this.testSchemaAt(t,s[2],l.lastIndex),a&&n.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});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;(s=l.exec(t))!==null;)i.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(t))!==null;)o.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[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 g=new BI(t,p.schema,p.index,p.lastIndex);this.__compiled__[g.schema].normalize(g,this),r.push(g),f=p.lastIndex}return r.length?r:null};Mi.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 BI(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};Mi.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(),lg(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,lg(this),this)};Mi.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Mi.prototype.onCompile=function(){};const xc=2147483647,us=36,iS=1,Yf=26,YJ=38,XJ=700,jI=72,qI=128,VI="-",ZJ=/^xn--/,eQ=/[^\0-\x7F]/,tQ=/[\x2E\u3002\uFF0E\uFF61]/g,rQ={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l_=us-iS,cs=Math.floor,u_=String.fromCharCode;function Fa(e){throw new RangeError(rQ[e])}function nQ(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function KI(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(tQ,".");const i=e.split("."),o=nQ(i,t).join(".");return n+o}function HI(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 iQ=e=>String.fromCodePoint(...e),oQ=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:us},aC=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},WI=function(e,t,r){let n=0;for(e=r?cs(e/XJ):e>>1,e+=cs(e/t);e>l_*Yf>>1;n+=us)e=cs(e/l_);return cs(n+(l_+1)*e/(e+YJ))},GI=function(e){const t=[],r=e.length;let n=0,i=qI,o=jI,s=e.lastIndexOf(VI);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Fa("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<r;){const l=n;for(let d=1,f=us;;f+=us){a>=r&&Fa("invalid-input");const h=oQ(e.charCodeAt(a++));h>=us&&Fa("invalid-input"),h>cs((xc-n)/d)&&Fa("overflow"),n+=h*d;const p=f<=o?iS:f>=o+Yf?Yf:f-o;if(h<p)break;const g=us-p;d>cs(xc/g)&&Fa("overflow"),d*=g}const u=t.length+1;o=WI(n-l,u,l==0),cs(n/u)>xc-i&&Fa("overflow"),i+=cs(n/u),n%=u,t.splice(n++,0,i)}return String.fromCodePoint(...t)},JI=function(e){const t=[];e=HI(e);const r=e.length;let n=qI,i=0,o=jI;for(const l of e)l<128&&t.push(u_(l));const s=t.length;let a=s;for(s&&t.push(VI);a<r;){let l=xc;for(const d of e)d>=n&&d<l&&(l=d);const u=a+1;l-n>cs((xc-i)/u)&&Fa("overflow"),i+=(l-n)*u,n=l;for(const d of e)if(d<n&&++i>xc&&Fa("overflow"),d===n){let f=i;for(let h=us;;h+=us){const p=h<=o?iS:h>=o+Yf?Yf:h-o;if(f<p)break;const g=f-p,m=us-p;t.push(u_(aC(p+g%m,0))),f=cs(g/m)}t.push(u_(aC(f,0))),o=WI(i,u,a===s),i=0,++a}++i,++n}return t.join("")},sQ=function(e){return KI(e,function(t){return ZJ.test(t)?GI(t.slice(4).toLowerCase()):t})},aQ=function(e){return KI(e,function(t){return eQ.test(t)?"xn--"+JI(t):t})},QI={version:"2.3.1",ucs2:{decode:HI,encode:iQ},decode:GI,encode:JI,toASCII:aQ,toUnicode:sQ},lQ={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},uQ={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"]}}},cQ={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"]}}},dQ={default:lQ,zero:uQ,commonmark:cQ},fQ=/^(vbscript|javascript|file|data):/,hQ=/^data:image\/(gif|png|jpeg|webp);/;function pQ(e){const t=e.trim().toLowerCase();return fQ.test(t)?hQ.test(t):!0}const YI=["http:","https:","mailto:"];function gQ(e){const t=Xx(e,!0);if(t.hostname&&(!t.protocol||YI.indexOf(t.protocol)>=0))try{t.hostname=QI.toASCII(t.hostname)}catch{}return Mh(Yx(t))}function mQ(e){const t=Xx(e,!0);if(t.hostname&&(!t.protocol||YI.indexOf(t.protocol)>=0))try{t.hostname=QI.toUnicode(t.hostname)}catch{}return jc(Yx(t),jc.defaultChars+"%")}function lo(e,t){if(!(this instanceof lo))return new lo(e,t);t||eS(e)||(t=e||{},e="default"),this.inline=new zh,this.block=new Nm,this.core=new rS,this.renderer=new dd,this.linkify=new Mi,this.validateLink=pQ,this.normalizeLink=gQ,this.normalizeLinkText=mQ,this.utils=bG,this.helpers=Am({},EG),this.options={},this.configure(e),t&&this.set(t)}lo.prototype.set=function(e){return Am(this.options,e),this};lo.prototype.configure=function(e){const t=this;if(eS(e)){const r=e;if(e=dQ[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};lo.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};lo.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};lo.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};lo.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};lo.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};lo.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};lo.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Lr(e){return"var("+e+")"}let vQ=w([c("color",Lr(x.textPrimary)),c("font-size",Lr(T.sizeSm)),c("line-height",Lr(T.lineHeightRelaxed)),c("word-break","break-word"),br("& > :first-child",[c("margin-top","0")]),br("& > :last-child",[c("margin-bottom","0")]),br("& h1, & h2, & h3, & h4, & h5, & h6",[c("margin","var("+F.md+") 0 var("+F.sm+")"),c("line-height",Lr(T.lineHeightTight)),c("font-weight",Lr(T.weightBold))]),br("& h1",[c("font-size",Lr(T.sizeXl))]),br("& h2",[c("font-size",Lr(T.sizeLg))]),br("& h3, & h4, & h5, & h6",[c("font-size",Lr(T.sizeMd))]),br("& p",[c("margin","var("+F.sm+") 0")]),br("& a",[c("color",Lr(x.brand)),c("text-decoration","none")]),br("& a:hover",[c("text-decoration","underline")]),br("& ul, & ol",[c("margin","var("+F.sm+") 0"),c("padding-left","1.5em")]),br("& li",[c("margin","var("+F.xs+") 0")]),br("& code",[c("font-family",Lr(T.fontFamilyMono)),c("font-size","0.9em"),c("background",Lr(x.surfaceSubtle)),c("padding","1px 4px"),c("border-radius",Lr(Z.sm))]),br("& pre",[c("background",Lr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Lr(Z.md)),c("padding",Lr(F.md)),c("overflow","auto"),c("margin","var("+F.sm+") 0")]),br("& pre code",[c("background","none"),c("padding","0")]),br("& blockquote",[c("margin","var("+F.sm+") 0"),c("padding-left",Lr(F.md)),c("border-left","3px solid var("+x.border+")"),c("color",Lr(x.textSecondary))]),br("& table",[c("border-collapse","collapse"),c("margin","var("+F.sm+") 0")]),br("& th, & td",[c("border","1px solid var("+x.borderSubtle+")"),c("padding","var("+F.xs+") var("+F.sm+")"),c("text-align","left")]),br("& th",[c("background",Lr(x.surfaceSubtle)),c("font-weight",Lr(T.weightMedium))]),br("& img",[c("max-width","100%"),c("border-radius",Lr(Z.sm))]),br("& hr",[c("border","none"),c("border-top","1px solid var("+x.borderSubtle+")"),c("margin","var("+F.md+") 0")])]),_Q=new lo({html:!1,linkify:!0});function bQ(e){let t=e.source,r=Mt(()=>_Q.render(t),[t]),n=Qe(null);return Te(()=>{ae(vs(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),b("div",{ref:Wt(n),className:vQ,dangerouslySetInnerHTML:{__html:r}})}let XI=bQ;function yQ(e,t){return b(XI,{source:e.body})}function xQ(){bI({id:"markdown",label:"Markdown",constraints:{},preview:yQ})}function Sc(e){return Array.from(e).length}function oS(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 ZI(e,t){return R(t,r=>{let i=oS(e,r)[1];if(i!=="")return i})}function dr(e){return"var("+e+")"}let SQ=w([z("flex"),me("column"),c("gap","4px")]),lC=w([c("background",dr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",dr(Z.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-family","inherit"),c("font-size",dr(T.sizeMd)),c("line-height",dr(T.lineHeightNormal)),c("color",dr(x.textPrimary)),c("outline","none"),c("resize","vertical"),jo({NAME:"percent",VAL:100}),c("box-sizing","border-box"),c("transition","border-color 120ms"),fa([c("border-color",dr(x.brand))])]),EQ=w([c("border-color",dr(x.error)),fa([c("border-color",dr(x.error))])]),wQ=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",dr(F.sm)),c("font-size",dr(T.sizeXs)),c("color",dr(x.textSecondary))]),kQ=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("color",dr(x.textSecondary))]),uC=w([c("font-variant-numeric","tabular-nums")]),CQ=w([c("color",dr(x.error)),c("font-weight",dr(T.weightMedium))]),RQ=w([c("background",dr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-left","3px solid var("+x.error+")"),c("border-radius",dr(Z.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",dr(T.sizeXs)),c("line-height",dr(T.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word"),c("max-height","8em"),c("overflow","auto")]),AQ=w([c("color",dr(x.textSecondary)),c("font-size",dr(T.sizeXs)),Em(Re(2))]),TQ=w([c("color",dr(x.textPrimary))]),$Q=w([c("color",dr(x.error)),c("font-weight",dr(T.weightMedium))]),NQ=w([c("color",dr(x.textDisabled)),c("text-decoration","line-through")]);function eP(e){return e.toString()+" character"+(e===1?"":"s")}function tP(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 DQ(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,s=e.onBlur,a=e.onChange,l=e.value,u=s!==void 0?s:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=ZI(l,o),g=Le(p),m=f||g?lC+" "+EQ:lC,v;if(p!==void 0&&o!==void 0){let _=oS(l,o);v=L("div",{children:[b("div",{children:"Sent as:",className:AQ}),L("div",{children:[b("span",{children:_[0],className:TQ}),b("span",{children:"✂",className:$Q}),b("span",{children:p,className:NQ})],className:RQ})]})}else v=null;return L("div",{children:[b("textarea",{className:m,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:_=>u(),onChange:_=>a(_.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?Le(i)?" · "+t:t:null],className:kQ}),b("span",{children:tP(h,o),className:g?uC+" "+CQ:uC})],className:wQ}),v],className:SQ})}let FQ=DQ;NW();xQ();function Lt(e){return"var("+e+")"}let IQ=w([z("flex"),me("column"),c("gap",Lt(F.sm)),c("background",Lt(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Lt(Z.md)),c("padding",Lt(F.md))]),PQ=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",Lt(F.sm))]),OQ=w([c("font-size",Lt(T.sizeSm)),c("font-weight",Lt(T.weightMedium)),c("color",Lt(x.textPrimary))]),MQ=w([c("font-size",Lt(T.sizeXs)),c("color",Lt(x.textSecondary))]),Ap=w([c("font-size",Lt(T.sizeXs)),c("color",Lt(x.textSecondary)),c("font-variant-numeric","tabular-nums"),c("white-space","nowrap")]),cC=w([c("color",Lt(x.error)),c("font-weight",Lt(T.weightMedium))]),LQ=w([z("flex"),ee("baseline"),Ye("spaceBetween"),c("gap",Lt(F.sm)),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("padding-bottom",Lt(F.xs))]),zQ=w([c("font-size",Lt(T.sizeMd)),c("font-weight",Lt(T.weightMedium)),c("color",Lt(x.textPrimary)),c("word-break","break-word")]),UQ=w([c("color",Lt(x.textDisabled)),c("text-decoration","line-through")]),BQ=w([c("color",Lt(x.error)),c("font-weight",Lt(T.weightMedium))]),jQ=w([c("margin","0"),c("font-family","inherit"),c("font-size",Lt(T.sizeSm)),c("line-height",Lt(T.lineHeightRelaxed)),c("color",Lt(x.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]),qQ=w([c("max-width","100%"),c("border-radius",Lt(Z.sm)),c("border","1px solid var("+x.borderSubtle+")"),c("object-fit","cover")]),VQ=w([c("font-size",Lt(T.sizeXs)),c("color",Lt(x.error)),c("background",Lt(x.surfaceSubtle)),c("border-left","3px solid var("+x.error+")"),c("border-radius",Lt(Z.sm)),c("padding","var("+F.xs+") var("+F.sm+")")]);function dC(e,t){let r=oS(e,t),n=r[1];return n===""?e:L(Br,{children:[r[0],b("span",{children:"✂",className:BQ}),b("span",{children:n,className:UQ})]})}function KQ(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=yI(n);Te(()=>{Pi(o)&&hW(n,"ChannelPreview")},[n]);let s=fe(o,n,_=>_.label),a=fe(o,xI,_=>_.constraints),l=Sc(r.body),u=ZI(r.body,a.maxLength),d=r.subject,f;if(d!==void 0){let _=a.subjectMaxLength,y=Sc(d),E=fe(_,!1,S=>y>S);f=L("div",{children:[b("span",{children:_!==void 0?dC(d,_):d,className:zQ}),_!==void 0?b("span",{children:y.toString()+" / "+_.toString(),className:E?Ap+" "+cC:Ap}):null],className:LQ})}else f=null;let h=R(o,_=>_.preview),p;if(h!==void 0)p=h(r,a);else{let _=a.maxLength;p=b("pre",{children:_!==void 0?dC(r.body,_):r.body,className:jQ})}let g=r.imageUrl,m;if(g!==void 0){let _=a.mediaAspect;m=b("img",{className:qQ,style:_!==void 0?EW({},"aspectRatio",_):{},alt:"Message media",src:Uc(g)})}else m=null;let v=a.note;return L("div",{children:[i?L("div",{children:[b("span",{children:s,className:OQ}),b("span",{children:tP(l,a.maxLength),className:Le(u)?Ap+" "+cC:Ap})],className:PQ}):null,f,p,u!==void 0?b("div",{children:eP(Sc(u))+" past the limit — "+s+" will cut the tail.",className:VQ}):null,m,v!==void 0?b("span",{children:v,className:MQ}):null],className:IQ})}let HQ=KQ;function te(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 rP(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 Ko=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,WQ=Ko&&"documentMode"in document?document.documentMode:null,ko=Ko&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),al=Ko&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Vc=!(!Ko||!("InputEvent"in window)||WQ)&&"getTargetRanges"in new window.InputEvent("input"),ll=Ko&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,nP=Ko&&/Android/.test(navigator.userAgent),Uh=Ko&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!nP,iP=Ko&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ug=Ko&&nP&&iP,Bh=Ko&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&ko&&!iP,GQ=0,JQ=1,QQ=2,fC=1,hC=2,pC=4,gC=8,YQ=16,c_=32,d_=64,sS=128,XQ=1,ZQ=2,eY=3,tY=4,rY=5,nY=6,Xf=Uh||ll||Bh?" ":"",Kl=`
|
|
18
|
+
|
|
19
|
+
`,aS=al?" ":Xf,ia={bold:1,capitalize:1024,code:16,highlight:sS,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},iY={directionless:1,unmergeable:2},cg={center:2,end:6,justify:4,left:1,right:3,start:5},oY={[ZQ]:"center",[nY]:"end",[tY]:"justify",[XQ]:"left",[eY]:"right",[rY]:"start"},sY={normal:0,segmented:2,token:1},aY={[GQ]:"normal",[QQ]:"segmented",[JQ]:"token"},mC="$config";function vC(){return vr()._blockCursorElement}function lY(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let oP=class F0{element;before;after;constructor(t,r,n){this.element=t,this.before=r||null,this.after=n||null}withBefore(t){return new F0(this.element,t,this.after)}withAfter(t){return new F0(this.element,this.before,t)}withElement(t){return this.element===t?this:new F0(t,this.before,this.after)}insertChild(t){const r=this.getInsertionAnchor();return r!==null&&r.parentElement!==this.element&&te(357),this.element.insertBefore(t,r),this}removeChild(t){return t.parentElement!==this.element&&te(358),this.element.removeChild(t),this}replaceChild(t,r){return r.parentElement!==this.element&&te(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=_C(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 s=_C(t,r);if(s===null)return"after";const a=Array.prototype.indexOf.call(t.childNodes,s);return a>=0&&a<=o?"before":"after"}getInsertionAnchor(){return this.before}};function _C(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class Ec extends oP{withBefore(t){return new Ec(this.element,t,this.after)}withAfter(t){return new Ec(this.element,this.before,t)}withElement(t){return this.element===t?this:new Ec(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;for(;lY(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===vC()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(Bh||ll||Uh);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=Xt().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const s=Xt().createElement("img");s.setAttribute("data-lexical-managed-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",n.insertBefore(s,o),n.__lexicalLineBreak=s}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=vC(),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=bC(r,n);o.push(i);const s=bC(r,this.element);let a=t.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=o[l],d=s[l];if(u===void 0||u<d)break;if(u>d){a+=1;break}}return[t.getParentOrThrow(),a]}}function bC(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&&te(225),r.reverse()}let sP;try{sP="0.48.0+prod.esm"}catch{}const aP=sP??'"<unknown>+source"';let Vd=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 $l=null;function lP(e,t=1e3){return e instanceof Ly?e.clone():e.size<t?new Map(e):new Ly().init(new Map(e),void 0,e.size)}let Ly=class uP{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new uP().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===$l?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!==$l?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!==$l&&n!==void 0||(this._size++,n===$l&&i.delete(t)),i.set(t,r),this}delete(t){const r=this.has(t);return r&&(this.getNursery().set(t,$l),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!==$l&&(o!==void 0&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===$l||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 dg(e,t,r,n,i,o){if(q(e)){let s=e.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===t&&((q(s)||Ys(s)&&s.__slots!==null)&&dg(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a)),s=s.getNextSibling()}}for(const s of Ys(e)&&e.__slots!==null?e.__slots.values():[]){const a=n.get(s);a!==void 0&&hu(a)&&a.__slotHost===t&&((q(a)||Ys(a)&&a.__slots!==null)&&dg(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s))}}let zy=!1,lS=0;function uY(e){lS=e.timeStamp}function f_(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&bd(e,r)!==void 0}function cY(e,t,r){const n=Gn(vi(r)),i=n&&uo(n,r._rootElement);let o=null,s=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,s=i.focusOffset);const a=e.nodeValue;a!==null&&wS(t,a,o,s,!1)}function dY(e,t,r){if(re(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return mi(t)&&r.isAttached()}function fY(e,t,r){for(let n=e;n&&!qO(n);n=Cu(n)){const i=bd(n,t);if(i!==void 0){const o=Yt(i,r);if(o)return at(o)||!Xe(n)?void 0:[n,o]}}}function cP(e,t,r){zy=!0;const n=performance.now()-lS>100;try{no(e,()=>{const i=pe()||(function(f){return f.read("latest",()=>{const h=pe();return h!==null?h.clone():null})})(e),o=new Map,s=e._editorState,a=e._blockCursorElement;let l=!1,u="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,g=h.target,m=fY(g,e,s);if(!m)continue;const[v,_]=m;if(p==="characterData")n&&ie(_)&&mi(g)&&dY(i,g,_)&&cY(g,_,e);else if(p==="childList"){l=!0;const y=h.addedNodes;for(let k=0;k<y.length;k++){const C=y[k],$=TO(C),A=C.parentNode;if(!(A==null||C===a||$!==null||f_(C,A,e)||e._slotsUsed&&Xe(C)&&C.hasAttribute("data-lexical-slot")||qO(C))){if(al){const N=(Xe(C)?C.innerText:null)||C.nodeValue;N&&(u+=N)}A.removeChild(C)}}const E=h.removedNodes,S=E.length;if(S>0){let k=0;for(let C=0;C<S;C++){const $=E[C];(f_($,g,e)||a===$)&&(g.appendChild($),k++)}S!==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,g=h.target;for(let m=0;m<p.length;m++){const v=p[m],_=v.parentNode;_==null||v.nodeName!=="BR"||f_(v,g,e)||_.removeChild(v)}}r.takeRecords()}i!==null&&(l&&vn(i),al&&PO(e)&&i.insertRawText(u))})}finally{zy=!1}}function dP(e){const t=e._observer;t!==null&&cP(e,t.takeRecords(),t)}function fP(e){(function(t){lS===0&&vi(t).addEventListener("textInput",uY,!0)})(e),e._observer=new MutationObserver((t,r)=>{cP(e,t,r)})}const yC="latest";let hY=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||mY).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function jh(e,t){return new hY(e,t)}function qh(e,t,r=yC){const n=(r===yC?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function wc(e,t,r){let n;if(an(),typeof r=="function"){const o=e.getLatest(),s=qh(o,t);if(n=r(s),t.isEqual(s,n))return o}else n=r;const i=e.getWritable();return pP(i).updateFromKnown(t,n),i}function pY(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of TS(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 xC=new Set(["__proto__","constructor","prototype"]);let gY=class hP{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:s}=this.sharedNodeState,a=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})(s,n,i);this.size=a}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 SC(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 hP(t,r,(function(o,s,a){let l;if(a)for(const[u,d]of Object.entries(a)){if(xC.has(u))continue;const f=o.get(u);f?s.has(f)||s.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=SC(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(xC.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 pP(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new gY(t,gP(t));return t.__state=r,r}function gP(e){return e.__state?e.__state.sharedNodeState:CO(vr(),e.getType()).sharedNodeState}function SC(e){if(e)for(const t in e)return e}function mY(e){return e}function EC(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 wC(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,s]of Object.entries(n))if(!e.has(o)&&(e.add(o),s!==(i?i[o]:void 0)))return!0}return!1}function kC(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function CC(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,s=t.__format,a=t.__style,l=e.__state,u=t.__state;return(r===null||r===o)&&(n===null||n===s)&&(i===null||i===a)&&(e.__state===null||l===u||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&EC(h,d,f)||f&&EC(h,f,d)||d&&wC(h,d,f)||f&&wC(h,f,d))})(l,u))}function RC(e,t){const r=e.mergeWithSibling(t),n=$t()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function AC(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&ie(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(CC(t,n)){n=RC(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&ie(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(CC(n,r)){n=RC(n,r);break}break}r.remove()}}else n.remove()}function qa(e){return TC(e.anchor),TC(e.focus),e}function TC(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),ie(n)){e.set(n.__key,i?n.getTextContentSize():0,"text",!0);break}if(!q(n))break;e.set(n.__key,i?n.getChildrenSize():0,"element",!0)}}const Zf=Symbol.for("@lexical/CachedTextSize");function $C(e,t){return By.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=$o.get(n);if(o===void 0&&te(345,n),q(o)){const s=cr.get(n);if(s!==void 0&&q(s)&&s.__parent!==o.__parent)r+=o.getTextContentSize();else{const a=au.get(n),l=a&&a.__lexicalTextContent;typeof l!="string"&&te(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const s=o[Zf];s===void 0&&te(347,o.getType(),n),r+=s}n=o.__next}return r},{editor:xt})}function mP(e){q(e)||e[Zf]===void 0&&(e[Zf]=ie(e)?e.__text.length:e.getTextContentSize())}const vY=4;let eh,xt,th,lt="",kr=null,Fn=null,wn=null;function ds(){return{firstTextKey:wn,format:kr,style:Fn}}function Ji(e){e.firstTextKey!==null&&(kr=e.format,Fn=e.style,wn=e.firstTextKey)}function Uy(e){if(wn!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&te(348),t===null)return;const r=cr.get(t);ie(r)&&(kr=r.getFormat(),Fn=r.getStyle(),wn=t)}let Fm,Ef,wf,$o,By,cr,au,jy,rh,lu,Ws=!1,fg=!1;function Xa(e,t){const r=$o.get(e),n=cr.has(e);if(t!==null){const i=Wy(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(xt._keyToDOMMap.delete(e),q(r)){const i=Tg(r,$o);qy(i,0,i.length-1,null)}if(r!==void 0){for(const i of ki(r).values()){const o=Ky(i);Xa(i,null),o!==null&&o.remove()}kS(rh,th,Fm,r,"destroyed")}}}function qy(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&Xa(o,n)}}function Nl(e,t){e.setProperty("text-align",t)}const _Y="40px";function vP(e,t){const r=eh.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, ${_Y}))`)}function _P(e,t){const r=e.style;t===0?Nl(r,""):t===1?Nl(r,"left"):t===2?Nl(r,"center"):t===3?Nl(r,"right"):t===4?Nl(r,"justify"):t===5?Nl(r,"start"):t===6&&Nl(r,"end")}function Vy(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(xr(n))return null;const o=n.getParent();return o===null||rr(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function bP(e){const t=Xt().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function yP(e,t,r){t||e.contentEditable==="false"?PX(r,xt):r.removeAttribute("contenteditable")}function NC(e,t,r){const n=lt,i=ds();lt="";let o="";const s=at(e);for(const[a,l]of r){const u=bP(a);yP(t,s,u),t.appendChild(u),lt="";const d=ds();Za(l,co(e,u,xt)),Ji(d),xP(e,a,t,u),o+=lt}return Ji(i),lt=n,o}function ki(e){return Ys(e)&&e.__slots!==null?e.__slots:HO}function xP(e,t,r,n){const i=lu.$getSlotTargetElement(e,t,r,xt);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function Ky(e){const t=au.get(e);return t!==void 0?t.parentElement:null}function DC(e,t,r){const n=ki(e),i=ki(t);for(const[d,f]of n)if(!i.has(d)){const h=Ky(f);Xa(f,null),h!==null&&h.remove()}const o=lt,s=ds();let a="",l=null;const u=at(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?Ky(h):null;lt="";const g=ds();if(p===null){p=bP(d);let m=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){m=v;break}r.insertBefore(p,m),Za(f,co(t,p,xt))}else h===f?Bs(f,p):(h!==void 0&&Xa(h,p),Za(f,co(t,p,xt)));if(Ji(g),yP(r,u,p),xP(t,d,r,p),a+=lt,p.parentElement===r){const m=l===null?r.firstChild:l.nextSibling;m!==p&&r.insertBefore(p,m),l=p}}return Ji(s),lt=o,a}function Za(e,t){const r=cr.get(e);if(r===void 0&&te(60),t!==null){const i=$o.get(e);if(i!==void 0){const o=au.get(e);if(o!==void 0){const s=hu(i)?i.__slotHost:null,a=hu(r)?r.__slotHost:null,l=i.__parent!==r.__parent||s!==a,u=a!==null&&o.parentElement!==t.element;if(l||u)return t.insertChild(o),Bs(e,t.element)}}}const n=lu.$createDOM(r,xt);if((function(i,o,s){const a=s._keyToDOMMap;$O(o,s,i),a.set(i,o)})(e,n,xt),ie(r)?n.setAttribute("data-lexical-text","true"):at(r)&&(n.setAttribute("data-lexical-decorator","true"),IX(n,{captureSelection:!0})),q(r)){const i=r.__indent,o=r.__size;Vy(n,r),i!==0&&vP(n,i);const s=ki(r),a=s.size>0?NC(r,n,s):"";if(o===0)n.__lexicalTextContent=a,n.__lexicalFirstTextKey=null,lt+=a,s.size>0&&(n.__lexicalSlotTextLength=a.length);else{const u=lt,d=o-1;if(Hy(Tg(r,cr),r,0,d,co(r,n,xt)),a!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=a+f,lt=u+a+f}s.size>0&&(n.__lexicalSlotTextLength=a.length)}const l=r.__format;l!==0&&_P(n,l),r.isInline()||SP(null,r,n)}else{const i=r.getTextContent();if(at(r)){const o=r.decorate(xt,eh);o!==null&&EP(e,o),n.contentEditable="false";const s=ki(r);s.size>0&&NC(r,n,s)}lt+=i}return t!==null&&t.insertChild(n),lu.$decorateDOM(r,null,n,xt),mP(r),kS(rh,th,Fm,r,"created"),n}function Hy(e,t,r,n,i){const o=lt,s=ds();lt="",kr=null,Fn=null,wn=null;let a=r;for(;a<=n;++a){const u=ds();Za(e[a],i);const d=cr.get(e[a]);d!==null&&ie(d)?kr===null&&(kr=d.getFormat(),Fn=d.getStyle(),wn=d.__key):q(d)&&a<n&&!d.isInline()&&(lt+=Kl),Ji(u)}const l=xt._keyToDOMMap.get(t.__key);l===void 0&&te(349,t.__key),l.__lexicalTextContent=lt,l.__lexicalFirstTextKey=wn,lt=o+lt,Ji(s)}function SP(e,t,r){const n=co(t,r,xt),i=n.element.__lexicalLastChildKind??null,o=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return Hn(u)?"line-break":at(u)&&u.isInline()?"decorator":null}return ki(s).size>0?null:"empty"}return null})(t,cr);i!==o&&n.setManagedLineBreak(o)}function bY(e,t,r){var n;kr=null,Fn=null,wn=null,(function(i,o,s){const a=lt,l=i.__size,u=o.__size;lt="";const d=s.element,f=xt._keyToDOMMap.get(o.__key);f===void 0&&te(351,o.__key);const h=u-l;if(!Ws&&Math.abs(h)<=1&&l>=vY&&i.__first===o.__first&&(h!==0||!xt._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,g=jy.get(i.__key);if(!Ws&&typeof p=="string"&&g!==void 0){const m=(function(v,_){const y=_.size;if(y===0||y>=v.__size)return null;let E=v.__last,S=null,k=0;for(;E!==null&&k<y;){if(!_.has(E))return null;S=E;const C=cr.get(E);if(C===void 0)return null;E=C.__prev,k++}return k!==y||E!==null&&_.has(E)?null:S})(o,g);if(m!==null){const v=g.size;if(h===0){const _=$C(m,v);let y=m,E=0;for(;y!==null&&E<v;){const A=cr.get(y);if(A===void 0)break;const N=ds();Bs(y,d),ie(A)&&kr===null&&(kr=A.getFormat(),Fn=A.getStyle(),wn=A.__key),Ji(N),y=A.__next,E++}let S="";for(y=m,E=0;y!==null&&E<v;){const A=cr.get(y);if(A===void 0)break;let N;if(q(A)){const O=xt._keyToDOMMap.get(y),P=O&&O.__lexicalTextContent;typeof P!="string"&&te(352,A.getType()),N=P}else N=A.getTextContent();S+=N,E<v-1&&q(A)&&!A.isInline()&&(S+=Kl),y=A.__next,E++}const k=f.__lexicalSlotTextLength||0,C=k>0?p.slice(k):p,$=C.slice(0,C.length-_)+S;return f.__lexicalTextContent=$,lt=a+$,void FC(o,f,g)}if((function(_,y,E,S,k,C,$,A){if(A!==1&&A!==-1||$!==(A===1?2:1))return!1;const O=$-A;let P=_.__last;for(let ye=0;ye<O-1;ye++){if(P===null)return!1;const we=$o.get(P);if(we===void 0)return!1;P=we.__prev}if(P===null)return!1;const I=cr.get(C),U=$o.get(P);if(I===void 0||U===void 0||I.__prev!==U.__prev)return!1;const B=[];let V=C;for(let ye=0;ye<$;ye++){if(V===null)return!1;B.push(V);const we=cr.get(V);V=we?we.__next:null}const W=[];V=P;for(let ye=0;ye<O;ye++){if(V===null)return!1;W.push(V);const we=$o.get(V);V=we?we.__next:null}const Q=new Set(W),K=new Set(B),G=[];let ne=0,se=0;for(;ne<O&&se<$;)if(B[se]===W[ne])G.push({key:B[se],kind:"reconcile"}),ne++,se++;else if(K.has(W[ne])){if(Q.has(B[se]))return!1;G.push({key:B[se],kind:"create",nextIndex:se}),se++}else G.push({key:W[ne],kind:"destroy"}),ne++;for(;ne<O;)G.push({key:W[ne++],kind:"destroy"});for(;se<$;)G.push({key:B[se],kind:"create",nextIndex:se}),se++;const be=$C(P,O);for(const ye of G){const we=ds();if(ye.kind==="reconcile")Bs(ye.key,E.element);else if(ye.kind==="destroy")Xa(ye.key,E.element);else{let Ze=null;for(let Zt=ye.nextIndex+1;Zt<$;Zt++){const Ut=xt._keyToDOMMap.get(B[Zt]);if(Ut!==void 0){Ze=Ut;break}}Za(ye.key,E.withBefore(Ze??E.before))}if(ye.kind!=="destroy"){const Ze=cr.get(ye.key);Ze&&ie(Ze)&&kr===null&&(kr=Ze.getFormat(),Fn=Ze.getStyle(),wn=Ze.__key)}Ji(we)}let Ae="";for(let ye=0;ye<$;ye++){const we=cr.get(B[ye]);if(we===void 0)return!1;let Ze;if(q(we)){const Zt=xt._keyToDOMMap.get(B[ye]),Ut=Zt&&Zt.__lexicalTextContent;typeof Ut!="string"&&te(350,we.getType()),Ze=Ut}else Ze=we.getTextContent();Ae+=Ze,ye<$-1&&q(we)&&!we.isInline()&&(Ae+=Kl)}const $e=S.__lexicalSlotTextLength||0,ot=$e>0?k.slice($e):k;return S.__lexicalTextContent=ot.slice(0,ot.length-be)+Ae,!0})(i,0,s,f,p,m,v,h)){const _=f.__lexicalTextContent;return typeof _!="string"&&te(353),lt=a+_,void FC(o,f,g)}}}if(h===0){let m=i.__first,v=0;for(;m!==null;){const _=cr.get(m);if(_===void 0)break;const y=Ws||wf.has(m)||Ef.has(m),E=ds();if(y)Bs(m,d);else{let S,k;if(q(_)){k=au.get(m);const C=k&&k.__lexicalTextContent;typeof C!="string"&&te(354,_.getType()),S=C}else S=_.getTextContent();lt+=S,k!==void 0&&Uy(k)}ie(_)?kr===null&&(kr=_.getFormat(),Fn=_.getStyle(),wn=_.__key):q(_)&&v<u-1&&!_.isInline()&&(lt+=Kl),Ji(E),m=_.__next,v++}return f.__lexicalTextContent=lt,f.__lexicalFirstTextKey=wn,void(lt=a+lt)}}if(l===1&&u===1){const p=i.__first,g=o.__first;if(p===g)Bs(p,d);else{const v=Wy(p),_=Za(g,null);try{v.parentNode===d?d.replaceChild(_,v):s.insertChild(_)}catch(y){if(typeof y=="object"&&y!=null){const E=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${_.tagName} key: ${g}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(E)}throw y}Xa(p,null)}const m=cr.get(g);ie(m)&&kr===null&&(kr=m.getFormat(),Fn=m.getStyle(),wn=m.__key)}else{const p=Tg(i,$o),g=Tg(o,cr);if(p.length!==l&&te(227),g.length!==u&&te(228),l===0)u!==0&&Hy(g,o,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&ki(o).size===0&&s.element.__lexicalLineBreak==null;qy(p,0,l-1,m?null:d),m&&(d.textContent="")}}else(function(m,v,_,y,E,S){const k=y-1,C=E-1;let $,A,N=S.getFirstChild(),O=0,P=0;for(;O<=k&&P<=C;){const B=v[O],V=_[P],W=ds();if(B===V)N=h_(Bs(V,S.element)),O++,P++;else{if(A===void 0&&(A=IC(_,P)),$===void 0)$=IC(v,O);else if(!$.has(B)){O++,Ji(W);continue}if(!A.has(B)){N=h_(Wy(B)),Xa(B,S.element),O++,$.delete(B),Ji(W);continue}if($.has(V)){const K=Gc(xt,V);K!==N&&S.withBefore(N??S.before).insertChild(K),N=h_(Bs(V,S.element)),O++,P++}else Za(V,S.withBefore(N??S.before)),P++}const Q=cr.get(V);Q!==null&&ie(Q)?kr===null&&(kr=Q.getFormat(),Fn=Q.getStyle(),wn=Q.__key):q(Q)&&P<=C&&!Q.isInline()&&(lt+=Kl),Ji(W)}const I=O>k,U=P>C;if(I&&!U){const B=_[C+1],V=B===void 0?null:xt.getElementByKey(B);Hy(_,m,P,C,S.withBefore(V??S.before))}else U&&!I&&qy(v,O,k,S.element)})(o,p,g,l,u,s)}f.__lexicalTextContent=lt,f.__lexicalFirstTextKey=wn,lt=a+lt})(e,t,co(t,r,xt)),rr(t)||(n=t,kr==null||kr===n.__textFormat||fg||n.setTextFormat(kr),(function(i){Fn==null||Fn===i.__textStyle||fg||i.setTextStyle(Fn)})(t))}function FC(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const s=cr.get(o);if(s===void 0){o=null;break}if(s.__parent===i)break;o=s.__parent}if(o!==null&&!r.has(o)){const s=cr.get(n);if(ie(s))return kr=s.getFormat(),void(Fn=s.getStyle())}}t.__lexicalFirstTextKey=wn}function Bs(e,t){const r=$o.get(e);let n=cr.get(e);r!==void 0&&n!==void 0||te(61);const i=Ws||wf.has(e)||Ef.has(e),o=Gc(xt,e);if(r===n&&!i){let s;if(q(r)){const a=o.__lexicalTextContent;typeof a!="string"&&te(355,r.getType()),s=a,Uy(o)}else s=r.getTextContent();return lt+=s,o}if(r!==n&&i&&kS(rh,th,Fm,n,"updated"),lu.$updateDOM(n,r,o,xt)){const s=Za(e,null);return t===null&&te(62),t.replaceChild(s,o),Xa(e,null),s}if(q(r)){q(n)||te(334,e);const s=n.__indent;(Ws||s!==r.__indent)&&vP(o,s);const a=n.__format;(Ws||a!==r.__format)&&_P(o,a);const l=i&&(ki(n).size>0||ki(r).size>0)?DC(r,n,o):"";if(i){const u=lt;if(bY(r,n,o),xr(n)||n.isInline()||SP(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,lt=u+l+d,o.__lexicalSlotTextLength=l.length}else(ki(n).size>0||ki(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&te(356,r.getType()),lt+=u,Uy(o)}if((Ws||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(Vy(o,n),xr(n)&&!Ws))for(const u of n.getChildren())q(u)&&Vy(Gc(xt,u.getKey()),u)}else{const s=n.getTextContent();if(at(n)){const a=n.decorate(xt,eh);a!==null&&EP(e,a),i&&(ki(n).size>0||ki(r).size>0)&&DC(r,n,o)}lt+=s}if(!fg&&xr(n)){const s=n.getLatest();if(s.__cachedText!==lt){const a=s.getWritable();a.__cachedText=lt,n=a}}return lu.$decorateDOM(n,r,o,xt),mP(n),o}function EP(e,t){let r=xt._pendingDecorators;const n=xt._decorators;if(r===null){if(n[e]===t)return;r=NO(xt)}r[e]=t}function h_(e){let t=e.nextSibling;return t!==null&&t===xt._blockCursorElement&&(t=t.nextSibling),t}function IC(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function yY(e,t,r,n,i,o){lt="",kr=null,Fn=null,wn=null,Ws=n===2,xt=r,eh=r._config,lu=r._config.dom||wg,th=r._nodes,Fm=xt._listeners.mutation,Ef=i,wf=o,$o=e._nodeMap,By=e,cr=t._nodeMap,fg=t._readOnly,au=lP(r._keyToDOMMap),jy=(function(){const a=new Map,l=u=>{for(const d of u){const f=cr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=a.get(h);p===void 0&&(p=new Set,a.set(h,p)),p.add(d)}};return l(Ef.keys()),l(wf),a})();const s=new Map;return rh=s,Bs("root",null),xt=void 0,th=void 0,Ef=void 0,wf=void 0,$o=void 0,By=void 0,cr=void 0,eh=void 0,au=void 0,jy=void 0,rh=void 0,lu=wg,s}function Wy(e){const t=au.get(e);return t===void 0&&te(75,e),t}function ze(e){return{type:e}}const wP=ze("SELECTION_CHANGE_COMMAND"),xY=ze("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),kP=ze("CLICK_COMMAND"),CP=ze("BEFORE_INPUT_COMMAND"),RP=ze("INPUT_COMMAND"),AP=ze("COMPOSITION_START_COMMAND"),TP=ze("COMPOSITION_END_COMMAND"),Gl=ze("DELETE_CHARACTER_COMMAND"),kc=ze("INSERT_LINE_BREAK_COMMAND"),nh=ze("INSERT_PARAGRAPH_COMMAND"),Cc=ze("CONTROLLED_TEXT_INSERTION_COMMAND"),uS=ze("PASTE_COMMAND"),I0=ze("REMOVE_TEXT_COMMAND"),ih=ze("DELETE_WORD_COMMAND"),oh=ze("DELETE_LINE_COMMAND"),No=ze("FORMAT_TEXT_COMMAND"),SY=ze("SET_TEXT_FORMAT_COMMAND"),Im=ze("UNDO_COMMAND"),Pm=ze("REDO_COMMAND"),$P=ze("KEYDOWN_COMMAND"),NP=ze("KEY_ARROW_RIGHT_COMMAND"),DP=ze("MOVE_TO_END"),FP=ze("KEY_ARROW_LEFT_COMMAND"),IP=ze("MOVE_TO_START"),PP=ze("KEY_ARROW_UP_COMMAND"),OP=ze("KEY_ARROW_DOWN_COMMAND"),sh=ze("KEY_ENTER_COMMAND"),MP=ze("KEY_SPACE_COMMAND"),cS=ze("KEY_BACKSPACE_COMMAND"),LP=ze("KEY_ESCAPE_COMMAND"),zP=ze("KEY_DELETE_COMMAND"),UP=ze("KEY_TAB_COMMAND"),EY=ze("INSERT_TAB_COMMAND"),wY=ze("INDENT_CONTENT_COMMAND"),PC=ze("OUTDENT_CONTENT_COMMAND"),BP=ze("DROP_COMMAND"),kY=ze("FORMAT_ELEMENT_COMMAND"),jP=ze("DRAGSTART_COMMAND"),qP=ze("DRAGOVER_COMMAND"),CY=ze("DRAGEND_COMMAND"),Om=ze("COPY_COMMAND"),dS=ze("CUT_COMMAND"),VP=ze("SELECT_ALL_COMMAND"),RY=ze("CLEAR_EDITOR_COMMAND"),AY=ze("CLEAR_HISTORY_COMMAND"),Tp=ze("CAN_REDO_COMMAND"),$p=ze("CAN_UNDO_COMMAND"),TY=ze("FOCUS_COMMAND"),$Y=ze("BLUR_COMMAND"),NY=ze("KEY_MODIFIER_COMMAND");function DY(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 s=t.get(r);s&&s.holders.delete(o)&&s.holders.size===0&&(t.delete(r),s.dispose())};return i.holders.add(o),o}}}function FY(e,t,r,n){return e.addEventListener(t,r,n),e.removeEventListener.bind(e,t,r,n)}const Is=Object.freeze({}),Gy=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&ah(r),!t.isComposing()&&Se(t,$P,e)}],["pointerdown",function(e,t){const r=UO(e),n=e.pointerType;yd(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&no(t,()=>{Ag(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){Se(t,AP,e)}],["compositionend",function(e,t){const r=t._inputState;al?r.compositionPhase="ending-firefox":ll||!Uh&&!Bh?Se(t,TP,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;ah(r),no(t,()=>{GP(e,t)||t.dispatchCommand(RP,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){no(t,()=>{const r=pe(),n=Gn(vi(t)),i=pd();if(n){if(re(r)){const o=r.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!xr(s)&&qr().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=uo(n,t._rootElement).anchorNode;(Xe(o)||mi(o))&&vn(pS(i,n,t,e))}}Se(t,kP,e)})}],["cut",Is],["copy",Is],["dragstart",Is],["dragover",Is],["dragend",Is],["paste",Is],["focus",Is],["blur",Is],["drop",Is]];Vc&&Gy.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||al&&PO(n)||i!=="insertCompositionText"&&no(n,()=>{GP(r,n)||Se(n,CP,r)},{event:r})})(e,t)]);const Jy=new WeakMap,hg=new WeakMap,IY=DY(e=>(e.addEventListener("selectionchange",UC),()=>e.removeEventListener("selectionchange",UC)));function KP(e,t,r,n,i,o){const s=e.anchor,a=e.focus,l=s.getNode(),u=$t();let d;if(o!==void 0)d=o;else{const m=Gn(vi(u));d=m!==null?uo(m,u._rootElement):null}const f=d!==null?d.anchorNode:null,h=s.key,p=u.getElementByKey(h),g=r.length;return h!==a.key||!ie(l)||(!i&&(!Vc||u._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&g<2||DO(r))&&s.offset!==a.offset&&!l.isComposing()||Ri(l)||l.isDirty()&&g>1||(i||!Vc)&&p!==null&&!l.isComposing()&&f!==el(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(m,v){if(v.isSegmented())return!0;if(!m.isCollapsed())return!1;const _=m.anchor.offset,y=v.getParentOrThrow(),E=Jl(v);return _===0?!v.canInsertTextBefore()||!y.canInsertTextBefore()&&!v.isComposing()||E||(function(S){const k=S.getPreviousSibling();return(ie(k)||q(k)&&k.isInline())&&!k.canInsertTextAfter()})(v):_===v.getTextContentSize()&&(!v.canInsertTextAfter()||!y.canInsertTextAfter()&&!v.isComposing()||E)})(e,l)}function OC(e,t){return mi(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function MC(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:s}=uo(e,t._rootElement),a=t._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,OC(n,i)&&OC(o,s)&&!a.postDeleteSelectionToRestore)||no(t,()=>{if(!r)return void vn(null);if(!Kh(t,n,o))return;let l=pe();if(a.postDeleteSelectionToRestore&&re(l)&&l.isCollapsed()){const u=l.anchor,d=a.postDeleteSelectionToRestore.anchor;(u.key===d.key&&u.offset===d.offset+1||u.offset===1&&d.getNode().is(u.getNode().getPreviousSibling()))&&(l=a.postDeleteSelectionToRestore.clone(),vn(l))}if(a.postDeleteSelectionToRestore=null,re(l)){const u=l.anchor,d=u.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=vi(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:g,offset:m,key:v,timeStamp:_}=a.collapsedSelectionFormat,y=qr(),E=t.isComposing()===!1&&y.getTextContent()==="";if(h<_+200&&u.offset===m&&u.key===v)P0(l,p,g);else if(u.type==="text")ie(d)||te(141),HP(l,d);else if(u.type==="element"&&!E){q(d)||te(259);const S=u.getNode();S.isEmpty()?(function(k,C){const $=C.getTextFormat(),A=C.getTextStyle();P0(k,$,A)})(l,S):P0(l,l.format,"")}}else{const f=u.key,h=l.focus.key,p=l.getNodes(),g=p.length,m=l.isBackward(),v=m?s:i,_=m?i:s,y=m?h:f,E=m?f:h;let S=2047,k=!1;for(let C=0;C<g;C++){const $=p[C],A=$.getTextContentSize();if(ie($)&&A!==0&&!(C===0&&$.__key===y&&v===A||C===g-1&&$.__key===E&&_===0)&&(k=!0,S&=$.getFormat(),S===0))break}l.format=k?S:0}}Se(t,wP,void 0)})}function P0(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function HP(e,t){P0(e,t.getFormat(),t.getStyle())}function WP(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function LC(e){const{lastKeyCode:t}=$t()._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=pe();if(!re(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!ie(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const s=i.getNextSibling();if(r===`
|
|
21
|
+
`){if(Hn(s))s.selectEnd();else if(!s){const a=Kt(i,Kc),l=a&&a.getNextSibling();q(l)&&l.selectStart()}}else r===" "?uu(s)&&s.selectEnd():ie(s)&&s.getTextContent()[0]===r&&s.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function ah(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function zC(e){ah(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>ah(e),0)}function GP(e,t){const r=UO(e);if(Xe(r)&&Ag(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=ch(n.ownerDocument);return i!==null&&n.contains(i)&&Ag(i,t)}function PY(e){const t=e.inputType,r=WP(e),n=$t(),i=n._inputState,o=pe();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(ah(i),e.preventDefault(),re(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=pd();if(!re(f))return!0;vn(f.clone())}if(re(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(ln(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{no(n,()=>{ln(null)})},30),re(o)){const h=o.anchor.getNode();h.markDirty(),ie(h)||te(142),HP(o,h)}}else{if(ln(null),ll&&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(),g=h.canInsertTextAfter(),m=o.anchor.offset===0&&o.focus.offset===p.length;let v=ug&&f&&!m&&g;if(v&&o.isCollapsed()&&(v=!at(bX(o.anchor,!0))),!v){Se(n,Gl,!0);const _=pe();ug&&re(_)&&_.isCollapsed()&&(i.postDeleteSelectionToRestore=_,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!re(o))return!0;const s=e.data;i.unprocessedBeforeInputData!==null&&ES(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||xr(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const a=o.anchor,l=o.focus,u=a.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(s===`
|
|
22
|
+
`)e.preventDefault(),Se(n,kc,!1);else if(s===Kl)e.preventDefault(),Se(n,nh,void 0);else if(s==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else s!=null&&KP(o,r,s,e.timeStamp,!0)?(e.preventDefault(),Se(n,Cc,s),LC(s)):i.unprocessedBeforeInputData=s;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Se(n,Cc,e),LC((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;ln(null),f||Se(n,Cc,e),O0(h);break}case"insertLineBreak":ln(null),Se(n,kc,!1);break;case"insertParagraph":ln(null),i.isInsertLineBreak&&!ll?(i.isInsertLineBreak=!1,Se(n,kc,!1)):Se(n,nh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Se(n,uS,e);break;case"deleteByComposition":(function(f,h){return f!==h||q(f)||q(h)||!Jl(f)||!Jl(h)})(u,d)&&Se(n,I0,e);break;case"deleteByDrag":fu(Yy),Se(n,I0,e);break;case"deleteByCut":Se(n,I0,e);break;case"deleteContent":Se(n,Gl,!1);break;case"deleteWordBackward":Se(n,ih,!0);break;case"deleteWordForward":Se(n,ih,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Se(n,oh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Se(n,oh,!1);break;case"formatStrikeThrough":Se(n,No,"strikethrough");break;case"formatBold":Se(n,No,"bold");break;case"formatItalic":Se(n,No,"italic");break;case"formatUnderline":Se(n,No,"underline");break;case"historyUndo":Se(n,Im,void 0);break;case"historyRedo":Se(n,Pm,void 0)}return!0}function OY(e){const t=$t(),r=t._inputState,n=pe(),i=e.data,o=WP(e);let s=!1;if(i!=null&&re(n)){const a=Gn(vi(t)),l=a!==null?uo(a,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()&&ie(d)&&Ri(d);if(!u&&!f&&KP(n,o,i,e.timeStamp,!1,l)){if(s=!0,r.compositionPhase==="ending-firefox"){const _=pg(t,i);if(r.compositionPhase="idle",_)return fu(lh),dR(),!0}const h=n.anchor.getNode();if(a===null||l===null)return!0;const p=n.isBackward(),g=p?n.anchor.offset:n.focus.offset,m=p?n.focus.offset:n.anchor.offset;Vc&&!n.isCollapsed()&&ie(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,g)+i+h.getTextContent().slice(g+m)===IO(l.anchorNode)||Se(t,Cc,i);const v=i.length;al&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),ug&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,ln(null))}}return s||(ES(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(pg(t,i||void 0),fu(lh),r.compositionPhase="idle")),dR(),!0}function MY(e){const t=$t(),r=t._inputState,n=pe();if(re(n)&&!t.isComposing()){r.compositionPhase="composing",r.hadOrphanedCompositionEvents=!1;const i=n.anchor,o=n.anchor.getNode();if(ln(i.key),fu(rO),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!ug&&(o.getFormat()!==n.format||ie(o)&&o.getStyle()!==n.style)||ie(o)&&(Ri(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){Se(t,Cc,aS);const s=pe();re(s)&&ln(s.anchor.key)}}return!0}function LY(e){const t=$t();return t._inputState.compositionPhase="idle",pg(t,e.data),fu(lh),!0}function O0(e){if(e===null)return;const t=Yt(e);if(!ie(t)||t.getType()==="text"||Ri(t)||!t.isAttached())return;const r=pe(),n=re(r)&&r.anchor.key===e?r.anchor.offset:null,i=yr(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 pg(e,t){const r=e._compositionKey;if(ln(null),r!==null&&t!=null){if(t===""){const i=Yt(r),o=e.getElementByKey(r),s=o!==null&&ie(i)?el(i,o,e):null;if(s!==null&&s.nodeValue!==null&&ie(i)){const a=Gn(vi(e)),l=a&&uo(a,e._rootElement);let u=null,d=null;l!==null&&l.anchorNode===s&&(u=l.anchorOffset,d=l.focusOffset),wS(i,s.nodeValue,u,d,!0)}return O0(r),!1}if(t[t.length-1]===`
|
|
23
|
+
`){const i=pe();if(re(i)||Gt(i)){if(re(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return Se(e,sh,null),O0(r),!1}}const n=Yt(r);if(n!==null&&ie(n)&&Ri(n)){n.markDirty();const i=pe(),o=n.getTextContentSize(),s=re(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(s,s).insertText(t),!0}}return ES(!0,e,t),O0(r),!1}function zY(e){const t=$t(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=hR(e);if(n&&no(t,()=>{pg(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return Bt(n,"ArrowRight",{shiftKey:"any"})})(e))Se(t,NP,e);else if((function(n){return Bt(n,"ArrowRight",{...Os,shiftKey:"any"})})(e))Se(t,DP,e);else if((function(n){return Bt(n,"ArrowLeft",{shiftKey:"any"})})(e))Se(t,FP,e);else if((function(n){return Bt(n,"ArrowLeft",{...Os,shiftKey:"any"})})(e))Se(t,IP,e);else if((function(n){return Bt(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))Se(t,PP,e);else if((function(n){return Bt(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))Se(t,OP,e);else if((function(n){return Bt(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,Se(t,sh,e);else if((function(n){return n.key===" "})(e))Se(t,MP,e);else if((function(n){return ko&&Bt(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,Se(t,kc,!0);else if((function(n){return Bt(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,Se(t,sh,e);else if((function(n){return Bt(n,"Backspace",{shiftKey:"any"})||ko&&Bt(n,"h",{ctrlKey:!0})})(e))hR(e)?Se(t,cS,e)&&zC(r):(e.preventDefault(),Se(t,Gl,!0));else if((function(n){return n.key==="Escape"})(e))Se(t,LP,e);else if((function(n){return Bt(n,"Delete",{})||ko&&Bt(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?Se(t,zP,e):(e.preventDefault(),Se(t,Gl,!1));else if((function(n){return Bt(n,"Backspace",fR)})(e))e.preventDefault(),Se(t,ih,!0);else if((function(n){return Bt(n,"Delete",fR)})(e))e.preventDefault(),Se(t,ih,!1);else if((function(n){return ko&&Bt(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),Se(t,oh,!0);else if((function(n){return ko&&(Bt(n,"Delete",{metaKey:!0})||Bt(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),Se(t,oh,!1);else if((function(n){return Bt(n,"b",Os)})(e))e.preventDefault(),Se(t,No,"bold");else if((function(n){return Bt(n,"u",Os)})(e))e.preventDefault(),Se(t,No,"underline");else if((function(n){return Bt(n,"i",Os)})(e))e.preventDefault(),Se(t,No,"italic");else if((function(n){return Bt(n,"Tab",{shiftKey:"any"})})(e))Se(t,UP,e);else if((function(n){return Bt(n,"z",Os)})(e))e.preventDefault(),Se(t,Im,void 0);else if((function(n){return ko?Bt(n,"z",{metaKey:!0,shiftKey:!0}):Bt(n,"y",{ctrlKey:!0})||Bt(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),Se(t,Pm,void 0);else{const n=t._editorState._selection;(function(i){return Bt(i,"a",Os)})(e)?(e.preventDefault(),Se(t,VP,e)&&zC(r)):n===null||re(n)||((function(i){return Bt(i,"c",Os)})(e)?(e.preventDefault(),Se(t,Om,e)):(function(i){return Bt(i,"x",Os)})(e)&&(e.preventDefault(),Se(t,dS,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(NY,e),!0}function JP(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Rc=new Map;function UC(e){const t=EX(e.target);if(t===null)return;const r=CS(e.target);let n=null,i=null;const o=r!==null?hg.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&&oa(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,g=null;for(const m of f){const v=m._rootElement;if(v===null)continue;const _=uo(t,v).anchorNode;if(_!==null&&Tc(_)===m){if(oa(v.getRootNode())){n=m,i=_;break}p===null&&(p=m,g=_)}}n===null&&p!==null&&(n=p,i=g)}else{const p=t.anchorNode;p===null||Xe(p)&&p.shadowRoot!==null||(n=Tc(p),n!==null&&(i=p))}}if(n===null){const f=ch(r);n=f!==null?Tc(f):null}}if(n===null)return;if(n._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;no(n,()=>{const f=pd(),h=i??uo(t,n._rootElement).anchorNode;(Xe(h)||mi(h))&&vn(pS(f,t,n,e))})}const s=SS(n),a=s[s.length-1],l=a._key,u=Rc.get(l),d=u||a;d!==n&&MC(t,d,!1),MC(t,n,!0),n!==a?Rc.set(l,n):u&&Rc.delete(l)}function BC(e){e._lexicalHandled=!0}function jC(e){return e._lexicalHandled===!0}function UY(e){const t=Jy.get(e);if(t===void 0)return;const r=hg.get(t);if(r===void 0)return;Jy.delete(e);const n=Hh(e);zm(n)?((function(o){if(o._parentEditor!==null){const s=SS(o),a=s[s.length-1]._key;Rc.get(a)===o&&Rc.delete(a)}else Rc.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&te(198);const i=JP(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function Qy(e,t,r){an();const n=e.__key,i=e.getParent();if(i===null)return void(An(e)!==null&&te(367,n,String(An(e))));const o=(function(a){const l=pe();if(!re(l)||!q(a))return l;const{anchor:u,focus:d}=l,f=u.getNode(),h=d.getNode();return Jc(f,a)&&u.set(a.__key,0,"element"),Jc(h,a)&&d.set(a.__key,0,"element"),l})(e);let s=!1;if(re(o)&&t){const a=o.anchor,l=o.focus;a.key===n&&(bg(a,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),l.key===n&&(bg(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else Gt(o)&&t&&e.isSelected()&&e.selectPrevious();if(re(o)&&t&&!s){const a=e.getIndexWithinParent();Gs(e),jl(o,i,a,-1)}else Gs(e);r||rr(i)||i.canBeEmpty()||!i.isEmpty()||Qy(i,t),t&&o&&xr(i)&&i.isEmpty()&&i.selectEnd()}const QP=Symbol.for("ephemeral");function gg(e){return e[QP]||!1}const qC={configurable:!0,enumerable:!1,value:void 0,writable:!0};class Di{__type;__key;__parent;__prev;__next;__state;[Zf];static getType(){const{ownNodeType:t}=AS(this);return t===void 0&&te(64,this.name),t}static clone(t){te(65,this.name)}$config(){return{}}config(t,r){const n=r.extends||KO(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",qC),Object.defineProperty(this,Zf,qC),AO(this,t)}getType(){return this.__type}isInline(){te(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const r=Yt(t);if(r===null)break;t=r.__parent!==null?r.__parent:An(r)}return!1}isSelected(t){const r=t||pe();if(r==null)return!1;const n=r.getNodes().some(i=>i.__key===this.__key);if(ie(this))return n;if(re(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(at(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:Yt(t)}getParentOrThrow(){const t=this.getParent();return t===null&&te(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const r=t.getParent();if(rr(r)||An(t)!==null)return q(t)||t===this&&at(t)||te(194),t;t=r}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&te(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:Yt(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:Yt(t)}getNextSiblings(){const t=[];let r=this.getNextSibling();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getCommonAncestor(t){const r=q(this)?this:this.getParent(),n=q(t)?t:t.getParent(),i=r&&n?a1(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=a1(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?YO(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&te(279),!1)))}isParentOf(t){return Jc(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),n.push(o)),o===t)break;const a=q(o)?r?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;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&&te(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=$t()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(gg(this))return this;const t=Yt(this.__key);return t===null&&te(113),t}getWritable(){if(gg(this))return this;an();const t=ga(),r=$t(),n=t._nodeMap,i=this.__key,o=this.getLatest(),s=r._cloneNotNeeded,a=pe();if(a!==null&&a.setCachedNodes(null),s.has(i))return kg(o),o;const l=jO(o);return s.add(i),kg(l),n.set(i,l),l}getTextContent(){return WO(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){te(70)}updateDOM(t,r,n){te(71)}getDOMSlot(t){return new oP(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){te(18,this.name)}updateFromJSON(t){return(function(r,n){const i=r.getWritable(),o=n.$;let s=o;for(const a of gP(i).flatKeys)a in n&&(s!==void 0&&s!==o||(s={...o}),s[a]=n[a]);return(i.__state||s)&&pP(r).updateFromJSON(s),i})(this,t)}static transform(){return null}remove(t){Qy(this,!0,t)}replace(t,r){an();let n=pe();n!==null&&(n=n.clone()),S_(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,a=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,d=a.getParent(),f=d!==null?a.getIndexWithinParent():-1;Gs(a),d!==null&&re(n)&&jl(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),g=i.__prev,m=i.__next,v=i.__parent;Qy(i,!1,!0),h===null?l.__first=s:h.getWritable().__next=s,a.__prev=g,p===null?l.__last=s:p.getWritable().__prev=s,a.__next=m,a.__parent=v,l.__size=u;let _=0;r&&(q(this)&&q(a)||te(139),_=a.getChildrenSize(),a.splice(_,0,this.getChildren()));const y=io(this);if(y.length>0){Ys(this)&&Ys(a)||te(368,this.__key,a.__key);for(const E of y){const S=pu(this,E);S!==null&&(BX(this,E),GO(a,E,S))}}if(re(n)){vn(n);const E=n.anchor,S=n.focus;E.key===o&&(r&&E.type==="element"?E.set(a.__key,_+E.offset,"element"):WC(E,a)),S.key===o&&(r&&S.type==="element"?S.set(a.__key,_+S.offset,"element"):WC(S,a))}return Js()===o&&ln(s),a}insertAfter(t,r=!0){an(),S_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),s=pe();let a=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(re(s)){const g=o.__key,m=s.anchor,v=s.focus;a=m.type==="element"&&m.key===g&&m.offset===p+1,l=v.type==="element"&&v.key===g&&v.offset===p+1}Gs(i),r&&re(s)&&jl(s,o,p,-1)}else Gs(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&&re(s)){const p=this.getIndexWithinParent();jl(s,d,p+1);const g=d.__key;a&&s.anchor.set(g,p+2,"element"),l&&s.focus.set(g,p+2,"element")}return t}insertBefore(t,r=!0){an(),S_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,s=pe(),a=i.getParent(),l=a!==null?i.getIndexWithinParent():-1;Gs(i),a!==null&&r&&re(s)&&jl(s,a,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&&re(s)&&jl(s,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return Ft()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){an();const n=Do(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(q(i))return i.select();if(!ie(i)){const s=i.getIndexWithinParent()+1;return o.select(s,s)}return i.select(t,r)}selectNext(t,r){an();const n=Do(this);if(n!==null)return n.selectNext(t,r);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(q(i))return i.select(0,0);if(!ie(i)){const s=i.getIndexWithinParent();return o.select(s,s)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function YP(e){return e instanceof Di}const mg="historic",XP="history-push",kf="history-merge",ZP="paste",eO="cut",tO="collaboration",BY="skip-scroll-into-view",jY="skip-dom-selection",Yy="skip-selection-focus",rO="composition-start",lh="composition-end",qY="!important";function vg(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,s=!1,a=!1,l=0;const u=e.length;let d=-1;for(let p=0;p<u;p++){const g=e[p];if(o)g==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(s)d===-1&&(d=p),s=!1;else if(i===null)if(g!=="/"||e[p+1]!=="*")if(g!=='"'&&g!=="'")if(g!=="(")if(g!==")")if(a||g!==":"||l!==0){if(g===";"&&l===0){d!==-1&&(a?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const m=r.trim(),v=n.trim();m!==""&&v!==""&&(t[m]=v),r="",n="",a=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),a=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=g;else d!==-1&&(a?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),g==="\\"?s=!0:g===i&&(i=null)}d!==-1&&(a?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 VY(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===qY?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function Ac(e,t,r=""){if(t===r)return;const n=vg(r),i=vg(t);for(const o in i)delete n[o],VY(e,o,i[o]);for(const o in n)e.removeProperty(o)}function p_(e,t){return 16&t?"code":t&sS?"mark":32&t?"sub":64&t?"sup":null}function g_(e,t){return 1&t?"strong":2&t?"em":"span"}function nO(e,t,r,n,i){const o=n.classList;let s=$c(i,"base");s!==void 0&&o.add(...s),s=$c(i,"underlineStrikethrough");let a=!1;const l=8&t&&4&t;s!==void 0&&(8&r&&4&r?(a=!0,l||o.add(...s)):l&&o.remove(...s));for(const u in ia){const d=ia[u];if(s=$c(i,u),s!==void 0)if(r&d){if(a&&(u==="underline"||u==="strikethrough")){t&d&&o.remove(...s);continue}((t&d)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...s)}else t&d&&o.remove(...s)}}function iO(e,t,r){const n=r.isComposing(),i=e+(n?Xf:""),o=vr(),s=Bm(o).$getDOMSlot(r,t,o),a=s.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void s.insertChild(Xt().createTextNode(i));const l=a,u=l.nodeValue;if(u!==i)if(n||al){const[d,f,h]=(function(p,g){const m=p.length,v=g.length;let _=0,y=0;for(;_<m&&_<v&&p[_]===g[_];)_++;for(;y+_<m&&y+_<v&&p[m-y-1]===g[v-y-1];)y++;return[_,m-_-y,g.slice(_,v-y)]})(u,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function VC(e,t,r,n,i,o){iO(i,e,t);const s=o.theme.text;s!==void 0&&nO(0,0,n,e,s)}function Np(e,t){const r=Xt().createElement(t);return r.appendChild(e),r}function Xy(e){return e!=null&&e.__isInlineFormattable===!0}class pa extends Di{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new pa(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 aY[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Js()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=ia[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return cu(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const n=this.__format,i=p_(0,n),o=g_(0,n),s=i===null?o:i,a=Xt().createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(l=Xt().createElement(o),a.appendChild(l)),VC(l,this,0,n,this.__text,t);const u=this.__style;return u!==""&&Ac(a.style,u),a}updateDOM(t,r,n){const i=this.__text,o=t.__format,s=this.__format,a=p_(0,o),l=p_(0,s),u=g_(0,o),d=g_(0,s);if((a===null?u:a)!==(l===null?d:l))return!0;if(a===l&&u!==d){const m=r.firstChild;m==null&&te(48);const v=Xt().createElement(d);return VC(v,this,0,s,i,n),r.replaceChild(v,m),!1}let f=r;l!==null&&a!==null&&(f=r.firstChild,f==null&&te(49)),iO(i,f,this);const h=n.theme.text;h!==void 0&&o!==s&&nO(0,o,s,f,h);const p=t.__style,g=this.__style;return p!==g&&Ac(r.style,g,p),!1}static importDOM(){return{"#text":()=>({conversion:GY,priority:0}),b:()=>({conversion:HY,priority:0}),code:()=>({conversion:Ps,priority:0}),em:()=>({conversion:Ps,priority:0}),i:()=>({conversion:Ps,priority:0}),mark:()=>({conversion:Ps,priority:0}),s:()=>({conversion:Ps,priority:0}),span:()=>({conversion:KY,priority:0}),strong:()=>({conversion:Ps,priority:0}),sub:()=>({conversion:Ps,priority:0}),sup:()=>({conversion:Ps,priority:0}),u:()=>({conversion:Ps,priority:0})}}static importJSON(t){return yr().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 Xe(r)||te(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=Np(r,"b")),this.hasFormat("italic")&&(r=Np(r,"i")),this.hasFormat("strikethrough")&&(r=Np(r,"s")),this.hasFormat("underline")&&(r=Np(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"?ia[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?iY[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=cu(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=sY[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){an();let n=t,i=r;const o=pe(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!re(o))return gO(a,n,a,i,"text","text");{const l=Js();l!==o.anchor.key&&l!==o.focus.key||ln(a),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(),s=o.__text,a=n.length;let l=t;l<0&&(l=a+l,l<0&&(l=0));const u=pe();if(i&&re(u)){const f=t+a;u.setTextNodeRange(o,f,o,f)}const d=s.slice(0,l)+n+s.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){an();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=Js(),s=n.length;t.sort((A,N)=>A-N),t.push(s);const a=[],l=t.length;for(let A=0,N=0;A<s&&N<=l;N++){const O=t[N];O>A&&(a.push(n.slice(A,O)),A=O)}const u=a.length;if(u===1)return[r];const d=a[0],f=r.getParent();let h;const p=r.getFormat(),g=r.getStyle(),m=r.__detail;let v=!1,_=null,y=null;const E=pe();if(re(E)){const[A,N]=E.isBackward()?[E.focus,E.anchor]:[E.anchor,E.focus];A.type==="text"&&A.key===i&&(_=A),N.type==="text"&&N.key===i&&(y=N)}r.isSegmented()?(h=yr(d),h.__format=p,h.__style=g,h.__detail=m,h.__state=kC(r,h),v=!0):h=r.setTextContent(d);const S=[h];for(let A=1;A<u;A++){const N=yr(a[A]);N.__format=p,N.__style=g,N.__detail=m,N.__state=kC(r,N);const O=N.__key;o===i&&ln(O),S.push(N)}const k=_?_.offset:null,C=y?y.offset:null;let $=0;for(const A of S){if(!_&&!y)break;const N=$+A.getTextContentSize();if(_!==null&&k!==null&&k<=N&&k>=$&&(_.set(A.getKey(),k-$,"text"),k<N&&(_=null)),y!==null&&C!==null&&C<=N&&C>=$){y.set(A.getKey(),C-$,"text");break}$=N}if(f!==null){(function(O){const P=O.getPreviousSibling(),I=O.getNextSibling();P!==null&&kg(P),I!==null&&kg(I)})(this);const A=f.getWritable(),N=this.getIndexWithinParent();v?(A.splice(N,0,S),this.remove()):A.splice(N,1,S),re(E)&&jl(E,f,N,u-1)}return S}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||te(50);const n=this.__key,i=t.__key,o=this.__text,s=o.length;Js()===i&&ln(n);const a=pe();if(re(a)){const f=a.anchor,h=a.focus;f!==null&&f.key===i&&eR(f,r,n,t,s),h!==null&&h.key===i&&eR(h,r,n,t,s)}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 KY(e){return{forChild:fS(e.style),node:null}}function HY(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:fS(t.style,r?void 0:"bold"),node:null}}const KC=new WeakMap;function WY(e){if(!Xe(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function GY(e){const t=e;e.parentElement===null&&te(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const s=[n];for(;o!==null&&(i=KC.get(o))===void 0&&!WY(o);)s.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let l=0;l<s.length;l++)KC.set(s[l],a);return a})(t)!==null)return{node:uh(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=HC(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=HC(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:yr(r)}}function HC(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,Xe(r)){const o=r.style.display;if(o===""&&!Rg(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(mi(r))return r;if(r.nodeName==="BR")return null}}const JY={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ps(e){const t=JY[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:fS(e.style,t),node:null}}function yr(e=""){return Ho(new pa(e))}function ie(e){return e instanceof pa}function fS(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),s=e.fontStyle==="italic",a=n.includes("underline"),l=e.verticalAlign;return u=>((ie(u)||Xy(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!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 fd extends pa{static getType(){return"tab"}static clone(t){return new fd(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const r=super.createDOM(t),n=$c(t.theme,"tab");return n!==void 0&&r.classList.add(...n),r}static importJSON(t){return hd().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,r,n,i){return n===""&&r===0||n===" "&&r===1||te(286),this}setDetail(t){return t!==2&&te(127),this}setMode(t){return t!=="normal"&&te(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function hd(){return Ho(new fd)}function uu(e){return e instanceof fd}class QY{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:fh(Ai(ai(this,"next")),Ai(ai(t,"next")))<0}getNode(){const t=Yt(this.key);return t===null&&te(20),t}set(t,r,n,i){const o=this._selection,s=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,Hc()||(Js()===s&&ln(t),o!==null&&(o.setCachedNodes(null),re(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function ys(e,t,r){return new QY(e,t,r)}function m_(e,t){let r=t.__key,n=e.offset,i="element";if(ie(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!q(t)){const o=t.getNextSibling();if(ie(o))r=o.__key,n=0,i="text";else{const s=t.getParent();s&&(r=s.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function WC(e,t){if(q(t)){const r=t.getLastDescendant();q(r)||ie(r)?m_(e,r):m_(e,t)}else m_(e,t)}class Mm{_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(!Gt(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 Mm(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(s=>An(s)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(ie(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(t);for(let s=0;s<n;s++)r[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=Yt(i);o!==null&&n.push(o)}return Hc()||(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=>An(r)===null);if((pe()||pd())===this&&t[0]){const r=Tt(t[0],"next");hh(Io(r,r))}for(const r of t)r.remove();oO()}}function oO(){const e=qr();if(e.isEmpty()){const t=Ft();e.append(t),t.select()}}function re(e){return e instanceof wu}class wu{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!!re(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,s]=n.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,l=new Set;for(const u of n)if(so(u)){const{origin:d}=u;i.length===0?a.add(d):(l.add(d),i.push(d))}else{const{origin:d}=u;q(d)&&l.has(d)||i.push(d)}if(s&&i.push(s.caret.origin),ul(n.focus)&&q(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let u=fo(n.focus.origin,"previous");so(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=DS(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!q(u)||l.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&n.isCollapsed()){const u=Ai(n.anchor),d=Ai(n.anchor.getFlipped()),f=p=>oo(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(n.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(PS(l1(this),"next"));return Hc()||(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,s=i.isBefore(o),[a,l]=Zy(this);let u="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(q(h)&&!h.isInline()){d||(u+=`
|
|
24
|
+
`);let p="";for(const g of io(h)){const m=pu(h,g);m!==null&&(p+=m.getTextContent())}p!==""?(u+=p,d=!1):d=!h.isEmpty()}else if(d=!1,ie(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=a<l?p.slice(a,l):p.slice(l,a)):p=s?p.slice(a):p.slice(l):h===n&&(p=s?p.slice(0,l):p.slice(0,a)),u+=p}else!at(h)&&!Hn(h)||h===n&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const r=$t(),n=r.getEditorState()._selection,i=pO(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,s,a]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),a&&(this.dirty=!0),qa(this)}clone(){const t=this.anchor,r=this.focus;return new wu(ys(t.key,t.offset,t.type),ys(r.key,r.offset,r.type),this.format,this.style)}toggleFormat(t){this.format=cu(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=ia[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(uh(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let s=r,a=n;!this.isCollapsed()&&n.isBefore(r)&&(s=n,a=r),s.type==="element"&&(function(v,_,y,E){const S=v.getNode(),k=S.getChildAtIndex(v.offset),C=yr();if(C.setFormat(y),C.setStyle(E),_d(k))k.splice(0,0,[C]);else if(k!==null){const $=rr(S)?Ft().append(C):C;k.insertBefore($)}else if(rr(S)){const $=S.getLastChild();q($)&&!$.isInline()&&$.isEmpty()?$.append(C):S.append(Ft().append(C))}else S.append(C);v.is(_)&&_.set(C.__key,0,"text"),v.set(C.__key,0,"text")})(s,a,i,o),a.type==="element"&&vu(a,Ai(ai(a,"next")));const l=s.offset;let u=a.offset;const d=this.getNodes(),f=d.length;let h=d[0];ie(h)||te(26);const p=h.getTextContent().length,g=h.getParentOrThrow();let m=d[f-1];if(f===1&&a.type==="element"&&(u=p,a.set(s.key,u,"text")),this.isCollapsed()&&l===p&&(Ri(h)||!h.canInsertTextAfter()||!g.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let _;if(ie(v)&&v.canInsertTextBefore()&&!Ri(v)?_=v:(_=yr(),_.setFormat(i),_.setStyle(o),g.canInsertTextAfter()?h.insertAfter(_):g.insertAfter(_)),_.select(0,0),h=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Ri(h)||!h.canInsertTextBefore()||!g.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let _;if(!ie(v)||Ri(v)?(_=yr(),_.setFormat(i),g.canInsertTextBefore()?h.insertBefore(_):g.insertBefore(_)):_=v,_.select(),h=_,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(Js()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=yr(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||q(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),dO(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(Jl(h)){const E=yr(t);return E.select(),void h.replace(E)}const v=h.getFormat(),_=h.getStyle();if(l!==u||v===i&&_===o){if(uu(h)){const E=yr(t);return E.setFormat(i),E.setStyle(o),E.select(),void h.replace(E)}}else{if(h.getTextContent()!==""){const E=yr(t);if(E.setFormat(i),E.setStyle(o),E.select(),l===0)h.insertBefore(E,!1);else{const[S]=h.splitText(l);S.insertAfter(E,!1)}return void(E.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}h.setFormat(i),h.setStyle(o)}const y=u-l;h=h.spliceText(l,y,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(),...m.getParentKeys()]),_=q(h)?h:h.getParentOrThrow();let y=q(m)?m:m.getParentOrThrow(),E=m;if(!_.is(y)&&y.isInline())do E=y,y=y.getParentOrThrow();while(y.isInline());if(a.type==="text"&&(u!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<u)if(ie(m)&&!Jl(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const A=yr(m.getTextContent());m.replace(A),m=A}xr(a.getNode())||a.type!=="text"||(ie(m)||te(395),m=m.spliceText(0,u,"")),v.add(m.__key)}else{const A=m.getParentOrThrow();A.canBeEmpty()||A.getChildrenSize()!==1?m.remove():A.remove()}else v.add(m.__key);const S=y.getChildren(),k=new Set(d),C=_.is(y),$=_.isInline()&&h.getNextSibling()===null?_:h;for(let A=S.length-1;A>=0;A--){const N=S[A];if(N.is(h)||q(N)&&N.isParentOf(h))break;N.isAttached()&&(!k.has(N)||N.is(E)?C||$.insertAfter(N,!1):N.remove())}if(!C){let A=y,N=null;for(;A!==null;){const O=A.getChildren(),P=O.length;(P===0||O[P-1].is(N))&&(v.delete(A.__key),N=A),A=A.getParent()}}if(Jl(h))if(l===p)h.select();else{const A=yr(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],O=N.__key;v.has(O)||N.remove()}}}removeText(){const t=pe()===this;U0(this,JX(l1(this))),t&&pe()!==this&&vn(this)}formatText(t,r=null){aO(this,t,r)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const r=this.anchor.getNode();if(this.anchor.type==="element"&&q(r)&&An(r)!==null){let m=r.isShadowRoot()?r.getFirstChild()??r.append(Ft()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&m!==null&&!q(m)){const v=Ft();m.insertBefore(v),m=v}if(m!==null){m.selectStart();const v=pe();return re(v)||te(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&rr(r)){const m=__(t),v=m.getLastDescendant();return r.splice(this.anchor.offset,0,m.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=Kt(n,kn);const o=t[t.length-1];if(q(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const m=Kd(this);i.splice(m,0,t),o.selectEnd()}return}if(!t.some(m=>(q(m)||at(m))&&!m.isInline())){q(i)||te(211,n.constructor.name,n.getType());const m=Kd(this);return i.splice(m,0,t),void o.selectEnd()}if(q(i)&&An(i)!==null){const m=Kd(this),v=t1(t);i.splice(m,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(m,m))}if(i===null){const m=__(t),v=m.getLastDescendant();let _=ai(this.anchor,"next");for(const y of m.getChildren())_=ZO(y,_);return void(v!==null&&v.selectEnd())}if(q(i)&&!i.isParentRequired()&&!rr(i.getParentOrThrow())){const m=Kd(this),v=t1(t);i.splice(m,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(m,m))}const s=__(t),a=s.getLastDescendant(),l=s.getChildren(),u=!q(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(n=this.anchor.getNode(),i=Kt(n,kn));const d=l[l.length-1];let f=l[0];var h;q(h=f)&&kn(h)&&!h.isEmpty()&&q(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(q(i)||te(211,n.constructor.name,n.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&te(212,n.constructor.name,n.getType()),(function(m,v){const _=v.getParentOrThrow().getLastChild();let y=v;const E=[v];for(;y!==_;)y.getNextSibling()||te(140),y=y.getNextSibling(),E.push(y);let S=m;for(const k of E)S=S.insertAfter(k)})(i,f));const p=Kt(a,kn);u&&q(p)&&(u.canMergeWhenEmpty()||kn(d))&&(p.append(...u.getChildren()),u.remove()),q(i)&&i.isEmpty()&&i.remove(),a.selectEnd();const g=q(i)?i.getLastChild():null;Hn(g)&&p!==i&&g.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&rr(t)){const a=Ft();return t.splice(this.anchor.offset,0,[a]),a.select(),a}const r=Kd(this),n=Kt(this.anchor.getNode(),kn);if(n!==null&&An(n)!==null)return null;q(n)||te(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],s=n.insertNewAfter(this,!1);return s?(s.append(...o),s.selectStart(),s):null}insertLineBreak(t){const r=zo();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,s]=Zy(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=a?[s,o]:[o,s];if(r===0)return[];if(r===1){if(ie(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(ie(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),ie(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(xg(this,t,r,n))return;const i=t==="move",o=$t(),s=Gn(vi(o));if(!s)return;const a=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();l===null||a===null||!q(u)||u.isInline()||u.canBeEmpty()||Cg(a,o,l);const d=Gc(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=ie(u)?el(u,d,o):null),this.dirty){const h=Gc(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const g=this.anchor.getNode();p=ie(g)?el(g,h,o):null}p&&f&&yg(s,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&ie(u)&&u.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const h=Tt(u,r?"previous":"next").getNodeAtCaret();if(ie(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()),g=p?el(h,p,o):null;if(g){const m=r?g.length:0;yg(s,g,m,g,m)}}}}if(uO(s,t,r?"backward":"forward",n),s.rangeCount>0){const h=Um(s,o._rootElement),p=h||s.getRangeAt(0),g=this.anchor.getNode(),m=xr(g)?g:OO(g);this.applyDOMRange(p),this.dirty=!0,!i&&(cO(this,r,m),(h?s.direction!=="backward":s.anchorNode===p.startContainer&&s.anchorOffset===p.startOffset)||lO(this))}n==="lineboundary"&&xg(this,t,r,n,"decorators")}forwardDeletion(t,r,n){if(!n&&(t.type==="element"&&q(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(q(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=Vm(ai(n,t?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(so(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(q(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Ai(l);U0(this,Io(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(ul(l)){if(q(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(at(l.origin)){if(!l.origin.isIsolated())if(io(l.origin).length>0){if(q(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=_g();u.add(l.origin.getKey()),vn(u)}}else if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&q(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=_g();u.add(l.origin.getKey()),vn(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return io(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(U0(this,Io(!l.origin.isEmpty()&&u.isEmpty()?Au(Tt(u,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if(An(l)!==null)return;if(q(l)&&l.isShadowRoot())break;l=l.getParent()}}const s=this.focus;if(v_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&JC(this,n.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(i=n.type==="text"?n.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(i)||t&&l!==u||!t&&l!==0)return void QC(a,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,u=i.getTextContentSize();if(i.is(a)||t&&l!==0||!t&&l!==u)return void QC(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 g=d.offset,m=f.offset,v=g<m,_=v?g:m,y=v?m:g,E=y-1;_!==E&&(function(S){return!(DO(S)||XY(S))})(h.getTextContent().slice(_,y))&&(u?f.set(f.key,E,f.type):d.set(d.key,E,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()&&xr(n.getParent())&&n.getPreviousSibling()===null&&JC(this,n),oO()}}deleteLine(t){const r=e1(this.anchor);if(r!==null&&at(Do(r)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&v_(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):Kt(this.anchor.getNode(),kn)!==Kt(this.focus.getNode(),kn)?(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;v_(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 Hc()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function Gt(e){return e instanceof Mm}function sO(e,t){if(Gt(e)){for(const _ of e.getNodes())Xy(_)&&_.setFormat(t(_.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void ln(null);const r=[];for(const _ of e.getNodes())ie(_)?r.push(_):q(_)?_.setTextFormat(t(_.getTextFormat())):Xy(_)&&_.setFormat(t(_.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void ln(null);const i=e.anchor,o=e.focus,s=e.isBackward(),a=s?o:i,l=s?i:o;let u=0,d=r[0],f=a.type==="element"?0:a.offset;if(a.type==="text"&&f===d.getTextContentSize()&&(u=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const g=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===g)return;const _=t(d.getFormat());if(Ri(d)||f===0&&g===d.getTextContentSize())d.setFormat(_);else{const y=d.splitText(f,g),E=f===0?y[0]:y[1];E.setFormat(_),a.type==="text"&&a.set(E.__key,0,"text"),l.type==="text"&&l.set(E.__key,g-f,"text")}return void(e.format=_)}f===0||Ri(d)||([,d]=d.splitText(f),f=0);const m=t(d.getFormat());d.setFormat(m);const v=t(p.getFormat());g>0&&(g===p.getTextContentSize()||Ri(p)||([p]=p.splitText(g)),p.setFormat(v));for(let _=u+1;_<h;_++){const y=r[_];y.setFormat(t(y.getFormat()))}a.type==="text"&&a.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,g,"text"),e.format=m|v}function YY(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&sO(e,n=>{for(const[i,o]of r)n=cu(n,i,o?ia[i]:0);return n})}function aO(e,t,r=null){const n=r===null&&re(e)?cu(e.format,t,null):r;sO(e,i=>cu(i,t,n))}function GC(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function Zy(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]:[GC(r),GC(n)]}function JC(e,t){for(let r=t;r;r=r.getParent()){if(q(r)){if(r.collapseAtStart(e))return!0;if(rr(r))break}if(r.getPreviousSibling())break}return!1}function lO(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 uO(e,t,r,n){e.modify(t,r,n)}function cO(e,t,r){const n=e.getNodes(),i=n.filter(a=>Jc(a,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],s=q(o)?o:o.getParentOrThrow();return t?s.selectStart():s.selectEnd(),!0}function v_(e,t,r){if(xg(e,"extend",t,r))return;const n=$t(),i=Gn(vi(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,s=n._rootElement,a=e.anchor,l=e.focus.getNode();s===null||o===null||!q(l)||l.isInline()||l.canBeEmpty()||Cg(o,n,s);const u=N=>{const O=N.getNode(),P=n.getElementByKey(N.key);return P!==null&&N.type==="text"&&ie(O)?el(O,P,n):P},d=a.getNode(),f=u(a);if(f===null)return;const h=a.offset,p=e.isCollapsed(),g=e.focus,m=p?f:u(g);if(m===null)return;const v=g.offset;if(yg(i,m,v,m,v),uO(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const _=Um(i,s)||i.getRangeAt(0),y=_.startContainer,E=_.startOffset;if(p&&r==="character"&&a.type==="text"&&ie(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const N=Tt(d,t?"previous":"next").getNodeAtCaret();if(ie(N)){const O=t?N.getTextContentSize()-1:1;return e.focus.set(N.__key,O,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&a.type==="text"){const N=t?0:d.getTextContentSize(),O=y===f?E:h!==N?N:-1;if(O>=0)return void(O!==h&&(e.focus.set(a.key,O,"text"),e.dirty=!0))}const[S,k,C,$]=t?[y,E,f,h]:[f,h,y,E],A=xr(d)?d:OO(d);e.applyDOMRange({collapsed:!1,endContainer:C,endOffset:$,startContainer:S,startOffset:k}),e.dirty=!0,!cO(e,t,A)&&t&&lO(e),r==="lineboundary"&&xg(e,"extend",t,r,"decorators")}const XY=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function QC(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,a=0;for(let u=0;u<o;u++){const d=u===o-1;if(a=s,s+=i[u].length,t&&s===r||s>r||d){i.splice(u,1),d&&(a=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(a,a))}function YC(e,t,r,n){let i,o=t,s=!1;if(Xe(e)){let a=!1;const l=e.childNodes,u=l.length,d=n._blockCursorElement;o===u&&u>0&&(a=!0,o=u-1),bd(e,n)!==void 0||Ag(e,n)||(s=!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=pc(f),ie(i))o=gs(i,a?"next":"previous");else{let p=pc(e);if(p===null)return null;if(q(p)){const g=n.getElementByKey(p.getKey());g===null&&te(214),[p,o]=co(p,g,n).resolveChildIndex(p,g,e,t),q(p)||te(215),a&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(q(v)&&(function(_,y,E){const S=_.getParent();return E===null||S===null||!S.canBeEmpty()||S!==E.getNode()})(v,0,r)){const _=a?v.getLastDescendant():v.getFirstDescendant();_===null?p=v:(v=_,p=q(v)?v:v.getParentOrThrow()),o=0}ie(v)?(i=v,p=null,o=gs(v,a?"next":"previous")):v!==p&&a&&!h&&(q(p)||te(216),o=Math.min(p.getChildrenSize(),o+1))}else{const g=Do(p),m=g!==null?g:p,v=m.getIndexWithinParent(),_=n.getElementByKey(p.getKey());let y="after";if(_!==null&&pc(e)===p){const E=co(p,_,n);E.element!==_?y=E.resolveLeafPosition(_,e,t):t===0&&at(p)&&(y="before")}o=y==="before"?v:v+1,p=m.getParentOrThrow()}if(q(p))return[ys(p.__key,o,"element"),s]}}else i=pc(e);return ie(i)?[ys(i.__key,gs(i,o,"clamp"),"text"),s]:null}function XC(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),s=i.getParent();if(t){if((r||!t)&&o===null&&q(s)&&s.isInline()){const a=s.getPreviousSibling();ie(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else q(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):ie(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(t&&q(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&q(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const a=s.getNextSibling();ie(a)&&e.set(a.__key,0,"text")}}}function dO(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);XC(e,n,i),XC(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function e1(e){const t=Yt(e.key);return t===null?null:jm(t)}function fO(e,t,r){const n=e1(e),i=e1(t);if(n===i||n!==null&&i!==null&&n.is(i))return!1;const o=r(n,i);if(n!==null)return q(n)?t.set(n.getKey(),o?n.getChildrenSize():0,"element"):t.set(n.getKey(),o?n.getTextContentSize():0,"text"),!0;const s=Do(i);if(s===null)return!1;const a=s.getParent();if(a===null)return!1;const l=s.getIndexWithinParent();return t.set(a.getKey(),o?l+1:l,"element"),!0}function hO(e){const t=fO(e.anchor,e.focus,(r,n)=>(function(i,o,s,a){if(s!==null&&a!==null){const d=Do(s),f=Do(a);if(d!==null&&d.is(f)){for(const h of qm(d).values()){if(h===s.getKey())return!0;if(h===a.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(s!==null){const d=Do(s),f=Yt(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=Do(a),u=Yt(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 pO(e,t,r,n,i,o){if(e===null||r===null||!Kh(i,e,r))return null;const s=YC(e,t,re(o)?o.anchor:null,i);if(s===null)return null;const a=YC(r,n,re(o)?o.focus:null,i);if(a===null)return null;const[l,u]=s,[d,f]=a;if(l.type==="element"&&d.type==="element"){const p=pc(e),g=pc(r);if(at(p)&&at(g))return null}const h=i._slotsUsed&&fO(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return dO(l,d),[l,d,u||f||h]}function Kc(e){return q(e)&&!e.isInline()}function gO(e,t,r,n,i,o){const s=ga(),a=new wu(ys(e,t,i),ys(r,n,o),0,"");return a.dirty=!0,s._selection=a,a}function hS(){const e=ys("root",0,"element"),t=ys("root",0,"element");return new wu(e,t,0,"")}function _g(){return new Mm(new Set)}function pS(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,s=o?o.type:void 0,a=s==="selectionchange",l=!zy&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,d,f,h;if(re(e)&&!l)return e.clone();{if(t===null)return null;const S=uo(t,r._rootElement);if(u=S.anchorNode,d=S.focusNode,f=S.anchorOffset,h=S.focusOffset,(a||s===void 0)&&re(e)&&!Kh(r,u,d))return e.clone()}const p=pO(u,f,d,h,r,e);if(p===null)return null;const[g,m,v]=p;let _=0,y="";if(re(e)){const S=e.anchor;if(g.key===S.key)_=e.format,y=e.style;else{const k=g.getNode();ie(k)?(_=k.getFormat(),y=k.getStyle()):q(k)&&(_=k.getTextFormat(),y=k.getTextStyle())}}const E=new wu(g,m,_,y);return v&&(E.dirty=!0),E}function pe(){return ga()._selection}function pd(){return $t()._editorState._selection}function jl(e,t,r,n=1){const i=e.anchor,o=e.focus,s=i.getNode(),a=o.getNode();if(!t.is(s)&&!t.is(a))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"),ZC(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 g=d.offset;(r<=g&&n>0||r<g&&n<0)&&d.set(l,Math.max(0,g+n),"element")}if(t.is(p)){const g=h.offset;(r<=g&&n>0||r<g&&n<0)&&h.set(l,Math.max(0,g+n),"element")}}ZC(e)}function ZC(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),s=n.getNode();if(e.isCollapsed()){if(!q(o))return;const a=o.getChildrenSize(),l=r>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(r);if(ie(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text"),n.set(u.__key,d,"text")}return}if(q(o)){const a=o.getChildrenSize(),l=r>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(r);if(ie(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(q(s)){const a=s.getChildrenSize(),l=i>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(i);if(ie(u)){let d=0;l&&(d=u.getTextContentSize()),n.set(u.__key,d,"text")}}}function bg(e,t,r,n,i){let o=null,s=0,a=null;n!==null?(o=n.__key,ie(n)?(s=n.getTextContentSize(),a="text"):q(n)&&(s=n.getChildrenSize(),a="element")):i!==null&&(o=i.__key,ie(i)?a="text":q(i)&&(a="element")),o!==null&&a!==null?e.set(o,s,a):(s=t.getIndexWithinParent(),s===-1&&(s=r.getChildrenSize()),e.set(r.__key,s,"element"))}function eR(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 yg(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function tR(e,t,r){const n=Gc(e,t.getKey());if(q(t)){const i=co(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function ZY(e,t,r,n,i,o){const s=o.getRootNode(),a=ku(s)||oa(s)?ch(s):null;if(i.has(tO)&&a!==o||a!==null&&xS(a,a))return;const l=uo(n,o);let u;if(!re(t))return void(e!==null&&Kh(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[g,m]=tR(r,h,d.offset),[v,_]=tR(r,p,f.offset),y=t.format,E=t.style,S=t.isCollapsed();let k=g,C=v,$=!1;if(d.type==="text"?(k=ie(h)?el(h,g,r):null,$=h.getFormat()!==y||h.getStyle()!==E):re(e)&&e.anchor.type==="text"&&($=!0),f.type==="text"&&(C=ie(p)?el(p,v,r):null),k!==null&&C!==null){if(S&&(e===null||$||re(e)&&(e.format!==y||e.style!==E))&&(function(A,N,O,P,I,U){A._inputState.collapsedSelectionFormat={format:N,key:I,offset:P,style:O,timeStamp:U}})(r,y,E,m,d.key,performance.now()),(n.type!=="Range"||!S)&&l.anchorOffset===m&&l.focusOffset===_&&l.anchorNode===k&&l.focusNode===C){if(a===null||!o.contains(a)){const A=a!==null?Tc(a):null;A!==null&&A!==r||i.has(Yy)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(yg(n,k,m,C,_),al&&t.isCollapsed()&&o!==null&&!i.has(Yy)){const A=i1(o);if(A===null||!o.contains(A)){const N=ch(o.ownerDocument),O=N!==null?Tc(N):null;O!==null&&O!==r||o.focus({preventScroll:!0})}}if(!i.has(BY)&&t.isCollapsed()&&o!==null&&o===i1(o)){const A=re(t)&&t.anchor.type==="element"?k.childNodes[m]||null:(u===void 0&&(u=kX(n,o)),u);if(A!==null){let N;if(mi(A)){const O=A.ownerDocument.createRange();O.selectNode(A),N=O.getBoundingClientRect()}else N=A.getBoundingClientRect();(function(O,P,I){const U=CS(I),B=RS(U);if(U===null||B===null)return;const V=I.getBoundingClientRect();if(P.bottom<V.top)return;let{top:W,bottom:Q}=P,K=0,G=0,ne=I;for(;ne!==null;){const se=ne===U.body;if(se){const Ae=B.visualViewport;if(Ae){const we=Ae.offsetTop;K=we,G=we+Ae.height}else K=0,G=vi(O).innerHeight;const $e=B.getComputedStyle(U.documentElement),ot=parseFloat($e.scrollPaddingTop),ye=parseFloat($e.scrollPaddingBottom);isFinite(ot)&&(K+=ot),isFinite(ye)&&(G-=ye)}else{const Ae=ne===I?V:ne.getBoundingClientRect();K=Ae.top,G=Ae.bottom}let be=0;if(W<K?be=-(K-W):Q>G&&(be=Q-G),be!==0)if(se)B.scrollBy(0,be);else{const Ae=ne.scrollTop;ne.scrollTop+=be;const $e=ne.scrollTop-Ae;W-=$e,Q-=$e}if(se)break;ne=Cu(ne)}})(r,N,o)}}(function(A){A._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function eX(e){let t=pe()||pd();t===null&&(t=qr().selectEnd()),t.insertNodes(e)}function mO(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 uh(e){const t=[];return mO(e,{linebreak:()=>t.push(zo()),tab:()=>t.push(hd()),text:r=>t.push(yr(r))}),t}function t1(e){const t=[];for(const r of e)Hn(r)||(!q(r)&&!at(r)||r.isInline()?t.push(r):q(r)&&t.push(...t1(r.getChildren())));return t}function Kd(e){let t=e;e.isCollapsed()||t.removeText();const r=pe();re(r)&&(t=r),re(t)||te(161);const n=t.anchor;let i=n.getNode(),o=n.offset;for(;!kn(i)&&An(i)===null;){const s=i;if([i,o]=tX(i,o),s.is(i))break}return o}function tX(e,t){const r=e.getParent();if(!r){const i=Ft();return qr().append(i),i.select(),[qr(),0]}if(ie(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(!q(e)||t===0)return[r,e.getIndexWithinParent()];const n=e.getChildAtIndex(t);if(n){const i=new wu(ys(e.__key,t,"element"),ys(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function rR(e){return Hn(e)||xX(e)||ie(e)||e.isParentRequired()}function __(e){const t=Ft();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(rR(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(Hn(i)&&(o===void 0||!rR(o)))continue}r.append(i)}else t.append(i),r=null}return t}function xg(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=ai(e.focus,r?"previous":"next"),s=n==="lineboundary",a=t==="move";let l=o,u=i==="decorators-and-blocks";if(!IS(l)){for(const d of l){u=!1;const{origin:f}=d;if(!at(f)||f.isIsolated()||(l=d,!s||!f.isInline()))break}if(u)for(const d of Vm(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(so(d))d.origin.isInline()||(l=d);else{if(q(d.origin))continue;at(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(a&&!s&&at(l.origin)&&l.origin.isKeyboardSelectable()){const d=_g();return d.add(l.origin.getKey()),vn(d),!0}return l=Ai(l),a&&vu(e.anchor,l),vu(e.focus,l),u||!s}let dn=null,Or=null,si=!1,b_=!1,M0=!1;const y_=new Set;let L0=0;const nR={characterData:!0,childList:!0,subtree:!0};function Hc(){return si||dn!==null&&dn._readOnly}function an(){si&&te(13)}function vO(){L0>99&&te(14)}function ga(){return dn===null&&te(195,_O()),dn}function rX(e){ga()!==null&&Or===null&&(Or=e),Or!==e&&rP(378)}function $t(){return Or===null&&te(337,_O()),Or}function nX(){$t()._dirtyType=2}function _O(){let e=0;const t=new Set,r=Wc.version;if(typeof window<"u")for(const i of LO(document)){const o=Hh(i);if(zm(o))e++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===r&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}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 bO(){return Or}function iR(e,t,r){const n=t.__type,i=CO(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const s=o.length;for(let a=0;a<s&&(o[a](t),t.isAttached());a++);}function oR(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function yO(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 iX(e){return Sg(e,$t()._nodes)}function Sg(e,t){const r=e.type,n=t.get(r);n===void 0&&te(17,r);const i=n.klass;e.type!==i.getType()&&te(18,i.name);const o=i.importJSON(e),s=e.children;if(q(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const u=Sg(s[l],t);o.append(u)}const a=e.$slots;if(a){Ys(o)||te(379,i.name);for(const l in a)GO(o,l,Sg(a[l],t))}return o}function sR(e,t,r){const n=dn,i=si,o=Or;dn=t,si=!0,Or=e;try{return r()}finally{dn=n,si=i,Or=o}}function Va(e,t){const r=M0;M0=!0;try{(function(n,i){const o=n._pendingEditorState,s=n._rootElement,a=n._headless||s===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&aR(n,n._deferred));const l=n._editorState,u=l._selection,d=o._selection,f=n._dirtyType!==0,h=dn,p=si,g=Or,m=n._updating,v=n._observer;let _=null;if(n._pendingEditorState=null,n._editorState=o,!a&&f&&v!==null){Or=n,dn=o,si=!1,n._updating=!0;try{const A=n._dirtyType,N=n._dirtyElements,O=n._dirtyLeaves;v.disconnect(),_=yY(l,o,n,A,N,O)}catch(A){if(A instanceof Error&&n._onError(A),b_)throw A;return kO(n,null,s,o),fP(n),n._dirtyType=2,b_=!0,Va(n,l),void(b_=!1)}finally{v.observe(s,nR),n._updating=m,dn=h,si=p,Or=g}}o._readOnly||(o._readOnly=!0);const y=n._dirtyLeaves,E=n._dirtyElements,S=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 O=A._decorators;let P=A._pendingDecorators||O;const I=N._nodeMap;let U;for(U in P)I.has(U)||(P===O&&(P=NO(A)),delete P[U])})(n,o);const C=a?null:Gn(vi(n));if(n._editable&&C!==null&&(f||d===null||d.dirty||!d.is(u))&&s!==null&&!k.has(jY)){Or=n,dn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const A=n._blockCursorElement;A!==null&&Cg(A,n,s),ZY(u,d,n,C,k,s)}(function(A,N,O){let P=A._blockCursorElement;if(re(O)&&O.isCollapsed()&&O.anchor.type==="element"&&N.contains(i1(N))){const I=O.anchor,U=I.getNode(),B=I.offset;let V=!1,W=null;if(B===U.getChildrenSize())z0(U.getChildAtIndex(B-1))&&(V=!0);else{const Q=U.getChildAtIndex(B);if(Q!==null&&z0(Q)){const K=Q.getPreviousSibling();(K===null||z0(K))&&(V=!0,W=A.getElementByKey(Q.__key))}}if(V){const Q=co(U,A.getElementByKey(U.__key),A).element;return P===null&&(A._blockCursorElement=P=(function(K){const G=K.theme,ne=Xt().createElement("div");ne.contentEditable="false",ne.setAttribute("data-lexical-cursor","true");let se=G.blockCursor;if(se!==void 0){if(typeof se=="string"){const be=Xs(se);se=G.blockCursor=be}se!==void 0&&ne.classList.add(...se)}return ne})(A._config)),N.style.caretColor="transparent",void(W===null?Q.appendChild(P):Q.insertBefore(P,W))}}P!==null&&Cg(P,A,N)})(n,s,d)}finally{v!==null&&v.observe(s,nR),Or=g,dn=h}}_!==null&&(function(A,N,O,P,I){const U=Array.from(A._listeners.mutation),B=U.length;for(let V=0;V<B;V++){const[W,Q]=U[V];for(const K of Q){const G=N.get(K);G!==void 0&&W(G,{dirtyLeaves:P,prevEditorState:I,updateTags:O})}}})(n,_,k,y,l),re(d)||d===null||u!==null&&u.is(d)||n.dispatchCommand(wP,void 0);const $=n._pendingDecorators;$!==null&&(n._decorators=$,n._pendingDecorators=null,Cf("decorator",n,!0,$)),(function(A,N,O){const P=cR(N),I=cR(O);P!==I&&Cf("textcontent",A,!0,I)})(n,i||l,o),Cf("update",n,!0,{dirtyElements:E,dirtyLeaves:y,editorState:o,mutatedNodes:_,normalizedNodes:S,prevEditorState:i||l,tags:k}),!m&&aR(n,n._deferred),(function(A){const N=A._updates;if(N.length===0)return void(A._cascadeCount=0);if((function(P){y_.has(P)||(y_.add(P),setTimeout(()=>{y_.delete(P),P._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 O=N.shift();if(O){const[P,I]=O;Lm(A,P,I)}})(n)})(e,t)}finally{M0=r}}function Cf(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],s=Array.from(o);for(const[a,l]of s){l&&l();const u=a(...n);o.has(a)?o.set(a,u):u&&u()}}finally{t._updating=i}}function xO(e,t,r,n){const i=SS(e);let o;if(!M0)for(let s=0;s<i.length;s++)i[s]._updating||(i[s]._cascadeCount=0);for(let s=4;s>=0;s--)for(let a=0;a<i.length;a++){const l=i[a];if(a>0&&l._updating){o=l;break}const u=l._commands.get(t);if(u!==void 0){const d=u[s];if(d.size>0){let f=!1;if(no(l,()=>{for(const h of d)if(h(r,n))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{xO(o,t,r,n)}),!1}function aR(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 lR(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,s]=i,a=e._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(n=!0),s.discrete&&(a===null&&te(191),a._flushSync=!0),l&&e._deferred.push(l),yO(e,s.tag)),a==null?Lm(e,o,s):o()}}return n}function Lm(e,t,r){const n=e._updateTags;let i,o=!1,s=!1;r!==void 0&&(i=r.onUpdate,yO(e,r.tag),o=r.skipTransforms||!1,s=r.discrete||!1),i&&e._deferred.push(i);const a=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=SO(l||a),u=!0),l._flushSync=s;const d=dn,f=si,h=Or,p=e._updating;dn=l,si=!1,e._updating=!0,Or=e;const g=e._headless||e.getRootElement()===null;bS(null);try{u&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(y,E){const S=y.getEditorState()._selection,k=Gn(vi(y));return re(S)||S==null?pS(S,k,y,E):S.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=lR(e,o),(function(y,E){const S=E.getEditorState()._selection,k=y._selection;if(re(k)){const C=k.anchor,$=k.focus;let A;if(C.type==="text"&&(A=C.getNode(),A.selectionTransform(S,k)),$.type==="text"){const N=$.getNode();A!==N&&N.selectionTransform(S,k)}}})(l,e),e._dirtyType!==0&&(o?(function(y,E){const S=E._dirtyLeaves,k=y._nodeMap;for(const C of S){const $=k.get(C);ie($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&AC($)}})(l,e):(function(y,E){const S=E._dirtyLeaves,k=E._dirtyElements,C=y._nodeMap,$=Js(),A=new Map;let N=S,O=N.size,P=k,I=P.size;for(;O>0||I>0;){if(O>0){E._dirtyLeaves=new Set;for(const U of N){const B=C.get(U);ie(B)&&B.isAttached()&&B.isSimpleText()&&!B.isUnmergeable()&&AC(B),B!==void 0&&oR(B,$)&&iR(E,B,A),S.add(U)}if(N=E._dirtyLeaves,O=N.size,O>0){L0++;continue}}E._dirtyLeaves=new Set,E._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const U of P){const B=U[0],V=U[1];if(k.set(B,V),!V)continue;const W=C.get(B);W!==void 0&&oR(W,$)&&iR(E,W,A)}N=E._dirtyLeaves,O=N.size,P=E._dirtyElements,I=P.size,L0++}E._dirtyLeaves=S,E._dirtyElements=k})(l,e),lR(e),(function(y,E,S,k){const C=y._nodeMap,$=E._nodeMap,A=[];for(const[P]of k){const I=$.get(P);I!==void 0&&(I.isAttached()||(q(I)&&dg(I,P,C,$,A,k),C.has(P)||k.delete(P),A.push(P)))}for(const P of S){const I=$.get(P);I===void 0||I.isAttached()||(Ys(I)&&I.__slots!==null&&dg(I,P,C,$,A,S),C.has(P)||S.delete(P),A.push(P))}for(const P of A)$.delete(P);const N=$t(),O=N._compositionKey;O===null||$.has(O)||(N._compositionKey=null)})(a,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const _=l._selection;if(re(_)){e._slotsUsed&&hO(_);const y=l._nodeMap,E=_.anchor.key,S=_.focus.key;y.get(E)!==void 0&&y.get(S)!==void 0||te(19)}else Gt(_)&&_._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Va(e)}finally{dn=d,si=f,Or=h,e._updating=p,L0=0}e._dirtyType!==0||e._deferred.length>0||(function(v,_){const y=_.getEditorState()._selection,E=v._selection;if(E!==null){if(E.dirty||!E.is(y))return!0}else if(y!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,Va(e)):u&&gX(()=>{Va(e)}):(l._flushSync=!1,u&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function no(e,t,r){Or===e&&r===void 0?t():Lm(e,t,r)}function oX(e){if(rr(e)){let t=null;for(const r of e.getChildren())t=r.isInline()?(t||r.replace(r.createParentElementNode())).append(r):null}}class fi extends Di{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:oX,extends:Di})}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&&te(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 oY[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&&io(this).length===0}isDirty(){const t=$t()._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 io(this)){const i=pu(this,n);q(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(ie(r)&&t.push(r),q(r)){const n=r.getAllTextNodes();t.push(...n)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;q(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;q(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 q(o)&&o.getLastDescendant()||o||null}const i=r[t];return q(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:Yt(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&te(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:Yt(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&te(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=WO(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContent(),q(o)&&i!==n-1&&!o.isInline()&&(t+=Kl)}return t}getTextContentSize(){let t=(function(i){let o=0;for(const s of io(i)){const a=pu(i,s);a!==null&&(o+=a.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(),q(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=cg[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=ia[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return cu(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){an();const n=pe();let i=t,o=r;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(ie(l)||q(l))return l.select(0,0)}else if(!(t!==void 0&&t!==s||r!==void 0&&r!==s)){const l=this.getLastChild();if(ie(l)||q(l))return l.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const a=this.__key;return re(n)?(n.anchor.set(a,i,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):gO(a,i,a,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!==""&&cg[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){gg(this)&&te(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();t+r<=i||te(226,String(t),String(r),String(i));for(const p of n);const s=o.__key,a=[],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 g=0;g<r;g++){p===null&&te(100);const m=p.getNextSibling(),v=p.__key;Gs(p.getWritable()),l.push(v),p=m}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===s&&f--,Gs(g);const m=p.__key;if(h===null)o.__first=m,g.__prev=null;else{const v=h.getWritable();v.__next=m,g.__prev=v.__key}p.__key===s&&te(76),g.__parent=s,a.push(m),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 g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=pe();if(re(p)){const g=new Set(l),m=new Set(a),{anchor:v,focus:_}=p;uR(v,g,m)&&bg(v,v.getNode(),this,d,u),uR(_,g,m)&&bg(_,_.getNode(),this,d,u),f!==0||this.canBeEmpty()||rr(this)||this.remove()}}return o}getDOMSlot(t){return new Ec(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(Xe(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===""||rr(this)||this.getChildren().some(ie)||(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=co(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=r.getElementByKey(o.getKey());s!==null&&(i==null?(n.insertChild(s),i=s):i!==s&&n.replaceChild(s,i),i=i.nextSibling)}}}function q(e){return e instanceof fi}function uR(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 gS extends Di{__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&&te(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 at(e){return e instanceof gS}class gd extends fi{__cachedText;static getType(){return"root"}static clone(){return new gd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){te(51)}getTextContent(){const t=this.__cachedText;return t===null||!Hc()&&$t()._dirtyType!==0?super.getTextContent():t}remove(){te(52)}replace(t){te(53)}insertBefore(t){te(54)}insertAfter(t){te(55)}updateDOM(t,r){return!1}splice(t,r,n){for(const i of n)q(i)||at(i)||te(282);return super.splice(t,r,n)}static importJSON(t){return qr().updateFromJSON(t)}collapseAtStart(){return!0}}function xr(e){return e instanceof gd}function SO(e){return new Vh(lP(e._nodeMap),null,e._slotsUsed)}function mS(){return new Vh(new Map([["root",new gd]]),null,!1)}function r1(e){const t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&te(130,r.name),q(e)){const i=t.children;Array.isArray(i)||te(59,r.name);const o=e.getChildren();for(let s=0;s<o.length;s++){const a=r1(o[s]);i.push(a)}}const n=io(e);if(n.length>0){const i={};for(const o of n){const s=pu(e,o);s===null&&te(366,r.name,o),i[o]=r1(s)}t.$slots=i}return t}function sX(e){return e instanceof Vh}class Vh{_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 sR(r&&r.editor||null,this,t)}clone(t){const r=new Vh(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return sR(null,this,()=>({root:r1(qr())}))}}class vS extends fi{static getType(){return"artificial"}createDOM(t){return Xt().createElement("div")}}class md extends Di{static getType(){return"linebreak"}static clone(t){return new md(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
27
|
+
`}createDOM(){return Xt().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>EO(t)||wO(t)?null:{conversion:aX,priority:0}}}static importJSON(t){return zo().updateFromJSON(t)}}function aX(e){return{node:zo()}}function zo(){return Ho(new md)}function Hn(e){return e instanceof md}function EO(e){const t=e.parentElement;if(t!==null&&Qc(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&Eg(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&Eg(n))return!0}}return!1}function wO(e){const t=e.parentElement;if(t!==null&&Qc(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&Eg(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&Eg(n))return!0}return!1}function Eg(e){return mi(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class vd extends fi{static getType(){return"paragraph"}static clone(t){return new vd(t.__key)}createDOM(t){const r=Xt().createElement("p"),n=$c(t.theme,"paragraph");return n!==void 0&&r.classList.add(...n),r}updateDOM(t,r,n){return!1}static importDOM(){return{p:t=>({conversion:lX,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(Xe(r)){this.isEmpty()&&r.append(Xt().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return Ft().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(ie);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=Ft();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||ie(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 lX(e){const t=Ft();if(Rs(t,e),Ru(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in cg&&t.setFormat(r)}return vo(t,e),{node:t}}function Ft(){return Ho(new vd)}function _d(e){return e instanceof vd}function uX(e){console.warn(e)}const st=0,sc=1,cX=4,dX=-8;function kO(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=mS(),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 s=e._observer;s!==null&&(s.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(a,l){const u=`__lexicalKey_${l._key}`;delete a[u]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),$O(r,e,"root"))}function fX(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of TS(e)){const o=n.transform;if(!r.has(o)){r.add(o);const s=n.transform();s&&t.add(s)}if(i){const s=i.$transform;s&&t.add(s)}}return t}const wg={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=yS(t,e.getType());return r&&r.exportDOM!==void 0?r.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,r,n,i)=>q(e)&&e.extractWithChild(t,r,n),$getDOMSlot:(e,t,r)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,r,n)=>null,$shouldExclude:(e,t,r)=>q(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,r)=>!t||e.isSelected(t),$updateDOM:(e,t,r,n)=>e.updateDOM(t,r,n._config)};function _S(e){const t=e||{},r=bO(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,s=mS(),a=t.namespace||(i!==null?i._config.namespace:FO()),l=t.editorState,u=[gd,pa,md,fd,vd,vS,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let g;if(e===void 0&&r!==null)g=r._nodes;else{g=new Map;for(let v=0;v<u.length;v++){let _=u[v],y=null,E=null;if(_&&typeof _=="object"){const C=_;_=C.replace,y=C.with,E=C.withKlass||null}if(typeof _!="function"||!_.prototype||!(_===Di||_.prototype instanceof Di)){let C="<unknown>";try{C=JSON.parse(aP)}catch{}te(365,String(v-u.length+(t.nodes?t.nodes.length:0)),typeof _=="function"?`${_.name}${typeof _.getType=="function"?` (type ${String(_.getType())})`:""}`:String(_),String(C))}AS(_);const S=_.getType(),k=fX(_);g.set(S,{exportDOM:h&&h.export?h.export.get(_):void 0,klass:_,replace:y,replaceWithKlass:E,sharedNodeState:pY(u[v]),transforms:k})}}const m=new Wc(s,i,g,{disableEvents:o,dom:{...wg,...e&&e.dom},namespace:a,theme:n},d||console.error,f||uX,(function(v,_){const y=new Map,E=new Set,S=k=>{Object.keys(k).forEach(C=>{let $=y.get(C);$===void 0&&($=[],y.set(C,$)),$.push(k[C])})};return v.forEach(k=>{const C=k.klass.importDOM;if(C==null||E.has(C))return;E.add(C);const $=C.call(k.klass);$!==null&&S($)}),_&&S(_),y})(g,h?h.import:void 0),p,e);return l!==void 0&&(m._pendingEditorState=l,m._dirtyType=2),(function(v){v.registerCommand(CP,PY,st),v.registerCommand(RP,OY,st),v.registerCommand(AP,MY,st),v.registerCommand(TP,LY,st),v.registerCommand($P,zY,st)})(m),m}function hX(e,t){const r=e.get(t);e.delete(t),r&&r()}function Hd(e,t,r){return e.set(t,r),hX.bind(null,e,t)}class Wc{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,s,a,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 Ly,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=FO(),this._onError=o,this._onWarn=s,this._htmlConversions=a,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 Hd(this._listeners.update,t)}registerEditableListener(t){return Hd(this._listeners.editable,t)}registerDecoratorListener(t){return Hd(this._listeners.decorator,t)}registerTextContentListener(t){return Hd(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return dl(Hd(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const s=n.get(i);s&&s(),n.set(i,i(...o)||void 0)})(r,t,[null,this._rootElement]))}registerCommand(t,r,n){n===void 0&&te(35);const i=this._commands;i.has(t)||i.set(t,[new Vd,new Vd,new Vd,new Vd,new Vd]);const o=i.get(t);o===void 0&&te(36,String(t));const s=(function(l){return 7&l})(n),a=o[s];return s!==n?a.addFront(r):a.addBack(r),()=>{a.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 s=o.get(r);s===void 0&&(s=new Set,o.set(r,s)),s.add(i);const a=n&&n.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(r,i),()=>{s.delete(i),s.size===0&&o.delete(r)}}getRegisteredNode(t){const r=this._nodes.get(t.getType());return r===void 0&&te(37,t.name),r}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,r){const n=this._editorState,i=mR(n).get(r.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"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 s=this.registerNodeTransformToKlass(o,r);i.push(s)}return(function(s,a){const l=mR(s.getEditorState()),u=[];for(const d of a){const f=l.get(d);f&&u.push(f)}u.length!==0&&s.update(()=>{for(const d of u)for(const f of d.keys()){const h=Yt(f);h&&h.markDirty()}},s._pendingEditorState===null?{tag:kf}:void 0)})(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return Se(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=$c(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,kO(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||UY(r),n!=null&&r.classList.remove(...n)),t!==null){const o=RS(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,fP(this),this._updateTags.add(kf),Va(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument;Jy.set(a,u);let d=hg.get(u);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},hg.set(u,d)),d.editors.add(l),d.hasShadowEditor=void 0,a.__lexicalEditor=l;const f=JP(a);f.push(IY.register(u));for(let h=0;h<Gy.length;h++){const[p,g]=Gy[h],m=typeof g=="function"?v=>{jC(v)||(BC(v),(l.isEditable()||p==="click")&&g(v,l))}:v=>{if(jC(v))return;BC(v);const _=l.isEditable();switch(p){case"cut":return _&&Se(l,dS,v);case"copy":return Se(l,Om,v);case"paste":return _&&Se(l,uS,v);case"dragstart":return _&&Se(l,jP,v);case"dragover":return _&&Se(l,qP,v);case"dragend":return _&&Se(l,CY,v);case"focus":return _&&Se(l,TY,v);case"blur":return _&&Se(l,$Y,v);case"drop":return _&&Se(l,BP,v)}};f.push(FY(a,p,m))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(kf),Va(this);Cf("root",this,!1,t,r)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,r){t.isEmpty()&&te(38);let n=t;n._readOnly&&(n=SO(t),n._selection=t._selection?t._selection.clone():null),dP(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),Va(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||t._slotsUsed,no(this,()=>{if(o&&this._updateTags.add(o),t._parsed)for(const[s,a]of n._nodeMap.entries())q(a)?this._dirtyElements.set(s,!0):this._dirtyLeaves.add(s)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const s=mS(),a=dn,l=si,u=Or,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,dn=s,si=!1,Or=i,bS(null);try{const g=i._nodes;Sg(n.root,g),o&&o(),s._readOnly=!0,s._parsed=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,dn=a,si=l,Or=u}return s})(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"&&Va(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]):Lm(n,i,o)})(this,t,r)}focus(t,r={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),no(this,()=>{const i=pe(),o=qr();i!==null?i.dirty||vn(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),fu("focus"),yX(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const r=Gn(this._window);r!==null&&r.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Cf("editable",this,!0,t),this._slotsUsed&&this.update(()=>nX()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Wc.version=aP;let n1=null;function bS(e){n1=e}let pX=1;function CO(e,t){const r=yS(e,t);return r===void 0&&te(30,t),r}function yS(e,t){return e._nodes.get(t)}const gX=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function xS(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return ku(o)||oa(o)?ch(o):null})();if(!Xe(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=du(r),i=r.nodeName;return YP(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&Hh(r)==null)}function Kh(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 Tc(t)===e&&e.read("latest",()=>!xS(t))}function zm(e){return e instanceof Wc}function Tc(e){let t=e;for(;t!=null;){const r=Hh(t);if(zm(r))return r;t=Cu(t)}return null}function Hh(e){return e?e.__lexicalEditor:null}function Jl(e){return uu(e)||e.isToken()}function Ri(e){return Jl(e)||e.isSegmented()}function mi(e){return yd(e)&&e.nodeType===3}function ku(e){return yd(e)&&e.nodeType===9}function mX(e){let t=e;for(;t!=null;){if(mi(t))return t;t=t.firstChild}return null}function cu(e,t,r){const n=ia[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 RO(e){return ie(e)||Hn(e)||at(e)}function AO(e,t){const r=(function(){const s=n1;return n1=null,s})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);an(),vO();const n=$t(),i=ga(),o=""+pX++;i._nodeMap.set(o,e),q(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType===0&&(n._dirtyType=1),e.__key=o}function Gs(e){An(e)!==null&&te(380,e.__key,String(An(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),s=o!==null?o.__key:null,a=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(n.__first=s),o===null&&(n.__last=a),l!==null&&(l.__next=s),u!==null&&(u.__prev=a),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function kg(e){vO(),gg(e)&&te(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:hu(t)?t.__slotHost:null,n=ga(),i=$t(),o=n._nodeMap,s=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:hu(h)?h.__slotHost:null}})(r,o,s);const a=t.__key;i._dirtyType===0&&(i._dirtyType=1),q(e)?s.set(a,!0):i._dirtyLeaves.add(a)}function ln(e){an();const t=$t(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=Yt(r);n!==null&&n.getWritable()}if(e!==null){const n=Yt(e);n!==null&&n.getWritable()}}}function Js(){return Hc()?null:$t()._compositionKey}function Yt(e,t){const r=(t||ga())._nodeMap.get(e);return r===void 0?null:r}function TO(e,t){const r=bd(e,$t());return r!==void 0?Yt(r,t):null}function $O(e,t,r){e[`__lexicalKey_${t._key}`]=r}function bd(e,t){return e[`__lexicalKey_${t._key}`]}function du(e,t){let r=e;for(;r!=null;){const n=TO(r,t);if(n!==null)return n;r=Cu(r)}return null}function NO(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function cR(e){return e.read(()=>qr().getTextContent())}function qr(){return ga()._nodeMap.get("root")}function vn(e){an();const t=ga();e!==null&&(e.dirty=!0,e.setCachedNodes(null),re(e)&&$t()._slotsUsed&&hO(e)),t._selection=e}function dR(){an(),dP($t())}function pc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=bd(i,n);if(o!==void 0)return o;i=Cu(i)}return null})(e,$t());return t===null?null:Yt(t)}function DO(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function SS(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function FO(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function IO(e){return mi(e)?e.nodeValue:null}function ES(e,t,r){const n=Gn(vi(t));if(n===null)return;const i=uo(n,t._rootElement),o=i.anchorNode;let{anchorOffset:s,focusOffset:a}=i;if(o!==null){let l=IO(o);const u=du(o);if(l!==null&&ie(u)){if((l===Xf||l===aS)&&r){const d=r.length;l=r,s=d,a=d}l!==null&&wS(u,l,s,a,e)}}}function wS(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();if(o.isToken()&&s)return;let a=t;if((s||i)&&(t.endsWith(Xf)&&(a=t.slice(0,-Xf.length)),i)){const u=aS;let d;for(;(d=a.indexOf(u))!==-1;)a=a.slice(0,d)+a.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||a!==l){const u=pe();if(a===""){if(ln(null),Uh||ll||Bh)o.remove();else{const m=$t();x_(o,"",u),setTimeout(()=>{m.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=pd(),h=o.getTextContentSize(),p=Js(),g=o.getKey();if(o.isToken()&&!s||p!==null&&g===p&&!s||re(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!s||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!s))return void o.markDirty();if(!re(u)||r===null||n===null)return void x_(o,a,u);if(u.setTextNodeRange(o,r,o,n),o.isSegmented()){const m=yr(o.getTextContent());o.replace(m),o=m}x_(o,a,u)}}}function x_(e,t,r){if(e.setTextContent(t),re(r)){const n=e.getKey();let i=!1;for(const o of["anchor","focus"]){const s=r[o];s.type==="text"&&s.key===n&&(s.offset=gs(e,s.offset,"clamp"),i=!0)}i&&(r._cachedNodes=null,r._cachedIsBackward=null)}}function Dp(e,t,r){const n=t[r]||!1;return n==="any"||n===e[r]}function vX(e,t){return Dp(e,t,"altKey")&&Dp(e,t,"ctrlKey")&&Dp(e,t,"shiftKey")&&Dp(e,t,"metaKey")}function Bt(e,t,r){if(!vX(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 Os={ctrlKey:!ko,metaKey:ko},fR={altKey:ko,ctrlKey:!ko};function hR(e){return e.key==="Backspace"}function _X(e){const t=qr();if(re(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(xr(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),qa(e),e;const o=i.getTopLevelElementOrThrow(),s=o.getParent();if(s===null)return q(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),qa(e)),e;const a=s;return r.set(a.getKey(),0,"element"),n.set(a.getKey(),a.getChildrenSize(),"element"),qa(e),e}{const r=t.select(0,t.getChildrenSize());return vn(qa(r)),r}}function $c(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=Xs(i);return r[t]=o,o}return i}function kS(e,t,r,n,i){if(r.size===0)return;const o=n.__type,s=n.__key,a=t.get(o);a===void 0&&te(33,o);const l=a.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const d=u.get(s),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(s,f?"updated":i)}function pR(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 bX(e,t){const r=e.offset;if(e.type==="element")return pR(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?pR(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function PO(e){const t=vi(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function Se(e,t,r){return xO(e,t,r,e)}function Gc(e,t){const r=e._keyToDOMMap.get(t);return r===void 0&&te(75,t),r}function Cu(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const r=e.parentNode;return oa(r)?r.host:null}function CS(e){return ku(e)?e:Xe(e)?e.ownerDocument:null}function fu(e){an(),$t()._updateTags.add(e)}function yX(e){an(),$t()._deferred.push(e)}function Jc(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function RS(e){const t=CS(e);return t?t.defaultView:null}function vi(e){const t=e._window;return t===null&&te(78),t}function xX(e){return q(e)&&e.isInline()||at(e)&&e.isInline()}function OO(e){let t=e.getLatest();for(;t!==null;){if(An(t)!==null&&q(t))return t;const r=t.getParentOrThrow();if(rr(r))return r;t=r}return t}function Nc(e){return q(e)&&e.isShadowRoot()}function rr(e){return xr(e)||Nc(e)}function Mn(e,t=!1){const r=e.constructor.clone(e);return AO(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function Ho(e){const t=$t(),r=e.getType(),n=yS(t,r);n===void 0&&te(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const s=i(e),a=s.constructor;return o!==null?s instanceof o||te(201,o.name,o.getType(),a.name,a.getType(),e.constructor.name,r):s instanceof e.constructor&&a!==e.constructor||te(202,a.name,a.getType(),e.constructor.name,r),s.__key===e.__key&&te(203,e.constructor.name,r,a.name,a.getType()),s}return e}function S_(e,t){!xr(e.getParent())||q(t)||at(t)||te(99)}function SX(e){const t=Yt(e);return t===null&&te(63,e),t}function z0(e){if(!e||e.isInline())return!1;if(at(e))return!0;if(q(e)){if(e.isShadowRoot()){const t=e.getParent();return!(q(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function Cg(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function Gn(e){return Ko?(e||window).getSelection():null}function EX(e){const t=RS(e);return t?t.getSelection():null}function oa(e){return o1(e)&&"host"in e}const wX=[];function MO(e){const t=e.getRootNode();if(t===e||!oa(t))return wX;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!oa(i))break;r.push(i),n=i.host}return r}function*LO(e){const t=[e];let r;for(;r=t.pop();){yield*r.querySelectorAll('[data-lexical-editor="true"]');const n=(ku(r)?r:r.ownerDocument).createTreeWalker(r,NodeFilter.SHOW_ELEMENT);let i;for(;i=n.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}function zO(e){return e!==null?e.ownerDocument:document}function Xt(){const e=bO();return zO(e!==null?e._rootElement:null)}function Um(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=MO(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 kX(e,t){const r=Um(e,t);if(r!==null){const n=CX(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function uo(e,t){const r=Um(e,t);return r===null?e:RX(r,AX(e))}function CX(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 RX(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 AX(e){return e.direction}function i1(e){const t=e.getRootNode();return ku(t)||oa(t)?t.activeElement:null}function ch(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 UO(e){const t=e.target;if(t!==null&&Xe(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function BO(e){return Xe(e)&&e.tagName==="A"}function Xe(e){return yd(e)&&e.nodeType===1}function yd(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function o1(e){return yd(e)&&e.nodeType===11}const TX=/^(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 Rg(e){return!(!Xe(e)||!e.style.display.startsWith("inline"))||TX.test(e.nodeName)}const $X=/^(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 Qc(e){return(!Xe(e)||!e.style.display.startsWith("inline"))&&$X.test(e.nodeName)}function kn(e){if(at(e)&&!e.isInline())return!0;if(!q(e)||rr(e))return!1;const t=e.getFirstChild(),r=t===null||Hn(t)||ie(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function vr(){return $t()}function Bm(e=vr()){return e._config.dom||wg}function co(e,t,r=vr()){const n=Bm(r).$getDOMSlot(e,t,r);return q(e)&&(NX(n)||te(344,e.getKey(),e.getType())),n}function NX(e){return e instanceof Ec}function el(e,t,r=vr()){return mX(co(e,t,r).element)}const gR=new WeakMap,DX=new Map;function mR(e){if(!e._readOnly&&e.isEmpty())return DX;e._readOnly||te(192);let t=gR.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const s=o.__type;let a=n.get(s);a||(a=new Map,n.set(s,a)),a.set(i,o)}return n})(e),gR.set(e,t)),t}function jO(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function FX(e){return(t=jO(e))[QP]=!0,t;var t}function Ru(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 vo(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function Rs(e,t){const r=t.style.textAlign;return r&&r in cg?e.setFormat(r):e}function IX(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function qO(e){return e.__lexicalUnmanaged===!0}function PX(e,t=vr()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function Ag(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(Xe(r)&&r.hasAttribute("data-lexical-slot")||bd(r,t)!==void 0)return!1;r=Cu(r)}return!1}function Wd(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==Di[t]}const vR=new WeakMap;function AS(e){const t=vR.get(e);if(t)return t;const r=e.prototype!=null&&mC in e.prototype?e.prototype[mC]():void 0,n=(function(l){if(!(l===Di||l.prototype instanceof Di)){let u="<unknown>",d="<unknown>";try{u=l.getType()}catch{}try{Wc.version&&(d=JSON.parse(Wc.version))}catch{}te(290,l.name,u,d)}return l===gS||l===fi||l===Di})(e),i=!n&&Wd(e,"getType")?e.getType():void 0;let o,s=i;if(r)if(i)o=r[i];else{for(const[l,u]of Object.entries(r))s=l,o=u;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const u=r[l];if(u){o=u;break}}}if(!n&&s&&(Wd(e,"getType")||(e.getType=()=>s),Wd(e,"clone")||(e.clone=l=>(bS(l),new e)),Wd(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!Wd(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const a={klass:e,ownNodeConfig:o,ownNodeType:s};return vR.set(e,a),a}function*TS(e){for(let t=e;t&&(t===Di||YP(t.prototype));){const r=AS(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||KO(t)}}function VO(e){const t=vr();return an(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const Kt=(e,t)=>{let r=e;for(;r!=null&&!xr(r);){if(t(r))return r;r=r.getParent()}return null};function Tg(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?Yt(n):t.get(n);i==null&&te(174),r.push(n),n=i.__next}return r}function KO(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 HO=new Map;function Ys(e){return q(e)||at(e)}function hu(e){return q(e)||at(e)}function An(e){const t=e.getLatest();return hu(t)?t.__slotHost:null}function Do(e){const t=An(e);if(t===null)return null;const r=Yt(t);return q(r)||at(r)||te(370),r}function OX(e){const t=Do(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of qm(t))if(i===r)return n;return null}function jm(e){let t=e.getLatest();for(;t!==null;){if(An(t)!==null)return t;t=t.getParent()}return null}function qm(e){const t=e.getLatest();return Ys(t)&&t.__slots!==null?t.__slots:HO}function io(e){return Array.from(qm(e).keys())}function pu(e,t){const r=qm(e).get(t);return r===void 0?null:Yt(r)}const MX=["__proto__","constructor","prototype"],_R=Symbol("slotMapOwner");function s1(e){let t=e.__slots;return t!==null&&t[_R]===e||(t=new Map(t),t[_R]=e,e.__slots=t),t}const bR=new WeakMap,LX=[];function zX(e){for(const{ownNodeConfig:t}of TS(e)){const r=t&&t.slots;if(r)return r}return LX}function WO(e){let t="";for(const r of io(e)){const n=pu(e,r);n!==null&&(t+=n.getTextContent())}return t}function yR(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 UX(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(s){let a=bR.get(s);if(a===void 0){const l=zX(s),u=new Map;for(const d of l)MX.includes(d)&&te(371,s.name,d),u.has(d)&&te(372,s.name,d),u.set(d,u.size);a=u,bR.set(s,a)}return a})(e.constructor);let n=null,i=!0;for(const s of t.keys()){if(n!==null&&yR(n,s,r)>0){i=!1;break}n=s}if(i)return;const o=Array.from(t).sort(([s],[a])=>yR(s,a,r));t.clear();for(const[s,a]of o)t.set(s,a)}function GO(e,t,r){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||te(373,t);const n=e.getLatest();if(n.__slots!==null&&n.__slots.get(t)===r.getLatest().__key)return n;(!q(r)&&!at(r)||r.isInline())&&te(374,r.__key);const i=e.getWritable(),o=s1(i),s=o.get(t);s!==void 0&&JO(s);const a=r.getWritable(),l=Do(a);if(l!==null){const u=OX(a);u!==null&&s1(l.getWritable()).delete(u),a.__slotHost=null}return Gs(a),a.__slotHost=i.__key,o.set(t,a.__key),UX(i),(function(){const u=vr();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}function BX(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(JO(n),s1(r).delete(t)),r}function JO(e){const t=Yt(e);if(t===null)return;const r=t.getWritable();hu(r)||te(377,e),r.__slotHost=null,r.remove()}const jX={next:"previous",previous:"next"};class $S{origin;constructor(t){this.origin=t}[Symbol.iterator](){return QO({hasNext:ul,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Tt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Tt(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 s=this.getParentAtCaret(),a=new Map;for(let l=o.getAdjacentCaret();l!==null&&a.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of i){if(a.size>0){const u=o.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(s)&&l.remove(),u.replace(l)}}else u===null&&te(263,Array.from(a).join(" "))}else o.insert(l);o=Tt(l,this.direction)}for(const l of a.values())l.remove();return this}}class dh extends $S{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:fo(t,this.direction)}getParentCaret(t="root"){return Tt(NS(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Sl(this.direction);return Tt(this.getNodeAtCaret(),t)||fo(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof dh&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const qX={root:xr,shadowRoot:rr};function Sl(e){return jX[e]}function NS(e,t="root"){return e===null||qX[t](e)?null:An(e)===null?e:null}class gu extends $S{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Tt(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return q(this.origin)?fo(this.origin,this.direction):null}getParentCaret(t="root"){return Tt(NS(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Sl(this.direction);return Tt(this.getNodeAtCaret(),t)||fo(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof gu&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof gu||t instanceof mu)&&this.direction===t.direction&&this.origin.is(t.origin)}}class mu extends $S{type="text";offset;constructor(t,r){super(t),this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:cl(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Tt(NS(this.getParentAtCaret(),t),this.direction)}getFlipped(){return cl(this.origin,Sl(this.direction),this.offset)}isSamePointCaret(t){return t instanceof mu&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof gu||t instanceof mu)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Tt(this.origin,this.direction)}}function oo(e){return e instanceof mu}function ul(e){return e instanceof gu}function so(e){return e instanceof dh}const VX={next:class extends mu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends mu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},KX={next:class extends gu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends gu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},HX={next:class extends dh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends dh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Tt(e,t){return e?new KX[t](e):null}function cl(e,t,r){return e?new VX[t](e,gs(e,r)):null}function gs(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&rP(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function xR(e,t){return new GX(e,t)}function fo(e,t){return q(e)?new HX[t](e):null}function WX(e){return e&&e.getChildCaret()||e}function DS(e){return e&&WX(e.getAdjacentCaret())}class FS{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 FS(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return oo(o)?(function(s,a){const{direction:l,origin:u}=s,d=gs(u,a==="focus"?Sl(l):l);return xR(s,d-s.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[xR(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=oo(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=oo(n),o=s=>s.isSameNodeCaret(n)?null:DS(s)||s.getParentCaret(t);return QO({hasNext:s=>s!==null&&!(i&&n.isSameNodeCaret(s)),initial:r.isSameNodeCaret(n)?null:o(r),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class GX{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 cl(t.setTextContent(o.slice(0,n)+o.slice(i)),r,n)}}function Vm(e){return Io(e,Tt(qr(),e.direction))}function Km(e){return Io(e,e)}function Io(e,t){return e.direction!==t.direction&&te(265),new FS(e,t,e.direction)}function QO(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 s={done:!1,value:i(o)};return o=n(o),s}}}function fh(e,t){const r=a1(e.origin,t.origin);switch(r===null&&te(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,s){return Math.sign(o-s)})(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 YO(r)}}function YO(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,s=r;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===n)return 1}return o===null?1:-1}function Fp(e,t){return t.is(e)}function SR(e){return q(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function a1(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=SR(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=SR(t);n;i=n,n=n.getParent()){const o=r.get(n);if(o!==void 0)return o===null?(Fp(e,n)||te(276),{commonAncestor:n,type:"ancestor"}):i===null?(Fp(t,n)||te(277),{commonAncestor:n,type:"descendant"}):((q(o)||Fp(e,o))&&(q(i)||Fp(t,i))&&n.is(o.getParent())&&n.is(i.getParent())||te(278),{a:o,b:i,commonAncestor:n,type:"branch"})}return null}function ai(e,t){const{type:r,key:n,offset:i}=e,o=SX(e.key);return r==="text"?(ie(o)||te(266,o.getType(),n),cl(o,t,i)):(q(o)||te(267,o.getType(),n),u1(o,e.offset,t))}function vu(e,t){const{origin:r,direction:n}=t,i=n==="next";oo(t)?e.set(r.getKey(),t.offset,"text"):ul(t)?ie(r)?e.set(r.getKey(),gs(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(so(t)&&q(r)||te(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function hh(e){const t=pe(),r=re(t)?t:hS();return U0(r,e),vn(r),r}function U0(e,t){vu(e.anchor,t.anchor),vu(e.focus,t.focus)}function l1(e){const{anchor:t,focus:r}=e,n=ai(t,"next"),i=ai(r,"next"),o=fh(n,i)<=0?"next":"previous";return Io(sa(n,o),sa(i,o))}function Au(e){const{direction:t,origin:r}=e,n=Tt(r,Sl(t)).getNodeAtCaret();return n?Tt(n,t):fo(r.getParentOrThrow(),t)}function ER(e,t="root"){const r=[e];for(let n=so(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push(Au(n));return r}function E_(e){return!!e&&e.origin.isAttached()}function JX(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=PS(e,n),s=ER(o.anchor,r),a=ER(o.focus.getFlipped(),r),l=new Set,u=[];for(const g of o.iterNodeCarets(r))if(so(g))l.add(g.origin.getKey());else if(ul(g)){const{origin:m}=g;q(m)&&!l.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),_=Au(Tt(m,n)),y=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||y==="token"&&g.distance!==0)_.remove();else if(g.distance!==0){i="removeEmptySlices";let E=g.removeTextSlice();const S=g.caret.origin;if(y==="segmented"){const k=E.origin,C=yr(k.getTextContent()).setStyle(k.getStyle()).setFormat(k.getFormat());_.replaceOrInsert(C),E=cl(C,n,E.offset)}S.is(s[0].origin)&&(s[0]=E),S.is(a[0].origin)&&(a[0]=E.getFlipped())}}let d,f;for(const g of s)if(E_(g)){d=Ai(g);break}for(const g of a)if(E_(g)){f=Ai(g);break}const h=(function(g,m,v){if(!g||!m)return null;const _=g.getParentAtCaret(),y=m.getParentAtCaret();if(!_||!y)return null;const E=_.getParents().reverse();E.push(_);const S=y.getParents().reverse();S.push(y);const k=Math.min(E.length,S.length);let C;for(C=0;C<k&&E[C]===S[C];C++);const $=(O,P)=>{let I;for(let U=C;U<O.length;U++){const B=O[U];if(rr(B))return;!I&&P(B)&&(I=B)}return I},A=$(E,kn),N=A&&$(S,O=>v.has(O.getKey())&&kn(O));return N&&io(N).length>0?null:A&&N?[A,N]:null})(d,f,l);if(h){const[g,m]=h;fo(g,"previous").splice(0,m.getChildren());let v=m.getParent();for(m.remove(!0);v&&v.isEmpty();){const _=v;v=v.getParent(),_.remove(!0)}}else if(f){const g=(function(_){if(so(_)){const y=_.origin;if(kn(y))return y}else{const y=_.getParentAtCaret();if(y&&kn(y))return y}return null})(f),m=g&&g.getParent(),v=g&&g.getParents().findLast(Nc);if(g&&m&&!xr(m)&&g.isEmpty()&&l.has(g.getKey())&&io(g).length===0&&(!v||l.has(v.getKey()))){g.remove(!0);let _=m;for(;_&&!xr(_)&&_.isEmpty();){const y=_.getParent();if(y&&xr(y)&&y.getChildrenSize()<=1)break;const E=_;_=y,E.remove(!0)}}}const p=[d,f,...s,...a].find(E_);if(p)return Km(sa(Ai(p),e.direction));te(269,JSON.stringify(s.map(g=>g.origin.__key)))}function Ai(e){const t=(function(i){let o=i;for(;so(o);){const s=DS(o);if(!so(s))break;o=s}return o})(e.getLatest()),{direction:r}=t;if(ie(t.origin))return oo(t)?t:cl(t.origin,r,r);const n=t.getAdjacentCaret();return ul(n)&&ie(n.origin)?cl(n.origin,r,Sl(r)):t}function IS(e){return oo(e)&&e.offset!==gs(e.origin,e.direction)}function sa(e,t){return e.direction===t?e:e.getFlipped()}function PS(e,t){return e.direction===t?e:Io(sa(e.focus,t),sa(e.anchor,t))}function u1(e,t,r){let n=fo(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return sa(n,r)}function QX(e){const{origin:t,offset:r,direction:n}=e;if(r===gs(t,n))return e.getSiblingCaret();if(r===gs(t,Sl(n)))return Au(e.getSiblingCaret());const[i]=t.splitText(r);return ie(i)||te(281),sa(Tt(i,"next"),n)}function YX(e,t){return!0}function XO(e,{$copyElementNode:t=Mn,$splitTextPointCaretNext:r=QX,rootMode:n="shadowRoot",$shouldSplit:i=YX,removeEmptyDestination:o=!1}={}){if(oo(e))return r(e);const s=e.getParentCaret(n);if(s){const{origin:a}=s;if(so(e)){const u=Au(s);if(o&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!i(a,"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&&a.canBeEmpty()&&i(a,"last"))&&s.insert(t(a).splice(0,0,l))}return s}function ZO(e,t,r){let n=sa(t,"next");oo(n)&&(n.offset===0?n=Tt(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=Tt(n.origin,"next"))),n.origin.is(e)&&(ul(n)||te(342,e.getKey(),e.getType()),n=Au(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=XO(i,r))n=i;return oo(n)&&te(283),n.insert(e.isInline()?Ft().append(e):e),sa(Tt(e.getLatest(),"next"),t.direction)}function OS(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function Xs(...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 xs(e,...t){const r=Xs(...t);r.length>0&&e.classList.add(...r)}function MS(e,...t){const r=Xs(...t);r.length>0&&e.classList.remove(...r)}function dl(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function e6(e){const t=vr().getElementByKey(e.getKey());if(t===null)return null;const r=t.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(t)}function t6(e){return e6(xr(e)?e:e.getParentOrThrow())}function Ip(e){const t=t6(e);return t!==null&&t.direction==="rtl"}function r6(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!Ri(t)&&n!==null){const[i,o]=n,s=e.isBackward(),a=i.getNode(),l=o.getNode(),u=t.is(a),d=t.is(l);if(u||d){const[f,h]=Zy(e),p=a.is(l),g=t.is(s?l:a),m=t.is(s?a:l);let v,_=0;p?(_=f>h?h:f,v=f>h?f:h):g?(_=s?h:f,v=void 0):m&&(_=0,v=s?f:h);const y=t.__text.slice(_,v);y!==t.__text&&(r==="clone"&&(t=FX(t)),t.__text=y)}}return t}function XX(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function ZX(e,t,r){let n=ai(e,r);if(IS(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 eZ(e,t,r=XX){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const s=new Map;if(n){const[a,l]=n,u=Kt(a.getNode(),kn);o=Kt(l.getNode(),kn);const d=e.isBackward()?"previous":"next";i=q(o)&&!o.is(u)&&(function(f,h,p){const g=f.getNode();return(!q(g)||!g.isEmpty())&&ZX(f,h,p)})(l,o,Sl(d)),q(u)&&s.set(u.getKey(),u),q(o)&&!i&&s.set(o.getKey(),o)}for(const a of e.getNodes())if(q(a)&&kn(a)){if(i&&a.is(o))continue;s.set(a.getKey(),a)}else if(!n){const l=Kt(a,kn);q(l)&&s.set(l.getKey(),l)}for(const a of s.values()){const l=t();r(a,l),a.replace(l,!0)}}function n6(e){const t=i6(e);return t!==null&&t.writingMode==="vertical-rl"}function i6(e){const t=e.anchor.getNode();return q(t)?e6(t):t6(t)}function wR(e,t){let r=n6(e)?!t:t;o6(e)&&(r=!r);const n=ai(e.focus,r?"previous":"next");if(IS(n))return!1;if(oo(n)&&!uu(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(ie(i)&&!uu(i))return!0}for(const i of Vm(n)){if(so(i))return!i.origin.isInline();if(!q(i.origin)){if(at(i.origin))return!0;break}}return!1}function tZ(e,t,r,n){e.modify(t?"extend":"move",r,n)}function o6(e){const t=i6(e);return t!==null&&t.direction==="rtl"}function kR(e,t,r){const n=o6(e);let i;i=n6(e)||n?!r:r,tZ(e,t,i,"character")}function rZ(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 nZ(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function iZ(e){const t=Kt(e,r=>q(r)&&!r.isInline());return q(t)||rZ(4,e.__key),t}function Ka(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Pp(e){let t=null;if(Ka(e,DragEvent)?t=e.dataTransfer:Ka(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 CR(e){const t=pe();if(!re(t))return!1;const r=new Set,n=t.getNodes();for(let i=0;i<n.length;i++){const o=n[i],s=o.getKey();if(r.has(s))continue;const a=Kt(o,u=>q(u)&&!u.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!r.has(l)&&(r.add(l),e(a))}return r.size>0}const oZ=Symbol.for("preact-signals");function LS(){if(Ql>1)return void Ql--;let e,t=!1;for(!(function(){let r=$g;for($g=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();Rf!==void 0;){let r=Rf;for(Rf=void 0,Ng++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&s6(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Ng=0,Ql--,t)throw e}let Ot,Rf;function RR(e){const t=Ot;Ot=void 0;try{return e()}finally{Ot=t}}let $g,Ql=0,Ng=0,AR=0,B0=0;function TR(e){if(Ot===void 0)return;let t=e.n;return t===void 0||t.t!==Ot?(t={i:0,S:e,p:Ot.s,n:void 0,t:Ot,e:void 0,x:void 0,r:t},Ot.s!==void 0&&(Ot.s.n=t),Ot.s=t,e.n=t,32&Ot.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=Ot.s,t.n=void 0,Ot.s.n=t,Ot.s=t),t):void 0}function zn(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 sZ(e,t){return new zn(e,t)}function s6(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 $R(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 a6(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 Gu(e,t){zn.call(this,void 0),this.x=e,this.s=void 0,this.g=B0-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function l6(e){const t=e.m;if(e.m=void 0,typeof t=="function"){Ql++;const r=Ot;Ot=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,zS(e),n}finally{Ot=r,LS()}}}function zS(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,l6(e)}function aZ(e){if(Ot!==this)throw new Error("Out-of-order effect");a6(this),Ot=e,this.f&=-2,8&this.f&&zS(this),LS()}function ac(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 lZ(e,t){const r=new ac(e,t);try{r.c()}catch(i){throw r.d(),i}const n=r.d.bind(r);return n[Symbol.dispose]=n,n}zn.prototype.brand=oZ,zn.prototype.h=function(){return!0},zn.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:RR(()=>{var r;(r=this.W)==null||r.call(this)}))},zn.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&&RR(()=>{var n;(n=this.Z)==null||n.call(this)}))}},zn.prototype.subscribe=function(e){return lZ(()=>{const t=this.value,r=Ot;Ot=void 0;try{e(t)}finally{Ot=r}},{name:"sub"})},zn.prototype.valueOf=function(){return this.value},zn.prototype.toString=function(){return this.value+""},zn.prototype.toJSON=function(){return this.value},zn.prototype.peek=function(){const e=Ot;Ot=void 0;try{return this.value}finally{Ot=e}},Object.defineProperty(zn.prototype,"value",{get(){const e=TR(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Ng>100)throw new Error("Cycle detected");(function(t){Ql!==0&&Ng===0&&t.l!==AR&&(t.l=AR,$g={S:t,v:t.v,i:t.i,o:$g})})(this),this.v=e,this.i++,B0++,Ql++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{LS()}}}}),Gu.prototype=new zn,Gu.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===B0))return!0;if(this.g=B0,this.f|=1,this.i>0&&!s6(this))return this.f&=-2,!0;const e=Ot;try{$R(this),Ot=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 Ot=e,a6(this),this.f&=-2,!0},Gu.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)}zn.prototype.S.call(this,e)},Gu.prototype.U=function(e){if(this.t!==void 0&&(zn.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)}},Gu.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(Gu.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=TR(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),ac.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()}},ac.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,l6(this),$R(this),Ql++;const e=Ot;return Ot=this,aZ.bind(this,e)},ac.prototype.N=function(){2&this.f||(this.f|=2,this.u=Rf,Rf=this)},ac.prototype.d=function(){this.f|=8,1&this.f||zS(this)},ac.prototype.dispose=function(){this.d()};function uZ(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function Qt(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 u6;try{u6="0.48.0+prod.esm"}catch{}const cZ=u6??'"<unknown>+source"',dZ=new Set(["__proto__","constructor","prototype"]);function c6(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!dZ.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=c6(r[i],n[i]));return e}return t}const US=0,c1=1,d6=2,w_=3,Op=4,Ju=5,k_=6,Gd=7;function C_(e){return e.id===US}function f6(e){return e.id===d6}function fZ(e){return(function(t){return t.id===c1})(e)||Qt(305,String(e.id),String(c1)),Object.assign(e,{id:d6})}const hZ=new Set;let pZ=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:US}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):OS;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;f6(r)||Qt(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(a,l,u){return Object.assign(a,{config:l,id:w_,registerState:u})})(r,this.mergeConfigs(),n);let s;this.state=o,this.extension.init&&(s=this.extension.init(t,o.config,n)),this.state=(function(a,l,u){return Object.assign(a,{id:Op,initResult:l,registerState:u})})(o,s,i)}build(t){const r=this.state;let n;r.id!==Op&&Qt(307,String(r.id),String(Ju)),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,s,a){return Object.assign(o,{id:Ju,output:s,registerState:a})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==Ju&&Qt(308,String(n.id),String(Ju));const i=this.extension.register&&this.extension.register(t,n.config,n.registerState);return this.state=(function(o){return Object.assign(o,{id:k_})})(n),()=>{const o=this.state;o.id!==Gd&&Qt(309,String(n.id),String(Gd)),this.state=(function(s){return Object.assign(s,{id:Ju})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==k_&&Qt(310,String(r.id),String(k_)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:Gd})})(r),n}getSignal(){return this._signal===void 0&&Qt(311),this._signal}getInitResult(){this.extension.init===void 0&&Qt(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Op})(t)||Qt(313,String(t.id),String(Op)),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>=w_})(t)||Qt(314,String(t.id),String(w_)),{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&&Qt(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&Qt(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=Gd})(t)||Qt(316,String(t.id),String(Gd)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||hZ}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>=Ju})(t)||Qt(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const NR={tag:kf};function gZ(){const e=qr();e.isEmpty()&&e.append(Ft())}const mZ={config:{setOptions:NR,updateOptions:NR},init:({$initialEditorState:e=gZ})=>({$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(sX(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 s=e.parseEditorState(o);e.setEditorState(s,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[gd,pa,md,fd,vd]},DR=Symbol.for("@lexical/extension/LexicalBuilder");function FR(){}function vZ(e){throw e}function Mp(e){return Array.isArray(e)?e:[e]}const R_=cZ;class Af{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=R_,this.roots=t;for(const r of t)this.addExtension(r)}static fromExtensions(t){const r=[Mp(mZ)];for(const n of t)r.push(Mp(n));return new Af(r)}static maybeFromEditor(t){const r=t[DR];return r&&(r.PACKAGE_VERSION!==R_&&Qt(292,r.PACKAGE_VERSION,R_),r instanceof Af||Qt(293)),r}static fromEditor(t){const r=Af.maybeFromEditor(t);return r===void 0&&Qt(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(_S({...i,...r?{onError:s=>{r(s,o)}}:{},...n?{onWarn:s=>{n(s,o)}}:{}}),{[DR]:this});for(const s of this.sortedExtensionReps())s.build(o);return o}buildEditor(){let t=FR;function r(){try{t()}finally{t=FR}}const n=Object.assign(this.constructEditor(),{dispose:r,[Symbol.dispose]:r});return t=dl(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&&Qt(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&&Qt(296);const r=Mp(t),[n]=r;typeof n.name!="string"&&Qt(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&Qt(298,n.name),!i){i=new pZ(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&Qt(299,n.name,o);for(const s of n.conflictsWith||[])this.extensionNameMap.has(s)&&Qt(299,n.name,s),this.conflicts.set(s,n.name);for(const s of n.dependencies||[]){const a=Mp(s);this.addEdge(n.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[s,a]of n.peerDependencies||[])this.addEdge(n.name,s,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(f6(o))return;const s=n.extension.name;var a;C_(o)||Qt(300,s,i||"[unknown]"),C_(a=o)||Qt(304,String(a.id),String(US)),o=Object.assign(a,{id:c1}),n.state=o;const l=this.outgoingConfigEdges.get(s);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&r(d,s)}o=fZ(o),n.state=o,t.push(n)};for(const n of this.extensionNameMap.values())C_(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 s=this.extensionNameMap.get(i);if(s)for(const a of o)s.configs.add(a)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&Qt(301,n.name);for(const s of i)o.configs.add(s)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const s of r){const a=s.register(t,o);a&&i.push(a)}for(const s of r){const a=s.afterRegistration(t);a&&i.push(a)}return dl(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},s={},a=this.sortedExtensionReps();for(const d of a){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 uZ(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&Qt(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&&c6(s,f.theme)}Object.keys(s).length>0&&(t.theme=s),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 a)d.init(t);return t.onError||(t.onError=vZ),t}}function Wh(e,t){const r=Af.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function _Z(e){return Wh(vr(),e)}class Hm extends gS{static getType(){return"horizontalrule"}static clone(t){return new Hm(t.__key)}static importJSON(t){return BS().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:bZ,priority:0})}}exportDOM(){return{element:Xt().createElement("hr")}}createDOM(t){const r=Xt().createElement("hr");return xs(r,t.theme.hr),r}getTextContent(){return`
|
|
28
|
+
`}isInline(){return!1}updateDOM(){return!1}}function bZ(){return{node:BS()}}function BS(){return VO(Hm)}function xd(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 Dc;function h6(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function p6(e){return Dc&&Dc.editor===e?Dc:void 0}function yZ(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n(h6(e,r))]}return t}function xZ(e,t){let r=t;for(const n of e){const[i,o]=yZ(r,n),s=i.key;if(r===t&&h6(r,i)===o)continue;const a=r===t||r===void 0?SZ(t):r;a[s]=o,r=a}return r}function SZ(e){return Object.create(e||null)}function g6(e,t){return[e,t]}function EZ(e,t,r,n=vr()){const i=Dc,o=p6(n);try{return Dc={...o,editor:n,[e]:t},r()}finally{Dc=i}}function wZ(e,t=()=>{}){return(r,n=vr())=>i=>{const o=p6(n),s=o&&o[e],a=xZ(r,s||t(n));return a&&a!==s?EZ(e,a,i,n):i()}}function m6(e,t,r,n){return Object.assign(jh(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function kZ(e){if(!ku(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 s=0;s<i.style.length;s++)o.add(i.style[s]);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 s of Array.from(o)){if(!Ka(s,CSSStyleRule))continue;let a;try{a=t.querySelectorAll(s.selectorText)}catch{continue}for(const l of Array.from(a)){if(!Xe(l))continue;const u=n(l);for(let d=0;d<s.style.length;d++){const f=s.style[d];u.has(f)||l.style.setProperty(f,s.style.getPropertyValue(f),s.style.getPropertyPriority(f))}}}}}catch{}}const v6="@lexical/html/DOM",_6=Symbol.for("@lexical/html/DOMExportContext"),CZ=Symbol.for("@lexical/html/DOMImportContext");function RZ(e,t,r){return m6(_6,e,t,r)}const AZ=RZ("isExport",Boolean);function TZ(e){const t=Wh(e,v6);return t?t.output.defaults:void 0}function $Z(e){const t=Wh(e,v6);return t?t.output.runtime:void 0}function NZ(e=vr()){const t=$Z(e);return t?t.getSessionConfig():Bm(e)}const DZ=wZ(_6,TZ),Wm=Symbol.for("@lexical/html/SelectorImpl");function ph(e,t){const r={kind:"element",predicate:(n=t,n.length===0?Xe:n.length===1?n[0]:(o,s)=>{for(const a of n)if(!a(o,s))return!1;return!0}),tags:e};var n;const i=o=>ph(e,[...t,o]);return{[Wm]:r,attr:(o,s,a)=>i(d1(o,s,a)),classAll:(...o)=>i(y6(o)),classAny:(...o)=>i((function(s){const a=b6(s);return a.length===0?()=>!1:l=>{if(!Xe(l))return!1;const u=l.classList;for(const d of a)if(u.contains(d))return!0;return!1}})(o)),styleAny:(o,s,a)=>i((function(l,u,d){if(typeof u=="string")return f=>Xe(f)&&f.style.getPropertyValue(l)===u;if(u instanceof RegExp){const f=d&&d.capture,h=u;return(p,g)=>{if(!Xe(p))return!1;const m=p.style.getPropertyValue(l);if(!m)return!1;const v=m.match(h);return v!==null&&(f!==void 0&&(g[f]=v),!0)}}xd(362,JSON.stringify(l))})(o,s,a))}}function b6(e){const t=[];for(const r of e)r&&t.push(r);return t}function y6(e){const t=b6(e);return t.length===0?()=>!0:r=>{if(!Xe(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function d1(e,t,r){if(t===!0)return n=>Xe(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>Xe(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,s)=>{if(!Xe(o))return!1;const a=o.getAttribute(e);if(a==null)return!1;const l=a.match(i);return l!==null&&(n!==void 0&&(s[n]=l),!0)}}xd(361,JSON.stringify(e))}const FZ={kind:"text",predicate:mi,tags:new Set},IZ={[Wm]:FZ},PZ={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},OZ={[Wm]:PZ},gc={any:()=>ph(new Set,[]),comment:()=>OZ,tag(...e){e.length>0||xd(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return ph(t,[])},text:()=>IZ};function x6(e,t){return Xe(e)&&e.nodeName===t.toUpperCase()}const S6=/[A-Za-z0-9_-]/;let MZ=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()&&S6.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||xd(364,String(this.pos+1),r,this.source)}};function LZ(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(S6.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(d1("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let s=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const a=e.peek();a==='"'||a==="'"?s=e.readQuoted():(s=e.readIdent(),e.assert(s!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(d1(o,s))}}}return n.length>0&&r.push(y6(n)),{predicates:r,tags:t}}function zZ(e){const t=new MZ(e,0),r=[];for(;;){const i=LZ(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 ph(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 ph(n,[(i,o)=>{for(const s of r){const a=i.nodeName;if(s.tags.size>0&&!s.tags.has(a))continue;let l=!0;for(const u of s.predicates)if(!u(i,o)){l=!1;break}if(l)return!0}return!1}])}function jS(e,t,r){return m6(CZ,e,t,r)}const f1=jS("textFormat",()=>0),UZ=jS("textStyle",()=>({}));function BZ(e){if(!Xe(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function jZ(e){if(mi(e))return!0;if(!Xe(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Qc(e)&&Rg(e)}const qZ=jS("whitespaceConfig",()=>({isInline:jZ,preservesWhitespace:BZ}));function qS(e){return Kc(e)||at(e)&&!e.isInline()}function E6(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(qS(o)){if(i(),q(o)){const s=E6(o.getChildren(),t);o.splice(0,o.getChildrenSize(),s)}r.push(o)}else n.push(o);return i(),r}function w6(e,t){if(!Xe(t))return e;const r=t.style.textAlign;if(!VS(r))return e;for(const n of e)Kc(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function VZ(e,t,r){e.length===1&&Hn(e[0])&&(e=[]);const n=Ft();if(Xe(r)){const i=r.style.textAlign;VS(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const k6={$accepts:qS,$packageRun:VZ,name:"BlockSchema"},Tu=gc,KZ=new Set(["center","end","justify","left","right","start"]);function VS(e){return KZ.has(e)}const HZ={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"}},WZ={CODE:YQ,MARK:sS},GZ=new Set(["font-weight","font-style","text-decoration","vertical-align"]),JZ={$import:(e,t)=>{const r=e.get(f1),n=HZ[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?(s=n,{fontStyle:(a=i).fontStyle||s.fontStyle,fontWeight:a.fontWeight||s.fontWeight,textDecoration:a.textDecoration||s.textDecoration,verticalAlign:a.verticalAlign||s.verticalAlign}):i;var s,a;let l=(u=r,d=(function(h){let p=0,g=0;const{fontWeight:m,fontStyle:v,textDecoration:_,verticalAlign:y}=h;if(m==="700"||m==="bold"?p|=fC:m!=="normal"&&m!=="400"||(g|=fC),v==="italic"?p|=hC:v==="normal"&&(g|=hC),_){const E=_.split(" ");E.includes("underline")&&(p|=gC),E.includes("line-through")&&(p|=pC),E.includes("none")&&(g|=gC|pC)}return y==="sub"?(p|=c_,g|=d_):y==="super"?(p|=d_,g|=c_):y==="baseline"&&(g|=c_|d_),{clear:g,set:p}})(o),u&~d.clear|d.set);var u,d;const f=WZ[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[g6(f1,l)]})},match:Tu.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function IR(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const s=n.parentNode;if(s===null)return null;n=s}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(mi(n))return n;if(n.nodeName==="BR")return null}}function PR(e,t){return t!==0&&ie(e)?e.setFormat(t):e}function OR(e,t){if(ie(e)){const r=(function(n){let i="";for(const o in n)GZ.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const QZ={$import:(e,t)=>{const r=e.get(f1),n=e.get(UZ),i=e.get(qZ);if((function(a,l){let u=a.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(t,i)){const a=uh(t.textContent||"");for(const l of a)PR(l,r),OR(l,n);return a}const o=(function(a,l){let u=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let d=a,f=!0;for(;d!==null&&(d=IR(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=a,f=!0;for(;d!==null&&(d=IR(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 s=yr(o);return PR(s,r),OR(s,n),[s]},match:Tu.text(),name:"@lexical/html/#text"},YZ={$import:()=>[],match:Tu.tag("script","style"),name:"@lexical/html/script-style-ignore"},XZ={$import:(e,t)=>EO(t)||wO(t)?[]:[zo()],match:Tu.tag("br"),name:"@lexical/html/br"},ZZ={$import:(e,t)=>{const r=Ft();if(Rs(r,t),Ru(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&VS(n)&&r.setFormat(n)}return vo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Tu.tag("p"),name:"@lexical/html/p"},eee={$import:(e,t,r)=>vr().hasNode(Hm)?[BS()]:r(),match:Tu.tag("hr"),name:"@lexical/html/hr"};Tu.any();function tee(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 ree(e){const t=[],r=new Map,n=[],i=[],o=[],s=new Set;e.forEach((l,u)=>{const d=(function(h){const p=h[Wm];return p===void 0&&xd(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&&s.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 a=new Map;if(n.length===0)for(const[l,u]of r)a.set(l,u);else for(const[l,u]of r)a.set(l,tee(u,n));return{byTag:a,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function nee(e){const t=[];for(const r of e)if(iee(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function iee(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function C6(e){const t=nee(e);return{__type:"CompiledOverlayRules",dispatch:ree(t),rules:t}}gc.any();const bn={any:gc.any,comment:gc.comment,css:zZ,tag:gc.tag,text:gc.text},R6=new Set(["STYLE","SCRIPT"]);function oee(e,t){kZ(t);const r=ku(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!R6.has(o.nodeName)){const s=T6(o,e,i,!1);if(s!==null)for(const a of s)n.push(a)}return(function(o){for(const s of o)s.getParent()&&s.getNextSibling()instanceof vS&&s.insertAfter(zo());for(const s of o){const a=s.getParent();a&&a.splice(s.getIndexWithinParent(),1,s.getChildren())}})(i),n}function see(e,t=null,r=vr()){return DZ([g6(AZ,!0)],r)(()=>{const n=qr(),i=NZ(r),o=re(t)?jm(t.anchor.getNode()):null,s=e.append.bind(e);for(const a of(q(o)?o:n).getChildren())A6(r,a,s,t,i);return e})}function aee(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&xd(338),rX(e),see(Xt().createElement("div"),t,e).innerHTML}function A6(e,t,r,n=null,i=Bm(e)){let o=i.$shouldInclude(t,n,e);const s=i.$shouldExclude(t,n,e);let a=t;n!==null&&ie(t)&&(a=r6(n,t,"clone"));const l=i.$exportDOM(a,e),{element:u,after:d,append:f,$getChildNodes:h}=l;if(!u)return!1;const p=Xt().createDocumentFragment(),g=h?h():q(a)?a.getChildren():[],m=o&&Gt(n)&&q(t)?null:n,v=p.append.bind(p);for(const _ of g){const y=A6(e,_,v,m,i);!o&&y&&i.$extractWithChild(t,_,n,"html",e)&&(o=!0)}if(o&&!s){if((Xe(u)||o1(u))&&(f?f(p):u.append(p)),r(u),d){const _=d.call(a,u);_&&(o1(u)?u.replaceChildren(_):u.replaceWith(_))}}else r(p);return o}function T6(e,t,r,n,i=new Map,o){const s=[];if(R6.has(e.nodeName))return s;let a=null;const l=(function(g,m){const{nodeName:v}=g,_=m._htmlConversions.get(v.toLowerCase());let y=null;if(_!==void 0)for(const E of _){const S=E(g);S!==null&&(y===null||(y.priority||0)<=(S.priority||0))&&(y=S)}return y!==null?y.conversion:null})(e,t),u=l?l(e):null;let d=null;if(u!==null){d=u.after;const g=u.node;if(a=Array.isArray(g)?g[g.length-1]:g,a!==null){for(const[,m]of i)if(a=m(a,o),!a)break;a&&s.push(...Array.isArray(g)?g:[a])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const f=e.childNodes;let h=[];const p=(a==null||!rr(a))&&(a!=null&&Kc(a)||n);for(let g=0;g<f.length;g++)h.push(...T6(f[g],t,r,p,new Map(i),a));if(d!=null&&(h=d(h)),Qc(e)&&(h=lee(e,h,p?()=>{const g=new vS;return r.push(g),g}:Ft)),a==null)if(h.length>0)for(const g of h)s.push(g);else Qc(e)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Rg(g.nextSibling)&&Rg(g.previousSibling)})(e)&&s.push(zo());else q(a)&&a.append(...h);return s}function lee(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const a=t[s];if(Kc(a))n&&!a.getFormat()&&a.setFormat(n),i.push(a);else if(o.push(a),s===t.length-1||s<t.length-1&&Kc(t[s+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function Ma(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 uee(e){let t=1,r=e.getParent();for(;r!=null;){if(kt(r)){const n=r.getParent();if(nt(n)){t++,r=n.getParent();continue}Ma(40)}return t}return t}function h1(e){const t=e.getParent();nt(t)||Ma(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),nt(n)&&(r=n);return r}function $6(e){let t=[];const r=e.getChildren().filter(kt);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();nt(o)?t=t.concat($6(o)):t.push(i)}return t}function Yi(e){return kt(e)&&nt(e.getFirstChild())}function N6(e,t){return kt(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function MR(e){const t=pe();if(t!==null){let r=t.getNodes();if(re(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),s=o.getParent();if(rr(o)){const a=o.getFirstChild();if(a)r=a.selectStart().getNodes();else{const l=Ft();o.append(l),r=l.select().getNodes()}}else if(N6(o,r)){const a=Po(e);if(rr(s)){o.replace(a);const l=Ss();q(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),a.append(l)}else if(kt(o)){const l=o.getParentOrThrow();_u(a,l.getChildren()),l.replace(a)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(q(o)&&o.isEmpty()&&!kt(o)&&!n.has(o.getKey())){LR(o,e);continue}let s=RO(o)?o.getParent():kt(o)&&o.isEmpty()?o:null;for(;s!=null;){const a=s.getKey();if(nt(s)){if(!n.has(a)){const l=Po(e);_u(l,s.getChildren()),s.replace(l),n.add(a)}break}{const l=s.getParent();if(rr(l)&&!n.has(a)){n.add(a),LR(s,e);break}s=l}}}}}function _u(e,t){e.splice(e.getChildrenSize(),0,t)}function LR(e,t){if(nt(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=Ss();let o;if(_u(i,e.getChildren()),nt(r)&&t===r.getListType())r.append(i),nt(n)&&t===n.getListType()&&(_u(r,n.getChildren()),n.remove()),o=r;else if(nt(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const a=Po(t);a.append(i),e.replace(a),o=a}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const s=pe();return re(s)&&(o.getKey()===s.anchor.key&&s.anchor.set(i.getKey(),s.anchor.offset,"element"),o.getKey()===s.focus.key&&s.focus.set(i.getKey(),s.focus.offset,"element")),e.remove(),o}function KS(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&Yi(r)&&Yi(n)&&(KS(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function cee(){const e=pe();if(re(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(N6(n,r))t.add(h1(n));else for(let i=0;i<r.length;i++){const o=r[i];if(RO(o)){const s=nZ(o,$u);s!=null&&t.add(h1(s))}}for(const i of t){let o=i;const s=$6(i);for(const a of s){const l=Ft().setTextStyle(e.style).setTextFormat(e.format);_u(l,a.getChildren()),o.insertAfter(l),o=l,a.__key===e.anchor.key&&vu(e.anchor,Ai(fo(l,"next"))),a.__key===e.focus.key&&vu(e.focus,Ai(fo(l,"next"))),a.remove()}i.remove()}}}function D6(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())kt(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),nt(n.getFirstChild())||r++)}function dee(e){const t=new Set;if(Yi(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(Yi(n)&&Yi(i)){const o=i.getFirstChild();if(nt(o)){o.append(e);const s=n.getFirstChild();nt(s)&&(_u(o,s.getChildren()),n.remove(),t.add(n.getKey()))}}else if(Yi(n)){const o=n.getFirstChild();if(nt(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(Yi(i)){const o=i.getFirstChild();nt(o)&&o.append(e)}else if(nt(r)){const o=Mn(e),s=Mn(r);o.append(s),s.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function zR(e){if(Yi(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(nt(r?r.getParent():void 0)&&kt(r)&&nt(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=Mn(e),s=Mn(t);o.append(s),e.getPreviousSiblings().forEach(u=>s.append(u));const a=Mn(e),l=Mn(t);a.append(l),_u(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(a),r.replace(e)}}}function fee(e=!1){const t=pe();if(!re(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(kt(r)&&r.getChildrenSize()===0)n=r;else if(ie(r)){const u=r.getParent();kt(u)&&u.getChildren().every(d=>ie(d)&&d.getTextContent().trim()==="")&&(n=u)}if(n===null)return!1;const i=h1(n),o=n.getParent();nt(o)||Ma(40);const s=o.getParent();let a;if(rr(s))a=Ft(),i.insertAfter(a);else{if(!kt(s))return!1;a=Mn(s),s.insertAfter(a)}a.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=Mn(o).setStart(u);if(kt(a)){const f=Mn(a);f.append(d),a.insertAfter(f)}else a.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||!kt(f)&&!nt(f))break;d=f}d.remove()})(n),!0}let $u=class extends fi{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(nt(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();nt(n)||Ma(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:s}of Tt(t,o)){if(!kt(s))break;i.push(s)}}t.insertBefore(n),n.splice(0,0,i),rr(r)||(ZO(n,Au(Tt(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:fi,importDOM:{li:()=>({conversion:hee,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=Xt().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(s,a){const l=a.getParent();!nt(l)||l.getListType()!=="check"||nt(a.getFirstChild())?(s.removeAttribute("role"),s.removeAttribute("tabIndex"),s.removeAttribute("aria-checked")):(s.setAttribute("role","checkbox"),s.setAttribute("tabIndex","-1"),s.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(s,a,l){const u=a.list;if(!u)return;const d=u.listitem,f=u.nested&&u.nested.listitem,h=l.getParent(),p=nt(h)&&h.getListType()==="check",g=l.getChecked(),m=l.getChildren().some(y=>nt(y)),v=[];u.listitemChecked!==void 0&&v.push(u.listitemChecked),u.listitemUnchecked!==void 0&&v.push(u.listitemUnchecked),f!==void 0&&v.push(...Xs(f)),v.length>0&&MS(s,...v);const _=[];if(d!==void 0&&_.push(...Xs(d)),p){const y=g?u.listitemChecked:u.listitemUnchecked;y!==void 0&&_.push(y)}f!==void 0&&m&&_.push(...Xs(f)),_.length>0&&xs(s,..._)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&Ac(r.style,o,i),(function(s,a,l){const u=a.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===u)return;const f=vg(u);for(const h in f)s.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in vg(d))h in f||s.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),Yi(this)?{after(o){if(Xe(o)){const s=o.previousElementSibling;if(Xe(s)&&s.nodeName==="LI"){for(;o.firstChild;)s.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(q(n)&&this.canMergeWith(n)){const i=n.getChildren();this.append(...i),n.remove()}else super.append(n)}return this}replace(t,r){if(kt(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!nt(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const s=Mn(n);let a=this.getNextSibling();for(;a;){const l=a;a=a.getNextSibling(),s.append(l)}n.insertAfter(t),t.insertAfter(s)}const i=this.__key;let o=0;if(r&&(q(t)||Ma(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&q(t)){const s=pe();if(re(s))for(const a of s.getStartEndPoints())a.key===i&&a.type==="element"&&a.set(t.getKey(),o+a.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(nt(n)||Ma(39),kt(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=Mn(n);i.forEach(s=>o.append(s)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&Yi(r)&&Yi(n)&&(KS(r.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,r=!0){const n=Mn(this);return this.insertAfter(n,r),n}collapseAtStart(t){if(Yi(this))return!1;const r=this.getParentOrThrow();if(kt(r.getParentOrThrow()))return zR(this),!0;const n=Ft().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=Mn(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 nt(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(;kt(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&Ma(117),(t=Math.floor(t))>=0||Ma(199);let r=this.getIndent();for(;r!==t;)r<t?(dee(this),r++):(zR(this),r--);return this}canInsertAfter(t){return kt(t)}canReplaceWith(t){return kt(t)}canMergeWith(t){return kt(t)||_d(t)}extractWithChild(t,r){if(!re(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 Po("bullet")}canMergeWhenEmpty(){return!0}};function hee(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return UR(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 UR(n.children[0])}const t=e.getAttribute("aria-checked"),r=Ss(t==="true"||t!=="false"&&void 0);return Rs(r,e),{after:F6.bind(null,r),node:vo(r,e)}}function UR(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=Ss(e.hasAttribute("checked"));return{after:F6.bind(null,t),node:t}}function F6(e,t){const r=t[0];return t.length===1&&_d(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function Ss(e){return Ho(new $u(void 0,e))}function kt(e){return e instanceof $u}let Gh=class extends fi{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();nt(n)&&r.getListType()===n.getListType()&&KS(r,n)})(t),D6(t)},extends:fi,importDOM:{ol:()=>({conversion:jR,priority:0}),ul:()=>({conversion:jR,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=pee[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=Xt().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,BR(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(BR(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 Xe(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 s=n[o];kt(s)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!q(s)||nt(s)||s.isInline()?s:yr(s.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return kt(t)}createListItemNode(){return Ss()}};function BR(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const s=o[`${r.__tag}Depth`]||[],a=uee(r)-1,l=a%s.length,u=s[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(...Xs(u));for(let g=0;g<s.length;g++)g!==l&&i.push(r.__tag+g)}if(f!==void 0){const g=Xs(f);a>1?n.push(...g):i.push(...g)}}i.length>0&&MS(e,...i),n.length>0&&xs(e,...n)}function jR(e){let t;if((function(r){return Xe(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=Po("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(Xe(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?Po("check"):Po("bullet");return vo(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),s=[];for(let a=0;a<n.length;a++){const l=n[a];if(kt(l)){s.push(l);const u=l.getChildren();u.length>1&&u.forEach(d=>{nt(d)&&s.push(o().append(d))})}else s.push(o().append(l))}return s})(r,t),node:t}}const pee={ol:"number",ul:"bullet"};function Po(e="number",t=1){return Ho(new Gh(e,t))}function nt(e){return e instanceof Gh}function gee(e){const t=[];for(const r of e)if(kt(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)nt(i)&&t.push(Ss().append(i))}else t.push(Ss().append(r));return t}const mee={$import:(e,t)=>{let r;var n;return x6(t,"ol")?r=Po("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?Po("check"):Po("bullet"),vo(r,t),[r.splice(0,0,w6(gee(e.$importChildren(t)),t))]},match:bn.tag("ol","ul"),name:"@lexical/list/list"};function I6(e,t){if(t.length!==1)return t;const r=t[0];return _d(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function P6(e){const t=s=>qS(s)&&!nt(s);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const s of e)t(s)?(i(),r.push(q(s)?s.getChildren():[s])):n.push(s);i();const o=[];for(const s of r)o.length>0&&o.push(zo()),o.push(...s);return o}const vee={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=Ss(r==="true"||r!=="false"&&void 0);return Rs(n,t),vo(n,t),[n.splice(0,0,P6(I6(n,e.$importChildren(t))))]},match:bn.tag("li"),name:"@lexical/list/li"};function qR(e,t,r){const n=x6(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=Ss(n.hasAttribute("checked"));return Rs(i,t),vo(i,t),[i.splice(0,0,P6(I6(i,e.$importChildren(t))))]}bn.tag("li").classAll("task-list-item"),bn.tag("li").classAll("joplin-checkbox");const _ee=ze("UPDATE_LIST_START_COMMAND"),O6=ze("INSERT_UNORDERED_LIST_COMMAND"),M6=ze("INSERT_ORDERED_LIST_COMMAND"),bee=ze("REMOVE_LIST_COMMAND");function yee(e,t){return dl(e.registerCommand(M6,()=>(MR("number"),!0),sc),e.registerCommand(_ee,r=>{const{listNodeKey:n,newStart:i}=r,o=Yt(n);return!!nt(o)&&(o.getListType()==="number"&&(o.setStart(i),D6(o)),!0)},sc),e.registerCommand(O6,()=>(MR("bullet"),!0),sc),e.registerCommand(bee,()=>(cee(),!0),sc),e.registerCommand(nh,()=>fee(!1),sc),e.registerCommand(cS,r=>{if((function(){const s=pe();if(!re(s)||!s.isCollapsed()||s.anchor.offset!==0)return!1;const a=s.anchor.getNode(),l=Kt(a,kt);if(!kt(l))return!1;const u=l.getFirstDescendant();if(u===null||!l.is(a)&&!u.is(a))return!1;const d=l.getParent();if(!nt(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!at(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Ft().append(...l.getChildren());return d.insertBefore(h),l.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return r.preventDefault(),!0;const n=pe();if(!re(n)||!n.isCollapsed())return!1;const{anchor:i}=n;if(i.offset!==0)return!1;let o=i.getNode();for(;!kt(o);){if(o.getPreviousSibling()!==null)return!1;const s=o.getParent();if(s===null)return!1;o=s}return!(!kt(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},dX),e.registerNodeTransform($u,r=>{const n=r.getFirstChild();if(n){if(ie(n)){const i=n.getStyle(),o=n.getFormat();r.getTextStyle()!==i&&r.setTextStyle(i),r.getTextFormat()!==o&&r.setTextFormat(o)}}else{const i=pe();re(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(pa,r=>{const n=r.getParent();if(kt(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function xee(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,s=e._selection;if(i)return 1;if(!(re(o)&&re(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;const a=(function(_,y,E){const S=_._nodeMap,k=[];for(const C of y){const $=S.get(C);$!==void 0&&k.push($)}for(const[C,$]of E){if(!$)continue;const A=S.get(C);A===void 0||xr(A)||k.push(A)}return k})(t,r,n);if(a.length===0)return 0;if(a.length>1){const _=t._nodeMap,y=_.get(o.anchor.key),E=_.get(s.anchor.key);return y&&E&&!e._nodeMap.has(y.__key)&&ie(y)&&y.__text.length===1&&o.anchor.offset===1?2:0}const l=a[0],u=e._nodeMap.get(l.__key);if(!ie(u)||!ie(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=s.anchor;if(h.key!==p.key||h.type!=="text")return 0;const g=h.offset,m=p.offset,v=f.length-d.length;return v===1&&m===g-1?2:v===-1&&m===g+1?3:v===-1&&m===g?4:0}function See(e,t,r){let n=r(),i=0,o=n,s=0,a=null;return(l,u,d,f,h,p)=>{const g=r();if(p.has(rO)&&(o=n,s=i,a=l),p.has(mg))return i=0,n=g,2;p.has(lh)&&a&&(n=o,i=s,l=a);const m=p.has(ZP)||p.has(eO)?0:xee(l,u,f,h,e.isComposing()),v=(()=>{const _=d===null||d.editor===e,y=p.has(XP);if(!y&&_&&p.has(kf))return 0;if(m===1)return 2;if(l===null)return 1;const E=u._selection;return f.size>0||h.size>0?y===!1&&m!==0&&m===i&&g<n+t&&_||f.size===1&&(function(k,C,$){const A=C._nodeMap.get(k),N=$._nodeMap.get(k),O=C._selection,P=$._selection;return!(re(O)&&re(P)&&O.anchor.type==="element"&&O.focus.type==="element"&&P.anchor.type==="text"&&P.focus.type==="text"||!ie(A)||!ie(N)||A.__parent!==N.__parent)&&JSON.stringify(C.read(()=>A.exportJSON()))===JSON.stringify($.read(()=>N.exportJSON()))})(Array.from(f)[0],l,u)?0:1:E!==null?0:2})();return n=g,i=m,v}}function VR(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function Eee(e,t,r,n=Date.now,i,o=null){const s=See(e,r,n);return dl(e.registerCommand(Im,()=>((function(a,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),a.dispatchCommand(Tp,!0)),f.length===0&&a.dispatchCommand($p,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:mg})}})(e,t),!0),st),e.registerCommand(Pm,()=>((function(a,l,u){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),a.dispatchCommand($p,!0));const p=d.pop();d.length===0&&a.dispatchCommand(Tp,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:mg})}})(e,t),!0),st),e.registerCommand(RY,()=>(VR(t),!1),st),e.registerCommand(AY,()=>(VR(t),e.dispatchCommand(Tp,!1),e.dispatchCommand($p,!1),!0),st),e.registerUpdateListener(({editorState:a,prevEditorState:l,dirtyLeaves:u,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,g=t.undoStack,m=h===null?null:h.editorState;if(h!==null&&a===m)return;const v=s(l,a,h,u,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(Tp,!1)),h!==null){g.push({...h});const _=typeof o=="number"||o===null?o:o.peek();_!==null&&g.length>_&&g.splice(0,g.length-_),e.dispatchCommand($p,!0)}}else if(v===2)return;t.current={editor:e,editorState:a}}))}function wee(){return{current:null,redoStack:[],undoStack:[]}}function kee(e,t){let r=e;for(let n=Tt(e,t);n&&(U6(n.origin)||uu(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function Cee(e){return kee(e,"previous")}function L6(e,t){for(const r of e.childNodes)if(Xe(r)&&r.tagName===t||L6(r,t))return!0;return!1}const df="data-language",Jd="data-highlight-language",Lp="data-theme";class Sd extends fi{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new Sd(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=Xt().createElement("code");xs(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(df,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Jd,n));const i=this.getTheme();i&&r.setAttribute(Lp,i);const o=this.getStyle();return o&&Ac(r.style,o),r}updateDOM(t,r,n){const i=this.__language,o=t.__language;i?i!==o&&r.setAttribute(df,i):o&&r.removeAttribute(df);const s=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?s&&i?i!==o&&r.setAttribute(Jd,i):r.removeAttribute(Jd):s&&i&&r.setAttribute(Jd,i);const a=this.__theme,l=t.__theme;a?a!==l&&r.setAttribute(Lp,a):l&&r.removeAttribute(Lp);const u=this.__style,d=t.__style;return u!==d&&Ac(r.style,u,d),!1}exportDOM(t){const r=Xt().createElement("pre");xs(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(df,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Jd,n));const i=this.getTheme();i&&r.setAttribute(Lp,i);const o=this.getStyle();return o&&Ac(r.style,o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||L6(t,"BR"))?{conversion:KR,priority:1}:null,div:()=>({conversion:Ree,priority:1}),pre:()=>({conversion:KR,priority:0}),table:t=>A_(t)?{conversion:Aee,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&A_(n)?{conversion:HR,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&A_(r)?{conversion:HR,priority:3}:null}}}static importJSON(t){return jn().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(!Wh(vr(),"@lexical/code")){const s=Tee(t);if(s)return s}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(ie(o)){let s=Cee(o);const a=[];for(;;)if(uu(s))a.push(hd()),s=s.getNextSibling();else{if(!U6(s))break;{let g=0;const m=s.getTextContent(),v=s.getTextContentSize();for(;g<v&&m[g]===" ";)g++;if(g!==0&&a.push(z6(" ".repeat(g))),g!==v)break;s=s.getNextSibling()}}const l=o.splitText(n.offset)[0],u=n.offset===0?0:1,d=l.getIndexWithinParent()+u,f=o.getParentOrThrow(),h=[zo(),...a];f.splice(d,0,h);const p=a[a.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(gh(o)){const{offset:s}=t.anchor;o.splice(s,0,[zo()]),o.select(s+1,s+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Ft();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 jn(e,t){return VO(Sd).setLanguage(e).setTheme(t)}function gh(e){return e instanceof Sd}function KR(e){return{node:jn(e.getAttribute(df))}}function Ree(e){const t=e,r=WR(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(WR(i))return!0;i=i.parentElement}return!1})(t)?{node:r?jn():null}:{node:null}}function Aee(){return{node:jn()}}function HR(){return{node:null}}function WR(e){return e.style.fontFamily.match("monospace")!==null}function A_(e){return e.classList.contains("js-file-line-container")}function Tee(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const r=t.getNode();if(gh(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(Hn(i)&&Hn(i.getPreviousSibling())){const o=Ft();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class Gm extends pa{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new Gm(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=T_(t.theme,this.__highlightType);return xs(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=T_(n.theme,t.__highlightType),s=T_(n.theme,this.__highlightType);return o!==s&&(o&&MS(r,o),s&&xs(r,s)),i}static importJSON(t){return z6().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 jn()}}function T_(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function z6(e="",t){return Ho(new Gm(e,t))}function U6(e){return e instanceof Gm}const B6="data-language";function j6(e){return e.style.fontFamily.match("monospace")!==null}function p1(e){let t=e.parentElement;for(;t!==null;){if(j6(t))return!0;t=t.parentElement}return!1}const $ee=C6([{$import:(e,t)=>e.$importChildren(t),match:bn.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),Nee={$import:(e,t)=>[jn(t.getAttribute(B6)).splice(0,0,e.$importChildren(t))],match:bn.tag("pre"),name:"@lexical/code/pre"},Dee={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[jn(t.getAttribute(B6)).splice(0,0,e.$importChildren(t))]:r()},match:bn.tag("code"),name:"@lexical/code/code-multiline"};function zp(e){if(!Xe(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 Fee(e){let t=!1;const r=[];let n="",i=!1;const o=()=>{i&&(r.push(n),n="",i=!1)};for(const s of Array.from(e.childNodes))if(Xe(s))s.tagName==="DIV"?(o(),r.push(s.textContent||""),t=!0):s.tagName==="BR"?(o(),r.push(""),t=!0):(n+=s.textContent||"",i=!0);else if(mi(s)){const a=s.textContent||"";a.length>0&&(n+=a,i=!0)}return o(),t?r:null}bn.tag("div"),bn.tag("div","br");const Iee={$import:(e,t,r)=>j6(t)?[jn().splice(0,0,e.$importChildren(t))]:p1(t)?e.$importChildren(t):r(),match:bn.tag("div"),name:"@lexical/code/div"};bn.tag("table").classAll("js-file-line-container"),bn.tag("td").classAll("js-file-line");const GR=new Set(["http:","https:","mailto:","sms:","tel:"]);let Jh=class q6 extends fi{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new q6(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:s=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=s}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=Xt().createElement("a");return this.updateLinkDOM(null,r,t),xs(r,t.theme.link),r}updateLinkDOM(t,r,n){if(BO(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,s=this[o];t&&t[o]===s||(s?r[i]=s:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:Pee,priority:1})}}static importJSON(t){return Yc().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=YR(t);try{const n=new URL(YR(t));if(!GR.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&&!GR.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=Mn(this);return this.insertAfter(n,r),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,n){if(!re(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 Pee(e){let t=null;if(BO(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=Yc(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Yc(e="",t){return Ho(new Jh(e,t))}function ns(e){return e instanceof Jh}let V6=class K6 extends Jh{__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 K6(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?Xt().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return JR().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=JR(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function JR(e="",t){return Ho(new V6(e,t))}function lc(e){return e instanceof V6}function QR(e,t){if(e.type==="element"){const r=e.getNode();return q(r)||(function(n,...i){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",n);for(const a of i)s.append("v",a);throw o.search=s.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 Oee(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,s=pe();if(s===null||!re(s)&&!Gt(s))return;if(Gt(s)){const d=s.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=Kt(f,p=>!lc(p)&&ns(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=Kt(f,p=>!lc(p)&&ns(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=Yc(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(s.isCollapsed()&&r===null)for(const d of s.getNodes()){const f=Kt(d,h=>!lc(h)&&ns(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const a=s.extract();if(r===null){const d=new Set;return void a.forEach(f=>{const h=Kt(f,p=>!lc(p)&&ns(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(g,m){const v=new Set(m.filter(A=>g.isParentOf(A)).map(A=>A.getKey())),_=g.getChildren(),y=A=>v.has(A.getKey())||q(A)&&m.some(N=>g.isParentOf(N)&&A.isParentOf(N)),E=_.filter(y);if(E.length===_.length)return _.forEach(A=>g.insertBefore(A)),void g.remove();const S=_.findIndex(y),k=_.findLastIndex(y),C=S===0,$=k===_.length-1;if(C)E.forEach(A=>g.insertBefore(A));else if($)for(let A=E.length-1;A>=0;A--)g.insertAfter(E[A]);else{for(let N=E.length-1;N>=0;N--)g.insertAfter(E[N]);const A=_.slice(k+1);if(A.length>0){const N=Mn(g);E[E.length-1].insertAfter(N),A.forEach(O=>N.append(O))}}})(h,a),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(a.length===1){const d=a[0],f=Kt(d,ns);if(f!==null)return u(f)}(function(d){const f=pe();if(!re(f))return d();const h=qa(f),p=h.isBackward(),g=QR(h.anchor,p?-1:0),m=QR(h.focus,p?0:-1);if(d(),g||m){const v=pe();if(re(v)){const _=v.clone();if(g){const y=g.getParent();y&&_.anchor.set(y.getKey(),g.getIndexWithinParent()+(p?1:0),"element")}if(m){const y=m.getParent();y&&_.focus.set(y.getKey(),m.getIndexWithinParent()+(p?0:1),"element")}vn(qa(_))}}})(()=>{let d=null;for(const f of a){if(!f.isAttached())continue;const h=Kt(f,ns);if(h){u(h);continue}if(q(f)){if(!f.isInline())continue;if(ns(f)){if(!(lc(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const g of f.getChildren())f.insertBefore(g);f.remove();continue}}const p=f.getPreviousSibling();ns(p)&&p.is(d)?p.append(f):(d=Yc(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const Mee=/^\+?[0-9\s()-]{5,}$/;function YR(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:Mee.test(e)?`tel:${e}`:`https://${e}`}bn.tag("a");function Dg(e,t,r=null){const n=zO(r),i=r?MO(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const s=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(s!==null&&(function(a,l){for(let u=a;u!==null;){if(u===l)return!0;u=Cu(u)}return!1})(s.offsetNode,r))return{node:s.offsetNode,offset:s.offset}}if(o){const s=r.getRootNode();if(oa(s)){const a=s.elementFromPoint(e,t);if(a!==null&&r.contains(a)){const l=(function(u,d,f,h){const p=h.createRange(),g=$=>d<$.top?$.top-d:d>$.bottom?d-$.bottom:0,m=$=>u<$.left?$.left-u:u>$.right?u-$.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let _=null,y=1/0,E=1/0;for(let $=v.nextNode();$;$=v.nextNode()){p.selectNodeContents($);for(const A of p.getClientRects()){const N=g(A),O=m(A);(N<y||N===y&&O<E)&&(y=N,E=O,_=$)}}if(_===null)return null;let S=0,k=1/0,C=1/0;for(let $=0;$<=_.length;$++){p.setStart(_,$),p.collapse(!0);const A=p.getBoundingClientRect(),N=g(A),O=Math.abs(u-A.left);(N<k||N===k&&O<C)&&(k=N,C=O,S=$)}return{node:_,offset:S}})(e,t,a,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const s=n.caretRangeFromPoint(e,t);return s===null?null:{node:s.startContainer,offset:s.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const s=n.caretPositionFromPoint(e,t);return s===null?null:{node:s.offsetNode,offset:s.offset}}return null}function mc(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 g1={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Lee(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const XR=(e,t)=>{if(!re(t))return t.insertRawText(e),!0;const r=n=>{const i=pe();re(i)&&n(i)};return mO(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([hd()])),text:n=>r(i=>i.insertText(n))}),!0},m1={"application/x-lexical-editor":[(e,t,r)=>{try{const n=vr(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return ZR(n,Hee(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=vr(),i=new DOMParser().parseFromString(Lee(e),"text/html");return ZR(n,oee(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[XR],"text/uri-list":[XR]};function zee(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 H6(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(s=>o.$importMimeType[s]!==void 0).sort((s,a)=>{const l=o.priority[s],u=o.priority[a];return l===void 0&&u===void 0?s<a?-1:s>a?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)&&zee(e.$importMimeType[i],o,r,t))return!0}return!1}const Uee={$importMimeType:m1,$insertDataTransfer:(e,t)=>H6({$importMimeType:m1,priority:g1},e,t),priority:g1},Bee={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>H6(t,r,n),priority:t.priority}),config:{$importMimeType:m1,priority:g1},mergeConfig(e,t){const r=OS(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const s=n[i];n[i]=s?[...s,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function W6(e,t=pe()){return t==null&&mc(166),re(t)&&t.isCollapsed()||t.getNodes().length===0?"":aee(e,t)}function G6(e,t=pe()){return t==null&&mc(166),re(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Kee(e,t))}function v1(e,t,r){(function(){const n=_Z(Bee.name);return n?n.output:Uee})().$insertDataTransfer(e,t)}const J6="application/x-lexical-drag";function jee(e,t){const r={editorKey:t.getKey()};e.setData(J6,JSON.stringify(r))}function qee(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(u){const d=u.getData(J6);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=Dg(u.clientX,u.clientY,d.getRootElement());if(f===null)return null;const h=du(f.node);if(h===null)return null;if(ie(h))return cl(h,"next",f.offset);if(q(h))return u1(h,f.offset,"next");const p=h.getParent();return p===null?null:u1(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const s=XO(o);if(s===null)return!1;const a=i.editorKey===t.getKey(),l=pe();if(a){if(!re(l)||l.isCollapsed())return!1;if((function(u,d){const{anchor:f,focus:h}=PS(l1(d),"next");return fh(f,u)<0&&fh(u,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return e.preventDefault(),!0;if(r(n,hh(Km(s)),t),!a){const u=t.getRootElement(),d=u?u.ownerDocument:null,f=d?(function(h,p){for(const g of LO(p)){const m=Hh(g);if(zm(m)&&m.getKey()===h&&Xe(g))return g}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function Vee(e,t){return qee(e,t,v1)}function ZR(e,t,r){e.dispatchCommand(xY,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(re(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const s=ai(i,"previous");if(s)if(oo(s))o=s.origin;else{const a=Io(s,fo(qr(),"next").getFlipped());for(const l of a){if(ie(l.origin)){o=l.origin;break}if(q(l.origin)&&!l.origin.isInline())break}}if(o&&ie(o)){const a=o.getFormat(),l=o.getStyle();n.format===a&&n.style===l||(n.format=a,n.style=l,n.dirty=!0)}}})(r))}function _1(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=q(r)&&r.excludeFromCopy("html");let s=r;t!==null&&ie(s)&&(s=r6(t,s,"clone"));const a=q(s)?s.getChildren():[],l=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&mc(58,h.name),q(d)){const p=f.children;Array.isArray(p)||mc(59,h.name)}return f})(s);ie(s)&&s.getTextContentSize()===0&&(i=!1);const u=i&&Gt(t)&&q(r)?null:t;for(let d=0;d<a.length;d++){const f=a[d],h=_1(e,u,f,l.children);!i&&q(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=io(s);if(d.length>0){const f={};for(const h of d){const p=pu(s,h);p===null&&mc(366,s.constructor.name,h);const g=[];_1(e,null,p,g),g.length===1&&g[0].type===p.getType()||mc(385,h,s.constructor.name,String(g.length),String(g.length>0?g[0].type:"none")),f[h]=g[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 Kee(e,t){const r=[],n=qr(),i=re(t)?t.anchor.getNode():Gt(t)?t.getNodes()[0]??null:null,o=i!==null?jm(i):null,s=(q(o)?o:n).getChildren();for(let a=0;a<s.length;a++)_1(e,t,s[a],r);return{namespace:e._config.namespace,nodes:r}}function Hee(e){const t=[];for(const r of e)t.push(iX(r));return t}let Qu=null;async function eA(e,t,r){if(Qu!==null)return!1;if(t!==null)return new Promise((u,d)=>{e.update(()=>{u(tA(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,s=Gn(i);if(n===null||s===null)return!1;const a=o.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(o.createTextNode("#")),n.append(a);const l=o.createRange();return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((u,d)=>{const f=e.registerCommand(Om,h=>(Ka(h,ClipboardEvent)&&(f(),Qu!==null&&(i.clearTimeout(Qu),Qu=null),u(tA(e,h,r))),!0),cX);Qu=i.setTimeout(()=>{f(),Qu=null,u(!1)},50),o.execCommand("copy"),a.remove()})}function tA(e,t,r){if(r===void 0){const i=Gn(e._window),o=pe();if(!o||o.isCollapsed()||!i)return!1;const s=uo(i,e.getRootElement()),a=s.anchorNode,l=s.focusNode;if(a!==null&&l!==null&&!Kh(e,a,l))return!1;r=Q6(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(Y6(n,r),!0)}const Wee=[["text/html",W6],["application/x-lexical-editor",G6]];function Q6(e=pe()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const s=Jee(o,r);s!==null&&(n[i]=s)}return n})(Gee(),e)}function Y6(e,t){for(const[r]of Wee)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function Gee(e=vr()){const t=Wh(e,Qee.name);return t?t.output:X6}const X6={"application/x-lexical-editor":[(e,t)=>e?G6(vr(),e):t()],"text/html":[(e,t)=>e?W6(vr(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function Jee(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const Qee={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:X6},mergeConfig(e,t){const r=OS(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const s=n[i];n[i]=s?[...s,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},Yee={$import:(e,t)=>{const r=Zs(t.nodeName.toLowerCase());return Ru(t,r),Rs(r,t),vo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:bn.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},Xee={$import:(e,t)=>{const r=wd();return Rs(r,t),Ru(t,r),vo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:bn.tag("blockquote"),name:"@lexical/rich-text/blockquote"};bn.tag("blockquote");bn.tag("p"),bn.tag("span");const rA=ze("DRAG_DROP_PASTE_FILE"),$_=jh("shadowRoot",{parse:Boolean});class Ed extends fi{static getType(){return"quote"}static clone(t){return new Ed(t.__key)}$config(){return this.config("quote",{extends:fi,stateConfigs:[{flat:!0,stateConfig:$_}]})}isShadowRoot(){return qh(this,$_)}setIsShadowRoot(t){return wc(this,$_,t)}createDOM(t){const r=Xt().createElement("blockquote");return xs(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:Zee,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(Xe(r)){this.isEmpty()&&r.append(Xt().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 wd().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=Ft(),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=Ft();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function wd(e){const t=Ho(new Ed);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function b1(e){return e instanceof Ed}let Jm=class Z6 extends fi{__tag;static getType(){return"heading"}static clone(t){return new Z6(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=Xt().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];xs(n,o)}return n}updateDOM(t,r,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Yu,priority:0}),h2:t=>({conversion:Yu,priority:0}),h3:t=>({conversion:Yu,priority:0}),h4:t=>({conversion:Yu,priority:0}),h5:t=>({conversion:Yu,priority:0}),h6:t=>({conversion:Yu,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&nA(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>nA(t)?{conversion:r=>({node:Zs("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(Xe(r)){this.isEmpty()&&r.append(Xt().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 Zs(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?Ft():Zs(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const a=Ft();a.select(),this.replace(a,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Ft();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function nA(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Yu(e){const t=e.nodeName.toLowerCase();let r=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(r=Zs(t),Ru(e,r),Rs(r,e),vo(r,e)),{node:r}}function Zee(e){const t=wd();return Rs(t,e),Ru(e,t),vo(t,e),{node:t}}function Zs(e="h1"){return Ho(new Jm(e))}function ete(e){return e instanceof Jm}function iA(e){const t=du(e);return at(t)}function Xu(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const a=e.anchor.getNode();if(ie(a)){o=a;const l=e.anchor.offset,u=l===a.getTextContentSize()&&a.getNextSibling()===null,d=l===0&&a.getPreviousSibling()===null;i=r==="end"&&u||r==="start"&&d||r==="both"&&(u||d)}}let s=!1;for(const[a,l]of Object.entries(n)){if(l==null||!l[t])continue;const u=a;if(l.onlyAtBoundary){if(!(i&&o&&ie(o)&&o.hasFormat(u)))continue;s=!0}e.hasFormat(u)&&e.toggleFormat(u)}s&&e.setStyle("")}const tte={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Up(e,t){return(function(r,n){if(!r.isCollapsed())return!1;const i=ai(r.focus,n),o=Kt(i.origin,Nc);if(!o)return!1;const s=r.focus.getNode();if(!o.is(s)&&!Jc(s,o))return!1;const a=Io(i,Tt(o,n));if(a.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=Io(a.anchor.getSiblingCaret(),a.focus);let u=l.anchor.origin;for(const f of l){if(!ul(f)||!f.origin.is(u.getParent()))return!1;u=f.origin}let d=o;for(const f of Vm(Tt(o,n))){if(!f.origin.is(d.getParent())){if(z0(f.origin)){const h=Tt(d,n);return hh(Io(h,h)),!0}break}if(!Nc(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=ai(r.anchor,n).getNodeAtCaret();return!(!Nc(i)||i.isInline()||(hh(Km(Ai(fo(i,n)))),0))})(e,t)}function oA(e){return at(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function Bp(e){const t=_g();t.add(e),vn(t)}function sA(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=ai(r,i);if(r.type==="element"&&q(n)&&(xr(n)||Nc(n))){const _=o.getNodeAtCaret();return!(_===null||!oA(_))&&(Bp(_.__key),!0)}const s=Kt(q(n)?n:n.getParentOrThrow(),_=>q(_)&&!_.isInline()&&rr(_.getParent()));if(s===null)return!1;const a=Tt(s,i).getNodeAtCaret();if(a===null||!oA(a))return!1;if(s.getTextContentSize()===0)return Bp(a.__key),!0;const l=vr().getRootElement();if(l===null)return!1;const u=Gn(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 g=u.anchorNode,m=u.anchorOffset;if(g===null)return aA(u,d,f,h,p),!1;const v=du(g);return aA(u,d,f,h,p),v===null?!1:(g===d&&m===f||!v.is(s)&&!Jc(v,s))&&(Bp(a.__key),!0)}function aA(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function lA(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=Kt(q(r)?r:r.getParentOrThrow(),v=>q(v)&&!v.isInline());if(n===null)return!1;const i=vr(),o=i.getRootElement();if(o===null)return!1;const s=o.ownerDocument.defaultView;if(s===null)return!1;let a=!1;for(const v of n.getChildren())if(q(v)&&v.isInline()){const _=i.getElementByKey(v.getKey());if(_!==null){const y=s.getComputedStyle(_).display;if(y==="inline-grid"||y==="inline-flex"){a=!0;break}}}if(!a)return!1;const l=Tt(n,t?"previous":"next").getNodeAtCaret();if(l===null||!q(l)){if(t){const v=n.getFirstDescendant();ie(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(ie(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=Gn(s);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=u.getBoundingClientRect(),g=p.top+p.height/2;if(h.height>0){const v=Dg(h.left,g,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 m=t?l.getLastDescendant():l.getFirstDescendant();if(ie(m)){const v=t?m.getTextContentSize():0;m.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function jp(e,t){const r=Tt(e,t),n=r.getAdjacentCaret();n!==null&&q(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?hh(Km(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function uA(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>Tt(l,"next")).sort(fh),o=(t?i[0]:i[i.length-1]).origin,s=Kt(o,l=>l!==o&&q(l)&&!l.isInline())??qr(),a=t?0:s.getChildrenSize();return s.select(a,a),!0}function rte(e,t=sZ(tte)){return dl(e.registerCommand(kP,()=>{const r=pe();return Gt(r)?(r.clear(),!0):(re(r)&&Xu(r,"click","both",t.peek()),!1)},st),e.registerCommand(Gl,r=>{const n=pe();return re(n)?(n.deleteCharacter(r),!0):!!Gt(n)&&(n.deleteNodes(),!0)},st),e.registerCommand(ih,r=>{const n=pe();return!!re(n)&&(n.deleteWord(r),!0)},st),e.registerCommand(oh,r=>{const n=pe();return!!re(n)&&(n.deleteLine(r),!0)},st),e.registerCommand(Cc,r=>{const n=pe();if(typeof r=="string")n!==null&&n.insertText(r);else{if(n===null)return!1;const i=r.dataTransfer;if(i!=null)v1(i,n);else if(re(n)){const o=r.data;return o&&n.insertText(o),!0}}return!0},st),e.registerCommand(I0,()=>{const r=pe();return!!re(r)&&(r.removeText(),!0)},st),e.registerCommand(No,r=>{const n=pe();return!(!re(n)&&!Gt(n))&&(aO(n,r),!0)},st),e.registerCommand(SY,r=>{const n=pe();return!(!re(n)&&!Gt(n))&&(YY(n,r),!0)},st),e.registerCommand(kY,r=>{const n=pe();if(!re(n)&&!Gt(n))return!1;const i=n.getNodes();for(const o of i){const s=Kt(o,a=>q(a)&&!a.isInline());s!==null&&s.setFormat(r)}return!0},st),e.registerCommand(kc,r=>{const n=pe();return!!re(n)&&(n.insertLineBreak(r),!0)},st),e.registerCommand(nh,()=>{const r=pe();return!!re(r)&&(r.insertParagraph(),!0)},st),e.registerCommand(EY,()=>{const r=hd(),n=pe();return re(n)&&(r.setFormat(n.format),r.setStyle(n.style)),eX([r]),!0},st),e.registerCommand(wY,()=>CR(r=>{const n=r.getIndent();r.setIndent(n+1)}),st),e.registerCommand(PC,()=>CR(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),st),e.registerCommand(PP,r=>{const n=pe();if(Gt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],"previous"),!0}else if(re(n)&&(!r.shiftKey&&Up(n,"previous")||!r.shiftKey&&sA(n,!0)||!r.shiftKey&&lA(n,!0)))return r.preventDefault(),!0;return!1},st),e.registerCommand(OP,r=>{const n=pe();if(Gt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],"next"),!0}else if(re(n)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===qr().getChildrenSize()})(n)||!r.shiftKey&&Up(n,"next")||!r.shiftKey&&sA(n,!1)||!r.shiftKey&&lA(n,!1)))return r.preventDefault(),!0;return!1},st),e.registerCommand(FP,r=>{const n=pe();if(Gt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],Ip(i[0])?"next":"previous"),!0}if(!re(n))return!1;if(!r.shiftKey&&Up(n,Ip(n.anchor.getNode())?"next":"previous"))return r.preventDefault(),!0;if(r.shiftKey||Xu(n,"arrow","start",t.peek()),wR(n,!0)){const i=r.shiftKey;return r.preventDefault(),kR(n,i,!0),!0}return!1},st),e.registerCommand(NP,r=>{const n=pe();if(Gt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],Ip(i[0])?"previous":"next"),!0}if(!re(n))return!1;if(!r.shiftKey&&Up(n,Ip(n.anchor.getNode())?"previous":"next"))return r.preventDefault(),!0;if(r.shiftKey||Xu(n,"arrow","end",t.peek()),wR(n,!1)){const i=r.shiftKey;return r.preventDefault(),kR(n,i,!1),!0}return!1},st),e.registerCommand(cS,r=>{const n=pe();if(!Gt(n)&&iA(r.target))return!1;if(re(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const s=o.getNode();if(xr(s))return!1;const a=iZ(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(PC,void 0);if(ll&&Vc)return!1}else if(!Gt(n))return!1;return r.preventDefault(),e.dispatchCommand(Gl,!0)},st),e.registerCommand(zP,r=>{const n=pe();return!(!Gt(n)&&iA(r.target))&&!(!re(n)&&!Gt(n))&&(r.preventDefault(),e.dispatchCommand(Gl,!1))},st),e.registerCommand(sh,r=>{let n=pe();if(Gt(n)){const i=n.getNodes();i.length===1&&at(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!re(n))return!1;if(Xu(n,"enter","both",t.peek()),r!==null){if((ll||Uh||Bh)&&Vc)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(kc,!1)}return e.dispatchCommand(nh,void 0)},st),e.registerCommand(LP,()=>{const r=pe();return!!re(r)&&(e.blur(),!0)},st),e.registerCommand(BP,r=>{const[,n]=Pp(r);if(n.length>0){const i=r.clientX,o=r.clientY,s=Dg(i,o,e.getRootElement());if(s!==null){const{offset:a,node:l}=s,u=du(l);if(u!==null){const d=hS();if(ie(u))d.anchor.set(u.getKey(),a,"text"),d.focus.set(u.getKey(),a,"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=qa(d);vn(f)}e.dispatchCommand(rA,n)}return r.preventDefault(),!0}return Vee(r,e)},st),e.registerCommand(jP,r=>{const[n]=Pp(r),i=pe();return!(n&&!re(i))&&(re(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(Y6(r.dataTransfer,Q6(i)),jee(r.dataTransfer,e)),!0)},st),e.registerCommand(qP,r=>{const[n]=Pp(r),i=pe();if(n&&!re(i))return!1;const o=r.clientX,s=r.clientY,a=Dg(o,s,e.getRootElement());if(a!==null){const l=du(a.node);at(l)&&r.preventDefault()}return!0},st),e.registerCommand(VP,()=>{const r=pe();return _X(re(r)&&jm(r.anchor.getNode())!==null?r:null),!0},st),e.registerCommand(Om,r=>(eA(e,Ka(r,ClipboardEvent)?r:null),!0),st),e.registerCommand(dS,r=>((async function(n,i){await eA(i,Ka(n,ClipboardEvent)?n:null),i.update(()=>{const o=pe();re(o)?o.removeText():Gt(o)&&o.getNodes().forEach(s=>s.remove())},{tag:eO})})(r,e),!0),st),e.registerCommand(uS,r=>{const[,n,i]=Pp(r);return n.length>0&&!i?(e.dispatchCommand(rA,n),!0):yd(r.target)&&xS(r.target)?!1:pe()!==null&&((function(o,s){o.preventDefault(),s.update(()=>{const a=pe(),l=Ka(o,InputEvent)||Ka(o,KeyboardEvent)?null:o.clipboardData;l!=null&&a!==null&&v1(l,a)},{tag:ZP})})(r,e),!0)},st),e.registerCommand(MP,()=>{const r=pe();return re(r)&&Xu(r,"space","both",t.peek()),!1},st),e.registerCommand(UP,()=>{const r=pe();return re(r)&&Xu(r,"tab","both",t.peek()),!1},st),e.registerCommand(DP,r=>{const n=pe();if(Gt(n))return uA(n,!1,r);if(!re(n))return!1;const{anchor:i}=n;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!q(o))return!1;const s=o.getFirstChild();if(!at(s)||!s.isInline())return!1;const a=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(a,0,"element"),r.preventDefault(),r.stopPropagation(),!0},st),e.registerCommand(IP,r=>{const n=pe();if(Gt(n))return uA(n,!0,r);if(!re(n))return!1;const{anchor:i,focus:o}=n,s=Kt(o.getNode(),u=>q(u)&&!u.isInline());if(s===null)return!1;const a=s.getFirstChild();if(!at(a)||!a.isInline()||Kt(i.getNode(),u=>q(u)&&!u.isInline())!==s)return!1;const l=s.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)},st))}function y1(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 HS(e){const t=y1(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const cA=/[!-/:-@[-`{-~\s]/,dA=/\s/,x1=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,nte=/^\s{0,3}$/;function S1(e){if(!_d(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&ie(t)&&nte.test(t.getTextContent())}function E1(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const eM=/^(\s*)(\d{1,})\.\s/,tM=/^(\s*)[-*+]\s/,ite=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,w1=/^(#{1,6})\s/,rM=/^>\s/,nM=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,k1=/^[ \t]*`{3,}$/,ote=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,ste=/^(?:\|)(.+)(?:\|)\s?$/;function ate(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 fA=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,hA=/^<\/[a-z_][\w-]*\s*>/i,pA=e=>new RegExp(`(?:${e.source})$`,e.flags),ff=jh("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),gA=jh("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),iM=jh("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function C1(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function lte(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!ie(n))return null;const i=n.getTextContent(),o=C1(i);if(o!==null){const[s,a]=o;return n.setTextContent(s),a}return/^ {2,}$/.test(i)&&(function(s,a){for(let l=a-1;l>=0;l--){if(Hn(s[l]))return!1;if(/\S/.test(s[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function oM(e){const t=zo(),r=lte(e);return r!==null&&wc(t,iM,r),t}const sM=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},aM=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),s=t.getNextSibling(),a=Ss(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],u=e!=="bullet"&&e!=="check"||l!==ff.parse(l)?void 0:l;if(nt(s)&&s.getListType()===e){u&&wc(s,ff,u);const f=s.getFirstChild();f!==null?f.insertBefore(a):s.append(a),e==="number"&&s.setStart(Number(n[2])),t.remove()}else if(nt(o)&&o.getListType()===e)u&&wc(o,ff,u),o.append(a),t.remove();else{const f=Po(e,e==="number"?Number(n[2]):void 0);u&&wc(f,ff,u),f.append(a),t.replace(f)}a.append(...r),i||a.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let g=0;return h&&(g+=h.length),p&&(g+=Math.floor(p.length/4)),g})(n[1]);d&&a.setIndent(d)},WS=(e,t,r,n)=>{const i=[],o=e.getChildren();let s=0;for(const a of o)if(kt(a)){if(a.getChildrenSize()===1){const p=a.getFirstChild();if(nt(p)){const g=WS(p,t,r+1,n);g&&i.push(g);continue}}if(n&&!a.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),u=e.getListType(),d=qh(e,ff),f=u==="number"?`${e.getStart()+s}. `:u==="check"?`${d} [${a.getChecked()?"x":" "}] `:d+" ";let h=t(a);u!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),s++}return i.join(`
|
|
29
|
+
`)},ute={dependencies:[Jm],export:(e,t)=>{if(!ete(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:w1,replace:sM(e=>{const t="h"+e[1].length;return Zs(t)}),triggerOnEnter:!0,type:"element"},cte={dependencies:[Ed],export:(e,t)=>{if(!b1(e))return null;const r=t(e).split(`
|
|
30
|
+
`),n=[];for(const i of r)n.push("> "+i);return n.join(`
|
|
31
|
+
`)},regExp:rM,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(b1(o))return o.splice(o.getChildrenSize(),0,[oM(o),...t]),void e.remove()}const i=wd();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},j0={dependencies:[Sd],export:e=>{if(!gh(e))return null;const t=e.getTextContent();let r=qh(e,gA);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,s=e[r],a=n.index+i.length,l=s.slice(a),u=new RegExp(`\`{${o},}$`);if(u.test(l)){const p=l.match(u),g=l.slice(0,l.lastIndexOf(p[0])),m=[...n];return m[2]="",j0.replace(t,null,m,p,[g],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const g=e[p];if(d.test(g)){const m=g.match(d),v=e.slice(r+1,p),_=s.slice(n[0].length);return _.length>0&&v.unshift(_),j0.replace(t,null,n,m,v,!0),[!0,p]}}const f=e.slice(r+1),h=s.slice(n[0].length);return h.length>0&&f.unshift(h),j0.replace(t,null,n,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:k1},regExpStart:nM,replace:(e,t,r,n,i,o)=>{let s,a;const l=r[1]?r[1].trim():"```",u=r[2]||void 0;if(!t&&i){if(i.length===1)n?(s=jn(u),a=i[0]):(s=jn(u),a=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(s=jn(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();a=i.join(`
|
|
34
|
+
`)}wc(s,gA,l);const d=yr(a);s.append(d),e.append(s)}else t&&sM(d=>jn(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},dte={dependencies:[Gh,$u],export:(e,t,r)=>nt(e)?WS(e,t,0,r):null,regExp:tM,replace:aM("bullet"),triggerOnEnter:!0,type:"element"},fte={dependencies:[Gh,$u],export:(e,t,r)=>nt(e)?WS(e,t,0,r):null,regExp:eM,replace:aM("number"),triggerOnEnter:!0,type:"element"},hte={format:["code"],tag:"`",type:"text-format"},pte={format:["highlight"],tag:"==",type:"text-format"},gte={format:["bold","italic"],tag:"***",type:"text-format"},mte={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},vte={format:["bold"],tag:"**",type:"text-format"},_te={format:["bold"],intraword:!1,tag:"__",type:"text-format"},bte={format:["strikethrough"],tag:"~~",type:"text-format"},yte={format:["italic"],tag:"*",type:"text-format"},xte={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Ste={dependencies:[Jh],export:(e,t,r)=>{if(!ns(e)||lc(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(Kt(e,ns))return;const[,r,n,i]=t,o=n!=null?E1(n):void 0,s=i!=null?E1(i):void 0,a=Yc(o,{title:s}),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=yr(d);return h.setFormat(e.getFormat()),a.append(h),e.replace(a),f&&a.insertBefore(yr(f)),h},trigger:")",type:"text-match"},Ete=[ute,cte,dte,fte],wte=[j0],kte=[hte,gte,mte,vte,_te,pte,yte,xte,bte],Cte=[Ste],tl=[...Ete,...wte,...kte,...Cte];function Rte(e,t=!1){const r=e.split(`
|
|
35
|
+
`);let n=0;const i=[];for(let o=0;o<r.length;o++){const s=r[o],a=s.trimEnd(),l=i[i.length-1],u=o<r.length-1?C1(s):null,d=l!==void 0&&C1(l)!==null;if(ote.test(a))i.push(a);else if(n===0){{const f=a.match(nM);if(f){n=f[1].trim().length,i.push(a);continue}}a===""||l===""||!l||w1.test(l)||w1.test(a)||rM.test(a)||eM.test(a)||tM.test(a)||ite.test(a)||ste.test(a)||ate(a)||d||!t||fA.test(a)||hA.test(a)||pA(hA).test(l)||pA(fA).test(l)||k1.test(l)?i.push(!t&&a!==""||u!==null?s:a):i[i.length-1]=l+" "+(u===null?a:s).trimStart()}else{if(k1.test(a)&&a.trim().length>=n){n=0,i.push(a);continue}i.push(s)}}return i.join(`
|
|
36
|
+
`)}function Ate(e,t,r,n,i){for(const o of t){if(!o.export)continue;const s=o.export(e,a=>Fg(a,r,n,void 0,void 0,i));if(s!=null)return s}return q(e)?Fg(e,r,n,void 0,void 0,i):at(e)?e.getTextContent():null}function Fg(e,t,r,n,i,o=!1){const s=[],a=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of a){for(const u of r){if(!u.export)continue;const d=u.export(l,f=>Fg(f,t,r,n,[...i,...n],o),(f,h)=>mA(f,h,t,n,i,o));if(d!=null){s.push(d);continue e}}Hn(l)?s.push(Tte(l)):ie(l)?s.push(mA(l,l.getTextContent(),t,n,i,o)):q(l)?s.push(Fg(l,t,r,n,i,o)):at(l)&&s.push(l.getTextContent())}return s.join("")}function Tte(e){return qh(e,iM)+`
|
|
37
|
+
`}function mA(e,t,r,n,i,o=!1){const s=e.hasFormat("code");let a,l,u,d,f=t;if(s||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),s){const{fence:y,padded:E}=(function(S){const k=S.match(/`+/g),C=k?Math.max(...k.map($=>$.length)):0;return{fence:"`".repeat(C+1),padded:S.length===0||S.includes("`")||/^\s/.test(S)&&/\s$/.test(S)?` ${S} `:S}})(t);a="",u="",l=y+E+y,d=!1}else{const y=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];a=y[1],l=y[2],u=y[3],d=l===""}let h="",p="",g="";const m=vA(e,!0),v=vA(e,!1),_=new Set;for(const y of r){const E=y.format[0],S=y.tag;E!=="code"&&_A(e,E)&&!_.has(E)&&(_.add(E),_A(m,E)&&n.find(k=>k.tag===S)||(n.push({format:E,tag:S}),h+=S))}for(let y=0;y<n.length;y++){const E=R1(e,n[y].format),S=R1(v,n[y].format);if(E&&S)continue;const k=[...n];for(;k.length>y;){const C=k.pop();i&&C&&i.find($=>$.tag===C.tag)||(C&&typeof C.tag=="string"&&(E?S||(g+=C.tag):p+=C.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+a+h+l+g+u}function vA(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return ie(r)?r:null}function R1(e,t){return ie(e)&&e.hasFormat(t)}function _A(e,t){return!!R1(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function $te(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=y=>{let E=0;for(let S=y-1;S>=0&&h[S]==="\\";S--)E++;return E%2==1},g=[];let m=0;for(;m<h.length;)if(h[m]==="`"){let y=1;for(;m+y<h.length&&h[m+y]==="`";)y++;g.push({index:m,length:y}),m+=y}else m++;const v=[];let _=0;for(;_<g.length;){const y=g[_];if(p(y.index)){_++;continue}let E=-1;for(let C=_+1;C<g.length;C++)if(g[C].length===y.length){E=C;break}if(E===-1){_++;continue}const S=g[E];let k=h.slice(y.index+y.length,S.index);k.length>=2&&k.startsWith(" ")&&k.endsWith(" ")&&/[^ ]/.test(k)&&(k=k.slice(1,-1)),v.push({content:k,endIndex:S.index+S.length,startIndex:y.index}),_=E+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 s=(function(f,h,p=[]){const g=[],m=new Set(Object.keys(h.transformersByTag).filter(E=>E[0]!=="`").map(E=>E[0])),v=E=>{let S=0;for(let k=E-1;k>=0&&f[k]==="\\";k--)S++;return S%2==1},_=E=>p.some(S=>E>=S.start&&E<S.end);let y=0;for(;y<f.length;){const E=f[y];if(!m.has(E)||v(y)||_(y)){y++;continue}let S=1;for(;y+S<f.length&&f[y+S]===E;)S++;const k=bA(E,f,y,S,!0),C=bA(E,f,y,S,!1);(k||C)&&g.push({active:!0,canClose:C,canOpen:k,char:E,index:y,length:S}),y+=S}return g})(r,t,i),a=s.length>0?(function(f,h,p){const g={};let m=0,v=null;for(;m<h.length;){const _=h[m];if(!_.active||!_.canClose||_.length===0){m++;continue}const y=`${_.char}${_.canOpen}${_.length%3}`,E=g[y]??-1;let S=!1;for(let k=m-1;k>E;k--){const C=h[k];if(!C.active||!C.canOpen||C.length===0||C.char!==_.char||(C.canClose||_.canOpen)&&(C.length+_.length)%3==0&&C.length%3!=0&&_.length%3!=0)continue;const $=Math.min(C.length,_.length),A=Object.keys(p.transformersByTag).filter(P=>P[0]===C.char&&P.length<=$).sort((P,I)=>I.length-P.length)[0];if(!A)continue;S=!0;const N=A.length,O={content:f.slice(C.index+C.length,_.index),endIndex:_.index+N,startIndex:C.index+(C.length-N),tag:A};(!v||O.startIndex<v.startIndex||O.startIndex===v.startIndex&&O.endIndex>v.endIndex)&&(v=O);for(let P=k+1;P<m;P++)h[P].active=!1;C.length-=N,_.length-=N,C.active=C.length>0,_.length>0?_.index+=N:(_.active=!1,m++);break}S||(g[y]=m-1,_.canOpen||(_.active=!1),m++)}return v})(r,s,t):null;let l=null,u=null;if(o&&a?a.startIndex<=o.startIndex&&a.endIndex>=o.endIndex?(l=a,u=t.transformersByTag[a.tag]):(l=o,u=n):o?(l=o,u=n):a&&(l=a,u=t.transformersByTag[a.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 bA(e,t,r,n,i){if(!yA(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!yA(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&x1.test(o)}return!0}function yA(e,t,r,n){const i=e[t-1],o=e[t+r],[s,a]=n?[o,i]:[i,o];return s!==void 0&&!dA.test(s)&&(!x1.test(s)||a===void 0||dA.test(a)||x1.test(a))}function Ia(e){return ie(e)&&!e.hasFormat("code")}function Pl(e,t,r){let n=$te(e,t),i=(function(s,a){const l=s;let u,d,f,h;for(const p of a){if(!p.replace||!p.importRegExp)continue;const g=l.getTextContent().match(p.importRegExp);if(!g)continue;const m=g.index||0,v=p.getEndIndex?p.getEndIndex(l,g):m+g[0].length;v!==!1&&(u===void 0||d===void 0||m<u&&(v>d||v<=u))&&(u=m,d=v,f=p,h=g)}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 s=(function(a,l,u,d,f){const h=a.getTextContent();let p,g,m;if(f[0]===h?p=a:l===0?[p,g]=a.splitText(u):[m,p,g]=a.splitText(l,u),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:g,nodeBefore:m,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);Ia(s.nodeAfter)&&Pl(s.nodeAfter,t,r),Ia(s.nodeBefore)&&Pl(s.nodeBefore,t,r),Ia(s.transformedNode)&&Pl(s.transformedNode,t,r)}else if(i){const s=(function(a,l,u,d,f){let h,p,g;return l===0?[h,p]=a.splitText(u):[g,h,p]=a.splitText(l,u),d.replace?{nodeAfter:p,nodeBefore:g,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!s)return;Ia(s.nodeAfter)&&Pl(s.nodeAfter,t,r),Ia(s.nodeBefore)&&Pl(s.nodeBefore,t,r),Ia(s.transformedNode)&&Pl(s.transformedNode,t,r)}const o=E1(e.getTextContent());e.setTextContent(o)}function Nte(e,t,r,n=!1){const i=HS(r),o=(function(u){const d={},f={},h=[];for(const p of u){const{tag:g}=p;d[g]=p;const m=g.replace(/(\*|\^|\+)/g,"\\$1");h.push(m),g.length===1?f[g]=g==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${m}])(${m})((\\\\${m})?.*?[^${m}\\s](\\\\${m})?)(${m})(?![\\\\${m}])`):f[g]=new RegExp(`(^|[^\\\\])(${m})((\\\\${m})?.*?[^\\s](\\\\${m})?)(${m})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),s=e.split(`
|
|
38
|
+
`),a=s.length;for(let u=0;u<a;u++){const d=s[u],[f,h]=Dte(s,u,i.multilineElement,t);f?u=h:Fte(d,t,i.element,o,i.textMatch,n)}const l=t.getChildren();for(const u of l)if(!n&&S1(u)&&t.getChildrenSize()>1)u.remove();else if(q(u))for(const d of u.getAllTextNodes())Ite(d)}function Dte(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:s,regExpStart:a,replace:l}=i,u=e[t].match(a);if(!u)continue;if(o){const g=o({lines:e,rootNode:n,startLineIndex:t,startMatch:u,transformer:i});if(g===null)continue;if(g)return g}const d=typeof s=="object"&&"regExp"in s?s.regExp:s,f=s&&typeof s=="object"&&"optional"in s?s.optional:!s;let h=t;const p=e.length;for(;h<p;){const g=d?e[h].match(d):null;if(!g&&(!f||f&&h<p-1)){h++;continue}if(g&&t===h&&g.index===u.index){h++;continue}const m=[];if(g&&t===h)m.push(e[t].slice(u[0].length,-g[0].length));else for(let v=t;v<=h;v++)if(v===t){const _=e[v].slice(u[0].length);m.push(_)}else if(v===h&&g){const _=e[v].slice(0,-g[0].length);m.push(_)}else m.push(e[v]);if(l(n,null,u,g,m,!0)!==!1)return[!0,h];break}}return[!1,t]}function Fte(e,t,r,n,i,o){const s=yr(e),a=Ft();a.append(s),t.append(a);for(const{regExp:l,replace:u}of r){const d=e.match(l);if(d&&(s.setTextContent(e.slice(d[0].length)),u(a,[s],d,!0)!==!1))break}if(Pl(s,n,i),a.getParent()!==null&&e.length>0){const l=a.getPreviousSibling();if(!o&&(_d(l)||b1(l)||nt(l))){let u=l;if(nt(l)){const d=l.getLastDescendant();u=d==null?null:Kt(d,kt)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[oM(u),...a.getChildren()]),a.remove())}}}function Ite(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(hd())})}function Pte(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 xA(e,t,r,n,i){const o=e.getParent();if(!rr(o)||e.getFirstChild()!==t)return!1;const s=t.getTextContent();if(!i&&s[r-1]!==" ")return!1;for(const{regExp:a,replace:l}of n){const u=s.match(a),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 SA(e,t,r,n,i){const o=e.getParent();if(!rr(o)||e.getFirstChild()!==t)return!1;const s=t.getTextContent();if(!i&&s[r-1]!==" ")return!1;for(const{regExpStart:a,replace:l,regExpEnd:u}of n){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const d=s.match(a);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,g]=t.splitText(r);if(l(e,g?[g,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function Ote(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function EA(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(lM(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function lM(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function Mte(e,t=tl){const r=HS(t),n=r.element.filter(l=>l.triggerOnEnter),i=y1(r.textFormat,({tag:l})=>l[l.length-1]),o=y1(r.textMatch,({trigger:l})=>l),s=new Set([" "]);for(const l of r.textFormat)s.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&s.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)||Pte(173,f.getType())}}const a=(l,u,d)=>!!xA(l,u,d,r.element)||!!SA(l,u,d,r.multilineElement)||!!(function(f,h,p){let g=f.getTextContent();const m=p[g[h-1]];if(m==null)return!1;h<g.length&&(g=g.slice(0,h));for(const v of m){if(!v.replace||!v.regExp)continue;const _=g.match(v.regExp);if(_===null)continue;const y=_.index||0,E=y+_[0].length;let S;return y===0?[S]=f.splitText(E):[,S]=f.splitText(y,E),S.selectNext(0,0),v.replace(S,_),!0}return!1})(u,d,o)||!!(function(f,h,p){const g=f.getTextContent(),m=h-1,v=g[m],_=p[v];if(!_)return!1;for(const y of _){const{tag:E}=y,S=E.length,k=m-S+1;if(S>1&&!lM(g,k,E,0,S)||g[k-1]===" ")continue;const C=g[m+1];if(y.intraword===!1&&C&&!cA.test(C))continue;const $=f;let A=$,N=EA(g,k,E),O=A;for(;N<0&&(O=O.getPreviousSibling())&&!Hn(O);)if(ie(O)){if(O.hasFormat("code"))continue;const G=O.getTextContent();A=O,N=EA(G,G.length,E)}if(N<0||A===$&&N+S===k)continue;const P=A.getTextContent();if(N>0&&P[N-1]===v)continue;const I=P[N-1];if(y.intraword===!1&&I&&!cA.test(I)||!y.format.includes("code")&&Ote(A,N))continue;const U=$.getTextContent(),B=U.slice(0,k)+U.slice(m+1);$.setTextContent(B);const V=A===$?B:P;A.setTextContent(V.slice(0,N)+V.slice(N+S));const W=pe(),Q=hS();vn(Q);const K=m-S*(A===$?2:1)+1;Q.anchor.set(A.__key,N,"text"),Q.focus.set($.__key,K,"text");for(const G of y.format)Q.formatText(G,ia[G]);Q.anchor.set(Q.focus.key,Q.focus.offset,Q.focus.type);for(const G of y.format)Q.hasFormat(G)&&Q.toggleFormat(G);return re(W)&&(Q.format=W.format),!0}return!1})(u,d,i);return dl(e.registerUpdateListener(({tags:l,dirtyLeaves:u,editorState:d,prevEditorState:f})=>{if(l.has(tO)||l.has(mg)||e.isComposing())return;const h=l.has(lh),p=d.read(pe),g=f.read(pe);if(!re(g)||!re(p)||!p.isCollapsed()||p.is(g)&&!h)return;const m=p.anchor.key,v=p.anchor.offset,_=d._nodeMap.get(m);if(ie(_)&&u.has(m)&&(h||v===1||!(v>g.anchor.offset+1))){if(h){const y=d.read(()=>_.getTextContent())[v-1];if(!s.has(y))return}e.update(()=>{if(!Ia(_))return;const y=_.getParent();y===null||gh(y)||a(y,_,p.anchor.offset)&&fu(XP)})}}),e.registerCommand(sh,l=>{if(l!==null&&l.shiftKey)return!1;const u=pe();if(!re(u)||!u.isCollapsed())return!1;const d=u.anchor.offset,f=u.anchor.getNode();if(!ie(f)||!Ia(f))return!1;const h=f.getParent();return h===null||gh(h)?!1:d===f.getTextContent().length&&!(!SA(h,f,d,r.multilineElement,!0)&&!xA(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},sc))}function uM(e,t=tl,r,n=!1,i=!1){const o=n?e:Rte(e,i),s=qr();s.clear(),Nte(o,s,t,n),pe()!==null&&s.selectStart()}function cM(e=tl,t,r=!1){return(function(i,o=!1){const s=HS(i),a=[...s.multilineElement,...s.element],l=!o,u=s.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||qr()).getChildren();for(let p=0;p<h.length;p++){const g=h[p],m=Ate(g,a,u,s.textMatch,o);m!=null&&f.push(l&&p>0&&!S1(g)&&!S1(h[p-1])?`
|
|
39
|
+
`.concat(m):m)}return f.join(`
|
|
40
|
+
`)}})(e,r)(t)}let dM=[Jm,Ed,Gh,$u,Jh,Sd];function ii(e){return"var("+e+")"}let Lte=w([z("flex"),gi("wrap"),ee("center"),c("gap","2px"),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),N_=w([c("background","none"),c("border","1px solid transparent"),c("border-radius",ii(Z.sm)),c("color",ii(x.textSecondary)),c("font-family","inherit"),c("font-size",ii(T.sizeSm)),c("line-height","1"),c("min-width","26px"),c("padding","5px 6px"),Ee("pointer"),He([c("background",ii(x.surfaceSubtle))])]),zte=w([c("background",ii(x.surfaceSubtle)),c("border-color",ii(x.border)),c("color",ii(x.textPrimary))]),Ute=w([Qs(.4),Ee("notAllowed")]),D_=w([c("width","1px"),c("align-self","stretch"),c("background",ii(x.borderSubtle)),c("margin","2px 4px")]),Bte=w([z("flex"),ee("center"),c("gap",ii(F.xs)),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),jte=w([mo(1),c("background",ii(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",ii(Z.sm)),c("color",ii(x.textPrimary)),c("font-family","inherit"),c("font-size",ii(T.sizeSm)),c("padding","3px 6px"),c("outline","none"),fa([c("border-color",ii(x.brand))])]);function qte(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=ue(()=>{}),s=o[1],a=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},u=h=>{n.update(()=>{let p=pe();if(p!=null&&re(p)){eZ(p,h);return}})},d=(h,p,g,m)=>{let v=g!==void 0?g:!1,_=i?N_+" "+Ute:v?N_+" "+zte:N_;return b("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:_,title:p,disabled:i,type:"button",onClick:y=>m(),onMouseDown:y=>{y.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{Oee(p===""?null:p)}),s(g=>{})};return L(Br,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(No,"bold")),d("I","Italic",r.italic,()=>l(No,"italic")),d("</>","Inline code",r.code,()=>l(No,"code")),b("span",{className:D_}),d("H1","Heading 1",void 0,()=>u(()=>Zs("h1"))),d("H2","Heading 2",void 0,()=>u(()=>Zs("h2"))),d("¶","Paragraph",void 0,()=>u(()=>Ft())),b("span",{className:D_}),d("•","Bulleted list",void 0,()=>l(O6,void 0)),d("1.","Numbered list",void 0,()=>l(M6,void 0)),d("“","Quote",void 0,()=>u(()=>wd())),d("🔗","Link",void 0,()=>s(h=>{if(!Le(h))return""})),b("span",{className:D_}),d("↩","Undo",void 0,()=>l(Im,void 0)),d("↪","Redo",void 0,()=>l(Pm,void 0))],"aria-label":"Formatting",className:Lte,role:"toolbar"}),a!==void 0?L("div",{children:[b("input",{"aria-label":"Link URL",className:jte,autoFocus:!0,placeholder:"https://…",type:"url",value:a,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(a);case"Escape":return s(g=>{});default:return}},onChange:h=>{let p=h.target.value;s(g=>p)}}),d("Apply","Apply link",void 0,()=>f(a)),d("Remove","Remove link",void 0,()=>f(""))],className:Bte}):null]})}let wA={bold:!1,italic:!1,code:!1},Vte=qte;function Kte(e){return e.trim()===""}let kA={contents:void 0};function Hte(){let e=kA.contents;if(e!==void 0)return or(e);let t=_S({namespace:"reventless-rich-text-probe",nodes:dM,onError:r=>{}});return kA.contents=Wt(t),t}function Wte(e){let t=Hte(),r={contents:""};return t.update(()=>{uM(e,tl)},{discrete:!0}),t.read(()=>{r.contents=cM(tl)}),r.contents}function Gte(e){return e.trim()!==""?e.trimEnd()!==Wte(e).trimEnd():!1}function tt(e){return"var("+e+")"}let CA=w([z("flex"),me("column"),c("background",tt(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",tt(Z.sm)),c("box-sizing","border-box"),c("transition","border-color 120ms"),jo({NAME:"percent",VAL:100}),ua("hidden"),zF([c("border-color",tt(x.brand))])]),Jte=w([c("border-color",tt(x.error)),zF([c("border-color",tt(x.error))])]),Qte=w([z("flex"),ee("center"),c("gap","2px"),c("justify-content","flex-end"),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+x.borderSubtle+")")]);function Yte(e){return w([c("background",e?tt(x.surfaceSubtle):"transparent"),c("border","1px solid "+(e?tt(x.border):"transparent")),c("border-radius",tt(Z.sm)),c("color",tt(e?x.textPrimary:x.textSecondary)),c("font-family","inherit"),c("font-size",tt(T.sizeXs)),c("padding","2px var("+F.sm+")"),Ee("pointer")])}let Xte=w([c("background",tt(x.surfaceSubtle)),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("color",tt(x.textSecondary)),c("font-size",tt(T.sizeXs)),c("line-height",tt(T.lineHeightNormal)),c("padding","var("+F.xs+") var("+F.sm+")")]),Zte=w([Pt("relative"),z("flex"),me("column")]),ere=w([Pt("absolute"),c("top","var("+F.sm+")"),c("left","var("+F.sm+")"),c("color",tt(x.textDisabled)),c("font-size",tt(T.sizeSm)),c("pointer-events","none"),c("user-select","none")]);function tre(e){return w([c("color",tt(x.textPrimary)),c("font-size",tt(T.sizeSm)),c("line-height",tt(T.lineHeightRelaxed)),c("min-height",e),c("outline","none"),c("padding",tt(F.sm)),c("word-break","break-word"),c("overflow-y","auto"),c("tab-size","4")])}let rre=w([c("margin","0 0 var("+F.sm+")")]),nre=w([c("font-size",tt(T.sizeXl)),c("font-weight",tt(T.weightBold)),c("line-height",tt(T.lineHeightTight)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),ire=w([c("font-size",tt(T.sizeLg)),c("font-weight",tt(T.weightBold)),c("line-height",tt(T.lineHeightTight)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),ore=w([c("font-size",tt(T.sizeMd)),c("font-weight",tt(T.weightBold)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),sre=w([c("border-left","3px solid var("+x.border+")"),c("color",tt(x.textSecondary)),c("margin","var("+F.xs+") 0"),c("padding-left",tt(F.md))]),RA=w([c("margin","var("+F.xs+") 0"),c("padding-left","1.5em")]),are=w([c("margin","2px 0")]),lre=w([c("color",tt(x.brand)),c("text-decoration","underline")]),ure=w([c("font-weight",tt(T.weightBold))]),cre=w([c("font-style","italic")]),dre=w([c("text-decoration","line-through")]),fre=w([c("background",tt(x.surfaceSubtle)),c("border-radius",tt(Z.sm)),c("font-family",tt(T.fontFamilyMono)),c("font-size","0.9em"),c("padding","1px 4px")]),hre=w([c("background",tt(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",tt(Z.md)),c("display","block"),c("font-family",tt(T.fontFamilyMono)),c("font-size","0.9em"),c("margin","var("+F.xs+") 0"),c("padding",tt(F.sm)),c("white-space","pre-wrap")]);function pre(e){return w([c("background","transparent"),c("border","none"),c("color",tt(x.textPrimary)),c("font-family",tt(T.fontFamilyMono)),c("font-size",tt(T.sizeSm)),c("line-height",tt(T.lineHeightNormal)),c("min-height",e),c("outline","none"),c("padding",tt(F.sm)),c("resize","vertical"),c("box-sizing","border-box"),jo({NAME:"percent",VAL:100})])}let gre=Object.fromEntries([["paragraph",rre],["quote",sre],["link",lre],["code",hre],["heading",Object.fromEntries([["h1",nre],["h2",ire],["h3",ore]])],["list",Object.fromEntries([["ul",RA],["ol",RA],["listitem",are]])],["text",Object.fromEntries([["bold",ure],["italic",cre],["strikethrough",dre],["code",fre]])]]);function mre(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,s=e.onChange,a=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=ue(()=>"Rich"),g=p[1],m=p[0],v=ue(()=>wA),_=v[1],y=ue(()=>a.trim()===""),E=y[1],S=ue(()=>!1),k=S[1],C=Qe(null),$=Qe(a),A=Qe(a),N=Qe(!1),O=Qe(s);O.current=s;let P=Mt(()=>_S({namespace:"reventless-rich-text",nodes:dM,onError:K=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",K)},theme:gre}),[]),I=()=>{let K={contents:""};return P.read(()=>{K.contents=cM(tl)}),K.contents},U=K=>{A.current=K,$.current=K,N.current=!0,k(G=>Gte(K)),P.update(()=>{uM(K,tl)})},B=()=>{let K=I();if(E(G=>K.trim()===""),_(G=>{let ne={contents:wA};return P.read(()=>{let se=pe();if(se!=null&&re(se)){ne.contents={bold:se.hasFormat("bold"),italic:se.hasFormat("italic"),code:se.hasFormat("code")};return}}),ne.contents}),N.current){N.current=!1,$.current=K;return}else return K!==$.current?($.current=K,O.current(K)):void 0},V=m==="Rich";Te(()=>{if(!V)return;P.setRootElement(C.current);let K=dl(rte(P),yee(P),Eee(P,wee(),300),Mte(P,tl),P.registerUpdateListener(G=>B()));return U(a),()=>{K(),P.setRootElement(null)}},[V]),Te(()=>{V&&a!==$.current&&a!==A.current&&U(a)},[a]),Te(()=>{P.setEditable(!h)},[h]);let W=(K,G)=>b("button",{children:G,"aria-pressed":m===K?"true":"false",className:Yte(m===K),type:"button",onClick:ne=>{if(g(se=>K),K==="Source")return k(se=>!1)}}),Q;return Q=m==="Rich"?L("div",{children:[b("div",{ref:Wt(C),"aria-label":"Rich text editor","aria-multiline":!0,className:tre(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:K=>l(),suppressContentEditableWarning:!0}),y[0]&&!h?b("div",{children:u,className:ere}):null],className:Zte}):b("textarea",{"aria-label":"Markdown source",className:pre(d),spellCheck:!1,placeholder:u,readOnly:h,value:a,onBlur:K=>l(),onChange:K=>{let G=K.target.value;$.current=G,A.current=G,s(G)}}),L("div",{children:[L("div",{children:[W("Rich","Rich text"),W("Source","Markdown")],className:Qte}),!h&&V?b(Vte,{editor:P,formats:v[0]}):null,S[0]&&V?b("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:Xte}):null,Q],className:f?CA+" "+Jte:CA})}let vre=mre;function fl(e){return"var("+e+")"}let fM=w([z("inlineFlex"),ee("center"),Ye("center"),c("background",fl(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("color",fl(x.textDisabled))]),AA=Rr([fM,w([c("width","24px"),c("height","24px"),c("border-radius",fl(Z.sm)),c("font-size",fl(T.sizeSm)),c("vertical-align","middle")])]),hM=Rr([fM,w([c("border-radius",fl(Z.md)),c("font-size",fl(T.sizeSm))])]),_re=Rr([hM,w([me("column"),c("gap",fl(F.xs)),c("aspect-ratio","4 / 3")])]),bre=Rr([hM,w([me("row"),c("gap",fl(F.sm)),c("padding","var("+F.sm+") var("+F.md+")")])]),TA=w([c("width","240px"),c("max-width","100%")]),$A=w([c("width","100%")]),NA=w([c("font-size","20px"),c("line-height","1")]),yre=w([c("position","absolute"),c("width","1px"),c("height","1px"),c("padding","0"),c("margin","-1px"),ua("hidden"),c("clip","rect(0, 0, 0, 0)"),c("white-space","nowrap"),c("border","0")]);function qp(e){return e==="Media"?"⬚":"▤"}function xre(e){return e==="Media"?"No image":"No file"}function Sre(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=D(e.label,xre(n)),s;if(s=n==="Media"?_re:bre,n==="Media"){switch(i){case"Thumb":return b("span",{children:qp(n),"aria-label":o,className:AA,role:"img",title:o})}return L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0,className:NA}),o],"aria-label":o,className:Rr([s,i==="Tile"?$A:TA]),role:"img"})}switch(i){case"Thumb":return L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0}),b("span",{children:o,className:yre})],className:AA,title:o})}return L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0,className:NA}),o],className:Rr([s,i==="Tile"?$A:TA])})}let A1=Sre;function gr(e){return"var("+e+")"}let T1=w([c("color",gr(x.brand)),c("text-decoration","none"),He([c("text-decoration","underline")])]),Ere=w([z("inlineBlock"),c("width","12px"),c("height","12px"),c("border-radius","3px"),c("border","1px solid var("+x.border+")"),c("vertical-align","-1px")]),kd=w([z("inlineFlex"),ee("center"),c("gap","6px")]),wre=w([c("height","24px"),c("width","24px"),c("object-fit","cover"),c("border-radius",gr(Z.sm)),c("border","1px solid var("+x.borderSubtle+")"),c("vertical-align","middle")]),kre=w([c("max-height","160px"),c("max-width","240px"),c("object-fit","cover"),c("border-radius",gr(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),Ee("zoomIn")]),Cre=w([c("color",gr(x.error)),c("font-size",gr(T.sizeXs)),c("font-weight",gr(T.weightMedium)),c("white-space","nowrap"),Ih(Re(6))]),Rre=w([z("inlineBlock"),c("background",gr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius","3px"),c("color",gr(x.textSecondary)),c("font-size",gr(T.sizeXs)),c("font-weight",gr(T.weightMedium)),c("letter-spacing","0.03em"),c("padding","1px 4px"),c("line-height","1.2")]),Are=w([z("inlineBlock"),c("background",gr(x.surfaceSubtle)),c("border-radius",gr(Z.full)),c("width","64px"),c("height","6px"),ua("hidden")]);function Tre(e){return w([c("background",gr(x.brand)),c("border-radius",gr(Z.full)),c("height","100%"),c("width",e.toString()+"%")])}let pM=w([c("color",gr(x.textSecondary)),c("font-size",gr(T.sizeXs)),c("font-variant-numeric","tabular-nums")]),$re=w([c("width","220px"),c("max-width","100%")]),Nre=w([z("flex"),me("column"),c("gap","1px"),c("line-height","1.35")]),Dre=w([c("background","none"),c("border","none"),c("padding","0"),Ee("zoomIn")]),Fre=w([z("inlineFlex"),c("background","none"),c("border","none"),c("padding","0"),c("line-height","0"),c("max-width","100%"),Ee("pointer"),He([c("opacity","0.75")])]),Ire=w([z("flex"),me("column"),c("gap",gr(F.xs)),c("width","100%")]),Pre=w([c("background","none"),c("border","none"),c("padding","0"),c("color",gr(x.textSecondary)),c("font-size",gr(T.sizeXs)),c("text-decoration","underline"),Ee("pointer"),He([c("color",gr(x.brand))])]),gM=w([z("flex"),me("column"),ee("flexStart"),c("gap","6px")]),mM=w([c("color",gr(x.textSecondary)),c("font-family",gr(T.fontFamilyMono)),c("font-size",gr(T.sizeXs))]),Ore=w([z("inlineBlock"),c("background","#ffffff"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",gr(Z.md)),c("padding","4px"),c("line-height","0")]),Mre=w([c("display","block"),c("max-width","260px"),c("height","auto")]);function Cd(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function vM(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),o=D(n[1],"00"),s=a=>{let l=a.length;return l<=3?a:s(a.slice(0,l-3|0))+","+a.slice(l-3|0)};return(t?"-":"")+s(i)+"."+o}function _M(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function bM(e){let t=["B","KB","MB","GB","TB","PB"],n=((a,l)=>{for(;;){let u=l,d=a;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,a=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 yM(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 Lre(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 zre(e,t){return it(t,e,(r,n)=>D(r.split(n)[0],r))}function Ig(e){let r=zre(e,["?","#"]).split("/").filter(o=>o!==""),n=D(r[r.length-1|0],""),i;try{i=decodeURIComponent(n)}catch{i=n}return i===""?"file":i}function Ure(e){let t=e.split("."),r=t.length;if(r===0||r===1)return;let n=D(t[r-1|0],"");if(/^[A-Za-z0-9]{1,5}$/.test(n))return n.toUpperCase()}function GS(e){return/^[A-Za-z]{2}$/.test(e)}function xM(e){if(GS(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let DA={contents:void 0};function Bre(){let e=DA.contents;if(e!==void 0)return or(e);let t;try{t=Wt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return DA.contents=Wt(t),t}function JS(e){if(!GS(e))return e;let t=Bre();if(t===void 0)return e;try{let r=or(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let jre=["street","streetaddress","line1","addressline1","address1"],qre=["line2","addressline2","address2","apartment","unit","suite"],Vre=["postalcode","zip","zipcode","postcode"],Kre=["city","town","locality"],Hre=["state","region","province","county"],Wre=["country","countrycode"];function Gre(e){let t=rt(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 SM(e){let t=rt(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=Ge(t._0),i=u=>R(n.find(d=>u.includes(d[0].toLowerCase())),d=>Gre(d[1])),o=i(Vre),s=i(Kre),a=o!==void 0?s!==void 0?o+" "+s:o:s!==void 0?s:void 0,l=oe([i(jre),i(qre),a,i(Hre),i(Wre)],u=>u).map(u=>u.trim()).filter(u=>u!=="");return l.length===0?void 0:l;default:return}}function Jre(e){return J(SM(e),t=>t.map(r=>GS(r)?JS(r):r).join(", "))}function Qre(e){let t=xM(e);return t!==void 0?t+" "+JS(e):e}function Vp(e){return fe(J(Hf(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function FA(e,t){let r=Hf(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let QS={};function Ar(e,t){QS[Oh(e)]=t}function Yre(e){return M(QS,Oh(e))}function Qh(e,t){return R(Cm(e,t),r=>M(QS,Oh(r.semantic)))}function EM(e,t,r){return R(Qh(e,t),n=>n.cell(e,t,r))}function $1(e,t,r){return R(Qh(e,t),n=>n.detail(e,t,r))}function Xre(e,t){return EM(e,t,null)}function Zre(e,t){return $1(e,t,null)}function ene(e,t){return fe(Qh(e,t),!1,r=>Le(r.input))}function tne(e,t,r,n,i,o,s){return J(R(Qh(e,t),a=>a.input),a=>a(e,t,r,n,i,o,s))}function rne(e,t,r,n){return R(R(Qh(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function Pg(e){e.stopPropagation()}function Og(e,t,r){return r?b("a",{children:t,className:T1,href:e,rel:"noopener noreferrer",target:"_blank",onClick:Pg}):b("a",{children:t,className:T1,href:e,onClick:Pg})}function Wn(e){return R(de(e),t=>{if(t!=="")return t})}function YS(e){let t=(r,n,i)=>J(Wn(i),e);return{cell:t,detail:t}}function Qm(e){let t=(r,n,i)=>J(_s(i),o=>e(o));return{cell:t,detail:t}}Ar("Email",YS(e=>Og("mailto:"+e,e,!1)));Ar("Phone",YS(e=>Og("tel:"+e,e,!1)));Ar("Url",{cell:(e,t,r)=>J(Wn(r),n=>Og(n,Cd(n,40),!0)),detail:(e,t,r)=>J(Wn(r),n=>Og(n,n,!0))});Ar("Currency",Qm(vM));Ar("Percent",Qm(_M));Ar("Bytes",Qm(bM));Ar("Duration",Qm(yM));Ar("Color",YS(e=>L("span",{children:[b("span",{className:Ere,style:{background:e}}),e],className:kd})));function nne(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function Mg(e){let t=e.size,r=e.kind,n=bK(e.field);if(n===void 0)return b(A1,{kind:r,size:t});let i=nne(r);return b("button",{children:b(A1,{kind:r,size:t,label:i[1]}),className:Fre,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function ine(e){let t=e.alt,r=e.src,n=ue(()=>!1);if(r===void 0)return b(Mg,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(Br,{children:[b("button",{children:b("img",{className:kre,alt:t,src:r}),className:Dre,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(s=>!0)}}),n[0]?b(gI,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function Lg(e){let t=rt(e);if(typeof t!="object")return t==="JSONNull"?Wt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Wt(r===""?void 0:r)}Ar("Image",{cell:(e,t,r)=>J(Lg(r),n=>n!==void 0?b("img",{className:wre,alt:e,src:Uc(n),onClick:Pg}):b(Mg,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>J(Lg(r),n=>b(ine,{src:J(n,Uc),alt:e,field:e}))});function one(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 sne(e){return L("span",{children:[b(ud,{name:e,size:"Small"}),e],className:kd})}function IA(e,t,r){return R(Wn(r),n=>{if(!one(n))return sne(n)})}Ar("UserRef",{cell:IA,detail:IA});Ar("Markdown",{cell:(e,t,r)=>J(Wn(r),n=>Cd(Lre(n),80)),detail:(e,t,r)=>J(Wn(r),n=>b(XI,{source:n})),input:(e,t,r,n,i,o,s)=>b(vre,{value:r,onChange:n,onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(n&&Kte(r))return"Required"}});Ar("Rating",{cell:(e,t,r)=>J(_s(r),n=>b(r_,{value:n,max:Vp(t)})),detail:(e,t,r)=>J(_s(r),n=>b(r_,{value:n,max:Vp(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,s)=>b(r_,{value:D(ol(r),0),max:Vp(t),size:"Medium",showValue:!0,onChange:a=>n(a<=0?"":a.toString()),onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=ol(r);if(i===void 0)return"Invalid rating";let o=Vp(t);if(i<0||i>o)return"Must be between 0 and "+o.toString()}});function ane(e){return e<0?0:e>100?100:e}Ar("Progress",{cell:(e,t,r)=>J(_s(r),n=>{let i=ane(FA(t,n));return L("span",{children:[b("span",{children:b("span",{className:Tre(i)}),className:Are}),b("span",{children:Math.round(i).toString()+"%",className:pM})],className:kd})}),detail:(e,t,r)=>J(_s(r),n=>b("div",{children:b(_I,{value:FA(t,n)}),className:$re}))});function XS(e,t){let r=Uc(e),n=Ure(t);return L("span",{children:[n!==void 0?b("span",{children:n,className:Rre}):null,b("a",{children:t,className:T1,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:Pg})],className:kd})}function wM(e){let t=e.name,r=e.href,n=ue(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[XS(r,t),WH(r)?b("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:Pre,type:"button",onClick:s=>{s.stopPropagation(),i(a=>!a)}}):null],className:kd}),o?b(JH,{src:Uc(r),title:t,height:"60vh"}):null],className:Ire})}Ar("FileUrl",{cell:(e,t,r)=>J(Wn(r),n=>XS(n,Cd(Ig(n),40))),detail:(e,t,r)=>J(Wn(r),n=>b(wM,{href:n,name:Ig(n)}))});Ar("File",{cell:(e,t,r)=>J(Lg(r),n=>n!==void 0?XS(n,Cd(Ig(n),40)):b(Mg,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>J(Lg(r),n=>n!==void 0?b(wM,{href:n,name:Ig(n)}):b(Mg,{field:e,kind:"Document",size:"Detail"}))});function lne(e){let t=xM(e);return t!==void 0?L("span",{children:[b("span",{children:t,"aria-hidden":!0}),JS(e)],className:kd}):e}function PA(e,t,r){return J(Wn(r),lne)}Ar("Country",{cell:PA,detail:PA});Ar("Address",{cell:(e,t,r)=>J(Jre(r),n=>Cd(n,60)),detail:(e,t,r)=>J(SM(r),n=>b("span",{children:n.map((i,o)=>b("span",{children:Qre(i)},o.toString())),className:Nre}))});function une(e){return J(R(R(Y(e),t=>M(t,"maxLength")),_s),t=>t|0)}function F_(e){let t=R(bs(e).channel,n=>fW(n).maxLength),r=une(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}Ar("ChannelText",{cell:(e,t,r)=>J(Wn(r),n=>{let i=R(F_(t),o=>{if(Sc(n)>o)return Sc(n)-o|0});return L("span",{children:[Cd(n,80),i!==void 0?b("span",{children:i.toString()+" over",className:Cre}):null]})}),detail:(e,t,r)=>{let n=Wn(r),i=bs(t).channel;if(n!==void 0&&i!==void 0)return b(HQ,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,s)=>{let a=R(bs(t).channel,yI);return b(FQ,{value:r,onChange:n,onBlur:i,maxLength:F_(t),channelLabel:J(a,l=>l.label),hasError:s,note:R(a,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":R(F_(t),i=>{let o=Sc(r);if(o>i)return eP(o-i|0)+" over the "+i.toString()+"-character limit"})});Ar("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>J(Wn(r),n=>L("span",{children:[b(EH,{value:n}),b("span",{children:n,className:mM})],className:gM}))});Ar("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>J(Wn(r),n=>L("span",{children:[b(IH,{value:n}),b("span",{children:n,className:mM})],className:gM}))});Ar("Signature",{cell:(e,t,r)=>R(Wn(r),n=>{if(Bk(n))return b("span",{children:"✓ Signed",className:pM})}),detail:(e,t,r)=>R(Wn(r),n=>{if(Bk(n))return b("span",{children:b("img",{className:Mre,alt:"Signature",src:wI(n)}),className:Ore})}),input:(e,t,r,n,i,o,s)=>b(SW,{value:r,onChange:n,onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function mh(e){return"var("+e+")"}let cne=w([z("inlineFlex"),ee("center"),gi("wrap"),c("gap","4px"),c("font-size",mh(T.sizeSm)),c("min-width","0")]),dne=w([c("color",mh(x.textDisabled)),c("font-size",mh(T.sizeXs))]),fne=w([c("color",mh(x.brand)),c("text-decoration","none"),He([c("text-decoration","underline")])]),hne=w([c("color",mh(x.textPrimary))]);function pne(e){let t=e.segments,r=yl();return b("span",{children:t.map((n,i)=>{let o=i===(t.length-1|0),s=n.href;return L(Tx,{children:[s!==void 0?b("a",{children:n.label,className:fne,href:s,onClick:a=>{if(!(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.button!==0))return a.preventDefault(),a.stopPropagation(),r(s)}}):b("span",{children:n.label,className:hne}),o?null:b("span",{children:" › ",className:dne})]},i.toString()+":"+n.label)}),className:cne})}let gne=pne;function OA(e){return R(R(Y(e),t=>M(t,"type")),de)}function ZS(e){return R(R(Y(e),t=>M(t,"format")),de)}function mne(e){return R(Y(e),t=>M(t,"items"))}function MA(e){return Le(R(R(Y(e),t=>M(t,"properties")),Y))}function Xc(e){let t=e.toLowerCase(),r=e.length,n=o=>{let s=o.length;if(r>s&&t.endsWith(o))return e.slice(0,r-s|0)},i=n("ids");return i!==void 0?i:n("id")}function vne(e,t,r){let n=ui(t);if(e==="compositeId")return"KCompositeId";let i=cd(n);if(i!==void 0)return{TAG:"KEnum",_0:i};let o=OA(n),s=0;if(o!==void 0)switch(o){case"array":let a=mne(n);if(a===void 0)return"KArrayOfStrings";if(MA(a)||We(OA(a),"object"))return{TAG:"KArrayOfObjects",_0:a};let l=Xc(e);return l!==void 0?{TAG:"KArrayOfEntityIds",_0:l}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return MA(n)?{TAG:"KNestedObject",_0:n}:"KString";default:s=1}else s=1;if(s===1){let a=ZS(n),l=0;if(a!==void 0)switch(a){case"date":case"date-time":return"KDate";default:l=2}else l=2;if(l===2){if(r.isId)return"KString";let u=Xc(e);return u!==void 0?{TAG:"KEntityId",_0:u}:"KString"}}}function _ne(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function bne(e,t,r){return t.isCompositeId?!0:r.includes(e)}function yne(e,t,r,n,i){return t.hidden||_ne(e)||n&&bne(e,t,i)?!1:r?t.summary||t.isId||e==="compositeId"?!0:n?!1:e==="id":!(n&&e==="id")}function xne(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 Sne(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 To(e,t){let r=t!==void 0?t:"List",n=D(J(R(R(Y(e),u=>M(u,"properties")),Y),Ge),[]),i=wm(e),o=r==="List"&&i.length!==0,s=Vx(e),a=s.length!==0||n.some(u=>u[0]==="compositeId");return oe(n,u=>{let d=u[1],f=u[0],h=bs(d);if(!yne(f,h,o,a,s))return;let p=vne(f,d,h),g=D(R(R(Y(d),m=>M(m,"title")),de),mt(f));return{key:f,label:g,kind:p,ann:h,propSchema:d,priority:xne(f,p,h),width:Sne(p,f)}}).toSorted((u,d)=>u.priority-d.priority|0)}function Ene(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function kM(e){return b(ra,{variant:"Neutral",label:e,dot:!1})}function LA(e,t,r,n,i){let o=ha(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[na(o.pluginId,o.name,t,[]),t]}function zA(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 zg(e,t,r){let n=ha(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function N1(e,t,r,n,i,o,s,a,l){let u=l!==void 0?l:!1,d=zg(t,n,s),f=D(a,ZF(t)),h=m=>{let v=LA(t,m,n,i,s),_=v[1],y=d?[_,!1]:zA(t,_,o),E=y[0],S=b(iK,{href:v[0],label:E,rawValue:_}),k=f&&E!==_?L("span",{children:[b(ud,{name:E,size:"Small"}),S],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):S;return y[1]?b("span",{children:k,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+_+")"}):k},p=m=>{let v=oe(m,_=>{let E=LA(t,_,n,i,s)[1],k=zA(t,E,o)[0];if(k!==E)return{name:k}});if(u&&f&&!d&&m.length>=2&&v.length===m.length)return b(WF,{members:v,size:"Small"})},g=rt(r);if(typeof g!="object")return JSON.stringify(r);switch(g.TAG){case"JSONString":return h(g._0);case"JSONArray":let m=g._0,v=oe(m,de),_=v.length===m.length?p(v):void 0;return _!==void 0?_:b("span",{children:m.map((y,E)=>{let S=rt(y);return typeof S!="object"||S.TAG!=="JSONString"?null:L("span",{children:[h(S._0),E<(m.length-1|0)?", ":null]},E.toString())})});default:return JSON.stringify(r)}}function wne(e){let t=rt(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(gne,{segments:r})}function Co(e,t,r){let n=rt(r);if(typeof n!="object")switch(n){case"JSONFalse":return b(ra,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return b(ra,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=HF(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return jx(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function UA(e,t){let r=Y(t);if(r===void 0)return;let n=M(r,"name");if(n!==void 0&&rt(n)!=="JSONNull")return Co("name",void 0,n);let i=To(e,"Drill"),o=oe(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 g=rt(p);if(!(typeof g!="object"&&g==="JSONNull"))return[d,p]});if(o.length===0)return;let s=o.slice(0,2),a=i.length-s.length|0,l=s.map((d,f)=>{let h=d[1],p=d[0],g=p.kind,m;if(typeof g!="object")m=g==="KDate"?Co(p.key,ZS(p.propSchema),h):Co(p.key,void 0,h);else if(g.TAG==="KEnum"){let v=rt(h);m=typeof v!="object"||v.TAG!=="JSONString"?Co(p.key,void 0,h):kM(v._0)}else m=Co(p.key,void 0,h);return L("span",{children:[f>0?" · ":null,m]},f.toString())}),u=a>0?b("span",{children:"+"+a.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return L("span",{children:[l,u],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function Yl(e,t,r,n,i,o,s,a,l){let u=i!==void 0?i:QF;if(n===void 0)return D(Xre(e,r),"—");let d=EM(e,r,n);if(d!==void 0)return d;if(typeof t!="object")switch(t){case"KCompositeId":return wne(n);case"KDate":return Co(e,ZS(r),n);case"KBoolean":case"KNumber":return Co(e,void 0,n);case"KString":let h=rt(n);if(typeof h!="object"||h.TAG!=="JSONString")return Co(e,void 0,n);let p=h._0;return p.length>60?b("span",{children:Ene(p,60),title:p}):Co(e,void 0,n);case"KArrayOfStrings":let g=D(J(mr(n),m=>oe(m,de)),[]);return b(KF,{items:g})}else switch(t.TAG){case"KEnum":let h=rt(n);return typeof h!="object"||h.TAG!=="JSONString"?Co(e,void 0,n):kM(h._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let p=t._0,g=D(mr(n),[]),m=g.length;if(u.collapsed){let S=g[0];return S!==void 0?BA(p,S,o,s,a,l):b(Sf,{count:m,label:"items"})}let v=R(g[0],S=>UA(p,S));return v!==void 0?L("span",{children:[v,m>1?b("span",{children:"+"+(m-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):b(Sf,{count:m,label:"items"});case"KNestedObject":let _=t._0;if(u.collapsed)return BA(_,n,o,s,a,l);let y=UA(_,n);if(y!==void 0)return y;let E=D(J(Y(n),S=>Object.keys(S).length),0);return b(Sf,{count:E,label:"fields"})}let f=fe(Cm(e,r),!1,h=>h.semantic==="UserRef");return N1(e,t._0,n,o,s,a,l,f?!0:void 0,!0)}function BA(e,t,r,n,i,o){let s=D(Y(t),{}),a=To(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:a.map(l=>L("div",{children:[b("span",{children:l.label,style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),b("span",{children:Yl(l.key,l.kind,l.propSchema,M(s,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 kne(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}}function Cne(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function jA(e,t,r,n){let i=ha(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 Rne(e,t,r,n,i,o,s,a){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=zg(h,t,s)?l.label:jA(h,!1,t,l.label);break;case"KArrayOfEntityIds":let p=u._0;d=zg(p,t,s)?l.label:jA(p,!0,t,l.label);break;default:d=l.label}let f=fe(Cm(l.key,l.propSchema),!1,h=>h.semantic==="Image"?!0:h.semantic==="File");return{key:l.key,label:d,render:h=>{let p=Yl(l.key,l.kind,l.propSchema,n(h,l.key),l.ann,t,r,o,s);return a!==void 0&&f?b(JF.make,{fill:g=>a(h,g),children:p}):p},sortable:kne(l.kind),width:l.width}})}let CM=ur(void 0),Ane=CM.Provider;function Tne(e){return Sr(Ane,{value:e.execute,children:e.children})}let $ne={make:Tne};function _i(){return It(CM)}let RM={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function AM(e,t){let r=Y(e),n=R(R(R(r,i=>M(i,"data")),Y),i=>M(i,t));return n!==void 0?n:R(r,i=>M(i,t))}function eE(e,t){let r=AM(e,t),n=R(r,mr);return n!==void 0?n:oe(D(R(R(R(r,Y),i=>M(i,"edges")),mr),[]),i=>R(Y(i),o=>M(o,"node")))}function TM(e,t){return oe(eE(e,t),Y)}function $M(e,t){let r=(i,o)=>D(R(M(i,o),bF),!1),n=(i,o)=>R(M(i,o),de);return fe(R(R(R(AM(e,t),Y),i=>M(i,"pageInfo")),Y),RM,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function Nne(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function Dne(e,t){return e.hasNextPage?!0:t==="Backward"}function Fne(e,t){return e.hasPreviousPage?!0:t==="Forward"}let Ine={};function Yh(e,t,r,n){return R(ha(r,t),i=>R(M(e,i.queryField),o=>M(o.labels,n)))}function Ym(e,t,r,n){let i=ha(r,t);if(i===void 0)return!1;let o=M(e,i.queryField);return o!==void 0&&o.loaded?Pi(M(o.labels,n)):!1}function Pne(e){let t=rt(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return oe(t._0,de).filter(n=>n!=="");default:return[]}}function One(e,t,r){let n={};return t.forEach(i=>{let o=i.kind;if(typeof o!="object")return;switch(o.TAG){case"KEntityId":case"KArrayOfEntityIds":break;default:return}let s=ha(r,o._0);if(s===void 0)return;let a=s.queryField,u={contents:D(M(n,a),[])};e.forEach(d=>{let f=M(d,i.key);if(f!==void 0){Pne(f).forEach(h=>{if(!u.contents.some(p=>p===h)){u.contents.push(h);return}});return}}),n[a]=u.contents}),n}function Mne(e){return Ge(e).toSorted((r,n)=>jf(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(jf).join(",")).join("|")}function Lne(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 NM(e,t,r){let n={};return TM(e,t).forEach(i=>{let o=R(M(i,"id"),de),s=D(R(M(i,r),de),"");if(o===void 0)return;let a=Lne(o),l=r==="id"?a!==void 0?a:o:s===""?o:s;if(n[o]=l,a!==void 0){n[a]=l;return}}),n}function Xh(e,t,r){let n=_i(),i=ue(()=>Ine),o=i[1],s=One(e,t,r),a=Mne(s);return Te(()=>{let l={contents:!1};return a!==""&&n!==void 0&&Ge(s).forEach(u=>{let d=u[1];if(d.length===0)return;let f=u[0],h=r.find(_=>_.queryField===f);if(h===void 0)return;let p=h.labelField,g=p==="id"?"id":"id "+p,m="query($ids: [ID!]) { "+f+"(first: "+d.length.toString()+", filter: {ids: $ids}) { edges { node { "+g+" } } } }",v={};v.ids=d.map(_=>_),Vt(n(m,v).then(_=>{if(!l.contents){let y=NM(_,f,p);o(E=>{let S=dt(Ge(E));return S[f]={loaded:!0,labels:y},S})}return Promise.resolve()}),_=>(l.contents||(console.warn("[AutoUI] RefLabel batch "+f+" failed; cells fall back to raw ids",_),o(y=>{let E=dt(Ge(y));return E[f]={loaded:!0,labels:{}},E})),Promise.resolve()))}),()=>{l.contents=!0}},[a,n]),i[0]}let aa="table",La={contents:[]};function Wo(e){La.contents.some(t=>t.id===e.id)?La.contents=La.contents.map(t=>t.id===e.id?e:t):La.contents=La.contents.concat([e])}function DM(e){return La.contents.find(t=>t.id===e)}function Ug(){return La.contents}function tE(e){let t=La.contents.filter(r=>{let n=r.arity;return typeof n!="object"||n.TAG==="Multi"?r.isCapable(e):!1});return t.filter(r=>r.id===aa).concat(t.filter(r=>r.id!==aa))}function rE(e){return IV(e.map(t=>t.window))}function zne(e){return it(e,0,(t,r)=>t+r.rows.length|0)}function Zh(e,t,r){let n=r!==void 0?r:"item";return BF(rE(e),zne(e),t,n)}function nE(e){try{return vs(localStorage.getItem(e))}catch{return}}function FM(e,t){try{return localStorage.setItem(e,t)}catch{return}}function IM(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+fe(r,"",n=>"."+n)}function Ha(e){return"var("+e+")"}let PM=w([z("inlineFlex"),ee("center"),c("border","1px solid var("+x.border+")"),c("border-radius",Ha(Z.md)),c("overflow","hidden")]),iE=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","2px var("+F.sm+")"),c("color",Ha(x.textSecondary)),c("font-size",Ha(T.sizeSm)),Ee("pointer"),He([c("background",Ha(x.surfaceSubtle)),c("color",Ha(x.textPrimary))])]),OM=Rr([iE,w([c("background",Ha(x.surfaceSubtle)),c("color",Ha(x.textPrimary)),c("font-weight",Ha(T.weightMedium))])]),Une={group:PM,btn:iE,btnActive:OM};function Bne(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?OM:iE,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:PM,role:"group"})}let hf={Style:Une,make:Bne};function jne(e){let t=e.source,r=ws(),n=hm(),i=To(t.schema,"List"),o=t.rows.map((f,h)=>{let p=D(Y(f),{});return{rowKey:D(R(M(p,"id"),de),"#"+h.toString()),json:f,dict:p}}),s=Xh(o.map(f=>f.dict),i,r),u={lookupLabel:(f,h)=>Yh(s,f,r,h),isMissing:(f,h)=>Ym(s,f,r,h)},d=i.map(f=>({key:f.key,label:f.label,render:h=>Yl(f.key,f.kind,f.propSchema,M(h.dict,f.key),f.ann,r,n,u,void 0),sortable:!1,width:f.width}));return b(ng,{columns:d,data:o,keyFn:f=>f.rowKey,onRowClick:f=>t.onOpenRow(f.rowKey,f.json)})}let qne=b("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});Wo({id:aa,label:"Table",icon:qne,arity:"Single",isCapable:e=>!0,render:e=>{let t=e[0];return t!==void 0?b(jne,{source:t}):null},capability:"always — the universal default"});let qA=["resources","events"],VA=["split","full"],KA=["funnel","scatter"],D1={};function ro(e,t){return R(e.views,r=>M(r,t))}function hl(e,t){return R(e.fields,r=>M(r,t))}function ho(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function Qi(e,t,r){let n=e[t];if(n===void 0)return;let i=_e.string(n);if(i!==void 0)return i;ho(r+"."+t,"expected a string — dropped")}function HA(e,t,r){let n=e[t];if(n===void 0)return;let i=_e.bool(n);if(i!==void 0)return i;ho(r+"."+t,"expected a boolean — dropped")}function Vne(e,t,r){let n=e[t];if(n===void 0)return;let i=_e.array(n);if(i!==void 0)return oe(i,_e.string);ho(r+"."+t,"expected an array of strings — dropped")}function WA(e,t,r,n){let i=e[t];if(i===void 0)return;let o=_e.object(i);if(o!==void 0){let s={};return Object.entries(o).forEach(a=>{let l=a[0];ae(n(a[1],r+"."+t+'["'+l+'"]'),u=>{s[l]=u})}),s}ho(r+"."+t,"expected an object — dropped")}function MM(e,t){let r=_e.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],s=_e.string(i[1]);if(s!==void 0){n[o]=s;return}else return ho(t+"."+o,"expected a string — dropped")}),n}ho(t,"expected an object of string values — dropped")}function Kne(e,t){let r=_e.object(e);if(r!==void 0){let n=r.transitions;return{mode:Qi(r,"mode",t),layout:Qi(r,"layout",t),canvas:Qi(r,"canvas",t),role:Qi(r,"role",t),resourceRef:Qi(r,"resourceRef",t),accent:Qi(r,"accent",t),audit:HA(r,"audit",t),presence:HA(r,"presence",t),suppress:Vne(r,"suppress",t),transitions:n!==void 0?MM(n,t+".transitions"):void 0}}ho(t,"expected an object — dropped")}function Hne(e,t){let r=_e.object(e);if(r!==void 0){let n=Qi(r,"view",t);if(n!==void 0)return{view:n,label:Qi(r,"label",t),field:Qi(r,"field",t),aggregate:Qi(r,"aggregate",t),viz:Qi(r,"viz",t),xField:Qi(r,"xField",t)};ho(t,"metric without a `view` — dropped");return}ho(t,"expected an object — dropped")}function Wne(e,t){let r=e!==void 0?e:"ui-hints",n=_e.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let s=_e.array(i);s!==void 0?o=lF(s,(a,l)=>Hne(a,r+".dashboard["+l.toString()+"]")):(ho(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:WA(n,"views",r,Kne),fields:WA(n,"fields",r,MM),dashboard:o}}return ho(r,"expected an object — no hints applied"),D1}function Gne(e){let t=_e.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=Wne('ui-hints["'+i+'"]',n[1])}),r}return ho("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function Jne(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];Le(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function uc(e){return D(J(R(R(Y(ui(e)),t=>M(t,"properties")),Y),t=>Object.keys(t)),[])}function Qne(e,t){return R(R(J(R(R(R(Y(ui(e)),r=>M(r,"properties")),Y),r=>M(r,t)),ui),Y),r=>M(r,"items"))}function I_(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(s=>s.name===n),o=i!==void 0?i.schema:J(e.stateViewSlices.find(s=>s.name===n),s=>s.schema);return o!==void 0?it(r.slice(1),{TAG:"Ok",_0:{schema:o}},(s,a)=>{if(s.TAG!=="Ok")return s;let l=s._0.schema,u=Qne(l,a);return u!==void 0?{TAG:"Ok",_0:{schema:u}}:uc(l).includes(a)?fe(R(R(R(Y(ui(l)),d=>M(d,"properties")),Y),d=>M(d,a)),{TAG:"Error",_0:'unresolvable path segment "'+a+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+a+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(s=>s.name).concat(e.stateViewSlices.map(s=>s.name)).join(", ")}}function Yne(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 LM(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.statusField:R(e.stateViewSlices.find(n=>n.name===t),n=>n.statusField)}function Xne(e,t,r){let n=Dh(LM(e,t),jr(r,void 0,void 0).statusField);return n!==void 0?qo(r,n):[]}function Zne(e){return Xr(e).filter(t=>il(t[1])).map(t=>t[0])}function GA(e,t){if(DM(e)!==void 0)return;let n=Ug().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function eie(e,t){let r=[],n=i=>{r.push("[AutoUI] uiHints ("+t.id+"): "+i)};return ae(e.views,i=>{Ge(i).forEach(o=>{let s=o[1],a=o[0],l=I_(t,a);l.TAG!=="Ok"&&n('views["'+a+'"]: '+l._0),ae(s.role,u=>{if(!qA.includes(u))return n('views["'+a+'"].role: unknown role "'+u+'" — expected '+qA.join(" or "));if(u!=="events")return;let d=s.resourceRef;return d!==void 0?l.TAG==="Ok"&&!uc(l._0.schema).includes(d)?n('views["'+a+'"].resourceRef: unknown field "'+d+'"'):void 0:n('views["'+a+'"]: role "events" requires a resourceRef field')}),ae(s.resourceRef,u=>{if(qf(s.role,"events"))return n('views["'+a+'"].resourceRef: only meaningful with role "events"')}),ae(s.transitions,u=>{let d=Yne(t),f=LM(t,a),h;h=l.TAG==="Ok"?f!==void 0?qo(l._0.schema,f):[]:[],h.length===0&&n('views["'+a+'"].transitions: the view declares no status enum, so no transition can apply'),Ge(u).forEach(p=>{let g=p[1],m=p[0];if(d.includes(g)||n('views["'+a+'"].transitions["'+m+'"]: unknown command "'+g+'" — known commands: '+d.join(", ")),h.length!==0&&!h.includes(m))return n('views["'+a+'"].transitions: unknown target state "'+m+'" — known states: '+h.join(", "))})}),ae(s.mode,u=>ae(GA(u,'views["'+a+'"].mode'),n)),ae(s.layout,u=>{if(!VA.includes(u))return n('views["'+a+'"].layout: unknown layout "'+u+'" — expected '+VA.join(" or "))}),ae(s.suppress,u=>{u.forEach(d=>{if(ae(GA(d,'views["'+a+'"].suppress'),n),d===aa)return n('views["'+a+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),ae(e.fields,i=>{Ge(i).forEach(o=>{let s=o[0],a=I_(t,s);if(a.TAG!=="Ok")return n('fields["'+s+'"]: '+a._0);let l=uc(a._0.schema);Ge(o[1]).forEach(u=>{let d=u[1],f=u[0];if(l.includes(f)||n('fields["'+s+'"]: unknown field "'+f+'"'),Pi(Hx(d)))return n('fields["'+s+'"].'+f+': unknown semantic "'+d+'"')})})}),ae(e.dashboard,i=>{i.forEach(o=>{let s=D(o.aggregate,"count");["count","sum","avg"].includes(s)?s!=="count"&&Pi(o.field)&&n('dashboard metric on "'+o.view+'": aggregate "'+s+'" requires a field'):n('dashboard metric on "'+o.view+'": unknown aggregate "'+s+'" — expected count, sum, or avg');let a=I_(t,o.view);if(a.TAG!=="Ok")return n("dashboard metric: "+a._0);let l=a._0.schema;ae(o.field,u=>{if(!uc(l).includes(u))return n('dashboard metric on "'+o.view+'": unknown field "'+u+'"')}),ae(o.xField,u=>{if(!uc(l).includes(u))return n('dashboard metric on "'+o.view+'": unknown xField "'+u+'"')}),ae(o.viz,u=>{if(!KA.includes(u))return n('dashboard metric on "'+o.view+'": unknown viz "'+u+'" — expected '+KA.join(", "));if(u==="funnel"&&Xne(t,o.view,l).length===0)return n('dashboard metric on "'+o.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(u!=="scatter")return;let d=o.field,f=o.xField;if(d!==void 0&&f!==void 0){let h=uc(l),p=Zne(l);[["field",d],["xField",f]].forEach(g=>{let m=g[1];if(h.includes(m)&&!p.includes(m))return n('dashboard metric on "'+o.view+'": viz "scatter" '+g[0]+' "'+m+'" is not a numeric field')});return}n('dashboard metric on "'+o.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),r.forEach(i=>{console.error(i)}),r}function zM(e,t){let r=tE(e),n=R(t,i=>i.suppress);return n!==void 0?r.filter(i=>i.id===aa?!0:!n.includes(i.id)):r}function UM(e,t,r,n){let i=l=>R(l,u=>n.find(d=>d.id===u)),o=i(e);if(o!==void 0)return o;let s=i(R(t,l=>l.mode));if(s!==void 0)return s;let a=i(r);return a!==void 0?a:n[0]}function P_(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function tie(e,t,r,n){if(!n)return"Full";let i=R(e,P_);if(i!==void 0)return i;let o=R(R(t,s=>s.layout),P_);return o!==void 0?o:D(R(r,P_),"Full")}function rie(e,t){return D(R(e,r=>r.audit),!1)?!0:t}function nie(e){return D(R(e,t=>t.presence),!1)}function iie(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 oie="/ui-hints.json";function sie(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function aie(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function lie(e){let t=_e.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=a=>R(t[a],_e.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=D(r("platformApiEndpoint"),n),o=a=>R(t[a],_e.bool),s=a=>D(J(R(t[a],_e.object),l=>Object.fromEntries(oe(Object.entries(l),u=>{let d=u[0];return J(_e.string(u[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),iie(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),clientEventsNamespace:r("clientEventsNamespace"),liveUpdates:D(o("liveUpdates"),!0),liveReconnectRefetch:D(o("liveReconnectRefetch"),!0),region:r("region"),authMode:D(J(r("authMode"),aie),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:D(o("autoRedirectFirstPage"),!1),mode:D(J(r("mode"),sie),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:oe(D(R(t.accessTiers,_e.array),[]),_e.string),viewModes:oe(D(R(t.viewModes,_e.array),[]),_e.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),geocoderEndpoint:r("geocoderEndpoint"),uploadEndpoint:r("uploadEndpoint"),uploadEndpoints:s("uploadEndpoints"),assetOrigins:s("assetOrigins"),uiHintsUrl:D(r("uiHintsUrl"),oie)}}}function uie(e){return Vt(fetch(e).then(t=>t.ok?t.json().then(Gne):(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 cie(){return Vt(fetch("/config.json").then(e=>e.ok?e.json().then(lie):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 Bg(e){return D(R(R(_e.object(e),t=>t.errors),_e.array),[]).some(t=>D(J(R(R(R(R(_e.object(t),r=>r.extensions),_e.object),r=>r.code),_e.string),r=>r==="UNAUTHORIZED"),!1))}function die(e,t,r,n){return(i,o)=>{let s=i.includes("Platform")||i.includes("platform")?t:e,a=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(a.Authorization="Bearer "+l),fetch(s,{method:"POST",headers:a,body:D(JSON.stringify({query:i,variables:o}),"")}).then(u=>(u.status===401&&n(),u.json())).then(u=>(Bg(u)&&n(),Promise.resolve(D(R(_e.object(u),d=>d.data),null))))}}class pf extends Error{}pf.prototype.name="InvalidTokenError";function fie(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 hie(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 fie(t)}catch{return atob(t)}}function pie(e,t){if(typeof e!="string")throw new pf("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 pf(`Invalid token specified: missing part #${r+1}`);let i;try{i=hie(n)}catch(o){throw new pf(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new pf(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let gie=(function(e){return e&&e.name?String(e.name):"UnknownError"}),mie=(function(e){return e&&e.message?String(e.message):""});function oE(e){return{name:gie(e),message:mie(e)}}function sE(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 vie=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),_ie=e=>({httpHandler:e.httpHandler()});var vh;(function(e){e.HTTP="http",e.HTTPS="https"})(vh||(vh={}));var _h;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(_h||(_h={}));const F1="__smithy_context";class Li{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 Li({...t,headers:{...t.headers}});return r.query&&(r.query=bie(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 Li.clone(this)}}function bie(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class Zc{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 yie=e=>t=>async r=>{if(!Li.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)},xie={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Sie=e=>({applyToStack:t=>{t.add(yie(e),xie)}}),Eie=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=a,d=l??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return s?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:l}=a,u=l??t.inputFilterSensitiveLog;throw s?.error?.({clientName:i,commandName:o,input:u(r.input),error:n,metadata:n.$metadata}),n}},wie={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},kie=e=>({applyToStack:t=>{t.add(Eie(),wie)}}),Cie={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rie=()=>e=>async t=>e(t),Aie=e=>({applyToStack:t=>{t.add(Rie(),Cie)}}),Rd=e=>e[F1]||(e[F1]={}),ea=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Tie=(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 $ie(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const Nie=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),s=e.authSchemePreference?await e.authSchemePreference():[],a=Tie(o,s),l=$ie(e.httpAuthSchemes),u=Rd(n),d=[];for(const f of a){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:g={},signingProperties:m={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},g),f.signingProperties=Object.assign(f.signingProperties||{},m),u.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(d.join(`
|
|
42
|
+
`));return r(i)},Die={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Fie=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Nie(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),Die)}}),Iie=e=>t=>{throw t},Pie=(e,t)=>{},Oie=e=>(t,r)=>async n=>{if(!Li.isInstance(n.request))return t(n);const o=Rd(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:a,signer:l}=o,u=await t({...n,request:await l.sign(n.request,a,s)}).catch((l.errorHandler||Iie)(s));return(l.successHandler||Pie)(u.response,s),u},Mie={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Lie=e=>({applyToStack:t=>{t.addRelativeTo(Oie(),Mie)}}),Tf=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},BM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",JA=Object.entries(BM).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),zie=BM.split(""),Fc=6,$f=8,Uie=63,Xm=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,s=0;for(let u=i,d=i+3;u<=d;u++)if(e[u]!=="="){if(!(e[u]in JA))throw new TypeError(`Invalid character ${e[u]} in base64 string.`);o|=JA[e[u]]<<(d-u)*Fc,s+=Fc}else o>>=Fc;const a=i/4*3;o>>=s%$f;const l=Math.floor(s/$f);for(let u=0;u<l;u++){const d=(l-u-1)*$f;n.setUint8(a+u,(o&255<<d)>>d)}}return new Uint8Array(r)},ed=e=>new TextEncoder().encode(e),bh=e=>typeof e=="string"?ed(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),aE=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 jg(e){let t;typeof e=="string"?t=ed(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 s=0,a=0;for(let u=o,d=Math.min(o+3,t.length);u<d;u++)s|=t[u]<<(d-u-1)*$f,a+=$f;const l=Math.ceil(a/Fc);s<<=l*Fc-a;for(let u=1;u<=l;u++){const d=(l-u)*Fc;i+=zie[(s&Uie<<d)>>d]}i+="==".slice(0,4-l)}return i}class Xl extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?Xl.mutate(Xm(t)):Xl.mutate(ed(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Xl.prototype),t}transformToString(t="utf-8"){return t==="base64"?jg(this):aE(this)}}const Zl=e=>encodeURIComponent(e).replace(/[!'()*]/g,Bie),Bie=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function jie(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=Zl(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${Zl(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${Zl(n)}`),t.push(i)}}return t.join("&")}function QA(e,t){return new Request(e,t)}function qie(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 O_={supported:void 0};class lE{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new lE(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),O_.supported===void 0&&(O_.supported=typeof Request<"u"&&"keepalive"in QA("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,s=this.config.credentials;if(r?.aborted){const y=YA(r);return Promise.reject(y)}let a=t.path;const l=jie(t.query||{});l&&(a+=`?${l}`),t.fragment&&(a+=`#${t.fragment}`);let u="";if(t.username!=null||t.password!=null){const y=t.username??"",E=t.password??"";u=`${y}:${E}@`}const{port:d,method:f}=t,h=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${a}`,p=f==="GET"||f==="HEAD"?void 0:t.body,g={body:p,headers:new Headers(t.headers),method:f,credentials:s};this.config?.cache&&(g.cache=this.config.cache),p&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=r),O_.supported&&(g.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(t));let m=()=>{};const v=QA(h,g),_=[fetch(v).then(y=>{const E=y.headers,S={};for(const C of E.entries())S[C[0]]=C[1];return y.body!=null?{response:new Zc({headers:S,reason:y.statusText,statusCode:y.status,body:y.body})}:y.blob().then(C=>({response:new Zc({headers:S,reason:y.statusText,statusCode:y.status,body:C})}))}),qie(i)];return r&&_.push(new Promise((y,E)=>{const S=()=>{const k=YA(r);E(k)};if(typeof r.addEventListener=="function"){const k=r;k.addEventListener("abort",S,{once:!0}),m=()=>k.removeEventListener("abort",S)}else r.onabort=S})),Promise.race(_).finally(m)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function YA(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 Vie=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):Kie(e):Hie(e);async function Kie(e){const t=await Wie(e),r=Xm(t);return new Uint8Array(r)}async function Hie(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:a,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=a}const o=new Uint8Array(i);let s=0;for(const a of t)o.set(a,s),s+=a.length;return o}function Wie(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(","),s=o>-1?o+1:i.length;t(i.substring(s))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const jM={},I1={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),jM[e]=t,I1[t]=e}function Gie(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 I1)t[r/2]=I1[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function eu(e){let t="";for(let r=0;r<e.byteLength;r++)t+=jM[e[r]];return t}const P1=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Xl.mutate(e);if(!e)return Xl.mutate(new Uint8Array);const r=t.streamCollector(e);return Xl.mutate(await r)},q0=e=>typeof e=="function"?e():e,qM=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),Jie=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=Rd(r),[,s,a,l,u,d]=o??[];try{const f=await e.protocol.deserializeResponse(qM(s,a,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+=`
|
|
43
|
+
`+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(Zc.isInstance(i)){const{headers:p={}}=i,g=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:M_(/^x-[\w-]+-request-?id$/,g),extendedRequestId:M_(/^x-[\w-]+-id-2$/,g),cfId:M_(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw f}},M_=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function Qie(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 td=e=>{if(typeof e=="string")return td(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let s;return o&&(s=Qie(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:s}},Yie=e=>{if(typeof e=="object"){if("url"in e){const t=td(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 td(e)},Xie=e=>(t,r)=>async n=>{const{operationSchema:i}=Rd(r),[,o,s,a,l,u]=i??[],d=r.endpointV2?async()=>Yie(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(qM(o,s,a,l,u),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},Zie={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},eoe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function toe(e){return{applyToStack:t=>{t.add(Xie(e),eoe),t.add(Jie(e),Zie),e.protocol.setSerdeContext(e)}}}const L_=[];function gf(e){if(typeof e=="object")return e;if(e=e|0,L_[e])return L_[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 L_[e]=t}const Qd={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},z_=[],U_={};class fn{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=fn.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=q0(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let s=n.length-1;s>=0;--s){const a=n[s];Object.assign(this.memberTraits,gf(a))}}else this.memberTraits=0;if(o instanceof fn){const s=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},s,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=q0(o),roe(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(z_[t])return z_[t]}else if(typeof t=="string"){if(U_[t])return U_[t]}else if(r&&t[Qd.ns])return t[Qd.ns];const n=q0(t);if(n instanceof fn)return n;if(B_(n)){const[o,s]=n;if(o instanceof fn)return Object.assign(o.getMergedTraits(),gf(s)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new fn(n);return r?t[Qd.ns]=i:typeof n=="string"?U_[n]=i:typeof n=="number"?z_[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 gf(this.memberTraits)}getOwnTraits(){return gf(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 Yd([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 Yd([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 Yd(B_(i)?i:[i,0],t)}if(this.isDocumentSchema())return Yd([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[Qd.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],s=Yd([t[5][i],0],o);yield n[i]=[o,s]}t[Qd.it]=n}}function Yd(e,t){if(e instanceof fn)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=fn;return new r(e,t)}const B_=e=>Array.isArray(e)&&e.length===2,roe=e=>Array.isArray(e)&&e.length>=5;class wi{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 wi.registries.has(t)||wi.registries.set(t,new wi(t)),wi.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,wi.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,wi.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):wi.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 O1=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&doe.warn(coe(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},noe=Math.ceil(2**127*(2-2**-23)),XA=e=>{const t=O1(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>noe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},ioe=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},ZA=e=>VM(e,16),eT=e=>VM(e,8),VM=(e,t)=>{const r=ioe(e);if(r!==void 0&&ooe(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},ooe=(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]}},soe=e=>O1(typeof e=="string"?Zm(e):e),aoe=e=>XA(typeof e=="string"?Zm(e):e),loe=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Zm=e=>{const t=e.match(loe);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},qg=e=>ZA(typeof e=="string"?Zm(e):e),uoe=e=>eT(typeof e=="string"?Zm(e):e),coe=e=>String(new TypeError(e).stack||e).split(`
|
|
44
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
45
|
+
`),doe={warn:console.warn},foe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],uE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hoe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,f=a<10?`0${a}`:`${a}`;return`${foe[n]}, ${l} ${uE[r]} ${t} ${u}:${d}:${f} GMT`}const poe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),goe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=poe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,s,a,l,u,d]=t,f=qg(yh(n)),h=rl(i,"month",1,12),p=rl(o,"day",1,31),g=V0(f,h,p,{hours:s,minutes:a,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&g.setTime(g.getTime()-Roe(d)),g},moe=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$/),voe=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$/),_oe=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})$/),KM=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=moe.exec(e);if(t){const[r,n,i,o,s,a,l,u]=t;return V0(qg(yh(o)),j_(i),rl(n,"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:u})}if(t=voe.exec(e),t){const[r,n,i,o,s,a,l,u]=t;return Soe(V0(yoe(o),j_(i),rl(n,"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:u}))}if(t=_oe.exec(e),t){const[r,n,i,o,s,a,l,u]=t;return V0(qg(yh(u)),j_(n),rl(i.trimLeft(),"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},boe=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=soe(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))},V0=(e,t,r,n)=>{const i=t-1;return woe(e,i,r),new Date(Date.UTC(e,i,r,rl(n.hours,"hour",0,23),rl(n.minutes,"minute",0,59),rl(n.seconds,"seconds",0,60),Coe(n.fractionalMilliseconds)))},yoe=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+qg(yh(e));return r<t?r+100:r},xoe=50*365*24*60*60*1e3,Soe=e=>e.getTime()-new Date().getTime()>xoe?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,j_=e=>{const t=uE.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Eoe=[31,28,31,30,31,30,31,31,30,31,30,31],woe=(e,t,r)=>{let n=Eoe[t];if(t===1&&koe(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${uE[t]} in ${e}: ${r}`)},koe=e=>e%4===0&&(e%100!==0||e%400===0),rl=(e,t,r,n)=>{const i=uoe(yh(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},Coe=e=>e==null?0:aoe("0."+e)*1e3,Roe=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},yh=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},tT=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Nn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),HM=()=>{if(tT)return tT();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Nn[e[0]]+Nn[e[1]]+Nn[e[2]]+Nn[e[3]]+"-"+Nn[e[4]]+Nn[e[5]]+"-"+Nn[e[6]]+Nn[e[7]]+"-"+Nn[e[8]]+Nn[e[9]]+"-"+Nn[e[10]]+Nn[e[11]]+Nn[e[12]]+Nn[e[13]]+Nn[e[14]]+Nn[e[15]]},Wa=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Wa.from=e=>e&&typeof e=="object"&&(e instanceof Wa||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Wa(String(e)):Wa(JSON.stringify(e));Wa.fromObject=Wa.from;const rT=/^-?\d*(\.\d+)?$/;class fs{string;type;constructor(t,r){if(this.string=t,this.type=r,!rT.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 fs.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&rT.test(r.string)}}class Aoe{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Toe extends Aoe{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=wi.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Li}getResponseType(){return Zc}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=fn.of(r.input),o=gf(r.traits??{});if(o.endpoint){let s=o.endpoint?.[0];if(typeof s=="string"){for(const[a,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const u=n[a];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${a} in input must be a string as hostLabel.`);s=s.replace(`{${a}}`,u)}t.hostname=s+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 A0(async()=>{const{EventStreamSerde:r}=await import("./index-BLVhdQNl.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 $oe extends Toe{async serializeRequest(t,r,n){const i=this.serializer,o={},s={},a=await n.endpoint(),l=fn.of(t?.input),u=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new Li({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:s,body:void 0});if(a&&(this.updateServiceEndpoint(h,a),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const g={};for(const[m,v]of l.structIterator())m!==p&&f[m]&&(i.write(v,f[m]),g[m]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:g})}}else i.write(u,f),d=i.flush()}return h.headers=Object.assign(h.headers,s),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=fn.of(t.output),s={};if(n.statusCode>=300){const l=await P1(n.body,r);throw l.byteLength>0&&Object.assign(s,await i.read(15,l)),await this.handleError(t,r,n,s,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 a=o.getEventStreamMember();if(a)s[a]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:s});else{const l=await P1(n.body,r);l.byteLength>0&&Object.assign(s,await i.read(o,l))}return s.$metadata=this.deserializeMetadata(n),s}}function WM(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 Noe(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 Doe{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 Foe{async sign(t,r,n){return t}}const Ioe=e=>function(r){return GM(r)&&r.expiration.getTime()-Date.now()<e},Poe=3e5,Ooe=Ioe(Poe),GM=e=>e.expiration!==void 0,Moe=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const l=async u=>{o||(o=n(u));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return t===void 0?async u=>((!s||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!s||u?.forceRefresh)&&(i=await l(u)),a?i:r(i)?(t(i)&&await l(u),i):(a=!0,i))},Loe=void 0;function zoe(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Uoe(e){const t=Tf(e.userAgentAppId??Loe),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!zoe(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 cE{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 cE(t,r,n,i)}}class Boe{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:s,done:a}=i.next();if(this.data.delete(s),a||++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 Uo extends Error{constructor(t){super(t),this.name="EndpointError"}}const joe="endpoints";function Vg(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Vg(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Vg).join(", ")})`:JSON.stringify(e,null,2)}const dE={},qoe=(e,t)=>e===t;function Voe(...e){for(const t of e)if(t!=null)return t}const Koe=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 Uo(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new Uo(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},JM=(e,t)=>Koe(t).reduce((r,n)=>{if(typeof r!="object")throw new Uo(`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),Hoe=e=>e!=null,Woe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ev=(e,t=!1)=>{if(!t)return Woe.test(e);const r=e.split(".");for(const n of r)if(!ev(n))return!1;return!0};function Goe(e,t,r){return e?t:r}const Joe=e=>!e,Qoe=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}$"),QM=e=>Qoe.test(e)||e.startsWith("[")&&e.endsWith("]"),q_={[vh.HTTP]:80,[vh.HTTPS]:443},Yoe=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:g="",path:m="",query:v={}}=e,_=new URL(`${g}//${h}${p?`:${p}`:""}${m}`);return _.search=Object.entries(v).map(([y,E])=>`${y}=${E}`).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:s,search:a}=t;if(a)return null;const l=s.slice(0,-1);if(!Object.values(vh).includes(l))return null;const u=QM(i),d=r.includes(`${n}:${q_[l]}`)||typeof e=="string"&&e.includes(`${n}:${q_[l]}`),f=`${n}${d?`:${q_[l]}`:""}`;return{scheme:l,authority:f,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}};function Xoe(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 Zoe=(e,t)=>e===t,ese=(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),tse=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),rse={booleanEquals:qoe,coalesce:Voe,getAttr:JM,isSet:Hoe,isValidHostLabel:ev,ite:Goe,not:Joe,parseURL:Yoe,split:Xoe,stringEquals:Zoe,substring:ese,uriEncode:tse},YM=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const s=e.indexOf("{",o);if(s===-1){r.push(e.slice(o));break}r.push(e.slice(o,s));const a=e.indexOf("}",s);if(a===-1){r.push(e.slice(s));break}e[s+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(s+1,a)),o=a+2);const l=e.substring(s+1,a);if(l.includes("#")){const[u,d]=l.split("#");r.push(JM(n[u]??i[u],d))}else r.push(n[l]??i[l]);o=a+1}return r.join("")},nse=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],tv=(e,t,r)=>{if(typeof e=="string")return YM(e,r);if(e.fn)return ZM.callFunction(e,r);if(e.ref)return nse(e,r);throw new Uo(`'${t}': ${String(e)} is not a string, function or reference.`)},XM=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let s=0;s<n.length;++s){const a=t[s];typeof a=="boolean"||typeof a=="number"?n[s]=a:n[s]=ZM.evaluateExpression(a,"arg",r)}const i=e.indexOf(".");if(i!==-1){const a=dE[e.slice(0,i)]?.[e.slice(i+1)];if(typeof a=="function")return a(...n)}const o=rse[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},ZM={evaluateExpression:tv,callFunction:XM},ise=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new Uo(`'${r}' is already defined in Reference Record.`);const n=XM(e,t);t.logger?.debug?.(`${joe} evaluateCondition: ${Vg(e)} = ${Vg(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},ose=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const s=tv(o,"Header value entry",t);if(typeof s!="string")throw new Uo(`Header '${n}' value '${s}' is not a string`);return s}),r),{}),e4=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=r4.getEndpointProperty(i,t),r),{}),t4=(e,t)=>{if(Array.isArray(e))return e.map(r=>t4(r,t));switch(typeof e){case"string":return YM(e,t);case"object":if(e===null)throw new Uo(`Unexpected endpoint property: ${e}`);return r4.getEndpointProperties(e,t);case"boolean":return e;default:throw new Uo(`Unexpected endpoint property type: ${typeof e}`)}},r4={getEndpointProperty:t4,getEndpointProperties:e4},sse=(e,t)=>{const r=tv(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 Uo(`Endpoint URL must be a string, got ${typeof r}`)},V_=1e8,ase=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let s=n;const a={},l={referenceRecord:a,endpointParams:t.endpointParams,logger:t.logger};for(;s!==1&&s!==-1&&s<V_;){const u=3*(Math.abs(s)-1),[d,f,h]=[r[u],r[u+1],r[u+2]],[p,g,m]=o[d],v=ise({fn:p,assign:m,argv:g},l);if(v.toAssign){const{name:_,value:y}=v.toAssign;a[_]=y}s=s>=0===v.result?f:h}if(s>=V_){const u=i[s-V_];if(u[0]===-1){const[,p]=u;throw new Uo(tv(p,"Error",l))}const[d,f,h]=u;return{url:sse(d,l),properties:e4(f,l),headers:ose(h??{},l)}}throw new Uo("No matching endpoint.")},n4=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!n4(r))return!1;return!0}return!(!ev(e)||e.length<3||e.length>63||e!==e.toLowerCase()||QM(e))},nT=":",lse="/",use=e=>{const t=e.split(nT);if(t.length<6)return null;const[r,n,i,o,s,...a]=t;if(r!=="arn"||n===""||i===""||a.join(nT)==="")return null;const l=a.map(u=>u.split(lse)).flat();return{partition:n,service:i,region:o,accountId:s,resourceId:l}},cse=[{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)"}}}],dse={partitions:cse};let fse=dse;const hse=e=>{const{partitions:t}=fse;for(const n of t){const{regions:i,outputs:o}=n;for(const[s,a]of Object.entries(i))if(s===e)return{...o,...a}}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}},i4={isVirtualHostableS3Bucket:n4,parseArn:use,partition:hse};dE.aws=i4;function pse(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function Ms(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 pl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(pl||(pl={}));const Nf=3,gse=pl.STANDARD,mse=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],vse=["TimeoutError","RequestTimeout","RequestTimeoutException"],_se=[500,502,503,504],bse=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],yse=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],xse=e=>e?.$retryable!==void 0,Sse=e=>e.$metadata?.clockSkewCorrected,Ese=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},o4=e=>e.$metadata?.httpStatusCode===429||mse.includes(e.name)||e.$retryable?.throttling==!0,fE=(e,t=0)=>xse(e)||Sse(e)||vse.includes(e.name)||bse.includes(e?.code||"")||yse.includes(e?.code||"")||_se.includes(e.$metadata?.httpStatusCode||0)||Ese(e)||kse(e)||e.cause!==void 0&&t<=10&&fE(e.cause,t+1),wse=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!fE(e)}return!1};function kse(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class hE{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"||o4(n?.error??t)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),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=>hE.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 s4=20*1e3,iT=500,Cse=1,Rse="amz-sdk-invocation-id",Ase="amz-sdk-request";var Tse={};class Bn{static v2026=typeof process<"u"&&Tse?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Bn.v2026?50:100}static throttlingDelay(){return Bn.v2026?1e3:500}static cost(){return Bn.v2026?14:5}static throttlingCost(){return Bn.v2026?5:10}static modifiedCostType(){return Bn.v2026?"THROTTLING":"TRANSIENT"}}class $se{x=Bn.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,s4);return Math.floor(i)}setDelayBase(t){this.x=t}}class oT{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(s4,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class M1{mode=pl.STANDARD;capacity=iT;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()=>Nf,this.baseDelay??=Bn.delay(),this.retryBackoffStrategy??=new $se}async acquireInitialRetryToken(t){return new oT(Bn.delay(),0,void 0,Bn.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"?Bn.throttlingDelay():this.baseDelay);const s=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let a=s;if(r.retryAfterHint instanceof Date&&(a=Math.max(s,Math.min(r.retryAfterHint.getTime()-Date.now(),s+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new oT(a,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:Bn.v2026?a:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(iT,this.capacity+(t.getRetryCost()??Cse))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Nf}`),Nf}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===Bn.modifiedCostType()?Bn.throttlingCost():Bn.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class Nse{mode=pl.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new hE,this.standardRetryStrategy=r?new M1({maxAttempts:typeof t=="number"?t:3,...r}):new M1(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 Dse=/\d{12}\.ddb/;async function Fse(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Ms(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();if(typeof o.mode=="string")switch(o.mode){case pl.ADAPTIVE:Ms(e,"RETRY_MODE_ADAPTIVE","F");break;case pl.STANDARD:Ms(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Dse)&&Ms(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Ms(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Ms(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Ms(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&Ms(e,"RESOLVED_ACCOUNT_ID","T");for(const[s,a]of Object.entries(o.$source??{}))Ms(e,s,a)}}const sT="user-agent",K_="x-amz-user-agent",aT=" ",H_="/",Ise=/[^!$%&'*+\-.^_`|~\w]/g,Pse=/[^!$%&'*+\-.^_`|~\w#]/g,lT="-",Ose=1024;function Mse(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Ose){t.length?t+=","+n:t+=n;continue}break}return t}const Lse=e=>(t,r)=>async n=>{const{request:i}=n;if(!Li.isInstance(i))return t(n);const{headers:o}=i,s=r?.userAgent?.map(Kp)||[],a=(await e.defaultUserAgentProvider()).map(Kp);await Fse(r,e,n);const l=r;a.push(`m/${Mse(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Kp)||[],d=await e.userAgentAppId();d&&a.push(Kp(["app",`${d}`]));const f=[].concat([...a,...s,...u]).join(aT),h=[...a.filter(p=>p.startsWith("aws-sdk-")),...u].join(aT);return e.runtime!=="browser"?(h&&(o[K_]=o[K_]?`${o[sT]} ${h}`:h),o[sT]=f):o[K_]=f,t({...n,request:i})},Kp=e=>{const t=e[0].split(H_).map(s=>s.replace(Ise,lT)).join(H_),r=e[1]?.replace(Pse,lT),n=t.indexOf(H_),i=t.substring(0,n);let o=t.substring(n+1);return i==="api"&&(o=o.toLowerCase()),[i,o,r].filter(s=>s&&s.length>0).reduce((s,a,l)=>{switch(l){case 0:return a;case 1:return`${s}/${a}`;default:return`${s}#${a}`}},"")},zse={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Use=e=>({applyToStack:t=>{t.add(Lse(e),zse)}}),Bse=!1,jse=!1,uT=new Set,qse=(e,t=ev)=>{if(!uT.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 uT.add(e)},a4=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Vse=e=>a4(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Kse=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=Vse(n);return qse(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return a4(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},cT="content-length";function Hse(e){return t=>async r=>{const n=r.request;if(Li.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(s=>s.toLowerCase()).indexOf(cT)===-1)try{const s=e(i);n.headers={...n.headers,[cT]:String(s)}}catch{}}return t({...r,request:n})}}const Wse={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Gse=e=>({applyToStack:t=>{t.add(Hse(e.bodyLengthChecker),Wse)}}),Jse=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),eae(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Zse(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},Qse=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Yse=/(\d+\.){3}\d+/,Xse=/\.\./,Zse=e=>Qse.test(e)&&!Yse.test(e)&&!Xse.test(e),eae=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,s=!!(o&&r&&n&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},tae=(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:s,hostname:a,port:l,path:u}=o;return`${s}//${a}${l?":"+l:""}${u}`}}return o}:i},l4=async e=>{},u4=e=>{if(typeof e=="object"){if("url"in e){const t=td(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 td(e)},rae=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let s;r.serviceConfiguredEndpoint?s=await r.serviceConfiguredEndpoint():s=await l4(r.serviceId),s&&(r.endpoint=()=>Promise.resolve(u4(s)),r.isCustomEndpoint=!0)}const i=await nae(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 s=await r.endpoint();if(s?.headers){o.headers??={};for(const[a,l]of Object.entries(s.headers))o.headers[a]=Array.isArray(l)?l:[l]}}return o},nae=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,s]of Object.entries(i))switch(s.type){case"staticContextParams":n[o]=s.value;break;case"contextParams":n[o]=e[s.name];break;case"clientContextParams":case"builtInParams":n[o]=await tae(s.name,o,r,s.type!=="builtInParams")();break;case"operationContextParams":n[o]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Jse(n),n},iae=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&Noe(n,"ENDPOINT_OVERRIDE","N");const o=await rae(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const s=n.authSchemes?.[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;const l=Rd(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return r({...i})},oae={name:"serializerMiddleware"},sae={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:oae.name},aae=(e,t)=>({applyToStack:r=>{r.addRelativeTo(iae({config:e,instructions:t}),sae)}}),lae=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>u4(await ea(r)()):void 0,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ea(n??!1),useFipsEndpoint:ea(i??!1)});let l;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=l4(e.serviceId)),l),a},uae=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}`),cae=e=>{const{retryStrategy:t,retryMode:r}=e,n=ea(e.maxAttempts??Nf);let i=t?Promise.resolve(t):void 0;const o=async()=>await ea(r)()===pl.ADAPTIVE?new Nse(n):new M1(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},Dl=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},Ta=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Kg=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>dT[p.step]-dT[h.step]||fT[p.priority||"normal"]-fT[h.priority||"normal"]),o=f=>{let h=!1;const p=g=>{const m=Dl(g.name,g.aliases);if(m.includes(f)){h=!0;for(const v of m)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>{let h=!1;const p=g=>{if(g.middleware===f){h=!0;for(const m of Dl(g.name,g.aliases))n.delete(m);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=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=[],g={};return e.forEach(v=>{const _={...v,before:[],after:[]};for(const y of Dl(_.name,_.aliases))g[y]=_;h.push(_)}),t.forEach(v=>{const _={...v,before:[],after:[]};for(const y of Dl(_.name,_.aliases))g[y]=_;p.push(_)}),p.forEach(v=>{if(v.toMiddleware){const _=g[v.toMiddleware];if(_===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${Ta(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:g,aliases:m}=h,v={step:"initialize",priority:"normal",middleware:f,...h},_=Dl(p,m);if(_.length>0){if(_.some(y=>n.has(y))){if(!g)throw new Error(`Duplicate middleware name '${Ta(p,m)}'`);for(const y of _){const E=e.findIndex(k=>k.name===y||k.aliases?.some(C=>C===y));if(E===-1)continue;const S=e[E];if(S.step!==v.step||v.priority!==S.priority)throw new Error(`"${Ta(S.name,S.aliases)}" middleware with ${S.priority} priority in ${S.step} step cannot be overridden by "${Ta(p,m)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(E,1)}}for(const y of _)n.add(y)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:g,aliases:m}=h,v={middleware:f,...h},_=Dl(p,m);if(_.length>0){if(_.some(y=>n.has(y))){if(!g)throw new Error(`Duplicate middleware name '${Ta(p,m)}'`);for(const y of _){const E=t.findIndex(k=>k.name===y||k.aliases?.some(C=>C===y));if(E===-1)continue;const S=t[E];if(S.toMiddleware!==v.toMiddleware||S.relation!==v.relation)throw new Error(`"${Ta(S.name,S.aliases)}" middleware ${S.relation} "${S.toMiddleware}" middleware cannot be overridden by "${Ta(p,m)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(E,1)}}for(const y of _)n.add(y)}t.push(v)},clone:()=>a(Kg()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):s(f),removeByTag:f=>{let h=!1;const p=g=>{const{tags:m,name:v,aliases:_}=g;if(m&&m.includes(f)){const y=Dl(v,_);for(const E of y)n.delete(E);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=a(Kg());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:a,identify:()=>u(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return Ta(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of u().map(g=>g.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},dT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},fT={high:3,normal:2,low:1};class dae{config;middlewareStack=Kg();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,s=i===void 0&&this.config.cacheMiddleware===!0;let a;if(s){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?a=l.get(t.constructor):(a=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,a))}else delete this.handlers,a=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)a(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return a(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const W_="***SensitiveInformation***";function L1(e,t){if(t==null)return t;const r=fn.of(e);if(r.getMergedTraits().sensitive)return W_;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return W_}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return W_}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[o,s]of r.structIterator())n[o]!=null&&(i[o]=L1(s,n[o]));return i}return t}class c4{middlewareStack=Kg();schema;static classBuilder(){return new fae}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:s,inputFilterSensitiveLog:a,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,g={logger:p,clientName:o,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,[F1]:{commandInstance:this,...u},...d},{requestHandler:m}=r;let v=n??{};return u.eventStream&&(v={isEventStream:!0,...v}),h.resolve(_=>m.handle(_.request,v),g)}}class fae{_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 c4{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,o){const s=t._operationSchema,a=s?.[4]??s?.input,l=s?.[5]??s?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(s?L1.bind(null,a):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(s?L1.bind(null,l):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class vc 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 vc.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===vc?vc.isInstance(t):vc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const hT=(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},hae=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{}}},d4=Object.values(_h),pae=e=>{const t=[];for(const r in _h){const n=_h[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();d4.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},gae=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();d4.includes(n)&&(t[n]=r.checksumConstructor())}),t},mae=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),vae=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},_ae=e=>Object.assign(pae(e),mae(e)),bae=e=>Object.assign(gae(e),vae(e));class f4{trace(){}debug(){}info(){}warn(){}error(){}}const yae=e=>e?.body instanceof ReadableStream;function xae(e,t){if(Zc.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=(KM(i).getTime()-Date.now())/1e3}catch(s){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(s)}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 Sae=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(Eae(i)){i=i;let s=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),a=new Error,l=0,u=0;const{request:d}=n,f=Li.isInstance(d);for(f&&(d.headers[Rse]=HM());;)try{f&&(d.headers[Ase]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(s),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=wae(h,e.logger);if(a=uae(h),f&&yae(d))throw(r.logger instanceof f4?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{s=await i.refreshRetryTokenForRetry(s,p)}catch(m){throw typeof m.$backoff=="number"&&await pT(m.$backoff),a.$metadata||(a.$metadata={}),a.$metadata.attempts=l+1,a.$metadata.totalRetryDelay=u,a}l=s.getRetryCount();const g=s.getRetryDelay();u+=g,await pT(g)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},pT=e=>new Promise(t=>setTimeout(t,e)),Eae=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",wae=(e,t)=>{const r={error:e,errorType:kae(e)},n=xae(e.$response,t);return n&&(r.retryAfterHint=n),r},kae=e=>o4(e)?"THROTTLING":fE(e)?"TRANSIENT":wse(e)?"SERVER_ERROR":"CLIENT_ERROR",Cae={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Rae=e=>({applyToStack:t=>{t.add(Sae(e),Cae)}}),gT=e=>Zc.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,h4=e=>new Date(Date.now()+e),Aae=(e,t)=>Math.abs(h4(t).getTime()-e)>=3e5,mT=(e,t)=>{const r=Date.parse(e);return Aae(r,t)?r-Date.now():t},Df=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Tae=async e=>{const t=Df("context",e.context),r=Df("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await Df("signer",r.signer)(n),s=e?.signingRegion,a=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:s,signingRegionSet:a,signingName:l}};class $ae{async sign(t,r,n){if(!Li.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Tae(n),{config:o,signer:s}=i;let{signingRegion:a,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[f,h]=u.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(a=h?.signingRegion??a,l=h?.signingName??l)}return await s.sign(t,{signingDate:h4(o.systemClockOffset),signingRegion:a,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??gT(r.$response);if(n){const i=Df("config",t.config),o=i.systemClockOffset;i.systemClockOffset=mT(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=gT(t);if(n){const i=Df("config",r.config);i.systemClockOffset=mT(n,i.systemClockOffset)}}}const Nae=(e,t,r)=>{let n,i,o,s=!1;const a=async()=>{i||(i=e());try{n=await i,o=!0,s=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await a()),n)},Dae="X-Amz-Algorithm",Fae="X-Amz-Credential",p4="X-Amz-Date",Iae="X-Amz-SignedHeaders",Pae="X-Amz-Expires",g4="X-Amz-Signature",m4="X-Amz-Security-Token",v4="authorization",_4=p4.toLowerCase(),Oae="date",Mae=[v4,_4,Oae],Lae=g4.toLowerCase(),z1="x-amz-content-sha256",zae=m4.toLowerCase(),Uae={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},Bae=/^proxy-/,jae=/^sec-/,G_="AWS4-HMAC-SHA256",qae="AWS4-HMAC-SHA256-PAYLOAD",Vae="UNSIGNED-PAYLOAD",Kae=50,b4="aws4_request",Hae=3600*24*7,Hp={},J_=[],Q_=(e,t,r)=>`${e}/${t}/${r}/${b4}`,Wae=async(e,t,r,n,i)=>{const o=await vT(e,t.secretAccessKey,t.accessKeyId),s=`${r}:${n}:${i}:${eu(o)}:${t.sessionToken}`;if(s in Hp)return Hp[s];for(J_.push(s);J_.length>Kae;)delete Hp[J_.shift()];let a=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,b4])a=await vT(e,a,l);return Hp[s]=a},vT=(e,t,r)=>{const n=new e(t);return n.update(bh(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 Uae||t?.has(o)||Bae.test(o)||jae.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},Gae=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",Y_=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===z1)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Gae(t)){const n=new r;return n.update(bh(t)),eu(await n.digest())}return Vae};class Jae{format(t){const r=[];for(const o of Object.keys(t)){const s=ed(o);r.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,s)=>o+s.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 s=new Uint8Array(o.buffer);return s.set(t.value,3),s;case"string":const a=ed(t.value),l=new DataView(new ArrayBuffer(3+a.byteLength));l.setUint8(0,7),l.setUint16(1,a.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(a,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(pE.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Qae.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Gie(t.value.replace(/\-/g,"")),1),f}}}var bT;(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"})(bT||(bT={}));const Qae=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class pE{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&&yT(r),new pE(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&yT(t),parseInt(eu(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function yT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Yae=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},Xae=(e,t={})=>{const{headers:r,query:n={}}=Li.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}},xT=e=>{e=Li.clone(e);for(const t of Object.keys(e.headers))Mae.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Zae=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===Lae)continue;const i=Zl(n);t.push(i);const o=e[n];typeof o=="string"?r[i]=`${i}=${Zl(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((s,a)=>s.concat([`${i}=${Zl(a)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},ele=e=>tle(e).toISOString().replace(/\.\d{3}Z$/,"Z"),tle=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class rle{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s=!0}){this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ea(n),this.credentialProvider=ea(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
46
|
+
${this.getCanonicalPath(t)}
|
|
47
|
+
${Zae(t)}
|
|
48
|
+
${i.map(o=>`${o}:${r[o]}`).join(`
|
|
49
|
+
`)}
|
|
50
|
+
|
|
51
|
+
${i.join(";")}
|
|
52
|
+
${n}`}async createStringToSign(t,r,n,i){const o=new this.sha256;o.update(bh(n));const s=await o.digest();return`${i}
|
|
53
|
+
${t}
|
|
54
|
+
${r}
|
|
55
|
+
${eu(s)}`}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 Zl(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=ele(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class ST extends rle{headerFormatter=new Jae;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:s,signableHeaders:a,hoistableHeaders:l,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=u??await this.regionProvider(),{longDate:p,shortDate:g}=this.formatDate(n);if(i>Hae)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=Q_(g,h,d??this.service),v=Xae(xT(t),{unhoistableHeaders:s,hoistableHeaders:l});f.sessionToken&&(v.query[m4]=f.sessionToken),v.query[Dae]=G_,v.query[Fae]=`${f.accessKeyId}/${m}`,v.query[p4]=p,v.query[Pae]=i.toString(10);const _=_T(v,o,a);return v.query[Iae]=this.getCanonicalHeaderList(_),v.query[g4]=await this.getSignature(p,m,this.getSigningKey(f,h,g,d),this.createCanonicalRequest(v,_,await Y_(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:s,eventStreamCredentials:a}){const l=o??await this.regionProvider(),{shortDate:u,longDate:d}=this.formatDate(n),f=Q_(u,l,s??this.service),h=await Y_({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const g=eu(await p.digest()),m=[qae,d,f,i,g,h].join(`
|
|
56
|
+
`);return this.signString(m,{signingDate:n,signingRegion:l,signingService:s,eventStreamCredentials:a})}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(a=>({message:t.message,signature:a}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const s=o??await this.credentialProvider();this.validateResolvedCredentials(s);const a=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(s,a,l,i));return u.update(bh(t)),eu(await u.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:s}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const l=o??await this.regionProvider(),u=xT(t),{longDate:d,shortDate:f}=this.formatDate(r),h=Q_(f,l,s??this.service);u.headers[_4]=d,a.sessionToken&&(u.headers[zae]=a.sessionToken);const p=await Y_(u,this.sha256);!Yae(z1,u.headers)&&this.applyChecksum&&(u.headers[z1]=p);const g=_T(u,i,n),m=await this.getSignature(d,h,this.getSigningKey(a,l,f,s),this.createCanonicalRequest(u,g,p));return u.headers[v4]=`${G_} Credential=${a.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${m}`,u}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,G_),s=new this.sha256(await n);return s.update(bh(o)),eu(await s.digest())}getSigningKey(t,r,n,i){return Wae(this.sha256,t,n,r,i||this.service)}}const nle=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=ile(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=ole(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const m=await f(p);return h&&(!m.$source||Object.keys(m.$source).length===0)?pse(m,"CREDENTIALS_CODE","e"):m},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:s}=e;let a;return e.signer?a=Tf(e.signer):e.regionInfoProvider?a=()=>Tf(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:s,uriEscapePath:i},g=e.signerConstructor||ST;return new g(p)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Tf(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:s,uriEscapePath:i},p=e.signerConstructor||ST;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};function ile(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=Moe(t,Ooe,GM):r?n=Tf(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 ole(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 sle=async(e,t,r)=>({operation:Rd(t).operation,region:await ea(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ale(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Rt(e){return{schemeId:"smithy.api#noAuth"}}const lle=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(Rt());break}case"ChangePassword":{t.push(Rt());break}case"CompleteWebAuthnRegistration":{t.push(Rt());break}case"ConfirmDevice":{t.push(Rt());break}case"ConfirmForgotPassword":{t.push(Rt());break}case"ConfirmSignUp":{t.push(Rt());break}case"DeleteUser":{t.push(Rt());break}case"DeleteUserAttributes":{t.push(Rt());break}case"DeleteWebAuthnCredential":{t.push(Rt());break}case"ForgetDevice":{t.push(Rt());break}case"ForgotPassword":{t.push(Rt());break}case"GetDevice":{t.push(Rt());break}case"GetTokensFromRefreshToken":{t.push(Rt());break}case"GetUser":{t.push(Rt());break}case"GetUserAttributeVerificationCode":{t.push(Rt());break}case"GetUserAuthFactors":{t.push(Rt());break}case"GlobalSignOut":{t.push(Rt());break}case"InitiateAuth":{t.push(Rt());break}case"ListDevices":{t.push(Rt());break}case"ListWebAuthnCredentials":{t.push(Rt());break}case"ResendConfirmationCode":{t.push(Rt());break}case"RespondToAuthChallenge":{t.push(Rt());break}case"RevokeToken":{t.push(Rt());break}case"SetUserMFAPreference":{t.push(Rt());break}case"SetUserSettings":{t.push(Rt());break}case"SignUp":{t.push(Rt());break}case"StartWebAuthnRegistration":{t.push(Rt());break}case"UpdateAuthEventFeedback":{t.push(Rt());break}case"UpdateDeviceStatus":{t.push(Rt());break}case"UpdateUserAttributes":{t.push(Rt());break}case"VerifySoftwareToken":{t.push(Rt());break}case"VerifyUserAttribute":{t.push(Rt());break}default:t.push(ale(e))}return t},ule=e=>{const t=nle(e);return Object.assign(t,{authSchemePreference:ea(e.authSchemePreference??[])})},cle=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),dle={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fle="3.1033.0",hle={version:fle},ple=e=>new TextEncoder().encode(e);var gle=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ple;function xh(e){return e instanceof Uint8Array?e:typeof e=="string"?gle(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function U1(e){return typeof e=="string"?e.length===0:e.byteLength===0}var y4={name:"SHA-256"},ET={name:"HMAC",hash:y4},mle=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 vle={};function K0(){return typeof window<"u"?window:typeof self<"u"?self:vle}var _le=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!U1(t)){var r=xh(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 K0().crypto.subtle.sign(ET,r,t.toHash).then(function(n){return new Uint8Array(n)})}):U1(this.toHash)?Promise.resolve(mle):Promise.resolve().then(function(){return K0().crypto.subtle.digest(y4,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){K0().crypto.subtle.importKey("raw",xh(t.secret),ET,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function ble(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(d){try{u(n.next(d))}catch(f){s(f)}}function l(d){try{u(n.throw(d))}catch(f){s(f)}}function u(d){d.done?o(d.value):i(d.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}function yle(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=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 Ki=64,xle=32,Sle=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]),Ele=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],wle=Math.pow(2,53)-1,H0=(function(){function e(){this.state=Int32Array.from(Ele),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>wle)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===Ki&&(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%Ki>=Ki-8){for(var i=this.bufferLength;i<Ki;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<Ki-8;i++)r.setUint8(i,0);r.setUint32(Ki-8,Math.floor(t/4294967296),!0),r.setUint32(Ki-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(xle),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],s=n[2],a=n[3],l=n[4],u=n[5],d=n[6],f=n[7],h=0;h<Ki;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],g=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var m=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(g+this.temp[h-7]|0)+(m+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+(Sle[h]+this.temp[h]|0)|0)|0,_=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&s^o&s)|0;f=d,d=u,u=l,l=a+v|0,a=s,s=o,o=i,i=v+_|0}n[0]+=i,n[1]+=o,n[2]+=s,n[3]+=a,n[4]+=l,n[5]+=u,n[6]+=d,n[7]+=f},e})(),kle=(function(){function e(t){this.secret=t,this.hash=new H0,this.reset()}return e.prototype.update=function(t){if(!(U1(t)||this.error))try{this.hash.update(xh(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 ble(this,void 0,void 0,function(){return yle(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new H0,this.secret){this.outer=new H0;var t=Cle(this.secret),r=new Uint8Array(Ki);r.set(t);for(var n=0;n<Ki;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 Cle(e){var t=xh(e);if(t.byteLength>Ki){var r=new H0;r.update(t),t=r.digest()}var n=new Uint8Array(Ki);return n.set(t),n}var Rle=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Ale(e){if(Tle(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return $le(t)}return!1}function Tle(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function $le(e){return e&&Rle.every(function(t){return typeof e[t]=="function"})}var Nle=(function(){function e(t){Ale(K0())?this.hash=new _le(t):this.hash=new kle(t)}return e.prototype.update=function(t,r){this.hash.update(xh(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const Dle=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??wT.os(i)??"other",s=void 0,a=n?.userAgentData?.brands??[],l=a[a.length-1],u=l?.brand??wT.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,s],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},wT={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"}},Fle=e=>()=>Promise.reject(e),kT=typeof TextEncoder=="function"?new TextEncoder:null,Ile=e=>{if(typeof e=="string"){if(kT)return kT.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}`)},Ple=["in-region","cross-region","mobile","standard","legacy"],Ole=({defaultsMode:e}={})=>Nae(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Mle()?"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 ${Ple.join(", ")}, got ${t}`)}}),Mle=()=>{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 Lle{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(s=>{const{httpQuery:a,httpQueryParams:l,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=s.getMergedTraits();return!a&&!l&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,s){let a=t;t.includes("#")&&([,a]=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:s?.(this.errorRegistry,a)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const g=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new g({name:a}),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:a},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=wi.for(i),s=wi.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(s),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=hT(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 s=i.$metadata.requestId;return s&&(i.RequestId=s),i}return hT(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),s=Object.keys(t),a={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<s.length;l++){const u=s[l];a[u==="message"?"Message":u]=t[u]}delete a.__type,t.Error=a}}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=>fn.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class gE{serdeContext;setSerdeContext(t){this.serdeContext=t}}class zle{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 Ule(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 fs(n,"bigDecimal"):BigInt(n)}return t}const Ble=(e,t)=>P1(e,t).then(r=>(t?.utf8Encoder??aE)(r)),jle=(e,t)=>Ble(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{}}),CT=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),X_=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},qle=(e,t)=>{const r=CT(e.headers,"x-amzn-errortype");if(r!==void 0)return X_(e.headers[r]);if(t&&typeof t=="object"){const n=CT(t,"code");if(n&&t[n]!==void 0)return X_(t[n]);if(t.__type!==void 0)return X_(t.__type)}};class Vle extends gE{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,Ule):await jle(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=fn.of(t);if(n){if(i.isStructSchema()){const s=r,a=i.isUnionSchema(),l={};let u;const{jsonName:d}=this.settings;d&&(u={});let f;a&&(f=new zle(s,l));for(const[h,p]of i.structIterator()){let g=h;d&&(g=p.getMergedTraits().jsonName??g,u[g]=h),a&&f.mark(g),s[g]!=null&&(l[h]=this._read(p,s[g]))}if(a)f.writeUnknown();else if(typeof s.__type=="string")for(const h in s){const p=s[h],g=d?u[h]??h:h;g in l||(l[g]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const s=i.getValueSchema(),a=[];for(const l of r)a.push(this._read(s,l));return a}if(i.isMapSchema()){const s=i.getValueSchema(),a={};for(const l in r)a[l]=this._read(s,r[l]);return a}}if(i.isBlobSchema()&&typeof r=="string")return Xm(r);const o=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&o)return o==="application/json"||o.endsWith("+json")?Wa.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(WM(i,this.settings)){case 5:return goe(r);case 6:return KM(r);case 7:return boe(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 fs)return r;const s=r;return s.type==="bigDecimal"&&"string"in s?new fs(s.string,s.type):new fs(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 s=Array.isArray(r)?[]:{};for(const a in r){const l=r[a];l instanceof fs?s[a]=l:s[a]=this._read(i,l)}return s}else return structuredClone(r);return r}}const RT="Ν";class Kle{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 fs){const n=`${RT+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${RT+"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 Hle extends gE{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=fn.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 Kle;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=fn.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=fn.of(t);if(i){if(o.isStructSchema()){const s=r,a={},{jsonName:l}=this.settings;let u;l&&(u={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,s[f],o);if(p!==void 0){let g=f;l&&(g=h.getMergedTraits().jsonName??f,u[f]=g),a[g]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=s;if(Array.isArray(f)){const[h,p]=f;a[h]=this._write(15,p)}}else if(typeof s.__type=="string")for(const f in s){const h=s[f],p=l?u[f]??f:f;p in a||(a[p]=this._write(15,h))}return a}if(Array.isArray(r)&&o.isListSchema()){const s=o.getValueSchema(),a=[],l=!!o.getMergedTraits().sparse;for(const u of r)(l||u!=null)&&a.push(this._write(s,u));return a}if(o.isMapSchema()){const s=o.getValueSchema(),a={},l=!!o.getMergedTraits().sparse;for(const u in r){const d=r[u];(l||d!=null)&&(a[u]=this._write(s,d))}return a}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??jg)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(WM(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return hoe(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof fs&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return HM();const s=o.getMergedTraits().mediaType;return r!=null&&s&&(s==="application/json"||s.endsWith("+json"))?Wa.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??jg)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const s=Array.isArray(r)?[]:{};for(const a in r){const l=r[a];l instanceof fs?(this.useReplacer=!0,s[a]=l):s[a]=this._write(o,l)}return s}else return structuredClone(r);return r}}}class Wle extends gE{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Hle(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Vle(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Gle extends $oe{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 Wle({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new Lle(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"),(q0(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 s=qle(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);const{errorSchema:a,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=fn.of(a),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(a)??Error,h=new f(d),p={},g=this.codec.createDeserializer();for(const[m,v]of u.structIterator())i[m]!=null&&(p[m]=g.readObject(v,i[m]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:u.getMergedTraits().error,message:d},p),i)}}class Jle extends Gle{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 Sh="ref",Fl=-1,Wp=!0,AT="isSet",x4="PartitionResult",Gp="booleanEquals",Z_="getAttr",Xd="stringEquals",TT={[Sh]:"Endpoint"},eb={[Sh]:x4},mf={[Sh]:"Region"},ts={},$T=[mf],NT={conditions:[[AT,[TT]],[AT,$T],["aws.partition",$T,x4],[Gp,[{[Sh]:"UseFIPS"},Wp]],[Gp,[{fn:Z_,argv:[eb,"supportsFIPS"]},Wp]],[Gp,[{[Sh]:"UseDualStack"},Wp]],[Gp,[{fn:Z_,argv:[eb,"supportsDualStack"]},Wp]],[Xd,[{fn:Z_,argv:[eb,"name"]},"aws"]],[Xd,[mf,"us-east-1"]],[Xd,[mf,"us-east-2"]],[Xd,[mf,"us-west-1"]],[Xd,[mf,"us-west-2"]]],results:[[Fl],[Fl,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Fl,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[TT,ts],["https://cognito-idp-fips.us-east-1.amazonaws.com",ts],["https://cognito-idp-fips.us-east-2.amazonaws.com",ts],["https://cognito-idp-fips.us-west-1.amazonaws.com",ts],["https://cognito-idp-fips.us-west-2.amazonaws.com",ts],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",ts],[Fl,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",ts],[Fl,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",ts],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",ts],[Fl,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",ts],[Fl,"Invalid Configuration: Missing Region"]]},Qle=2,rn=1e8,Yle=new Int32Array([-1,1,-1,0,17,3,1,4,rn+16,2,5,rn+16,3,9,6,5,7,rn+15,6,8,rn+14,7,rn+12,rn+13,4,11,10,5,rn+9,rn+11,5,12,rn+10,6,13,rn+9,8,rn+4,14,9,rn+5,15,10,rn+6,16,11,rn+7,rn+8,3,rn+1,18,5,rn+2,rn+3]),Xle=cE.from(Yle,Qle,NT.conditions,NT.results),Zle=new Boe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),eue=(e,t={})=>Zle.get(e,()=>ase(Xle,{endpointParams:e,logger:t.logger}));dE.aws=i4;class Ne extends vc{constructor(t){super(t),Object.setPrototypeOf(this,Ne.prototype)}}class mE extends Ne{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,mE.prototype)}}class vE extends Ne{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,vE.prototype)}}class _E extends Ne{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,_E.prototype),this.reasonCode=t.reasonCode}}class bE extends Ne{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,bE.prototype)}}class yE extends Ne{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,yE.prototype)}}class xE extends Ne{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,xE.prototype)}}class SE extends Ne{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,SE.prototype)}}class EE extends Ne{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,EE.prototype)}}class wE extends Ne{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,wE.prototype)}}class kE extends Ne{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,kE.prototype)}}class CE extends Ne{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,CE.prototype)}}class RE extends Ne{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,RE.prototype)}}class AE extends Ne{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,AE.prototype)}}class TE extends Ne{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,TE.prototype)}}class $E extends Ne{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,$E.prototype)}}class NE extends Ne{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,NE.prototype)}}class DE extends Ne{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,DE.prototype)}}class FE extends Ne{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,FE.prototype)}}class IE extends Ne{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,IE.prototype)}}class PE extends Ne{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,PE.prototype)}}class OE extends Ne{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,OE.prototype)}}class ME extends Ne{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,ME.prototype)}}class LE extends Ne{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,LE.prototype)}}class zE extends Ne{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,zE.prototype)}}class UE extends Ne{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,UE.prototype)}}class BE extends Ne{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,BE.prototype)}}class jE extends Ne{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,jE.prototype)}}class qE extends Ne{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,qE.prototype)}}class VE extends Ne{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,VE.prototype)}}class KE extends Ne{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,KE.prototype)}}class HE extends Ne{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,HE.prototype)}}class WE extends Ne{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,WE.prototype)}}class GE extends Ne{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,GE.prototype)}}class JE extends Ne{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,JE.prototype)}}class QE extends Ne{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,QE.prototype)}}class YE extends Ne{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,YE.prototype)}}class XE extends Ne{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,XE.prototype)}}class ZE extends Ne{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,ZE.prototype)}}class ew extends Ne{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,ew.prototype)}}class tw extends Ne{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,tw.prototype)}}class rw extends Ne{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,rw.prototype)}}class nw extends Ne{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,nw.prototype)}}class iw extends Ne{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,iw.prototype)}}class ow extends Ne{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,ow.prototype)}}class sw extends Ne{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,sw.prototype)}}class aw extends Ne{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,aw.prototype)}}class lw extends Ne{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,lw.prototype)}}class uw extends Ne{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,uw.prototype)}}class cw extends Ne{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,cw.prototype)}}class dw extends Ne{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,dw.prototype)}}class fw extends Ne{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,fw.prototype)}}class hw extends Ne{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,hw.prototype)}}class pw extends Ne{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,pw.prototype)}}class gw extends Ne{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,gw.prototype)}}class mw extends Ne{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,mw.prototype)}}class vw extends Ne{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,vw.prototype)}}class _w extends Ne{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,_w.prototype)}}const tue="AvailableChallenges",rue="AccessDeniedException",nue="AliasExistsException",iue="AnalyticsEndpointId",oue="AuthFlow",sue="AnalyticsMetadata",aue="AnalyticsMetadataType",lue="AuthParameters",uue="AuthParametersType",cue="AuthenticationResult",due="AuthenticationResultType",fue="AccessToken",hue="CodeDeliveryFailureException",pue="ClientId",gue="ClientIdType",mue="ClientMetadata",vue="CodeMismatchException",_ue="ConcurrentModificationException",bue="ChallengeName",yue="ChallengeParameters",xue="DeviceGroupKey",Sue="DeviceKey",Eue="DeviceKeyExistsException",wue="DuplicateProviderException",kue="ExpiredCodeException",Cue="EncodedData",Rue="ExpiresIn",Aue="EnableSoftwareTokenMFAException",Tue="ForbiddenException",$ue="FeatureUnavailableInTierException",Nue="GroupExistsException",Due="IpAddress",Fue="InitiateAuthRequest",Iue="InitiateAuthResponse",Pue="InitiateAuth",Oue="InternalErrorException",Mue="InvalidEmailRoleAccessPolicyException",Lue="InvalidLambdaResponseException",zue="InvalidOAuthFlowException",Uue="InvalidParameterException",Bue="InvalidPasswordException",jue="InternalServerException",que="InvalidSmsRoleAccessPolicyException",Vue="InvalidSmsRoleTrustRelationshipException",Kue="IdToken",Hue="InvalidUserPoolConfigurationException",Wue="LimitExceededException",Gue="MFAMethodNotFoundException",Jue="ManagedLoginBrandingExistsException",Que="NotAuthorizedException",Yue="NewDeviceMetadata",Xue="NewDeviceMetadataType",Zue="PasswordHistoryPolicyViolationException",ece="PreconditionNotMetException",tce="PasswordResetRequiredException",rce="ResourceNotFoundException",nce="RefreshToken",ice="RefreshTokenReuseException",S4="Session",oce="ScopeDoesNotExistException",sce="SessionType",ace="SoftwareTokenMFANotFoundException",lce="TierChangeNotAllowedException",uce="TermsExistsException",cce="TooManyFailedAttemptsException",dce="TooManyRequestsException",fce="TokenModelType",hce="TokenType",pce="UserContextDataType",gce="UserContextData",mce="UnauthorizedException",vce="UsernameExistsException",_ce="UserImportInProgressException",bce="UnsupportedIdentityProviderException",yce="UnexpectedLambdaException",xce="UserLambdaValidationException",Sce="UserNotConfirmedException",Ece="UserNotFoundException",wce="UnsupportedOperationException",kce="UserPoolAddOnNotEnabledException",Cce="UserPoolTaggingException",Rce="UnsupportedTokenTypeException",Ace="UnsupportedUserStateException",Tce="WebAuthnClientMismatchException",$ce="WebAuthnConfigurationMissingException",Nce="WebAuthnChallengeNotFoundException",Dce="WebAuthnCredentialNotSupportedException",Fce="WebAuthnNotEnabledException",Ice="WebAuthnOriginNotAllowedException",Pce="WebAuthnRelyingPartyMismatchException",Ue="client",Ie="error",Be="httpError",Pe="message",Oce="reasonCode",E4="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",w4="server",ke="com.amazonaws.cognitoidentityprovider",k4=wi.for(E4);var Mce=[-3,E4,"CognitoIdentityProviderServiceException",0,[],[]];k4.registerError(Mce,Ne);const Fe=wi.for(ke);var Lce=[-3,ke,rue,{[Ie]:Ue,[Be]:403},[Pe],[0]];Fe.registerError(Lce,mE);var zce=[-3,ke,nue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(zce,ME);var Uce=[-3,ke,hue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Uce,$E);var Bce=[-3,ke,vue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Bce,KE);var jce=[-3,ke,_ue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(jce,JE);var qce=[-3,ke,Eue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(qce,nw);var Vce=[-3,ke,wue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Vce,ow);var Kce=[-3,ke,Aue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Kce,_w);var Hce=[-3,ke,kue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Hce,HE);var Wce=[-3,ke,$ue,{[Ie]:Ue,[Be]:403},[Pe],[0]];Fe.registerError(Wce,lw);var Gce=[-3,ke,Tue,{[Ie]:Ue,[Be]:403},[Pe],[0]];Fe.registerError(Gce,QE);var Jce=[-3,ke,Nue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Jce,iw);var Qce=[-3,ke,Oue,{[Ie]:w4},[Pe],[0]];Fe.registerError(Qce,vE);var Yce=[-3,ke,jue,{[Ie]:w4},[Pe],[0]];Fe.registerError(Yce,EE);var Xce=[-3,ke,Mue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Xce,zE);var Zce=[-3,ke,Lue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Zce,CE);var ede=[-3,ke,zue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(ede,dw);var tde=[-3,ke,Uue,{[Ie]:Ue,[Be]:400},[Pe,Oce],[0,0]];Fe.registerError(tde,_E);var rde=[-3,ke,Bue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(rde,NE);var nde=[-3,ke,que,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(nde,DE);var ide=[-3,ke,Vue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(ide,FE);var ode=[-3,ke,Hue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(ode,LE);var sde=[-3,ke,Wue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(sde,wE);var ade=[-3,ke,Jue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(ade,sw);var lde=[-3,ke,Gue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(lde,UE);var ude=[-3,ke,Que,{[Ie]:Ue,[Be]:403},[Pe],[0]];Fe.registerError(ude,bE);var cde=[-3,ke,Zue,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(cde,WE);var dde=[-3,ke,tce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(dde,BE);var fde=[-3,ke,ece,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(fde,IE);var hde=[-3,ke,ice,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(hde,pw);var pde=[-3,ke,rce,{[Ie]:Ue,[Be]:404},[Pe],[0]];Fe.registerError(pde,yE);var gde=[-3,ke,oce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(gde,fw);var mde=[-3,ke,ace,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(mde,GE);var vde=[-3,ke,uce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(vde,aw);var _de=[-3,ke,lce,{[Ie]:Ue,[Be]:403},[Pe],[0]];Fe.registerError(_de,uw);var bde=[-3,ke,cce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(bde,RE);var yde=[-3,ke,dce,{[Ie]:Ue,[Be]:429},[Pe],[0]];Fe.registerError(yde,xE);var xde=[-3,ke,mce,{[Ie]:Ue,[Be]:401},[Pe],[0]];Fe.registerError(xde,gw);var Sde=[-3,ke,yce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Sde,AE);var Ede=[-3,ke,bce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Ede,hw);var wde=[-3,ke,wce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(wde,jE);var kde=[-3,ke,Rce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(kde,mw);var Cde=[-3,ke,Ace,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Cde,PE);var Rde=[-3,ke,_ce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Rde,SE);var Ade=[-3,ke,xce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Ade,TE);var Tde=[-3,ke,vce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Tde,OE);var $de=[-3,ke,Sce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError($de,qE);var Nde=[-3,ke,Ece,{[Ie]:Ue,[Be]:404},[Pe],[0]];Fe.registerError(Nde,kE);var Dde=[-3,ke,kce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Dde,VE);var Fde=[-3,ke,Cce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Fde,cw);var Ide=[-3,ke,Nce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Ide,YE);var Pde=[-3,ke,Tce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Pde,XE);var Ode=[-3,ke,$ce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Ode,vw);var Mde=[-3,ke,Dce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Mde,ZE);var Lde=[-3,ke,Fce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Lde,ew);var zde=[-3,ke,Ice,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(zde,tw);var Ude=[-3,ke,Pce,{[Ie]:Ue,[Be]:400},[Pe],[0]];Fe.registerError(Ude,rw);const Bde=[k4,Fe];var jde=[0,ke,gue,8,0],C4=[0,ke,sce,8,0],tb=[0,ke,fce,8,0],qde=[3,ke,aue,0,[iue],[0]],Vde=[3,ke,due,0,[fue,Rue,hce,nce,Kue,Yue],[[()=>tb,0],1,0,[()=>tb,0],[()=>tb,0],()=>Wde]],Kde=[3,ke,Fue,0,[oue,pue,lue,mue,sue,gce,S4],[0,[()=>jde,0],[()=>Jde,0],128,()=>qde,[()=>Gde,0],[()=>C4,0]],2],Hde=[3,ke,Iue,0,[bue,S4,yue,cue,tue],[0,[()=>C4,0],128,[()=>Vde,0],64]],Wde=[3,ke,Xue,0,[Sue,xue],[0,0]],Gde=[3,ke,pce,8,[Due,Cue],[0,0]],Jde=[2,ke,uue,8,0,0],Qde=[9,ke,Pue,0,()=>Kde,()=>Hde];const Yde=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??Xm,base64Encoder:e?.base64Encoder??jg,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??eue,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??lle,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new $ae},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Foe}],logger:e?.logger??new f4,protocol:e?.protocol??Jle,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:Bde,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??td,utf8Decoder:e?.utf8Decoder??ed,utf8Encoder:e?.utf8Encoder??aE}),Xde=e=>{const t=Ole(e),r=()=>t().then(hae),n=Yde(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ile,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Dle({serviceId:n.serviceId,clientVersion:hle.version}),maxAttempts:e?.maxAttempts??Nf,region:e?.region??Fle("Region is missing"),requestHandler:lE.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||gse),sha256:e?.sha256??Nle,streamCollector:e?.streamCollector??Vie,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Bse)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(jse))}},Zde=e=>({setRegion(t){e.region=t},region(){return e.region}}),efe=e=>({region:e.region()}),tfe=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(s=>s.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}}},rfe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),nfe=(e,t)=>{const r=Object.assign(Zde(e),_ae(e),vie(e),tfe(e));return t.forEach(n=>n.configure(r)),Object.assign(e,efe(r),bae(r),_ie(r),rfe(r))};class R4 extends dae{config;constructor(...[t]){const r=Xde(t||{});super(r),this.initConfig=r;const n=cle(r),i=Uoe(n),o=cae(i),s=Kse(o),a=s,l=lae(a),u=ule(l),d=nfe(u,t?.extensions||[]);this.config=d,this.middlewareStack.use(toe(this.config)),this.middlewareStack.use(Use(this.config)),this.middlewareStack.use(Rae(this.config)),this.middlewareStack.use(Gse(this.config)),this.middlewareStack.use(Sie(this.config)),this.middlewareStack.use(kie(this.config)),this.middlewareStack.use(Aie(this.config)),this.middlewareStack.use(Fie(this.config,{httpAuthSchemeParametersProvider:sle,identityProviderConfigProvider:async f=>new Doe({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Lie(this.config))}destroy(){super.destroy()}}class A4 extends c4.classBuilder().ep(dle).m(function(t,r,n,i){return[aae(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(Qde).build(){}let ife="reventless.auth.v1",ofe=300*1e3;function sfe(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=_e.object(r);if(n===void 0)return;let i=R(n.token,_e.string),o=n.identity,s=R(n.refreshToken,_e.string),a=R(n.expiresAt,_e.float);return i!==void 0&&o!==void 0?J(_e.object(o),l=>{let u=f=>R(l[f],_e.string),d=oe(D(R(l.groups,_e.array),[]),_e.string);return{token:i,identity:{userId:D(u("userId"),""),username:D(u("username"),""),groups:d,provider:D(u("provider"),"InMemory")},refreshToken:s,expiresAt:a}}):void 0}catch{return}}function rb(e,t){let r=t.identity.groups.map(d=>d),n=Object.fromEntries([["userId",t.identity.userId],["username",t.identity.username],["groups",r],["provider",t.identity.provider]]),i=[["token",t.token],["identity",n]],o=t.refreshToken,s=o!==void 0?i.concat([["refreshToken",o]]):i,a=t.expiresAt,l=a!==void 0?s.concat([["expiresAt",a]]):s,u=JSON.stringify(Object.fromEntries(l));localStorage.setItem(e,u)}function afe(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function lfe(e){let t=n=>D(R(e[n],_e.string),""),r=oe(D(R(e.groups,_e.array),[]),_e.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider")}}function T4(e){let t=n=>R(e[n],_e.string),r=oe(D(R(e["cognito:groups"],_e.array),[]),_e.string);return{userId:D(t("sub"),""),username:D(Dh(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito"}}function $4(e){try{return pie(e)}catch{return}}function ufe(e){let t=e.IdToken;if(t===void 0)return;let r=$4(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:T4(r),refreshToken:e.RefreshToken,expiresAt:i}}async function cfe(e,t,r,n){try{let i=new R4({region:t}),o=new A4({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),s=await i.send(o),a=R(s.AuthenticationResult,ufe);return a!==void 0?{TAG:"Ok",_0:a}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=Eu(i);return{TAG:"Error",_0:sE(oE(o))}}}async function dfe(e,t,r,n){try{let i=new R4({region:t}),o=new A4({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),a=(await i.send(o)).AuthenticationResult;if(a===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=a.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let u=$4(l),d=D(J(u,T4),n),f=a.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=a.RefreshToken;return{TAG:"Ok",_0:{token:l,identity:d,refreshToken:p!==void 0?p:r,expiresAt:h}}}catch(i){let o=Eu(i);return{TAG:"Error",_0:sE(oE(o))}}}let N4=ur(void 0),ffe=N4.Provider;function hfe(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,s=t!==void 0?t:ife,a=ue(()=>sfe(s)),l=a[1],u=a[0];Te(()=>{if(u===void 0)return;let v=u.refreshToken;if(v===void 0)return;let _=u.expiresAt;if(_===void 0)return;let y=u.identity;switch(o){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let E=Math.max(0,_-Date.now()-ofe),S=setTimeout(()=>{dfe(n,r,v,y).then(k=>{if(k.TAG==="Ok"){let C=k._0;return rb(s,C),l($=>C)}localStorage.removeItem(s),l(C=>{})})},E);return()=>{clearTimeout(S)}}},[u,o,n,r]);let d=J(u,v=>v.identity),f=Le(u);return Sr(ffe,{value:{identity:d,isAuthenticated:f,login:async(v,_)=>{try{let y=0;switch(o){case"Anonymous":case"Local":y=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 E=await cfe(n,r,v,_);if(E.TAG!=="Ok")return{TAG:"LoginErr",_0:E._0};let S=E._0;return rb(s,S),l(k=>S),"LoginOk"}if(y===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let E=await fetch(afe(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:v,password:_}),"")}),S=await E.json();if(E.ok){let C=_e.object(S);if(C===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let $=R(C.token,_e.string),A=R(C.identity,_e.object);if($===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(A===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=lfe(A),O={token:$,identity:N,refreshToken:void 0,expiresAt:void 0};return rb(s,O),l(P=>O),"LoginOk"}return{TAG:"LoginErr",_0:D(R(R(_e.object(S),C=>C.error),_e.string),"Login failed")}}}catch(y){let E=Eu(y);return{TAG:"LoginErr",_0:sE(oE(E))}}},logout:()=>{localStorage.removeItem(s),l(v=>{})},getToken:()=>J(u,v=>v.token)},children:e.children})}let pfe={make:hfe};function As(){return It(N4)}let gfe={background:"var("+x.surface+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+T.fontFamily+")",fontSize:"var("+T.sizeSm+")",fontWeight:"var("+T.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+Z.md+")",alignItems:"center",gap:"0.375rem"},mfe={color:"var("+x.textSecondary+")",fontSize:"0.625rem"},vfe={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+T.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+Z.md+")",boxShadow:"var("+mn.md+")"},_fe={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",display:"inline-block",fontSize:"var("+T.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+Z.full+")"},bfe={border:"none",borderTop:"1px solid var("+x.borderSubtle+")",margin:"0.5rem 0"},yfe={background:"transparent",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",fontSize:"var("+T.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+Z.sm+")"};function xfe(e){let t=As(),r=ue(()=>!1);if(t===void 0)return null;let n=r[1],i=r[0],o=t.identity;return o!==void 0?L("div",{children:[L("button",{children:[o.username,b("span",{children:i?"▴":"▾",style:mfe})],"aria-label":"Signed in as "+o.username,style:gfe,onClick:s=>n(a=>!a)}),i?L("div",{children:[b("div",{children:o.username,style:{fontSize:"var("+T.sizeMd+")",fontWeight:"var("+T.weightMedium+")",marginBottom:"0.25rem"}}),o.groups.length!==0?b("div",{children:o.groups.map(s=>b("span",{children:s,style:_fe},s)),style:{marginBottom:"0.25rem"}}):null,b("hr",{style:bfe}),b("button",{children:"Sign out",style:yfe,onClick:s=>{n(a=>!1),t.logout()}})],style:vfe}):null],style:{position:"relative"}}):null}let Sfe=xfe,Efe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+T.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+Z.md+")"},DT={color:"var("+x.textSecondary+")",display:"block",fontSize:"var("+T.sizeSm+")",marginBottom:"0.25rem"},FT={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",fontSize:"var("+T.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+Z.sm+")",boxSizing:"border-box"};function wfe(e){return{background:e?"var("+x.textDisabled+")":"var("+x.brand+")",border:"none",color:"var("+x.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+T.sizeMd+")",fontWeight:"var("+T.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+Z.sm+")"}}let kfe={color:"var("+x.error+")",fontSize:"var("+T.sizeSm+")",marginBottom:"0.75rem"};function Cfe(e){let t=As(),r=ue(()=>""),n=r[1],i=r[0],o=ue(()=>""),s=o[1],a=o[0],l=ue(()=>{}),u=l[1],d=l[0],f=ue(()=>!1),h=f[1],p=f[0],g=m=>{m.preventDefault(),u(v=>{}),h(v=>!0),t!==void 0?Vt(t.login(i,a).then(v=>{if(h(y=>!1),typeof v!="object")return;let _=v._0;u(y=>_)}),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("+T.sizeXl+")",fontWeight:"var("+T.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[b("label",{children:"Username",style:DT}),b("input",{style:FT,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:m=>{let v=m.target.value;n(_=>v)}}),b("label",{children:"Password",style:DT}),b("input",{style:FT,autoComplete:"current-password",type:"password",value:a,onChange:m=>{let v=m.target.value;s(_=>v)}}),d!==void 0?b("div",{children:d,style:kfe}):null,b("button",{children:p?"Signing in…":"Sign in",style:wfe(p),disabled:p,type:"submit"})],onSubmit:g})],style:Efe})}let IT=Cfe;function Rfe(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(uU(e.routes,n),i)}let Afe=Rfe;function Tfe(e){let t=e.route,n=It(cm).prefix,i=n===""||t.startsWith(n)?t:n+t;return b("a",{children:e.children,href:i,onClick:o=>{if(!o.defaultPrevented&&o.button===0&&!o.altKey&&!o.ctrlKey&&!o.metaKey&&!o.shiftKey)return o.preventDefault(),zc(i)}})}let $fe=Tfe,ep=ur(void 0),Nfe=ep.Provider;function Dfe(e){let t=e.initialPages,r=t!==void 0?t:[],n=ue(()=>r),i=n[1],o=ue(()=>[]),s=o[1],a=n[0].concat(o[0]);return Sr(Nfe,{value:{register:g=>i(m=>m.concat(g)),deregister:g=>i(m=>m.filter(v=>v.fragmentId!==g)),setPluginPages:g=>s(m=>g),getPages:()=>a,getPage:g=>a.find(m=>m.fragmentId===g)},children:e.children})}let Ffe={make:Dfe};function D4(){let e=It(ep);return e!==void 0?e.getPages():[]}let Ife=[];function Pfe(e){return!1}let Ofe={activeAccess:Ife,hasAccess:Pfe},F4=ur(Ofe),Mfe=F4.Provider;function Lfe(e){let t=e.access;return Sr(Mfe,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function El(){return It(F4).hasAccess}let zfe=Lfe;function Ic(e){return"var("+e+")"}let Ufe=w([z("flex"),ee("center"),c("gap",Ic(F.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("color",Ic(x.textDisabled)),c("font-size",Ic(T.sizeSm)),Ee("notAllowed"),OF("none")]),Bfe=w([c("font-size","14px"),pi(0)]),jfe=w([mo(1),c("font-weight",Ic(T.weightMedium))]),qfe=w([c("font-size",Ic(T.sizeXs)),c("color",Ic(x.brand)),Ee("pointer"),c("text-decoration","none"),pi(0)]);function Vfe(e){return L("div",{children:[b("span",{children:"[locked]",className:Bfe}),b("span",{children:e.label,className:jfe}),b("span",{children:"Upgrade",className:qfe})],className:Ufe})}let Kfe=Vfe;function Hfe(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function ni(e){return"var("+e+")"}let Wfe=w([z("flex"),me("column"),c("gap",ni(F.xs)),c("padding","var("+F.sm+") 0")]),Gfe=w([c("color",ni(x.textDisabled)),c("font-size",ni(T.sizeXs)),c("font-weight",ni(T.weightBold)),c("letter-spacing","0.08em"),c("text-transform","uppercase"),c("padding","var("+F.xs+") var("+F.md+")"),Es(Re(8))]),PT=w([z("flex"),ee("center"),c("gap",ni(F.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("color",ni(x.textSecondary)),c("font-size",ni(T.sizeMd)),Ee("pointer"),c("border-radius",ni(Z.sm)),c("text-decoration","none"),He([c("background",ni(x.surfaceSubtle)),c("color",ni(x.textPrimary))])]),Jfe=w([c("background",ni(x.surfaceSubtle)),c("color",ni(x.textPrimary)),c("font-weight",ni(T.weightMedium))]),Qfe=w([c("font-size","12px"),c("color",ni(x.textDisabled)),Ih("auto")]);function Yfe(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function Xfe(e){let t=e.hasAccess,r=e.page,n=fe(r.requiredAccess,!1,a=>!t(a)),i=e.isActive?PT+" "+Jfe:PT,o=L(Br,{children:[fe(r.menuEntry.icon,null,a=>b("span",{children:a})),b("span",{children:r.menuEntry.label}),n?b("span",{children:"[locked]",className:Qfe}):null]}),s=r.url;return!n&&s!==void 0?b($fe,{route:s,children:b("span",{children:o,className:i})}):b("div",{children:o,className:i,role:"button"})}function OT(e){let t=e.hasAccess,r=e.currentUrl,n=e.pages.toSorted((i,o)=>$x(i.menuEntry.sortOrder,o.menuEntry.sortOrder));return L(Br,{children:[fe(e.label,null,i=>b("div",{children:i,className:Gfe})),n.map(i=>b(Xfe,{page:i,isActive:Yfe(i,r),hasAccess:t},i.fragmentId))]})}function Zfe(e){let t=e.currentUrl,r=D4(),n=El(),i={};r.forEach(a=>{let l=D(a.menuEntry.group,""),u=D(i[l],[]);i[l]=u.concat([a])});let o=D(i[""],[]),s=Object.entries(i).filter(a=>a[0]!=="").toSorted((a,l)=>{let u=it(a[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder),d=it(l[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder);return $x(u,d)});return L("nav",{children:[o.length!==0?b(OT,{label:void 0,pages:o,currentUrl:t,hasAccess:n}):null,s.map(a=>{let l=a[1],u=a[0];switch(Hfe(l,n)){case"Active":return b(OT,{label:u,pages:l,currentUrl:t,hasAccess:n},u);case"Locked":return b(Kfe,{label:u},u);case"Absent":return null}})],"aria-label":"primary navigation",className:Wfe})}let ehe=Zfe;function Pc(e){return"var("+e+")"}let the=w([z("flex"),me("row"),FF({NAME:"vh",VAL:100}),c("overflow","hidden"),c("background",Pc(x.background))]),rhe=w([z("flex"),me("column"),c("width","240px"),pi(0),c("background",Pc(x.surface)),c("border-right","1px solid var("+x.borderSubtle+")"),c("overflow-y","auto")]),nhe=w([c("padding","var("+F.md+") var("+F.lg+")"),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("color",Pc(x.textPrimary)),c("font-size",Pc(T.sizeLg)),c("font-weight",Pc(T.weightBold)),pi(0)]),ihe=w([z("flex"),me("column"),mo(1),c("overflow","hidden")]),ohe=w([z("flex"),me("column"),mo(1),c("overflow","auto"),c("background",Pc(x.background))]);function she(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",s=n!==void 0?n:"404 — Page not found",a=r!==void 0?r:!0,l=t!==void 0?t:null,u=L7();return L("div",{children:[L("aside",{children:[L("div",{children:[fe(e.logoUrl,null,d=>b("img",{style:{height:"24px",marginRight:"8px"},alt:o,src:d})),o],className:nhe}),b(ehe,{currentUrl:u})],className:rhe}),L("main",{children:[D(e.headerSlot,null),b("div",{children:a?b(Afe,{url:u,routes:e.router,children:s}):l,className:ohe})],className:ihe})],className:the})}let ahe=she,lhe=[c(x.background,"#0d1117"),c(x.surface,"#161b22"),c(x.surfaceSubtle,"#1c2128"),c(x.surfaceElevated,"#21262d"),c(x.brand,"#2f81f7"),c(x.brandSubtle,"#1f4b8e"),c(x.success,"#3fb950"),c(x.warning,"#d29922"),c(x.error,"#f85149"),c(x.info,"#58a6ff"),c(x.textPrimary,"#e6edf3"),c(x.textSecondary,"#8b949e"),c(x.textDisabled,"#484f58"),c(x.textOnBrand,"#ffffff"),c(x.border,"#30363d"),c(x.borderSubtle,"#21262d"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(mn.sm,"0 1px 3px rgba(0,0,0,0.4)"),c(mn.md,"0 4px 12px rgba(0,0,0,0.5)"),c(mn.lg,"0 8px 24px rgba(0,0,0,0.6)")],uhe=[c(x.background,"#ffffff"),c(x.surface,"#f6f8fa"),c(x.surfaceSubtle,"#eaeef2"),c(x.surfaceElevated,"#ffffff"),c(x.brand,"#0969da"),c(x.brandSubtle,"#ddf4ff"),c(x.success,"#1a7f37"),c(x.warning,"#9a6700"),c(x.error,"#cf222e"),c(x.info,"#0550ae"),c(x.textPrimary,"#1f2328"),c(x.textSecondary,"#636c76"),c(x.textDisabled,"#bec1c5"),c(x.textOnBrand,"#ffffff"),c(x.border,"#d0d7de"),c(x.borderSubtle,"#eaeef2"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(mn.sm,"0 1px 3px rgba(0,0,0,0.08)"),c(mn.md,"0 4px 12px rgba(0,0,0,0.12)"),c(mn.lg,"0 8px 24px rgba(0,0,0,0.16)")],che=[c(x.background,"#f5f5f5"),c(x.surface,"#ffffff"),c(x.surfaceSubtle,"#eeeeee"),c(x.surfaceElevated,"#ffffff"),c(x.brand,"#424242"),c(x.brandSubtle,"#e0e0e0"),c(x.success,"#388e3c"),c(x.warning,"#f57c00"),c(x.error,"#d32f2f"),c(x.info,"#1976d2"),c(x.textPrimary,"#212121"),c(x.textSecondary,"#757575"),c(x.textDisabled,"#bdbdbd"),c(x.textOnBrand,"#ffffff"),c(x.border,"#bdbdbd"),c(x.borderSubtle,"#e0e0e0"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(mn.sm,"0 1px 3px rgba(0,0,0,0.12)"),c(mn.md,"0 4px 12px rgba(0,0,0,0.14)"),c(mn.lg,"0 8px 24px rgba(0,0,0,0.18)")],dhe=[c(x.background,"#000000"),c(x.surface,"#0a0a0a"),c(x.surfaceSubtle,"#111111"),c(x.surfaceElevated,"#1a1a1a"),c(x.brand,"#ffdd00"),c(x.brandSubtle,"#332b00"),c(x.success,"#00ff00"),c(x.warning,"#ffaa00"),c(x.error,"#ff4444"),c(x.info,"#44aaff"),c(x.textPrimary,"#ffffff"),c(x.textSecondary,"#cccccc"),c(x.textDisabled,"#555555"),c(x.textOnBrand,"#000000"),c(x.border,"#ffffff"),c(x.borderSubtle,"#888888"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(mn.sm,"0 1px 3px rgba(255,255,255,0.1)"),c(mn.md,"0 4px 12px rgba(255,255,255,0.15)"),c(mn.lg,"0 8px 24px rgba(255,255,255,0.2)")];function Jp(e,t){let r=t!==void 0?[c(x.brand,t.primaryColor)]:[];return w(e.concat(r))}function fhe(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=Jp(lhe,t.brand);break;case"Light":n=Jp(uhe,t.brand);break;case"Neutral":n=Jp(che,t.brand);break;case"HighContrast":n=Jp(dhe,t.brand);break}return b("div",{children:e.children,className:n})}let hhe=fhe;function phe(e){}let ghe={preset:"Light",setPreset:phe},I4=ur(ghe),mhe=I4.Provider;function vhe(){return It(I4)}let P4="reventless-ui:theme";function O4(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function B1(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function _he(e){let t=localStorage.getItem(P4);return t==null?e:O4(t)}function bhe(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=ue(()=>_he(r)),i=n[1],o=n[0],s=Qr(l=>{localStorage.setItem(P4,B1(l)),i(u=>l)},[]),a=Mt(()=>({preset:o,setPreset:s}),[o,s]);return b(mhe,{value:a,children:b(hhe,{theme:{preset:o,brand:e.brand},children:e.children})})}let yhe={make:bhe},tp=ur(void 0),xhe=tp.Provider;function She(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=ue(()=>n),s=o[1],a=ue(()=>[]),l=a[1],u=o[0].concat(a[0]);return Sr(xhe,{value:{register:_=>s(y=>y.concat(_)),deregister:_=>s(y=>y.filter(E=>E.extensionPackage!==_)),setPluginPanels:_=>l(y=>_),getPanel:_=>u.find(y=>y.fragmentId===_),getPanelsForPosition:_=>u.filter(y=>y.positions.some(E=>E===_)),hasAccess:_=>i.some(y=>y===_)},children:e.children})}let Ehe={make:She};function whe(e){let t=It(tp);return t!==void 0?t.getPanelsForPosition(e):[]}function khe(e){let t=It(tp);if(t!==void 0)return t.getPanel(e)}function bw(e){return"/"+e.environment+"/"+e.platformName}function M4(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},s=bw(o),a=t.startsWith(s)?t.slice(s.length):"/";return[o,a===""?"/":a]}let Che=ur(void 0),Rhe=Che.Provider;function Ahe(e){return Sr(Rhe,{value:e.scope,children:e.children})}let L4={make:Ahe};function The(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 z4=ur(void 0),U4=ur({routes:[],publicLinks:nu()}),B4=ur(!1),$he=z4.Provider;function Nhe(e){return Sr($he,{value:e.value,children:e.children})}let Dhe=U4.Provider;function Fhe(e){return Sr(Dhe,{value:e.value,children:e.children})}let Ihe=B4.Provider;function Phe(e){return Sr(Ihe,{value:e.value,children:e.children})}function Ohe(e){let t=ue(()=>({routes:[],publicLinks:nu()})),r=t[1],n=t[0],i=ue(()=>({routes:[],publicLinks:nu()})),o=i[1],s=i[0],a=ue(()=>!1),l=a[1],u=n.routes.concat(s.routes),d=Ty(n.publicLinks,s.publicLinks),f={routes:u,publicLinks:d};return b(Nhe,{value:{register:(m,v)=>r(_=>({routes:_.routes.concat(m),publicLinks:Ty(_.publicLinks,v)})),setPluginRoutes:(m,v)=>{o(_=>({routes:m,publicLinks:v})),l(_=>!0)}},children:b(Phe,{value:a[0],children:b(Fhe,{value:f,children:b(gU.make,{registry:d,children:e.children})})})})}let Mhe={make:Ohe};function yw(){return It(z4)}function Lhe(){return It(B4)}function zhe(){let e=It(U4).routes;return Mt(()=>aU(The(e.toReversed())),[e])}function Zd(e){return"var("+e+")"}let Uhe=w([c("background",Zd(x.surface)),c("color",Zd(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",Zd(Z.sm)),c("padding","4px 8px"),c("font-size",Zd(T.sizeSm)),c("font-family",Zd(T.fontFamily)),Ee("pointer")]);function Bhe(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}let jhe=["Light","Dark","Neutral","HighContrast"];function qhe(e){let t=vhe(),r=t.setPreset,n=i=>{let o=i.target.value;r(O4(o))};return b("select",{children:jhe.map(i=>{let o=B1(i);return b("option",{children:Bhe(i),value:o},o)}),className:Uhe,value:B1(t.preset),onChange:n})}let Vhe=qhe;function j4(e){return e.startsWith("/")?!e.startsWith("//"):!1}function Khe(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):j4(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 Hhe(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):j4(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function Whe(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Ghe(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+Whe(r)}function j1(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,ae(e.onReconnect,s=>s(o))}break}if(n===1)switch(r){case"Closed":case"Connecting":break;case"Open":e.disconnectedSince=Date.now();break}ae(e.onStateChange,i=>i(t))}function Jhe(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 Qhe='{"type":"connection_init"}';function q1(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{or(r).send(o);return}catch{return}}function Yhe(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{or(r).send(n);return}catch{return}}function Xhe(e){e.subscriptions.forEach(t=>q1(e,t))}function Zhe(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=R(r,_e.object);if(n===void 0)return;let i=R(n.type,_e.string);if(i!==void 0)switch(i){case"connection_ack":j1(e,"Open"),e.reconnectAttempts=0;let o=e.pendingPostAck;return e.pendingPostAck=[],o.forEach(h=>h()),Xhe(e);case"data":let s=R(n.id,_e.string),a=D(n.event,null),l=h=>{let p=_e.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},u=_e.array(a),d=u!==void 0?u.map(l):[l(a)],f=R(s,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function q4(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([Ghe(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Wt(i),j1(e,"Connecting"),i.onopen=()=>{try{i.send(Qhe);return}catch{return}},i.onmessage=o=>Zhe(e,o.data),i.onclose=()=>{if(e.ws=void 0,j1(e,"Closed"),e.disposed)return;let o=e.reconnectAttempts+1|0;e.reconnectAttempts=o,e.reconnectTimer=setTimeout(()=>q4(e),Jhe(o))},i.onerror=o=>{}}function epe(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 q4(o),o}function tpe(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};e.subscriptions.set(n,i);let o=e.state,s=0;switch(o){case"Closed":case"Connecting":s=1;break;case"Open":q1(e,i);break}return s===1&&e.pendingPostAck.push(()=>q1(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),Yhe(e,n)}}function MT(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{or(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function rpe(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(s=>JSON.stringify(s))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let s=await fetch(e,{method:"POST",headers:o,body:i});return s.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+s.status.toString()}}catch(s){let a=Eu(s);return a.RE_EXN_ID===um?{TAG:"Error",_0:D(a._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function Hg(e){return e.startsWith("Platform_")||e.startsWith("platform_")?"Platform":"Domain"}let V4=ur(void 0);function rp(){return It(V4)}function LT(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[]}}let npe=V4.Provider;function ipe(e){let t=e.getToken,r=e.clientEventsNamespace,n=e.liveReconnectRefetch,i=e.liveUpdates,o=e.platformEventsEndpoint,s=e.domainEventsEndpoint,a=n!==void 0?n:!0,l=Qe(t);Te(()=>{l.current=t},[t]);let u=()=>l.current(),d=Qe(LT()),f=Qe(LT()),h=ue(()=>"Closed"),p=h[1],g=h[0],m=ue(()=>"Closed"),v=m[1],_=m[0],y=U=>U==="Domain"?d:f,E=U=>U==="Domain"?s:o,S=U=>{let B=y(U).current,V=B.client;if(V!==void 0)return V;let W=E(U);if(W===void 0)return;let Q=Khe(W),K=Hhe(W),G=epe(Q,K,u,ne=>U==="Domain"?p(se=>ne):v(se=>ne),ne=>{let se=y(U).current;if(!(a&&ne>=2e3))return;se.reconnectListeners.slice().forEach(Ae=>{try{return Ae()}catch{return}})});return B.client=G,G},k=U=>{let B=y(U).current,V=B.idleTimer;if(V!==void 0){clearTimeout(V),B.idleTimer=void 0;return}},C=(U,B,V)=>{let W=y(U).current;if(!i||Pi(E(U)))return()=>{};k(U),W.refcount=W.refcount+1|0;let Q=W.registry.get(B),K;if(Q!==void 0){let G=Q.drainTimer;G!==void 0&&(clearTimeout(G),Q.drainTimer=void 0),K=Q}else{let G={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};W.registry.set(B,G),K=G}if(K.callbacks.push(V),K.refcount=K.refcount+1|0,K.refcount===1&&Pi(K.underlyingUnsub)){let G=S(U);if(G!==void 0){let ne=tpe(G,B,se=>{K.callbacks.forEach(be=>be(se))});K.underlyingUnsub=ne}}return()=>{if(K.callbacks=K.callbacks.filter(G=>G!==V),K.refcount=K.refcount-1|0,K.refcount===0&&(K.drainTimer=setTimeout(()=>{let G=K.underlyingUnsub;G!==void 0&&G(),K.underlyingUnsub=void 0,K.drainTimer=void 0,W.registry.delete(B)},5e3)),W.refcount=W.refcount-1|0,W.refcount===0){let G=y(U).current,ne=G.idleTimer;ne!==void 0&&clearTimeout(ne),G.idleTimer=setTimeout(()=>{let se=G.client;se!==void 0&&(MT(se),G.client=void 0),G.idleTimer=void 0},3e4);return}}},$=U=>i?Le(E(Hg(U))):!1;Te(()=>{let U=()=>{};return addEventListener("visibilitychange",U),()=>{removeEventListener("visibilitychange",U)}},[]),Te(()=>(()=>{["Domain","Platform"].forEach(U=>{let B=y(U).current,V=B.idleTimer;V!==void 0&&clearTimeout(V),B.idleTimer=void 0,B.registry.forEach(Q=>{let K=Q.drainTimer;if(K!==void 0){clearTimeout(K),Q.drainTimer=void 0;return}});let W=B.client;W!==void 0&&MT(W),B.client=void 0})}),[]);let A=U=>U==="Domain"?g:_,N=(U,B)=>{let V=y(U).current;return V.reconnectListeners.push(B),()=>{V.reconnectListeners=V.reconnectListeners.filter(W=>W!==B)}},O=()=>i&&Le(r)?Le(s):!1,P=async(U,B,V)=>{let W=E(U);return W!==void 0?await rpe(W,l.current(),B,V):{TAG:"Error",_0:"no events endpoint configured"}},I=Mt(()=>({subscribe:C,isLive:$,apiForReadModel:Hg,statusFor:A,registerReconnect:N,publish:P,clientChannelsAvailable:O,clientNamespace:()=>r}),[i,s,o,g,_,r]);return Sr(npe,{value:I,children:e.children})}let ope={make:ipe};function zT(e){return Object.fromEntries([["eq",e]])}function spe(e,t){let r=_e.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=R(n.filter,_e.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=zT(t.environment),o.platformName=zT(t.platformName),n.filter=o,n}let ape=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,lpe=/\$filter\s*:/,UT={};function upe(e){if(UT[e]===void 0){UT[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 cpe(e){return t=>((r,n)=>ape.test(r)?t(r,spe(n,e)):(lpe.test(r)&&upe(r),t(r,n)))}let dpe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+T.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+Z.md+")"},fpe={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+T.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+Z.sm+")",alignItems:"center",justifyContent:"space-between"},hpe={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",fontSize:"var("+T.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+Z.full+")"};function ppe(e){let t=e.discover,r=_i(),n=ue(()=>"Loading"),i=n[1],o=n[0];Te(()=>{r!==void 0?(i(a=>"Loading"),Vt(t(r).then(a=>i(l=>({TAG:"Loaded",_0:a}))),a=>{let l=D(R(x7(a),u=>u.message),"Platform discovery failed");return i(u=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(a=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[Le(r)]);let s;if(typeof o!="object")s=b("div",{children:"Discovering platforms…",style:{color:"var("+x.textSecondary+")"}});else if(o.TAG==="Loaded"){let a=o._0;s=a.length!==0?a.map(l=>L("button",{children:[l.platformName,b("span",{children:l.environment,style:hpe})],style:fpe,onClick:u=>zc(bw(l)+"/")},l.environment+"/"+l.platformName)):b("div",{children:"No platforms discovered.",style:{color:"var("+x.textSecondary+")"}})}else s=b("div",{children:o._0,style:{color:"var("+x.error+")",fontSize:"var("+T.sizeSm+")"}});return L("div",{children:[b("h1",{children:"Select a platform",style:{fontSize:"var("+T.sizeXl+")",fontWeight:"var("+T.weightBold+")",margin:"0 0 1.5rem"}}),s],style:dpe})}let gpe=ppe;function Vn(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function ao(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function K4(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function rv(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return ao(Vn(e),-r|0)}function H4(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function mpe(e){let t=rv(H4(e));return nl(42,r=>ao(t,r))}function W4(e,t){return Vn(e)===Vn(t)}function vpe(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function G4(e,t,r){let n=Vn(r),i=n+864e5;return e<i?t>=n:!1}function BT(e){let t=e.toString();return t.length<2?"0"+t:t}function J4(e){let t=new Date(e);return BT(t.getHours()|0)+":"+BT(t.getMinutes()|0)}function Q4(e){return e===Vn(e)}let Y4=["January","February","March","April","May","June","July","August","September","October","November","December"];function Xi(e){let t=new Date(e),r=t.getMonth()|0;return D(Y4[r],"")+" "+t.getFullYear().toString()}let xw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function X4(e){return new Date(e).getDate()|0}function la(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(xw[n],"")+" "+(new Date(e).getDate()|0).toString()}function zi(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let Z4=864e5;function Ad(e){let t=R(R(Y(e),n=>Fx(n)[0]),Y),r=R(R(t,n=>M(n,"__typename")),de);if(r===void 0)return"Accepted";switch(r){case"CommandPending":return"Pending";case"CommandRejected":let n=R(R(t,o=>M(o,"errorCode")),de),i=R(R(t,o=>M(o,"errorDetail")),de);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return"Accepted"}}function Go(e,t){let r=M(e,t);if(r===void 0)return;let n=de(r);return n!==void 0?n:R(R(Y(r),i=>M(i,"TAG")),de)}function eL(e,t,r){if(r===void 0)return e;let n=Go(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function _pe(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function bpe(e){let t=_e.object(e);if(t===void 0)return;let r=o=>R(t[o],_e.string),n=R(r("changeKind"),_pe),i=r("id");if(n!==void 0&&i!==void 0)return{changeKind:n,id:i,sortKeyValue:r("sortKeyValue")}}function jT(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let qT="default";function ype(e,t){let r=jT(e);return typeof t!="object"?"/"+qT+"/"+r+"/*":"/"+qT+"/"+r+"/"+jT(t._0)}function V1(e,t,r,n,i){let o=r!==void 0?r:!0,s=rp(),a=ype(e,t),l=Qe(n);Te(()=>{l.current=n},[n]);let u=Qe(i);Te(()=>{u.current=i},[i]),Te(()=>{if(!o||s===void 0)return;let d=Hg(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let g=s.subscribe(d,a,v=>{let _=bpe(v);if(_!==void 0)return l.current(_)});f.contents=g;let m=s.registerReconnect(d,()=>ae(u.current,v=>v()));h.contents=m},100);return()=>{clearTimeout(p);let g=f.contents;g!==void 0&&g();let m=h.contents;if(m!==void 0)return m()}},[a,o,s])}function tL(e,t,r,n,i,o){let s=t!==void 0?t:{},a=r!==void 0?r:"",l=n!==void 0?n:!0,u=i!==void 0?i:()=>{},d=_i(),f=ue(()=>[]),h=f[1],p=ue(()=>RM),g=p[1],m=p[0],v=ue(()=>"Loading"),_=v[1],y=ue(()=>0),E=y[1],S=ue(()=>1),k=S[1],C=S[0];return Te(()=>{if(l)if(d!==void 0){_(A=>"Loading"),u();let $;if(o!==void 0){let A=dt(fe(Y(s),[],Ge));A.first=o*C|0,$=A}else $=s;Vt(d(e.queryDocument,$).then(A=>(h(N=>eE(A,e.queryField)),g(N=>$M(A,e.queryField)),_(N=>"Loaded"),Promise.resolve())),A=>(_(N=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else _($=>({TAG:"Error",_0:"Not connected"}));else _($=>"Loaded")},[y[0],a,l,C]),{rows:f[0],setRows:h,pageInfo:m,fetchState:v[0],refetch:()=>E($=>$+1|0),loadMore:()=>k($=>$+1|0),canLoadMore:m.hasNextPage}}function bu(e,t,r){let n=t!==void 0?t:!0,o=tL(e,void 0,void 0,n,void 0,50),s=Qe(void 0),a=d=>{let f=s.current;f!==void 0&&clearTimeout(f),s.current=setTimeout(()=>{s.current=void 0,o.refetch()},250)},l=rp(),u=n&&fe(l,!1,d=>d.isLive(e.queryField));return V1(e.queryField,"All",u,a,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:u,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let xpe=50,VT=["message","body","text","title","content"],rL=["userId","recipientId","recipient","user","targetUserId"],Spe=["createdAt","sentAt","notifiedAt","at","timestamp"],Epe=["read","isRead","seen","acknowledged"];function Sw(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function nL(e){return oe(Xr(e),t=>{if(km(t[1]))return t[0]})}function iL(e,t){return nL(e).find(r=>Sw(r,t))}function wpe(e){let t=iL(e,rL);if(t!==void 0)return t;let r=jr(e,void 0,void 0);return Xr(e).map(n=>n[0]).find(n=>fe(M(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function kpe(e){return oe(Xr(e),t=>{if(Wx(t[1]))return t[0]}).find(t=>Sw(t,Spe))}function Cpe(e){return oe(Xr(e),t=>{if(We(DK(t[1]),"boolean"))return t[0]}).find(t=>Sw(t,Epe))}function Rpe(e,t){return oe(nL(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 Ape(e){return fe(R(Y(e),t=>M(t,"x-reventless-notifications")),!1,t=>{let r=rt(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let Tpe=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function $pe(e,t){let r=oe(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>Tpe.some(i=>n.name.toLowerCase().startsWith(i)))}let KT={contents:[]};function HT(e,t,r){if(!KT.contents.includes(e)){KT.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 Npe(e){return oe(e.readModels.filter(t=>Ape(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=iL(t.schema,VT),n=wpe(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:kpe(t.schema),readField:Cpe(t.schema),refFields:Rpe(t.schema,n),markReadCommand:$pe(t,e)};HT(t.name,"recipient",rL);return}else{HT(t.name,"message",VT);return}})[0]}function _c(e,t){return R(M(e,t),de)}function Dpe(e,t,r){let n=_c(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function Wg(e,t){return R(R(t.timestampField,r=>_c(e,r)),zi)}function Fpe(e,t,r){let n=t.readField;if(n!==void 0){let o=J(M(e,n),rt);return o==="JSONTrue"&&typeof o!="object"}let i=Wg(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function Ipe(e,t,r,n){return oe(t,i=>{let o=D(Y(i),{});if(Dpe(o,e,r))return o}).toSorted((i,o)=>{let s=Wg(i,e),a=Wg(o,e);return s!==void 0?a!==void 0?a-s:-1:a!==void 0?1:0}).map((i,o)=>({id:D(_c(i,"id"),"#"+o.toString()),message:D(_c(i,e.messageField),""),timestamp:R(e.timestampField,s=>_c(i,s)),read:Fpe(i,e,n),refs:oe(e.refFields,s=>J(_c(i,s.field),a=>[s.stem,a]))}))}function Ppe(e,t){return it(t,void 0,(r,n)=>{let i=D(Y(n),{}),o=Wg(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function Ope(e,t){let r=D(R(e.markReadCommand,n=>n.aggregateIdField),"id");return dt([[r,t]])}function Mpe(e,t){let r=e.length,n=t.length,i=aF((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 s=[],a=r,l=n;for(;a>0||l>0;){let u=e[a-1|0],d=t[l-1|0];a>0&&l>0&&u===d?(s=[{kind:"Unchanged",text:u}].concat(s),a=a-1|0,l=l-1|0):l>0&&(a===0||o(a,l-1|0)>=o(a-1|0,l))?(s=[{kind:"Added",text:d}].concat(s),l=l-1|0):(s=[{kind:"Removed",text:u}].concat(s),a=a-1|0)}return s}function Hl(e){return"var("+e+")"}let Lpe=w([c("font-family",Hl(T.fontFamilyMono)),c("font-size",Hl(T.sizeSm)),c("line-height",Hl(T.lineHeightNormal)),c("border","1px solid var("+x.border+")"),c("border-radius",Hl(Z.md)),ua("auto")]),nb=w([z("flex"),c("padding","1px var("+F.md+")")]),zpe=w([c("background","rgba(248,81,73,0.12)"),c("color",Hl(x.error))]),Upe=w([c("background","rgba(63,185,80,0.12)"),c("color",Hl(x.success))]),Bpe=w([c("color",Hl(x.textSecondary))]),jpe=w([c("width","16px"),pi(0),c("user-select","none"),IF(Re(8))]);function qpe(e){let t=e.before.split(`
|
|
57
|
+
`),r=e.after.split(`
|
|
58
|
+
`),n=Mpe(t,r);return b("div",{children:n.map((i,o)=>{let s=i.kind,a;switch(s){case"Removed":a=[nb+" "+zpe,"-"];break;case"Added":a=[nb+" "+Upe,"+"];break;case"Unchanged":a=[nb+" "+Bpe," "];break}return L("div",{children:[b("span",{children:a[1],className:jpe}),b("span",{children:i.text})],className:a[0]},o.toString())}),className:Lpe})}let Vpe=qpe;function nv(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 Kn(e){return"var("+e+")"}let Kpe=w([z("flex"),me("column"),c("gap","2px"),c("font-family",Kn(T.fontFamily)),c("font-size",Kn(T.sizeSm))]),WT=w([z("flex"),ee("flexStart"),c("gap","10px"),c("padding",Kn(F.xs)+" "+Kn(F.sm)),c("border-radius",Kn(Z.sm))]),Hpe=w([Ee("pointer"),He([c("background",Kn(x.surfaceSubtle))])]),Wpe=w([z("flex"),me("column"),c("gap","2px"),c("min-width","0"),c("flex","1")]),Gpe=w([c("color",Kn(x.textPrimary))]),Jpe=w([c("font-weight",Kn(T.weightMedium))]),Qpe=w([c("color",Kn(x.textSecondary))]),Ype=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("color",Kn(x.textSecondary)),c("font-size",Kn(T.sizeXs)),c("white-space","nowrap")]),Xpe=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("flex-shrink","0")]),Zpe=w([c("background","none"),c("border","none"),c("padding","0"),c("color",Kn(x.brand)),c("font-size",Kn(T.sizeXs)),Ee("pointer"),c("text-align","left"),He([c("text-decoration","underline")])]),e0e=w([c("margin-top","4px"),c("max-width","560px")]),t0e=w([c("color",Kn(x.textSecondary)),c("padding",Kn(F.md)),ca("center")]);function r0e(e){let t=e.onClick,r=e.entry,n=ue(()=>!1),i=n[1],o=n[0],s=Le(r.before)&&Le(r.after),a=D(r.actor,r.subject),l=t!==void 0?WT+" "+Hpe:WT,u=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[b(ud,{name:a,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[u!==void 0?b("span",{children:u+" ",className:Jpe}):null,b("span",{children:r.verb+" ",className:Qpe}),r.subject],className:Gpe}),L("span",{children:[d!==void 0?b("span",{className:Xpe,style:{background:d}}):null,f!==void 0?nv(e.nowMs,f):null],className:Ype}),s?b("button",{children:o?"Hide changes":"Show changes",className:Zpe,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&s?b("div",{children:b(Vpe,{before:D(r.before,""),after:D(r.after,"")}),className:e0e}):null],className:Wpe})],className:l,onClick:h=>ae(t,p=>p(r))})}function n0e(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",s=t!==void 0?t:Date.now();return i.length===0?b("div",{children:o,className:t0e}):b("div",{children:i.map(a=>b(r0e,{entry:a,nowMs:s,onClick:r},a.id)),className:Kpe})}let i0e=n0e;function At(e){return"var("+e+")"}let o0e=w([Pt("relative"),z("inlineBlock")]),s0e=w([Pt("relative"),z("inlineFlex"),ee("center"),Ye("center"),c("background","none"),c("border","none"),c("border-radius",At(Z.md)),c("cursor","pointer"),c("color",At(x.textSecondary)),c("padding","6px"),He([c("background",At(x.surfaceSubtle)),c("color",At(x.textPrimary))])]),a0e=w([Pt("absolute"),da(Re(0)),xl(Re(0)),z("inlineFlex"),ee("center"),Ye("center"),c("min-width","16px"),c("height","16px"),c("padding","0 4px"),c("border-radius",At(Z.full)),c("background",At(x.brand)),c("color",At(x.textOnBrand)),c("font-family",At(T.fontFamily)),c("font-size","10px"),c("font-weight",At(T.weightBold)),c("line-height","1")]),l0e=w([Pt("absolute"),xl(Re(0)),da({NAME:"percent",VAL:100}),Es(Re(4)),c("width","320px"),c("background",At(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",At(Z.md)),c("box-shadow",At(mn.md)),c("z-index","200"),c("overflow","hidden"),c("font-family",At(T.fontFamily))]),u0e=w([z("flex"),ee("center"),Ye("spaceBetween"),c("padding","var("+F.sm+") var("+F.md+")"),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("color",At(x.textSecondary)),c("font-size",At(T.sizeSm)),c("font-weight",At(T.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),c0e=w([c("background","none"),c("border","none"),c("color",At(x.brand)),c("font-size",At(T.sizeXs)),c("text-transform","none"),c("letter-spacing","0"),Ee("pointer"),He([c("text-decoration","underline")])]),d0e=w([c("max-height","360px"),c("overflow-y","auto")]);function f0e(e){return w([z("flex"),ee("flexStart"),c("gap",At(F.sm)),c("width","100%"),c("background","none"),c("border","none"),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("text-align","left"),c("padding","var("+F.sm+") var("+F.md+")"),Ee(e?"pointer":"default"),He(e?[c("background",At(x.surfaceSubtle))]:[])])}function h0e(e){return w([c("width","8px"),c("height","8px"),c("border-radius",At(Z.full)),c("margin-top","5px"),c("flex-shrink","0"),c("background",e?"transparent":At(x.brand))])}let p0e=w([z("flex"),me("column"),c("gap","2px"),c("min-width","0")]);function g0e(e){return w([c("color",At(x.textPrimary)),c("font-size",At(T.sizeSm)),c("font-weight",At(e?T.weightNormal:T.weightMedium)),c("line-height",At(T.lineHeightNormal)),c("word-break","break-word")])}let m0e=w([c("color",At(x.textDisabled)),c("font-size",At(T.sizeXs))]),v0e=w([c("color",At(x.textDisabled)),c("font-size",At(T.sizeSm)),c("padding",At(F.md)),c("text-align","center")]);function _0e(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 b0e(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,s=e.onOpen,a=e.notifications,l=n!==void 0?n:"No notifications",u=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=ue(()=>u),h=f[1],p=f[0],g=a.filter(v=>!v.read).length;Te(()=>{if(!p)return;let v=y=>h(E=>!1),_=y=>{if(y.key==="Escape")return h(E=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",_),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",_)}},[p]);let m=()=>{let v=!p;v&&ae(i,_=>_()),h(_=>v)};return L("div",{children:[L("button",{children:[b(_0e,{}),g>0?b("span",{children:g>99?"99+":g.toString(),className:a0e}):null],"aria-label":g>0?"Notifications ("+g.toString()+" unread)":"Notifications",className:s0e,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),m()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&g>0?b("button",{children:"Mark all read",className:c0e,type:"button",onClick:v=>o()}):null],className:u0e}),a.length===0?b("div",{children:l,className:v0e}):b("div",{children:a.map(v=>{let _=v.timestamp;return L("button",{children:[b("span",{className:h0e(v.read)}),L("span",{children:[b("span",{children:v.message,className:g0e(v.read)}),_!==void 0?b("span",{children:nv(d,_),className:m0e}):null],className:p0e})],className:f0e(Le(s)),type:"button",onClick:y=>{ae(s,E=>E(v)),h(E=>!1)}},v.id)}),className:d0e})],className:l0e,onClick:v=>{v.stopPropagation()}}):null],className:o0e})}let y0e=b0e,oL=ur([]),sL=ur(e=>{}),x0e=oL.Provider,S0e=sL.Provider;function E0e(e){let t=e.initial,r=t!==void 0?t:[],n=ue(()=>r),i=n[1],o=Qr(s=>i(a=>s),[]);return Sr(S0e,{value:o,children:Sr(x0e,{value:n[0],children:e.children})})}let w0e={make:E0e};function k0e(){return It(oL)}function C0e(){return It(sL)}function aL(e){return"autoui.notifications.seen."+e}function R0e(e){let t=localStorage.getItem(aL(e));if(t!=null)return ol(t)}function A0e(e,t){localStorage.setItem(aL(e),t.toString())}function T0e(e){let t=e.onData,r=bu(e.binding.readModel,void 0);return Te(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function $0e(e){let t=k0e(),r=As(),n=_i(),i=ws(),o=yl(),s=ue(()=>({})),a=s[1],l=s[0],d=ue(()=>0)[1],f=S=>(k=>a(C=>{let $=dt(Ge(C));return $[S]=k,$})),h=J(R(r,S=>S.identity),S=>({userId:S.userId,username:S.username})),p=t.flatMap(S=>{let k=fe(M(l,S.pluginId),[],C=>C.rows);return Ipe(S.binding,k,h,R0e(S.pluginId)).map(C=>({key:S.pluginId+":"+C.id,appBinding:S,entry:C}))}).toSorted((S,k)=>{let C=R(S.entry.timestamp,zi),$=R(k.entry.timestamp,zi);return C!==void 0?$!==void 0?$-C:-1:$!==void 0?1:0}),g=(S,k)=>{let C=S.binding.markReadCommand;if(C!==void 0&&n!==void 0){Vt(n(C.mutationDocument,Ope(S.binding,k)).then($=>{if(typeof Ad($)!="object"){let N=S.pluginId;return ae(M(l,N),O=>O.refetch())}}),$=>Promise.resolve());return}},m=S=>ae(p.find(k=>k.key===S.id),k=>{k.entry.read||g(k.appBinding,k.entry.id);let C=k.entry;ae(U7(C.refs,$=>{let A=$[1];return J(ha(i,$[0]),N=>[N,A])}),$=>{let A=$[0];o(na(A.pluginId,A.name,$[1],[]))})}),v=Le(n)&&t.some(S=>Le(S.binding.markReadCommand)),_=()=>{p.forEach(S=>{if(!S.entry.read)return g(S.appBinding,S.entry.id)})},y=()=>{t.forEach(S=>{let k=fe(M(l,S.pluginId),[],C=>C.rows);ae(Ppe(S.binding,k),C=>A0e(S.pluginId,C))}),d(S=>S+1|0)},E=p.map(S=>({id:S.key,message:S.entry.message,timestamp:S.entry.timestamp,read:S.entry.read}));return t.length===0?null:L(Br,{children:[t.map(S=>b(T0e,{binding:S.binding,onData:f(S.pluginId)},S.pluginId)),b(y0e,{notifications:E,onOpen:m,onMarkAllRead:v?_:void 0,onPanelOpen:y})]})}let N0e=$0e;function D0e(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 F0e(e){let t=["B","KB","MB","GB"],n=((a,l)=>{for(;;){let u=l,d=a;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,a=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 In(e){return"var("+e+")"}let GT=w([z("flex"),me("column"),ee("center"),Ye("center"),c("gap","6px"),c("padding",In(F.lg)),c("border","2px dashed var("+x.border+")"),c("border-radius",In(Z.md)),c("color",In(x.textSecondary)),c("font-family",In(T.fontFamily)),c("font-size",In(T.sizeSm)),Ee("pointer"),c("transition","border-color 120ms, background 120ms"),ca("center")]),I0e=w([c("border-color",In(x.brand)),c("background",In(x.brandSubtle))]),P0e=w([c("font-size",In(T.sizeXs))]),O0e=w([z("flex"),ee("center"),c("gap","8px"),c("padding",In(F.xs)+" 0"),c("font-family",In(T.fontFamily)),c("font-size",In(T.sizeSm)),c("color",In(x.textPrimary))]),M0e=w([c("flex","1"),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),L0e=w([c("color",In(x.textSecondary)),c("font-size",In(T.sizeXs)),c("white-space","nowrap")]),z0e=w([c("color",In(x.success))]),JT=w([c("color",In(x.error))]),U0e=w([c("width","120px")]);function B0e(e){let t=e.onUploaded,r=e.label,n=e.multiple,i=e.accept,o=e.adapter,s=n!==void 0?n:!0,a=r!==void 0?r:"Drop files here or click to browse",l=ue(()=>[]),u=l[1],d=ue(()=>!1),f=d[1],h=Qe(null),p=Qe(0),g=(k,C)=>u($=>$.map(A=>A.key===k?{key:A.key,name:A.name,size:A.size,status:C}:A)),m=k=>{p.current=p.current+1|0;let C=p.current.toString()+":"+k.name,$=D0e(i,k.name,k.type),A=$?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"};if(u(N=>N.concat([{key:C,name:k.name,size:k.size,status:A}])),$){Vt(o.upload(k,N=>g(C,{TAG:"Uploading",_0:N})).then(N=>{if(N.TAG==="Ok"){let O=N._0;g(C,{TAG:"Done",_0:O}),ae(t,P=>P(k.name,O))}else g(C,{TAG:"Failed",_0:N._0});return Promise.resolve()}),N=>(g(C,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}},v=k=>{(s?k:k.slice(0,1)).forEach(m)},_=k=>{k.preventDefault(),f($=>!1);let C=k.dataTransfer;if(C!=null)return v(Array.from(C.files))},y=k=>{let C=k.target.files;C!=null&&v(Array.from(C)),k.target.value=""},E=()=>ae(vs(h.current),k=>k.click()),S=d[0]?GT+" "+I0e:GT;return L("div",{children:[L("div",{children:[b("span",{children:a}),i!==void 0?b("span",{children:"Accepted: "+i,className:P0e}):null],className:S,role:"button",onClick:k=>E(),onDragLeave:k=>f(C=>!1),onDragOver:k=>{k.preventDefault(),f(C=>!0)},onDrop:_}),b("input",{ref:Wt(h),style:{display:"none"},accept:i,multiple:s,type:"file",onChange:y}),l[0].map(k=>{let C=k.status,$;switch(C.TAG){case"Uploading":$=b("span",{children:b(_I,{value:C._0,showValue:!1}),className:U0e});break;case"Done":$=b("span",{children:"Uploaded",className:z0e});break;case"Rejected":$=b("span",{children:"Rejected",className:JT,title:C._0});break;case"Failed":$=b("span",{children:"Failed",className:JT,title:C._0});break}return L("div",{children:[b("span",{children:k.name,className:M0e,title:k.name}),b("span",{children:F0e(k.size),className:L0e}),$],className:O0e},k.key)})]})}let j0e=B0e;function q0e(e){if(e==="")return[];let t;try{t=mr(JSON.parse(e))}catch{return[e]}return t!==void 0?oe(t,de):[e]}function V0e(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 lL(e){return R(bs(e).storeTarget,yK)}function K0e(e,t,r){return Dh(R(lL(e),r),t)}function H0e(e,t,r){return D(K0e(e,t,r),V0e(lL(e)))}function W0e(e){let t=e.onChange,r=e.value,n=e.multiple,i=Qe(n?q0e(r):r===""?[]:[r]),o=(s,a)=>{let l=n?i.current.concat([a]):[a];i.current=l,t(n?JSON.stringify(l.map(u=>u)):a)};return b(j0e,{adapter:e.adapter,accept:e.accept,multiple:n,onUploaded:o})}function G0e(e,t,r,n){if(n&&r==="")return"Required"}function J0e(e,t,r,n){let i=t!==void 0?t:l=>{},o=!1,s=(l,u,d,f,h,p,g)=>b(W0e,{adapter:H0e(u,e,i),accept:r,multiple:o,value:d,onChange:f}),a=l=>{let d={...D(Yre(l),{cell:(f,h,p)=>{},detail:(f,h,p)=>{}})};Ar(l,(d.validateInput=G0e,d.input=s,d))};a("File"),a("Image")}var Q0e={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"},Nu=Q0e,Y0e=function(e,t,r,n,i,o,s,a){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,s,a],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},De=Y0e;function iv(e){return function(){return e}}var Td=function(){};Td.thatReturns=iv;Td.thatReturnsFalse=iv(!1);Td.thatReturnsTrue=iv(!0);Td.thatReturnsNull=iv(null);Td.thatReturnsThis=function(){return this};Td.thatReturnsArgument=function(e){return e};var ov=Nu,np=De;function X0e(e){np(!1)}function ma(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function uL(e){var t=ma(e);return typeof t=="object"&&t!==null&&t.kind===ov.FRAGMENT}function cL(e){var t=ma(e);return typeof t=="object"&&t!==null&&t.kind===ov.REQUEST}function Z0e(e){var t=ma(e);return typeof t=="object"&&t!==null&&t.kind===ov.UPDATABLE_QUERY}function dL(e){var t=ma(e);return typeof t=="object"&&t!==null&&t.kind===ov.INLINE_DATA_FRAGMENT}function Ew(e){var t=ma(e);return uL(t)||np(!1),t}function ege(e){var t,r=Ew(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 tge(e){var t,r=Ew(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function rge(e){var t=ma(e);return cL(t)||np(!1),t}function nge(e){var t=ma(e);return Z0e(t)||np(!1),t}function ige(e){var t=ma(e);return dL(t)||np(!1),t}var Jo={getFragment:Ew,getNode:ma,getPaginationFragment:ege,getRefetchableFragment:tge,getRequest:rge,getUpdatableQuery:nge,getInlineDataFragment:ige,graphql:X0e,isFragment:uL,isRequest:cL,isInlineDataFragment:dL},fL={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})(fL);var je=fL.exports,hL={exports:{}},pL={exports:{}},gL={exports:{}},mL={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})(mL);var vL=mL.exports,_L={exports:{}};(function(e){var t=vL.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var s=o.call(n,i||"default");if(t(s)!="object")return s;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})(_L);var oge=_L.exports;(function(e){var t=vL.default,r=oge;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})(gL);var bL=gL.exports;(function(e){var t=bL;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})(pL);var Jn=pL.exports;(function(e){var t=Jn;function r(i,o){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);o&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),s.push.apply(s,a)}return s}function n(i){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?r(Object(s),!0).forEach(function(a){t(i,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(s,a))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(hL);var zt=hL.exports,yL={exports:{}},xL={exports:{}},SL={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})(SL);var EL=SL.exports;(function(e){var t=EL;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})(xL);var wL=xL.exports;(function(e){var t=wL;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 s=0,a=function(){};return{s:a,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(h){throw h},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
59
|
+
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})(yL);var Tr=yL.exports,kL=je.default,QT=kL(zt),YT=kL(Tr),sge=De;function age(e,t,r){var n=(0,YT.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,QT.default)((0,QT.default)({},o),{},{uiContext:r}))}}catch(u){n.e(u)}finally{n.f()}var s=(0,YT.default)(t),a;try{for(s.s();!(a=s.n()).done;){var l=a.value;if(CL(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,sge(!1)}}}catch(u){s.e(u)}finally{s.f()}}function CL(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 lge(e,t,r){t!=null&&age(e,t,r)}var ip={handlePotentialSnapshotErrors:lge,eventShouldThrow:CL},RL={exports:{}},AL={exports:{}};(function(e){var t=EL;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(AL);var uge=AL.exports,TL={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})(TL);var cge=TL.exports,$L={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
60
|
+
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})($L);var dge=$L.exports;(function(e){var t=uge,r=cge,n=wL,i=dge;function o(s){return t(s)||r(s)||n(s)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(RL);var wl=RL.exports,NL={DEFAULT_HANDLE_KEY:""},fge=NL,hge=fge.DEFAULT_HANDLE_KEY,pge=De;function gge(e,t,r){return t&&t!==hge?"__".concat(t,"_").concat(e):(r==null&&pge(!1),"__".concat(r,"_").concat(e))}var DL=gge,mge={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},_o=mge;function K1(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(K1);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=K1(e[t[n]]);return r}function FL(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 FL(i,r)})}var Du={stableCopy:K1,hasCycle:FL},vge=je.default,_ge=vge(wl),bge=DL,sv=Nu,yge=_o,xge=Du,IL=xge.stableCopy,Sge=De,Ege=sv.VARIABLE,wge=sv.LITERAL,kge=sv.OBJECT_VALUE,Cge=sv.LIST_VALUE,Rge="__errors",Age="__module_component_",Tge="__module_operation_";function H1(e,t){if(e.kind===Ege)return Ige(e.variableName,t);if(e.kind===wge)return e.value;if(e.kind===kge){var r={};return e.fields.forEach(function(i){r[i.name]=H1(i,t)}),r}else if(e.kind===Cge){var n=[];return e.items.forEach(function(i){i!=null&&n.push(H1(i,t))}),n}}function ww(e,t,r){var n={};return r&&(n[OL.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=H1(i,t)}),n}function $ge(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,s=e.args,a=e.filters,l=bge(n,i,o),u=null;return s&&a&&s.length!==0&&a.length!==0&&(u=s.filter(function(d){return a.indexOf(d.name)>-1})),r&&(u=u!=null?[r].concat((0,_ge.default)(u)):[r]),u===null?l:kw(l,ww(u,t))}function PL(e,t){if(e.storageKey)return e.storageKey;var r=Dge(e),n=e.name;return r&&r.length!==0?kw(n,ww(r,t)):n}function Nge(e,t){var r=PL(e,t);return yge.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function Dge(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 Fge(e,t){return kw(e,IL(t))}function kw(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 Ige(e,t){return t.hasOwnProperty(e)||Sge(!1),IL(t[e])}function Pge(e){return"".concat(Age).concat(e)}function Oge(e){return"".concat(Tge).concat(e)}var OL={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:Rge,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:ww,getHandleStorageKey:$ge,getStorageKey:PL,getReadTimeResolverStorageKey:Nge,getStableStorageKey:Fge,getModuleComponentKey:Pge,getModuleOperationKey:Oge},sr=OL,Mge=je.default,ML=Mge(zt),Lge=sr,zge=Lge.getArgumentValues,Uge=De;function Bge(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,ML.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:Uge(!1)}}),n||r}function jge(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 qge(e,t,r){if(t==null)return e;var n=(0,ML.default)({},e),i=r?zge(r,e):{};return t.forEach(function(o){var s,a=(s=i[o.name])!==null&&s!==void 0?s:o.defaultValue;n[o.name]=a}),n}var kl={getLocalVariables:qge,getFragmentVariables:Bge,getOperationVariables:jge},ib=[],ob=[];/**
|
|
61
|
+
* Checks if two values are equal. Values may be primitives, arrays, or objects.
|
|
62
|
+
* Returns true if both arguments have the same keys and values.
|
|
63
|
+
*
|
|
64
|
+
* @see http://underscorejs.org
|
|
65
|
+
* @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function Vge(e,t){var r=ib.length?ib.pop():[],n=ob.length?ob.pop():[],i=W1(e,t,r,n);return r.length=0,n.length=0,ib.push(r),ob.push(n),i}function W1(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 s=r.length;s--;)if(r[s]==e)return n[s]==t;r.push(e),n.push(t);var a=0;if(o==="[object Array]"){if(a=e.length,a!==t.length)return!1;for(;a--;)if(!W1(e[a],t[a],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(!W1(e[l[u]],t[l[u]],r,n))return!1}return r.pop(),n.pop(),!0}var va=Vge,Kge=kl,Hge=Kge.getFragmentVariables,op=sr,Wge=op.CLIENT_EDGE_TRAVERSAL_PATH,Gge=op.FRAGMENT_OWNER_KEY,Jge=op.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,Qge=op.FRAGMENTS_KEY,LL=op.ID_KEY,zL=va,gl=De;function av(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||gl(!1);var r=t[LL],n=t[Qge],i=t[Gge],o=t[Wge];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 s=i,a=o,l=n[e.name],u=Hge(e,s.variables,l),d=l[Jge]===!0;return HL(e,r,u,s,d,a)}return null}function UL(e,t){var r=null;return t.forEach(function(n,i){var o=n!=null?av(e,n):null;o!=null&&(r=r||[],r.push(o))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function BL(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||gl(!1),UL(e,t)):(Array.isArray(t)&&gl(!1),av(e,t))}function Yge(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=BL(i,o)}return r}function Xge(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=jL(i,o)}return r}function jL(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||gl(!1),Zge(e,t)):(Array.isArray(t)&&gl(!1),qL(e,t))}function Zge(e,t){var r=null;return t.forEach(function(n){var i=n!=null?qL(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function qL(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||gl(!1);var r=t[LL];return typeof r=="string"?r:null}function eme(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],s=VL(i,o);Object.assign(r,s)}return r}function VL(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||gl(!1),KL(e,t)):(Array.isArray(t)&&gl(!1),Cw(e,t)||{})}function Cw(e,t){var r=av(e,t);return r?r.variables:null}function KL(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=Cw(e,n);o!=null&&Object.assign(r,o)}}),r}function XT(e,t){return e.dataID===t.dataID&&e.node===t.node&&zL(e.variables,t.variables)&&tme(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&rme(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function tme(e,t){return e===t?!0:e.identifier===t.identifier&&zL(e.cacheConfig,t.cacheConfig)}function rme(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 nme(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?XT(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return XT(r,t.selectors[n])}):!1}function HL(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 ime(e,t,r){return{dataID:t,node:e,variables:r}}var Qo={areEqualSelectors:nme,createReaderSelector:HL,createNormalizationSelector:ime,getDataIDsFromFragment:jL,getDataIDsFromObject:Xge,getSingularSelector:av,getPluralSelector:UL,getSelector:BL,getSelectorsFromObject:Yge,getVariablesFromSingularFragment:Cw,getVariablesFromPluralFragment:KL,getVariablesFromFragment:VL,getVariablesFromObject:eme},ome=Jo,sme=ome.getFragment,ame=ip,lme=ame.eventShouldThrow,ume=Qo,cme=ume.getSelector,ZT=De,Ff=[];function dme(e,t){Ff.push(e);try{return t()}finally{Ff.pop()}}function fme(e,t){if(!Ff.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Ff[Ff.length-1],n=sme(e),i=cme(n,t);i==null&&ZT(!1),i.kind!=="SingularReaderSelector"&&ZT(!1);var o=r.getDataForResolverFragment(i,t),s=o.data,a=o.isMissingData,l=o.fieldErrors;if(a||l!=null&&l.some(lme))throw WL;return s}var WL={},Rw={readFragment:fme,withResolverContext:dme,RESOLVER_FRAGMENT_ERRORED_SENTINEL:WL},hme=Rw;hme.readFragment;var GL={exports:{}};(function(e){function t(n,i,o,s,a,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(s,a)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(s,a){var l=n.apply(i,o);function u(f){t(l,s,a,u,d,"next",f)}function d(f){t(l,s,a,u,d,"throw",f)}u(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(GL);var JL=GL.exports;function pme(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var QL=pme,gme=QL,Us=xme,Eh=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){Us=n},e.from=function(n){return mme(n)?vme(n):gme(n)?_me(n):bme(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var s;return i.subscribe({start:function(l){s=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){s=d},next:o.next,complete:o.complete,error:o.error})}catch(u){o.error(u,!0)}}}),function(){return s.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var s;return i.subscribe({start:function(l){s=l},next:o.next,error:o.error,complete:function(){s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var s=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(u){Us(u,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:s("start"),next:s("next"),error:s("error"),complete:s("complete"),unsubscribe:s("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var s=i.subscribe(o);return function(){s.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var s=!1,a;return a=i.subscribe({next:function(u){s=!0,o.next(u)},error:o.error,complete:function(){s?o.complete():a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.subscribe=function(n){return yme(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var s=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(){s.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var s=[];function a(u){this._sub=u,s.push(u)}function l(){s.splice(s.indexOf(this._sub),1),s.length===0&&o.complete()}return i.subscribe({start:a,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:a,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){s.forEach(function(u){return u.unsubscribe()}),s.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var s,a,l=function u(){s=i.subscribe({next:o.next,error:o.error,complete:function(){a=setTimeout(u,n)}})};return l(),function(){clearTimeout(a),s.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var s=!1;n.subscribe({next:function(l){s||(s=!0,i(l))},error:o,complete:i})})},e})();function mme(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function vme(e){return e instanceof Eh?e:Eh.create(function(t){return e.subscribe(t)})}function _me(e){return Eh.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function bme(e){return Eh.create(function(t){t.next(e),t.complete()})}function yme(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){Us(l,!0)}n=void 0}}var s=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(s)}catch(u){Us(u,!0)}finally{o()}}}});try{t.start&&t.start(s)}catch(l){Us(l,!0)}if(r)return s;var a=i({next:function(u){if(!r&&t.next)try{t.next(u)}catch(d){Us(d,!0)}},error:function(u,d){if(r||!t.error)r=!0,Us(u,d||!1),o();else{r=!0;try{t.error(u)}catch(f){Us(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(u){Us(u,!0)}finally{o()}}}});try{n=e(a)}catch(l){a.error(l,!0)}return r&&o(),s}function xme(e,t){}var Cl=Eh,YL=je.default,Sme=YL(Tr),Qp=YL(Jn),Eme=Cl,wme=De,kme=(function(){function e(){var r=this;(0,Qp.default)(this,"_complete",!1),(0,Qp.default)(this,"_events",[]),(0,Qp.default)(this,"_sinks",new Set),(0,Qp.default)(this,"_subscription",[]),this._observable=Eme.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var s=i[o];switch(s.kind){case"complete":n.complete();break;case"error":n.error(s.error);break;case"next":n.next(s.data);break;default:s.kind,wme(!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,Sme.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(s){n.e(s)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),XL=kme,Aw=Cl,e$=XL,ZL=De,Cme=typeof WeakMap=="function",t$=Cme?new WeakMap:new Map;function Rme(e,t){return e8(e,t.request.identifier,function(){return e.execute({operation:t})})}function e8(e,t,r){return Aw.create(function(n){var i=Tw(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(a){o={identifier:t,subject:new e$,subjectForInFlightStatus:new e$,subscription:a,promise:null},i.set(t,o)},next:function(a){var l=Yp(i,t);l.subject.next(a),l.subjectForInFlightStatus.next(a)},error:function(a){var l=Yp(i,t);l.subject.error(a),l.subjectForInFlightStatus.error(a)},complete:function(){var a=Yp(i,t);a.subject.complete(),a.subjectForInFlightStatus.complete()},unsubscribe:function(a){var l=Yp(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&ZL(!1),Ame(i,o).subscribe(n)})}function Ame(e,t){return Aw.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 t8(e,t,r){return Aw.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(s){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function Tme(e,t){var r=Tw(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,s){var a=!1;t8(e,r,n).subscribe({complete:o,error:s,next:function(u){a&&o(u)}}),a=!0});return i}function $me(e,t){var r=Tw(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:t8(e,r,n)}function Tw(e){var t=t$.get(e);if(t!=null)return t;var r=new Map;return t$.set(e,r),r}function Yp(e,t){var r=e.get(t);return r==null&&ZL(!1),r}var lv={fetchQuery:Rme,fetchQueryDeduped:e8,getPromiseForActiveRequest:Tme,getObservableForActiveRequest:$me},Nme=je.default;JL.default;var Dme=Nme(Tr),r8=Cl,Fme=lv,Ime=Fme.getObservableForActiveRequest,Pme=Jo,Ome=Pme.getFragment,Mme=ip,Lme=Mme.handlePotentialSnapshotErrors,zme=Qo,Ume=zme.getSelector,W0=De;function Bme(e,t,r){var n,i=Ome(t),o=Ume(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&W0(!1),o==null&&W0(!1),o.kind){case"SingularReaderSelector":return jme(e,t,o);case"PluralReaderSelector":return qme(e,t,o)}W0(!1)}function jme(e,t,r){var n=e.lookup(r);return r8.create(function(i){i.next(Gg(e,t,r.owner,n));var o=e.subscribe(n,function(s){i.next(Gg(e,t,r.owner,s))});return function(){return o.dispose()}})}function qme(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return r8.create(function(i){var o=n.map(function(a,l){return Gg(e,t,r.selectors[l].owner,a)});i.next(r$(o));var s=n.map(function(a,l){return e.subscribe(a,function(u){o[l]=Gg(e,t,r.selectors[l].owner,u),i.next(r$(o))})});return function(){return s.forEach(function(a){return a.dispose()})}})}function Gg(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&&(Ime(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{Lme(e,n.fieldErrors)}catch(s){return{error:s,state:"error"}}return n.data==null&&W0(!1),{state:"ok",value:n.data}}function r$(e){var t=[],r=(0,Dme.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 $w={observeFragment:Bme};function n8(e){return Vme(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&n8(r)})),e}function Vme(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var i8=n8,Kme=Du,Hme=Kme.stableCopy,Wme=De;function Gme(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&Wme(!1),r+JSON.stringify(Hme(t))}var o8=Gme,Jme=o8,Qme=_o,Yme=Du,Xme=Yme.hasCycle,Zme=kl,eve=Zme.getOperationVariables,s8=Qo,tve=s8.createNormalizationSelector,rve=s8.createReaderSelector,nve=sr,ive=nve.ROOT_ID,ove=De;function sve(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ive,i=e.operation,o=eve(i,e.params.providedVariables,t);Qme.ENABLE_CYLE_DETECTION_IN_VARIABLES&&Xme(o)&&ove(!1);var s=a8(e,o,r),a={fragment:rve(e.fragment,n,o,s),request:s,root:tve(i,n,o)};return a}function a8(e,t,r){var n={identifier:Jme(e.params,t),node:e,variables:t,cacheConfig:r};return n}var Rl={createOperationDescriptor:sve,createRequestDescriptor:a8},ave=je.default,lve=ave(Jn),uve=$w,cve=uve.observeFragment,dve=Rl,fve=dve.createOperationDescriptor;function hve(e,t,r){var n=fve(t,r),i={__id:n.fragment.dataID,__fragments:(0,lve.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return cve(e,o,i)}var pve={observeQuery:hve},gve=JL.default,mve=$w,vve=mve.observeFragment;function _ve(e,t,r){return G1.apply(this,arguments)}function G1(){return G1=gve(function*(e,t,r){var n;try{var i,o=yield new Promise(function(a,l){n=vve(e,t,r).subscribe({next:function(d){d.state==="ok"?a(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(a){var s;throw(s=n)===null||s===void 0||s.unsubscribe(),a}}),G1.apply(this,arguments)}var bve={waitForFragmentData:_ve},yve=$w;yve.observeFragment;var xve=pve;xve.observeQuery;var Sve=bve;Sve.waitForFragmentData;function Eve(e){return e.ok===!0}function wve(e){return e.ok===!1}var kve={isValueResult:Eve,isErrorResult:wve},n$=new Map,Cve=1,Rve=Ave(),l8=" ",i$="\v";function Ave(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function Tve(e){return e[0]===l8&&Rve.has(e[1])||e[0]===i$?i$+e:e}function $ve(e,t){if(t==null||e.length<t)return Tve(e);var r=n$.get(e);return r!=null||(r=l8+Cve++,n$.set(e,r)),r}var u8={intern:$ve},o$=_o,Nve=u8,Dve=Nve.intern,wh="client:";function Fve(e,t,r){var n=o$.STRING_INTERN_LEVEL<=0?e:Dve(e,o$.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(wh)!==0&&(i=wh+i),i}function Ive(e){return e.indexOf(wh)===0}var Pve=0;function Ove(){return"".concat(wh,"local:").concat(Pve++)}function Mve(e,t,r){var n="".concat(wh).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var Ts={generateClientID:Fve,generateClientObjectClientID:Mve,generateUniqueClientID:Ove,isClientID:Ive},Lve={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},s$={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"},zve={inject:function(t){s$=t},get:function(){return s$},isConnectionCall:function(t){return Lve.hasOwnProperty(t.name)}},Nw=zve,Uve=Ts,kh=Uve.generateClientID,Bve=sr,jve=Bve.getStableStorageKey,c8=DL,Fu=Nw,qve=De,d8="connection",J1="__connection_next_edge_index";function Vve(e,t){var r=e.get(t.dataID);if(r){var n=Fu.get(),i=n.EDGES,o=n.END_CURSOR,s=n.HAS_NEXT_PAGE,a=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=kh(r.getDataID(),t.handleKey),g=r.getLinkedRecord(t.handleKey),m=g??e.get(p),v=m&&m.getLinkedRecord(l);if(m){g==null&&r.setLinkedRecord(m,t.handleKey);var E=m,S=f.getLinkedRecords(i);S&&(S=S.map(function(K){return Q1(e,E,K)}));var k=E.getLinkedRecords(i),C=E.getLinkedRecord(l);E.copyFieldsFrom(f),k&&E.setLinkedRecords(k,i),C&&E.setLinkedRecord(C,l);var $=[],A=t.args;if(k&&S)if(A.after!=null){var N,O=(N=v)===null||N===void 0?void 0:N.getValue(o),P=h?.getValue(o),I=v&&A.after===O,U=v&&O===P;if(I||U){var B=new Set;Xp(k,$,B),Xp(S,$,B)}else return}else if(A.before!=null)if(v&&A.before===v.getValue(d)){var V=new Set;Xp(S,$,V),Xp(k,$,V)}else return;else $=S;else S?$=S:$=k;if($!=null&&$!==k&&E.setLinkedRecords($,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(a),a);var W=h.getValue(d);typeof W=="string"&&v.setValue(W,d)}else if(A.after!=null||A.before==null&&A.first){v.setValue(!!h.getValue(s),s);var Q=h.getValue(o);typeof Q=="string"&&v.setValue(Q,o)}}}else{var _=e.create(p,f.getType());_.setValue(0,J1),_.copyFieldsFrom(f);var y=f.getLinkedRecords(i);y&&(y=y.map(function(K){return Q1(e,_,K)}),_.setLinkedRecords(y,i)),r.setLinkedRecord(_,t.handleKey),v=e.create(kh(_.getDataID(),l),u),v.setValue(!1,s),v.setValue(!1,a),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),_.setLinkedRecord(v,l)}}}function Kve(e,t,r){var n=c8(d8,t,null);return e.getLinkedRecord(n,r)}function Hve(e,t,r){var n=c8(d8,t,null),i=jve(n,r);return kh(e,i)}function Wve(e,t,r){var n=Fu.get(),i=n.CURSOR,o=n.EDGES,s=e.getLinkedRecords(o);if(!s){e.setLinkedRecords([t],o);return}var a;if(r==null)a=s.concat(t);else{a=[];for(var l=!1,u=0;u<s.length;u++){var d=s[u];if(a.push(d),d!=null){var f=d.getValue(i);r===f&&(a.push(t),l=!0)}}l||a.push(t)}e.setLinkedRecords(a,o)}function Gve(e,t,r,n){var i=Fu.get(),o=i.NODE,s=kh(t.getDataID(),r.getDataID()),a=e.get(s);return a||(a=e.create(s,n)),a.setLinkedRecord(r,o),a.getValue("cursor")==null&&a.setValue(null,"cursor"),a}function Jve(e,t,r){var n=Fu.get(),i=n.CURSOR,o=n.EDGES,s=e.getLinkedRecords(o);if(!s){e.setLinkedRecords([t],o);return}var a;if(r==null)a=[t].concat(s);else{a=[];for(var l=!1,u=0;u<s.length;u++){var d=s[u];if(d!=null){var f=d.getValue(i);r===f&&(a.push(t),l=!0)}a.push(d)}l||a.unshift(t)}e.setLinkedRecords(a,o)}function Qve(e,t){var r=Fu.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var s,a=0;a<o.length;a++){var l=o[a],u=l&&l.getLinkedRecord(i);u!=null&&u.getDataID()===t?s===void 0&&(s=o.slice(0,a)):s!==void 0&&s.push(l)}s!==void 0&&e.setLinkedRecords(s,n)}}function Q1(e,t,r){if(r==null)return r;var n=Fu.get(),i=n.EDGES,o=t.getValue(J1);typeof o!="number"&&qve(!1);var s=kh(t.getDataID(),i,o),a=e.create(s,r.getType());return a.copyFieldsFrom(r),a.getValue("cursor")==null&&a.setValue(null,"cursor"),t.setValue(o+1,J1),a}function Xp(e,t,r){for(var n=Fu.get(),i=n.NODE,o=0;o<e.length;o++){var s=e[o];if(s){var a=s.getLinkedRecord(i),l=a&&a.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(s)}}}var uv={buildConnectionEdge:Q1,createEdge:Gve,deleteNode:Qve,getConnection:Kve,getConnectionID:Hve,insertEdgeAfter:Wve,insertEdgeBefore:Jve,update:Vve},Yve=je.default,Ch=Yve(Tr),Iu=uv,f8=Nw,Oc=De;var Xve={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)})}}},Zve={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&Oc(!1);var o=n.getValue(r.fieldKey),s=Array.isArray(o)?o:[o];s.forEach(function(a){if(typeof a=="string"){var l=(0,Ch.default)(i),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=t.get(d);f!=null&&Iu.deleteNode(f,a)}}catch(h){l.e(h)}finally{l.f()}}})}}},e_e={update:h8(Iu.insertEdgeAfter)},t_e={update:h8(Iu.insertEdgeBefore)},r_e={update:p8(Iu.insertEdgeAfter)},n_e={update:p8(Iu.insertEdgeBefore)};function h8(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs.connections;o==null&&Oc(!1);var s,a;try{s=i.getLinkedRecord(r.fieldKey)}catch{}if(!s)try{a=i.getLinkedRecords(r.fieldKey)}catch{}if(!(s==null&&a==null)){var l=f8.get(),u=l.NODE,d=l.EDGES,f=(n=a)!==null&&n!==void 0?n:[s],h=(0,Ch.default)(f),p;try{var g=function(){var y=p.value;if(y==null)return"continue";var E=y.getLinkedRecord("node");if(!E)return"continue";var S=E.getDataID(),k=(0,Ch.default)(o),C;try{for(k.s();!(C=k.n()).done;){var $=C.value,A=t.get($);if(A!=null){var N=(m=A.getLinkedRecords(d))===null||m===void 0?void 0:m.some(function(P){var I;return(P==null||(I=P.getLinkedRecord(u))===null||I===void 0?void 0:I.getDataID())===S});if(!N){var O=Iu.buildConnectionEdge(t,A,y);O==null&&Oc(!1),e(A,O)}}}}catch(P){k.e(P)}finally{k.f()}};for(h.s();!(p=h.n()).done;)var m,v=g()}catch(_){h.e(_)}finally{h.f()}}}}}function p8(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,s=o.connections,a=o.edgeTypeName;s==null&&Oc(!1),a==null&&Oc(!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=f8.get(),f=d.NODE,h=d.EDGES,p=(n=u)!==null&&n!==void 0?n:[l],g=(0,Ch.default)(p),m;try{var v=function(){var S=m.value;if(S==null)return"continue";var k=S.getDataID(),C=(0,Ch.default)(s),$;try{for(C.s();!($=C.n()).done;){var A=$.value,N=t.get(A);if(N!=null){var O=(_=N.getLinkedRecords(h))===null||_===void 0?void 0:_.some(function(I){var U;return(I==null||(U=I.getLinkedRecord(f))===null||U===void 0?void 0:U.getDataID())===k});if(!O){var P=Iu.createEdge(t,N,S,a);P==null&&Oc(!1),e(N,P)}}}}catch(I){C.e(I)}finally{C.f()}};for(g.s();!(m=g.n()).done;)var _,y=v()}catch(E){g.e(E)}finally{g.f()}}}}}var i_e={AppendEdgeHandler:e_e,DeleteRecordHandler:Xve,PrependEdgeHandler:t_e,AppendNodeHandler:r_e,PrependNodeHandler:n_e,DeleteEdgeHandler:Zve},o_e=uv,Zu=i_e,s_e=De;function a_e(e){switch(e){case"connection":return o_e;case"deleteRecord":return Zu.DeleteRecordHandler;case"deleteEdge":return Zu.DeleteEdgeHandler;case"appendEdge":return Zu.AppendEdgeHandler;case"prependEdge":return Zu.PrependEdgeHandler;case"appendNode":return Zu.AppendNodeHandler;case"prependNode":return Zu.PrependNodeHandler}s_e(!1)}var l_e=a_e;function u_e(e){return!!(e&&e["@@RelayModernEnvironment"])}var Dw=u_e,c_e=je.default,Fw=c_e(Tr),bc=uv;var d_e=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),f_e=Object.freeze({APPEND:"append",PREPEND:"prepend"});function h_e(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(s){switch(s.type){case"NODE_DELETE":var a=p_e(s,t);a&&(i.push(a),o.push(a));break;case"RANGE_ADD":var l=g_e(s,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var u=m_e(s,t);u&&(i.push(u),o.push(u));break}}),{optimisticUpdater:function(a,l){i.forEach(function(u){u(a,l)})},updater:function(a,l){o.forEach(function(u){u(a,l)})}}}function p_e(e,t){var r=e.deletedIDFieldName,n=Iw(t);return n?function(i,o){var s=i.getRootField(n);if(s){var a=s.getValue(r),l=Array.isArray(a)?a:[a];l.forEach(function(u){u&&typeof u=="string"&&i.delete(u)})}}:null}function g_e(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=Iw(t);return!n||!o?null:function(s,a){var l=s.get(r);if(l){var u=s.getRootField(o);if(u){var d=u.getLinkedRecord(i),f=(0,Fw.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var g=bc.getConnection(l,p.key,p.filters);if(g){var m=bc.buildConnectionEdge(s,g,d);if(m)switch(p.rangeBehavior){case"append":bc.insertEdgeAfter(g,m);break;case"prepend":bc.insertEdgeBefore(g,m);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function m_e(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var s=Iw(t);return s?function(a,l){if(l){var u=[],d=l[s];if(d&&Array.isArray(o)){var f=(0,Fw.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(g){f.e(g)}finally{f.f()}Array.isArray(d)?d.forEach(function(g){g&&g.id&&typeof g=="object"&&typeof g.id=="string"&&u.push(g.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(g){typeof g=="string"&&u.push(g)}));v_e(r,n,i,a,u)}}:null}function v_e(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var s=o,a=1;a<r.length-1;a++)s&&(s=s.getLinkedRecord(r[a]));if(!(!t||!s)){var l=(0,Fw.default)(t),u;try{var d=function(){var h=u.value,p=bc.getConnection(s,h.key,h.filters);p&&i.forEach(function(g){bc.deleteNode(p,g)})};for(l.s();!(u=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function Iw(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var cv={MutationTypes:d_e,RangeOperations:f_e,convert:h_e},__e=Jo,b_e=__e.getRequest,y_e=Dw,x_e=Rl,S_e=x_e.createOperationDescriptor,E_e=cv,w_e=De;function k_e(e,t){y_e(e)||w_e(!1);var r=b_e(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,s=t.variables,a=S_e(r,s);if(i){var l=E_e.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:a,response:o,updater:n})}var C_e=k_e;function R_e(e,t){e.commitUpdate(t)}var A_e=R_e,T_e=je.default;T_e(zt);var $_e=je.default,a$=$_e(wl),N_e=Jo,D_e=N_e.getRequest,F_e=Ts,I_e=F_e.generateUniqueClientID,P_e=Dw,O_e=Rl,M_e=O_e.createOperationDescriptor,L_e=cv,z_e=De;function U_e(e,t){P_e(e)||z_e(!1);var r=D_e(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,s=t.configs,a=t.cacheConfig,l=t.onError,u=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=M_e(r,d,a,I_e());if(typeof n=="function"&&(n=n()),s){var p=L_e.convert(s,r,i,o);i=p.optimisticUpdater,o=p.updater}var g=[],m=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(_){var y;Array.isArray(_)?_.forEach(function(E){E.errors&&g.push.apply(g,(0,a$.default)(E.errors))}):_.errors&&g.push.apply(g,(0,a$.default)(_.errors)),(y=t.onNext)===null||y===void 0||y.call(t)},complete:function(){var _=t.onCompleted;if(_){var y=e.lookup(h.fragment);_(y.data,g.length!==0?g:null)}},error:l,unsubscribe:u});return{dispose:m.unsubscribe}}var B_e=U_e,j_e=typeof WeakMap=="function",sb=j_e?new WeakMap:new Map;function g8(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(!sb.has(i))sb.set(i,o),r[n]=o;else{var s=sb.get(i);r[n]=s}}),r}else return e}g8.tests_only_resetDebugCache=void 0;var q_e=g8,l$=Cl;function V_e(e){return function(r,n,i,o,s){var a=e(r,n,i,o,s);return a instanceof Error?l$.create(function(l){return l.error(a)}):l$.from(a)}}var K_e={convertFetch:V_e},H_e=q_e,W_e=K_e,G_e=W_e.convertFetch,ab=De;function J_e(e,t){var r=G_e(e);function n(i,o,s,a,l){var u=H_e(o,i.providedVariables);if(i.operationKind==="subscription")return t||ab(!1),a&&ab(!1),t(i,u,s);var d=s.poll;return d!=null?(a&&ab(!1),r(i,u,{force:!0}).poll(d)):r(i,u,s,a,l)}return{execute:n}}var Q_e={create:J_e},Y_e=je.default;Y_e(zt);var X_e=Du;X_e.stableCopy;var Z_e=je.default,ebe=Z_e(zt),tbe=Cl,rbe=Rl,nbe=rbe.createOperationDescriptor,ibe=ip,obe=ibe.handlePotentialSnapshotErrors,sbe=lv,abe=Jo,lbe=abe.getRequest,ube=De;function cbe(e,t,r,n){var i,o=lbe(t);o.params.operationKind!=="query"&&ube(!1);var s=(0,ebe.default)({force:!0},n?.networkCacheConfig),a=nbe(o,r,s),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function u(d){return obe(e,d.fieldErrors),d.data}switch(l){case"network-only":return u$(e,a).map(u);case"store-or-network":return e.check(a).status==="available"?tbe.from(e.lookup(a.fragment)).map(u):u$(e,a).map(u);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function u$(e,t){return sbe.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var dbe=cbe,fbe=Rl,hbe=fbe.createOperationDescriptor,pbe=Jo,gbe=pbe.getRequest;function mbe(e,t,r,n){var i=gbe(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=hbe(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var vbe=mbe,_be=(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(s){try{s(i)}catch(a){setTimeout(function(){throw a},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,s=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;s.add(i);var a=function(){s.delete(i)};return this._callbacks.set(n,s),{dispose:a}},t.clear=function(){this._preloadableQueries.clear()},e})(),bbe=new _be,ybe=bbe,xbe=lv,Sbe=xbe.getPromiseForActiveRequest;function Ebe(e,t,r){var n,i,o=[],s=Sbe(e,r);if(s!=null)o=[r];else{var a,l,u=e.getOperationTracker(),d=u.getPendingOperationsAffectingOwner(r);o=(a=d?.pendingOperations)!==null&&a!==void 0?a:[],s=(l=d?.promise)!==null&&l!==void 0?l:null}if(!s)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(g){return g.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 s.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:s,pendingOperations:o}}var m8=Ebe;function wbe(e,t){return e===t&&(e===null||typeof e!="object")}var v8=wbe;function kbe(e,t){return Y1(e,t,!0)}function Y1(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 s=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,g){var m=i[g],v=Y1(m,p,s);return v!==o[g]&&s&&(o[g]=v),h&&v===i[g]},!0)&&i.length===o.length}else if(!i&&!o){var a=e,l=t,u=Object.keys(a),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var g=a[p],m=Y1(g,l[p],f);return m!==l[p]&&f&&(l[p]=m),h&&m===a[p]},!0)&&u.length===d.length}return n?e:t}var dv=kbe,_8=je.default,c$=_8(zt),Pw=_8(Jn),Cbe=m8,Rbe=ip,Abe=Rbe.handlePotentialSnapshotErrors,Tbe=v8,$be=dv,b8=_o,Nbe=Rl,Dbe=Nbe.createRequestDescriptor,Ow=Qo,Fbe=Ow.areEqualSelectors,Ibe=Ow.createReaderSelector,Pbe=Ow.getSelectorsFromObject,Obe=va,d$=De,Mbe=(function(){function e(r,n,i,o,s){var a=this;(0,Pw.default)(this,"_onChange",function(){a._stale=!0,typeof a._callback=="function"&&a._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=s,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&y8(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 s=this._resolvers[o],a=n[o];if(s){var l=s.resolve();(i||l!==a)&&(i=i||(0,c$.default)({},n),i[o]=l)}else{var u=this._props[o],d=u!==void 0?u:null;(i||!Tbe(d,a))&&(i=i||(0,c$.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,b8.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=Pbe(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var s=i[o],a=this._resolvers[o];s==null?(a?.dispose(),a=null):s.kind==="PluralReaderSelector"?a==null?a=new f$(this._context.environment,this._rootIsQueryRenderer,s,this._callback!=null,this._onChange):(a instanceof f$||d$(!1),a.setSelector(s)):a==null?a=new X1(this._context.environment,this._rootIsQueryRenderer,s,this._callback!=null,this._onChange):(a instanceof X1||d$(!1),a.setSelector(s)),this._props[o]=n[o],this._resolvers[o]=a}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var s=this._resolvers[o];s&&s.setVariables(n,i)}this._stale=!0},e})(),X1=(function(){function e(r,n,i,o,s){var a=this;(0,Pw.default)(this,"_onChange",function(u){a._data=u.data,a._isMissingData=u.isMissingData,a._fieldErrors=u.fieldErrors,a._callback()});var l=r.lookup(i);this._callback=s,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,b8.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=Cbe(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,s=(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:s}),i}}return Abe(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&Fbe(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=$be(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(!Obe(n,this._selector.variables)){var o=Dbe(i,n),s=Ibe(this._selector.node,this._selector.dataID,n,o);this.setSelector(s)}},e})(),f$=(function(){function e(r,n,i,o,s){var a=this;(0,Pw.default)(this,"_onChange",function(l){a._stale=!0,a._callback()}),this._callback=s,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(y8)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var s=n[o],a=this._resolvers[o].resolve();(i||a!==s)&&(i=i||n.slice(0,o),i.push(a))}!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 s=0;s<i.length;s++)s<this._resolvers.length?this._resolvers[s].setSelector(i[s]):this._resolvers[s]=new X1(this._environment,this._rootIsQueryRenderer,i[s],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 y8(e){e&&e.dispose()}var Lbe=Mbe,zbe=Lbe;function Ube(e,t,r,n,i,o){return new zbe(e,r,n,o,i)}var Bbe=Ube,jbe=De,lb,h$;function qbe(e){return lb||(lb=e.createContext(null),h$=e),e!==h$&&jbe(!1),lb}var Vbe=qbe,Kbe=De,ub,p$;function Hbe(e){return ub||(ub=e.createContext(null),p$=e),e!==p$&&Kbe(!1),ub}var Wbe=Hbe,x8=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function Gbe(){return x8}function Jbe(e){return e===x8}var fv={isSuspenseSentinel:Jbe,suspenseSentinel:Gbe},S8={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})(S8);var $d=S8.exports,hv=je.default,Qbe=hv(Jn),g$=hv($d),m$=hv(bL),Ga=hv(zt),Ybe=i8,E8=Ts,w8=E8.generateClientObjectClientID;E8.isClientID;var Xbe=fv,k8=Xbe.isSuspenseSentinel,_a=sr,Z1=_a.ACTOR_IDENTIFIER_KEY,Rn=_a.ERRORS_KEY,Mw=_a.ID_KEY,Zbe=_a.INVALIDATED_AT_KEY,ml=_a.REF_KEY,rd=_a.REFS_KEY,C8=_a.RELAY_RESOLVER_VALUE_KEY;_a.ROOT_ID;var Lw=_a.TYPENAME_KEY,cb=va,yu=De;function eye(e){return(0,Ga.default)({},e)}function tye(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==Mw&&r!==Lw&&(t[r]=e[r])}function rye(e,t){var r={};return r[Mw]=e,r[Lw]=t,r}function nye(e){return e}function iye(e){return e[Mw]}function oye(e){return Rn in e?Object.keys(e).filter(function(t){return t!==Rn}):Object.keys(e)}function sye(e){return e[Lw]}function aye(e,t){var r;return(r=e[Rn])===null||r===void 0?void 0:r[t]}function zw(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(ml)&&!r.hasOwnProperty(rd)||yu(!1)),r}function lye(e,t){return t in e}function uye(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[ml]=="string"||yu(!1),n[ml]}function cye(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[ml]=="string"}function dye(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[rd])||yu(!1),r[rd])}function fye(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[rd])&&r[rd].every(function(n){return typeof n=="string"})}function hye(e){if(e==null)return null;var t=e[Zbe];return typeof t!="number"?null:t}function pye(e,t){var r,n=e[Rn],i=t[Rn],o=null;if(n==null&&i==null){var s;for(var a in t)(o||!cb(e[a],t[a]))&&(o=o!==null?o:(0,Ga.default)({},e),o[a]=t[a]);return(s=o)!==null&&s!==void 0?s:e}for(var l in t)if(l!==Rn){var u=t[l],d=i?.[l];if(o==null){var f=e[l],h=n?.[l];if(cb(f,u)&&cb(h,d))continue;o=(0,Ga.default)({},e),n!=null&&(o[Rn]=(0,Ga.default)({},n))}A8(o,l,u),R8(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function gye(e,t){if(Rn in e||Rn in t){var r=e[Rn],n=(0,g$.default)(e,[Rn].map(m$.default)),i=t[Rn],o=(0,g$.default)(t,[Rn].map(m$.default)),s=(0,Ga.default)((0,Ga.default)({},n),o);if(r==null&&i==null)return s;var a={};for(var l in r)o.hasOwnProperty(l)||(a[l]=r[l]);for(var u in i)a[u]=i[u];for(var d in a){s[Rn]=a;break}return s}else return(0,Ga.default)((0,Ga.default)({},e),t)}function mye(e){Ybe(e)}function R8(e,t,r){var n=e[Rn];if(r!=null&&r.length>0)n==null?e[Rn]=(0,Qbe.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[Rn]}}function A8(e,t,r){e[t]=r}function vye(e,t,r){var n={};n[ml]=r,e[t]=n}function _ye(e,t,r){var n={};n[rd]=r,e[t]=n}function bye(e,t,r,n){var i={};i[ml]=n,i[Z1]=r,e[t]=i}function yye(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[ml]=="string"&&r[Z1]!=null||yu(!1),[r[Z1],r[ml]])}function xye(e,t){var r=zw(e,C8);return r==null||k8(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&yu(!1),w8(t,r))}function Sye(e,t){var r=zw(e,C8);return r==null||k8(r)?null:(Array.isArray(r)||yu(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&yu(!1),w8(t,n))}))}function Eye(e){return e}var Ui={clone:eye,copyFields:tye,create:rye,freeze:mye,fromObject:nye,getDataID:iye,getErrors:aye,getFields:oye,getInvalidationEpoch:hye,getLinkedRecordID:uye,getLinkedRecordIDs:dye,getType:sye,getValue:zw,hasValue:lye,hasLinkedRecordID:cye,hasLinkedRecordIDs:fye,merge:gye,setErrors:R8,setValue:A8,setLinkedRecordID:vye,setLinkedRecordIDs:_ye,update:pye,getActorLinkedRecordID:yye,setActorLinkedRecordID:bye,getResolverLinkedRecordID:xye,getResolverLinkedRecordIDs:Sye,toJSON:Eye},wye={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},pv=wye,kye=je.default,Cye=kye(Tr),v$=Ui,Uw=pv,Rye=Uw.EXISTENT,Aye=Uw.NONEXISTENT,Tye=Uw.UNKNOWN,$ye=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],s=v$.fromObject(o);n._records.set(i,s)})}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?Aye:Rye:Tye},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,Cye.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=s[0],l=s[1];n[a]=v$.toJSON(l)}}catch(u){i.e(u)}finally{i.f()}return n},e})(),Pu=$ye,Nye=De,T8="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function Dye(e){e!==T8&&Nye(!1)}var Bw={assertInternalActorIdentifier:Dye,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:T8},ex="actor_key",Fye=Bw,Iye=Fye.getActorIdentifier;function Pye(e){if(e!=null&&typeof e=="object"&&typeof e[ex]=="string")return Iye(e[ex])}var Oye={ACTOR_IDENTIFIER_FIELD_NAME:ex,getActorIdentifierFromPayload:Pye},gv=je.default,_$=gv(zt),Mye=gv($d),$8=gv(Tr),Lye=gv(wl),zye=["path","locations"],tx=Symbol("$SELF");function Uye(e){if(e==null)return null;var t=new Map,r=(0,$8.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,s=i.locations,a=(0,Mye.default)(i,zye);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 g=new Map;Array.isArray(p)&&g.set(tx,p),d.set(h,g),d=g}var m=o[u],v=d.get(m);v instanceof Map&&(d=v,v=d.get(m),m=tx),Array.isArray(v)?v.push(a):d.set(m,[a])}}}}catch(_){r.e(_)}finally{r.f()}return t}function Bye(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return N8(r,n),n}function N8(e,t){var r=(0,$8.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],s=i[1],a=t.length;if(Array.isArray(s)?t.push.apply(t,(0,Lye.default)(s)):N8(s,t),o!==tx)for(var l=t.length,u=a;u<l;u++){var d=t[u];d.path==null?t[u]=(0,_$.default)((0,_$.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function jye(e,t){var r=e.get(t);return r instanceof Map?r:null}var qye={buildErrorTrie:Uye,getNestedErrorTrieByKey:jye,getErrorsByKey:Bye},Vye="client:__type:",Kye="__TypeSchema";function Hye(e){return Vye+e}var mv={generateTypeID:Hye,TYPE_SCHEMA_TYPE:Kye},D8=je.default,Wye=D8(Tr),ef=D8(wl),F8=Oye;F8.ACTOR_IDENTIFIER_FIELD_NAME;var Gye=F8.getActorIdentifierFromPayload,b$=_o,I8=Ts,db=I8.generateClientID,Jye=I8.isClientID,Qye=kl,Yye=Qye.getLocalVariables,jw=qye,Xye=jw.buildErrorTrie,Zye=jw.getErrorsByKey,y$=jw.getNestedErrorTrieByKey,ct=Ui,e1e=Qo,t1e=e1e.createNormalizationSelector,Ou=sr,r1e=Ou.ROOT_ID,n1e=Ou.TYPENAME_KEY,x$=Ou.getArgumentValues,i1e=Ou.getHandleStorageKey,o1e=Ou.getModuleComponentKey,s1e=Ou.getModuleOperationKey,fb=Ou.getStorageKey,P8=mv,hb=P8.TYPE_SCHEMA_TYPE,pb=P8.generateTypeID,Zn=De;function a1e(e,t,r,n,i,o){var s=t.dataID,a=t.node,l=t.variables,u=new l1e(e,l,n,o??!1);return u.normalizeResponse(a,s,r,i)}var l1e=(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,ef.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,s){var a=this._recordSource.get(i);return a||Zn(!1),this._assignClientAbstractTypes(n),this._errorTrie=Xye(s),this._traverseSelections(n,a,o),{errors:s,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,s=Object.keys(i);o<s.length;o++){var a=s[o],l=(0,Wye.default)(i[a]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=pb(d),h=this._recordSource.get(f);h==null&&(h=ct.create(f,hb),this._recordSource.set(f,h)),ct.setValue(h,a,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Zn(!1),this._variables[n]},t._getRecordType=function(n){var i=n[n1e];return i==null&&Zn(!1),i},t._traverseSelections=function(n,i,o){for(var s=0;s<n.selections.length;s++){var a=n.selections[s];switch(a.kind){case"ScalarField":case"LinkedField":this._normalizeField(a,i,o);break;case"Condition":var l=!!this._getVariableValue(a.condition);l===a.passingValue&&this._traverseSelections(a,i,o);break;case"FragmentSpread":{var u=this._variables;this._variables=Yye(this._variables,a.fragment.argumentDefinitions,a.args),this._traverseSelections(a.fragment,i,o),this._variables=u;break}case"InlineFragment":{var d=a.abstractKey;if(d==null){var f=ct.getType(i);f===a.type&&this._traverseSelections(a,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=ct.getType(i),g=pb(p),m=this._recordSource.get(g);m==null&&(m=ct.create(g,hb),this._recordSource.set(g,m)),ct.setValue(m,d,h),h&&this._traverseSelections(a,i,o)}break}case"TypeDiscriminator":{var v=a.abstractKey,_=Object.prototype.hasOwnProperty.call(o,v),y=ct.getType(i),E=pb(y),S=this._recordSource.get(E);S==null&&(S=ct.create(E,hb),this._recordSource.set(E,S)),ct.setValue(S,v,_);break}case"LinkedHandle":case"ScalarHandle":var k=a.args?x$(a.args,this._variables):{},C=fb(a,this._variables),$=i1e(a,this._variables);this._handleFieldPayloads.push({args:k,dataID:ct.getDataID(i),fieldKey:C,handle:a.handle,handleKey:$,handleArgs:a.handleArgs?x$(a.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(a,i,o);break;case"Defer":this._normalizeDefer(a,i,o);break;case"Stream":this._normalizeStream(a,i,o);break;case"ClientExtension":var A=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(a,i,o),this._isClientExtension=A;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(a.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(a,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(a,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(a.backingField,i,o);break;default:Zn(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var s=n.if===null||this._getVariableValue(n.if);s===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,ef.default)(this._path),selector:t1e(n,ct.getDataID(i),this._variables),typeName:ct.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,o){this._traverseSelections(n,i,o);var s=n.if===null||this._getVariableValue(n.if);s===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,ef.default)(this._path),parentID:ct.getDataID(i),node:n,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeModuleImport=function(n,i,o){typeof o=="object"&&o||Zn(!1);var s=ct.getType(i),a=o1e(n.documentName),l=n.componentModuleProvider||o[a];ct.setValue(i,a,l??null);var u=s1e(n.documentName),d=n.operationModuleProvider||o[u];ct.setValue(i,u,d??null),d!=null&&this._followupPayloads.push({kind:"ModuleImportPayload",args:n.args,data:o,dataID:ct.getDataID(i),operationReference:d,path:(0,ef.default)(this._path),typeName:s,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||Zn(!1);var s=n.alias||n.name,a=fb(n,this._variables),l=o[s],u=b$.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,a,null),u?n.kind==="LinkedField"?ct.setLinkedRecordIDs(i,a,[]):ct.setValue(i,a,[]):ct.setValue(i,a,null);var f=this._errorTrie;if(f!=null){var h=Zye(f,s);h!=null&&ct.setErrors(i,a,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,a,l),ct.setValue(i,a,l);else if(n.kind==="LinkedField"){this._path.push(s);var p=this._errorTrie;this._errorTrie=p==null?null:y$(p,s),n.plural?this._normalizePluralLink(n,i,a,l):this._normalizeLink(n,i,a,l),this._errorTrie=p,this._path.pop()}else Zn(!1)},t._normalizeActorChange=function(n,i,o){var s,a=n.linkedField;typeof o=="object"&&o||Zn(!1);var l=a.alias||a.name,u=fb(a,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}ct.setValue(i,u,null);return}var h=Gye(d);if(h==null){ct.setValue(i,u,null);return}var p=(s=a.concreteType)!==null&&s!==void 0?s:this._getRecordType(d),g=this._getDataId(d,p)||ct.getLinkedRecordID(i,u)||db(ct.getDataID(i),u);typeof g!="string"&&Zn(!1),ct.setActorLinkedRecordID(i,u,h,g),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:g,path:[].concat((0,ef.default)(this._path),[l]),typeName:p,variables:this._variables,node:a,actorIdentifier:h})},t._normalizeLink=function(n,i,o,s){var a;typeof s=="object"&&s||Zn(!1);var l=this._getDataId(s,(a=n.concreteType)!==null&&a!==void 0?a:this._getRecordType(s))||ct.getLinkedRecordID(i,o)||db(ct.getDataID(i),o);typeof l!="string"&&Zn(!1),this._validateConflictingLinkedFieldsWithIdenticalId(ct.getLinkedRecordID(i,o),l,o),ct.setLinkedRecordID(i,o,l);var u=this._recordSource.get(l);if(u)this._validateRecordType(u,n,s);else{var d=n.concreteType||this._getRecordType(s);u=ct.create(l,d),this._recordSource.set(l,u)}this._traverseSelections(n,u,s)},t._normalizePluralLink=function(n,i,o,s){var a=this;Array.isArray(s)||Zn(!1);var l=ct.getLinkedRecordIDs(i,o),u=[];s.forEach(function(d,f){var h;if(d==null){u.push(d);return}a._path.push(String(f));var p=a._errorTrie;a._errorTrie=p==null?null:y$(p,f),typeof d!="object"&&Zn(!1);var g=a._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:a._getRecordType(d))||l&&l[f]||db(ct.getDataID(i),o,f);typeof g!="string"&&Zn(!1),u.push(g);var m=a._recordSource.get(g);if(m)a._validateRecordType(m,n,d);else{var v=n.concreteType||a._getRecordType(d);m=ct.create(g,v),a._recordSource.set(g,m)}l&&a._validateConflictingLinkedFieldsWithIdenticalId(l[f],g,o),a._traverseSelections(n,m,d),a._errorTrie=p,a._path.pop()}),ct.setLinkedRecordIDs(i,o,u)},t._validateRecordType=function(n,i,o){if(b$.ENABLE_STORE_ID_COLLISION_LOGGING){var s,a=(s=i.concreteType)!==null&&s!==void 0?s:this._getRecordType(o),l=ct.getDataID(n),u=Jye(l)&&l!==r1e||ct.getType(n)===a;if(!u){var d={name:"idCollision.typename",previous_typename:ct.getType(n),new_typename:a};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),O8={normalize:a1e},vv=je.default,S$=vv(zt),u1e=vv(Ui),c1e=vv(Pu),d1e=vv(O8);function f1e(e,t,r,n,i){var o,s=e.data,a=e.errors,l=c1e.default.create(),u=u1e.default.create(t.dataID,r);l.set(t.dataID,u);var d=d1e.default.normalize(l,t,s,n,a,i);return(0,S$.default)((0,S$.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var h1e=f1e,p1e=Jo,g1e=p1e.getInlineDataFragment,m1e=sr,v1e=m1e.FRAGMENTS_KEY,E$=De;function _1e(e,t){var r,n=g1e(e);if(t==null)return t;typeof t!="object"&&E$(!1);var i=(r=t[v1e])===null||r===void 0?void 0:r[n.name];return i==null&&E$(!1),i}var b1e=_1e,y1e=1e5;function x1e(){return y1e++}var M8=x1e,S1e=M8;function E1e(e,t){return{execute:function(n,i,o,s,a,l,u,d){var f=S1e(),h={start:function(m){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(m){e.__log({name:"network.next",networkRequestId:f,response:m})},error:function(m){e.__log({name:"network.error",networkRequestId:f,error:m})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(m){e.__log({name:"network.info",networkRequestId:f,info:m})};return t.execute(n,i,o,s,p,l,u,d).do(h)}}}var w1e=E1e,k1e=je.default,tf=k1e(Tr),C1e=De,R1e=(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,s=new Set,a=(0,tf.default)(i),l;try{for(a.s();!(l=a.n()).done;){var u=l.value,d=u.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),s.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),s.add(d))}}catch(v){a.e(v)}finally{a.f()}if(s.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,tf.default)(s),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;this._resolveOwnerResolvers(m),h.add(m)}}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 s=new Set,a=new Set,l=(0,tf.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?a.add(d):s.add(d))}}catch(y){l.e(y)}finally{l.f()}var h=(0,tf.default)(s),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;this._resolveOwnerResolvers(g),this._ownersToPendingOperations.delete(g)}}catch(y){h.e(y)}finally{h.f()}var m=(0,tf.default)(a),v;try{for(m.s();!(v=m.n()).done;){var _=v.value;this._resolveOwnerResolvers(_)}}catch(y){m.e(y)}finally{m.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 s=this._ownersToPendingPromise.get(i);if(s!=null)return{promise:s.promise,pendingOperations:s.pendingOperations};var a,l=new Promise(function(d){a=d});a==null&&C1e(!1);var u=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:a,pendingOperations:u}),{promise:l,pendingOperations:u}},e})(),A1e=R1e;function T1e(e){var t=typeof Z0<"u"?Z0:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var $1e=T1e,N1e=Ts,D1e=N1e.generateClientID,F1e=sr,I1e=F1e.ROOT_ID,P1e=D1e(I1e,"viewer"),O1e="Viewer",qw={VIEWER_ID:P1e,VIEWER_TYPE:O1e},L8=qw,M1e=L8.VIEWER_ID,L1e=L8.VIEWER_TYPE;function z1e(e,t){return t===L1e&&e.id==null?M1e:e.id}var z8=z1e,U1e=function(t){},B1e=U1e,U8=Nu,j1e=U8.REQUEST,q1e=U8.SPLIT_OPERATION;function V1e(e){switch(e.kind){case j1e:return e.operation;case q1e:default:return e}}var Vw=V1e;function w$(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 s=0,a=r.replace(/%s/g,function(){return String(i[s++])}),l=new Error(a),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 K1e={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 w$.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 w$.apply(void 0,["warn",t,r].concat(i))}},gb,mb,H1e=typeof window<"u"&&typeof((gb=window)===null||gb===void 0||(mb=gb.performance)===null||mb===void 0?void 0:mb.now)=="function";function k$(){return H1e?window.performance.now():Date.now()}function W1e(e){var t=k$(),r=e();return[t,k$()-t,r]}var G1e=W1e,B8=je.default,rf=B8(Tr),nf=B8(wl),vb=Cl,J1e=M8,_b=Vw,Q1e=K1e,Zp=_o,Y1e=Du,X1e=Y1e.stableCopy,Z1e=G1e,j8=Ts,C$=j8.generateClientID,exe=j8.generateUniqueClientID,txe=kl,rxe=txe.getLocalVariables,e0=Ui,q8=Qo,bb=q8.createNormalizationSelector,nxe=q8.createReaderSelector,t0=Pu,Kw=sr,R$=Kw.ROOT_TYPE,ixe=Kw.TYPENAME_KEY,oxe=Kw.getStorageKey,Fr=De;function sxe(e){return new axe(e)}var axe=(function(){function e(r){var n=this,i,o,s,a=r.actorIdentifier,l=r.getDataID,u=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,g=r.operationLoader,m=r.operationTracker,v=r.optimisticConfig,_=r.scheduler,y=r.shouldProcessClientComponents,E=r.sink,S=r.source,k=r.treatMissingFieldsAsNull,C=r.updater,$=r.log,A=r.normalizeResponse;this._actorIdentifier=a,this._getDataID=l,this._treatMissingFieldsAsNull=k,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=$,this._executeId=J1e(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=g,this._operationTracker=m,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:((s=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=u,this._scheduler=_,this._sink=E,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=C,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=y,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=A;var N=this._nextSubscriptionId++;Zp.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),S.subscribe({complete:function(){return n._complete(N)},error:function(P){return n._error(P)},next:function(P){try{n._next(N,P)}catch(I){E.error(I)}},start:function(P){var I;n._start(N,P),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(I=n._operation.request.cacheConfig)!==null&&I!==void 0?I:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!Zp.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,Fr(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,s=this._scheduler;if(s!=null){var a=this._nextSubscriptionId++;vb.create(function(l){var u=s.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return s.cancel(u)}}).subscribe({complete:function(){return o._complete(a)},error:function(u){return o._error(u)},start:function(u){return o._start(a,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,s=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})},s)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(s){if(!(s.data===null&&s.extensions!=null&&!s.hasOwnProperty("errors")))if(s.data==null){var a=s.hasOwnProperty("errors")&&s.errors!=null?s.errors:null,l=a?a.map(function(f){var h=f.message;return h}).join(`
|
|
68
|
+
`):"(No errors)",u=Q1e.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:a,operation:i._operation.request.node,variables:i._operation.request.variables},u.stack,u}else{var d=s;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(a){var l;return((l=a.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&Fr(!1),!1;var o=n[0],s=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return s&&this._state!=="started"&&Fr(!1),s?(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 s=i.some(function(A){var N;return((N=A.extensions)===null||N===void 0?void 0:N.is_final)===!0});s&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var a=this._handleOptimisticResponses(o);if(!a){var l=lxe(o),u=l[0],d=l[1],f=l[2],h=u.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var g=exe();this._operation={request:this._operation.request,fragment:nxe(this._operation.fragment.node,g,this._operation.fragment.variables,this._operation.fragment.owner),root:bb(this._operation.root.node,g,this._operation.root.variables)}}var m=this._processResponses(u);this._processPayloadFollowups(m)}if(p)for(var v=[],_=0;_<f.length;_++){var y,E=f[_],S=new t0(E.data),s=((y=E.extensions)===null||y===void 0?void 0:y.is_final)===!0,k={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:s,source:S};this._getPublishQueueAndSaveActor().commitPayload(this._operation,k,this._updater),v.push(k),this._execTimeResolverResponseComplete=s,s&&this._updateActiveState()}if(d.length>0){var C=this._processIncrementalResponses(d);this._processPayloadFollowups(C)}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 $=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker($),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var s=this;if(this._optimisticUpdates!==null&&Fr(!1),!(n==null&&i==null)){var a=[];if(n){var l=this._normalizeResponse(n,this._operation.root,R$,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);A$(l),a.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,a)}else i&&a.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:t0.create(),isFinal:!1},updater:i});this._optimisticUpdates=a,a.forEach(function(d){return s._getPublishQueueAndSaveActor().applyUpdate(d)});var u=this._runPublishQueue();Zp.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(u)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var o=n.followupPayloads,s=(0,rf.default)(o),a;try{for(s.s();!(a=s.n()).done;){var l=a.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,nf.default)(f))}break;case"ActorPayload":break;default:Fr(!1)}}}catch(h){s.e(h)}finally{s.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=rxe(n.variables,i.argumentDefinitions,n.args):o=n.variables;var s=bb(i,n.dataID,o),a={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(a,s,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=_b(n),s=[],a=this._normalizeFollowupPayload(i,o);return A$(a),s.push({operation:this._operation,payload:a,updater:null}),this._processOptimisticFollowups(a,s),s},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var s=i._processOptimisticModuleImport(o,n);if(s.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var a;(a=i._optimisticUpdates).push.apply(a,(0,nf.default)(s)),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 s=i._normalizeResponse(o,i._operation.root,R$,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,s,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),s})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var s=o.incrementalPlaceholders,a=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),a&&a.length!==0&&a.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}),s&&s.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",s.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=[];s.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(),s=o.get(n.operationReference);if(s!=null)this._processFollowupPayloadWithNormalizationNode(n,_b(s));else{var a=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},u=vb.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));vb.create(function(d){var f,h=u.subscribe({next:function(g){if(g!=null){var m=function(){try{var y=_b(g),E=Zp.BATCH_ASYNC_MODULE_UPDATES_FN,S=E!=null&&i._pendingModulePayloadsCount>1,k=Z1e(function(){if(i._handleFollowupPayload(n,y),S)i._scheduleAsyncStoreUpdate(E,d.complete);else{var A=i._runPublishQueue();i._updateOperationTracker(A)}}),C=k[0],$=k[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:y.name,duration:$}),S||d.complete()}catch(A){d.error(A)}},v=i._scheduler;v==null?m():f=v.schedule(m)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(a),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(a,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:Fr(!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,s=i.label,a=i.path,l=a.map(String).join("."),u=this._incrementalResults.get(s);u==null&&(u=new Map,this._incrementalResults.set(s,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:Fr(!1);var p=n.source.get(h),g=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(k){var C=C$(k.dataID,k.fieldKey);return k.dataID===h||C===h});p==null&&Fr(!1);var m,v,_=this._source.get(h);if(_!=null){m=e0.update(_.record,p);var y=new Map,E=function(C){var $=uxe(C);y.set($,C)};_.fieldPayloads.forEach(E),g.forEach(E),v=Array.from(y.values())}else m=p,v=g;if(this._source.set(h,{record:m,fieldPayloads:v}),f!=null){var S=this._processIncrementalResponses(f);this._processPayloadFollowups(S)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(s){var a=s.label,l=s.path,u=s.response,d=i._incrementalResults.get(a);if(d==null&&(d=new Map,i._incrementalResults.set(a,d)),a.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[s]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(s);return}var p=h.placeholder;p.kind!=="defer"&&Fr(!1),o.push(i._processDeferResponse(a,l,p,u))}else{var g=l.slice(0,-2).map(String).join("."),m=d.get(g);if(m==null){m={kind:"response",responses:[s]},d.set(g,m);return}else if(m.kind==="response"){m.responses.push(s);return}var v=m.placeholder;v.kind!=="stream"&&Fr(!1),o.push(i._processStreamResponse(a,l,v,u))}}),o},t._processDeferResponse=function(n,i,o,s){var a,l=o.selector.dataID,u=this._actorIdentifier;this._actorIdentifier=(a=o.actorIdentifier)!==null&&a!==void 0?a:this._actorIdentifier;var d=this._normalizeResponse(s,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&&Fr(!1);var h=f.fieldPayloads;if(h.length!==0){var p,g={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:t0.create(),isFinal:((p=s.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,g)}return this._actorIdentifier=u,d},t._processStreamResponse=function(n,i,o,s){var a=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||Fr(!1);var p=this._normalizeStreamItem(s,a,h,u,i,o.path),g=p.fieldPayloads,m=p.itemID,v=p.itemIndex,_=p.prevIDs,y=p.relayPayload,E=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,y,function(k){var C=k.get(a);if(C!=null){var $=C.getLinkedRecords(E);if($!=null&&!($.length!==_.length||$.some(function(N,O){return _[O]!==(N&&N.getDataID())}))){var A=(0,nf.default)($);A[v]=k.get(m),C.setLinkedRecords(A,E)}}}),g.length!==0){var S={errors:null,fieldPayloads:g,incrementalPlaceholders:null,followupPayloads:null,source:t0.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,S)}return this._actorIdentifier=f,y},t._normalizeStreamItem=function(n,i,o,s,a,l){var u,d,f,h,p=n.data;typeof p!="object"&&Fr(!1);var g=(u=o.alias)!==null&&u!==void 0?u:o.name,m=oxe(o,s),v=this._source.get(i);v==null&&Fr(!1);var _=v.record,y=v.fieldPayloads,E=e0.getLinkedRecordIDs(_,m);E==null&&Fr(!1);var S=a[a.length-1],k=parseInt(S,10);k===S&&k>=0||Fr(!1);var C=(d=o.concreteType)!==null&&d!==void 0?d:p[ixe];typeof C!="string"&&Fr(!1);var $=(f=(h=this._getDataID(p,C))!==null&&h!==void 0?h:E?.[k])!==null&&f!==void 0?f:C$(i,m,k);typeof $!="string"&&Fr(!1);var A=bb(o,$,s),N=e0.clone(_),O=(0,nf.default)(E);O[k]=$,e0.setLinkedRecordIDs(N,m,O),this._source.set(i,{record:N,fieldPayloads:y});var P=this._normalizeResponse(n,A,C,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,nf.default)(l),[g,String(k)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:y,itemID:$,itemIndex:k,prevIDs:E,relayPayload:P,storageKey:m}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var s=o._runPublishQueue();o._updateOperationTracker(s);var a=(0,rf.default)(o._completeFns),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;u()}}catch(d){a.e(d)}finally{a.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,rf.default)(this._getActorsToVisit()),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,l=this._getPublishQueue(a).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,rf.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(s){n.e(s)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,rf.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(s){n.e(s)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Fr(!1),n},e})();function lxe(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var s=i.label,a=i.path;(s==null||a==null)&&Fr(!1),r.push({label:s,path:a,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 uxe(e){var t;return(t=JSON.stringify(X1e(e)))!==null&&t!==void 0?t:""}function A$(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Fr(!1)}var cxe={execute:sxe},dxe=Promise.resolve();function fxe(e){dxe.then(e).catch(hxe)}function hxe(e){setTimeout(function(){throw e},0)}var pxe=fxe,nn=Ui,gxe=pv,T$=gxe.EXISTENT,yb=De,mxe=(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 s=nn.clone(i);return s}else{if(o===null)return null;if(i!=null){var a=nn.update(i,o);return a}else{var l=nn.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=nn.create(n,nn.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),s=this._base.get(n);o||s||yb(!1);var a=this._getSinkRecord(i);s&&nn.copyFields(s,a),o&&nn.copyFields(o,a)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);nn.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==T$&&this._sink.getStatus(n)!==T$||yb(!1);var o=nn.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 nn.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getValue(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setValue=function(n,i,o){var s=this._getSinkRecord(n);nn.setValue(s,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getErrors(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setErrors=function(n,i,o){var s=this._getSinkRecord(n);nn.setErrors(s,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getLinkedRecordID(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setLinkedRecordID=function(n,i,o){var s=this._getSinkRecord(n);nn.setLinkedRecordID(s,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getLinkedRecordIDs(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var s=this._getSinkRecord(n);nn.setLinkedRecordIDs(s,i,o)},e})(),V8=mxe,vxe=je.default,_v=vxe(Tr),_xe=sr,nd=_xe.getArgumentValues,bxe=["id","__id","__typename","js"];function yxe(e,t,r,n,i){var o={};return Rh(o,e,t,r,n,i),o}function Rh(e,t,r,n,i,o){var s,a=(0,_v.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:Exe(p,r,t,i,o),set:xxe(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:wxe(p,r,t,i,o),set:Sxe(p,r,t,i)});break;case"ScalarField":var g=(s=p.alias)!==null&&s!==void 0?s:p.name;Object.defineProperty(e,g,{get:function(){var v,_=nd((v=p.args)!==null&&v!==void 0?v:[],r),y=t.getValue(p.name,_);return y==null&&(y=Rxe(p,_,t,i,o)),y},set:bxe.includes(p.name)?void 0:function(m){var v,_=nd((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(m,p.name,_)}});break;case"InlineFragment":t.getType()===p.type&&Rh(e,t,r,p.selections,i,o);break;case"ClientExtension":Rh(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(a.s();!(l=a.n()).done;){var d,f;u()}}catch(h){a.e(h)}finally{a.f()}}function xxe(e,t,r,n){return function(o){var s,a=nd((s=e.args)!==null&&s!==void 0?s:[],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,a)}}function Sxe(e,t,r,n){return function(o){var s,a=nd((s=e.args)!==null&&s!==void 0?s:[],t);if(o==null)r.setValue(o,e.name,a);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,a)}}}function Exe(e,t,r,n,i){return function(){var o,s=nd((o=e.args)!==null&&o!==void 0?o:[],t),a=r.getLinkedRecords(e.name,s);return a===void 0&&(a=Cxe(e,s,r,n,i)),a!=null?a.map(function(l){if(l!=null){var u={};return Rh(u,l,t,e.selections,n,i),u}else return l}):a}}function wxe(e,t,r,n,i){return function(){var o,s=nd((o=e.args)!==null&&o!==void 0?o:[],t),a=r.getLinkedRecord(e.name,s);if(a===void 0&&(a=kxe(e,s,r,n,i)),a!=null){var l={};return Rh(l,a,t,e.selections,n,i),l}else return a}}function kxe(e,t,r,n,i){var o=(0,_v.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.kind==="linked"){var l=a.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(u){o.e(u)}finally{o.f()}}function Cxe(e,t,r,n,i){var o=(0,_v.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.kind==="pluralLinked"){var l=a.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 Rxe(e,t,r,n,i){var o=(0,_v.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.kind==="scalar"){var l=a.handle(e,r,t,n);if(l!==void 0)return l}}}catch(u){o.e(u)}finally{o.f()}}var K8={createUpdatableProxy:yxe},Axe=Jo,Txe=Axe.getFragment,$xe=Qo,Nxe=$xe.getVariablesFromFragment,Dxe=sr,Fxe=Dxe.ID_KEY,Ixe=K8,Pxe=Ixe.createUpdatableProxy,Oxe=De;function Mxe(e,t,r,n){var i=Txe(e),o=Nxe(i,t),s=t[Fxe],a=r.get(s);return a==null&&Oxe(!1),{updatableData:Pxe(a,o,i.selections,r,n)}}var H8={readUpdatableFragment:Mxe},Lxe=Jo,zxe=Lxe.getUpdatableQuery,Uxe=K8,Bxe=Uxe.createUpdatableProxy;function jxe(e,t,r,n){var i=zxe(e);return{updatableData:Bxe(r.getRoot(),t,i.fragment.selections,r,n)}}var W8={readUpdatableQuery:jxe},qxe=Ts,Vxe=qxe.generateClientID,Kxe=sr,$a=Kxe.getStableStorageKey,r0=De,Hxe=(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&&r0(!1),n},t.getValue=function(n,i){var o=$a(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,s){return G8(n)||r0(!1),this.setValue__UNSAFE(n,i,o,s)},t.getErrors=function(n,i){var o=$a(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,s){var a=$a(i,o);return this._mutator.setValue(this._dataID,a,n),s!=null&&(s.length===0?this._mutator.setErrors(this._dataID,a):this._mutator.setErrors(this._dataID,a,s)),this},t.getLinkedRecord=function(n,i){var o=$a(n,i),s=this._mutator.getLinkedRecordID(this._dataID,o);return s!=null?this._source.get(s):s},t.setLinkedRecord=function(n,i,o){n instanceof e||r0(!1);var s=$a(i,o),a=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,s,a),this},t.getOrCreateLinkedRecord=function(n,i,o){var s=this.getLinkedRecord(n,o);if(!s){var a,l=$a(n,o),u=Vxe(this.getDataID(),l);s=(a=this._source.get(u))!==null&&a!==void 0?a:this._source.create(u,i),this.setLinkedRecord(s,n,o)}return s},t.getLinkedRecords=function(n,i){var o=this,s=$a(n,i),a=this._mutator.getLinkedRecordIDs(this._dataID,s);return a==null?a:a.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||r0(!1);var s=$a(i,o),a=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,s,a),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function G8(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(G8)}var Wxe=Hxe,Gxe=Ui,J8=pv,xb=J8.EXISTENT,$$=J8.NONEXISTENT,Q8=sr,Sb=Q8.ROOT_ID,N$=Q8.ROOT_TYPE,Jxe=H8,Qxe=Jxe.readUpdatableFragment,Yxe=W8,Xxe=Yxe.readUpdatableQuery,Zxe=Wxe,n0=De,eSe=(function(){function e(r,n,i,o,s){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=s??function(a){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,s=n.getRecordIDs();s.forEach(function(a){var l=n.getStatus(a);if(l===xb){var u=n.get(a);u&&(o.__mutator.getStatus(a)!==xb&&o.create(a,Gxe.getType(u)),o.__mutator.copyFieldsFromRecord(u,a))}else l===$$&&o.delete(a)}),i&&i.length&&i.forEach(function(a){var l=o._handlerProvider&&o._handlerProvider(a.handle);l||n0(!1),l.update(o,a)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var o=this.get(n);return o||n0(!1),o},t.delete=function(n){n===Sb&&n0(!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 Zxe(this,this.__mutator,n):this._proxies[n]=i===$$?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(Sb);return n||(n=this.create(Sb,N$)),n&&n.getType()===N$||n0(!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 Xxe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return Qxe(n,i,this,this._missingFieldHandlers)},e})(),Y8=eSe,tSe=Nu,D$=tSe.LINKED_FIELD,rSe=sr,nSe=rSe.getHandleStorageKey,iSe=va,oSe=De;function sSe(e,t,r){var n=t.find(function(o){return o.kind===D$&&o.name===e.name&&o.alias===e.alias&&iSe(o.args,e.args)});n&&n.kind===D$||oSe(!1);var i=nSe(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var X8=sSe,aSe=Nu,F$=aSe.SCALAR_FIELD,lSe=sr,uSe=lSe.getHandleStorageKey,cSe=va,dSe=De;function fSe(e,t,r){var n=t.find(function(o){return o.kind===F$&&o.name===e.name&&o.alias===e.alias&&cSe(o.args,e.args)});n&&n.kind===F$||dSe(!1);var i=uSe(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var hSe=fSe,pSe=je.default,i0=pSe(Tr),gSe=V8,mSe=Y8,vSe=Vw,_Se=Ts,bSe=_Se.isClientID,ySe=X8,xSe=hSe,SSe=kl,I$=SSe.getLocalVariables,P$=Ui,Z8=pv,Eb=Z8.EXISTENT,ESe=Z8.UNKNOWN,Hw=sr,e5=mv,wSe=e5.TYPE_SCHEMA_TYPE,wb=e5.generateTypeID,of=De,kSe=Hw.getModuleOperationKey,o0=Hw.getStorageKey,kb=Hw.getArgumentValues;function CSe(e,t,r,n,i,o,s,a,l,u){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new RSe(e,t,r,h,i,o,s,a,l,u),g=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),g}var RSe=(function(){function e(r,n,i,o,s,a,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],g=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=s,this._mutator=p,this._operationLoader=a??null,this._recordSourceProxy=g,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),s=new gSe(this._getSourceForActor(n),o),a=new mSe(s,this._getDataID,void 0,this._handlers,this._log);i=[s,a],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)||of(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&bSe(i))){var o=n.args!=null?kb(n.args,this._variables):{},s=(0,i0.default)(this._handlers),a;try{for(s.s();!(a=s.n()).done;){var l=a.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){s.e(d)}finally{s.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?kb(n.args,this._variables):{},s=(0,i0.default)(this._handlers),a;try{for(s.s();!(a=s.n()).done;){var l=a.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)===Eb))return u}}}catch(d){s.e(d)}finally{s.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,s=n.args!=null?kb(n.args,this._variables):{},a=(0,i0.default)(this._handlers),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;if(u.kind==="pluralLinked"){var d=u.handle(n,this._recordSourceProxy.get(i),s,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&o._mutator.getStatus(h)===Eb});if(f)return d}else if(d===null)return null}}}catch(h){a.e(h)}finally{a.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===ESe&&this._handleMissing(),o===Eb){var s=this._source.get(i),a=P$.getInvalidationEpoch(s);a!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,a):a),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(s){switch(s.kind){case"ScalarField":o._checkScalar(s,i);break;case"LinkedField":s.plural?o._checkPluralLink(s,i):o._checkLink(s,i);break;case"ActorChange":o._checkActorChange(s.linkedField,i);break;case"Condition":var a=!!o._getVariableValue(s.condition);a===s.passingValue&&o._traverseSelections(s.selections,i);break;case"InlineFragment":{var l=s.abstractKey;if(l==null){var u=o._mutator.getType(i);u===s.type&&o._traverseSelections(s.selections,i)}else{var d=o._mutator.getType(i);d==null&&of(!1);var f=wb(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(s.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=ySe(s,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var g=xSe(s,n,o._variables);o._checkScalar(g,i);break}case"ModuleImport":o._checkModuleImport(s,i);break;case"Defer":case"Stream":o._traverseSelections(s.selections,i);break;case"FragmentSpread":var m=o._variables;o._variables=I$(o._variables,s.fragment.argumentDefinitions,s.args),o._traverseSelections(s.fragment.selections,i),o._variables=m;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(s.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var _=s.abstractKey,y=o._mutator.getType(i);y==null&&of(!1);var E=wb(y),S=o._mutator.getValue(E,_);S==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(s.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(s,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(s.backingField,i);break;default:of(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&of(!1);var s=kSe(n.documentName),a=this._mutator.getValue(i,s);if(a==null){a===void 0&&this._handleMissing();return}var l=o.get(a);if(l!=null){var u=vSe(l),d=this._variables;this._variables=I$(this._variables,u.argumentDefinitions,n.args),this._traverse(u,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=o0(n,this._variables),s=this._mutator.getValue(i,o);s===void 0&&(s=this._handleMissingScalarField(n,i),s!==void 0&&this._mutator.setValue(i,o,s))},t._checkLink=function(n,i){var o=o0(n,this._variables),s=this._mutator.getLinkedRecordID(i,o);s===void 0&&(s=this._handleMissingLinkField(n,i),s!=null?this._mutator.setLinkedRecordID(i,o,s):s===null&&this._mutator.setValue(i,o,null)),s!=null&&this._traverse(n,s)},t._checkPluralLink=function(n,i){var o=this,s=o0(n,this._variables),a=this._mutator.getLinkedRecordIDs(i,s);a===void 0&&(a=this._handleMissingPluralLinkField(n,i),a!=null?this._mutator.setLinkedRecordIDs(i,s,a):a===null&&this._mutator.setValue(i,s,null)),a&&a.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=o0(n,this._variables),s=this._source.get(i),a=s!=null?P$.getActorLinkedRecordID(s,o):s;if(a==null)a===void 0&&this._handleMissing();else{var l=a[0],u=a[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),g=p[0],m=p[1];this._source=this._getSourceForActor(l),this._mutator=g,this._recordSourceProxy=m,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,s=Object.keys(i);o<s.length;o++){var a=s[o],l=(0,i0.default)(i[a]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=wb(d);this._source.get(f)==null&&this._mutator.create(f,wSe),this._mutator.getValue(f,a)==null&&this._mutator.setValue(f,a,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),ASe={check:CSe},TSe=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},$Se=Ui,NSe=sr,DSe=NSe.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,FSe=De;function ISe(e){var t=$Se.getValue(e,DSe);return t==null?null:(t instanceof Set||FSe(!1),t)}var t5=ISe;function PSe(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var OSe=PSe,MSe=je.default,ss=MSe(Tr),LSe=dv,zSe=Nu,O$=zSe.RELAY_LIVE_RESOLVER,USe=_o,M$=TSe,r5=Ts,s0=r5.generateClientID,Cb=r5.generateClientObjectClientID,et=Ui,BSe=Qo,jSe=BSe.createNormalizationSelector,a0=Pu,qSe=O8,VSe=qSe.normalize,Mu=sr,Rb=Mu.RELAY_RESOLVER_ERROR_KEY,rx=Mu.RELAY_RESOLVER_INVALIDATION_KEY,KSe=Mu.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,Ab=Mu.RELAY_RESOLVER_SNAPSHOT_KEY,Tb=Mu.RELAY_RESOLVER_VALUE_KEY,HSe=Mu.getReadTimeResolverStorageKey,WSe=Mu.getStorageKey,GSe=t5,JSe=OSe,QSe=fv,L$=QSe.isSuspenseSentinel,is=De,Ww="__resolverLiveStateSubscription",l0="__resolverLiveStateValue",u0="__resolverLiveStateDirty",n5="__RELAY_RESOLVER__",YSe="__relay_model_instance";function $b(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var XSe=(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,s,a){var l=this._getRecordSource(),u=If(l,n),d=HSe(i,o),f=et.getLinkedRecordID(u,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,a)){var g;h!=null&&o5(h),f=(g=f)!==null&&g!==void 0?g:s0(n,d),h=et.create(f,n5);var m=s();if(et.setValue(h,Ab,m.snapshot),et.setValue(h,Rb,m.error),i.kind===O$){if(m.resolverResult!=null){m.error!=null&&is(!1);var v=m.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,m.resolverResult,i,o);l.set(f,h);var _=If(l,n),y=et.clone(_);if(et.setLinkedRecordID(y,d,f),l.set(n,y),i.fragment!=null){var E,S=WSe(i.fragment,o),k=s0(n,S);$b(this._resolverIDToRecordIDs,k,f),$b(this._recordIDToResolverIDs,n,k);var C=(E=m.snapshot)===null||E===void 0?void 0:E.seenRecords;if(C!=null){var $=(0,ss.default)(C),A;try{for($.s();!(A=$.n()).done;){var N=A.value;$b(this._recordIDToResolverIDs,N,k)}}catch(Q){$.e(Q)}finally{$.f()}}}}else if(i.kind===O$&&et.getValue(h,u0)){var O;f=(O=f)!==null&&O!==void 0?O:s0(n,d),h=et.clone(h);var P=et.getValue(h,l0);JSe(P)||is(!1),p=this._setLiveResolverValue(h,P,i,o),et.setValue(h,u0,!1),l.set(f,h)}var I=this._getResolverValue(h),U=et.getValue(h,Ab),B=et.getValue(h,Rb),V=null;if(L$(I)){var W;V=(W=f)!==null&&W!==void 0?W:s0(n,d)}return[I,f,B,U,V,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&is(!1);var s=et.getValue(o,l0);return new Promise(function(a){var l=s.subscribe(function(){l(),a()})})},t._setLiveStateValue=function(n,i,o,s,a){var l=this._makeLiveStateHandler(i),u=o.subscribe(l);et.setValue(n,l0,o);var d=this._setLiveResolverValue(n,o,s,a);return et.setValue(n,u0,!1),et.setValue(n,Ww,u),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),s=o.get(n);if(s&&et.hasValue(s,l0)){var a=et.clone(s);et.setValue(a,u0,!0),i._setLiveResolverUpdate(n,a)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=a0.create()),this._liveResolverBatchRecordSource.set(n,i);else{var o=a0.create();o.set(n,i),this._store.publish(o),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&is(!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,s){var a=null,l=null;try{a=i.read()}catch(u){l=u}return et.setValue(n,Rb,l),this._setResolverValue(n,a,o,s)},t._setResolverValue=function(n,i,o,s){var a=o.normalizationInfo,l=null;if(i!=null&&a!=null&&!L$(i)){var u,d=GSe(n),f=new Set,h=this._getRecordSource();if(a.plural){Array.isArray(i)||is(!1),u=[];for(var p=a0.create(),g=0;g<i.length;g++){var m=i[g];if(m!=null){typeof m!="object"&&is(!1);var v=U$(a,m),_=Cb(v,et.getDataID(n),g),y=this._normalizeOutputTypeValue(_,m,s,a,[o.path,String(g)],v),E=(0,ss.default)(y.getRecordIDs()),S;try{for(E.s();!(S=E.n()).done;){var k=S.value;p.set(k,If(y,k)),f.add(k)}}catch(I){E.e(I)}finally{E.f()}u.push(_)}}l=z$(h,p,d)}else{typeof i!="object"&&is(!1);var C=U$(a,i),$=Cb(C,et.getDataID(n)),A=this._normalizeOutputTypeValue($,i,s,a,[o.path],C),N=(0,ss.default)(A.getRecordIDs()),O;try{for(N.s();!(O=N.n()).done;){var P=O.value;f.add(P)}}catch(I){N.e(I)}finally{N.f()}u=$,l=z$(h,A,d)}et.setValue(n,KSe,f),M$(u),et.setValue(n,Tb,u)}else M$(i),et.setValue(n,Tb,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return et.getValue(n,Tb)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,s=Array.from(n);s.length;){var a=s.pop();o.add(a),n.add(a);var l=this._recordIDToResolverIDs.get(a);if(l!=null){var u=(0,ss.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,ss.default)(h),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;i5(m,i),o.has(m)||(o.add(m),s.push(m))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){u.e(v)}finally{u.f()}}}},t._isInvalid=function(n,i){if(!et.getValue(n,rx))return!1;var o=et.getValue(n,Ab),s=o?.data,a=o?.selector;if(s==null||a==null)return!0;var l=i(a),u=l.data,d=LSe(s,u);if(d!==s)return!0;if(USe.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=et.clone(n);et.setValue(f,rx,!1);var h=this._getRecordSource();h.set(et.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,s,a,l){var u=a0.create();switch(s.kind){case"OutputType":{var d=et.create(n,l);u.set(n,d);var f=jSe(s.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(a);return VSe(u,f,i,p,void 0,h).source}case"WeakModel":{var g=et.create(n,l);return et.setValue(g,YSe,i),u.set(n,g),u}default:s.kind,is(!1)}},t.ensureClientRecord=function(n,i){var o=Cb(i,n),s=this._getRecordSource();if(!s.has(o)){var a=et.create(o,i);et.setValue(a,"id",n),s.set(o,a)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return tEe(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,ss.default)(n),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=this._getRecordSource().get(s);a!=null&&Gw(a)&&this._getRecordSource().delete(s)}}catch(l){i.e(l)}finally{i.f()}}},e})();function z$(e,t,r){var n=new Set;if(r!=null){var i=(0,ss.default)(r),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;t.has(s)||(n.add(s),e.remove(s))}}catch(p){i.e(p)}finally{i.f()}}var a=(0,ss.default)(t.getRecordIDs()),l;try{for(a.s();!(l=a.n()).done;){var u=l.value,d=If(t,u);if(e.has(u)){var f=If(e,u),h=et.update(f,d);h!==f&&(n.add(u),e.set(u,h),eEe(f,e))}else e.set(u,d)}}catch(p){a.e(p)}finally{a.f()}return n}function ZSe(e){var t=new Set;return et.getFields(e).forEach(function(r){if(et.hasLinkedRecordID(e,r)){var n=et.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(et.hasLinkedRecordIDs(e,r)){var i;(i=et.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function i5(e,t){var r=t.get(e);if(r){var n=et.clone(r);et.setValue(n,rx,!0),t.set(e,n)}}function eEe(e,t){var r=ZSe(e),n=(0,ss.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,s=t.get(o);s!=null&&Gw(s)&&i5(o,t)}}catch(a){n.e(a)}finally{n.f()}}function tEe(e,t){if(t.size!==0){var r=(0,ss.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&Gw(o)&&o5(o)}}catch(s){r.e(s)}finally{r.f()}}}function Gw(e){return et.getType(e)===n5}function o5(e){var t=et.getValue(e,Ww);t?.()}function If(e,t){var r=e.get(t);return r==null&&is(!1),r}function rEe(e){return e}function U$(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&is(!1),n}var nEe={LiveResolverCache:XSe,getUpdatedDataIDs:rEe,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:Ww},iEe=je.default,oEe=iEe(zt),s5=Ui,B$=Pu,sEe=De,Nb=s5.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),a5=(function(){function e(r){this._base=r,this._sink=B$.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==Nb}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===Nb?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=B$.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,Nb)},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,oEe.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var s=n.get(o);s===void 0?delete i[o]:i[o]=s5.toJSON(s)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function aEe(e){return new a5(e)}function lEe(e){return e instanceof a5||sEe(!1),e.getOptimisticRecordIDs()}var uEe={create:aEe,getOptimisticRecordIDs:lEe},cEe=Nu,dEe=cEe.RELAY_LIVE_RESOLVER,j$=De,fEe=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,s,a){i.kind===dEe&&j$(!1);var l=s(),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){j$(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),hEe={NoopResolverCache:fEe},bv=je.default,q$=bv(zt),pEe=bv(Jn),gEe=bv($d),Db=bv(wl),mEe=["message"],V$=_o,vEe=fv,_Ee=vEe.isSuspenseSentinel,bEe=kl,ei=Ui,$s=sr,K$=$s.CLIENT_EDGE_TRAVERSAL_PATH,yEe=$s.FRAGMENT_OWNER_KEY,xEe=$s.FRAGMENT_PROP_NAME_KEY,c0=$s.FRAGMENTS_KEY,d0=$s.ID_KEY,SEe=$s.MODULE_COMPONENT_KEY,EEe=$s.ROOT_ID,G0=$s.getArgumentValues,wEe=$s.getModuleComponentKey,f0=$s.getStorageKey,kEe=hEe,CEe=kEe.NoopResolverCache,l5=Rw,REe=l5.RESOLVER_FRAGMENT_ERRORED_SENTINEL,AEe=l5.withResolverContext,TEe=mv,$Ee=TEe.generateTypeID,Ir=De;function u5(e,t,r,n){var i=new NEe(e,t,r??new CEe,n);return i.read()}var NEe=(function(){function e(r,n,i,o){var s,a,l,u;this._clientEdgeTraversalPath=(s=n.clientEdgeTraversalPath)!==null&&s!==void 0&&s.length?(0,Db.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(a=(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&&a!==void 0?a:!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,s=i.dataID,a=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,u=this._recordSource.get(s),d=!a;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,s,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=ei.getErrors(n,i);if(o!=null){var s=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var a=0;a<o.length;a++){var l,u,d,f=o[a];this._fieldErrors.push({kind:"relay_field_payload.error",owner:s,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 s=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:s,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:s,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var a=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];a!==null&&this._missingClientEdges.push({request:a.readerClientEdge.operation,clientEdgeDestinationID:a.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var s=this._recordSource.get(i);if(this._seenRecords.add(i),s==null)return s===void 0&&this._markDataAsMissing("<record>"),s;var a=o||{},l=this._traverseSelections(n.selections,s,a);return l?a:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Ir(!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 s;o=(s=n.field.linkedField.alias)!==null&&s!==void 0?s:n.field.linkedField.name}else{var a;o=(a=n.field.alias)!==null&&a!==void 0?a: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 s=n;switch(i){case"RESULT":s=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(s=null);break}var a=this._fieldErrors;if(this._fieldErrors=o,a!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<a.length;l++)this._fieldErrors.push(H$(a[l]))}return s},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 s=o.error;s.message;var a=(0,gEe.default)(s,mEe);return a;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,Ir(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var s=0;s<n.length;s++){var a=n[s];switch(a.kind){case"RequiredField":var l=this._readClientSideDirectiveField(a,i,o);if(!this._handleRequiredFieldValue(a,l))return!1;break;case"CatchField":{var u,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(a,i,o),g=(u=(d=a.field)===null||d===void 0?void 0:d.backingField)!==null&&u!==void 0?u:a.field,m=(f=g?.alias)!==null&&f!==void 0?f:g?.name;m==null&&Ir(!1),o[m]=this._catchErrors(p,a.to,h);break}case"ScalarField":this._readScalar(a,i,o);break;case"LinkedField":a.plural?this._readPluralLink(a,i,o):this._readLink(a,i,o);break;case"Condition":var v=!!this._getVariableValue(a.condition);if(v===a.passingValue){var _=this._traverseSelections(a.selections,i,o);if(!_)return!1}break;case"InlineFragment":{var y=this._readInlineFragment(a,i,o,!1);if(y===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(a,i,o):this._readResolverField(a,i,o);break}case"FragmentSpread":this._createFragmentPointer(a,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(a,i,o);break}case"ModuleImport":this._readModuleImport(a,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(a,i,o);break;case"Defer":case"ClientExtension":{var E=this._isMissingData,S=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var k=this._traverseSelections(a.selections,i,o);if(this._isMissingData=E||this._missingClientEdges.length>S||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!k)return!1;break}case"Stream":{var C=this._traverseSelections(a.selections,i,o);if(!C)return!1;break}case"ActorChange":this._readActorChange(a,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(a.backingField.kind==="RelayResolver"||a.backingField.kind==="RelayLiveResolver")){var $=a.linkedField;$.plural?this._readPluralLink($,i,o):this._readLink($,i,o)}else this._readClientEdge(a,i,o);break;default:Ir(!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 s=n.field;return s.linkedField.plural?this._readPluralLink(s.linkedField,i,o):this._readLink(s.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,Ir(!1)}},t._readResolverField=function(n,i,o){var s,a=ei.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var u=this._readResolverFieldImpl(n,a),d=(s=n.alias)!==null&&s!==void 0?s:n.name;return this._prependPreviousErrors(l,d),o[d]=u,u},t._readResolverFieldImpl=function(n,i){var o=this,s=n.fragment,a,l=function(y){return a!=null?{data:a.data,isMissingData:a.isMissingData,fieldErrors:a.fieldErrors}:(a=u5(o._recordSource,y,o._resolverCache),{data:a.data,isMissingData:a.isMissingData,fieldErrors:a.fieldErrors})},u=function(){if(s!=null){var y={__id:i,__fragmentOwner:o._owner,__fragments:(0,pEe.default)({},s.name,s.args?G0(s.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(y[K$]=(0,Db.default)(o._clientEdgeTraversalPath));var E={getDataForResolverFragment:l};return AEe(E,function(){var $=W$(n,o._variables,y,o._resolverContext),A=$[0],N=$[1];return{resolverResult:A,snapshot:a,error:N}})}else{var S=W$(n,o._variables,null,o._resolverContext),k=S[0],C=S[1];return{resolverResult:k,snapshot:void 0,error:C}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,u,l),f=d[0],h=d[1],p=d[2],g=d[3],m=d[4],v=d[5];return this._propagateResolverMetadata(n.path,g,p,h,m,v),f},t._propagateResolverMetadata=function(n,i,o,s,a,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 g=0;g<i.fieldErrors.length;g++){var m,v=i.fieldErrors[g];((m=this._selector.node.metadata)===null||m===void 0?void 0:m.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(H$(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var _,y,E={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:o,shouldThrow:(_=(y=this._selector.node.metadata)===null||y===void 0?void 0:y.throwOnFieldError)!==null&&_!==void 0?_:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[E]:this._fieldErrors.push(E)}s!=null&&this._seenRecords.add(s),a!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(a)),l?.forEach(function(S){u._updatedDataIDs.add(S)})},t._readClientEdge=function(n,i,o){var s=this,a,l=n.backingField;l.kind==="ClientExtension"&&Ir(!1);var u=(a=l.alias)!==null&&a!==void 0?a:l.name,d={};this._traverseSelections([l],i,d);var f=d[u];if(f==null||_Ee(f))return o[u]=f,f;if(n.linkedField.plural){Array.isArray(f)||Ir(!1);var h;n.kind!=="ClientEdgeToClientObject"&&Ir(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var O,P=(O=n.concreteType)!==null&&O!==void 0?O:N.__typename;typeof P!="string"&&Ir(!1);var I=Fb(N,l.path,s._owner.identifier),U=s._resolverCache.ensureClientRecord(I,P),B=n.modelResolvers;if(B!=null){var V=B[P];V===void 0&&Ir(!1);var W=s._readResolverFieldImpl(V,U);return W!=null?U:null}return U}):h=f.map(function(N){return Fb(N,l.path,s._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 g,m=Fb(f,l.path,this._owner.identifier),v,_=(g=n.concreteType)!==null&&g!==void 0?g:f.__typename,y;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof _!="string"&&Ir(!1),v=this._resolverCache.ensureClientRecord(m,_),y=null):(v=m,y=null):(v=m,y={readerClientEdge:n,clientEdgeDestinationID:m});var E=n.modelResolvers;if(E!=null){typeof _!="string"&&Ir(!1);var S=E[_];S===void 0&&Ir(!1);var k=this._readResolverFieldImpl(S,v);if(k==null)return o[u]=null,null}this._clientEdgeTraversalPath.push(y);var C=o[u];C==null||typeof C=="object"||Ir(!1);var $=this._fieldErrors;this._fieldErrors=null;var A=this._traverse(n.linkedField,v,C);return this._prependPreviousErrors($,u),this._clientEdgeTraversalPath.pop(),o[u]=A,A}},t._readScalar=function(n,i,o){var s,a=(s=n.alias)!==null&&s!==void 0?s:n.name,l=f0(n,this._variables),u=ei.getValue(i,l);return u===null||V$.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(u)&&u.length===0?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(a),o[a]=u,u},t._readLink=function(n,i,o){var s,a=(s=n.alias)!==null&&s!==void 0?s:n.name,l=f0(n,this._variables),u=ei.getLinkedRecordID(i,l);if(u==null)return o[a]=u,u===null?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(a),u;var d=o[a];d==null||typeof d=="object"||Ir(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,u,d);return this._prependPreviousErrors(f,a),o[a]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var s=this._fieldErrors[o];s.owner===this._fragmentName&&(s.kind==="missing_expected_data.throw"||s.kind==="missing_expected_data.log"||s.kind==="missing_required_field.throw"||s.kind==="missing_required_field.log")&&(s.fieldPath="".concat(i,".").concat(s.fieldPath))}if(n!=null){for(var a=this._fieldErrors.length-1;a>=0;a--)n.push(this._fieldErrors[a]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var s,a=(s=n.alias)!==null&&s!==void 0?s:n.name,l=f0(n,this._variables),u=ei.getActorLinkedRecordID(i,l);if(u==null)return o[a]=u,u===void 0?this._markDataAsMissing(a):u===null&&this._maybeAddFieldErrors(i,l),o[a];var d=u[0],f=u[1],h={};return this._createFragmentPointer(n.fragmentSpread,ei.fromObject({__id:f}),h),o[a]={__fragmentRef:h,__viewer:d},o[a]},t._readPluralLink=function(n,i,o){var s=f0(n,this._variables),a=ei.getLinkedRecordIDs(i,s);return(a===null||V$.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(a)&&a.length===0)&&this._maybeAddFieldErrors(i,s),this._readLinkedIds(n,a,i,o)},t._readLinkedIds=function(n,i,o,s){var a=this,l,u=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return s[u]=i,i===void 0&&this._markDataAsMissing(u),i;var d=s[u];d==null||Array.isArray(d)||Ir(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,g){if(p==null){p===void 0&&a._markDataAsMissing(String(g)),h[g]=p;return}var m=h[g];m==null||typeof m=="object"||Ir(!1);var v=a._fieldErrors;a._fieldErrors=null,h[g]=a._traverse(n,p,m),a._prependPreviousErrors(v,g)}),this._prependPreviousErrors(f,u),s[u]=h,h},t._readModuleImport=function(n,i,o){var s=wEe(n.documentName),a=ei.getValue(i,s),l=a!==void 0?a: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[xEe]=n.fragmentPropName,o[SEe]=l},t._readAliasedInlineFragment=function(n,i,o){var s=this._fieldErrors;this._fieldErrors=null;var a=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(s,n.name),a===!1&&(a=null),o[n.name]=a},t._readInlineFragment=function(n,i,o,s){if(n.type==null){var a=this._traverseSelections(n.selections,i,o);return a===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var a=this._traverseSelections(n.selections,i,o);if(!a)return!1}else return null;else{var u=this._implementsInterface(i,l);if(u===!1&&s)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=ei.getType(n);return o!=null&&o===i||ei.getDataID(n)===EEe},t._createFragmentPointer=function(n,i,o){var s=o[c0];s==null&&(s=o[c0]={}),typeof s=="object"&&s!=null||Ir(!1),o[d0]==null&&(o[d0]=ei.getDataID(i)),s[n.name]=G0(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[yEe]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[K$]=(0,Db.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var s=o[c0];s==null&&(s=o[c0]={}),typeof s=="object"&&s!=null||Ir(!1),o[d0]==null&&(o[d0]=ei.getDataID(i));var a={},l=this._fragmentName;this._fragmentName=n.name;var u=this._variables,d=n.args?G0(n.args,this._variables):{};this._variables=bEe.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,a),this._variables=u,this._fragmentName=l,s[n.name]=a},t._implementsInterface=function(n,i){var o=ei.getType(n),s=this._recordSource.get($Ee(o)),a=s!=null?ei.getValue(s,i):null;return a==null&&this._markDataAsMissing("<abstract-type-hint>"),a},e})();function H$(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,q$.default)((0,q$.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,Ir(!1)}}function W$(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,s=null;try{var a=[];e.fragment!=null&&a.push(r);var l=e.args?G0(e.args,t):void 0;a.push(l),a.push(n),o=i.apply(null,a)}catch(u){o=null,u!==REe&&(s=u)}return[o,s]}function Fb(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;Ir(!1)}var Jw={read:u5},DEe=je.default,G$=DEe(Tr),FEe=Vw,IEe=X8,PEe=t5,OEe=kl,J$=OEe.getLocalVariables,Ls=Ui,yv=sr,MEe=mv,Q$=MEe.generateTypeID,Ib=De,LEe=yv.getReadTimeResolverStorageKey,Y$=yv.getStorageKey,zEe=yv.getModuleOperationKey;function UEe(e,t,r,n,i,o){var s=t.dataID,a=t.node,l=t.variables,u=new BEe(e,l,r,n,i,o);u.mark(a,s)}var BEe=(function(){function e(r,n,i,o,s,a){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=a??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=s}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)||Ib(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(s){switch(s.kind){case"ActorChange":o._traverseLink(s.linkedField,i);break;case"LinkedField":s.plural?o._traversePluralLink(s,i):o._traverseLink(s,i);break;case"Condition":var a=!!o._getVariableValue(s.condition);a===s.passingValue&&o._traverseSelections(s.selections,i);break;case"InlineFragment":if(s.abstractKey==null){var l=Ls.getType(i);(l!=null&&l===s.type||l===yv.ROOT_TYPE)&&o._traverseSelections(s.selections,i)}else{var u=Ls.getType(i),d=Q$(u);o._references.add(d),o._traverseSelections(s.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=J$(o._variables,s.fragment.argumentDefinitions,s.args),o._traverseSelections(s.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=IEe(s,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(s.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=Ls.getType(i),g=Q$(p);o._references.add(g);break}case"ModuleImport":o._traverseModuleImport(s,i);break;case"ClientExtension":o._traverseSelections(s.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(s.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(s,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(s,i);break;default:Ib(!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 s=this._recordSource.get(o);if(s!=null)if(n.backingField.isOutputType){var a=PEe(s);if(a!=null){var l=(0,G$.default)(a),u;try{for(l.s();!(u=l.n()).done;){var d=u.value;this._references.add(d)}}catch(y){l.e(y)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=Ls.getResolverLinkedRecordIDs(s,h);if(p!=null){var g=(0,G$.default)(p),m;try{for(g.s();!(m=g.n()).done;){var v=m.value;v!=null&&this._traverse(f,v)}}catch(y){g.e(y)}finally{g.f()}}}else{var _=Ls.getResolverLinkedRecordID(s,h);_!=null&&this._traverse(f,_)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=LEe(n,this._variables),s=Ls.getLinkedRecordID(i,o);s!=null&&this._references.add(s);var a=n.fragment;return a!=null&&this._traverseSelections([a],i),s}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&Ib(!1);var s=zEe(n.documentName),a=Ls.getValue(i,s);if(a!=null){var l=o.get(a);if(l!=null){var u=FEe(l),d=this._variables;this._variables=J$(this._variables,u.argumentDefinitions,n.args),this._traverseSelections(u.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=Y$(n,this._variables),s=Ls.getLinkedRecordID(i,o);s!=null&&this._traverse(n,s)},t._traversePluralLink=function(n,i){var o=this,s=Y$(n,this._variables),a=Ls.getLinkedRecordIDs(i,s);a?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),jEe={mark:UEe},qEe=Symbol.iterator;function VEe(e,t){for(var r=e[qEe](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var KEe=VEe,HEe=sr,WEe=HEe.ROOT_ID,GEe=qw,JEe=GEe.VIEWER_ID,QEe=Symbol.iterator;function YEe(e,t){for(var r=e[QEe](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==WEe&&i!==JEe)return!0;n=r.next()}return!1}var XEe=YEe,X$=dv,Z$=_o,ZEe=KEe,ewe=XEe,eN=Jw,twe=(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,s={backup:null,callback:i,snapshot:n,stale:!1},a=function(){o._subscriptions.delete(s)};return this._subscriptions.add(s),{dispose:a}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var s=o.snapshot,a=eN.read(n,s.selector,i._resolverCache,i._resolverContext),l=X$(s.data,a.data);a.data=l,o.backup=a})},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,s){var a=this,l=i.size!==0;this._subscriptions.forEach(function(u){var d=a._updateSubscription(n,u,i,l,s);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,s,a){var l=i.backup,u=i.callback,d=i.snapshot,f=i.stale,h=s&&ZEe(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?eN.read(n,d.selector,this._resolverCache,this._resolverContext):l,g=X$(d.data,p.data);if(p={data:g,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&&Z$.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:a,snapshot:d,nextSnapshot:p}),u(p),d.selector.owner;if(Z$.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||ewe(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),rwe=twe,c5=je.default,tN=c5(Tr),nwe=c5(Jn),d5=Bw,iwe=d5.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,rN=d5.assertInternalActorIdentifier,owe=pxe,swe=ASe,awe=z8,Qw=nEe,lwe=Qw.LiveResolverCache,uwe=Qw.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,cwe=Qw.getUpdatedDataIDs,Wl=Ui,nN=uEe,dwe=Jw,fwe=jEe,hwe=rwe,pwe=sr,f5=sr,Pb=f5.ROOT_ID,gwe=f5.ROOT_TYPE,Ob=De,mwe=10,vwe=(function(){function e(r,n){var i=this,o,s,a,l,u,d,f,h;(0,nwe.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:mwe,this._shouldRetainWithinTTL_EXPERIMENTAL=(s=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&s!==void 0?s:!1,this._gcRun=null,this._gcScheduler=(a=n?.gcScheduler)!==null&&a!==void 0?a:owe,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:awe,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 lwe(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new hwe(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,_we(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,s,a,l,u,d,f,h=n.root,p=this._getMutableRecordSource(),g=this._globalInvalidationEpoch,m=(o=(s=n.request.node.operation.use_exec_time_resolvers)!==null&&s!==void 0?s:((a=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),_=v!=null?v.epoch:null;if(g!=null&&(_==null||_<=g))return{status:"stale"};var y=(l=i?.handlers)!==null&&l!==void 0?l:[],E=(u=i?.getSourceForActor)!==null&&u!==void 0?u:function(C){return rN(C),p},S=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(C){return rN(C),p},k=swe.check(E,S,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:iwe,h,y,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,m);return ywe(k,_,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,s=!1,a=function(){if(!s){s=!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:a}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),s=dwe.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),s},t.notify=function(n,i){var o=this,s=this.__log;s?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var a=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(a,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 s?.({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();bwe(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var s=this.__log;s?.({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(s){var a,l=i.getSource().get(s);o.set(s,(a=Wl.getInvalidationEpoch(l))!==null&&a!==void 0?a:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,s=n.invalidations;if(o.get("global")!==s.get("global"))return!0;var a=(0,tN.default)(n.dataIDs),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;if(o.get(u)!==s.get(u))return!0}}catch(d){a.e(d)}finally{a.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,s={callback:i,invalidationState:n},a=function(){o._invalidationSubscriptions.delete(s)};return this._invalidationSubscriptions.add(s),{dispose:a}},t._updateInvalidationSubscription=function(n,i){var o=this,s=n.callback,a=n.invalidationState,l=a.dataIDs,u=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});u&&s()},t.snapshot=function(){this._optimisticSource!=null&&Ob(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=nN.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||Ob(!1);var i=this.__log;i?.({name:"store.restore"});var o=nN.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,s=(0,tN.default)(this._roots.entries()),a;try{for(s.s();!(a=s.n()).done;){var l,u,d,f=a.value,h=f[0],p=f[1],g=p.operation,m=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var _=this._queryCacheExpirationTime;_==null&&Ob(!1);var y=v==null||v<=Date.now()-_,E=y&&m===0&&!this._releaseBuffer.includes(h);if(E)continue}var S=g.root,k=(l=(u=g.request.node.operation.use_exec_time_resolvers)!==null&&u!==void 0?u:((d=g.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(fwe.mark(this._recordSource,S,o,this._operationLoader,this._shouldProcessClientComponents,k),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(P){s.e(P)}finally{s.f()}for(var C=this._recordSource.getRecordIDs(),$=0;$<C.length;$++){var A=C[$];if(!o.has(A)){var N=this._recordSource.get(A);if(N!=null){var O=Wl.getValue(N,uwe);O?.()}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=cwe(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function _we(e){if(!e.has(Pb)){var t=Wl.create(Pb,gwe);e.set(Pb,t)}}function bwe(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),g=t.get(h);if(g!==null){var m;p!=null?m=Wl.clone(p):m=g!=null?Wl.clone(g):null,m&&(Wl.setValue(m,pwe.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,m))}});for(var s=t.getRecordIDs(),a=0;a<s.length;a++){var l=s[a],u=t.get(l),d=e.get(l);if(u&&d){var f=Wl.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 ywe(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 s=r<=Date.now()-n;if(s)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var Yw=vwe,h5=sr,xwe=h5.ROOT_TYPE,iN=h5.getStorageKey,Swe=H8,Ewe=Swe.readUpdatableFragment,wwe=W8,kwe=wwe.readUpdatableQuery,oN=De,Cwe=(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,xwe)),n},t._getRootField=function(n,i,o){var s=n.node.selections.find(function(a){return a.kind==="LinkedField"&&a.name===i||a.kind==="RequiredField"&&a.field.name===i});return s&&s.kind==="RequiredField"&&(s=s.field),s&&s.kind==="LinkedField"||oN(!1),s.plural!==o&&oN(!1),s},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=iN(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=iN(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return kwe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return Ewe(n,i,this,this._missingFieldHandlers)},e})(),Rwe=Cwe,Mb,Lb,zb=V8,Ub=Y8,sN=Rwe,Awe=_o,Twe=Jw,aN=Pu,h0=De,Bb=typeof Z0<"u"?Z0:typeof window<"u"?window:void 0,jb=(Mb=Bb==null||(Lb=Bb.ErrorUtils)===null||Lb===void 0?void 0:Lb.applyWithGuard)!==null&&Mb!==void 0?Mb:function(e,t,r,n,i){return e.apply(t,r)},$we=(function(){function e(r,n,i,o,s){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=s}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||h0(!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(Awe.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&h0(!1),this._isRunning=!0,o)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var s=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,s)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,s=n.operation,a=n.updater,l=o.source,u=o.fieldPayloads,d=new zb(this._store.getSource(),l),f=new Ub(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(u&&u.length&&u.forEach(function(v){var _=i._handlerProvider&&i._handlerProvider(v.handle);_||h0(!1),_.update(f,v)}),a){var h=s.fragment;h==null&&h0(!1);var p=new sN(d,f,h,this._missingFieldHandlers),g=lN(l,h);a(p,g)}var m=f.getIDsMarkedForInvalidation();return this._store.publish(l,m),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 s=n._publishSourceFromPayload(o);i=i||s}else if(o.kind==="source"){var a=o.source;n._store.publish(a)}else{var l=o.updater,u=aN.create(),d=new zb(n._store.getSource(),u),f=new Ub(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);jb(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=aN.create(),o=new zb(this._store.getSource(),i),s=new Ub(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),a=function(u){if(u.storeUpdater){var d=u.storeUpdater;jb(d,null,[s],null,"RelayPublishQueue:applyUpdates")}else{var f=u.operation,h=u.payload,p=u.updater,g=h.source,m=h.fieldPayloads;if(g&&s.publishSource(g,m),p){var v;g&&(v=lN(g,f.fragment));var _=new sN(o,s,f.fragment,n._missingFieldHandlers);jb(p,null,[_,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(a),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){a(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function lN(e,t){var r=Twe.read(e,t).data;return r}var Nwe=$we,Dwe=je.default,uN=Dwe(zt),Fwe=l_e,p5=Bw,cN=p5.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,p0=p5.assertInternalActorIdentifier,qb=Cl,dN=w1e,Iwe=A1e,Pwe=$1e,Owe=z8,Mwe=B1e,Lwe=h1e,zwe=cxe,Uwe=Yw,Bwe=Nwe,fN=Pu,g5=(function(){function e(r){var n=this,i,o,s,a,l,u,d,f,h,p,g;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var m=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new Uwe(new fN,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:qwe,this.relayFieldLogger=(s=r.relayFieldLogger)!==null&&s!==void 0?s:Mwe,this._defaultRenderPolicy=(a=r.UNSTABLE_defaultRenderPolicy)!==null&&a!==void 0?a:"partial",this._operationLoader=m,this._operationExecutions=new Map,this._network=dN(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:Owe,this._missingFieldHandlers=(u=r.missingFieldHandlers)!==null&&u!==void 0?u:[],this._publishQueue=new Bwe(v,(d=r.handlerProvider)!==null&&d!==void 0?d:Fwe,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:Lwe,this.__setNet=function(_){return n._network=dN(n,_)},this._operationTracker=(g=r.operationTracker)!==null&&g!==void 0?g:new Iwe,this._shouldProcessClientComponents=r.shouldProcessClientComponents,Pwe(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 qb.create(function(s){})},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&&!jwe(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return qb.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,s=fN.create(),a=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:cN,getSourceForActor:function(d){return p0(d),a},getTargetForActor:function(d){return p0(d),s}});return s.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(s),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,s=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:s})},t.executeMutation=function(n){var i=this,o=n.operation,s=n.optimisticResponse,a=n.optimisticUpdater,l=n.updater,u=n.uploadables,d;return(s||a)&&(d={operation:o,response:s,updater:a}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,uN.default)((0,uN.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,s=n.isClientPayload,a=n.operation,l=n.optimisticConfig,u=n.updater,d=this._publishQueue,f=this._store;return qb.create(function(h){var p=zwe.execute({actorIdentifier:cN,getDataID:i._getDataID,isClientPayload:s,log:i.__log,operation:a,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(m){return p0(m),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(m){return p0(m),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:u,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function jwe(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}g5.prototype["@@RelayModernEnvironment"]=!0;function qwe(){}var Vwe=g5,Kwe=cv,Hwe=Jo,Wwe=Hwe.getRequest,Gwe=Rl,Jwe=Gwe.createOperationDescriptor,Qwe=Qo,Ywe=Qwe.createReaderSelector;function Xwe(e,t){var r=Wwe(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,s=t.onNext,a=t.variables,l=t.cacheConfig,u=Jwe(r,a,l),d=n?Kwe.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:u,updater:f}).subscribe({next:function(g){if(s!=null){var m=u.fragment,v;if(Array.isArray(g)){var _,y;v=(_=g[0])===null||_===void 0||(y=_.extensions)===null||y===void 0?void 0:y.__relay_subscription_root_id}else{var E;v=(E=g.extensions)===null||E===void 0?void 0:E.__relay_subscription_root_id}typeof v=="string"&&(m=Ywe(m.node,v,m.variables,m.owner));var S=e.lookup(m).data;s(S)}},error:o,complete:i});return{dispose:h.unsubscribe}}var Zwe=Xwe,e2e=je.default;e2e(zt);var m5=sr;m5.getModuleComponentKey;m5.getModuleOperationKey;var t2e=Object.prototype.hasOwnProperty;function r2e(e){for(var t in e)if(t2e.call(e,t))return!1;return!0}var n2e=r2e,Xw=Qo,i2e=Xw.getDataIDsFromFragment,o2e=Xw.getSelector,s2e=Xw.getVariablesFromFragment,a2e=n2e,sf=_o,l2e=Du,hN=l2e.stableCopy,u2e=u8,pN=u2e.intern;function c2e(e,t){var r=o2e(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(u){return u.owner.identifier}).join(",")+"]",i=s2e(e,t),o=i2e(e,t);if(sf.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var s=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return s=sf.STRING_INTERN_LEVEL<=1?s:pN(s,sf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||a2e(i)?"{}":JSON.stringify(hN(i)))+"/"+s}else{var a,l=(a=JSON.stringify(o))!==null&&a!==void 0?a:"missing";return l=sf.STRING_INTERN_LEVEL<=1?l:pN(l,sf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(hN(i))+"/"+l}}var d2e=c2e,af=De;function f2e(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&af(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&af(!1);var o=i.operation.default?i.operation.default:i.operation,s=i.fragmentPathInResult;typeof o=="string"&&af(!1);var a=i.identifierInfo;return a!=null&&(a.identifierField==null||typeof a.identifierField=="string"||af(!1),a.identifierQueryVariableName==null||typeof a.identifierQueryVariableName=="string"||af(!1)),{fragmentRefPathInResponse:s,identifierInfo:a,refetchableRequest:o,refetchMetadata:i}}var v5=f2e,h2e=v5,Vb=De;function p2e(e,t){var r,n,i=h2e(e),o=i.refetchableRequest,s=i.refetchMetadata,a=s.connection;a==null&&Vb(!1);var l=a.path,u=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];u==null&&Vb(!1);var d=s.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||Vb(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:a,stream:u.stream===!0}}var g2e=p2e,_5=je.default,g0=_5(Jn),ec=_5(zt),gN=De;function m2e(e,t,r,n,i,o){var s,a=o.backward,l=o.forward;if(e==="backward"){var u;a!=null&&a.count!=null&&a.cursor!=null||gN(!1);var d=(0,ec.default)((0,ec.default)((0,ec.default)({},n),i),{},(u={},(0,g0.default)(u,a.cursor,r),(0,g0.default)(u,a.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||gN(!1);var f=(0,ec.default)((0,ec.default)((0,ec.default)({},n),i),{},(s={},(0,g0.default)(s,l.cursor,r),(0,g0.default)(s,l.count,t),s));return a&&a.cursor&&(f[a.cursor]=null),a&&a.count&&(f[a.count]=null),f}var v2e=m2e,_2e=je.default,b2e=_2e(Tr),mN=De;function y2e(e,t){var r=e,n=(0,b2e.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)||mN(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||mN(!1),r=r[o])}}catch(s){n.e(s)}finally{n.f()}return r}var x2e=y2e,b5=kve;b5.isErrorResult;b5.isValueResult;var S2e=uv,E2e=Nw,w2e=C_e,k2e=A_e,C2e=B_e,vN=cv,R2e=Q_e,A2e=Cl,T2e=dbe,$2e=vbe,m0=lv,rs=Jo,N2e=ybe,Zw=Ts;Zw.generateClientID;Zw.generateUniqueClientID;Zw.isClientID;var D2e=Bbe,F2e=Vbe,I2e=Wbe,P2e=Dw,y5=fv;y5.isSuspenseSentinel;y5.suspenseSentinel;var O2e=b1e,_N=kl,M2e=Vwe,bN=Rl,Si=Qo,L2e=Yw,z2e=Pu,Vi=sr,U2e=Rw,yN=qw,B2e=Zwe,j2e=i8,q2e=d2e,V2e=g2e,K2e=v2e,H2e=m8,W2e=v5,G2e=o8,J2e=x2e,Q2e=ip,Y2e=Q2e.handlePotentialSnapshotErrors,X2e=QL,Z2e=v8,eke=dv,tke=NL,rke=_o,nke=XL,x5=Du;x5.hasCycle;x5.stableCopy;var ike={Environment:M2e,Network:R2e,Observable:A2e,RecordSource:z2e,ReplaySubject:nke,Store:L2e,areEqualSelectors:Si.areEqualSelectors,createFragmentSpecResolver:D2e,createNormalizationSelector:Si.createNormalizationSelector,createOperationDescriptor:bN.createOperationDescriptor,createReaderSelector:Si.createReaderSelector,createRequestDescriptor:bN.createRequestDescriptor,getArgumentValues:Vi.getArgumentValues,getDataIDsFromFragment:Si.getDataIDsFromFragment,getDataIDsFromObject:Si.getDataIDsFromObject,getNode:rs.getNode,getFragment:rs.getFragment,getInlineDataFragment:rs.getInlineDataFragment,getModuleComponentKey:Vi.getModuleComponentKey,getModuleOperationKey:Vi.getModuleOperationKey,getPaginationFragment:rs.getPaginationFragment,getPluralSelector:Si.getPluralSelector,getRefetchableFragment:rs.getRefetchableFragment,getRequest:rs.getRequest,getRequestIdentifier:G2e,getSelector:Si.getSelector,getSelectorsFromObject:Si.getSelectorsFromObject,getSingularSelector:Si.getSingularSelector,getStorageKey:Vi.getStorageKey,getVariablesFromFragment:Si.getVariablesFromFragment,getVariablesFromObject:Si.getVariablesFromObject,getVariablesFromPluralFragment:Si.getVariablesFromPluralFragment,getVariablesFromSingularFragment:Si.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:Y2e,graphql:rs.graphql,isFragment:rs.isFragment,isInlineDataFragment:rs.isInlineDataFragment,isRequest:rs.isRequest,readInlineData:O2e,readFragment:U2e.readFragment,MutationTypes:vN.MutationTypes,RangeOperations:vN.RangeOperations,ConnectionHandler:S2e,VIEWER_ID:yN.VIEWER_ID,VIEWER_TYPE:yN.VIEWER_TYPE,applyOptimisticMutation:w2e,commitLocalUpdate:k2e,commitMutation:C2e,fetchQuery:T2e,fetchQuery_DEPRECATED:$2e,isRelayModernEnvironment:P2e,requestSubscription:B2e,ConnectionInterface:E2e,PreloadableQueryRegistry:N2e,RelayFeatureFlags:rke,DEFAULT_HANDLE_KEY:tke.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:Vi.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:Vi.FRAGMENT_OWNER_KEY,ID_KEY:Vi.ID_KEY,REF_KEY:Vi.REF_KEY,REFS_KEY:Vi.REFS_KEY,ROOT_ID:Vi.ROOT_ID,ROOT_TYPE:Vi.ROOT_TYPE,TYPENAME_KEY:Vi.TYPENAME_KEY,deepFreeze:j2e,isPromise:X2e,isScalarAndEqual:Z2e,recycleNodesInto:eke,getFragmentIdentifier:q2e,getRefetchMetadata:W2e,getPaginationMetadata:V2e,getPaginationVariables:K2e,getPendingOperationsForFragment:H2e,getValueAtPath:J2e,__internal:{createRelayContext:F2e,createRelayLoggingContext:I2e,getOperationVariables:_N.getOperationVariables,getLocalVariables:_N.getLocalVariables,fetchQuery:m0.fetchQuery,fetchQueryDeduped:m0.fetchQueryDeduped,getPromiseForActiveRequest:m0.getPromiseForActiveRequest,getObservableForActiveRequest:m0.getObservableForActiveRequest}},ft=ike,oke=Yw,S5=oke;const E5=_7(S5),ske=y7({__proto__:null,default:E5},[S5]);let xN={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==ft.ROOT_TYPE))return o}};function ake(e,t,r){return new ft.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function lke(e,t,r){return new E5(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function uke(e,t,r){return new ske(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let cke={make:ake,makeLiveStore:lke,_makeLiveStoreCjs:uke};function dke(e,t,r,n,i,o,s){return new ft.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([xN]):[xN],relayFieldLogger:o,isServer:s})}function w5(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 fke(e,t,r,n){let i=n!==void 0?n:[];ft.commitLocalUpdate(e,o=>{w5(e,t,r).forEach(s=>{if(!i.includes(s))return ae(vs(o.get(s)),a=>{a.invalidateRecord()})})})}let hke={make:dke,findAllConnectionIds:w5,invalidateAllOfConnection:fke};var pke=_t,gke=ft,mke=gke.__internal.createRelayContext,Nd=mke(pke),k5={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})(k5);var xv=k5.exports,C5={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})(C5);var Sv=C5.exports,R5={exports:{}},A5={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})(A5);var vke=A5.exports;(function(e){var t=vke;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})(R5);var Ev=R5.exports,SN=De;function _ke(e,t){t&&typeof t=="object"||SN(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||SN(!1)}}var bke=_ke;function T5(e){return e.displayName||e.name||"Component"}function yke(e){return"Relay("+T5(e)+")"}var wv={getComponentName:T5,getContainerName:yke},xke=_t,$5=xke.createContext({rootIsQueryRenderer:!1}),Ske=je.default,Eke=Ske(xv),wke=bke,N5=wv,kke=N5.getComponentName,Cke=N5.getContainerName,Rke=Nd,Ake=$5,Tke=De,nx=_t,$ke=ft,Nke=$ke.getFragment,EN=nx.useContext;function Dke(e,t,r){var n=Cke(e);wke(kke(e),t);var i={};for(var o in t)i[o]=Nke(t[o]);var s=r(e,i);s.displayName=n;function a(u,d){var f,h=EN(Rke);h==null&&Tke(!1);var p=EN(Ake);return nx.createElement(s,(0,Eke.default)({},u,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:u.componentRef||d}))}a.displayName=n;var l=nx.forwardRef(a);return l}var e2=Dke;function Fke(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 Ike=Fke,Pke=Ike,Oke=De;function Mke(e){return Lke(e)||Oke(!1),e}function Lke(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Pke(e.environment)}var t2={assertRelayContext:Mke},sp=je.default,zke=sp(xv),Uke=sp($d),Bke=sp(Sv),jke=sp(Ev),wN=sp(Jn),qke=["componentRef","__relayContext","__rootIsQueryRenderer"],Vke=e2,Kke=wv,Hke=Kke.getContainerName,Wke=t2,kN=Wke.assertRelayContext,Gke=va,CN=_t,r2=ft,RN=r2.createFragmentSpecResolver,AN=r2.getDataIDsFromObject,Jke=r2.isScalarAndEqual;function Qke(e,t){var r,n=Hke(e);return r=(function(i){(0,jke.default)(o,i);function o(a){var l,u;u=i.call(this,a)||this,(0,wN.default)((0,Bke.default)(u),"_handleFragmentDataUpdate",function(){var p=u.state.resolver;u.setState(function(g){return p===g.resolver?{data:g.resolver.resolve(),relayProp:v0(g.relayProp.environment)}:null})});var d=kN(a.__relayContext),f=(l=a.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=RN(d,n,t,a,f);return u.state={data:h.resolve(),prevProps:a,prevPropsContext:d,relayProp:v0(d.environment),resolver:h},u}o.getDerivedStateFromProps=function(l,u){var d,f=u.prevProps,h=kN(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,g=AN(t,f),m=AN(t,l),v=u.resolver;if(u.prevPropsContext.environment!==h.environment||!Gke(g,m))return v=RN(h,n,t,l,p),{data:v.resolve(),prevPropsContext:h,prevProps:l,relayProp:v0(h.environment),resolver:v};v.setProps(l);var _=v.resolve();return _!==u.data?{data:_,prevProps:l,prevPropsContext:h,relayProp:v0(h.environment)}:null};var s=o.prototype;return s.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(l,u){this.state.resolver!==u.resolver?(u.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},s.componentWillUnmount=function(){this.state.resolver.dispose()},s.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)&&!Jke(l[h],this.props[h]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();u!==f&&this.setState({data:f})},s._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})},s.render=function(){var l=this.props,u=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,Uke.default)(l,qke);return CN.createElement(e,(0,zke.default)({},d,this.state.data,{ref:u,relay:this.state.relayProp}))},o})(CN.Component),(0,wN.default)(r,"displayName",n),r}function v0(e){return{environment:e}}function Yke(e,t){return Vke(e,t,Qke)}var Xke={createContainer:Yke},kv=_t,n2=ft;n2.createOperationDescriptor;n2.deepFreeze;n2.getRequest;kv.useLayoutEffect;kv.useState;kv.useRef;kv.useMemo;var Zke=je.default,TN=Zke(zt),eCe=ft,tCe=eCe.getSelector;function rCe(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,s,a=e[n],l=t[n],u=tCe(a,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:{}:(s=u?.owner.variables)!==null&&s!==void 0?s:{};r=(0,TN.default)((0,TN.default)({},r),d)}),r}var D5=rCe,nCe=je.default,$N=nCe(Jn),Kb=De,i2=ft,iCe=i2.__internal.fetchQuery,oCe=i2.createOperationDescriptor,sCe=i2.isRelayModernEnvironment,aCe=(function(){function e(r){(0,$N.default)(this,"_selectionReferences",[]),(0,$N.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,s=n.operation,a=n.preservePreviousReferences,l=a===void 0?!1:a,u=o.retain(s),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 sCe(o)?iCe(o,s).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:s}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||Kb(!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,s=n.environment,a=n.operation,l=n.onDataChange,u=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:s,onDataChangeCallbacks:f||[],operation:a},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?oCe(a.request.node,a.request.variables,i):a,p=this.execute({environment:s,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:u})},error:function(m){o._didFetchFinish=!0,o._error=m,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;u?v&&v.forEach(function(_){_({error:m})}):d=m}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},u=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||Kb(!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||Kb(!1);var s=this._fetchOptions,a=s.environment,l=s.onDataChangeCallbacks,u=s.operation;if(!this._snapshot&&(this._snapshot=a.lookup(u.fragment),this._rootSubscription=a.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})(),o2=aCe,Dd=je.default,lCe=Dd(xv),Hb=Dd($d),lf=Dd(Sv),uCe=Dd(Ev),Ol=Dd(Jn),Un=Dd(zt),cCe=["componentRef"],dCe=["componentRef","__relayContext","__rootIsQueryRenderer"],fCe=["componentRef","__relayContext","__rootIsQueryRenderer"],hCe=e2,Wb=D5,F5=wv,pCe=F5.getComponentName,gCe=F5.getContainerName,mCe=Nd,vCe=o2,_Ce=t2,Gb=_Ce.assertRelayContext,Jb=va,as=De,Qb=_t,ba=ft,NN=ba.ConnectionInterface,DN=ba.Observable,_0=ba.RelayFeatureFlags,b0=ba.createFragmentSpecResolver,bCe=ba.createOperationDescriptor,FN=ba.getDataIDsFromObject,yCe=ba.getRequest,xCe=ba.getVariablesFromObject,SCe=ba.isScalarAndEqual,IN="forward";function ECe(e){var t=e.path;return t||as(!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 wCe(e){var t=e.count;return t||as(!1),function(r,n){return(0,Un.default)((0,Un.default)({},r),{},(0,Ol.default)({},t,n))}}function kCe(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&&as(!1),t&&as(!1),t=(0,Un.default)((0,Un.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||as(!1),t||{}}function PN(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function CCe(e,t,r){var n;pCe(e);var i=gCe(e),o=kCe(t),s=r.getConnectionFromProps||ECe(o),a=r.direction||o.direction;a||as(!1);var l=r.getFragmentVariables||wCe(o);return n=(function(u){(0,uCe.default)(d,u);function d(h){var p,g;g=u.call(this,h)||this,(0,Ol.default)((0,lf.default)(g),"_handleFragmentDataUpdate",function(){g.setState({data:g._resolver.resolve()})}),(0,Ol.default)((0,lf.default)(g),"_hasMore",function(){var _=g._getConnectionData();return!!(_&&_.hasMore&&_.cursor)}),(0,Ol.default)((0,lf.default)(g),"_isLoading",function(){return!!g._refetchSubscription}),(0,Ol.default)((0,lf.default)(g),"_refetchConnection",function(_,y,E){if(!g._canFetchPage("refetchConnection"))return{dispose:function(){}};g._refetchVariables=E;var S={count:_,cursor:null,totalCount:_},k=g._fetchPage(S,PN(y),{force:!0});return{dispose:k.unsubscribe}}),(0,Ol.default)((0,lf.default)(g),"_loadMore",function(_,y,E){if(!g._canFetchPage("loadMore"))return{dispose:function(){}};var S=PN(y),k=g._getConnectionData();if(!k)return DN.create(function(P){return P.complete()}).subscribe(S),null;var C=k.edgeCount+_;if(E&&E.force)return g._refetchConnection(C,y);var $=NN.get();$.END_CURSOR,$.START_CURSOR;var A=k.cursor,N={count:_,cursor:A,totalCount:C},O=g._fetchPage(N,S,E);return{dispose:O.unsubscribe}});var m=Gb(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return g._isARequestInFlight=!1,g._refetchSubscription=null,g._refetchVariables=null,_0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?g._resolver=b0(m,i,t,h,v):g._resolver=b0(m,i,t,h,v,g._handleFragmentDataUpdate),g.state={data:g._resolver.resolve(),prevContext:m,contextForChildren:m,relayProp:g._buildRelayProp(m),resolverGeneration:0},g._isUnmounted=!1,g._hasFetched=!1,g}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,_0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,g){_0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(g.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var g=this,m,v=Gb(p.__relayContext),_=(m=p.__rootIsQueryRenderer)!==null&&m!==void 0?m:!1,y=FN(t,this.props),E=FN(t,p),S=Wb(t,this.props),k=Wb(t,p);v.environment!==this.state.prevContext.environment||!Jb(S,k)||!Jb(y,E)?(this._cleanup(),_0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=b0(v,i,t,p,_):this._resolver=b0(v,i,t,p,_,this._handleFragmentDataUpdate),this.setState(function($){return{prevContext:v,contextForChildren:v,relayProp:g._buildRelayProp(v),resolverGeneration:$.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var C=this._resolver.resolve();C!==this.state.data&&this.setState({data:C})},f.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},f.shouldComponentUpdate=function(p,g){if(g.data!==this.state.data||g.relayProp!==this.state.relayProp||g.resolverGeneration!==this.state.resolverGeneration)return!0;for(var m=Object.keys(p),v=0;v<m.length;v++){var _=m[v];if(_==="__relayContext"){if(g.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(_)&&!SCe(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,g=this._resolver.resolve();p!==g&&this.setState({data:g})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,g=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==g&&this.setState({data:g})},f._getConnectionData=function(){var p=this.props;p.componentRef;var g=(0,Hb.default)(p,cCe),m=(0,Un.default)((0,Un.default)({},g),this.state.data),v=s(m);if(v==null)return null;var _=NN.get(),y=_.EDGES,E=_.PAGE_INFO,S=_.HAS_NEXT_PAGE,k=_.HAS_PREV_PAGE,C=_.END_CURSOR,$=_.START_CURSOR;typeof v!="object"&&as(!1);var A=v[y],N=v[E];if(A==null||N==null)return null;Array.isArray(A)||as(!1),typeof N!="object"&&as(!1);var O=a===IN?N[S]:N[k],P=a===IN?N[C]:N[$];return typeof O!="boolean"||A.length!==0&&typeof P>"u"?null:{cursor:P,edgeCount:A.length,hasMore:O}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new vCe),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,g,m){var v=this,_=Gb(this.props.__relayContext),y=_.environment,E=this.props;E.componentRef,E.__relayContext,E.__rootIsQueryRenderer;var S=(0,Hb.default)(E,dCe),k=(0,Un.default)((0,Un.default)({},S),this.state.data),C,$=Wb(t,S);C=xCe(t,S),C=(0,Un.default)((0,Un.default)((0,Un.default)({},$),C),this._refetchVariables);var A=r.getVariables(k,{count:p.count,cursor:p.cursor},C);typeof A=="object"&&A!==null||as(!1),A=(0,Un.default)((0,Un.default)({},A),this._refetchVariables),C=(0,Un.default)((0,Un.default)({},A),C);var N=m?{force:!!m.force}:void 0;N!=null&&m?.metadata!=null&&(N.metadata=m?.metadata);var O=yCe(r.query),P=bCe(O,A,N),I=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var U=function(W,Q){var K=v._resolver.resolve();v._resolver.setVariables(l(C,p.totalCount),P.request.node);var G=v._resolver.resolve();Jb(K,G)?Q():v.setState({data:G,contextForChildren:{environment:v.props.__relayContext.environment}},Q)},B=function(){v._refetchSubscription===I&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,I=this._getQueryFetcher().execute({environment:y,operation:P,preservePreviousReferences:!0}).mergeMap(function(V){return DN.create(function(W){U(V,function(){W.next(),W.complete()})})}).do({error:B,complete:B,unsubscribe:B}).subscribe(g||{}),this._refetchSubscription=this._isARequestInFlight?I:null,I},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,g=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var m=(0,Hb.default)(p,fCe);return Qb.createElement(mCe.Provider,{value:this.state.contextForChildren},Qb.createElement(e,(0,lCe.default)({},m,this.state.data,{ref:g,relay:this.state.relayProp})))},d})(Qb.Component),(0,Ol.default)(n,"displayName",i),n}function RCe(e,t,r){return hCe(e,t,function(n,i){return CCe(n,i,r)})}var ACe={createContainer:RCe},Cv=je.default,I5=Cv(zt),TCe=Cv(Sv),$Ce=Cv(Ev),NCe=Cv(Jn),DCe=Nd,Jg=o2,FCe=$5,ICe=va,Yb=_t,s2=ft,PCe=s2.createOperationDescriptor;s2.deepFreeze;var a2=s2.getRequest,Hi={},OCe={rootIsQueryRenderer:!0};Yb.Component;function ix(){return{error:null,props:null,retry:null}}function MCe(){return{error:null,props:{},retry:null}}function J0(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(o){var s=r.retry(o);s&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:s}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function l2(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function ON(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=a2(r),s=l2(o.params,e.variables);i=Hi[s]?Hi[s].queryFetcher:new Jg(n)}else i=new Jg(n);return(0,I5.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},P5(e,i,t.retryCallbacks))}function P5(e,t,r,n){var i=e.environment,o=e.query,s=e.variables,a=e.cacheConfig,l=i;if(o){var u=a2(o),d=PCe(u,s,a),f={environment:l};if(typeof n=="string"&&Hi[n]){var h=Hi[n].snapshot;return h?{error:null,relayContext:f,renderProps:J0(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:ix(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),g=t.fetch({environment:l,onDataChange:null,operation:d}),m=g||p;return n=n||l2(u.params,e.variables),Hi[n]={queryFetcher:t,snapshot:m},m?{error:null,relayContext:f,renderProps:J0(null,m,t,r),snapshot:m,requestCacheKey:n}:{error:null,relayContext:f,renderProps:ix(),snapshot:null,requestCacheKey:n}}catch(_){return{error:_,relayContext:f,renderProps:J0(_,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var v={environment:l};return{error:null,relayContext:v,renderProps:MCe(),requestCacheKey:null}}}var Fd=je.default,LCe=Fd(xv),zCe=Fd($d),tc=Fd(zt),MN=Fd(Sv),UCe=Fd(Ev),Xb=Fd(Jn),BCe=["componentRef","__relayContext","__rootIsQueryRenderer"],jCe=e2,Zb=D5,qCe=wv,VCe=qCe.getContainerName,KCe=Nd,HCe=o2,WCe=t2,ey=WCe.assertRelayContext,LN=va,ty=_t,Lu=ft,GCe=Lu.Observable,zN=Lu.createFragmentSpecResolver,JCe=Lu.createOperationDescriptor,UN=Lu.getDataIDsFromObject,QCe=Lu.getRequest,YCe=Lu.getVariablesFromObject,XCe=Lu.isScalarAndEqual;function ZCe(e,t,r){var n,i=VCe(e);return n=(function(o){(0,UCe.default)(s,o);function s(l){var u,d;d=o.call(this,l)||this,(0,Xb.default)((0,MN.default)(d),"_handleFragmentDataUpdate",function(){var g=d.state.resolver;d.setState(function(m){return g===m.resolver?{data:m.resolver.resolve()}:null})}),(0,Xb.default)((0,MN.default)(d),"_refetch",function(g,m,v,_){if(d._isUnmounted)return{dispose:function(){}};var y=ey(d.props.__relayContext),E=y.environment,S=Zb(t,d.props),k=typeof g=="function"?g(d._getFragmentVariables()):g;k=(0,tc.default)((0,tc.default)({},S),k);var C=m?(0,tc.default)((0,tc.default)({},k),m):k,$=_?{force:!!_.force}:void 0;$!=null&&_?.metadata!=null&&($.metadata=_?.metadata);var A=typeof v=="function"?{next:v,error:v}:v||{},N=QCe(r),O=JCe(N,k,$);d.state.localVariables=k,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var P,I=d._getQueryFetcher().lookupInStore(E,O,_?.fetchPolicy);return I!=null?(d.state.resolver.setVariables(C,O.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:E,operation:O,preservePreviousReferences:!0}).mergeMap(function(U){return d.state.resolver.setVariables(C,O.request.node),GCe.create(function(B){return d.setState(function(V){return{data:V.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){B.next(),B.complete()})})}).finally(function(){d._refetchSubscription===P&&(d._refetchSubscription=null)}).subscribe((0,tc.default)((0,tc.default)({},A),{},{start:function(B){d._refetchSubscription=P=B,A.start&&A.start(B)}})),{dispose:function(){P&&P.unsubscribe()}})});var f=ey(l.__relayContext),h=(u=l.__rootIsQueryRenderer)!==null&&u!==void 0?u:!1;d._refetchSubscription=null;var p=zN(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:BN(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var a=s.prototype;return a.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.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()},s.getDerivedStateFromProps=function(u,d){var f,h=d.prevProps,p=ey(u.__relayContext),g=(f=u.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,m=UN(t,h),v=UN(t,u),_=Zb(t,h),y=Zb(t,u),E=d.resolver;if(d.prevPropsContext.environment!==p.environment||!LN(_,y)||!LN(m,v))return E=zN(p,i,t,u,g),{data:E.resolve(),localVariables:null,prevProps:u,prevPropsContext:p,contextForChildren:p,relayProp:BN(p.environment,d.relayProp.refetch),resolver:E};d.localVariables||E.setProps(u);var S=E.resolve();return S!==d.data?{data:S,prevProps:u}:null},a.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},a.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)&&!XCe(u[p],this.props[p]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();d!==h&&this.setState({data:h})},a._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})},a._getFragmentVariables=function(){return YCe(t,this.props)},a._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new HCe),this._queryFetcher},a.render=function(){var u=this.props,d=u.componentRef;u.__relayContext,u.__rootIsQueryRenderer;var f=(0,zCe.default)(u,BCe),h=this.state,p=h.relayProp,g=h.contextForChildren;return ty.createElement(KCe.Provider,{value:g},ty.createElement(e,(0,LCe.default)({},f,this.state.data,{ref:d,relay:p})))},s})(ty.Component),(0,Xb.default)(n,"displayName",i),n}function BN(e,t){return{environment:e,refetch:t}}function eRe(e,t,r){return jCe(e,t,function(n,i){return ZCe(n,i,r)})}var tRe={createContainer:eRe},rRe=_t;rRe.createContext({wrapPrepareQueryResource:function(t){return t()}});var nRe=Nd,iRe=De,oRe=_t,sRe=oRe.useContext;function aRe(){var e=sRe(nRe);return e==null&&iRe(!1),e.environment}var O5=aRe,M5=_t;M5.useContext;M5.useEffect;var lRe=je.default,jN=lRe(zt),uRe=De,zu=ft,qN=zu.__internal.fetchQueryDeduped,VN=zu.Observable,KN=zu.PreloadableQueryRegistry,HN=zu.ReplaySubject,WN=zu.createOperationDescriptor,cRe=zu.getRequest,dRe=zu.getRequestIdentifier,GN=100001;function fRe(e,t,r,n,i){var o;GN++;var s=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",a=(0,jN.default)((0,jN.default)({},n?.networkCacheConfig),{},{force:!0}),l,u=!1,d=function(ne,se){return u=!0,e.executeWithSource({operation:ne,source:se})},f=new HN,h=VN.create(function(G){return f.subscribe(G)}),p,g=null,m=!1,v=function(ne,se){m=!0;var be=new HN,Ae="raw-network-request-"+dRe(ne,r),$e=qN(e,Ae,function(){var we=e.getNetwork();return we.execute(ne,r,a,void 0,void 0,void 0,void 0,se)}),ot=$e.subscribe({error:function(Ze){g=Ze,be.error(Ze)},next:function(Ze){be.next(Ze)},complete:function(){be.complete()}}),ye=ot.unsubscribe;return p=ye,VN.create(function(we){var Ze=be.subscribe(we);return function(){Ze.unsubscribe(),p()}})},_,y=function(ne,se){m=!0;var be=qN(e,ne.request.identifier,se).subscribe({error:function($e){f.error($e)},next:function($e){f.next($e)},complete:function(){f.complete()}});_=be.unsubscribe},E=function(ne){var se=WN(ne,r,a);if(l=e.retain(se),s!=="store-only"){var be=s!=="store-or-network"||e.check(se).status!=="available";be&&y(se,function(){var Ae=v(ne.params,function(){return e.check(se)}),$e=d(se,Ae);return $e})}},S,k,C;if(t.kind==="PreloadableConcreteRequest"){var $=t;S=$.params;var A=S;C=A.id,C===null&&uRe(!1);var N=KN.get(C);if(N!=null)E(N);else{var O=s==="store-only"?null:v(S),P=KN.onLoad(C,function(G){k();var ne=WN(G,r,a);l=e.retain(ne),O!=null&&y(ne,function(){return d(ne,O)})});k=P.dispose}}else{var I=t,U=cRe(I);S=U.params,C=S.cacheID!=null?S.cacheID:S.id,E(U)}var B=!1,V=!1,W=!1,Q=function(){V||(l&&l.dispose(),V=!0)},K=function(){W||(u?_&&_():p&&p(),k&&k(),W=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){B||(Q(),K(),B=!0)},releaseQuery:Q,cancelNetworkRequest:K,fetchKey:GN,id:C,get isDisposed(){return B||V},get networkError(){return g},name:S.name,networkCacheConfig:a,fetchPolicy:s,source:m?h:void 0,variables:r}}var Rv={loadQuery:fRe},hRe=Rv;hRe.loadQuery;var pRe=_t;pRe.useMemo;var gRe=De,mRe=(function(){function e(r){this._capacity=r,this._capacity>0||gRe(!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 vRe(e){return new mRe(e)}var _Re={create:vRe},bRe=je.default,ry=bRe(Jn),yRe=300*1e3,xRe=(function(){function e(r){var n=this;(0,ry.default)(this,"_retainCount",0),(0,ry.default)(this,"_retainDisposable",null),(0,ry.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 s=this._retain(n),a=null,l=function(){clearTimeout(a),a=null,i._releaseTemporaryRetain=null,s.dispose()};return a=setTimeout(l,yRe),(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})(),SRe=xRe,L5=je.default,y0=L5(zt),z5=L5(Jn),ERe=_Re,wRe=SRe,kRe=De,CRe=ft,RRe=CRe.isPromise,ARe=1e3,U5="store-or-network",B5="store-and-network",TRe=typeof WeakMap=="function";function Qg(e){return e.request.node.params.metadata.live!==void 0}function ox(e,t,r,n,i){var o=r??(Qg(t)?B5:U5),s=n??e.UNSTABLE_getDefaultRenderPolicy(),a="".concat(o,"-").concat(s,"-").concat(t.request.identifier);return i!=null?"".concat(a,"-").concat(i):a}function JN(e,t){var r={__id:e.fragment.dataID,__fragments:(0,z5.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var $Re=2e5;function ny(e,t,r,n,i,o){var s=Qg(t),a=n,l=i,u=new wRe(function(f){var h=f.retain(t);return{dispose:function(){s&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:$Re++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return a},setValue:function(h){a=h},setNetworkSubscription:function(h){s&&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 NRe=(function(){function e(r){var n=this;(0,z5.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=ERe.create(ARe)}var t=e.prototype;return t.prepare=function(n,i,o,s,a,l,u){var d=ox(this._environment,n,o,s,l);return this.prepareWithIdentifier(d,n,i,o,s,a,u)},t.prepareWithIdentifier=function(n,i,o,s,a,l,u){var d=this._environment,f=s??(Qg(i)?B5:U5),h=a??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),g=null,m=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,u,(0,y0.default)((0,y0.default)({},l),{},{unsubscribe:function(y){g?.dispose();var E=l?.unsubscribe;E&&E(y)}}))),g=p.temporaryRetain(d);var v=p.getValue();if(RRe(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:m,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,s=n.cacheIdentifier,a=n.operation,l=this._getOrCreateCacheEntry(s,a,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,s){var a=this._environment,l=ox(a,n,i,o,s);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,s,a){var l=this._cache.get(n);return l==null&&(l=ny(n,i,o,s,a,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,s,a,l,u){var d=this,f=this._environment,h=f.check(i),p=h.status,g=p==="available",m=g||a==="partial"&&p!=="stale",v,_,y=function(){};switch(s){case"store-only":{v=!1,_=!0;break}case"store-or-network":{v=!g,_=m;break}case"store-and-network":{v=!0,_=m;break}case"network-only":default:{v=!0,_=!1;break}}if(_){var E=JN(i,n),S=ny(n,i,h,E,null,this._clearCacheEntry);this._cache.set(n,S)}if(v){var k=JN(i,n),C;o.subscribe({start:function(I){C=I;var U=d._cache.get(n);U&&U.setNetworkSubscription(C);var B=u?.start;if(B){var V=(0,y0.default)((0,y0.default)({},I),{},{unsubscribe:function(){Qg(i)&&I.unsubscribe()}});B(V)}},next:function(){var I=d._getOrCreateCacheEntry(n,i,h,k,C);I.processedPayloadsCount+=1,I.setValue(k),y();var U=u?.next;if(U!=null){var B=f.lookup(i.fragment);U(B)}},error:function(I){var U=d._getOrCreateCacheEntry(n,i,h,I,C);U.processedPayloadsCount===0&&U.setValue(I),y(),C=null,U.setNetworkSubscription(null);var B=u?.error;B&&B(I)},complete:function(){y(),C=null;var I=d._cache.get(n);I&&I.setNetworkSubscription(null);var U=u?.complete;U&&U()},unsubscribe:u?.unsubscribe});var $=this._cache.get(n);if(!$){var A=new Promise(function(P){y=P});A.displayName="Relay("+i.fragment.node.name+")",$=ny(n,i,h,A,C,this._clearCacheEntry),this._cache.set(n,$)}}else{var N=u?.complete;N&&N()}var O=this._cache.get(n);return O==null&&kRe(!1),f.__log({name:"queryresource.fetch",resourceID:O.id,operation:i,profilerContext:l,fetchPolicy:s,renderPolicy:a,queryAvailability:h,shouldFetch:v}),O},e})();function DRe(e){return new NRe(e)}var QN=TRe?new WeakMap:new Map;function FRe(e){var t=QN.get(e);if(t)return t;var r=DRe(e);return QN.set(e,r),r}var ap={getQueryResourceForEnvironment:FRe,getQueryCacheIdentifier:ox},IRe=_t;IRe.useMemo;var j5=_t;j5.useCallback;j5.useEffect;var PRe=_t,ORe=ft,MRe=ORe.__internal.createRelayLoggingContext,LRe=MRe(PRe),zRe=LRe,URe=_t,BRe=URe.useContext;function jRe(){return BRe(zRe)}var q5=jRe,u2=je.default,YN=u2(zt),vl=u2(Tr),qRe=u2(wl),VRe=ap,V5=VRe.getQueryResourceForEnvironment,KRe=O5,HRe=q5,Ml=De,lp=_t;lp.useDebugValue;var iy=lp.useEffect,oy=lp.useMemo,XN=lp.useRef,x0=lp.useState,ya=ft,K5=ya.__internal,WRe=K5.fetchQuery,GRe=K5.getPromiseForActiveRequest,S0=ya.RelayFeatureFlags,ZN=ya.areEqualSelectors,JRe=ya.createOperationDescriptor,QRe=ya.getPendingOperationsForFragment,YRe=ya.getSelector,XRe=ya.getVariablesFromFragment,e3=ya.handlePotentialSnapshotErrors,t3=ya.recycleNodesInto;function ZRe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function eAe(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,vl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,vl.default)(o.missingClientEdges),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function tAe(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,vl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,vl.default)(o.missingLiveResolverFields),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function rAe(e,t,r){if(t.kind==="singular")e3(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,vl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e3(e,o.fieldErrors,r)}}catch(s){n.e(s)}finally{n.f()}}}function Yg(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=t3(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 s=!1,a=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=t3(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&&(s=!0),a.push(h)}return a.length!==t.snapshots.length&&Ml(!1),[s,{kind:"plural",snapshots:a,epoch:r}]}}function nAe(e,t,r,n,i){var o=XRe(t,r),s=(0,YN.default)((0,YN.default)({},o),{},{id:n.clientEdgeDestinationID}),a=JRe(n.request,s,i?.networkCacheConfig),l=V5(e),u=l.prepare(a,WRe(e,a),i?.fetchPolicy);return[u,GRe(e,a.request)]}function iAe(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(s){r(function(a){if(a.kind!=="singular"||a.snapshot.selector!==s.selector){var l=Yg(e,a);if(l!=null){var u=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),n.current=u,u?d:a}else return a}return n.current=!0,{kind:"singular",snapshot:s,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(s,a){return e.subscribe(s,function(l){r(function(u){var d;if(u.kind!=="plural"||((d=u.snapshots[a])===null||d===void 0?void 0:d.selector)!==l.selector){var f=Yg(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 g=(0,qRe.default)(u.snapshots);return g[a]=l,n.current=!0,{kind:"plural",snapshots:g,epoch:e.getStore().getEpoch()}})})});return function(){var s=(0,vl.default)(o),a;try{for(s.s();!(a=s.n()).done;){var l=a.value;l.dispose()}}catch(u){s.e(u)}finally{s.f()}}}}function r3(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 oAe(e,t,r,n){var i,o,s=oy(function(){return YRe(e,t)},[e,t]),a=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;a?t==null||Array.isArray(t)||Ml(!1):Array.isArray(t)&&Ml(!1),t==null||a&&Array.isArray(t)&&t.length===0||s!=null||Ml(!1);var l=KRe(),u;S0.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=HRe());var d=x0(function(){return r3(l,s)}),f=d[0],h=d[1],p=f,g=x0(p),m=g[0],v=g[1],_=m,y=x0(s),E=y[0],S=y[1],k=x0(l),C=k[0],$=k[1];if(!ZN(s,E)||l!==C){S(s),$(l);var A=r3(l,s);h(A),v(A),p=A,_=A}var N=XN(!1);if(iy(function(){N.current=s},[s]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||S0.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var O=oy(function(){var be=eAe(p),Ae,$e=[];if(be!=null&&be.length){Ae=[];var ot=(0,vl.default)(be),ye;try{for(ot.s();!(ye=ot.n()).done;){var we=ye.value,Ze=nAe(l,e,t,we,n),Zt=Ze[0],Ut=Ze[1];Ae.push(Zt),Ut!=null&&$e.push(Ut)}}catch(Qn){ot.e(Qn)}finally{ot.f()}}return[Ae,$e]},[p,l,e,t,n]),P=O[0],I=O[1];if(I.length)throw Promise.all(I);iy(function(){var be=V5(l);if(P!=null&&P.length){var Ae=[],$e=(0,vl.default)(P),ot;try{for($e.s();!(ot=$e.n()).done;){var ye=ot.value;Ae.push(be.retain(ye))}}catch(we){$e.e(we)}finally{$e.f()}return function(){for(var we=0,Ze=Ae;we<Ze.length;we++){var Zt=Ze[we];Zt.dispose()}}}},[l,P])}if(ZRe(p)){var U=tAe(p);if(U!=null&&U.length>0)throw Promise.all(U.map(function(be){return l.getStore().getLiveResolverPromise(be)}));if(S0.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==C||!N.current||!ZN(N.current,s)){s==null&&Ml(!1);var B=s.kind==="PluralReaderSelector"?s.selectors[0].owner:s.owner,V=QRe(l,e,B);if(V)throw V.promise}}rAe(l,p,u);var W=XN(!1);if(iy(function(){var be=_,Ae=Yg(l,_);if(Ae!==null){var $e=Ae[0],ot=Ae[1];$e&&h(ot),be=ot}return iAe(l,be,h,W)},[l,_]),W.current){var Q=Yg(l,p);if(Q!=null){var K=Q[0],G=Q[1];K&&(h(G),p=G)}W.current=!1}var ne;if(a){var se=t==null;ne=oy(function(){return p.kind==="bailout"?se?null:[]:(p.kind!=="plural"&&Ml(!1),p.snapshots.map(function(be){return be.data}))},[p,se])}else p.kind==="bailout"?ne=null:(p.kind!=="singular"&&Ml(!1),ne=p.snapshot.data);return S0.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(ne===void 0||Array.isArray(ne)&&ne.length>0&&ne.every(function(be){return be===void 0})),ne}var sAe=oAe,c2=je.default,n3=c2(zt),_l=c2(Tr),aAe=c2(wl),lAe=ap,H5=lAe.getQueryResourceForEnvironment,uAe=O5,cAe=q5,Ll=De,up=_t;up.useDebugValue;var E0=up.useEffect,sy=up.useMemo,i3=up.useRef,dAe=up.useState,xa=ft,W5=xa.__internal,fAe=W5.fetchQuery,hAe=W5.getPromiseForActiveRequest,w0=xa.RelayFeatureFlags,o3=xa.areEqualSelectors,pAe=xa.createOperationDescriptor,gAe=xa.getPendingOperationsForFragment,mAe=xa.getSelector,vAe=xa.getVariablesFromFragment,s3=xa.handlePotentialSnapshotErrors,a3=xa.recycleNodesInto;function _Ae(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function bAe(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,_l.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,_l.default)(o.missingClientEdges),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function yAe(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,_l.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,_l.default)(o.missingLiveResolverFields),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function xAe(e,t,r){if(t.kind==="singular")s3(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,_l.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;s3(e,o.fieldErrors,r)}}catch(s){n.e(s)}finally{n.f()}}}function sx(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=a3(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 s=!1,a=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=a3(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&&(s=!0),a.push(h)}return a.length!==t.snapshots.length&&Ll(!1),[s,{kind:"plural",snapshots:a,epoch:r,selector:t.selector,environment:t.environment}]}}function SAe(e,t,r,n,i){var o=vAe(t,r),s=(0,n3.default)((0,n3.default)({},o),{},{id:n.clientEdgeDestinationID}),a=pAe(n.request,s,i?.networkCacheConfig),l=H5(e),u=l.prepare(a,fAe(e,a),i?.fetchPolicy),d=hAe(e,a.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[u,d]}function l3(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(s){var a=null;if(s.kind!=="singular"||s.snapshot.selector!==o.selector||s.environment!==e){var l=sx(s.environment,s);if(l!=null){var u=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),a=u?d:s}else a=s}else a={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return a})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,s){return e.subscribe(o,function(a){r(function(l){var u,d=null;if(l.kind!=="plural"||((u=l.snapshots[s])===null||u===void 0?void 0:u.selector)!==a.selector||l.environment!==e){var f=sx(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 g=(0,aAe.default)(l.snapshots);g[s]=a,d={kind:"plural",snapshots:g,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,_l.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;a.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function u3(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 EAe(e,t,r,n){var i,o,s=sy(function(){return mAe(e,t)},[e,t]),a=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;a?t==null||Array.isArray(t)||Ll(!1):Array.isArray(t)&&Ll(!1),t==null||a&&Array.isArray(t)&&t.length===0||s!=null||Ll(!1);var l=uAe(),u;w0.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=cAe());var d=dAe(function(){return u3(l,s)}),f=d[0],h=d[1],p=f,g=p.environment;if(!o3(s,p.selector)||l!==p.environment){var m=u3(l,s);h(m),p=m}var v=i3(!1);if(E0(function(){v.current=s},[s]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||w0.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var _=sy(function(){var I=bAe(p),U,B=[];if(I!=null&&I.length){U=[];var V=(0,_l.default)(I),W;try{for(V.s();!(W=V.n()).done;){var Q=W.value,K=SAe(l,e,t,Q,n),G=K[0],ne=K[1];U.push(G),ne!=null&&B.push(ne)}}catch(se){V.e(se)}finally{V.f()}}return[U,B]},[p,l,e,t,n]),y=_[0],E=_[1];if(E.length){var S=Promise.all(E);throw S.displayName="RelayClientEdge(".concat(E.map(function(I){return I.displayName}).join(","),")"),S}E0(function(){var I=H5(l);if(y!=null&&y.length){var U=[],B=(0,_l.default)(y),V;try{for(B.s();!(V=B.n()).done;){var W=V.value;U.push(I.retain(W))}}catch(Q){B.e(Q)}finally{B.f()}return function(){for(var Q=0,K=U;Q<K.length;Q++){var G=K[Q];G.dispose()}}}},[l,y])}if(_Ae(p)){var k=yAe(p);if(k!=null&&k.length>0){var C=Promise.all(k.map(function(I){return l.getStore().getLiveResolverPromise(I)}));throw C.displayName="RelayLiveResolver("+e.name+")",C}if(w0.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==g||!v.current||!o3(v.current,s)){s==null&&Ll(!1);var $=s.kind==="PluralReaderSelector"?s.selectors[0].owner:s.owner,A=gAe(l,e,$);if(A)throw A.promise}}xAe(l,p,u);var N=i3(null);E0(function(){var I=N.current;if(I!=null){if(p.environment===I.environment&&p.selector===I.selector)return;I.dispose()}if(p.kind!=="bailout"){var U=p,B=sx(p.environment,p);if(B!==null){var V=B[0],W=B[1];if(V){h(W);return}U=W}var Q=l3(p.environment,U,h);N.current={dispose:Q,selector:p.selector,environment:p.environment}}},[p]),E0(function(){if(N.current==null&&p.kind!=="bailout"){var I=l3(p.environment,p,h);N.current={dispose:I,selector:p.selector,environment:p.environment}}return function(){var U;(U=N.current)===null||U===void 0||U.dispose(),N.current=null}},[]);var O;if(a){var P=t==null;O=sy(function(){return p.kind==="bailout"?P?null:[]:(p.kind!=="plural"&&Ll(!1),p.snapshots.map(function(I){return I.data}))},[p,P])}else p.kind==="bailout"?O=null:(p.kind!=="singular"&&Ll(!1),O=p.snapshot.data);return w0.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(O===void 0||Array.isArray(O)&&O.length>0&&O.every(function(I){return I===void 0})),O}var wAe=EAe,G5=je.default;G5(sAe);G5(wAe);var J5=ap;J5.getQueryCacheIdentifier;J5.getQueryResourceForEnvironment;var Av=_t;Av.useContext;Av.useEffect;Av.useState;Av.useRef;var kAe=_t;kAe.useState;var CAe=_t,Q5=ft;Q5.createOperationDescriptor;Q5.getRequest;CAe.useMemo;var RAe=ft;RAe.__internal.fetchQuery;var AAe=je.default;AAe(zt);var Y5=_t;Y5.useEffect;Y5.useRef;var TAe=je.default;TAe(Tr);var Tv=_t;Tv.useCallback;Tv.useEffect;Tv.useRef;Tv.useState;var $Ae=_t;$Ae.useDebugValue;var NAe=ft;NAe.getFragment;var DAe=je.default;DAe(zt);var $v=_t,FAe=ft;FAe.commitMutation;$v.useState;$v.useEffect;$v.useRef;$v.useCallback;var X5=ft;X5.ConnectionInterface;X5.getValueAtPath;var d2=_t,Z5=ft;Z5.__internal.getObservableForActiveRequest;Z5.getSelector;d2.useEffect;d2.useState;d2.useMemo;var IAe=je.default;IAe(zt);var f2=_t;f2.useCallback;f2.useRef;f2.useState;var cp=ft;cp.__internal.fetchQuery;cp.createOperationDescriptor;cp.getPaginationVariables;cp.getRefetchMetadata;cp.getSelector;var PAe=je.default;PAe(zt);var h2=_t;h2.useCallback;h2.useEffect;h2.useState;var Id=ft;Id.__internal.fetchQuery;Id.RelayFeatureFlags;Id.createOperationDescriptor;Id.getPaginationVariables;Id.getRefetchMetadata;Id.getSelector;var ez=je.default;ez(zt);ez(Tr);var OAe=ap;OAe.getQueryResourceForEnvironment;var Uu=ft;Uu.__internal.fetchQuery;Uu.RelayFeatureFlags;Uu.createOperationDescriptor;Uu.getPendingOperationsForFragment;Uu.getSelector;Uu.getVariablesFromFragment;Uu.handlePotentialSnapshotErrors;var MAe=je.default;MAe(Tr);var LAe=Rv;LAe.loadQuery;var dp=_t;dp.useCallback;dp.useEffect;dp.useInsertionEffect;dp.useRef;dp.useState;var zAe=ft;zAe.getRequest;var UAe=je.default;UAe(Tr);var BAe=Rv;BAe.loadQuery;var Nv=_t;Nv.useCallback;Nv.useEffect;Nv.useRef;Nv.useState;var tz=ft;tz.RelayFeatureFlags;tz.getRequest;var jAe=je.default;jAe(zt);var qAe=ap;qAe.getQueryResourceForEnvironment;var p2=_t;p2.useCallback;p2.useContext;p2.useReducer;var Pd=ft;Pd.__internal.fetchQuery;Pd.createOperationDescriptor;Pd.getFragmentIdentifier;Pd.getRefetchMetadata;Pd.getSelector;Pd.getValueAtPath;var VAe=je.default;VAe(zt);var g2=_t;g2.useCallback;g2.useDebugValue;g2.useState;var Dv=ft;Dv.RelayFeatureFlags;Dv.getFragment;Dv.getFragmentIdentifier;Dv.getPaginationMetadata;var KAe=je.default;KAe(zt);var Bu=_t;Bu.useCallback;Bu.useDebugValue;Bu.useEffect;Bu.useLayoutEffect;Bu.useMemo;Bu.useRef;Bu.useState;var m2=ft;m2.getFragment;m2.getFragmentIdentifier;m2.getPaginationMetadata;var Fv=ft;Fv.ConnectionInterface;Fv.RelayFeatureFlags;Fv.getSelector;Fv.getValueAtPath;var HAe=_t;HAe.useDebugValue;var WAe=ft,rz=WAe.__internal;rz.fetchQueryDeduped;rz.fetchQuery;var GAe=_t;GAe.useDebugValue;var JAe=ft;JAe.getFragment;var nz=_t;nz.useEffect;nz.useRef;var QAe=_t;QAe.useEffect;var YAe=ft;YAe.requestSubscription;var XAe=Nd,ZAe=Xke,eTe=ACe,tTe=tRe,rTe=Rv;rTe.loadQuery;var Eo=ft,nTe={ConnectionHandler:Eo.ConnectionHandler,MutationTypes:Eo.MutationTypes,RangeOperations:Eo.RangeOperations,ReactRelayContext:XAe,applyOptimisticMutation:Eo.applyOptimisticMutation,commitLocalUpdate:Eo.commitLocalUpdate,commitMutation:Eo.commitMutation,createFragmentContainer:ZAe.createContainer,createPaginationContainer:eTe.createContainer,createRefetchContainer:tTe.createContainer,fetchQuery_DEPRECATED:Eo.fetchQuery_DEPRECATED,graphql:Eo.graphql,readInlineData:Eo.readInlineData,requestSubscription:Eo.requestSubscription,fetchQuery:Eo.fetchQuery},iTe=nTe;function oTe(e){let t=iTe.ReactRelayContext.Provider;return Sr(t,{value:{environment:e.environment},children:e.children})}let sTe={make:oTe},aTe={Provider:sTe};function lTe(e,t,r){let n=async(i,o,s,a)=>{let l=D(vs(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:D(JSON.stringify({query:l,variables:o}),"")})).json,g=await p();return Bg(g)&&r(),g};return hke.make(ft.Network.create(n),cke.make(new ft.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function uTe(e){let t=e.config,r=As(),n=Mt(()=>lTe(t,()=>R(r,i=>i.getToken()),()=>ae(r,i=>i.logout())),[t,r]);return b(aTe.Provider.make,{environment:n,children:e.children})}let cTe=uTe;function dTe(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function fTe(e,t){return e+"_"+t+"EventHistory"}function hTe(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
|
|
69
|
+
`+e+`(
|
|
70
|
+
filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
|
|
71
|
+
first: $first
|
|
72
|
+
after: $after
|
|
73
|
+
) {
|
|
74
|
+
edges {
|
|
75
|
+
node {
|
|
76
|
+
position
|
|
77
|
+
eventType
|
|
78
|
+
payload
|
|
79
|
+
tags { key value }
|
|
80
|
+
meta { user time correlationId causationId }
|
|
81
|
+
recordedAt
|
|
82
|
+
}
|
|
83
|
+
cursor
|
|
84
|
+
}
|
|
85
|
+
pageInfo { hasNextPage endCursor }
|
|
86
|
+
}
|
|
87
|
+
}`}function pTe(e){return fe(R(Y(e),t=>M(t,"x-reventless-audit")),!1,t=>{let r=rt(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let c3={contents:[]};function d3(e){if(!c3.contents.includes(e)){c3.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 gTe(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=dTe(e.queryField);if(r!==void 0){if(n!==void 0){let i=fTe(n,r);return{queryField:i,queryDocument:hTe(i),displayName:r}}d3(e.name);return}d3(e.name)}function Na(e,t){return R(M(e,t),de)}function mTe(e){let t=D(Y(e),{}),r=D(R(M(t,"meta"),Y),{}),n=oe(D(R(M(t,"tags"),mr),[]),a=>{let l=D(Y(a),{}),u=Na(l,"key"),d=Na(l,"value");if(u!==void 0&&d!==void 0)return[u,d]}),i=Na(t,"position"),o=Na(t,"eventType");if(i===void 0||o===void 0)return;let s=D(Na(r,"time"),D(Na(t,"recordedAt"),""));return{position:i,eventType:o,payload:D(M(t,"payload"),{}),tags:n,actor:Na(r,"user"),time:s,recordedAt:D(Na(t,"recordedAt"),s)}}function vTe(e,t){return oe(eE(e,t),mTe)}function _Te(e,t){let r=$M(e,t);return[r.hasNextPage,r.endCursor]}function bTe(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return mt(r).toLowerCase()}function yTe(e){return D(J(Y(e),Ge),[]).filter(t=>t[0]!=="TAG")}function xTe(e){let t={};return e.map(r=>{let n=JSON.stringify(dt(Ge(t)),null,2);yTe(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(dt(Ge(t)),null,2);return[n,i]})}let STe="System";function ETe(e,t){let r=xTe(e);return e.map((n,i)=>{let o=D(r[i],["",""]),s=fe(n.tags[0],t,a=>t+" "+a[1]);return{id:n.position,verb:bTe(n.eventType,t),subject:s,actor:D(n.actor,STe),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function wTe(e){let t=[];return e.forEach(r=>ae(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(jf)}function kTe(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(jf)}function Ci(e){return"var("+e+")"}let CTe=w([z("flex"),me("column"),ee("center"),Ye("center"),c("gap",Ci(F.lg)),c("padding",Ci(F.xxl)),jo({NAME:"percent",VAL:100}),FF({NAME:"percent",VAL:100}),ca("center"),c("min-height","400px")]),RTe=w([c("font-size","48px"),c("line-height","1")]),ATe=w([c("color",Ci(x.textPrimary)),c("font-size",Ci(T.sizeXxl)),c("font-weight",Ci(T.weightBold)),yn(Re(0))]),TTe=w([c("color",Ci(x.textSecondary)),c("font-size",Ci(T.sizeLg)),c("line-height",Ci(T.lineHeightRelaxed)),c("max-width","480px"),yn(Re(0))]),$Te=w([c("background",Ci(x.brand)),c("color",Ci(x.textOnBrand)),c("border-radius",Ci(Z.md)),c("padding","var("+F.sm+") var("+F.lg+")"),c("font-size",Ci(T.sizeMd)),c("font-weight",Ci(T.weightMedium)),c("border","none"),c("cursor","pointer"),Es(Re(8))]);function NTe(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:RTe}),b("h2",{children:t.title,className:ATe}),b("p",{children:fe(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:TTe}),b("button",{children:"Upgrade to unlock",className:$Te})],className:CTe})}let DTe=NTe;function FTe(e){let t=e.children,r=e.definition,n=El(),i=r.requiredAccess;return i!==void 0&&!n(i)?b(DTe,{definition:r}):t}let k0=FTe,ITe=M;function f3(e,t){let r=R(t[0],n=>M(e,n));if(r!==void 0&&t.every(n=>We(M(e,n),r)))return r}function Xg(e,t,r){let n=M(e,t);return n!==void 0?r(n):!0}function v2(e,t,r){return oe(t,n=>{let i=M(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}function iz(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let _2=["body","text","message","comment","content"],PTe=["author","createdby","user","commenter","postedby"],OTe=["createdat","postedat","at","commentedat"];function oz(e){return oe(Xr(e),t=>{if(km(t[1]))return t[0]})}function b2(e,t){return oz(e).find(r=>t.includes(r.toLowerCase()))}function MTe(e){let t=jr(e,void 0,void 0),r=Xr(e).map(n=>n[0]).find(n=>fe(M(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:b2(e,PTe)}function LTe(e){return oe(Xr(e),t=>{if(Wx(t[1]))return t[0]}).find(t=>OTe.includes(t.toLowerCase()))}function sz(e){return oz(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function zTe(e,t){let r=iz(t).toLowerCase();return sz(e).find(n=>n.toLowerCase()===r+"id")}function UTe(e){let t=sz(e);if(t.length===1)return t[0]}function BTe(e){return fe(R(Y(e),t=>M(t,"x-reventless-comments")),!1,t=>{let r=rt(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function h3(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=iz(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let jTe=["addcomment","postcomment","comment","writecomment","leavecomment"];function qTe(e,t){let r=oe(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>jTe.some(i=>n.name.toLowerCase().startsWith(i)))}let p3={contents:[]};function VTe(e){if(!p3.contents.includes(e)){p3.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 '+_2.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function KTe(e,t){return oe(e.readModels.filter(r=>r.name!==t?BTe(r.schema)?!0:h3(r.name,t):!1),r=>{let n=zTe(r.schema,t),i=n!==void 0?n:h3(r.name,t)?UTe(r.schema):void 0,o=b2(r.schema,_2);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:MTe(r.schema),timestampField:LTe(r.schema),postCommand:qTe(r,e)}:void 0;VTe(r.name)})[0]}function rc(e,t){return R(M(e,t),de)}function HTe(e,t,r){let n=oe(t,o=>{let s=D(Y(o),{});if(We(rc(s,e.entityField),r))return s}),i=o=>R(R(e.timestampField,s=>rc(o,s)),zi);return n.toSorted((o,s)=>{let a=i(o),l=i(s);return a!==void 0?l!==void 0?a-l:-1:l!==void 0?1:0}).map((o,s)=>({id:D(rc(o,"id"),"#"+s.toString()),body:D(rc(o,e.bodyField),""),author:R(e.authorField,a=>rc(o,a)),timestamp:R(e.timestampField,a=>rc(o,a))}))}function WTe(e,t,r){let n=e.postCommand,i=D(R(n,s=>s.aggregateIdField),e.entityField),o=D(R(n,s=>b2(s.schema,_2)),e.bodyField);return dt([[i,t],[o,r]])}function ms(e){return"var("+e+")"}let GTe=w([Pt("fixed"),da(Re(0)),ad(Re(0)),xl(Re(0)),Bx(Re(0)),c("background","rgba(0,0,0,0.5)"),z("flex"),ee("center"),Ye("center"),c("z-index","1000"),c("backdrop-filter","blur(2px)")]),JTe=w([c("background",ms(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",ms(Z.lg)),c("box-shadow",ms(mn.lg)),z("flex"),me("column"),c("max-height","90vh"),c("max-width","90vw"),c("min-width","400px"),c("overflow","hidden")]),QTe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("padding","var("+F.md+") var("+F.lg+")"),c("border-bottom","1px solid var("+x.borderSubtle+")"),pi(0)]),YTe=w([c("color",ms(x.textPrimary)),c("font-size",ms(T.sizeLg)),c("font-weight",ms(T.weightMedium)),yn(Re(0))]),XTe=w([c("background","none"),c("border","none"),c("cursor","pointer"),c("color",ms(x.textSecondary)),c("font-size","18px"),c("padding","0"),c("line-height","1"),He([c("color",ms(x.textPrimary))])]),ZTe=w([c("padding",ms(F.lg)),c("overflow-y","auto"),mo(1)]),e$e=w([z("flex"),ee("center"),Ye("flexEnd"),c("gap",ms(F.sm)),c("padding","var("+F.md+") var("+F.lg+")"),c("border-top","1px solid var("+x.borderSubtle+")"),pi(0)]);function t$e(e){let t=e.onClose,r=e.isOpen;return Te(()=>{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:YTe}),b("button",{children:"x",className:XTe,onClick:n=>t()})],className:QTe}),b("div",{children:e.children,className:ZTe}),fe(e.footer,null,n=>b("div",{children:n,className:e$e}))],className:JTe,style:fe(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:GTe,onClick:n=>t()}):null}let y2=t$e;function Fi(e){return"var("+e+")"}let r$e=w([z("flex"),me("column"),c("gap",Fi(F.sm))]),n$e=w([c("overflow-x","auto")]),i$e=w([c("border-collapse","collapse"),c("font-size",Fi(T.sizeSm)),c("min-width","min-content")]),x2=[c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("background",Fi(x.surfaceSubtle)),c("white-space","nowrap"),c("font-weight",Fi(T.weightMedium))],o$e=w(x2.concat([c("text-align","left"),c("color",Fi(x.textSecondary))])),s$e=w(x2.concat([c("text-align","right"),c("color",Fi(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Fi(T.sizeXs))])),a$e=w(x2.concat([c("text-align","left"),c("color",Fi(x.textPrimary))]));function l$e(e){return w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("white-space","nowrap"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("color",e>=.55?Fi(x.textOnBrand):e<=0?Fi(x.textDisabled):Fi(x.textPrimary))])}let u$e=w([z("flex"),ee("center"),c("gap","6px"),c("font-size",Fi(T.sizeXs)),c("color",Fi(x.textSecondary))]);function c$e(e){return w([c("width","18px"),c("height","10px"),c("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("border","1px solid var("+x.borderSubtle+")")])}function az(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function d$e(e){return it(e,0,(t,r)=>it(r,t,(n,i)=>i.value>n?i.value:n))}let lz=[.12,.35,.6,.85,1];function f$e(e){let t=e.cells,r=e.colHeaders,n=d$e(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:o$e,scope:"col"}),r.map(i=>b("th",{children:i.label,className:s$e,scope:"col"},i.value))]})}),b("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[b("th",{children:i.label,className:a$e,scope:"row"}),r.map((s,a)=>{let l=D(R(t[o],u=>u[a]),{value:0,display:""});return b("td",{children:b("span",{children:l.display,title:i.label+" × "+s.label+": "+l.display}),className:l$e(az(l.value,n))},i.value+":"+s.value)})]},i.value))})],className:i$e}),className:n$e}),L("div",{children:["0",lz.map(i=>b("span",{className:c$e(i)},i.toString())),e.maxLabel],className:u$e})],className:r$e})}let h$e=f$e;function p$e(e,t){let r=s=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(s,a,l)=>{if(typeof s!="object")switch(s){case"Function":case"Lazy":a[l]=r;return;case"Class":a[l]=[r,r,r,0];return}else{if(s.TAG!=="Module"){a[l]=s._0;return}let u=s._0,d={};a[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 g$e(e,t,r){let n=(i,o,s,a,l)=>{if(typeof i!="object")switch(i){case"Function":a[l]=s;return;case"Lazy":case"Class":Object.assign(o,s);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],s[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,s=i.length;o<s;++o){let a=i[o],l=a[1];n(a[0],t[l],r[l],t,l)}return}}function ax(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function m$e(e,t,r){let n=R(M(e,t),ax);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let s=o,a=i;if(s>r)return!0;let l=R(M(e,a),ax);if(l===void 0)return!1;if(l===t)return!0;o=s+1|0,i=l}}}else return!1}function v$e(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},s={contents:0};e.forEach(l=>{let u=ax(l);if(u!==void 0){if(M(t,u)!==void 0){if(m$e(t,l.key,r)){s.contents=s.contents+1|0,i.push(l.key);return}let f=D(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 a=(l,u)=>{let d=M(t,l);if(d===void 0)return;let f=u>=r?[]:oe(D(M(n,l),[]),h=>a(h,u+1|0));return{node:d,children:f}};return{roots:oe(i,l=>a(l,0)),detached:o.contents,cycles:s.contents}}function uz(e){return it(e.children,e.children.length,(t,r)=>t+uz(r)|0)}let _$e="14px";function gn(e){return"var("+e+")"}let b$e=w([z("flex"),me("column"),c("gap",gn(F.sm))]),y$e=w([c("overflow-x","auto"),c("padding-bottom","4px")]),x$e=w([z("flex"),ee("flexStart"),Ye("center"),c("gap",gn(F.lg)),c("min-width","min-content"),c("padding","var("+F.xs+") 0")]),S$e=w([z("flex"),me("column"),ee("center"),c("min-width","min-content")]);function E$e(e){return w([z("flex"),me("column"),c("gap","2px"),c("min-width","132px"),c("max-width","180px"),c("padding","var("+F.xs+") var("+F.sm+")"),c("border","1px solid var("+x.borderSubtle+")"),c("border-top","3px solid "+e),c("border-radius",gn(Z.md)),c("background",gn(x.surface)),c("text-align","left"),Ee("pointer"),He([c("background",gn(x.surfaceSubtle))])])}let w$e=w([c("font-size",gn(T.sizeSm)),c("font-weight",gn(T.weightMedium)),c("color",gn(x.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),k$e=w([c("font-size",gn(T.sizeXs)),c("color",gn(x.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),C$e=w([c("margin-top","2px"),c("padding","0 6px"),c("border","1px solid var("+x.border+")"),c("border-radius","10px"),c("background",gn(x.surface)),c("color",gn(x.textSecondary)),c("font-size",gn(T.sizeXs)),c("line-height","16px"),Ee("pointer"),He([c("color",gn(x.textPrimary))])]),g3=w([c("width","1px"),c("height",_$e),c("background",gn(x.border))]),R$e=w([z("flex"),ee("flexStart"),c("min-width","min-content")]),A$e=w([z("flex"),me("column"),ee("center"),c("min-width","min-content")]),T$e=w([c("padding","0 var("+F.xs+")")]),$$e=w([z("flex"),c("width","100%"),c("height","1px")]);function m3(e){return w([c("flex","1 1 50%"),c("background",e?gn(x.border):"transparent")])}let N$e=w([c("font-size",gn(T.sizeXs)),c("color",gn(x.textDisabled))]),D$e="var("+x.brand+")",S2=p$e(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function F$e(e){let t=e.depth,r=e.tree,n=ue(()=>!1),i=n[1],o=n[0],s=uz(r),a=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[b("span",{children:r.node.title,className:w$e}),l!==void 0&&l!==""?b("span",{children:l,className:k$e}):null],className:E$e(D(r.node.accent,D$e)),title:r.node.title,onClick:u=>ae(r.node.onOpen,d=>d())}),a===0?null:L(Br,{children:[b("button",{children:o?"+"+s.toString():"−","aria-expanded":!o,className:C$e,title:o?"Expand":"Collapse",onClick:u=>i(d=>!d)}),o?null:L(Br,{children:[b("div",{className:g3}),b("div",{children:r.children.map((u,d)=>L("div",{children:[L("div",{children:[b("div",{className:m3(d>0)}),b("div",{className:m3(d<(a-1|0))})],className:$$e}),b("div",{className:g3}),b("div",{children:b(S2.make,{tree:u,depth:t+1|0}),className:T$e})],className:A$e},u.node.key)),className:R$e})]})]})],className:S$e})}g$e({_0:[["Function","make"]]},S2,{make:F$e});function I$e(e){let t=v$e(e.nodes);if(t.roots.length===0)return b(ld,{title:"Nothing to chart",description:"No rows in this window."});let r=oe([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(S2.make,{tree:n,depth:0},n.node.key)),className:x$e}),className:y$e}),r.length===0?null:b("span",{children:r.join(" · "),className:N$e})],className:b$e})}let P$e=I$e;function Ii(e){return"var("+e+")"}let O$e=w([Pt("relative"),c("padding-left","28px"),z("flex"),me("column"),c("gap",Ii(F.md))]),M$e=w([Pt("absolute"),ad(Re(7)),da(Re(8)),Bx(Re(0)),c("width","2px"),c("background",Ii(x.borderSubtle))]),L$e=w([Pt("absolute"),ad(Re(-21)),da(Re(6)),c("width","10px"),c("height","10px"),c("border-radius","50%"),c("background",Ii(x.brand)),c("border","2px solid var("+x.surface+")"),pi(0)]),cz=w([Pt("relative"),z("flex"),me("column"),c("gap","2px")]),z$e=Rr([cz,w([c("background","none"),c("border","none"),c("padding","0"),ca("left"),Ee("pointer"),He([c("opacity","0.85")])])]),U$e=w([z("flex"),ee("center"),c("gap",Ii(F.sm))]),B$e=w([c("color",Ii(x.textDisabled)),c("font-size",Ii(T.sizeXs)),c("font-family",Ii(T.fontFamilyMono))]),j$e=w([c("color",Ii(x.textPrimary)),c("font-size",Ii(T.sizeMd)),c("font-weight",Ii(T.weightMedium))]),q$e=w([c("color",Ii(x.textSecondary)),c("font-size",Ii(T.sizeSm)),c("line-height",Ii(T.lineHeightNormal)),Ih(Re(0))]);function V$e(e){let t=e.onSelect,r=n=>L(Br,{children:[b("div",{className:L$e,style:J(n.accent,i=>({background:i}))}),L("div",{children:[b("span",{children:n.timestamp,className:B$e}),fe(n.variant,null,i=>b(ra,{variant:i,label:n.label})),fe(n.variant,b("span",{children:n.label,className:j$e}),i=>null)],className:U$e}),fe(n.detail,null,i=>b("div",{children:i,className:q$e}))]});return L("div",{children:[b("div",{className:M$e}),e.entries.map(n=>t!==void 0?b("button",{children:r(n),className:z$e,type:"button",onClick:i=>t(n.id)},n.id):b("div",{children:r(n),className:cz},n.id))],className:O$e})}let K$e=V$e;function H$e(e){let t=e[0];if(t===void 0)return;let r=it(e,t.start,(i,o)=>o.start<i?o.start:i),n=it(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[Vn(r),ao(Vn(n),1)]}function W$e(e,t){let r=(t-e)/Z4;return r<=21?"Days":r<=120?"Weeks":"Months"}function v3(e){let t=new Date(e).getMonth()|0;return D(Y4[t],"").slice(0,3)}function G$e(e,t){switch(t){case"Days":return la(e);case"Weeks":return X4(e).toString()+" "+v3(e);case"Months":let r=new Date(e).getFullYear().toString();return v3(e)+" '"+r.slice(2)}}function J$e(e,t,r){let n=l=>{switch(r){case"Days":return ao(Vn(e),l);case"Weeks":return ao(rv(e),l*7|0);case"Months":return K4(H4(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 s=i.length,a=s<=40?1:(s/40|0)+1|0;return lF(i,(l,u)=>{if(Lo(u,a)===0)return[l,G$e(l,r)]})}function Zg(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function Pf(e){return e<0?0:e>100?100:e}function lx(e,t,r){let n=Pf(Zg(e.start,t,r)),o=Pf(Zg(e.end_>e.start?e.end_:e.start,t,r))-n,s=o<.6?.6:o;return[n+s>100?100-s:n,s]}function dz(e){return e.map(t=>oe(t.dependsOn,r=>J(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 Q$e(e){return it(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function fz(e){return dz(e).filter(t=>t.violated)}function Y$e(e,t){return fz(e).some(r=>r.to_===t)}let E2="184px";function Ht(e){return"var("+e+")"}let X$e=w([z("flex"),me("column"),c("gap",Ht(F.sm))]),Z$e=w([z("flex"),ee("center"),Ye("spaceBetween"),gi("wrap"),c("gap",Ht(F.sm))]),eNe=w([z("inlineFlex"),ee("center"),c("gap",Ht(F.xs))]),hz=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Ht(Z.sm)),c("padding","2px var("+F.sm+")"),c("color",Ht(x.textSecondary)),c("font-size",Ht(T.sizeSm)),Ee("pointer"),He([c("background",Ht(x.surfaceSubtle)),c("color",Ht(x.textPrimary))])]),tNe=Rr([hz,w([c("background",Ht(x.surfaceSubtle)),c("color",Ht(x.textPrimary)),c("font-weight",Ht(T.weightMedium))])]),rNe=w([c("font-size",Ht(T.sizeMd)),c("font-weight",Ht(T.weightMedium)),c("color",Ht(x.textPrimary))]),nNe=w([c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Ht(Z.md)),c("overflow","hidden")]),pz=w([z("flex"),ee("stretch")]),iNe=Rr([pz,w([c("background",Ht(x.surfaceSubtle)),c("border-bottom","1px solid var("+x.borderSubtle+")")])]),oNe=w([c("flex","0 0 "+E2),c("padding","4px var("+F.sm+")"),c("font-size",Ht(T.sizeXs)),c("color",Ht(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),sNe=w([Pt("relative"),c("flex","1 1 auto"),c("height","22px"),c("overflow","hidden")]),aNe=w([Pt("absolute"),c("top","4px"),c("padding-left","3px"),c("border-left","1px solid var("+x.borderSubtle+")"),c("font-size",Ht(T.sizeXs)),c("color",Ht(x.textSecondary)),c("white-space","nowrap"),c("pointer-events","none")]),lNe=w([Pt("relative")]),uNe=Rr([pz,w([c("height","30px"),c("border-top","1px solid var("+x.borderSubtle+")")])]),cNe=w([c("flex","0 0 "+E2),z("flex"),ee("center"),c("gap","4px"),c("padding","0 var("+F.sm+")"),c("font-size",Ht(T.sizeSm)),c("color",Ht(x.textPrimary)),c("border-right","1px solid var("+x.borderSubtle+")"),c("overflow","hidden")]),dNe=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),fNe=w([c("color",Ht(x.warning)),c("font-size",Ht(T.sizeXs)),c("flex","0 0 auto")]),hNe=w([Pt("relative"),c("flex","1 1 auto")]),pNe=w([Pt("absolute"),c("top","0"),c("bottom","0"),c("width","1px"),c("background",Ht(x.borderSubtle)),c("opacity","0.6"),c("pointer-events","none")]);function gNe(e){return w([Pt("absolute"),c("top","5px"),c("height","19px"),c("border","none"),c("border-radius",Ht(Z.sm)),c("background",e),c("padding","0"),Ee("pointer"),He([c("filter","brightness(1.12)")])])}let mNe=w([c("outline","2px solid var("+x.warning+")"),c("outline-offset","1px")]),vNe=w([Pt("absolute"),c("top","0"),c("left",E2),c("right","0"),c("bottom","0"),c("pointer-events","none")]),_Ne=w([c("display","block"),c("width","100%"),c("height","100%")]),bNe=w([c("font-size",Ht(T.sizeXs)),c("color",Ht(x.textDisabled))]),yNe="var("+x.brand+")";function Ja(e){return(Math.round(e*100)/100).toString()}function xNe(e,t){let r=ao(t,-1);return Xi(e)===Xi(r)?Xi(e):Xi(e)+" – "+Xi(r)}function SNe(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=S=>n.findIndex(k=>k.key===S),s=o(i.from),a=o(i.to_),l=n[s],u=n[a];if(l===void 0||u===void 0)return null;let d=lx(l,r,t),h=lx(u,r,t)[0],p=d[0]+d[1],g=s*30+30/2,m=a*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,_;if(h>p){let S=Pf((p+h)/2);_=[[p,g],[S,g],[S,m],[h,m]]}else{let S=Pf(p+1.4),k=Pf(h-1.4),C=(g+m)/2;_=[[p,g],[S,g],[S,C],[k,C],[k,m],[h,m]]}let y=i.violated?"var("+x.warning+")":"var("+x.border+")",E=_.length-2|0;return b("g",{children:_.map((S,k)=>{let C=_[k+1|0];return C!==void 0?b("line",{markerEnd:k===E?"url(#"+v+")":void 0,stroke:y,strokeWidth:"1.5",x1:Ja(S[0])+"%",x2:Ja(C[0])+"%",y1:Ja(S[1]),y2:Ja(C[1])},k.toString()):null})})}function ENe(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=h7(),o=ue(()=>t),s=o[1],a="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,u=H$e(n);if(u===void 0)return b(ld,{title:"Nothing scheduled",description:"No row in this window carries a start and end date."});let d=u[1],f=u[0],h=D(o[0],W$e(f,d)),p=J$e(f,d,h),g=dz(n),m=Q$e(n),v=fz(n).length,_=(S,k)=>b("button",{children:k,className:h===S?tNe:hz,onClick:C=>s($=>S)}),y,E=0;if(r!==void 0||m!==0||v!==0?E=1:y=null,E===1){let S=oe([r,m>0?m.toString()+" dependency link(s) outside this window":void 0,v>0?v.toString()+" start(s) before a dependency ends":void 0],k=>k);y=b("span",{children:S.join(" · "),className:bNe})}return L("div",{children:[L("div",{children:[b("span",{children:xNe(f,d),className:rNe}),L("div",{children:[_("Days","Days"),_("Weeks","Weeks"),_("Months","Months")],className:eNe})],className:Z$e}),L("div",{children:[L("div",{children:[b("div",{children:"Task",className:oNe}),b("div",{children:p.map(S=>{let k=S[0];return b("span",{children:S[1],className:aNe,style:{left:Ja(Zg(k,f,d))+"%"}},k.toString())}),className:sNe})],className:iNe}),L("div",{children:[n.map(S=>{let k=lx(S,f,d),C=Y$e(n,S.key),$=gNe(D(S.accent,yNe)),A=C?$+" "+mNe:$;return L("div",{children:[L("div",{children:[C?b("span",{children:"▲",className:fNe,title:"Starts before a dependency ends"}):null,b("span",{children:S.title,className:dNe,title:S.title})],className:cNe}),L("div",{children:[p.map(N=>{let O=N[0];return b("div",{className:pNe,style:{left:Ja(Zg(O,f,d))+"%"}},O.toString())}),b("button",{className:A,style:{left:Ja(k[0])+"%",width:Ja(k[1])+"%"},title:S.title+" · "+la(S.start)+" → "+la(S.end_),onClick:N=>S.onOpen()})],className:hNe})],className:uNe},S.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("+x.border+")"}),id:a,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("+x.warning+")"}),id:l,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"})]}),g.map(S=>b(SNe,{edge:S,tasks:n,from:f,to_:d,arrowId:a,arrowBadId:l},S.from+"->"+S.to_))],className:_Ne}),className:vNe})],className:lNe})],className:nNe}),y],className:X$e})}let wNe=ENe;function Ln(e){return"var("+e+")"}let kNe=w([c("overflow-x","auto")]),CNe=w([c("border-collapse","collapse"),c("font-size",Ln(T.sizeSm)),c("color",Ln(x.textPrimary)),c("min-width","min-content")]),w2=[c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("white-space","nowrap")],RNe=w(w2),ANe=w(w2.concat([c("color",Ln(x.textDisabled))])),TNe=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","left"),c("color",Ln(x.textSecondary)),c("font-weight",Ln(T.weightMedium)),c("white-space","nowrap")]),$Ne=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("background",Ln(x.surfaceSubtle)),c("color",Ln(x.textSecondary)),c("font-weight",Ln(T.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Ln(T.sizeXs)),c("white-space","nowrap")]),NNe=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","left"),c("background",Ln(x.surfaceSubtle)),c("color",Ln(x.textPrimary)),c("font-weight",Ln(T.weightMedium)),c("white-space","nowrap")]),ay=w(w2.concat([c("font-weight",Ln(T.weightMedium))])),_3=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("background",Ln(x.surfaceSubtle)),c("color",Ln(x.textSecondary)),c("font-weight",Ln(T.weightMedium)),c("white-space","nowrap")]),b3="Total";function DNe(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:TNe,scope:"col"}),i.map(o=>b("th",{children:o.label,className:$Ne,scope:"col"},o.value)),b("th",{children:b3,className:_3,scope:"col"})]})}),b("tbody",{children:e.rowHeaders.map((o,s)=>{let a=D(n[s],[]);return L("tr",{children:[b("th",{children:o.label,className:NNe,scope:"row"}),i.map((l,u)=>{let d=D(a[u],{display:"",empty:!0});return b("td",{children:d.empty?"—":d.display,className:d.empty?ANe:RNe},l.value)}),b("td",{children:D(r[s],""),className:ay})]},o.value)})}),b("tfoot",{children:L("tr",{children:[b("th",{children:b3,className:_3,scope:"row"}),i.map((o,s)=>b("td",{children:D(t[s],""),className:ay},o.value)),b("td",{children:e.grandTotal,className:ay})]})})],className:CNe}),className:kNe})}let FNe=DNe;function INe(e){let t=e.label,r=e.size;return b(A1,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let y3=INe;function li(e){return"var("+e+")"}let PNe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",li(F.md))]),ONe=w([z("flex"),me("column"),ee("stretch"),c("gap",li(F.xs)),c("padding","0"),c("background","none"),c("border","none"),c("text-align","left"),Ee("pointer"),He([c("opacity","0.88")])]),MNe=w([c("width","100%"),c("aspect-ratio","4 / 3"),c("object-fit","cover"),c("background",li(x.surfaceSubtle)),c("border","1px solid var("+x.border+")"),c("border-radius",li(Z.md))]),LNe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",li(F.sm))]),zNe=w([c("color",li(x.textPrimary)),c("font-size",li(T.sizeSm)),c("font-weight",li(T.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),UNe=w([c("color",li(x.textSecondary)),c("font-size",li(T.sizeXs)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),BNe=w([c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",li(Z.md)),c("color","#f5f5f5"),c("padding","4px var("+F.sm+")"),c("font-size",li(T.sizeSm)),Ee("pointer"),He([c("background","rgba(255,255,255,0.22)")])]),jNe=w([c("color",li(x.textDisabled)),c("font-size",li(T.sizeSm))]);function qNe(e){return oe(e,t=>J(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function VNe(e){let t=e.onOpen,r=e.items,n=ue(()=>{}),i=n[1],o=n[0],s=qNe(r);if(r.length===0)return b("span",{children:"(empty)",className:jNe});let a;if(o!==void 0){let l=R(t,u=>J(s[o],d=>b("button",{children:"Open record →",className:BNe,type:"button",onClick:f=>{i(h=>{}),u(d.key)}})));a=b(gI,{slides:s,index:o,onIndexChange:u=>i(d=>u),onClose:()=>i(u=>{}),action:l})}else a=null;return L(Br,{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:MNe,alt:l.title,src:u}):d!==void 0?b(y3,{size:"Tile",label:"Add image"}):b(y3,{size:"Tile"}),L("div",{children:[b("span",{children:l.title,className:zNe}),D(l.badge,null)],className:LNe}),f!==void 0?b("span",{children:f,className:UNe}):null],className:ONe,title:Pi(l.src)&&Le(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,g=l.onUpload;if(p===void 0)return g!==void 0?g():ae(t,v=>v(l.key));let m=s.findIndex(v=>v.key===l.key);return m!==-1?i(v=>m):ae(t,v=>v(l.key))}},l.key)}),className:PNe}),a]})}let KNe=VNe;const Iv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Od(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function k2(e){return"nodeType"in e}function bi(e){var t,r;return e?Od(e)?e:k2(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function C2(e){const{Document:t}=bi(e);return e instanceof t}function fp(e){return Od(e)?!1:e instanceof bi(e).HTMLElement}function gz(e){return e instanceof bi(e).SVGElement}function Md(e){return e?Od(e)?e.document:k2(e)?C2(e)?e:fp(e)||gz(e)?e.ownerDocument:document:document:document}const bl=Iv?sF:Te;function R2(e){const t=Qe(e);return bl(()=>{t.current=e}),Qr(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 HNe(){const e=Qe(null),t=Qr((n,i)=>{e.current=setInterval(n,i)},[]),r=Qr(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Ah(e,t){t===void 0&&(t=[e]);const r=Qe(e);return bl(()=>{r.current!==e&&(r.current=e)},t),r}function hp(e,t){const r=Qe();return Mt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function em(e){const t=R2(e),r=Qe(null),n=Qr(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function ux(e){const t=Qe();return Te(()=>{t.current=e},[e]),t.current}let ly={};function Pv(e,t){return Mt(()=>{if(t)return t;const r=ly[e]==null?0:ly[e]+1;return ly[e]=r,e+"-"+r},[e,t])}function mz(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,s)=>{const a=Object.entries(s);for(const[l,u]of a){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const Mc=mz(1),tm=mz(-1);function WNe(e){return"clientX"in e&&"clientY"in e}function vz(e){if(!e)return!1;const{KeyboardEvent:t}=bi(e.target);return t&&e instanceof t}function GNe(e){if(!e)return!1;const{TouchEvent:t}=bi(e.target);return t&&e instanceof t}function cx(e){if(GNe(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 WNe(e)?{x:e.clientX,y:e.clientY}:null}const x3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function JNe(e){return e.matches(x3)?e:e.querySelector(x3)}const QNe={display:"none"};function YNe(e){let{id:t,value:r}=e;return Gi.createElement("div",{id:t,style:QNe},r)}function XNe(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 Gi.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function ZNe(){const[e,t]=ue("");return{announce:Qr(n=>{n!=null&&t(n)},[]),announcement:e}}const _z=ur(null);function e3e(e){const t=It(_z);Te(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function t3e(){const[e]=ue(()=>new Set),t=Qr(n=>(e.add(n),()=>e.delete(n)),[e]);return[Qr(n=>{let{type:i,event:o}=n;e.forEach(s=>{var a;return(a=s[i])==null?void 0:a.call(s,o)})},[e]),t]}const r3e={draggable:`
|
|
88
|
+
To pick up a draggable item, press the space bar.
|
|
89
|
+
While dragging, use the arrow keys to move the item.
|
|
90
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
91
|
+
`},n3e={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 i3e(e){let{announcements:t=n3e,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=r3e}=e;const{announce:o,announcement:s}=ZNe(),a=Pv("DndLiveRegion"),[l,u]=ue(!1);if(Te(()=>{u(!0)},[]),e3e(Mt(()=>({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=Gi.createElement(Gi.Fragment,null,Gi.createElement(YNe,{id:n,value:i.draggable}),Gi.createElement(XNe,{id:a,announcement:s}));return r?b7(d,r):d}var Jr;(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"})(Jr||(Jr={}));function rm(){}function S3(e,t){return Mt(()=>({sensor:e,options:t??{}}),[e,t])}function o3e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Mt(()=>[...t].filter(n=>n!=null),[...t])}const Bo=Object.freeze({x:0,y:0});function s3e(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function a3e(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function l3e(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),s=i-n,a=o-r;if(n<i&&r<o){const l=t.width*t.height,u=e.width*e.height,d=s*a,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const u3e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:s}=o,a=r.get(s);if(a){const l=l3e(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(s3e)};function c3e(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function bz(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Bo}function d3e(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((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const f3e=d3e(1);function h3e(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 p3e(e,t,r){const n=h3e(t);if(!n)return e;const{scaleX:i,scaleY:o,x:s,y:a}=n,l=e.left-s-(1-i)*parseFloat(r),u=e.top-a-(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 g3e={ignoreTransform:!1};function pp(e,t){t===void 0&&(t=g3e);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=bi(e).getComputedStyle(e);u&&(r=p3e(r,u,d))}const{top:n,left:i,width:o,height:s,bottom:a,right:l}=r;return{top:n,left:i,width:o,height:s,bottom:a,right:l}}function E3(e){return pp(e,{ignoreTransform:!0})}function m3e(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function v3e(e,t){return t===void 0&&(t=bi(e).getComputedStyle(e)),t.position==="fixed"}function _3e(e,t){t===void 0&&(t=bi(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 A2(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(C2(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!fp(i)||gz(i)||r.includes(i))return r;const o=bi(e).getComputedStyle(i);return i!==e&&_3e(i,o)&&r.push(i),v3e(i,o)?r:n(i.parentNode)}return e?n(e):r}function yz(e){const[t]=A2(e,1);return t??null}function uy(e){return!Iv||!e?null:Od(e)?e:k2(e)?C2(e)||e===Md(e).scrollingElement?window:fp(e)?e:null:null}function xz(e){return Od(e)?e.scrollX:e.scrollLeft}function Sz(e){return Od(e)?e.scrollY:e.scrollTop}function dx(e){return{x:xz(e),y:Sz(e)}}var sn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(sn||(sn={}));function Ez(e){return!Iv||!e?!1:e===document.scrollingElement}function wz(e){const t={x:0,y:0},r=Ez(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,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const b3e={x:.2,y:.2};function y3e(e,t,r,n,i){let{top:o,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=b3e);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=wz(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(p.y=sn.Backward,g.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&l>=t.bottom-m.height&&(p.y=sn.Forward,g.y=n*Math.abs((t.bottom-m.height-l)/m.height)),!h&&a>=t.right-m.width?(p.x=sn.Forward,g.x=n*Math.abs((t.right-m.width-a)/m.width)):!f&&s<=t.left+m.width&&(p.x=sn.Backward,g.x=n*Math.abs((t.left+m.width-s)/m.width)),{direction:p,speed:g}}function x3e(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}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 kz(e){return e.reduce((t,r)=>Mc(t,dx(r)),Bo)}function S3e(e){return e.reduce((t,r)=>t+xz(r),0)}function E3e(e){return e.reduce((t,r)=>t+Sz(r),0)}function w3e(e,t){if(t===void 0&&(t=pp),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);yz(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const k3e=[["x",["left","right"],S3e],["y",["top","bottom"],E3e]];class T2{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=A2(r),i=kz(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of k3e)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(n),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Of{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 C3e(e){const{EventTarget:t}=bi(e);return e instanceof t?e:Md(e)}function cy(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 Wi;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Wi||(Wi={}));function w3(e){e.preventDefault()}function R3e(e){e.stopPropagation()}var Jt;(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"})(Jt||(Jt={}));const Cz={start:[Jt.Space,Jt.Enter],cancel:[Jt.Esc],end:[Jt.Space,Jt.Enter,Jt.Tab]},A3e=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Jt.Right:return{...r,x:r.x+25};case Jt.Left:return{...r,x:r.x-25};case Jt.Down:return{...r,y:r.y+25};case Jt.Up:return{...r,y:r.y-25}}};class $2{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 Of(Md(r)),this.windowListeners=new Of(bi(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Wi.Resize,this.handleCancel),this.windowListeners.add(Wi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Wi.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&w3e(n),r(Bo)}handleKeyDown(t){if(vz(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=Cz,coordinateGetter:s=A3e,scrollBehavior:a="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}:Bo;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=tm(f,d),p={x:0,y:0},{scrollableAncestors:g}=n.current;for(const m of g){const v=t.code,{isTop:_,isRight:y,isLeft:E,isBottom:S,maxScroll:k,minScroll:C}=wz(m),$=x3e(m),A={x:Math.min(v===Jt.Right?$.right-$.width/2:$.right,Math.max(v===Jt.Right?$.left:$.left+$.width/2,f.x)),y:Math.min(v===Jt.Down?$.bottom-$.height/2:$.bottom,Math.max(v===Jt.Down?$.top:$.top+$.height/2,f.y))},N=v===Jt.Right&&!y||v===Jt.Left&&!E,O=v===Jt.Down&&!S||v===Jt.Up&&!_;if(N&&A.x!==f.x){const P=m.scrollLeft+h.x,I=v===Jt.Right&&P<=k.x||v===Jt.Left&&P>=C.x;if(I&&!h.y){m.scrollTo({left:P,behavior:a});return}I?p.x=m.scrollLeft-P:p.x=v===Jt.Right?m.scrollLeft-k.x:m.scrollLeft-C.x,p.x&&m.scrollBy({left:-p.x,behavior:a});break}else if(O&&A.y!==f.y){const P=m.scrollTop+h.y,I=v===Jt.Down&&P<=k.y||v===Jt.Up&&P>=C.y;if(I&&!h.x){m.scrollTo({top:P,behavior:a});return}I?p.y=m.scrollTop-P:p.y=v===Jt.Down?m.scrollTop-k.y:m.scrollTop-C.y,p.y&&m.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,Mc(tm(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()}}$2.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=Cz,onActivation:i}=t,{active:o}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function k3(e){return!!(e&&"distance"in e)}function C3(e){return!!(e&&"delay"in e)}class N2{constructor(t,r,n){var i;n===void 0&&(n=C3e(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:s}=o;this.props=t,this.events=r,this.document=Md(s),this.documentListeners=new Of(this.document),this.listeners=new Of(n),this.windowListeners=new Of(bi(s)),this.initialCoordinates=(i=cx(o))!=null?i:Bo,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(Wi.Resize,this.handleCancel),this.windowListeners.add(Wi.DragStart,w3),this.windowListeners.add(Wi.VisibilityChange,this.handleCancel),this.windowListeners.add(Wi.ContextMenu,w3),this.documentListeners.add(Wi.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(C3(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(k3(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(Wi.Click,R3e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Wi.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(r=cx(t))!=null?r:Bo,u=tm(i,l);if(!n&&a){if(k3(a)){if(a.tolerance!=null&&cy(u,a.tolerance))return this.handleCancel();if(cy(u,a.distance))return this.handleStart()}if(C3(a)&&cy(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),s(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===Jt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const T3e={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class D2 extends N2{constructor(t){const{event:r}=t,n=Md(r.target);super(t,T3e,n)}}D2.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 $3e={move:{name:"mousemove"},end:{name:"mouseup"}};var fx;(function(e){e[e.RightClick=2]="RightClick"})(fx||(fx={}));class N3e extends N2{constructor(t){super(t,$3e,Md(t.event.target))}}N3e.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===fx.RightClick?!1:(n?.({event:r}),!0)}}];const dy={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class D3e extends N2{constructor(t){super(t,dy)}static setup(){return window.addEventListener(dy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(dy.move.name,t)};function t(){}}}D3e.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 Mf;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Mf||(Mf={}));var nm;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(nm||(nm={}));function F3e(e){let{acceleration:t,activator:r=Mf.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:s=5,order:a=nm.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=P3e({delta:f,disabled:!o}),[g,m]=HNe(),v=Qe({x:0,y:0}),_=Qe({x:0,y:0}),y=Mt(()=>{switch(r){case Mf.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Mf.DraggableRect:return i}},[r,i,l]),E=Qe(null),S=Qr(()=>{const C=E.current;if(!C)return;const $=v.current.x*_.current.x,A=v.current.y*_.current.y;C.scrollBy($,A)},[]),k=Mt(()=>a===nm.TreeOrder?[...u].reverse():u,[a,u]);Te(()=>{if(!o||!u.length||!y){m();return}for(const C of k){if(n?.(C)===!1)continue;const $=u.indexOf(C),A=d[$];if(!A)continue;const{direction:N,speed:O}=y3e(C,A,y,t,h);for(const P of["x","y"])p[P][N[P]]||(O[P]=0,N[P]=0);if(O.x>0||O.y>0){m(),E.current=C,g(S,s),v.current=O,_.current=N;return}}v.current={x:0,y:0},_.current={x:0,y:0},m()},[t,S,n,m,o,s,JSON.stringify(y),JSON.stringify(p),g,u,k,d,JSON.stringify(h)])}const I3e={x:{[sn.Backward]:!1,[sn.Forward]:!1},y:{[sn.Backward]:!1,[sn.Forward]:!1}};function P3e(e){let{delta:t,disabled:r}=e;const n=ux(t);return hp(i=>{if(r||!n||!i)return I3e;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[sn.Backward]:i.x[sn.Backward]||o.x===-1,[sn.Forward]:i.x[sn.Forward]||o.x===1},y:{[sn.Backward]:i.y[sn.Backward]||o.y===-1,[sn.Forward]:i.y[sn.Forward]||o.y===1}}},[r,t,n])}function O3e(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return hp(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function M3e(e,t){return Mt(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...o]},[]),[e,t])}var Th;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Th||(Th={}));var hx;(function(e){e.Optimized="optimized"})(hx||(hx={}));const R3=new Map;function L3e(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,s]=ue(null),{frequency:a,measure:l,strategy:u}=i,d=Qe(e),f=v(),h=Ah(f),p=Qr(function(_){_===void 0&&(_=[]),!h.current&&s(y=>y===null?_:y.concat(_.filter(E=>!y.includes(E))))},[h]),g=Qe(null),m=hp(_=>{if(f&&!r)return R3;if(!_||_===R3||d.current!==e||o!=null){const y=new Map;for(let E of e){if(!E)continue;if(o&&o.length>0&&!o.includes(E.id)&&E.rect.current){y.set(E.id,E.rect.current);continue}const S=E.node.current,k=S?new T2(l(S),S):null;E.rect.current=k,k&&y.set(E.id,k)}return y}return _},[e,o,r,f,l]);return Te(()=>{d.current=e},[e]),Te(()=>{f||p()},[r,f]),Te(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),Te(()=>{f||typeof a!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},a))},[a,f,p,...n]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(u){case Th.Always:return!1;case Th.BeforeDragging:return r;default:return!r}}}function Rz(e,t){return hp(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function z3e(e,t){return Rz(e,t)}function U3e(e){let{callback:t,disabled:r}=e;const n=R2(t),i=Mt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return Te(()=>()=>i?.disconnect(),[i]),i}function Ov(e){let{callback:t,disabled:r}=e;const n=R2(t),i=Mt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return Te(()=>()=>i?.disconnect(),[i]),i}function B3e(e){return new T2(pp(e),e)}function A3(e,t,r){t===void 0&&(t=B3e);const[n,i]=ue(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 s=U3e({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}}}}),a=Ov({callback:o});return bl(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),n}function j3e(e){const t=Rz(e);return bz(e,t)}const T3=[];function q3e(e){const t=Qe(e),r=hp(n=>e?n&&n!==T3&&e&&t.current&&e.parentNode===t.current.parentNode?n:A2(e):T3,[e]);return Te(()=>{t.current=e},[e]),r}function V3e(e){const[t,r]=ue(null),n=Qe(e),i=Qr(o=>{const s=uy(o.target);s&&r(a=>a?(a.set(s,dx(s)),new Map(a)):null)},[]);return Te(()=>{const o=n.current;if(e!==o){s(o);const a=e.map(l=>{const u=uy(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,dx(u)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const u=uy(l);u?.removeEventListener("scroll",i)})}},[i,e]),Mt(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Mc(o,s),Bo):kz(e):Bo,[e,t])}function $3(e,t){t===void 0&&(t=[]);const r=Qe(null);return Te(()=>{r.current=null},t),Te(()=>{const n=e!==Bo;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?tm(e,r.current):Bo}function K3e(e){Te(()=>{if(!Iv)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 H3e(e,t){return Mt(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=s=>{o(s,t)},r},{}),[e,t])}function Az(e){return Mt(()=>e?m3e(e):null,[e])}const N3=[];function W3e(e,t){t===void 0&&(t=pp);const[r]=e,n=Az(r?bi(r):null),[i,o]=ue(N3);function s(){o(()=>e.length?e.map(l=>Ez(l)?n:new T2(t(l),l)):N3)}const a=Ov({callback:s});return bl(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function G3e(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fp(t)?t:e}function J3e(e){let{measure:t}=e;const[r,n]=ue(null),i=Qr(u=>{for(const{target:d}of u)if(fp(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=Ov({callback:i}),s=Qr(u=>{const d=G3e(u);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[a,l]=em(s);return Mt(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const Q3e=[{sensor:D2,options:{}},{sensor:$2,options:{}}],Y3e={current:{}},Q0={draggable:{measure:E3},droppable:{measure:E3,strategy:Th.WhileDragging,frequency:hx.Optimized},dragOverlay:{measure:pp}};class Lf 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 X3e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Lf,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:rm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Q0,measureDroppableContainers:rm,windowRect:null,measuringScheduled:!1},Z3e={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:rm,draggableNodes:new Map,over:null,measureDroppableContainers:rm},Mv=ur(Z3e),eDe=ur(X3e);function tDe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Lf}}}function rDe(e,t){switch(t.type){case Jr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Jr.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 Jr.DragEnd:case Jr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Jr.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Lf(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Jr.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const s=new Lf(e.droppable.containers);return s.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Jr.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Lf(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function nDe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=It(Mv),o=ux(n),s=ux(r?.id);return Te(()=>{if(!t&&!n&&o&&s!=null){if(!vz(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=JNe(d);if(f){f.focus();break}}})}},[n,t,i,s,o]),null}function iDe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function oDe(e){return Mt(()=>({draggable:{...Q0.draggable,...e?.draggable},droppable:{...Q0.droppable,...e?.droppable},dragOverlay:{...Q0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function sDe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=Qe(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;bl(()=>{if(!s&&!a||!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=bz(d,n);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=yz(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const Tz=ur({...Bo,scaleX:1,scaleY:1});var Pa;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Pa||(Pa={}));const $z=p7(function(t){var r,n,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:d=Q3e,collisionDetection:f=u3e,measuring:h,modifiers:p,...g}=t;const m=g7(rDe,void 0,tDe),[v,_]=m,[y,E]=t3e(),[S,k]=ue(Pa.Uninitialized),C=S===Pa.Initialized,{draggable:{active:$,nodes:A,translate:N},droppable:{containers:O}}=v,P=$!=null?A.get($):null,I=Qe({initial:null,translated:null}),U=Mt(()=>{var Et;return $!=null?{id:$,data:(Et=P?.data)!=null?Et:Y3e,rect:I}:null},[$,P]),B=Qe(null),[V,W]=ue(null),[Q,K]=ue(null),G=Ah(g,Object.values(g)),ne=Pv("DndDescribedBy",s),se=Mt(()=>O.getEnabled(),[O]),be=oDe(h),{droppableRects:Ae,measureDroppableContainers:$e,measuringScheduled:ot}=L3e(se,{dragging:C,dependencies:[N.x,N.y],config:be.droppable}),ye=O3e(A,$),we=Mt(()=>Q?cx(Q):null,[Q]),Ze=Ns(),Zt=z3e(ye,be.draggable.measure);sDe({activeNode:$!=null?A.get($):null,config:Ze.layoutShiftCompensation,initialRect:Zt,measure:be.draggable.measure});const Ut=A3(ye,be.draggable.measure,Zt),Qn=A3(ye?ye.parentElement:null),ar=Qe({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:Ae,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Bi=O.getNodeFor((r=ar.current.over)==null?void 0:r.id),$r=J3e({measure:be.dragOverlay.measure}),Yn=(n=$r.nodeRef.current)!=null?n:ye,Nr=C?(i=$r.rect)!=null?i:Ut:null,j=!!($r.nodeRef.current&&$r.rect),le=j3e(j?null:Ut),xe=Az(Yn?bi(Yn):null),X=q3e(C?Bi??ye:null),he=W3e(X),qe=iDe(p,{transform:{x:N.x-le.x,y:N.y-le.y,scaleX:1,scaleY:1},activatorEvent:Q,active:U,activeNodeRect:Ut,containerNodeRect:Qn,draggingNodeRect:Nr,over:ar.current.over,overlayNodeRect:$r.rect,scrollableAncestors:X,scrollableAncestorRects:he,windowRect:xe}),Ve=we?Mc(we,N):null,Ke=V3e(X),pt=$3(Ke),gt=$3(Ke,[Ut]),jt=Mc(qe,pt),ge=Nr?f3e(Nr,qe):null,Oe=U&&ge?f({active:U,collisionRect:ge,droppableRects:Ae,droppableContainers:se,pointerCoordinates:Ve}):null,St=a3e(Oe,"id"),[er,lr]=ue(null),Kr=j?qe:Mc(qe,gt),yi=c3e(Kr,(o=er?.rect)!=null?o:null,Ut),xi=Qe(null),qt=Qr((Et,Er)=>{let{sensor:Hr,options:xn}=Er;if(B.current==null)return;const wr=A.get(B.current);if(!wr)return;const bt=Et.nativeEvent,Mr=new Hr({active:B.current,activeNode:wr,event:bt,options:xn,context:ar,onAbort(tr){if(!A.get(tr))return;const{onDragAbort:Sn}=G.current,en={id:tr};Sn?.(en),y({type:"onDragAbort",event:en})},onPending(tr,$n,Sn,en){if(!A.get(tr))return;const{onDragPending:Yo}=G.current,qi={id:tr,constraint:$n,initialCoordinates:Sn,offset:en};Yo?.(qi),y({type:"onDragPending",event:qi})},onStart(tr){const $n=B.current;if($n==null)return;const Sn=A.get($n);if(!Sn)return;const{onDragStart:en}=G.current,wa={activatorEvent:bt,active:{id:$n,data:Sn.data,rect:I}};xp(()=>{en?.(wa),k(Pa.Initializing),_({type:Jr.DragStart,initialCoordinates:tr,active:$n}),y({type:"onDragStart",event:wa}),W(xi.current),K(bt)})},onMove(tr){_({type:Jr.DragMove,coordinates:tr})},onEnd:Xn(Jr.DragEnd),onCancel:Xn(Jr.DragCancel)});xi.current=Mr;function Xn(tr){return async function(){const{active:Sn,collisions:en,over:wa,scrollAdjustedTranslate:Yo}=ar.current;let qi=null;if(Sn&&Yo){const{cancelDrop:Xo}=G.current;qi={activatorEvent:bt,active:Sn,collisions:en,delta:Yo,over:wa},tr===Jr.DragEnd&&typeof Xo=="function"&&await Promise.resolve(Xo(qi))&&(tr=Jr.DragCancel)}B.current=null,xp(()=>{_({type:tr}),k(Pa.Uninitialized),lr(null),W(null),K(null),xi.current=null;const Xo=tr===Jr.DragEnd?"onDragEnd":"onDragCancel";if(qi){const wt=G.current[Xo];wt?.(qi),y({type:Xo,event:qi})}})}}},[A]),Tn=Qr((Et,Er)=>(Hr,xn)=>{const wr=Hr.nativeEvent,bt=A.get(xn);if(B.current!==null||!bt||wr.dndKit||wr.defaultPrevented)return;const Mr={active:bt};Et(Hr,Er.options,Mr)===!0&&(wr.dndKit={capturedBy:Er.sensor},B.current=xn,qt(Hr,Er))},[A,qt]),ji=M3e(d,Tn);K3e(d),bl(()=>{Ut&&S===Pa.Initializing&&k(Pa.Initialized)},[Ut,S]),Te(()=>{const{onDragMove:Et}=G.current,{active:Er,activatorEvent:Hr,collisions:xn,over:wr}=ar.current;if(!Er||!Hr)return;const bt={active:Er,activatorEvent:Hr,collisions:xn,delta:{x:jt.x,y:jt.y},over:wr};xp(()=>{Et?.(bt),y({type:"onDragMove",event:bt})})},[jt.x,jt.y]),Te(()=>{const{active:Et,activatorEvent:Er,collisions:Hr,droppableContainers:xn,scrollAdjustedTranslate:wr}=ar.current;if(!Et||B.current==null||!Er||!wr)return;const{onDragOver:bt}=G.current,Mr=xn.get(St),Xn=Mr&&Mr.rect.current?{id:Mr.id,rect:Mr.rect.current,data:Mr.data,disabled:Mr.disabled}:null,tr={active:Et,activatorEvent:Er,collisions:Hr,delta:{x:wr.x,y:wr.y},over:Xn};xp(()=>{lr(Xn),bt?.(tr),y({type:"onDragOver",event:tr})})},[St]),bl(()=>{ar.current={activatorEvent:Q,active:U,activeNode:ye,collisionRect:ge,collisions:Oe,droppableRects:Ae,draggableNodes:A,draggingNode:Yn,draggingNodeRect:Nr,droppableContainers:O,over:er,scrollableAncestors:X,scrollAdjustedTranslate:jt},I.current={initial:Nr,translated:ge}},[U,ye,Oe,ge,A,Yn,Nr,Ae,O,er,X,jt]),F3e({...Ze,delta:N,draggingRect:ge,pointerCoordinates:Ve,scrollableAncestors:X,scrollableAncestorRects:he});const Al=Mt(()=>({active:U,activeNode:ye,activeNodeRect:Ut,activatorEvent:Q,collisions:Oe,containerNodeRect:Qn,dragOverlay:$r,draggableNodes:A,droppableContainers:O,droppableRects:Ae,over:er,measureDroppableContainers:$e,scrollableAncestors:X,scrollableAncestorRects:he,measuringConfiguration:be,measuringScheduled:ot,windowRect:xe}),[U,ye,Ut,Q,Oe,Qn,$r,A,O,Ae,er,$e,X,he,be,ot,xe]),xo=Mt(()=>({activatorEvent:Q,activators:ji,active:U,activeNodeRect:Ut,ariaDescribedById:{draggable:ne},dispatch:_,draggableNodes:A,over:er,measureDroppableContainers:$e}),[Q,ji,U,Ut,_,ne,A,er,$e]);return Gi.createElement(_z.Provider,{value:E},Gi.createElement(Mv.Provider,{value:xo},Gi.createElement(eDe.Provider,{value:Al},Gi.createElement(Tz.Provider,{value:yi},u)),Gi.createElement(nDe,{disabled:a?.restoreFocus===!1})),Gi.createElement(i3e,{...a,hiddenTextDescribedById:ne}));function Ns(){const Et=V?.autoScrollEnabled===!1,Er=typeof l=="object"?l.enabled===!1:l===!1,Hr=C&&!Et&&!Er;return typeof l=="object"?{...l,enabled:Hr}:{enabled:Hr}}}),aDe=ur(null),D3="button",lDe="Draggable";function Nz(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Pv(lDe),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=It(Mv),{role:p=D3,roleDescription:g="draggable",tabIndex:m=0}=i??{},v=l?.id===t,_=It(v?Tz:aDe),[y,E]=em(),[S,k]=em(),C=H3e(s,t),$=Ah(r);bl(()=>(f.set(t,{id:t,key:o,node:y,activatorNode:S,data:$}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const A=Mt(()=>({role:p,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&p===D3?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[n,p,m,v,g,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:A,isDragging:v,listeners:n?void 0:C,node:y,over:h,setNodeRef:E,setActivatorNodeRef:k,transform:_}}const uDe="Droppable",cDe={timeout:25};function Dz(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Pv(uDe),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=It(Mv),d=Qe({disabled:r}),f=Qe(!1),h=Qe(null),p=Qe(null),{disabled:g,updateMeasurementsFor:m,timeout:v}={...cDe,...i},_=Ah(m??n),y=Qr(()=>{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]),E=Ov({callback:y,disabled:g||!s}),S=Qr((A,N)=>{E&&(N&&(E.unobserve(N),f.current=!1),A&&E.observe(A))},[E]),[k,C]=em(S),$=Ah(t);return Te(()=>{!E||!k.current||(E.disconnect(),f.current=!1,E.observe(k.current))},[k,E]),Te(()=>(a({type:Jr.RegisterDroppable,element:{id:n,key:o,disabled:r,node:k,rect:h,data:$}}),()=>a({type:Jr.UnregisterDroppable,key:o,id:n})),[n]),Te(()=>{r!==d.current.disabled&&(a({type:Jr.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,a]),{active:s,rect:h,isOver:l?.id===n,node:k,over:l,setNodeRef:C}}function Fz(e,t){ae(vs(e.onPointerDown),r=>r(t))}function Iz(e,t){ae(vs(e.onKeyDown),r=>r(t))}function Pz(e){return J(e==null?void 0:Wt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}function Cr(e){return"var("+e+")"}let dDe=w([z("flex"),ee("stretch"),c("gap",Cr(F.md)),c("overflow-x","auto"),c("padding-bottom",Cr(F.sm))]),fy=w([z("flex"),me("column"),c("gap",Cr(F.sm)),c("flex","0 0 240px"),c("padding",Cr(F.sm)),c("background",Cr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Cr(Z.md)),c("min-height","120px")]),fDe=w([c("border-color",Cr(x.brand))]),hDe=w([Qs(.45)]),pDe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",Cr(F.sm)),c("font-size",Cr(T.sizeSm)),c("font-weight",Cr(T.weightMedium)),c("color",Cr(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),F3=w([z("flex"),me("column"),ee("stretch"),c("gap","4px"),c("padding",Cr(F.sm)),c("background",Cr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Cr(Z.sm)),c("text-align","left"),Ee("pointer"),He([c("border-color",Cr(x.brand))])]),gDe=w([Ee("grab")]),mDe=w([Qs(.85),c("z-index","10"),Ee("grabbing")]),vDe=w([c("font-size",Cr(T.sizeSm)),c("font-weight",Cr(T.weightMedium)),c("color",Cr(x.textPrimary))]),_De=w([c("font-size",Cr(T.sizeXs)),c("color",Cr(x.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),bDe=w([c("color",Cr(x.textDisabled)),c("font-size",Cr(T.sizeSm))]);function yDe(e){let t=e.onClick,r=e.draggable,n=e.card,i=Nz({id:n.key,disabled:!r}),o=r?F3+" "+gDe:F3,s=i.isDragging?o+" "+mDe:o,a=Pz(i.transform),l=a!==void 0?{transform:a}:void 0,u=i.listeners,d=u==null?void 0:Wt(u),f=n.meta;return L("div",{children:[b("span",{children:n.title,className:vDe}),f!==void 0?b("span",{children:f,className:_De,title:f}):null],ref:Wt(i.setNodeRef),className:s,role:"button",style:l,tabIndex:0,onKeyDown:h=>ae(d,p=>Iz(p,h)),onClick:h=>ae(t,p=>p(n.key)),onPointerDown:h=>ae(d,p=>Fz(p,h))})}function xDe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,s=Dz({id:i.value,disabled:!o}),a=s.isOver,l=o?a?fy+" "+fDe:fy:fy+" "+hDe;return L("div",{children:[L("div",{children:[b("span",{children:i.label}),b(Sf,{count:i.cards.length,label:""})],className:pDe}),i.cards.length===0?b("span",{children:"—",className:bDe}):i.cards.map(u=>b(yDe,{card:u,draggable:n,onClick:r},u.key))],ref:Wt(s.setNodeRef),className:l})}function SDe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=Le(r),s=o3e(S3(D2,{activationConstraint:{distance:5}}),S3($2,{})),a=ue(()=>{}),l=a[1],u=a[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 g=i.find(v=>v.cards.some(_=>_.key===h.active.id));if(fe(t,!0,v=>v(h.active.id,p.id))&&fe(g,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return b($z,{sensors:Wt(s),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:b("div",{children:i.map(h=>b(xDe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:dDe})})}let EDe=SDe;function ut(e){return"var("+e+")"}let wDe=w([z("flex"),me("column"),c("gap",ut(F.sm))]),kDe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",ut(F.sm))]),I3=w([z("inlineFlex"),ee("center"),c("gap",ut(F.xs))]),vf=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",ut(Z.sm)),c("padding","2px var("+F.sm+")"),c("color",ut(x.textSecondary)),c("font-size",ut(T.sizeSm)),Ee("pointer"),He([c("background",ut(x.surfaceSubtle)),c("color",ut(x.textPrimary))])]),CDe=Rr([vf,w([c("background",ut(x.surfaceSubtle)),c("color",ut(x.textPrimary)),c("font-weight",ut(T.weightMedium))])]),RDe=w([c("font-size",ut(T.sizeMd)),c("font-weight",ut(T.weightMedium)),c("color",ut(x.textPrimary))]),ADe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px")]),TDe=w([c("font-size",ut(T.sizeXs)),c("color",ut(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("padding","2px var("+F.xs+")")]),$De=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px"),c("background",ut(x.borderSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",ut(Z.md)),c("overflow","hidden")]),Oz=w([z("flex"),me("column"),c("gap","2px"),c("min-height","96px"),c("padding","4px"),c("background",ut(x.surface))]),NDe=Rr([Oz,w([c("opacity","0.55")])]),Mz=w([c("font-size",ut(T.sizeXs)),c("color",ut(x.textSecondary))]),DDe=Rr([Mz,w([c("color",ut(x.brand)),c("font-weight",ut(T.weightMedium))])]);function FDe(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",ut(Z.sm)),c("background",ut(x.surfaceSubtle)),c("color",ut(x.textPrimary)),c("font-size",ut(T.sizeXs)),c("padding","1px var("+F.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Ee("pointer"),He([c("background",ut(x.surfaceElevated))])])}let IDe=w([c("background","none"),c("border","none"),c("padding","0"),c("text-align","left"),c("font-size",ut(T.sizeXs)),c("color",ut(x.brand)),Ee("pointer"),He([c("text-decoration","underline")])]);function PDe(e){return w([z("grid"),c("grid-template-columns","repeat("+e.toString()+", 1fr)"),c("gap","1px"),c("background",ut(x.borderSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",ut(Z.md)),c("overflow","hidden")])}let ODe=w([z("flex"),me("column"),c("gap","2px"),c("min-height","200px"),c("padding","4px"),c("background",ut(x.surface))]),MDe=w([c("font-size",ut(T.sizeXs)),c("color",ut(x.textSecondary)),c("padding-bottom","2px"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),LDe=w([z("flex"),gi("wrap"),ee("center"),c("gap",ut(F.md)),c("font-size",ut(T.sizeXs)),c("color",ut(x.textSecondary))]);function zDe(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e),c("margin-right","4px")])}let UDe=w([c("font-size",ut(T.sizeXs)),c("color",ut(x.textDisabled))]),BDe="var("+x.brand+")";function jDe(e){return D(e.end_,e.start)}function P3(e,t){return e.filter(r=>G4(r.start,jDe(r),t)).toSorted((r,n)=>r.start-n.start)}function qDe(e,t){return Q4(e.start)||!W4(e.start,t)?e.title:J4(e.start)+" "+e.title}function VDe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],s=ue(()=>"Month"),a=s[1],l=s[0],u=ue(()=>Vn(D(t,Date.now()))),d=u[1],f=u[0],h=Vn(Date.now()),p=S=>d(k=>{switch(l){case"Month":return K4(k,S);case"Week":return ao(k,S*7|0);case"Day":return ao(k,S)}}),g=(S,k)=>b("button",{children:qDe(S,k),className:FDe(D(S.accent,BDe)),title:S.title,onClick:C=>S.onOpen()},S.key),m=()=>{let S=mpe(f);return L(Br,{children:[b("div",{children:xw.map(k=>b("div",{children:k,className:TDe},k)),className:ADe}),b("div",{children:S.map(k=>{let C=P3(i,k),$=C.slice(0,3),A=C.length-$.length|0;return L("div",{children:[b("span",{children:X4(k).toString(),className:k===h?DDe:Mz}),$.map(N=>g(N,k)),A>0?b("button",{children:"+"+A.toString()+" more",className:IDe,onClick:N=>{d(O=>k),a(O=>"Day")}}):null],className:vpe(k,f)?Oz:NDe},k.toString())}),className:$De})]})},v=S=>b("div",{children:S.map(k=>L("div",{children:[b("div",{children:la(k),className:MDe}),P3(i,k).map(C=>g(C,k))],className:ODe},k.toString())),className:PDe(S.length)}),_;switch(l){case"Month":_=m();break;case"Week":_=v(nl(7,S=>ao(rv(f),S)));break;case"Day":_=v([Vn(f)]);break}let y;switch(l){case"Month":case"Week":y=Xi(f);break;case"Day":y=la(f)+" — "+Xi(f);break}let E=(S,k)=>b("button",{children:k,className:l===S?CDe:vf,onClick:C=>a($=>S)});return L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:vf,onClick:S=>p(-1)}),b("button",{children:"Today",className:vf,onClick:S=>d(k=>h)}),b("button",{children:"›",className:vf,onClick:S=>p(1)}),b("span",{children:y,className:RDe})],className:I3}),L("div",{children:[E("Month","Month"),E("Week","Week"),E("Day","Day")],className:I3})],className:kDe}),o.length!==0?b("div",{children:o.map(S=>L("span",{children:[b("span",{className:zDe(S.accent)}),S.label]},S.label)),className:LDe}):null,_,r!==void 0?b("span",{children:r,className:UDe}):null],className:wDe})}let KDe=VDe;function un(e){return"var("+e+")"}let HDe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),c("gap",un(F.md))]),WDe=w([z("flex"),me("column"),ee("stretch"),c("gap",un(F.sm)),c("padding",un(F.md)),c("background",un(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",un(Z.md)),c("text-align","left"),Ee("pointer"),He([c("border-color",un(x.brand)),c("background",un(x.surfaceSubtle))])]),GDe=w([c("width","100%"),c("height","96px"),c("object-fit","cover"),c("border-radius",un(Z.sm))]),JDe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",un(F.sm))]),QDe=w([c("font-size",un(T.sizeMd)),c("font-weight",un(T.weightMedium)),c("color",un(x.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),YDe=w([z("flex"),ee("baseline"),c("gap",un(F.sm)),c("font-size",un(T.sizeSm))]),XDe=w([c("color",un(x.textSecondary)),c("white-space","nowrap"),pi(0)]),ZDe=w([c("color",un(x.textPrimary)),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis")]),eFe=w([c("color",un(x.textDisabled)),c("font-size",un(T.sizeSm))]);function tFe(e){let t=e.cards;if(t.length===0)return b("span",{children:"(empty)",className:eFe});let r=e.onCardClick;return b("div",{children:t.map(n=>{let i=n.media;return L("button",{children:[i!==void 0?b("img",{className:GDe,alt:n.title,src:i}):null,L("div",{children:[b("span",{children:n.title,className:QDe,title:n.title}),D(n.badge,null)],className:JDe}),n.fields.map(o=>L("div",{children:[b("span",{children:o.label,className:XDe}),b("span",{children:o.value,className:ZDe})],className:YDe},o.label))],className:WDe,onClick:o=>ae(r,s=>s(n.key))},n.key)}),className:HDe})}let rFe=tFe;function nFe(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 iFe(e,t,r){return nFe(qo(e,t),r).map(n=>{let i=n[0];return{key:i,label:mt(i),state:n[1]}})}function po(e){return"var("+e+")"}let oFe=w([z("flex"),ee("flexStart"),c("gap","0"),c("width","100%")]),sFe=w([z("flex"),me("column"),ee("center"),c("gap","4px"),c("flex","0 0 auto")]);function aFe(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",po(e?x.brand:x.borderSubtle))])}let F2=[z("inlineFlex"),ee("center"),Ye("center"),c("width","24px"),c("height","24px"),c("border-radius","50%"),c("font-size",po(T.sizeXs)),c("font-weight",po(T.weightMedium)),c("box-sizing","border-box")],lFe=w(F2.concat([c("background",po(x.brand)),c("color","#fff")])),uFe=w(F2.concat([c("background",po(x.surface)),c("color",po(x.brand)),c("border","2px solid var("+x.brand+")")])),cFe=w(F2.concat([c("background",po(x.surface)),c("color",po(x.textDisabled)),c("border","1px solid var("+x.border+")")])),Lz=[c("font-size",po(T.sizeXs)),c("text-align","center"),c("max-width","96px")],dFe=w(Lz.concat([c("color",po(x.textPrimary))])),fFe=w(Lz.concat([c("color",po(x.textDisabled))])),hFe=w([c("display","none")]);function pFe(e){switch(e){case"Done":return lFe;case"Current":return uFe;case"Upcoming":return cFe}}function gFe(e){switch(e){case"Done":case"Current":return dFe;case"Upcoming":return fFe}}function mFe(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function vFe(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:aFe(n.state==="Done"||n.state==="Current")},n.key+":c"),s=r?hFe:gFe(n.state);return L(Tx,{children:[o,L("div",{children:[b("span",{children:mFe(n.state,i),className:pFe(n.state)}),b("span",{children:n.label,className:s})],className:sFe,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:oFe,role:"list"})}let zz=vFe;function Uz(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 _Fe(e){if(typeof e=="object")return mt(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function bFe(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 yFe(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function xFe(e){if(typeof e=="object")return"var("+x.border+")";switch(e){case"Approved":return"var("+x.success+")";case"Rejected":return"var("+x.error+")";case"Pending":return"var("+x.info+")";case"Skipped":return"var("+x.border+")"}}function _n(e){return"var("+e+")"}let SFe=w([z("flex"),me("column"),c("gap",_n(F.md)),c("font-family",_n(T.fontFamily))]),EFe=w([z("flex"),me("column")]),wFe=w([z("flex"),ee("stretch"),c("gap",_n(F.sm))]),kFe=w([z("flex"),me("column"),ee("center"),c("flex","0 0 22px")]);function CFe(e){return w([z("inlineFlex"),ee("center"),Ye("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",_n(x.surface)),c("font-size","11px"),c("line-height","1"),c("flex","0 0 auto")])}let RFe=w([c("flex","1 1 auto"),c("width","1px"),c("min-height","12px"),c("background",_n(x.borderSubtle))]),O3=w([z("flex"),me("column"),c("gap","2px"),c("flex","1 1 auto"),c("min-width","0"),c("padding-bottom",_n(F.sm))]),AFe=w([Ee("pointer"),He([c("background",_n(x.surfaceSubtle))]),c("border-radius",_n(Z.sm)),c("padding-left","4px"),c("margin-left","-4px")]),TFe=w([z("flex"),ee("center"),gi("wrap"),c("gap",_n(F.xs))]),$Fe=w([c("font-size",_n(T.sizeSm)),c("font-weight",_n(T.weightMedium)),c("color",_n(x.textPrimary))]),NFe=w([z("flex"),ee("center"),c("gap","6px"),c("font-size",_n(T.sizeXs)),c("color",_n(x.textSecondary))]),DFe=w([c("font-size",_n(T.sizeSm)),c("color",_n(x.textSecondary)),c("white-space","pre-wrap")]),FFe=w([c("font-size",_n(T.sizeXs)),c("color",_n(x.textDisabled))]);function IFe(e){let t=e.entries;if(t.length===0)return b(ld,{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(zz,{steps:i}):null,b("div",{children:t.map((s,a)=>{let l=Le(s.onOpen),u=s.actor,d=s.at,f,h=0;u!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[u!==void 0?L(Br,{children:[b(ud,{name:u,src:s.actorImageUrl,size:"Small"}),b("span",{children:u})]}):null,d!==void 0?b("span",{children:nv(D(n,Date.now()),d),title:D(qx(d),d)}):null],className:NFe}));let p=s.note;return L("div",{children:[L("div",{children:[b("span",{children:yFe(s.decision),className:CFe(xFe(s.decision))}),a===o?null:b("div",{className:RFe})],className:kFe}),L("div",{children:[L("div",{children:[b("span",{children:s.step,className:$Fe}),b(ra,{variant:bFe(s.decision),label:_Fe(s.decision)})],className:TFe}),f,p!==void 0&&p!==""?b("div",{children:p,className:DFe}):null],className:l?O3+" "+AFe:O3,onClick:g=>ae(s.onOpen,m=>m())})],className:wFe},s.key)}),className:EFe}),r!==void 0?b("span",{children:r,className:FFe}):null],className:SFe})}let PFe=IFe;function Oo(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let OFe=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],MFe=["decision","outcome","verdict","approval","approvalstatus","result"],LFe=["step","stage","level","tier","approvalstep","approvallevel","phase"],zFe=["note","notes","comment","comments","reason","remarks","justification","rationale"];function UFe(e){let t=cd(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function BFe(e){return e.filter(t=>OFe.includes(Oo(t))).length>=2}function Bz(e){return oe(Xr(e),t=>{let r=t[1],n=t[0];if(km(r))return J(UFe(r),i=>[n,i])})}function jFe(e){let t=Bz(e),r=t.find(n=>MFe.includes(Oo(n[0])));return r!==void 0?r:t.find(n=>BFe(n[1]))}function qFe(e,t){let r=Xr(e).map(n=>n[0]).find(n=>fe(M(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:Xr(e).map(n=>n[0]).find(n=>fe(Xc(n),!1,ZF))}function jz(e,t){let r=D(t,jr(e,void 0,void 0)),n=jFe(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],s=Bz(e).find(a=>{let l=a[0];return l!==o?LFe.includes(Oo(l)):!1});return{decisionField:o,dateField:i.startField,stepField:J(s,a=>a[0]),stepValues:fe(s,[],a=>a[1]),actorField:qFe(e,r),noteField:oe(Xr(e),a=>{let l=a[0];if(km(a[1])&&zFe.includes(Oo(l)))return l})[0]}}function VFe(e){return Le(jz(e,void 0))}function I2(e){return e.rows.map((t,r)=>{let n=D(Y(t),{});return{key:D(R(M(n,"id"),de),"#"+r.toString()),json:t,dict:n}})}function js(e,t){return R(M(e,t),de)}function M3(e,t){return R(js(e,t),zi)}function L3(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>Oo(n)===Oo(t));return r!==-1?r:e.length}function KFe(e,t,r){let n=r!==void 0?r:f=>f,s=I2(e).map(f=>{let h=R(t.stepField,g=>js(f.dict,g)),p=js(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?s.sort((f,h)=>L3(t.stepValues,f[1])-L3(t.stepValues,h[1])|0):s.sort((f,h)=>{let p=M3(f[0].dict,t.dateField),g=M3(h[0].dict,t.dateField);return p!==void 0?g!==void 0?p-g:-1:g!==void 0?1:0});let l=s.map(f=>{let h=f[0];return{key:h.key,step:D(J(f[1],mt),D(R(e.semantics.labelField,p=>js(h.dict,p)),"Decision")),decision:fe(f[2],"Pending",Uz),actor:J(R(t.actorField,p=>js(h.dict,p)),n),at:js(h.dict,t.dateField),note:R(t.noteField,p=>js(h.dict,p)),onOpen:()=>e.onOpenRow(h.key,h.json)}}),u=oe(s,f=>J(f[1],Oo)),d=t.stepValues.filter(f=>!u.includes(Oo(f))).map(f=>({key:"pending:"+f,step:mt(f),decision:"Pending"}));return l.concat(d)}function HFe(e,t){let r=t.stepField;if(r===void 0)return[];let n=I2(e),i=oe(n,s=>{let a=js(s.dict,r),l=js(s.dict,t.decisionField);if(a===void 0||l===void 0)return;let u=Uz(l);if(!(typeof u!="object"&&u==="Pending"))return Oo(a)}),o=t.stepValues.find(s=>!i.includes(Oo(s)));return t.stepValues.map(s=>({key:s,label:mt(s),state:i.includes(Oo(s))?"Done":We(o,s)?"Current":"Upcoming"}))}function Sa(e){return e.rows.map((t,r)=>{let n=D(Y(t),{});return{key:D(R(M(n,"id"),de),"#"+r.toString()),json:t,dict:n}})}function go(e,t){return R(M(e,t),de)}function ju(e,t){return D(R(e.semantics.labelField,r=>go(t.dict,r)),t.key)}function qz(e,t,r){ae(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function Vz(e,t,r){return b("span",{children:Zh(e,t,r!==void 0?r:"item"),style:{color:"var("+x.textDisabled+")",fontSize:"var("+T.sizeXs+")"}})}function Lv(e,t,r,n){return L("div",{children:[e,Vz(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+F.sm+")"}})}function WFe(e){let t=e.source,r=ws(),n=hm(),i=Sa(t),o=To(t.schema,"List"),s=Xh(i.map(p=>p.dict),o,r),u={lookupLabel:(p,g)=>Yh(s,p,r,g),isMissing:(p,g)=>Ym(s,p,r,g)},d=oe([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField,"id"],p=>p),f=o.filter(p=>!d.includes(p.key)).slice(0,4),h=i.map(p=>{let g=J(R(t.semantics.statusField,v=>Go(p.dict,v)),v=>b(ra,{variant:"Neutral",label:mt(v),dot:!1})),m=R(t.semantics.imageField,v=>go(p.dict,v));return{key:p.key,title:ju(t,p),media:m,badge:g,fields:f.map(v=>({label:v.label,value:Yl(v.key,v.kind,v.propSchema,M(p.dict,v.key),v.ann,r,n,u,void 0)}))}});return Lv(b(rFe,{cards:h,onCardClick:p=>qz(t,i,p)}),[t],void 0,void 0)}function GFe(e){let t=Sa(e),r=D(e.semantics.statusField,""),n=qo(e.schema,r),i=a=>D(Go(a.dict,r),""),o=a=>a.map(l=>({value:l,label:l===""?"(no status)":mt(l),cards:t.filter(u=>i(u)===l).map(u=>{let d=oe(wm(e.schema),f=>{if(f!==r)return go(u.dict,f)})[0];return{key:u.key,title:ju(e,u),meta:d}})})),s=it(t.map(i).filter(a=>!n.includes(a)),[],(a,l)=>a.includes(l)?a:a.concat([l]));return o(n).concat(o(s))}function JFe(e){let t=e.source,r=Sa(t),n=D(t.semantics.statusField,""),i=GFe(t),o=f=>D(R(r.find(h=>h.key===f),h=>Go(h.dict,n)),""),s=(f,h)=>R(t.statusCommandFor,p=>p(o(f),h)),a=t.onCommand,l=a!==void 0&&Le(t.statusCommandFor)?(f,h)=>ae(s(f,h),p=>a(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>Le(s(f,h)):void 0;return Lv(b(EDe,{columns:i,onCardClick:f=>qz(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let id=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function P2(e,t){return D(e.accent,id[Lo(t,id.length)])}function QFe(e){return e.map((t,r)=>{let n=P2(t,r),i=t.semantics.dateSpan;return i!==void 0?oe(Sa(t),o=>J(R(go(o.dict,i.startField),zi),s=>{let a=R(R(i.endField,l=>go(o.dict,l)),zi);return{key:r.toString()+":"+o.key,title:ju(t,o),start:s,end_:a,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function YFe(e){let t=e.sources,r=QFe(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:P2(i,o)})):[];return b(KDe,{events:r,legend:n,windowNote:Zh(t,void 0,void 0)})}function XFe(e){return e.map((r,n)=>{let i=J(r.semantics.dateSpan,s=>s.startField),o=P2(r,n);return Sa(r).map(s=>{let a=R(i,f=>go(s.dict,f)),l=R(a,zi),u=a!==void 0?D(qx(a),a):"",d=J(R(r.semantics.statusField,f=>Go(s.dict,f)),mt);return{entry:{id:n.toString()+":"+s.key,timestamp:u,label:ju(r,s),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(s.key,s.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 ZFe(e){let t=e.sources,r=XFe(t),n=i=>ae(r.find(o=>o.entry.id===i),o=>o.open_());return Lv(b(K$e,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function Kz(e,t){let r=M(e,t);if(r===void 0)return[];let n=de(r);return n!==void 0?[n]:oe(D(mr(r),[]),de)}function eIe(e,t){let r=t.map(n=>n.key);return oe(Xr(e.schema),n=>{let i=n[0];return J(Xc(i),o=>i)}).filter(n=>t.some(i=>Kz(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function tIe(e){let t=Sa(e),r=eIe(e,t),n=e.semantics.dateSpan,i=J(n,s=>s.startField),o=R(n,s=>s.endField);return i!==void 0?o!==void 0?oe(t,s=>J(R(go(s.dict,i),zi),a=>{let l=D(R(go(s.dict,o),zi),a);return{key:s.key,title:ju(e,s),start:a,end_:l<a?a:l,accent:e.accent,dependsOn:r.map(u=>Kz(s.dict,u)).flat(),onOpen:()=>e.onOpenRow(s.key,s.json)}})):[]:[]}function rIe(e){let t=e.source,r=tIe(t),n=t.rows.length,i=r.length,o=Zh([t],i,void 0),s=i===n?o:o+" (the rest carry no start date)";return b(wNe,{tasks:r,windowNote:s})}function nIe(e,t){let r=e.semantics.labelField,n=R(e.semantics.statusField,i=>go(t.dict,i));return n!==void 0?n:R(wm(e.schema).find(i=>qf(i,r)?qf(i,e.semantics.parentField):!1),i=>go(t.dict,i))}function iIe(e){let t=Sa(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:ju(e,n),subtitle:nIe(e,n),parent:R(r,i=>go(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function oIe(e){let t=e.source,r=iIe(t);return b(P$e,{nodes:r,windowNote:Zh([t],void 0,void 0)})}function sIe(e){let t=e.source,r=ws(),n=I2(t),i=To(t.schema,"List"),o=Xh(n.map(d=>d.dict),i,r),s=jz(t.schema,t.semantics);if(s===void 0)return null;let l=KFe(t,s,d=>{let f=R(s.actorField,Xc);return f!==void 0?D(Yh(o,f,r,d),d):d}),u=HFe(t,s);return b(PFe,{entries:l,steps:u,windowNote:Zh([t],void 0,"decision")})}function aIe(e){return oe(Xr(e),t=>{let r=cd(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function Hz(e){let t=aIe(e),r=jr(e,void 0,void 0).statusField,n=r!==void 0&&t.some(s=>s[0]===r)?t.filter(s=>s[0]===r).concat(t.filter(s=>s[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function lIe(e){return J(Hz(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],s=o[1],a=o[0],l=Sa(e),u=(_,y)=>D(Go(_.dict,y),""),d=(_,y)=>it(l.map(E=>u(E,_)).filter(E=>!y.includes(E)),[],(E,S)=>E.includes(S)?E:E.concat([S])),f=s.concat(d(a,s)),h=n.concat(d(i,n)),p=f.map(_=>h.map(y=>it(l,0,(E,S)=>u(S,a)===_&&u(S,i)===y?E+1|0:E))),g=p.map(_=>it(_,0,(y,E)=>y+E|0)),m=h.map((_,y)=>it(p,0,(E,S)=>E+S[y]|0)),v=it(g,0,(_,y)=>_+y|0);return{rowField:a,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:g,colTotals:m,grandTotal:v}})}function uIe(e,t){return jF(e.toString(),PV(t))}function cIe(e){let t=e.source,r=ue(()=>"Numbers"),n=r[1],i=r[0],o=lIe(t);if(o===void 0)return null;let s=m=>m===""?"(none)":mt(m),a=mt(o.rowField),l=mt(o.colField),u=o.rowValues.map(m=>[m,s(m)]),d=o.colValues.map(m=>[m,s(m)]),f=it(o.counts,0,(m,v)=>it(v,m,(_,y)=>y>_?y:_)),h=m=>uIe(m,rE([t])),p=(m,v)=>b("button",{children:v,style:{background:"none",backgroundColor:i===m?"var("+x.surfaceSubtle+")":"transparent",border:"1px solid var("+x.border+")",color:i===m?"var("+x.textPrimary+")":"var("+x.textSecondary+")",cursor:"pointer",fontSize:"var("+T.sizeSm+")",padding:"2px var("+F.sm+")",borderRadius:"var("+Z.sm+")"},type:"button",onClick:_=>n(y=>m)}),g;return g=i==="Numbers"?b(FNe,{rowDimLabel:a,colDimLabel:l,rowHeaders:u.map(m=>({value:m[0],label:m[1]})),colHeaders:d.map(m=>({value:m[0],label:m[1]})),cells:o.counts.map(m=>m.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):b(h$e,{rowDimLabel:a,colDimLabel:l,rowHeaders:u.map(m=>({value:m[0],label:m[1]})),colHeaders:d.map(m=>({value:m[0],label:m[1]})),cells:o.counts.map(m=>m.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("+F.xs+")"}}),g,Vz([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+F.sm+")"}})}function dIe(e){return e.map((t,r)=>{let n=t.semantics.imageField;return Sa(t).map(i=>{let o=R(R(n,u=>go(i.dict,u)),u=>{if(u!=="")return Uc(u)}),s=J(R(t.semantics.statusField,u=>Go(i.dict,u)),mt),a=t.fillSlot,l=o!==void 0||a===void 0||n===void 0?void 0:a(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:ju(t,i),caption:s,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function fIe(e){let t=e.sources,r=dIe(t),n=i=>ae(r.find(o=>o.item.key===i),o=>o.open_());return Lv(b(KNe,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function Ea(e){return b("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function Ld(e,t){let r=e[0];return r!==void 0?t(r):null}Wo({id:"cards",label:"Cards",icon:Ea("▤"),arity:"Single",isCapable:e=>!0,render:e=>Ld(e,t=>b(WFe,{source:t})),capability:"always — richer with label/image semantics and summary fields"});Wo({id:"board",label:"Board",icon:Ea("▥"),arity:"Single",isCapable:e=>{let t=jr(e,void 0,void 0);return fe(t.statusField,!1,r=>qo(e,r).length!==0)},render:e=>Ld(e,t=>b(JFe,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});Wo({id:"calendar",label:"Calendar",icon:Ea("▣"),arity:{TAG:"Multi",min:1},isCapable:e=>Le(jr(e,void 0,void 0).dateSpan),render:e=>b(YFe,{sources:e}),capability:"dateSpan — a start*/end* date-time pair or a lone non-infrastructure date field"});Wo({id:"timeline",label:"Timeline",icon:Ea("▚"),arity:{TAG:"Multi",min:2},isCapable:e=>Le(jr(e,void 0,void 0).dateSpan),render:e=>b(ZFe,{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"});Wo({id:"gantt",label:"Gantt",icon:Ea("▬"),arity:"Single",isCapable:e=>Le(R(jr(e,void 0,void 0).dateSpan,t=>t.endField)),render:e=>Ld(e,t=>b(rIe,{source:t})),capability:"dateSpan with a declared end field — a start*/end* date-time pair; dependency connectors come from entity-ref fields whose ids point at other loaded rows"});Wo({id:"hierarchy",label:"Hierarchy",icon:Ea("⑂"),arity:"Single",isCapable:e=>Le(jr(e,void 0,void 0).parentField),render:e=>Ld(e,t=>b(oIe,{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"});Wo({id:"approvals",label:"Approvals",icon:Ea("✓"),arity:"Single",isCapable:VFe,render:e=>Ld(e,t=>b(sIe,{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"});Wo({id:"pivot",label:"Pivot",icon:Ea("⊞"),arity:"Single",isCapable:e=>Le(Hz(e)),render:e=>Ld(e,t=>b(cIe,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});Wo({id:"gallery",label:"Gallery",icon:Ea("▨"),arity:"Single",isCapable:e=>Le(jr(e,void 0,void 0).imageField),render:e=>b(fIe,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function z3(e,t){return e===t?0:e<t?-1:1}function hIe(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=rt(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 oe(r._0,de).join(", ");break}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function pIe(e,t,r){let n=s=>s!==void 0?rt(s)==="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 s=u=>{if(u===void 0)return 0;let d=rt(u);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return s(t)-s(r);case"KDate":return z3(_f(e,t),_f(e,r));case"KNumber":let a=D(R(t,_s),0),l=D(R(r,_s),0);return a-l}return z3(_f(e,t),_f(e,r))}function gIe(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?fe(R(t,de),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=J(t,rt);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 mIe(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 vIe(e,t,r){let n=Ge(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let s=o[0],a=t.find(l=>l.key===s);return a!==void 0?gIe(a.kind,M(i,s),o[1]):!0}))}function _Ie(e,t,r){return r===""?e:e.filter(n=>mIe(n,t,r))}function bIe(e,t,r,n){if(r===void 0)return e;let i=t.find(s=>s.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((s,a)=>pIe(i.kind,M(s,r),M(a,r))*o)}function yIe(e,t){return oe(e,r=>{if(!Cne(r.kind))return;let n=hIe(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:D(M(t,r.key),"")}})}function Ro(e){return"var("+e+")"}let xIe=w([Pt("relative"),z("inlineFlex"),ee("center")]),SIe=w([c("background",Ro(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Ro(Z.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("padding-left","32px"),c("font-size",Ro(T.sizeMd)),c("color",Ro(x.textPrimary)),c("outline","none"),c("width","240px"),fa([c("border-color",Ro(x.brand))]),oV([c("color",Ro(x.textDisabled))])]),EIe=w([Pt("absolute"),ad(Re(10)),c("color",Ro(x.textDisabled)),c("font-size",Ro(T.sizeSm)),c("pointer-events","none")]),wIe=w([Pt("absolute"),xl(Re(8)),c("background","none"),c("border","none"),c("cursor","pointer"),c("color",Ro(x.textDisabled)),c("font-size",Ro(T.sizeSm)),c("padding","0"),c("line-height","1"),He([c("color",Ro(x.textSecondary))])]);function kIe(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:EIe}),b("input",{className:SIe,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?b("button",{children:"x",className:wIe,onClick:o=>r("")}):null],className:xIe})}let Wz=kIe;function za(e){return"var("+e+")"}let CIe=w([z("flex"),ee("center"),c("gap",za(F.sm)),gi("wrap")]),RIe=w([z("flex"),ee("center"),c("gap","4px")]),AIe=w([c("color",za(x.textSecondary)),c("font-size",za(T.sizeSm)),c("white-space","nowrap")]),TIe=w([c("background",za(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",za(Z.sm)),c("padding","2px var("+F.sm+")"),c("font-size",za(T.sizeSm)),c("color",za(x.textPrimary)),c("cursor","pointer"),c("outline","none"),fa([c("border-color",za(x.brand))])]);function $Ie(e){let t=e.onChange,r=e.filter;return L("div",{children:[b("span",{children:r.label+":",className:AIe}),L("select",{children:[b("option",{children:"All",value:""}),r.options.map(n=>b("option",{children:n.label,value:n.value},n.value))],className:TIe,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:RIe})}function NIe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?b(Wz,{value:r,onChange:t}):null,e.filters.map(i=>b($Ie,{filter:i,onChange:n},i.key))],className:CIe})}let Gz=NIe;function ls(e){return"var("+e+")"}function Jz(e){switch(e){case"Success":return x.success;case"Warning":return x.warning;case"Error":return x.error;case"Info":return x.info}}function DIe(e){return w([z("flex"),ee("flexStart"),c("gap",ls(F.sm)),c("padding","var("+F.sm+") var("+F.md+")"),c("border-radius",ls(Z.md)),c("border-left","3px solid var("+Jz(e)+")"),c("background",ls(x.surfaceElevated)),c("font-size",ls(T.sizeMd)),c("line-height",ls(T.lineHeightNormal))])}function FIe(e){return w([c("color",ls(Jz(e))),c("font-size","16px"),pi(0),Es(Re(1))])}let IIe=w([mo(1)]),PIe=w([c("font-weight",ls(T.weightMedium)),c("color",ls(x.textPrimary)),Em(Re(2))]),OIe=w([c("color",ls(x.textSecondary))]),MIe=w([c("background","none"),sV(Re(0),"none",dV),Ee("pointer"),c("color",ls(x.textSecondary)),c("font-size","16px"),c("line-height","1"),c("padding","0"),pi(0)]);function LIe(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function zIe(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[b("span",{children:LIe(r),className:FIe(r)}),L("div",{children:[fe(e.title,null,n=>b("div",{children:n,className:PIe})),b("div",{children:e.message,className:OIe})],className:IIe}),fe(e.onDismiss,null,n=>b("button",{children:"×","aria-label":"Dismiss",className:MIe,onClick:i=>n()}))],className:DIe(r),role:"alert"})}let Qz=zIe;function O2(){let e=ue(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(a=>{});let s=o._0;t(a=>s)};return{element:r!==void 0?b(Qz,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function U3(e){try{return decodeURIComponent(e)}catch{return e}}function UIe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function B3(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[U3(r),U3(n)]}function Ti(e){return"var("+e+")"}let BIe=w([z("flex"),me("column"),ee("center"),Ye("center"),c("gap",Ti(F.md)),mo(1),c("min-height","160px"),ca("center"),c("padding",Ti(F.lg))]),jIe=w([c("font-size","32px"),c("color",Ti(x.error)),c("line-height","1")]),qIe=w([c("color",Ti(x.textPrimary)),c("font-size",Ti(T.sizeLg)),c("font-weight",Ti(T.weightMedium)),yn(Re(0))]),VIe=w([c("color",Ti(x.textSecondary)),c("font-size",Ti(T.sizeSm)),c("line-height",Ti(T.lineHeightNormal)),yn(Re(0))]),KIe=w([c("background",Ti(x.brand)),c("color",Ti(x.textOnBrand)),c("border","none"),c("border-radius",Ti(Z.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",Ti(T.sizeSm)),c("cursor","pointer"),Es(Re(4))]);function HIe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[b("div",{children:"X",className:jIe}),b("h3",{children:r,className:qIe}),fe(e.detail,null,n=>b("p",{children:n,className:VIe})),fe(e.onRetry,null,n=>b("button",{children:"Try again",className:KIe,onClick:i=>n()}))],className:BIe})}let Ua=HIe,WIe=dt([["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 GIe(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function j3(e,t){return fe(R(Y(e),r=>M(r,t)),[],r=>{let n=rt(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return oe(n._0,de).filter(o=>o!=="");default:return[]}})}function JIe(e){return R(e,t=>{try{return JSON.parse(t)}catch{return}})}function q3(e,t){return it(Ge(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function QIe(e,t,r,n){let i=ha(t,r);if(i===void 0)return Promise.resolve(n);let o=i.queryField,s=i.labelField,a=s==="id"?"id":"id "+s,l="query($ids: [ID!]) { "+o+"(first: "+n.length.toString()+", filter: {ids: $ids}) { edges { node { "+a+" } } } }",u={};return u.ids=n.map(d=>d),Vt(e(l,u).then(d=>{let f=NM(d,o,s);return Promise.resolve(n.map(h=>{let p=M(f,h);return p!==void 0?p:h}))}),d=>Promise.resolve(n))}function gp(e,t,r,n){let i=GIe(r,n);if(r===void 0)return Promise.resolve(i);let o=M(WIe,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let s=JIe(n);if(s===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(u=>{let d=u.field,f=j3(s,d);return f.length===0?Promise.resolve([d,""]):QIe(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(q3(o.template,d))})}let a={};return o.idFields.forEach(l=>{let u=l.field,d=j3(s,u);a[u]=d.join(", ")}),Promise.resolve(q3(o.template,a))}let YIe="The request failed — the change was not sent.",V3="This command could not be sent. See the console for details.";function XIe(e,t,r){let n={};return Ge(D(Y(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[D(e.aggregateIdField,"id")]=t,n}function M2(e,t,r,n,i,o,s,a){let l=o!==void 0?o:[],u=s!==void 0?s:h=>{},d=a!==void 0?a:h=>{},f=t.filter(h=>h.level==="Instance");return(h,p,g)=>{let m=f.find(v=>v.name===h);if(e!==void 0)if(m!==void 0){d(p),Vt(e(m.mutationDocument,XIe(m,p,g)).then(v=>{let _=Ad(v);if(typeof _!="object")return _==="Accepted"?(n||i(),u("Cleared"),Promise.resolve()):(n||setTimeout(()=>i(),500),u("Cleared"),Promise.resolve());{let y=_._0;return console.warn("[AutoUI] "+r+": command "+h+" rejected"+fe(y.errorCode,"",E=>" ("+E+")")),i(),gp(e,l,y.errorCode,y.detail).then(E=>(u({TAG:"Failed",_0:{command:m.label,reason:E}}),Promise.resolve()))}}),v=>(console.error("[AutoUI] "+r+": command "+h+" failed to reach the server"),u({TAG:"Failed",_0:{command:m.label,reason:YIe}}),i(),Promise.resolve()));return}else return console.error("[AutoUI] "+r+': command "'+h+'" is not an instance command of this view'),u({TAG:"Failed",_0:{command:h,reason:V3}});else return console.error("[AutoUI] "+r+': command "'+h+'" not sent — no GraphQL executor in context'),u({TAG:"Failed",_0:{command:h,reason:V3}})}}let ZIe=500;function Zi(e){return"var("+e+")"}let ePe=w([Pt("relative"),z("inlineBlock")]),tPe=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Zi(Z.sm)),c("cursor","pointer"),c("color",Zi(x.textSecondary)),c("padding","2px var("+F.sm+")"),c("font-size",Zi(T.sizeSm)),He([c("background",Zi(x.surfaceSubtle)),c("color",Zi(x.textPrimary))])]),rPe=w([Pt("absolute"),xl(Re(0)),da({NAME:"percent",VAL:100}),Es(Re(4)),c("background",Zi(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",Zi(Z.md)),c("box-shadow",Zi(mn.md)),c("min-width","160px"),c("z-index","200"),c("overflow","hidden"),nV(Re(4),Re(0))]);function nPe(e){return w([z("block"),jo({NAME:"percent",VAL:100}),c("background","none"),c("border","none"),c("text-align","left"),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",Zi(T.sizeMd)),c("color",Zi(e?x.error:x.textPrimary)),Ee("pointer"),He([c("background",Zi(x.surfaceSubtle))])])}let iPe=w([c("border","none"),c("border-top","1px solid var("+x.borderSubtle+")"),Yq(Re(4),Re(0))]);function oPe(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=ue(()=>!1),i=n[1],o=n[0];return Te(()=>{if(!o)return;let s=a=>i(l=>!1);return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[o]),L("div",{children:[b("button",{children:r,className:tPe,onClick:s=>{s.stopPropagation(),i(a=>!a)}}),o?b("div",{children:e.items.map((s,a)=>{if(typeof s!="object")return b("hr",{className:iPe},a.toString());let l=s.onClick,u=s.label;return b("button",{children:u,className:nPe(s.danger),onClick:d=>{i(f=>!1),l()}},u)}),className:rPe,onClick:s=>{s.stopPropagation()}}):null],className:ePe})}let sPe=oPe;function px(e){return"var("+e+")"}let aPe=w([z("grid"),c("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),c("gap",px(F.lg)),c("align-items","start"),MF("(max-width: 720px)",[c("grid-template-columns","minmax(0, 1fr)")])]),Yz=w([c("min-width","0"),c("overflow","auto")]),lPe=Rr([Yz,w([c("border-left","1px solid var("+x.border+")"),c("padding-left",px(F.lg)),MF("(max-width: 720px)",[c("border-left","none"),c("padding-left","0"),c("border-top","1px solid var("+x.border+")"),c("padding-top",px(F.lg))])])]);function uPe(e){return L("div",{children:[b("div",{children:e.master,className:Yz}),b("div",{children:e.detail,className:lPe})],className:aPe})}let cPe=uPe;function $h(e){return"var("+e+")"}let dPe=w([z("flex"),me("column"),ee("center"),Ye("center"),c("gap",$h(F.md)),mo(1),c("min-height","160px"),c("color",$h(x.textSecondary))]),fPe=w([c("width","32px"),c("height","32px"),c("border","3px solid var("+x.borderSubtle+")"),c("border-top-color",$h(x.brand)),c("border-radius","50%"),c("animation","rv-spin 0.7s linear infinite")]),hPe=w([c("font-size",$h(T.sizeSm)),c("color",$h(x.textSecondary))]);fV("@keyframes rv-spin",[br("from",[c("transform","rotate(0deg)")]),br("to",[c("transform","rotate(360deg)")])]);function pPe(e){return L("div",{children:[b("div",{className:fPe}),fe(e.label,null,t=>b("span",{children:t,className:hPe}))],className:dPe})}let zf=pPe;function gPe(e,t){return D(R(M(e,t),de),"")}function mPe(e,t,r){let n={},i=[];e.forEach(s=>{let a=gPe(s,t),l=M(n,a);l!==void 0?l.push(s):(n[a]=[s],i.push(a))});let o=s=>{if(s==="")return r.length+1|0;let a=r.indexOf(s);return a!==-1?a:r.length};return i.toSorted((s,a)=>{let l=o(s),u=o(a);return l!==u?l-u|0:s<a?-1:s>a?1:0}).map(s=>[s,D(M(n,s),[])])}function Ct(e){return"var("+e+")"}let Xz="168px",vPe=w([z("flex"),me("column"),c("gap",Ct(F.sm))]),_Pe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",Ct(F.sm))]),K3=w([z("inlineFlex"),ee("center"),c("gap",Ct(F.xs))]),bf=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Ct(Z.sm)),c("padding","2px var("+F.sm+")"),c("color",Ct(x.textSecondary)),c("font-size",Ct(T.sizeSm)),Ee("pointer"),He([c("background",Ct(x.surfaceSubtle)),c("color",Ct(x.textPrimary))])]),bPe=Rr([bf,w([c("background",Ct(x.surfaceSubtle)),c("color",Ct(x.textPrimary)),c("font-weight",Ct(T.weightMedium))])]),yPe=w([c("font-size",Ct(T.sizeMd)),c("font-weight",Ct(T.weightMedium)),c("color",Ct(x.textPrimary))]),xPe=w([c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Ct(Z.md)),c("overflow","hidden")]),Zz=w([z("flex"),ee("stretch")]),SPe=Rr([Zz,w([c("background",Ct(x.surfaceSubtle)),c("border-bottom","1px solid var("+x.borderSubtle+")")])]),EPe=Rr([Zz,w([c("border-top","1px solid var("+x.borderSubtle+")")])]),wPe=w([c("flex","0 0 "+Xz),c("padding","4px var("+F.sm+")"),c("font-size",Ct(T.sizeXs)),c("color",Ct(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),e9=w([c("flex","0 0 "+Xz),c("padding","6px var("+F.sm+")"),c("font-size",Ct(T.sizeSm)),c("font-weight",Ct(T.weightMedium)),c("color",Ct(x.textPrimary)),c("border-right","1px solid var("+x.borderSubtle+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),kPe=Rr([e9,w([c("color",Ct(x.textDisabled)),c("font-style","italic")])]);function gx(e){return w([z("grid"),c("flex","1 1 auto"),c("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let CPe=w([c("background",Ct(x.surfaceSubtle))]),RPe=w([c("padding","4px var("+F.xs+")"),c("font-size",Ct(T.sizeXs)),c("color",Ct(x.textSecondary)),c("border-left","1px solid var("+x.borderSubtle+")")]),t9=w([z("flex"),me("column"),c("gap","2px"),c("min-height","48px"),c("padding","3px"),c("border-left","1px solid var("+x.borderSubtle+")")]),APe=Rr([t9,w([c("background",Ct(x.surfaceSubtle))])]);function H3(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",Ct(Z.sm)),c("background",Ct(x.surfaceSubtle)),c("color",Ct(x.textPrimary)),c("font-size",Ct(T.sizeXs)),c("padding","1px var("+F.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Ee("pointer"),He([c("background",Ct(x.surfaceElevated))])])}let TPe=w([Ee("grab")]),$Pe=w([Qs(.85),c("z-index","10"),Ee("grabbing")]),NPe=w([c("font-size",Ct(T.sizeXs)),c("color",Ct(x.textDisabled))]),W3="var("+x.brand+")";function DPe(e){return D(e.end_,e.start)}function FPe(e,t){return e.filter(r=>G4(r.start,DPe(r),t)).toSorted((r,n)=>r.start-n.start)}function IPe(e,t){return Q4(e.start)||!W4(e.start,t)?e.title:J4(e.start)+" "+e.title}function PPe(e){let t=e.draggable,r=e.event,n=Nz({id:r.key,disabled:!t}),i=t?H3(D(r.accent,W3))+" "+TPe:H3(D(r.accent,W3)),o=n.isDragging?i+" "+$Pe:i,s=J(Pz(n.transform),u=>({transform:u})),a=n.listeners,l=a==null?void 0:Wt(a);return b("button",{children:IPe(r,e.day),ref:Wt(n.setNodeRef),className:o,style:s,title:r.title,onKeyDown:u=>ae(l,d=>Iz(d,u)),onClick:u=>r.onOpen(),onPointerDown:u=>ae(l,d=>Fz(d,u))})}function OPe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,s=Dz({id:o}),a=!i.unassigned&&s.isOver?gx(n.length)+" "+CPe:gx(n.length);return L("div",{children:[b("div",{children:i.label,className:i.unassigned?kPe:e9}),b("div",{children:n.map(l=>b("div",{children:FPe(i.events,l).map(u=>b(PPe,{event:u,day:l,draggable:t},u.key)),className:l===r?APe:t9},l.toString())),ref:Wt(s.setNodeRef),className:a})],className:EPe})}function MPe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=ue(()=>"Week"),s=o[1],a=o[0],l=ue(()=>Vn(D(r,Date.now()))),u=l[1],d=l[0],f=Vn(Date.now()),h=Le(t),p;p=a==="Week"?nl(7,y=>ao(rv(d),y)):[Vn(d)];let g=y=>u(E=>a==="Week"?ao(E,y*7|0):ao(E,y)),m=y=>{let E=y.over;if(t===void 0||E==null||E.id==="")return;let S=i.find(k=>k.events.some(C=>C.key===y.active.id));if(fe(S,!0,k=>k.resourceId!==E.id))return t(y.active.id,E.id)},v=(y,E)=>b("button",{children:E,className:a===y?bPe:bf,onClick:S=>s(k=>y)}),_;return _=a==="Week"?Xi(d):la(d)+" — "+Xi(d),L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:bf,onClick:y=>g(-1)}),b("button",{children:"Today",className:bf,onClick:y=>u(E=>f)}),b("button",{children:"›",className:bf,onClick:y=>g(1)}),b("span",{children:_,className:yPe})],className:K3}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:K3})],className:_Pe}),b($z,{onDragEnd:m,children:L("div",{children:[L("div",{children:[b("div",{children:"Resource",className:wPe}),b("div",{children:p.map(y=>b("div",{children:la(y),className:RPe},y.toString())),className:gx(p.length)})],className:SPe}),i.map(y=>b(OPe,{lane:y,days:p,today:f,draggable:h},y.unassigned?"\0unassigned":y.resourceId))],className:xPe})}),n!==void 0?b("span",{children:n,className:NPe}):null],className:vPe})}let LPe=MPe;function r9(e,t){let r=R(R(R(Y(e),o=>M(o,"properties")),Y),o=>M(o,t));if(r===void 0)return;let n=R(R(Y(r),o=>M(o,"const")),de);if(n!==void 0)return n;let i=cd(r);if(i!==void 0&&i.length===1)return i[0]}function n9(e){return e.filter(t=>t.level==="Instance")}function zPe(e,t,r){return t!==void 0&&qo(e,t).length!==0?n9(r).some(n=>{let i=n.allowedStates;return i!==void 0?i.length!==0:!1}):!1}function UPe(e,t,r){let n=n9(r),i=qo(e,t),o=l=>({commandName:l.name,label:l.label,toState:r9(l.schema,t)}),s=i.map(l=>{let u=oe(n,d=>{let f=d.allowedStates;if(f!==void 0&&f.includes(l))return o(d)});return{value:l,label:mt(l),terminal:u.length===0,outgoing:u}}),a=n.filter(l=>Pi(l.allowedStates)).map(o);return{statusField:t,states:s,anyState:a}}function ir(e){return"var("+e+")"}let BPe=w([z("flex"),me("column"),c("gap",ir(F.md))]),jPe=w([c("font-size",ir(T.sizeLg)),c("font-weight",ir(T.weightMedium)),c("color",ir(x.textPrimary)),yn(Re(0))]),qPe=w([c("font-size",ir(T.sizeXs)),c("color",ir(x.textDisabled))]),VPe=w([z("flex"),c("flex-wrap","wrap"),ee("flexStart"),c("gap",ir(F.md))]),KPe=w([z("flex"),me("column"),c("gap",ir(F.sm)),c("flex","0 1 240px"),c("padding",ir(F.md)),c("background",ir(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",ir(Z.md))]),HPe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",ir(F.sm))]),WPe=w([c("font-size",ir(T.sizeXs)),c("color",ir(x.textDisabled)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),GPe=w([z("flex"),me("column"),c("gap","4px")]),JPe=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("align-self","flex-start"),c("padding","2px var("+F.sm+")"),c("background",ir(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",ir(Z.sm)),c("font-size",ir(T.sizeSm)),c("color",ir(x.textPrimary))]),QPe=w([c("color",ir(x.textSecondary))]),YPe=w([c("font-size",ir(T.sizeXs)),c("color",ir(x.textDisabled))]),XPe=w([z("flex"),me("column"),c("gap",ir(F.sm)),c("padding-top",ir(F.sm))]),ZPe=w([c("font-size",ir(T.sizeXs)),c("font-weight",ir(T.weightMedium)),c("color",ir(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),eOe=w([z("flex"),c("flex-wrap","wrap"),c("gap","6px")]);function G3(e){let t=e.toState;return L("span",{children:[e.label,t!==void 0?b("span",{children:" → "+mt(t),className:QPe}):null],className:JPe},e.commandName)}function tOe(e){let t=e.title,r=e.statusField,n=UPe(e.schema,r,e.commands);return L("div",{children:[t!==void 0?b("h3",{children:t,className:jPe}):null,b("div",{children:"Lifecycle on “"+mt(r)+"”",className:qPe}),b("div",{children:n.states.map(i=>L("div",{children:[L("div",{children:[b(ra,{variant:"Neutral",label:i.label,dot:!0}),i.terminal?b("span",{children:"end",className:WPe}):null],className:HPe}),i.terminal?b("span",{children:"No commands available",className:YPe}):b("div",{children:i.outgoing.map(G3),className:GPe})],className:KPe},i.value)),className:VPe}),n.anyState.length!==0?L("div",{children:[b("span",{children:"Any state",className:ZPe}),b("div",{children:n.anyState.map(G3),className:eOe})],className:XPe}):null],className:BPe})}let rOe=tOe;function nOe(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 iOe(e,t){return e+"→"+t}function L2(e){return D(J(R(R(Y(e),t=>M(t,"properties")),Y),t=>Object.keys(t)),[])}function z2(e){return oe(D(R(R(Y(e),t=>M(t,"required")),mr),[]),de)}function hy(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 oOe(e,t,r){let n=hy(e).concat(hy(t)),i=hy(r);return n.some(o=>i.some(s=>s.startsWith(o)?!0:o.startsWith(s)))}function sOe(e){return e.filter(t=>t.level==="Instance")}function py(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function aOe(e,t,r){return L2(e.schema).includes(t)?dt([[t,r]]):{}}function lOe(e,t){let r=e.filter(n=>L2(n.schema).includes(t)?z2(n.schema).every(i=>i===t||i==="id"?!0:We(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function gy(e){if(e.length===1)return e[0]}function U2(e,t,r){let n=sOe(t),i=lOe(n,e);return(o,s)=>{let a=(h,p)=>{if(py(h,o))return{command:h.name,patch:aOe(h,e,s),tier:p}},l=R(R(R(r,h=>h[s]),h=>n.find(p=>p.name===h)),h=>a(h,"Hints"));if(l!==void 0)return l;let u=R(gy(n.filter(h=>py(h,o)?We(h.targetState,s):!1)),h=>a(h,"DeclaredTarget"));if(u!==void 0)return u;let d=R(gy(n.filter(h=>py(h,o)?We(r9(h.schema,e),s):!1)),h=>a(h,"SchemaTarget"));if(d!==void 0)return d;let f=R(gy(n.filter(h=>{let p=h.allowedStates;return p!==void 0&&p.includes(o)?oOe(h.name,h.label,s):!1})),h=>a(h,"StemMatch"));return f!==void 0?f:R(i,h=>a(h,"Setter"))}}function uOe(e,t,r,n){let i=U2(t,r,n),o=qo(e,t),s={};return o.forEach(a=>{o.forEach(l=>{if(a!==l)return ae(i(a,l),u=>{s[iOe(a,l)]=u})})}),s}let xu="resources",Su="events";function cOe(e){return e.find(t=>We(t.role,xu))}function i9(e){return e.filter(t=>We(t.role,Su))}function dOe(e,t){return e.toString()+"::"+t}function fOe(e){let t=e.indexOf("::");if(t!==-1)return J(uF(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function Il(e,t){return R(M(e,t),de)}function hOe(e){let t=cOe(e),r=i9(e),n=t!==void 0?t.rows.map(d=>{let f=D(Y(d),{}),h=D(Il(f,"id"),""),p=D(R(t.semantics.labelField,g=>Il(f,g)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>oe(d.rows,h=>{let p=D(Y(h),{}),g=D(Il(p,"id"),""),m=d.semantics.dateSpan;if(m!==void 0)return J(R(Il(p,m.startField),zi),v=>{let _=R(R(m.endField,A=>Il(p,A)),zi),y=D(R(d.semantics.labelField,A=>Il(p,A)),g),E=D(R(d.resourceRef,A=>Il(p,A)),""),S=dOe(f,g),k=d.accent;return[E,{key:S,title:y,start:v,end_:_,accent:k,onOpen:()=>d.onOpenRow(g,h)}]})})).flat(),s=d=>oe(o,f=>{if(d(f[0]))return f[1]}),a=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:s(h=>h===f)}}),l=s(d=>!i.includes(d)),u=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return a.concat(u)}function pOe(e){let t=e.sources,r=hOe(t),n=i9(t),o=n.some(l=>Le(l.onCommand)&&Le(l.assignCommand)?Le(l.resourceRef):!1)?(l,u)=>ae(fOe(l),d=>{let f=d[1];ae(n[d[0]],h=>{let p=h.onCommand,g=h.assignCommand,m=h.resourceRef;if(p!==void 0&&g!==void 0&&m!==void 0)return p(g,f,dt([[m,u]]))})}):void 0,s=it(n,0,(l,u)=>l+u.rows.length|0),a=BF(rE(t),s,void 0,"scheduled item");return b(LPe,{lanes:r,windowNote:a,onReassign:o})}let gOe=b("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),yf="scheduler";function o9(e){return Le(jr(e,void 0,void 0).dateSpan)?Xr(e).some(t=>Le(Xc(t[0]))):!1}function mOe(e,t,r){return r?!1:o9(t)}function s9(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>L2(i.schema).includes(t)?z2(i.schema).every(o=>o===t||o==="id"?!0:We(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function vOe(e,t,r){let n=r!==void 0?r:(o,s)=>{},i={};return Ug().filter(o=>{let s=o.arity;return typeof s!="object"?!1:s.TAG!=="Multi"}).forEach(o=>{let s={},a={},l=(u,d,f)=>{let h=M(u,d);h!==void 0?h.push(f):u[d]=[f]};e.forEach(u=>{let d=R(t,p=>ro(p,u.name)),f=D(R(d,p=>p.canvas),o.label),h=R(d,p=>p.role);if(h!==void 0)return h===xu?l(s,f,u):h===Su?ae(R(d,p=>p.resourceRef),p=>l(a,f,[u,p])):void 0}),Ge(a).forEach(u=>{let d=u[0],f=D(M(s,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];u[1].forEach(g=>{i[g[0].name]={resource:p,resourceRef:g[1]}})})}),i}Wo({id:yf,label:"Scheduler",icon:gOe,arity:{TAG:"Slots",_0:[{role:xu,min:1,max:1},{role:Su,min:1}]},isCapable:o9,render:e=>b(pOe,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function ta(e){return"var("+e+")"}let C0=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",ta(Z.full)),c("padding","2px var("+F.sm+")"),c("color",ta(x.textSecondary)),c("font-size",ta(T.sizeXs)),c("line-height","1.5")]),my=w([Ee("pointer"),He([c("background",ta(x.surfaceSubtle)),c("color",ta(x.textPrimary))])]),_Oe=w([Qs(.6),Ee("notAllowed")]);function B2(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let bOe=B2(ta(x.success)),yOe=B2(ta(x.border)),xOe=B2(ta(x.border)),SOe=hV([[0,[Qs(.4)]],[50,[Qs(1)]],[100,[Qs(.4)]]]),EOe=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",ta(x.warning)),aV(SOe),lV({NAME:"ms",VAL:1200}),uV("infinite"),cV("easeInOut")]);function wOe(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,s=n?i&&o?[C0+" "+my,EOe,"Reconnecting…"]:i?[C0+" "+my,bOe,"Live"]:[C0+" "+my,yOe,"Snapshot"]:[C0+" "+_Oe,xOe,"Off"],a=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:s[1]}),s[2]],className:s[0],title:l,disabled:!n,type:"button",onClick:a})}let kOe=wOe;function uf(e){return"var("+e+")"}let COe=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("background",uf(x.brand)),c("color",uf(x.textOnBrand)),c("border","none"),c("border-radius",uf(Z.full)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",uf(T.sizeSm)),c("font-weight",uf(T.weightMedium)),Ee("pointer"),He([c("opacity","0.85")])]),ROe=w([z("flex"),ee("center"),Ye("center"),c("padding","var("+F.xs+") 0")]);function AOe(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:COe,type:"button",onClick:i=>t()}),className:ROe})}let TOe=AOe;function $Oe(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function NOe(e){return $Oe(e)}function j2(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function bo(e){return[e._0,j2(e)]}function a9(e,t){return dF(t,e,(r,n)=>n(r))}function yo(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}let J3=21;function l9(e,t,r){return oe(TM(e,t),n=>{let i=R(M(n,"id"),de),o=D(R(M(n,r),de),D(i,""));return J(i,s=>({id:s,label:o}))})}function DOe(e,t){let r=_i(),n=ue(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return Te(()=>{let o={contents:!1};if(i(s=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let s=t==="id"?"id":"id "+t,a="query { "+e+"(first: "+J3.toString()+") { edges { node { "+s+" } } } }";Vt(r(a,{}).then(l=>{if(!o.contents){let u=l9(l,e,t),d=u.length>=J3,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(s=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function FOe(e,t,r){let n=_i(),i=ue(()=>({loading:!1,options:[],error:!1})),o=i[1];return Te(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let s={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let a=setTimeout(()=>{if(s.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,Vt(n(u,d).then(f=>{if(!s.contents){let h=l9(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(s.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()=>{s.contents=!0,clearTimeout(a)}},[n,r,e]),i[0]}function IOe(e,t,r){let n=_i(),i=ue(()=>{}),o=i[1];return Te(()=>{let s={contents:!1},a=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,Vt(n(u,d).then(f=>{if(!s.contents){let h=Y(f),p=D(R(R(h,_=>M(_,"data")),Y),{}),g=M(p,e),m=g!==void 0?g:R(h,_=>M(_,e)),v=R(m,Y);if(v!==void 0){let _=D(R(M(v,"id"),de),t),y=D(R(M(v,r),de),_);o(E=>({id:_,label:y}))}else o(_=>{})}return Promise.resolve()}),f=>Promise.resolve())}else a=1;return a===1&&o(l=>{}),()=>{s.contents=!0}},[n,t,r]),i[0]}function fr(e){return"var("+e+")"}function xf(e){if(e==="")return[];let t=mr(JSON.parse(e));return t!==void 0?oe(t,de):[e]}let POe=w([Pt("relative"),jo({NAME:"percent",VAL:100})]),Q3=w([c("background",fr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",fr(Z.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",fr(T.sizeMd)),c("color",fr(x.textPrimary)),c("outline","none"),jo({NAME:"percent",VAL:100}),eV(Re(34)),z("flex"),ee("center"),gi("wrap"),c("gap","4px"),Ee("pointer"),ca("left"),fa([c("border-color",fr(x.brand))])]),OOe=w([c("border-color",fr(x.brand))]),MOe=w([c("border-color",fr(x.error))]),LOe=w([c("color",fr(x.textSecondary))]),zOe=w([z("inlineFlex"),ee("center"),c("background",fr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",fr(Z.sm)),c("padding","2px 6px"),c("font-size",fr(T.sizeSm)),c("gap","4px")]),UOe=w([Ee("pointer"),c("color",fr(x.textSecondary)),c("font-weight",fr(T.weightBold))]),BOe=w([c("border","none"),c("background","transparent"),c("outline","none"),c("color",fr(x.textPrimary)),c("font-size",fr(T.sizeMd)),mo(1),PF(Re(40))]),jOe=w([Pt("absolute"),da({NAME:"percent",VAL:100}),ad("zero"),xl("zero"),Es(Re(2)),c("background",fr(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",fr(Z.sm)),c("box-shadow",fr(mn.md)),Qq("none"),yn("zero"),rV("zero"),Xq(Re(240)),tV("auto"),iV(20)]),qOe=w([c("padding","var("+F.xs+") var("+F.sm+")"),Ee("pointer"),c("color",fr(x.textPrimary)),c("font-size",fr(T.sizeMd))]),VOe=w([c("background",fr(x.surfaceSubtle))]),KOe=w([c("background",fr(x.brandSubtle))]),Y3=w([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",fr(x.textSecondary)),c("font-size",fr(T.sizeSm))]),HOe=(function(e,t){return e.contains(t)});function WOe(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,s=Math.max(120,Math.min(240,i?n:r));return[i,s]}function GOe(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,s=e.required,a=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,g=DOe(u,l),m=g.options,v=g.loading,_=Qe(void 0),y;if(a)y="Search";else{let j=_.current;if(j!==void 0)y=j;else if(v)y="Inline";else{let le=g.hasMore?"Search":"Inline";_.current=le,y=le}}let E=ue(()=>!1),S=E[1],k=E[0],C=ue(()=>0),$=C[1],A=C[0],N=ue(()=>""),O=N[1],P=N[0],I=ue(()=>[!1,240]),U=I[1],B=I[0],V=Qe(null),W=Qe(null),Q=a||o===""?!1:!m.some(j=>j.id===o),K=IOe(e.singleQueryField,Q?o:void 0,l),G=j=>{let le=J(m.find(X=>X.id===j),X=>X.label),xe=R(K,X=>{if(X.id===j)return X.label});return le!==void 0?le:xe!==void 0?xe:j};Te(()=>{if(!k)return;let j=le=>{let xe=le.target,X=V.current;if(X!=null&&!HOe(X,xe))return S(he=>!1)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[k]),sF(()=>{if(k){let j=V.current;j!=null&&U(le=>WOe(j))}},[k]);let ne=y==="Search"&&P!=="",se=FOe(u,l,ne?P:""),be;if(P==="")be=m;else{let j=P.toLowerCase();be=m.filter(le=>le.label.toLowerCase().startsWith(j))}let Ae=ne&&!se.error?se.options:be,$e=Ae.length,ot=v||ne&&se.loading,ye=j=>{let le=xf(o),xe=le.some(he=>he===j)?le.filter(he=>he!==j):le.concat([j]);i(d,JSON.stringify(xe.map(he=>he))),O(he=>""),$(he=>0);let X=W.current;if(X!=null){X.focus();return}},we=j=>{let le=Ae[j];if(le!==void 0){if(a)return ye(le.id);{let xe=le.id;return i(d,xe),S(X=>!1),O(X=>"")}}},Ze=j=>{switch(j.key){case"ArrowDown":return j.preventDefault(),k?$(he=>$e===0?0:Lo(he+1|0,$e)):S(he=>!0);case"ArrowUp":return j.preventDefault(),$(he=>$e===0?0:Lo((he-1|0)+$e|0,$e));case"Backspace":if(!(a&&P===""))return;let xe=xf(o);if(xe.length===0)return;let X=xe.slice(0,xe.length-1|0);return i(d,JSON.stringify(X.map(he=>he)));case"Enter":return k?(j.preventDefault(),we(A)):void 0;case"Escape":return k?S(he=>!1):void 0;default:return}},Zt=k?Q3+" "+OOe:Q3,Ut=h?Zt+" "+MOe:Zt,Qn=()=>xf(o).map(le=>L("span",{children:[G(le),b("span",{children:"×",className:UOe,onClick:xe=>{xe.stopPropagation(),ye(le)}})],className:zOe},le)),ar=(B[1]|0).toString()+"px",Bi=B[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:ar,top:"auto"}:{maxHeight:ar},$r;if(ot)$r=b("li",{children:"Loading…",className:Y3});else if($e===0)$r=b("li",{children:P===""?"No options":"No matches",className:Y3});else{let j=a?xf(o):o===""?[]:[o];$r=Ae.map((le,xe)=>{let X=j.some(Ve=>Ve===le.id),qe=W7([[qOe],xe===A?[VOe]:[],X?[KOe]:[]]).join(" ");return b("li",{children:le.label,"aria-selected":X,className:qe,role:"option",onMouseDown:Ve=>{Ve.preventDefault(),we(xe)},onMouseEnter:Ve=>$(Ke=>xe)},le.id)})}let Yn=b("ul",{children:$r,className:jOe,role:"listbox",style:Bi}),Nr;return Nr=y==="Inline"?b("button",{children:o===""?b("span",{children:s?"Select…":"—",className:LOe}):G(o),className:Ut,autoFocus:p,type:"button",onKeyDown:Ze,onBlur:j=>f(),onClick:j=>S(le=>!le)}):L("div",{children:[a?Qn():null,b("input",{ref:Wt(W),className:BOe,autoFocus:p,placeholder:s?"Search…":"—",type:"text",value:a||k?P:o===""?"":G(o),onKeyDown:Ze,onFocus:j=>S(le=>!0),onBlur:j=>f(),onChange:j=>{let le=j.target.value;O(xe=>le)}})],className:Ut,onClick:j=>S(le=>!0)}),L("div",{children:[Nr,k?Yn:null],ref:Wt(V),className:POe})}let JOe=GOe;function u9(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function QOe(e){return t=>{let r=bo(t),n=r[0];return n>=e?yo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+u9(e.toString()),tl:r[1]}}}}function YOe(e){return t=>{let r=bo(t),n=r[0];return n<=e?yo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+u9(e.toString()),tl:r[1]}}}}function XOe(e){let t=bo(e),r=t[0];return isFinite(r)&&(r|0)===r?yo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}let ZOe="Must not be empty";function e6e(e){let t=bo(e),r=t[0];return r.length>0?yo(e):{TAG:"Invalid",_0:r,_1:{hd:ZOe,tl:t[1]}}}let t6e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function r6e(e){let t=bo(e),r=t[0];return t6e.exec(r)!==null?yo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function n6e(e){let t=bo(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?yo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let i6e=/^[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 o6e(e){let t=bo(e),r=t[0];return i6e.exec(r)!==null?yo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let s6e=/^c[a-z0-9]{23,24}$/;function a6e(e){let t=bo(e),r=t[0];return s6e.exec(r)!==null?yo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function l6e(e){let t=bo(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]}}:yo(e)}function u6e(e){return t=>{let r=bo(t),n=r[0];return n.length>=e?yo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function c6e(e){return t=>{let r=bo(t),n=r[0];return n.length<=e?yo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function d6e(e,t){return r=>{let n=bo(r),i=n[0];return e.exec(i)!==null?yo(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function f6e(e){let t=j2(e);if(t!==0)return t.hd}function h6e(e){switch(e){case"Email":return r6e;case"Url":return n6e;case"Uuid":return o6e;case"Cuid":return a6e;case"DateTime":return l6e}}function p6e(e,t,r){if(e==="")return t?e6e({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return ae(r.minLength,i=>{n.push(u6e(i))}),ae(r.maxLength,i=>{n.push(c6e(i))}),ae(r.format,i=>{n.push(h6e(i))}),ae(r.pattern,i=>{n.push(d6e(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:a9({TAG:"Pending",_0:e},Nx(n))}function g6e(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=ol(e);if(n===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Must be a number",tl:0}};let i=[];D(r.integer,!1)&&i.push(XOe),ae(r.min,a=>{i.push(QOe(a))}),ae(r.max,a=>{i.push(YOe(a))});let o=a9({TAG:"Pending",_0:n},Nx(i)),s=j2(o);return s!==0?{TAG:"Invalid",_0:e,_1:s}:{TAG:"Valid",_0:e}}function m6e(e,t,r){let i=xf(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return ae(r.maxItems,a=>{if(i>a){o.contents={hd:"Select at most "+a.toString()+" items",tl:o.contents};return}}),ae(r.minItems,a=>{if(i<a&&(t||i>0)){o.contents={hd:"Select at least "+a.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function X3(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function v6e(e,t){let r=e.propSchema;if(r!==void 0&&ene(e.key,r)){let i=e.fieldType,o;if(typeof i!="object")o=!1;else switch(i.TAG){case"TextField":case"NumberField":o=i.required;break;case"EnumField":o=i.required;break;case"RefField":o=i.required;break}let s=rne(e.key,r,t,o);return s!==void 0?{TAG:"Invalid",_0:t,_1:{hd:s,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 p6e(t,n.required,n.constraints);case"NumberField":return g6e(t,n.required,n.constraints);case"EnumField":return X3(t,n.required);case"RefField":return n.multi?m6e(t,n.required,n.constraints):X3(t,n.required)}}function im(e,t){let r=J(M(e,t),rt);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function Z3(e,t){let r=J(M(e,t),rt);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function om(e,t){let r=J(M(e,t),rt);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function _6e(e){let t=om(e,"format");if(om(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 b6e(e){let t=im(e,"minLength"),r=im(e,"maxLength"),n=J(om(e,"pattern"),s=>new RegExp(s)),i=_6e(e),o=om(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function eD(e,t){let r=Z3(e,"minimum"),n=Z3(e,"maximum");return{min:r,max:n,integer:t}}function y6e(e){let t=im(e,"minItems"),r=im(e,"maxItems");return{minItems:t,maxItems:r}}function x6e(e,t){let r=t!==void 0?t:[],n={};r.forEach(d=>{n[d.propertyKey]=d});let i=rt(e);if(typeof i!="object")return[];if(i.TAG!=="JSONObject")return[];let o=i._0,s=M(o,"required"),a;if(s!==void 0){let d=rt(s);a=typeof d!="object"?[]:d.TAG==="JSONArray"?oe(d._0,f=>{let h=rt(f);if(!(typeof h!="object"||h.TAG!=="JSONString"))return h._0}):[]}else a=[];let l=M(o,"properties");if(l===void 0)return[];let u=rt(l);return typeof u!="object"?[]:u.TAG==="JSONObject"?oe(Ge(u._0),d=>{let f=d[1],h=d[0],p=rt(f);if(typeof p!="object"||p.TAG!=="JSONObject")return;let g=p._0;if(Le(M(g,"const")))return;let m=M(g,"type"),v;if(m!==void 0){let $=rt(m);v=typeof $!="object"||$.TAG!=="JSONString"?"string":$._0}else v="string";let _=a.some($=>$===h),y=M(n,h),E;if(y!==void 0)E=y.multi?y.entityNamePlural:y.entityName;else{let $=M(g,"title");if($!==void 0){let A=rt($);E=typeof A!="object"||A.TAG!=="JSONString"?mt(h):A._0}else E=mt(h)}let S=M(g,"enum"),k;if(S!==void 0){let $=rt(S);k=typeof $!="object"||$.TAG!=="JSONArray"?void 0:oe($._0,A=>{let N=rt(A);if(!(typeof N!="object"||N.TAG!=="JSONString"))return N._0})}else k=void 0;let C;if(y!==void 0)C={TAG:"RefField",queryField:y.queryField,singleQueryField:y.singleQueryField,labelField:y.labelField,multi:y.multi,required:_,constraints:y.multi?y6e(g):{}};else if(v==="boolean")C="BoolField";else if(k!==void 0)C={TAG:"EnumField",options:k,required:_};else switch(v){case"integer":C={TAG:"NumberField",required:_,constraints:eD(g,!0)};break;case"number":C={TAG:"NumberField",required:_,constraints:eD(g,!1)};break;default:C={TAG:"TextField",required:_,constraints:b6e(g)}}return J(C,$=>({key:h,label:E,fieldType:$,propSchema:f}))}):[]}function S6e(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;i=typeof n!="object"?"false":n.TAG==="EnumField"?D(n.options[0],""):"",t[r.key]=i}),t}function hn(e){return"var("+e+")"}let E6e=w([z("flex"),me("column"),c("gap",hn(F.md))]),w6e=w([z("flex"),me("column"),c("gap","4px")]),tD=w([c("color",hn(x.textSecondary)),c("font-size",hn(T.sizeSm)),c("font-weight",hn(T.weightMedium))]),k6e=w([c("color",hn(x.error)),Ih(Re(2))]),rD=w([c("background",hn(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",hn(Z.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",hn(T.sizeMd)),c("color",hn(x.textPrimary)),c("outline","none"),jo({NAME:"percent",VAL:100}),c("transition","border-color 120ms, box-shadow 120ms"),fa([c("border-color",hn(x.brand))])]),C6e=w([c("border-color",hn(x.error)),fa([c("border-color",hn(x.error)),c("box-shadow","0 0 0 2px color-mix(in srgb, var("+x.error+") 25%, transparent)")])]),R6e=w([c("color",hn(x.error)),c("font-size",hn(T.sizeXs)),c("min-height","1.1em"),c("line-height","1.1"),Es(Re(2))]),A6e=w([Ee("pointer"),IF(Re(6))]),nD=w([c("background",hn(x.brand)),c("color",hn(x.textOnBrand)),c("border","none"),c("border-radius",hn(Z.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",hn(T.sizeMd)),Ee("pointer"),Jq("flexStart"),c("transition","opacity 120ms")]),T6e=w([Qs(.5),Ee("notAllowed")]);function $6e(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,s=e.value,a=e.field,l=r!==void 0?r:!1,u=t!==void 0?t:!1,d=a.fieldType,f;if(typeof d!="object")f=!1;else switch(d.TAG){case"TextField":case"NumberField":f=d.required;break;case"EnumField":f=d.required;break;case"RefField":f=d.required;break}let h=l&&Le(n),p=h?rD+" "+C6e:rD,g=y=>i(a.key),m=a.propSchema,v=m!==void 0?tne(a.key,m,s,y=>o(a.key,y),()=>i(a.key),f,h):void 0,_;if(v!==void 0)_=v;else{let y=a.fieldType;if(typeof y!="object")_=L("label",{children:[b("input",{className:A6e,checked:s==="true",type:"checkbox",onBlur:g,onChange:E=>o(a.key,E.target.checked?"true":"false")}),"Enabled"],className:tD});else switch(y.TAG){case"TextField":let E=y.constraints.format,S;if(E!==void 0)switch(E){case"Email":S="email";break;case"Url":S="url";break;default:S="text"}else S="text";_=b("input",{className:p,autoFocus:u,type:S,value:s,onBlur:g,onChange:k=>o(a.key,k.target.value)});break;case"NumberField":_=b("input",{className:p,autoFocus:u,type:"number",value:s,onBlur:g,onChange:k=>o(a.key,k.target.value)});break;case"EnumField":_=b("select",{children:y.options.map(k=>b("option",{children:k,value:k},k)),className:p,value:s,onBlur:g,onChange:k=>o(a.key,k.target.value)});break;case"RefField":_=b(JOe,{fieldKey:a.key,queryField:y.queryField,singleQueryField:y.singleQueryField,labelField:y.labelField,multi:y.multi,required:y.required,value:s,onChange:o,onBlur:()=>i(a.key),hasError:h,autoFocus:u});break}}return L("div",{children:[L("label",{children:[a.label,f?b("span",{children:"*",className:k6e}):null],className:tD}),_,b("div",{children:h?D(n,""):null,className:R6e})],className:w6e})}function N6e(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,s=n!==void 0?n:"Submit",a=t!==void 0?t:[],l=Mt(()=>x6e(o,a),[o,a]),u=ue(()=>D(r,S6e(l))),d=u[1],f=u[0],h=ue(()=>({})),p=h[1],g=h[0],m=ue(()=>!1),v=m[1],_=m[0],y=Mt(()=>l.map(O=>{let P=D(M(f,O.key),"");return[O.key,v6e(O,P)]}),[l,f]),E=y.every(O=>NOe(O[1])),S={};y.forEach(O=>{let P=f6e(O[1]);if(P!==void 0){S[O[0]]=P;return}});let k=(O,P)=>d(I=>{let U=dt(Ge(I));return U[O]=P,U}),C=O=>p(P=>{let I=dt(Ge(P));return I[O]=!0,I}),$=O=>{if(O.preventDefault(),v(P=>!0),E)return i(f)},A=_&&!E,N=A?nD+" "+T6e:nD;return L("form",{children:[l.map((O,P)=>{let I=D(M(g,O.key),!1);return b($6e,{field:O,value:D(M(f,O.key),""),onChange:k,onBlur:C,errorMessage:M(S,O.key),showError:I||_,autoFocus:P===0},O.key)}),b("button",{children:s,className:N,disabled:A,type:"submit"})],className:E6e,noValidate:!0,onSubmit:$})}let D6e=N6e;function F6e(e){return"var("+e+")"}let I6e=w([z("flex"),me("column"),c("gap",F6e(F.md))]);function P6e(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.injectNewId,o=e.aggregateIdField,s=e.aggregateId,a=e.schema,l=i!==void 0?i:!1,u=n!==void 0?n:[],d=t!==void 0?t:"Submit",f=ue(()=>{}),h=f[1],p=ue(()=>!1),g=p[1],v=ue(()=>crypto.randomUUID())[0],_=S=>{let k=dt(Ge(S));ae(s,C=>{k[D(o,"id")]=C}),l&&(k[D(o,"id")]=v),g(C=>!0),h(C=>{}),r(k).then(C=>{if(g($=>!1),typeof C=="object"){let $=C._0;h(A=>$)}return Promise.resolve()})},y=s!==void 0?o!==void 0||l?o:void 0:l?o:void 0,E=y!==void 0?D(J(Y(a),S=>{let k=dt(Ge(S));return ae(R(M(k,"properties"),Y),C=>{let $=dt(Ge(C).filter(A=>A[0]!==y));k.properties=$}),k}),a):a;return L("div",{children:[fe(f[0],null,S=>b(Qz,{variant:"Error",message:S})),p[0]?b(zf,{label:"Submitting..."}):null,b(D6e,{schema:E,onSubmit:_,submitLabel:d,refFields:u})],className:I6e})}let q2=P6e;function O6e(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 s=i[0];if(s!==""){t[decodeURIComponent(s)]="";return}else return;case 2:let a=i[0],l=i[1];if(a!==""){t[decodeURIComponent(a)]=decodeURIComponent(l);return}else return}}),t}function M6e(e,t){return e===t?0:e<t?-1:1}function c9(e){let t=Ge(e).filter(r=>r[1]!=="").toSorted((r,n)=>M6e(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function L6e(e){if(e.path===0)return"/";let r=[];return H7(e.path,n=>{r.push(n)}),"/"+r.join("/")}function iD(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=Ge(e).filter(o=>{let s=o[0];return r.includes(s)?!1:!n.some(a=>a[0]===s)});return dt(i.concat(n))}function z6e(){let e=F7(),t=O6e(e.search),r=L6e(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let u=c9(l);zc(r+u+n)};return{params:t,get:l=>M(t,l),set:(l,u)=>i(iD(t,[[l,u]])),setMany:l=>i(iD(t,l))}}function V2(e){return fe(R(R(Y(e),t=>M(t,"properties")),Y),[],Ge)}function U6e(e,t){return J(V2(e).find(r=>r[0]===t),r=>r[1])}function K2(e){if(e.length===1)return Wt(e[0])}function B6e(e,t){return z2(e.schema).every(r=>r===t||r==="id"?!0:We(r,e.aggregateIdField))}function mx(e,t){return J(K2(V2(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function oD(e,t,r){return K2(oe(e,n=>R(mx(n,r),i=>{if(B6e(n,i))return{command:n,argument:i,tier:t}})))}function d9(e,t){return We(bs(e).storeTarget,t)}function j6e(e,t,r,n){let i=t.field;return i!==void 0?V2(e.schema).some(o=>o[0]===i)?i:void 0:Dh(R(n,o=>mx(e,(s,a)=>d9(a,o))),mx(e,(o,s)=>o===r))}let sD={contents:[]};function aD(e,t,r){let n=e+"."+t.command+"."+D(t.field,"")+"."+r;if(!sD.contents.some(i=>i===n)){sD.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function q6e(e,t,r,n){let i=K2(e.filter(o=>o.name===t.command));if(i!==void 0){let o=j6e(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};aD(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}aD(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function f9(e,t,r){return R(U6e(e,t),n=>{let i=bs(n),o=i.storeTarget,s=r.filter(u=>u.level==="Instance"),a=i.setter;if(a!==void 0)return q6e(s,a,t,o);let l=R(o,u=>oD(s,"StoreMatch",(d,f)=>d9(f,u)));return l!==void 0?l:oD(s,"NameMatch",(u,d)=>u===t)})}function h9(e,t){let r=e.requiredRole;return r!==void 0?t.includes(r):!0}function zv(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||Le(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||Le(e.index)||e.scanSort;return{filter:t,sort:r}}function lD(e){return zv(e.ann)}function p9(e){let t=Le(CK(e)),r=wm(e).length!==0,n=Vx(e).length!==0;return{search:t||r||n}}function vx(e){let r=D(J(R(R(Y(e),s=>M(s,"properties")),Y),Ge),[]).map(s=>zv(bs(s[1]))),n=r.some(s=>s.filter),i=r.some(s=>s.sort),o=p9(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function uD(e,t){let r={},n={};return Ge(e).forEach(i=>{let o=i[1];if(o==="")return;let s=i[0],a=t.find(l=>l.key===s);if(a!==void 0){zv(a.ann).filter?r[s]=o:n[s]=o;return}n[s]=o}),[r,n]}function cD(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?zv(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function V6e(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),Ge(e).forEach(o=>{let s=o[1],a=o[0],l=n.find(f=>f.key===a),u=J(l,f=>f.kind),d;if(u!==void 0&&typeof u!="object")switch(u){case"KBoolean":d=s==="true";break;case"KNumber":d=D(J(ol(s),f=>f),s);break;default:d=s}else d=s;i[a+"Eq"]=d}),Ge(i).length!==0)return i}function K6e(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return dt([["field",e._0],["direction",t]])}function H6e(e){let t=e.resource,r=bu(t,void 0),n=t.name,i=r.rows,o=t.schema,s=e.resourceSemantics,a=ig(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:s,window:a,onOpenRow:(A,N)=>{},role:xu},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,g=e.eventSemantics,m=e.eventAccent,v=e.eventWindow,_=e.onOpenEvent,y=e.onCommand,E=Su,S=e.resourceRef,k=e.assignCommand,C={readModelName:f,rows:h,schema:p,semantics:g,accent:m,window:v,onOpenRow:_,onCommand:y,role:E,resourceRef:S,assignCommand:k},$=r.fetchState;return typeof $!="object"?$==="Loading"?b(zf,{}):e.mode.render([d,C]):b(Ua,{detail:$._0,onRetry:()=>r.refetch()})}let W6e=H6e,g9=ur(void 0),G6e=g9.Provider;function J6e(e){return Sr(G6e,{value:e.refresh,children:e.children})}let dD={make:J6e};function Q6e(){return It(g9)}function fD(e){try{return vs(localStorage.getItem(e))}catch{return}}function hD(e,t){try{return localStorage.setItem(e,t)}catch{return}}function hr(e){return"var("+e+")"}let vy=w([z("flex"),me("column"),c("gap",hr(F.lg))]),pD=w([z("flex"),ee("center"),Ye("spaceBetween"),c("margin-bottom",hr(F.sm))]),Y6e=w([c("font-size",hr(T.sizeXl)),c("font-weight",hr(T.weightMedium)),c("color",hr(x.textPrimary)),yn(Re(0))]),X6e=w([z("flex"),c("gap",hr(F.sm))]),Z6e=w([z("flex"),me("column"),c("gap",hr(F.lg))]),eMe=w([z("flex"),me("column"),c("gap",hr(F.sm))]),tMe=w([c("font-size",hr(T.sizeSm)),c("font-weight",hr(T.weightMedium)),c("color",hr(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),yn(Re(0))]),rMe=w([c("background",hr(x.brand)),c("color",hr(x.textOnBrand)),c("border","none"),c("border-radius",hr(Z.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",hr(T.sizeSm)),c("cursor","pointer")]),nMe=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","0"),c("color",hr(x.brand)),c("font-size",hr(T.sizeSm)),Ee("pointer"),c("text-decoration","none"),He([c("text-decoration","underline")])]),iMe=w([z("flex"),ee("center"),Ye("flexEnd"),c("gap",hr(F.xs)),c("padding-top",hr(F.sm))]),gD=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",hr(Z.sm)),c("padding","2px var("+F.sm+")"),c("color",hr(x.textSecondary)),c("font-size",hr(T.sizeSm)),Ee("pointer"),He([c("background",hr(x.surfaceSubtle)),c("color",hr(x.textPrimary))]),LF([c("opacity","0.4"),Ee("notAllowed")])]);function oMe(e,t,r){return t!==void 0&&t!==""?[["before",t],["last",r]]:e!==void 0?e!==""?[["first",r],["after",e]]:[["first",r]]:[["first",r]]}function sMe(e,t){let r=D(R(R(Y(e),i=>M(i,"properties")),Y),{}),n={};return Ge(t).forEach(i=>{let o=i[1],s=i[0],a=D(R(R(R(M(r,s),Y),d=>M(d,"type")),de),"string"),l,u=0;switch(a){case"array":if(o==="")l=[];else try{l=JSON.parse(o)}catch{l=[o]}break;case"boolean":l=o==="true";break;case"integer":case"number":u=1;break;case"object":if(o==="")l=null;else try{l=JSON.parse(o)}catch{l=null}break;default:l=o}u===1&&(l=D(J(ol(o),d=>d),o)),n[s]=l}),n}let mD={contents:[]},vD={contents:[]};function aMe(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!mD.contents.some(i=>i===n)){mD.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 lMe(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!vD.contents.some(i=>i===n)){vD.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 _D={contents:[]};function uMe(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!_D.contents.some(n=>n===r)){_D.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 cMe(e){let t=e.schedulerJoin,r=e.uiHints,n=e.liveDefault,i=e.sortKeyField,o=e.byIdsQueryDocument,s=e.byIdsQueryField,a=e.detailQueryDocument,l=e.singleQueryField,u=e.drillPath,d=e.openRowId,f=e.pluginId,h=e.detailView,p=e.rows,g=e.readModel,m=u!==void 0?u:[],v=n!==void 0?n:!0,_=_i(),y=ue(()=>{}),E=y[1],S=ue(()=>{}),k=S[1],C=S[0],$=ue(()=>({})),A=$[1],N=$[0],O=ue(()=>"Loaded"),P=O[1],I=O[0],U=ue(()=>{}),B=U[1],V=U[0],W=rp(),Q=fe(W,!1,H=>H.isLive(g.queryField)),K="reventless.live."+D(f,"default")+"."+g.name,G=ue(()=>{let H=fD(K);if(H===void 0)return v;switch(H){case"false":return!1;case"true":return!0;default:return v}}),ne=G[1],se=G[0],be=()=>{let H=!se;hD(K,H?"true":"false"),ne(ce=>H)},Ae=Q&&se,$e=R(r,H=>ro(H,g.name)),ot=zM(g.schema,$e),ye=fe(R($e,H=>H.suppress),!1,H=>H.includes(yf)),we;if(t!==void 0&&mOe(!0,g.schema,ye)){let H=DM(yf);we=H!==void 0&&!ot.some(ce=>ce.id===H.id)?ot.concat([H]):ot}else we=ot;let Ze=IM(f,g.name,void 0),Zt=ue(()=>nE(Ze)),Ut=Zt[1],Qn=H=>{FM(Ze,H),Ut(ce=>H)},ar=UM(Zt[0],$e,YF(g.schema),we),Bi=t!==void 0&&ar!==void 0?ar.id===yf:!1,$r=Le(h)&&!Bi,Yn="reventless.layout."+D(f,"default")+"."+g.name,Nr=ue(()=>fD(Yn)),j=Nr[1],le=tie(Nr[0],$e,TK(g.schema),$r),xe=W!==void 0&&Ae?W.statusFor(Hg(g.queryField))!=="Open":!1,X=ue(()=>0),he=X[1],qe=X[0],Ve=Qe({}),Ke=Qe(void 0),pt=Qe(new Map),gt=H=>{pt.current.set(H,Date.now())},jt=H=>{let ce=pt.current.get(H);return ce!==void 0?Date.now()-ce<6e4:!1},ge=z6e(),Oe=c9(ge.params),St=yl(),er=J(f,H=>qs(Da(H,g.name))+Oe),lr=Kx(g.schema),Kr=H=>J(R(M(H,"id"),de),ce=>{let ve=R(lr,Ce=>R(M(H,Ce),de));return ve!==void 0?UIe(ce,ve):ce}),yi=H=>lr!==void 0?B3(H)[0]:H,xi=H=>{if(lr===void 0)return dt([["id",H]]);let ce=B3(H),ve=ce[1],Ce=ce[0];return dt(ve!==void 0?[["id",Ce],["subId",ve]]:[["id",Ce]])},qt=d!==void 0?d:C,Tn=H=>f!==void 0?St(na(f,g.name,H,[])+Oe):k(ce=>H),ji=()=>er!==void 0?St(er):k(H=>{}),Al=vx(g.schema),xo=p9(g.schema),Ns=Al.hasFilter||Al.hasSort||Al.hasSearch,Et=To(g.schema,void 0),Er=[];Ge(ge.params).forEach(H=>{let ce=H[1];if(ce==="")return;let ve=H[0];if(ve==="after"||ve==="before"){Er.push(ve+"="+ce);return}if(!Ns)return;if(ve==="sort"||ve==="dir"){Er.push(ve+"="+ce);return}if(ve==="q"&&xo.search){Er.push(ve+"="+ce);return}if(!ve.startsWith("f."))return;let Ce=ve.slice(2);if(fe(Et.find(Me=>Me.key===Ce),!1,Me=>lD(Me).filter)){Er.push(ve+"="+ce);return}});let Hr=Er.toSorted((H,ce)=>H===ce?0:H<ce?-1:1).join("|"),xn={};if(Ns){let H={};Ge(ge.params).forEach(Wr=>{let tn=Wr[0];if(tn.startsWith("f.")){H[tn.slice(2)]=Wr[1];return}});let ce=uD(H,Et),ve=D(ge.get("q"),""),Ce=V6e(ce[0],ve,xo,Et),Me=ge.get("dir")==="desc"?"Desc":"Asc",yt=cD(ge.get("sort"),Me,Et),_r=K6e(yt);ae(Ce,Wr=>{xn.filter=Wr}),ae(_r,Wr=>{xn.orderBy=Wr})}oMe(ge.get("after"),ge.get("before"),xpe).forEach(H=>{xn[H[0]]=H[1]});let wr=tL(g,xn,Hr,void 0,()=>A(H=>({})),void 0),bt=wr.refetch,Mr=wr.fetchState,Xn=wr.pageInfo,tr=wr.setRows,$n=wr.rows,Sn=H=>{if(a!==void 0&&l!==void 0&&_!==void 0){P(ce=>"Loading"),Vt(_(a,xi(H)).then(ce=>{let ve=R(Y(ce),Je=>M(Je,l)),Ce=0;return ve!==void 0&&rt(ve)!=="JSONNull"?(A(Je=>{let Me=dt(Ge(Je));return Me[H]=ve,Me}),P(Je=>"Loaded")):Ce=1,Ce===1&&(A(Je=>dt(Ge(Je).filter(Me=>Me[0]!==H))),P(Je=>({TAG:"Error",_0:"Detail not found"}))),Promise.resolve()}),ce=>(P(ve=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}};Te(()=>{let H=d!==void 0?d:C;H!==void 0&&(Pi(M(N,H))?Sn(H):P(ce=>"Loaded"))},[d,C]);let en=ws(),wa=hm(),Yo=O2(),qi=fe(R(As(),H=>H.identity),[],H=>H.groups),Xo=(H,ce)=>J(fm(f9(g.schema,ce,g.commands),ve=>h9(ve.command,qi)),ve=>(()=>E(Ce=>({command:ve.command,rowId:H})))),wt=(H,ce)=>R(R(M(H,"id"),de),ve=>Xo(ve,ce)),qu=(p!==void 0?p:$n).map(H=>D(Y(H),{})),qv=Xh(qu,Et,en),Ca={lookupLabel:(H,ce)=>Yh(qv,H,en,ce),isMissing:(H,ce)=>Ym(qv,H,en,ce)},vp=Nne(ge.get("after"),ge.get("before")),Vu=Dne(Xn,vp),zd=Fne(Xn,vp),Ku=Vu||zd,H9=J(f,H=>({pluginId:H,viewName:g.name})),Q2=Rne(Et,en,wa,M,!0,Ca,H9,wt).map(H=>{if(!H.sortable||!Ku)return H;let ce=fe(Et.find(ve=>ve.key===H.key),!1,ve=>lD(ve).sort);return{key:H.key,label:H.label,render:H.render,sortable:ce,width:H.width}}),Y2=ge.get("sort"),_p=ge.get("dir")==="desc"?"Desc":"Asc",X2=H=>tr(ce=>ce.map(ve=>{let Ce=R(R(Y(ve),Me=>M(Me,"id")),de);if(Ce===void 0)return ve;let Je=H.find(Me=>We(R(R(Y(Me),yt=>M(yt,"id")),de),Ce));return Je!==void 0?Je:ve})),bp=i!==void 0?oe($n,H=>R(R(Y(H),ce=>M(ce,i)),de)):[],W9=H=>{let ce=Xn.hasNextPage,ve=bp.length;if(H===void 0||i===void 0||!ce||ve<=0)return!1;let Ce=bp[0];if(_p==="Asc"){let Me=it(bp,Ce,(yt,_r)=>yt>_r?yt:_r);return H>Me}let Je=it(bp,Ce,(Me,yt)=>Me<yt?Me:yt);return H<Je},G9=()=>{let H=Object.keys(Ve.current);if(Ve.current={},Ke.current=void 0,H.length!==0){if(H.length>10)return bt();if(s!==void 0&&o!==void 0&&_!==void 0){let ce=dt([["ids",H.map(ve=>ve)]]);Vt(_(o,ce).then(ve=>{let Ce=D(R(R(Y(ve),Je=>M(Je,s)),mr),[]);return X2(Ce),Promise.resolve()}),ve=>Promise.resolve());return}if(lr!==void 0||l===void 0||a===void 0||_===void 0)return bt();H.forEach(ce=>{let ve=dt([["id",ce]]);Vt(_(a,ve).then(Ce=>{let Je=R(Y(Ce),Me=>M(Me,l));return Je!==void 0&&rt(Je)!=="JSONNull"&&X2([Je]),Promise.resolve()}),Ce=>Promise.resolve())})}},Z2=H=>{Ve.current[H]=!0;let ce=Ke.current;ce!==void 0&&clearTimeout(ce),Ke.current=setTimeout(G9,150)},ek=H=>{let ce=ve=>R(R(Y(ve),Ce=>M(Ce,"id")),de);tr(ve=>{let Ce=ve.map(yt=>{let _r=ce(yt);if(_r===void 0)return yt;let Wr=H.find(tn=>We(ce(tn),_r));return Wr!==void 0?Wr:yt}),Je=oe(Ce,ce),Me=H.filter(yt=>{let _r=ce(yt);return _r!==void 0?!Je.includes(_r):!1});return Ce.concat(Me)})},J9=H=>{let ce=$n.some(Ce=>We(R(R(Y(Ce),Je=>M(Je,"id")),de),H.id));switch(H.changeKind){case"Added":if(jt(H.id)){if(pt.current.delete(H.id),ce)return;{let Ce=H.id;if(lr!==void 0)return bt();if(s!==void 0&&o!==void 0&&_!==void 0){let Me=dt([["ids",[Ce]]]);Vt(_(o,Me).then(yt=>{let _r=D(R(R(Y(yt),Wr=>M(Wr,s)),mr),[]);return ek(_r),Promise.resolve()}),yt=>Promise.resolve());return}if(l===void 0||a===void 0||_===void 0)return bt();let Je=dt([["id",Ce]]);Vt(_(a,Je).then(Me=>{let yt=R(Y(Me),_r=>M(_r,l));return yt!==void 0&&rt(yt)!=="JSONNull"&&ek([yt]),Promise.resolve()}),Me=>Promise.resolve());return}}else return W9(H.sortKeyValue)?void 0:he(Ce=>Ce+1|0);case"Updated":return ce?Z2(H.id):void 0;case"Removed":return ce?lr!==void 0?Z2(H.id):tr(Ce=>Ce.filter(Je=>qf(R(R(Y(Je),Me=>M(Me,"id")),de),H.id))):void 0;case"BulkInvalidated":return he(Ce=>0),bt()}},Q9=()=>bt();V1(g.queryField,"All",Ae,J9,Q9);let Y9=H=>{if(qt===void 0||H.id!==yi(qt))return;let ce=H.changeKind;if(lr!==void 0)switch(ce){case"Updated":case"Removed":return Sn(qt);case"Added":case"BulkInvalidated":return}else switch(ce){case"Updated":return Sn(qt);case"Removed":return B(ve=>qt);case"Added":case"BulkInvalidated":return}},X9=()=>{if(qt!==void 0&&a!==void 0&&l!==void 0&&_!==void 0){Vt(_(a,xi(qt)).then(H=>{let ce=R(Y(H),Ce=>M(Ce,l)),ve=0;return ce!==void 0&&rt(ce)!=="JSONNull"?(A(Ce=>{let Je=dt(Ge(Ce));return Je[qt]=ce,Je}),P(Ce=>"Loaded")):ve=1,ve===1&&B(Ce=>qt),Promise.resolve()}),H=>Promise.resolve());return}};V1(g.queryField,{_0:D(J(qt,yi),"")},Ae&&Le(qt),Y9,X9),Te(()=>{B(H=>{})},[D(qt,"")]);let Vv=D(ge.get("q"),""),Kv={};Ge(ge.params).forEach(H=>{let ce=H[0];if(ce.startsWith("f.")){Kv[ce.slice(2)]=H[1];return}});let tk=yIe(Et,Kv),Z9=tk.length!==0,e7=J(Y2,H=>({key:H,direction:_p==="Asc"?"Asc":"Desc"})),t7=(H,ce)=>{let ve=ce==="Asc"?"asc":"desc";ge.setMany([["sort",H],["dir",ve],["after",""],["before",""]])},rk=H=>ge.setMany([["q",H],["after",""],["before",""]]),r7=(H,ce)=>ge.setMany([["f."+H,ce],["after",""],["before",""]]),n7=()=>ae(Xn.endCursor,H=>ge.setMany([["after",H],["before",""]])),i7=()=>ae(Xn.startCursor,H=>ge.setMany([["before",H],["after",""]])),Ud=g.commands.filter(H=>H.level==="Instance"),o7=Ud.length!==0,Hu;if(o7){let ve={key:"__actions",label:"",render:Ce=>{let Je=R(M(Ce,"id"),de),Me=g.statusField;Me!==void 0&&(M(Ce,Me)!==void 0?Go(Ce,Me)===void 0&&lMe(f,g.name,Me):aMe(f,g.name,Me));let _r=eL(Ud,Ce,g.statusField).map(Wr=>({TAG:"Action",label:Wr.label,onClick:()=>E(tn=>({command:Wr,rowId:Je})),danger:!1}));return b(sPe,{items:_r,triggerLabel:"..."})},sortable:!1,width:"56px"};Hu=Q2.concat([ve])}else Hu=Q2;let s7=g.commands.filter(H=>H.level==="Collection"),nk=H=>{let ce=H.map(_r=>D(Y(_r),{})),ve=uD(Kv,Et),Je=Ns&&xo.search?"":Vv,Me=cD(Y2,_p,Et),yt;return yt=typeof Me!="object"||Me.TAG==="ServerSort"?[void 0,_p]:[Me._0,Me._1],bIe(_Ie(vIe(ce,Et,ve[1]),Et,Je),Et,yt[0],yt[1])},ik=H=>{if(ar!==void 0&&ar.id!==aa){let ce=jr(g.schema,R(r,So=>hl(So,g.name)),{field:g.labelField,source:g.labelFieldSource}),ve=J(ce.statusField,So=>U2(So,Ud,R($e,Aa=>Aa.transitions))),Ce=M2(_,Ud,g.name,Ae,()=>bt(),en,Yo.onNotice,gt),Je=nk(H).map(So=>So),Me=FV(zd,Vu);if(t!==void 0&&ar.id===yf){let So=jr(t.resource.schema,R(r,Aa=>hl(Aa,t.resource.name)),{field:t.resource.labelField,source:t.resource.labelFieldSource});return b(W6e,{mode:ar,resource:t.resource,resourceSemantics:So,resourceRef:t.resourceRef,assignCommand:s9(Ud,t.resourceRef),eventReadModelName:g.name,eventSchema:g.schema,eventRows:Je,eventWindow:Me,eventSemantics:ce,eventAccent:R($e,Aa=>Aa.accent),onOpenEvent:(Aa,d7)=>ae(R(Y(d7),Kr),Tn),onCommand:Ce})}let yt=g.name,_r=g.schema,Wr=R($e,So=>So.accent),tn=Me,Ds=(So,Aa)=>ae(R(Y(Aa),Kr),Tn),yp=J(ve,So=>Ce),Gv={readModelName:yt,rows:Je,schema:_r,semantics:ce,accent:Wr,window:tn,onOpenRow:Ds,onCommand:yp,statusCommandFor:ve,fillSlot:Xo};return ar.render([Gv])}else{let ce=nk(H),ve=J(h,tn=>(Ds=>ae(Kr(Ds),Tn))),Ce=tn=>D(Kr(tn),JSON.stringify(tn)),Je=(tn,Ds)=>{let yp=Ds.map(Ce),Wv={};return yp.forEach(Gv=>{Wv[Gv]=!0}),Object.keys(Wv).length!==yp.length&&uMe(f,g.name),b(ng,{columns:tn,data:Ds,keyFn:Ce,sortState:e7,onSort:t7,onRowClick:ve,activeKey:qt})},Me=RK(g.schema);if(Me===void 0)return Je(Hu,ce);let yt=mPe(ce,Me,qo(g.schema,Me)),_r=yt.length;if(_r===1||_r===0)return Je(Hu,ce);let Wr=Hu.filter(tn=>tn.key!==Me);return b("div",{children:yt.map(tn=>{let Ds=tn[0];return L("div",{children:[b("div",{children:mt(Ds),className:tMe}),Je(Wr,tn[1])],className:eMe},Ds)}),className:Z6e})}},a7=p!==void 0?ik(p):typeof Mr!="object"?Mr==="Loading"?b(zf,{}):ik($n):b(Ua,{detail:Mr._0,onRetry:()=>bt()}),Ra;if(qt!==void 0&&h!==void 0){let ce=(p!==void 0?p:$n).find(Je=>We(R(Y(Je),Kr),qt)),ve=M(N,qt);Ra=[qt,h,ve!==void 0?ve:ce]}else Ra=void 0;let ok=H=>{let ce=H[2],ve=H[0];if(We(V,ve))return b(Ua,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>ji()});if(ce!==void 0)return H[1](yi(ve),m,or(ce));let Ce=0;if(typeof Mr!="object"){if(Mr==="Loading")return b(zf,{});if(typeof I=="object")return b(Ua,{detail:I._0,onRetry:()=>bt()});if(I!=="Loading")return b(Ua,{title:"Row not found",detail:"The row data is no longer in the current page."});Ce=2}else Ce=2;return Ce===2&&typeof I!="object"&&I==="Loading"?b(zf,{}):b(Ua,{detail:Mr._0,onRetry:()=>bt()})},l7=$r?b("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(H=>{let ce=H[1],ve=H[0],Ce;return Ce=le==="Full"?ve==="full":ve==="split",L("button",{children:[b("span",{children:H[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),b("span",{children:ce})],className:Ce?hf.Style.btnActive:hf.Style.btn,title:ce,onClick:Je=>{hD(Yn,ve),j(Me=>ve)}},ve)}),"aria-label":"Layout",className:hf.Style.group,role:"group"}):null,sk=L("div",{children:[b("h2",{children:g.name,className:Y6e}),L("div",{children:[we.length>1?b(hf.make,{modes:we,activeId:fe(ar,aa,H=>H.id),onSelect:Qn}):null,l7,b(kOe,{live:se,canBeLive:Q,reconnecting:xe,onToggle:be}),s7.map(H=>b("button",{children:"+ "+H.label,className:rMe,onClick:ce=>E(ve=>({command:H,rowId:void 0}))},H.name))],className:X6e})],className:pD}),u7=L(Br,{children:[Z9?b(Gz,{filters:tk,onFilterChange:r7,searchValue:Vv,onSearchChange:rk}):b(Wz,{value:Vv,onChange:rk}),qe>0?b(TOe,{count:qe,onClick:()=>{he(H=>0),ge.setMany([["after",""],["before",""]]),bt()}}):null]}),c7=Ku?L("div",{children:[b("button",{children:"‹ Prev",className:gD,disabled:!zd,onClick:H=>i7()}),b("button",{children:"Next ›",className:gD,disabled:!Vu,onClick:H=>n7()})],className:iMe}):null,ak=L(Br,{children:[u7,Yo.element,a7,c7]}),Hv;if(le==="Full")Hv=Ra!==void 0?b(dD.make,{refresh:()=>bt(),children:L("div",{children:[b("div",{children:b("button",{children:"← "+g.name,className:nMe,onClick:H=>ji()}),className:pD}),ok([Ra[0],Ra[1],Ra[2]])],className:vy})}):L("div",{children:[sk,ak],className:vy});else{let H=Ra!==void 0?ok(Ra):b(ld,{title:"Select an item",description:"Choose a row on the left to see its details here."});Hv=b(dD.make,{refresh:()=>bt(),children:L("div",{children:[sk,b(cPe,{master:ak,detail:H})],className:vy})})}return L(Br,{children:[Hv,fe(y[0],null,H=>b(y2,{isOpen:!0,onClose:()=>E(ce=>{}),title:H.command.label,children:b(q2,{schema:H.command.schema,aggregateId:H.rowId,aggregateIdField:H.command.aggregateIdField,injectNewId:H.command.level==="Collection",refFields:H.command.refFields,onSubmit:ce=>{if(_!==void 0){let ve=H.rowId;return ve!==void 0?gt(ve):ae(M(ce,D(H.command.aggregateIdField,"id")),gt),Vt(_(H.command.mutationDocument,sMe(H.command.schema,ce)).then(Ce=>{let Je=Ad(Ce);if(typeof Je!="object")return Je==="Accepted"?(E(Me=>{}),Ae||bt(),Promise.resolve("Ok")):(E(Me=>{}),Ae||setTimeout(()=>bt(),ZIe),Promise.resolve("Ok"));{let Me=Je._0;return gp(_,en,Me.errorCode,Me.detail).then(yt=>Promise.resolve({TAG:"Err",_0:yt}))}}),Ce=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return E(ve=>{}),Promise.resolve("Ok")},submitLabel:"Execute"})}))]})}let dMe=cMe;function fMe(e,t,r){if(e.length<2)return[];let n=it(e,Number.MAX_VALUE,(a,l)=>a<l?a:l),o=it(e,Number.MIN_VALUE,(a,l)=>a>l?a:l)-n,s=t/(e.length-1|0);return e.map((a,l)=>({x:l*s,y:o===0?r/2:r-(a-n)/o*r}))}function hMe(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function pMe(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,s=t!==void 0?t:"",a=fMe(e.values,i,o),l=s===""?"var("+x.brand+")":s;return a.length<2?null:b("svg",{children:b("polyline",{fill:"none",points:hMe(a),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 gMe=pMe;function qn(e){return"var("+e+")"}let mMe=w([z("flex"),me("column"),c("gap",qn(F.xs)),c("padding",qn(F.lg)),c("background",qn(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",qn(Z.md))]),vMe=w([c("color",qn(x.textSecondary)),c("font-size",qn(T.sizeSm)),c("font-weight",qn(T.weightMedium))]),_Me=w([z("flex"),ee("baseline"),c("gap",qn(F.sm))]),bMe=w([c("color",qn(x.textPrimary)),c("font-size",qn(T.sizeXxl)),c("font-weight",qn(T.weightBold)),c("line-height",qn(T.lineHeightTight))]);function yMe(e){switch(e){case"Up":return x.success;case"Down":return x.error;case"Neutral":return x.textDisabled}}function xMe(e){return w([c("color",qn(yMe(e))),c("font-size",qn(T.sizeSm)),c("font-weight",qn(T.weightMedium))])}function SMe(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:xMe(r)})}else n=null;return L("div",{children:[b("div",{children:e.label,className:vMe}),L("div",{children:[b("span",{children:e.value,className:bMe}),n],className:_Me}),fe(e.sublabel,null,i=>b("div",{children:i,style:{color:"var("+x.textDisabled+")",fontSize:"var("+T.sizeXs+")"}})),D(e.footer,null)],className:mMe})}let EMe=SMe;function m9(e){return"var("+e+")"}let wMe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",m9(F.md))]),kMe=w([Ee("pointer"),c("border-radius",m9(Z.md)),He([c("filter","brightness(0.98)")])]);function CMe(e){let t=e.kpis;return t.length===0?null:b("div",{children:t.map(r=>{let n=J(r.spark,s=>b(gMe,{values:s,width:120,height:24})),i=b(EMe,{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:kMe,role:"button",tabIndex:0,onKeyDown:s=>{if(s.key==="Enter")return o()},onClick:s=>o()},r.key):b("div",{children:i},r.key)}),className:wMe})}let RMe=CMe,sm=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function v9(e,t){return D(e.color,sm[Lo(t,sm.length)])}function AMe(e){let t=it(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 R0(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function zr(e){return(Math.round(e*1e3)/1e3).toString()}function _y(e,t,r,n,i,o){let s=R0(e,t,r,i),a=s[1],l=s[0],u=R0(e,t,r,o),d=u[1],f=u[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+zr(e)+" "+zr(t)+" L "+zr(l)+" "+zr(a)+" A "+zr(r)+" "+zr(r)+" 0 "+h+" 1 "+zr(f)+" "+zr(d)+" Z";let p=R0(e,t,n,i),g=R0(e,t,n,o);return"M "+zr(l)+" "+zr(a)+" A "+zr(r)+" "+zr(r)+" 0 "+h+" 1 "+zr(f)+" "+zr(d)+" L "+zr(g[0])+" "+zr(g[1])+" A "+zr(n)+" "+zr(n)+" 0 "+h+" 0 "+zr(p[0])+" "+zr(p[1])+" Z"}function TMe(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,s=AMe(n);if(s.length===0)return null;let a=i/2,l=i/2-1,u=o>0?l*o:0;return b("svg",{children:s.map((d,f)=>{let h=d[1],p=d[0],g=n[f],m=v9(g,f),v=h-p>=.999?_y(a,a,l,u,p,p+.5)+" "+_y(a,a,l,u,p+.5,h):_y(a,a,l,u,p,h);return b("path",{children:b("title",{children:g.label}),d:v,fill:m},g.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let $Me=TMe,NMe=["var("+x.brand+")","var("+x.success+")"];function DMe(e){let t=e.flatMap(i=>i.values),r=it(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=it(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function FMe(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(g=>g.values.length<2))return null;let s=DMe(n),a=s[0],l=s[1]-a,u=l===0?1:l,d=o-16,f=it(n,0,(g,m)=>g>m.values.length?g:m.values.length),h=i/(f-1|0),p=8+d;return b("svg",{children:n.map((g,m)=>{let v=D(g.color,D(NMe[m],"var("+x.brand+")")),y=g.values.map((k,C)=>{let $=C*h,A=8+d-(k-a)/u*d;return[$,A]}).map(k=>k[0].toString()+","+k[1].toString()).join(" "),E=(g.values.length-1|0)*h,S="0,"+p.toString()+" "+y+(" "+E.toString()+","+p.toString());return L("g",{children:[b("polygon",{fill:v,fillOpacity:"0.15",points:S,stroke:"none"}),b("polyline",{fill:"none",points:y,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},g.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let IMe=FMe;function PMe(e){let t=e.size,r=t!==void 0?t:120;return b($Me,{slices:e.slices,size:r,innerRatio:.6})}let OMe=PMe;function tu(e){return"var("+e+")"}function MMe(e){return w([z("flex"),me("column"),ee("center"),c("gap","2px"),c("width","100%"),c("max-width",e.toString()+"px")])}let LMe=w([Pt("relative"),c("width","100%"),c("line-height","0")]),zMe=w([Pt("absolute"),c("left","0"),c("right","0"),c("bottom","0"),c("text-align","center"),c("line-height","1.1"),c("font-size",tu(T.sizeXl)),c("font-weight",tu(T.weightMedium)),c("color",tu(x.textPrimary))]),UMe=w([z("flex"),Ye("spaceBetween"),c("width","100%"),c("font-size",tu(T.sizeXs)),c("color",tu(x.textDisabled))]),BMe=w([c("font-size",tu(T.sizeSm)),c("color",tu(x.textSecondary))]);function jMe(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function En(e){return(Math.round(e*100)/100).toString()}function bD(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function yD(e,t,r,n,i){let o=bD(e,t,r,n),s=bD(e,t,r,i);return"M "+En(o[0])+" "+En(o[1])+" A "+En(r)+" "+En(r)+" 0 0 1 "+En(s[0])+" "+En(s[1])}function qMe(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,s=i!==void 0?i:0,a=t!==void 0?t:160;if(n<=s)return null;let l=jMe(o,s,n),u=a*.09,d=a/2,f=a/2-u/2,h=f+u/2,p=h+u/2;return L("div",{children:[L("div",{children:[L("svg",{children:[b("path",{d:yD(d,h,f,0,1),fill:"none",stroke:"var("+x.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:En(u)}),l<=0?null:b("path",{d:yD(d,h,f,0,l),fill:"none",stroke:"var("+x.brand+")",strokeLinecap:"round",strokeWidth:En(u)})],"aria-label":En(o)+" of "+En(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:En(p),width:En(a),viewBox:"0 0 "+En(a)+" "+En(p)}),b("div",{children:D(e.display,En(o)),className:zMe})],className:LMe}),L("div",{children:[b("span",{children:En(s)}),b("span",{children:En(n)})],className:UMe}),r!==void 0?b("div",{children:r,className:BMe}):null],className:MMe(a)})}let VMe=qMe;function Uf(e){return"var("+e+")"}let KMe=w([z("flex"),me("column"),c("gap","6px")]),HMe=w([c("overflow-x","auto")]),WMe=w([z("flex"),c("gap","4px"),ee("flexStart")]);function GMe(e){return w([z("grid"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px"),ee("center"),c("font-size",Uf(T.sizeXs)),c("color",Uf(x.textDisabled)),c("line-height","1")])}function JMe(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 QMe(e){return w([c("border-radius","2px"),c("border","1px solid var("+x.borderSubtle+")"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let YMe=w([c("visibility","hidden")]),XMe=w([z("flex"),ee("center"),gi("wrap"),c("gap",Uf(F.md)),c("font-size",Uf(T.sizeXs)),c("color",Uf(x.textSecondary))]),ZMe=w([z("flex"),ee("center"),c("gap","4px")]);function e4e(e){return w([c("width","10px"),c("height","10px"),c("border-radius","2px"),c("border","1px solid var("+x.borderSubtle+")"),c("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function t4e(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function r4e(e){let t=e[0];if(t===void 0)return[];let r=nl(t4e(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return nl(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function n4e(e){return it(e,0,(t,r)=>r.value>t?r.value:t)}function xD(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function i4e(e){return e%2===0?D(xw[e],""):""}function o4e(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=r4e(r);if(i.length===0)return null;let o=n4e(r),s=r[0],a=r[r.length-1|0],l=s!==void 0&&a!==void 0?Xi(s.time)+" – "+Xi(a.time):"";return L("div",{children:[b("div",{children:L("div",{children:[b("div",{children:nl(7,u=>b("span",{children:i4e(u)},u.toString())),className:GMe(n)}),b("div",{children:i.map((u,d)=>u.map((f,h)=>f!==void 0?b("div",{className:QMe(az(f.value,o)),title:la(f.time)+" "+Xi(f.time)+": "+xD(f.value)},f.time.toString()):b("div",{className:YMe},"b:"+d.toString()+":"+h.toString()))),className:JMe(n)})],className:WMe}),className:HMe}),L("div",{children:[b("span",{children:l}),L("span",{children:["less",lz.map(u=>b("span",{className:e4e(u)},u.toString())),"more (max "+xD(o)+")"],className:ZMe})],className:XMe})],className:KMe})}let s4e=o4e;function hi(e){return"var("+e+")"}let a4e=w([z("flex"),me("column"),c("gap","2px")]),l4e=w([z("flex"),me("column"),c("gap","3px")]),u4e=w([z("flex"),Ye("spaceBetween"),ee("baseline"),c("gap",hi(F.sm)),c("font-size",hi(T.sizeSm))]),c4e=w([c("color",hi(x.textPrimary))]),d4e=w([c("color",hi(x.textPrimary)),c("font-weight",hi(T.weightMedium)),c("white-space","nowrap")]),f4e=w([c("color",hi(x.textSecondary)),c("font-weight",hi(T.weightNormal))]),h4e=w([c("background",hi(x.surfaceSubtle)),c("border-radius",hi(Z.sm)),c("height","14px"),ua("hidden")]);function p4e(e,t){return w([c("background",t),c("border-radius",hi(Z.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let g4e=w([c("padding","2px 0 4px"),c("font-size",hi(T.sizeXs)),c("color",hi(x.textDisabled))]),m4e=w([c("padding-top","4px"),c("font-size",hi(T.sizeXs)),c("color",hi(x.textDisabled))]);function SD(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function v4e(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function _4e(e){let t=fe(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:SD(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?SD(i.value-r.value,i.value):void 0}})}function b4e(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=_4e(t),i=fe(t[0],0,o=>o.value);return L("div",{children:[t.map((o,s)=>{let a=n[s],l=i<=0?0:o.value/i*100,u=R(a,d=>d.dropOff);return L("div",{children:[u!==void 0?b("div",{children:"↓ "+u.toString()+"% drop-off",className:g4e}):null,L("div",{children:[L("div",{children:[b("span",{children:o.label,className:c4e}),L("span",{children:[v4e(o.value),s===0?null:b("span",{children:" · "+fe(a,0,d=>d.conversion).toString()+"%",className:f4e})],className:d4e})],className:u4e}),b("div",{children:b("div",{className:p4e(l,D(o.color,"var("+x.brand+")"))}),className:h4e})],className:l4e})]},o.label+":"+s.toString())}),r!==void 0?b("div",{children:r,className:m4e}):null],className:a4e})}let y4e=b4e;function Bf(e){return"var("+e+")"}let x4e=w([z("flex"),me("column"),c("gap","2px")]),S4e=w([z("flex"),c("gap","4px")]),_9=[c("font-size",Bf(T.sizeXs)),c("color",Bf(x.textDisabled)),c("white-space","nowrap")],E4e=w(_9.concat([z("flex"),me("column"),Ye("spaceBetween"),c("text-align","right")]));function w4e(e){return w(_9.concat([z("flex"),Ye("spaceBetween"),c("margin-left",e.toString()+"px")]))}let k4e=w([z("flex"),Ye("spaceBetween"),c("gap",Bf(F.sm)),c("font-size",Bf(T.sizeXs)),c("color",Bf(x.textSecondary))]);function C4e(e){let t=e[0];if(t!==void 0)return it(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 Dr(e){return(Math.round(e*100)/100).toString()}function ED(e,t,r){return r<=t?.5:(e-t)/(r-t)}function R4e(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,s=r!==void 0?r:320,a=t!==void 0?t:200,l=C4e(o);if(l===void 0)return null;let u=3.5+1,d=s-u*2,f=a-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:"↑ "+D(n,"y")}),b("span",{children:D(i,"x")+" →"})],className:k4e})),L("div",{children:[L("div",{children:[L("div",{children:[b("span",{children:Dr(l.yMax)}),b("span",{children:Dr(l.yMin)})],className:E4e,style:{width:"34px"}}),L("svg",{children:[b("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Dr(u),x2:Dr(s-u),y1:Dr(a-u),y2:Dr(a-u)}),b("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Dr(u),x2:Dr(u),y1:Dr(u),y2:Dr(a-u)}),o.map((g,m)=>{let v=u+ED(g.x,l.xMin,l.xMax)*d,_=u+(1-ED(g.y,l.yMin,l.yMax))*f;return b("circle",{children:b("title",{children:g.label+" — "+D(i,"x")+": "+Dr(g.x)+", "+D(n,"y")+": "+Dr(g.y)}),cx:Dr(v),cy:Dr(_),fill:D(g.color,"var("+x.brand+")"),fillOpacity:"0.75",r:Dr(3.5)},g.label+":"+m.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Dr(a),width:Dr(s),viewBox:"0 0 "+Dr(s)+" "+Dr(a)})],className:S4e}),L("div",{children:[b("span",{children:Dr(l.xMin)}),b("span",{children:Dr(l.xMax)})],className:w4e(38)}),h],className:x4e})}let A4e=R4e;function Mo(e){return"var("+e+")"}let T4e=w([z("flex"),me("column"),c("gap","6px"),yn(Re(0)),c("padding","0"),c("list-style","none")]),b9=[z("grid"),c("grid-template-columns","1.5rem 1fr auto"),ee("center"),c("gap",Mo(F.sm)),c("font-size",Mo(T.sizeSm)),c("color",Mo(x.textPrimary))],$4e=w(b9),N4e=w(b9.concat([Ee("pointer"),c("background","transparent"),c("border","none"),c("padding","2px 0"),c("text-align","left"),c("width","100%"),c("font","inherit"),He([c("color",Mo(x.brand))])])),D4e=w([c("align-self","start"),c("font-size",Mo(T.sizeXs)),c("color",Mo(x.textDisabled)),c("text-align","right"),c("font-variant-numeric","tabular-nums")]),F4e=w([z("flex"),me("column"),c("gap","3px"),PF(Re(0))]),I4e=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),P4e=w([c("background",Mo(x.surfaceSubtle)),c("border-radius",Mo(Z.sm)),c("height","6px"),ua("hidden")]);function O4e(e){return w([c("background",Mo(x.brand)),c("border-radius",Mo(Z.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let M4e=w([c("align-self","start"),c("font-weight",Mo(T.weightMedium)),c("white-space","nowrap"),c("font-variant-numeric","tabular-nums")]);function L4e(e,t){return t<=0||e<=0?0:e/t*100}function z4e(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=it(n,0,(o,s)=>s.value>o?s.value:o);return b("ol",{children:n.map((o,s)=>{let a=L(Br,{children:[b("span",{children:(s+1|0).toString(),className:D4e}),L("span",{children:[b("span",{children:o.label,className:I4e,title:o.label}),b("span",{children:b("span",{className:O4e(L4e(o.value,i))}),className:P4e})],className:F4e}),b("span",{children:o.display,className:M4e})]}),l=o.onOpen;return b("li",{children:l!==void 0?b("button",{children:a,className:N4e,type:"button",onClick:u=>l()}):b("div",{children:a,className:$4e})},o.key)}),className:T4e})}let U4e=z4e;function B4e(e){return it(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function j4e(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 s=it(n,0,(f,h)=>{let p=B4e(h);return f>p?f:p}),a=s===0?1:s,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),g={contents:o};return b("g",{children:f.segments.map((m,v)=>{let _=m.value>0?m.value:0,y=_/a*d,E=g.contents-y;return g.contents=E,_===0?null:b("rect",{children:b("title",{children:f.label+" — "+m.key+": "+_.toString()}),height:y.toString(),width:u.toString(),fill:D(m.color,"var("+x.brand+")"),x:p.toString(),y:E.toString()},m.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 q4e=j4e;function pr(e){return"var("+e+")"}let V4e=w([z("flex"),me("column"),c("gap",pr(F.lg))]),K4e=w([c("font-size",pr(T.sizeXl)),c("font-weight",pr(T.weightMedium)),c("color",pr(x.textPrimary)),yn(Re(0))]),H4e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),c("gap",pr(F.md))]),cc=w([z("flex"),me("column"),c("gap",pr(F.sm)),c("padding",pr(F.lg)),c("background",pr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",pr(Z.md))]),dc=w([c("font-size",pr(T.sizeSm)),c("font-weight",pr(T.weightMedium)),c("color",pr(x.textSecondary))]),W4e=w([z("flex"),ee("center"),c("gap",pr(F.lg))]),wD=w([z("flex"),me("column"),c("gap","4px"),c("font-size",pr(T.sizeSm)),c("color",pr(x.textSecondary))]),kD=w([z("flex"),ee("center"),c("gap","6px")]);function CD(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let RD=w([c("font-size",pr(T.sizeXs)),c("color",pr(x.textDisabled))]),G4e=w([z("flex"),Ye("spaceBetween"),ee("center"),c("gap",pr(F.sm))]),J4e=w([z("inlineFlex"),c("gap",pr(F.xs))]);function Q4e(e){return w([c("background",e?pr(x.surfaceSubtle):"transparent"),c("border","1px solid var("+x.border+")"),c("border-radius",pr(Z.sm)),c("padding","2px var("+F.sm+")"),c("font-size",pr(T.sizeXs)),c("color",pr(e?x.textPrimary:x.textSecondary)),Ee("pointer")])}function am(e,t){return R(M(e,t),_s)}function mp(e){return e.map(t=>D(Y(t),{}))}function _x(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=oe(mp(e),o=>am(o,r)),i=it(n,0,(o,s)=>o+s);return t==="sum"?i:n.length===0?0:i/n.length}function lm(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function Y4e(e,t,r){return jF(e,r&&(t==="count"||t==="sum"))}function X4e(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 zs(e){let t=D(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 "+mt(n):e.view;case"sum":return n!==void 0?e.view+" — total "+mt(n):e.view;default:return e.view}}function y9(e,t,r,n){let i=nl(r,o=>[]);return mp(e).forEach(o=>ae(R(R(M(o,t),de),zi),s=>{let a=Math.floor((n-s)/864e5)|0;if(a>=0&&a<r)return ae(i[(r-1|0)-a|0],l=>{l.push(o)})})),i}function bx(e,t,r,n,i,o){return y9(e,t,r,n).map(s=>_x(s.map(a=>a),i,o))}function x9(e,t){return oe(mp(e),r=>Go(r,t))}function S9(e,t,r){let n=qo(t,r),i=it(e.filter(o=>!n.includes(o)),[],(o,s)=>o.includes(s)?o:o.concat([s]));return n.concat(i)}function Z4e(e,t,r){let n=x9(e,r);return oe(S9(n,t,r),i=>{let o=n.filter(s=>s===i).length;if(o!==0)return{label:mt(i),value:o}})}function E9(e){return sm[Lo(e,sm.length)]}function eLe(e,t,r,n,i,o){let s=y9(e,t,r,n),a=f=>oe(f,h=>Go(h,o)),l=s.flatMap(a),u=S9(l,i,o).filter(f=>l.some(h=>h===f)),d=s.map((f,h)=>{let p=a(f);return{label:la(n-((r-1|0)-h|0)*864e5),segments:u.map((g,m)=>({key:mt(g),value:p.filter(v=>v===g).length,color:E9(m)}))}});return{statuses:u,bars:d}}function tLe(e,t,r){let n=qo(t,r),i=x9(e,r),o=oe(i,s=>{let a=n.indexOf(s);if(!(a<0))return a});return{stages:n.map((s,a)=>({label:mt(s),value:o.filter(l=>l>=a).length})),excluded:i.length-o.length|0}}function rLe(e,t){return J(Xr(e).find(r=>r[0]===t),r=>r[1])}function w9(e,t){return J(M(e.semantics,t),r=>r.semantic)}function nLe(e,t,r){let n=rLe(e,t);if(n===void 0)return;let i=Hf(n,"maximum");if(i===void 0)return We(w9(r,t),"Percent")?{min:0,max:100}:void 0;let o=D(Hf(n,"minimum"),0);if(i>o)return{min:o,max:i}}function AD(e,t,r){let n=w9(e,t);if(n===void 0)return lm(r);switch(n){case"Currency":return vM(r);case"Percent":return _M(r);case"Bytes":return bM(r);case"Duration":return yM(r);default:return lm(r)}}function iLe(e,t,r,n){return oe(mp(e),i=>J(am(i,t),o=>{let s=D(R(M(i,"id"),de),"");return{id:s,label:D(R(M(i,r),de),s===""?"—":s),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function oLe(e,t,r,n){return oe(mp(e),i=>{let o=am(i,t),s=am(i,r);if(o!==void 0&&s!==void 0)return{label:D(R(M(i,n),de),D(R(M(i,"id"),de),"—")),x:o,y:s}})}function sLe(e,t,r,n,i,o){return bx(e,t,r,n,i,o).map((s,a)=>({time:Vn(n-((r-1|0)-a|0)*Z4),value:s}))}function aLe(e){let t=ue(()=>"Days30"),r=t[1],n=t[0],i=(s,a)=>b("button",{children:a,className:Q4e(n===s),type:"button",onClick:l=>r(u=>s)}),o;return o=n==="Days30"?e.body:b(s4e,{days:e.yearDays}),L("div",{children:[L("div",{children:[b("span",{children:e.title,className:dc}),L("div",{children:[i("Days30","30 days"),i("Year","Year")],className:J4e})],className:G4e}),o],className:cc})}function lLe(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,s=e.pluginId,a=t!==void 0?t:{},l=yl(),u=El(),d=oe(it(o.map(I=>I.view),[],(I,U)=>I.includes(U)?I:I.concat([U])),I=>i.find(U=>U.name===I)),f=d.map(I=>{let U=Xg(a,I.name,u),B=bu(I,U&&Pi(r));return[I,U,B]}),h=I=>r!==void 0?D(M(r,I),[]):fe(f.find(U=>U[0].name===I),[],U=>U[2].rows),p=I=>r!==void 0?!1:fe(f.find(U=>U[0].name===I),!1,U=>U[2].canLoadMore),g=Date.now(),m=oe(o,I=>J(d.find(U=>U.name===I.view?Xg(a,U.name,u):!1),U=>({metric:I,readModel:U,rows:h(U.name),partial:p(U.name),semantics:jr(U.schema,R(n,B=>hl(B,U.name)),{field:U.labelField,source:U.labelFieldSource})}))),v=m.map((I,U)=>{let B=D(I.metric.aggregate,"count"),V=J(I.semantics.dateSpan,W=>bx(I.rows,W.startField,14,g,B,I.metric.field));return{key:U.toString()+":"+I.readModel.name,label:zs(I.metric),value:Y4e(lm(_x(I.rows,B,I.metric.field)),B,I.partial),sublabel:X4e(I.readModel.name,B,I.partial,I.rows.length),spark:V,onOpen:()=>l(qs(Da(s,I.readModel.name)))}}),_=I=>{let U=I.readModel.statusField;return U!==void 0?U:I.semantics.statusField},y=oe(m,I=>J(I.semantics.dateSpan,U=>{let B=D(I.metric.aggregate,"count"),V=zs(I.metric)+" — trend",W=_(I),Q;if(B==="count"&&W!==void 0){let G=eLe(I.rows,U.startField,30,g,I.readModel.schema,W),ne=G.statuses;Q=ne.length===0?void 0:L(Br,{children:[b(q4e,{bars:G.bars}),b("div",{children:ne.map((se,be)=>L("span",{children:[b("span",{className:CD(E9(be))}),mt(se)],className:kD},se)),className:wD})]})}else Q=void 0;let K;if(Q!==void 0)K=Q;else{let G=bx(I.rows,U.startField,30,g,B,I.metric.field);K=b(IMe,{series:[{label:zs(I.metric),values:G}]})}return b(aLe,{title:V,body:K,yearDays:sLe(I.rows,U.startField,365,g,B,I.metric.field)},"trend:"+zs(I.metric))})),E=oe(m,I=>{let U=I.metric.aggregate,B=I.metric.field;if(U==="avg"&&B!==void 0)return J(nLe(I.readModel.schema,B,I.semantics),V=>{let W=_x(I.rows,"avg",B);return L("div",{children:[b("span",{children:zs(I.metric),className:dc}),b(VMe,{value:W,min:V.min,max:V.max,display:AD(I.semantics,B,W),caption:I.readModel.name+" · "+mt(B)})],className:cc},"gauge:"+zs(I.metric))})}),S=[],k=oe(m,I=>{let U=I.metric.aggregate,B=I.metric.field;if(U===void 0)return;switch(U){case"avg":case"sum":break;default:return}if(B===void 0||S.includes(I.readModel.name+":"+B))return;S.push(I.readModel.name+":"+B);let V=iLe(I.rows,B,I.readModel.labelField,10).map(W=>({key:W.id===""?W.label:W.id,label:W.label,display:AD(I.semantics,B,W.value),value:W.value,onOpen:W.id===""?void 0:()=>l(na(s,I.readModel.name,W.id,[]))}));if(V.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — top by "+mt(B),className:dc}),b(U4e,{entries:V})],className:cc},"top:"+I.readModel.name+":"+B)}),C=oe(m,I=>{let U=I.metric.viz,B=I.metric.field,V=I.metric.xField;if(U===void 0||U!=="scatter"||B===void 0||V===void 0)return;let W=oLe(I.rows,V,B,I.readModel.labelField);if(W.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — "+mt(B)+" by "+mt(V),className:dc}),b(A4e,{points:W,xLabel:mt(V),yLabel:mt(B)})],className:cc},"scatter:"+zs(I.metric))}),$=oe(m,I=>{let U=I.metric.viz,B=_(I);if(U===void 0||U!=="funnel"||B===void 0)return;let V=tLe(I.rows,I.readModel.schema,B),W=V.stages;if(W.length===0)return;let Q=V.excluded;return L("div",{children:[b("span",{children:zs(I.metric)+" — "+mt(B)+" funnel",className:dc}),b(y4e,{stages:W,note:Q===0?void 0:Q.toString()+" row(s) with an unlisted "+mt(B)+" excluded"})],className:cc},"funnel:"+zs(I.metric))}),A=oe(m,I=>{let U=D(I.metric.aggregate,"count"),B=We(I.metric.viz,"funnel")?void 0:_(I);if(U!=="count"||B===void 0)return;let V=Z4e(I.rows,I.readModel.schema,B);if(V.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — by "+mt(B),className:dc}),L("div",{children:[b(OMe,{slices:V}),b("div",{children:V.map((W,Q)=>L("span",{children:[b("span",{className:CD(v9(W,Q))}),W.label+" ("+lm(W.value)+")"],className:kD},W.label)),className:wD})],className:W4e})],className:cc},"status:"+I.readModel.name)}),N=(Le(r)?[]:oe(f,I=>{let U=I[0],B=I[2].fetchState;if(I[1])return typeof B!="object"?B==="Loading"?U.name+": loading…":void 0:U.name+": "+B._0})).concat(v2(a,d.map(I=>I.name),u)),O=[$,C,E,y,k,A].flatMap(I=>I),P=it(oe(m,I=>{if(I.partial)return I.readModel.name}),[],(I,U)=>I.includes(U)?I:I.concat([U]));return L("div",{children:[b("h2",{children:"Dashboard",className:K4e}),b(RMe,{kpis:v}),O.length!==0?b("div",{children:O,className:H4e}):null,P.length!==0?b("span",{children:"Figures cover the rows loaded for: "+P.join(", "),className:RD}):null,N.length!==0?b("span",{children:N.join(" · "),className:RD}):null],className:V4e})}let uLe=lLe,k9={actor:"",eventType:"",timeFrom:"",timeTo:""};function TD(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function pn(e){return"var("+e+")"}let cLe=w([z("flex"),me("column"),c("gap",pn(F.sm))]),dLe=w([z("flex"),ee("center"),c("gap",pn(F.md)),gi("wrap"),c("padding-bottom",pn(F.xs)),c("border-bottom","1px solid var("+x.border+")")]),fLe=w([z("flex"),ee("center"),c("gap","4px")]),$D=w([c("color",pn(x.textSecondary)),c("font-size",pn(T.sizeSm)),c("white-space","nowrap")]),ND=w([c("background",pn(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",pn(Z.sm)),c("padding","2px var("+F.sm+")"),c("font-size",pn(T.sizeSm)),c("color",pn(x.textPrimary)),c("outline","none"),fa([c("border-color",pn(x.brand))])]),hLe=w([c("background","none"),c("border","none"),c("padding","0"),c("color",pn(x.brand)),c("font-size",pn(T.sizeSm)),Ee("pointer"),He([c("text-decoration","underline")])]),pLe=w([z("flex"),Ye("center"),c("padding-top",pn(F.xs))]),gLe=w([c("background",pn(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",pn(Z.sm)),c("padding","4px var("+F.md+")"),c("font-size",pn(T.sizeSm)),c("color",pn(x.textPrimary)),Ee("pointer"),He([c("border-color",pn(x.brand))])]);function mLe(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,s=e.filter,a=i!==void 0?i:!1,l=n!==void 0?n:!1,u=t!==void 0?t:"No recorded history for this record",d=oe([["actor","Actor",e.actors.map(h=>({label:h,value:h})),s.actor],["eventType","Event",e.eventTypes.map(h=>({label:mt(h),value:h})),s.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(Gz,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:s.eventType,timeFrom:s.timeFrom,timeTo:s.timeTo});case"eventType":return o({actor:s.actor,eventType:p,timeFrom:s.timeFrom,timeTo:s.timeTo});default:return}}}),L("div",{children:[b("span",{children:"From:",className:$D}),b("input",{className:ND,type:"date",value:s.timeFrom,onChange:h=>o({actor:s.actor,eventType:s.eventType,timeFrom:h.target.value,timeTo:s.timeTo})}),b("span",{children:"To:",className:$D}),b("input",{className:ND,type:"date",value:s.timeTo,onChange:h=>o({actor:s.actor,eventType:s.eventType,timeFrom:s.timeFrom,timeTo:h.target.value})})],className:fLe}),TD(s)?b("button",{children:"Clear filters",className:hLe,onClick:h=>o(k9)}):null],className:dLe}),b(i0e,{entries:e.entries,emptyLabel:TD(s)?"No events match these filters":u,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),a?b("div",{children:b("button",{children:l?"Loading…":"Load earlier events",className:gLe,disabled:l,onClick:h=>ae(r,p=>p())}),className:pLe}):null],className:cLe})}let vLe=mLe;function _Le(e){if(e!=="")return e+"T00:00:00.000Z"}function bLe(e){if(e!=="")return e+"T23:59:59.999Z"}function yLe(e,t,r){let n={};return n.entityId=e,n.first=50,ae(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),ae(_Le(t.timeFrom),i=>{n.timeFrom=i}),ae(bLe(t.timeTo),i=>{n.timeTo=i}),n}function xLe(e){let t=e.entityId,r=e.binding,n=_i(),i=El(),o=fe(e.requiredAccess,!1,I=>!i(I)),s=ue(()=>[]),a=s[1],l=s[0],u=ue(()=>k9),d=u[1],f=u[0],h=ue(()=>!0),p=h[1],g=ue(()=>{}),m=g[1],v=g[0],_=ue(()=>!1),y=_[1],S=ue(()=>{})[1],k=ue(()=>0),C=k[1],$=k[0],A=Qe(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;Te(()=>{if(!o)if(n!==void 0){let I=$===0,U=I?void 0:A.current;p(B=>!0),m(B=>{}),Vt(n(r.queryDocument,yLe(t,f,U)).then(B=>{let V=vTe(B,r.queryField),W=_Te(B,r.queryField),Q=W[1],K=W[0];return a(G=>I?V:V.concat(G)),y(G=>K),S(G=>Q),A.current=Q,p(G=>!1),Promise.resolve()}),B=>(p(V=>!1),m(V=>"Could not load the history for this record."),Promise.resolve()))}else m(I=>"Not connected")},[N,$,o]);let O=I=>{A.current=void 0,C(U=>0),a(U=>[]),d(U=>I)},P=()=>C(I=>I+1|0);return o?null:v!==void 0?b(Ua,{title:"History unavailable",detail:v,onRetry:()=>C(I=>I+1|0)}):b(vLe,{entries:ETe(l,r.displayName),actors:wTe(l),eventTypes:kTe(l),filter:f,onFilterChange:O,hasMore:_[0],loading:h[0],onLoadMore:P})}let SLe=xLe;function Pn(e){return"var("+e+")"}let ELe=w([z("flex"),me("column"),c("gap",Pn(F.lg))]),wLe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",Pn(F.md))]),kLe=w([c("font-size",Pn(T.sizeXl)),c("font-weight",Pn(T.weightMedium)),c("color",Pn(x.textPrimary)),yn(Re(0))]),CLe=w([z("flex"),gi("wrap"),ee("center"),c("gap",Pn(F.md)),c("font-size",Pn(T.sizeSm)),c("color",Pn(x.textSecondary))]),RLe=w([z("inlineFlex"),ee("center"),c("gap","4px"),Ee("pointer")]);function ALe(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let DD=w([c("font-size",Pn(T.sizeXs)),c("color",Pn(x.textDisabled))]),TLe=w([z("flex"),ee("center"),c("gap",Pn(F.sm))]),$Le=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Pn(Z.sm)),c("padding","2px var("+F.sm+")"),c("color",Pn(x.textSecondary)),c("font-size",Pn(T.sizeSm)),Ee("pointer"),He([c("background",Pn(x.surfaceSubtle)),c("color",Pn(x.textPrimary))])]);function NLe(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},s=yl(),a=El(),l=_i(),u=ws(),d=O2(),f=ue(()=>[]),h=f[1],p=f[0],g=n.map((S,k)=>{let C=Xg(o,S.name,a),$=C&&!p.includes(S.name),A=bu(S,$);return[S,k,$,C,A]}),m=(S,k)=>D(R(R(r,C=>ro(C,S.name)),C=>C.accent),id[Lo(k,id.length)]),v=oe(g,S=>{let k=S[4],C=S[0],$=R(r,P=>ro(P,C.name)),A=jr(C.schema,R(r,P=>hl(P,C.name)),{field:C.labelField,source:C.labelFieldSource}),N=J(A.statusField,P=>U2(P,C.commands,R($,I=>I.transitions))),O=M2(l,C.commands,C.name,k.isLive,k.refetch,u,d.onNotice,void 0);if(S[2])return{readModelName:C.name,rows:k.rows,schema:C.schema,semantics:A,accent:m(C,S[1]),window:ig(k.canLoadMore),onOpenRow:(P,I)=>s(na(i,C.name,P,[])),onCommand:J(N,P=>O),statusCommandFor:N}}),_=oe(g,S=>{if(S[2]&&S[4].canLoadMore)return S[0].name}),y=()=>{g.forEach(S=>{let k=S[4];if(S[2]&&k.canLoadMore)return k.loadMore()})},E=oe(g,S=>{let k=S[0],C=S[4].fetchState;if(S[2])return typeof C!="object"?C==="Loading"?k.name+": loading…":void 0:k.name+": "+C._0}).concat(v2(o,n.map(S=>S.name),a));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:kLe}),className:wLe}),b("div",{children:g.filter(S=>S[3]).map(S=>{let k=S[0];return L("label",{children:[b("input",{checked:S[2],type:"checkbox",onChange:C=>{let $=k.name;h(A=>A.includes($)?A.filter(N=>N!==$):A.concat([$]))}}),b("span",{className:ALe(m(k,S[1]))}),k.name],className:RLe},k.name)}),className:CLe}),d.element,e.mode.render(v),_.length!==0?L("div",{children:[b("button",{children:"Load more",className:$Le,onClick:S=>y()}),b("span",{children:"More rows available: "+_.join(", "),className:DD})],className:TLe}):null,E.length!==0?b("span",{children:E.join(" · "),className:DD}):null],className:ELe})}let DLe=NLe;function ru(e){return"var("+e+")"}let FLe=w([z("flex"),ee("center"),c("gap",ru(F.xs)),c("font-size",ru(T.sizeSm)),c("color",ru(x.textSecondary))]),ILe=w([c("color",ru(x.brand)),c("text-decoration","none"),He([c("text-decoration","underline")])]),PLe=w([c("color",ru(x.textPrimary)),c("font-weight",ru(T.weightMedium))]),OLe=w([c("color",ru(x.textDisabled)),OF("none")]);function MLe(e){let t=e.crumbs;return b("nav",{children:t.map((r,n)=>{let i=n===(t.length-1|0);return L(Tx,{children:[n>0?b("span",{children:"/","aria-hidden":!0,className:OLe}):null,i||Pi(r.href)?b("span",{children:r.label,className:PLe}):b("a",{children:r.label,className:ILe,href:D(r.href,"#")})]},r.label)}),"aria-label":"breadcrumbs",className:FLe})}let LLe=MLe;function ht(e){return"var("+e+")"}let zLe=w([z("flex"),me("column"),c("gap",ht(F.lg)),c("padding","0 var("+F.md+")"),c("min-width","0")]),ULe=w([z("flex"),ee("center"),c("font-size",ht(T.sizeMd)),c("padding","var("+F.sm+") 0"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),BLe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",ht(F.md)),c("padding-bottom",ht(F.md)),c("border-bottom","1px solid var("+x.borderSubtle+")")]),jLe=w([c("font-size",ht(T.sizeXl)),c("font-weight",ht(T.weightMedium)),c("color",ht(x.textPrimary)),yn(Re(0))]),qLe=w([z("flex"),gi("wrap"),c("gap",ht(F.sm)),c("padding-bottom",ht(F.sm))]),VLe=w([c("background",ht(x.surface)),c("color",ht(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",ht(Z.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",ht(T.sizeSm)),Ee("pointer"),He([c("background",ht(x.surfaceElevated))])]),KLe=w([z("flex"),me("column"),c("gap",ht(F.sm)),c("min-width","0")]),FD=w([z("flex"),ee("start"),c("gap",ht(F.md)),c("padding","var("+F.xs+") 0"),c("border-bottom","1px solid var("+x.borderSubtle+")"),UF([c("border-bottom","none")])]),ID=w([c("color",ht(x.textSecondary)),c("font-size",ht(T.sizeMd)),c("font-weight",ht(T.weightMedium)),c("white-space","nowrap"),c("padding-top","2px"),pi(0),c("min-width","200px")]),by=w([c("color",ht(x.textPrimary)),c("font-size",ht(T.sizeMd)),c("word-break","break-word"),c("min-width","0")]),HLe=w([z("flex"),ee("start"),c("gap",ht(F.md)),c("padding","var("+F.xs+") 0"),c("border-bottom","1px solid var("+x.borderSubtle+")"),UF([c("border-bottom","none")])]),WLe=w([c("color",ht(x.textSecondary)),c("font-size",ht(T.sizeMd)),c("font-weight",ht(T.weightMedium)),c("padding-top","2px"),pi(0),c("min-width","200px")]),GLe=w([z("flex"),me("column"),c("gap",ht(F.sm)),mo(1),c("padding",ht(F.md)),c("background",ht(x.surfaceSubtle)),c("border-radius",ht(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),c("min-width","0")]),JLe=w([z("flex"),me("column"),c("gap",ht(F.sm)),c("min-width","0")]),QLe=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",ht(F.md)),c("padding-bottom",ht(F.xs)),c("border-bottom","1px solid var("+x.borderSubtle+")")]),YLe=w([c("color",ht(x.textPrimary)),c("font-size",ht(T.sizeMd)),c("font-weight",ht(T.weightMedium))]),PD=w([c("overflow-x","auto"),c("max-width","100%"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",ht(Z.md))]),fc=w([c("color",ht(x.textDisabled)),c("font-size",ht(T.sizeSm))]);function C9(e,t){return D(R(R(Y(e),r=>M(r,"title")),de),mt(t))}function OD(e){return R(R(Y(e),t=>M(t,"type")),de)}function MD(e){return R(R(Y(e),t=>M(t,"format")),de)}function XLe(e){return R(Y(e),t=>M(t,"items"))}function LD(e){return Le(R(R(Y(e),t=>M(t,"properties")),Y))}function ZLe(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function zD(e){let t=e.toLowerCase(),r=e.length,n=s=>{let a=s.length;if(r>a&&t.endsWith(s))return e.slice(0,r-a|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function e8e(e,t){let r=ui(t),n=OD(r);if(n!==void 0)switch(n){case"array":let o=XLe(r);if(o===void 0)return"ArrayOfScalars";let s=OD(o);if(LD(o)||We(s,"object"))return{TAG:"ArrayOfObjects",_0:o};if(!We(s,"string"))return"ArrayOfScalars";let a=zD(e);return a!==void 0?{TAG:"EntityRefArray",_0:a}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return LD(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!ZLe(e))return{TAG:"Scalar",_0:D(n,"string"),_1:MD(r)};let i=zD(e);return i!==void 0?{TAG:"EntityRef",_0:i}:{TAG:"Scalar",_0:D(n,"string"),_1:MD(r)}}function yy(e,t,r,n){let i=rt(e);if(typeof i!="object")switch(i){case"JSONFalse":return b(ra,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return b(ra,{variant:"Success",label:"true",dot:!1});case"JSONNull":return b("span",{children:"—",className:fc})}else switch(i.TAG){case"JSONString":let o=i._0;return t==="date-time"?jx(o):D(HF(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function t8e(e){return D(J(mr(e),t=>t.map(r=>{let n=rt(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 UD(e){return D(J(mr(e),t=>oe(t,Y)),[])}function R9(e,t){let r=R(M(e,"id"),de);if(r!==void 0)return r;let n=R(M(e,"compositeId"),de);return n!==void 0?n:"#"+t.toString()}function BD(e){return e.map((t,r)=>({key:R9(t,r),row:t}))}function r8e(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 s=Le(Y(o.data)),a=mr(o.data),l;if(s){let u=D(Y(o.data),{}),d=R(R(Y(o.schema),p=>M(p,"properties")),Y),f=R(d,p=>M(p,i)),h=M(u,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:C9(f,i)}:void 0}else if(Le(a)){let u=D(a,[]),d=D(R(Y(o.schema),h=>M(h,"items")),o.schema),f=u.find((h,p)=>{let g=D(Y(h),{});return R9(g,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 n8e(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,s=e.drillPath,a=e.labelField,l=e.aggregateId,u=e.statusField,d=e.commands,f=e.rootLabel,h=e.schema,p=e.data,g=d!==void 0?d:[],m=s!==void 0?s:[],v=_i(),_=ws(),y=hm(),E=Q6e(),S=rp(),k=S!==void 0&&i!==void 0?S.isLive(i):!1,C=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,$=yl(),A=ue(()=>[]),N=A[1],O=ue(()=>{}),P=O[1],I=ue(()=>({})),U=I[1],B=I[0],V=Le(o)&&Le(i),W=V?m:A[0],Q=X=>{if(o!==void 0&&i!==void 0&&l!==void 0)return $(na(o,i,l,X));N(he=>X)},K=r8e([{data:p,schema:h,label:f}],W,[]),G=D(Y(p),{}),ne=To(h,"Drill"),se=Xh([G],ne,_),$e={lookupLabel:(X,he)=>Yh(se,X,_,he),isMissing:(X,he)=>Ym(se,X,_,he)},ot=fe(R(As(),X=>X.identity),[],X=>X.groups),ye=X=>{if(l!==void 0)return J(fm(f9(h,X,g),he=>h9(he.command,ot)),he=>(()=>P(qe=>he.command)))},we=(X,he)=>{let qe=D(R(R(Y(X),Ke=>M(Ke,"properties")),Y),{}),Ve={};return Ge(he).forEach(Ke=>{let pt=Ke[1],gt=Ke[0],jt=D(R(R(R(M(qe,gt),Y),St=>M(St,"type")),de),"string"),ge,Oe=0;switch(jt){case"array":if(pt==="")ge=[];else try{ge=JSON.parse(pt)}catch{ge=[pt]}break;case"boolean":ge=pt==="true";break;case"integer":case"number":Oe=1;break;case"object":if(pt==="")ge=null;else try{ge=JSON.parse(pt)}catch{ge=null}break;default:ge=pt}Oe===1&&(ge=D(J(ol(pt),St=>St),pt)),Ve[gt]=ge}),Ve},Ze=(X,he,qe)=>L("div",{children:[b("div",{children:he,className:ID}),b("div",{children:qe,className:by})],className:FD},X),Zt=(X,he,qe)=>{if(zg(X,_,C))return qe;let Ve=ha(_,X);if(Ve===void 0)return qe;let Ke=Ve.name.endsWith("s");return he?Ke?Ve.name:Ve.name+"s":Ke?Ve.name.slice(0,Ve.name.length-1|0):Ve.name},Ut=X=>{let he=rt(X.data);if(typeof he!="object"){if(he==="JSONNull")return b("span",{children:"—",className:fc})}else switch(he.TAG){case"JSONObject":let qe=D(Y(X.data),{}),Ve=To(X.schema,"Drill");return Ve.length===0?b("span",{children:"(no fields)",className:fc}):b("div",{children:Ve.map(ge=>{let Oe=ge.key,St=ge.propSchema,er=M(qe,Oe),lr=C9(St,Oe),Kr=e8e(Oe,St);if(er===void 0)return Ze(Oe,lr,D(Zre(Oe,St),b("span",{children:"—",className:fc})));if(typeof Kr!="object")switch(Kr){case"Bool":return Ze(Oe,lr,yy(er,void 0,Oe))}else switch(Kr.TAG){case"Scalar":let yi=$1(Oe,St,er);return yi!==void 0?Ze(Oe,lr,yi):Ze(Oe,lr,yy(er,Kr._1,Oe));case"EntityRef":let xi=Kr._0;return Ze(Oe,Zt(xi,!1,lr),N1(Oe,xi,er,_,y,$e,C,void 0,void 0));case"EntityRefArray":let qt=Kr._0;return Ze(Oe,Zt(qt,!0,lr),N1(Oe,qt,er,_,y,$e,C,void 0,void 0));case"NestedObject":let Tn=$1(Oe,St,er);if(Tn!==void 0)return Ze(Oe,lr,Tn);let ji=To(Kr._0,"Drill"),Al=D(R(M(qe,Oe),Y),{});return L("div",{children:[b("div",{children:lr,className:WLe}),b("div",{children:ji.map(wt=>{let ka=M(Al,wt.key);return L("div",{children:[b("div",{children:wt.label,className:ID}),b("div",{children:Yl(wt.key,wt.kind,wt.propSchema,ka,void 0,_,y,$e,C),className:by})],className:FD},wt.key)}),className:GLe})],className:HLe},Oe);case"ArrayOfObjects":let xo=Kr._0,Ns=BD(UD(er)),Et=Ns.length,Er=D(i,f),Hr=Er+"."+Oe,xn=R(n,wt=>ro(wt,Hr)),wr=zM(xo,xn),bt=IM(o,Er,Oe),Mr=M(B,Oe),Xn=Mr!==void 0?Mr:nE(bt),tr=UM(Xn,xn,YF(xo),wr),$n=wt=>{FM(bt,wt),U(ka=>{let qu=dt(Ge(ka));return qu[Oe]=wt,qu})},Sn=D(mr(er),[]),en=wt=>{let ka=jr(xo,R(n,Ca=>hl(Ca,Hr)),void 0),qu=R(xn,Ca=>Ca.accent),J2={readModelName:Hr,rows:Sn,schema:xo,semantics:ka,accent:qu,window:"Complete",onOpenRow:(Ca,vp)=>{let Vu=z7(Sn,Ku=>Ku===vp),zd=Vu!==void 0?fe(Ns[Vu],Ca,Ku=>Ku.key):Ca;Q(W.concat([Oe,zd]))}};return wt.render([J2])},Yo=To(xo,"Drill").map(wt=>({key:wt.key,label:wt.label,render:ka=>Yl(wt.key,wt.kind,wt.propSchema,M(ka.row,wt.key),void 0,_,y,$e,C),sortable:!1,width:wt.width})),qi=Et===0?b("span",{children:"(empty)",className:fc}):b("div",{children:b(ng,{columns:Yo,data:Ns,keyFn:wt=>wt.key,onRowClick:wt=>Q(W.concat([Oe,wt.key])),density:"Comfortable"}),className:PD}),Xo=tr!==void 0&&tr.id!==aa?en(tr):qi;return L("div",{children:[L("div",{children:[b("span",{children:lr,className:YLe}),L("span",{children:[wr.length>1?b(hf.make,{modes:wr,activeId:fe(tr,aa,wt=>wt.id),onSelect:$n}):null,b(Sf,{count:Et,label:"items",onClick:()=>Q(W.concat([Oe]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:QLe}),Xo],className:JLe},Oe)}return Ze(Oe,lr,b(KF,{items:t8e(er)}))}),className:KLe});case"JSONArray":let Ke=BD(UD(X.data)),pt=D(R(Y(X.schema),ge=>M(ge,"items")),X.schema),jt=To(pt,"Drill").map(ge=>({key:ge.key,label:ge.label,render:Oe=>Yl(ge.key,ge.kind,ge.propSchema,M(Oe.row,ge.key),void 0,_,y,$e,C),sortable:!1,width:ge.width}));return Ke.length===0?b("span",{children:"(empty)",className:fc}):b("div",{children:b(ng,{columns:jt,data:Ke,keyFn:ge=>ge.key,onRowClick:ge=>Q(W.concat([ge.key])),density:"Comfortable"}),className:PD})}return b("div",{children:yy(X.data,void 0,void 0),className:by})},Qn=a!==void 0&&a!=="id"?R(R(R(Y(p),X=>M(X,a)),de),X=>{if(X!=="")return X}):void 0,ar=D(Qn,D(l,f)),Bi=X=>o!==void 0&&i!==void 0&&l!==void 0?na(o,i,l,W.slice(0,X)):"#",$r=K!==void 0?K.map((X,he)=>{let qe=he===(K.length-1|0);return{label:he===0?ar:X.label,href:qe?void 0:Bi(he)}}):[{label:ar,href:void 0}],Yn=X=>{let he=X.target,qe=he.tagName,Ve=X.metaKey||X.ctrlKey||X.shiftKey||X.altKey||X.button!==0;if(qe!=="A"||Ve)return;if(X.preventDefault(),V){let ge=he.pathname,Oe=he.search;return $(ge+Oe)}let gt=he.parentNode.querySelectorAll("a").findIndex(ge=>ge===he),jt=gt<0?0:gt;Q(W.slice(0,jt))},Nr;if(K!==void 0){let X=K[K.length-1|0];Nr=X!==void 0?Ut(X):null}else Nr=b(Ua,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>Q([])});let j=W.length===0,le=j?eL(g.filter(X=>X.level==="Instance"),G,u):[],xe;if(j&&u!==void 0){let X=iFe(h,u,D(Go(G,u),""));xe=X.length!==0?b(zz,{steps:X}):void 0}else xe=void 0;return L("div",{children:[j?L("div",{children:[b("h2",{children:ar,className:jLe}),t!==void 0&&l!==void 0?t(l):null],className:BLe}):b("div",{children:b(LLe,{crumbs:$r}),className:ULe,onClick:Yn}),D(xe,null),le.length!==0?b("div",{children:le.map(X=>b("button",{children:X.label,className:VLe,onClick:he=>P(qe=>X)},X.name)),className:qLe}):null,j?b(JF.make,{fill:ye,children:Nr}):Nr,j&&r!==void 0&&l!==void 0?r(l):null,fe(O[0],null,X=>b(y2,{isOpen:!0,onClose:()=>P(he=>{}),title:X.label,children:b(q2,{schema:X.schema,aggregateId:l,aggregateIdField:X.aggregateIdField,refFields:X.refFields,onSubmit:he=>v!==void 0?Vt(v(X.mutationDocument,we(X.schema,he)).then(qe=>{let Ve=Ad(qe);if(typeof Ve!="object")return Ve==="Accepted"?(P(Ke=>{}),k||ae(E,Ke=>Ke()),Promise.resolve("Ok")):(P(Ke=>{}),k||setTimeout(()=>ae(E,Ke=>Ke()),500),Promise.resolve("Ok"));{let Ke=Ve._0;return gp(v,_,Ke.errorCode,Ke.detail).then(pt=>Promise.resolve({TAG:"Err",_0:pt}))}}),qe=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(P(qe=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:zLe})}let jD=n8e;function hs(e){return"var("+e+")"}let i8e=w([z("flex"),me("column"),c("gap",hs(F.md))]),o8e=w([z("flex"),ee("center"),Ye("spaceBetween"),c("padding-bottom",hs(F.sm)),c("border-bottom","1px solid var("+x.border+")")]),s8e=w([c("font-size",hs(T.sizeLg)),c("font-weight",hs(T.weightMedium)),c("color",hs(x.textPrimary)),yn(Re(0))]),a8e=w([z("flex"),gi("wrap"),c("gap",hs(F.sm))]),l8e=w([c("background",hs(x.surface)),c("color",hs(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",hs(Z.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",hs(T.sizeSm)),c("cursor","pointer")]);function u8e(e,t){let r=D(R(R(Y(e),i=>M(i,"properties")),Y),{}),n={};return Ge(t).forEach(i=>{let o=i[1],s=i[0],a=D(R(R(R(M(r,s),Y),d=>M(d,"type")),de),"string"),l,u=0;switch(a){case"array":if(o==="")l=[];else try{l=JSON.parse(o)}catch{l=[o]}break;case"boolean":l=o==="true";break;case"integer":case"number":u=1;break;case"object":if(o==="")l=null;else try{l=JSON.parse(o)}catch{l=null}break;default:l=o}u===1&&(l=D(J(ol(o),d=>d),o)),n[s]=l}),n}function c8e(e){let t=e.contextId,r=e.slice,n=_i(),i=ws(),o=ue(()=>{}),s=o[1];return L("div",{children:[b("div",{children:b("h2",{children:r.name,className:s8e}),className:o8e}),b("div",{children:r.commands.map(a=>b("button",{children:a.label,className:l8e,onClick:l=>s(u=>a)},a.name)),className:a8e}),fe(o[0],null,a=>b(y2,{isOpen:!0,onClose:()=>s(l=>{}),title:a.label,children:b(q2,{schema:a.schema,aggregateId:t,aggregateIdField:a.aggregateIdField,injectNewId:a.level==="Collection",refFields:a.refFields,onSubmit:l=>n!==void 0?Vt(n(a.mutationDocument,u8e(a.schema,l)).then(u=>{let d=Ad(u);if(typeof d=="object"){let f=d._0;return gp(n,i,f.errorCode,f.detail).then(h=>Promise.resolve({TAG:"Err",_0:h}))}return s(f=>{}),Promise.resolve("Ok")}),u=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(s(u=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:i8e})}let d8e=c8e;function Qa(e){return"var("+e+")"}let f8e=w([z("flex"),me("column"),c("gap",Qa(F.xl))]),h8e=w([c("font-size",Qa(T.sizeXl)),c("font-weight",Qa(T.weightMedium)),c("color",Qa(x.textPrimary)),yn(Re(0))]),p8e=w([z("flex"),me("column"),c("gap",Qa(F.md)),c("padding",Qa(F.lg)),c("background",Qa(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Qa(Z.md))]);function A9(e){return e.filter(t=>zPe(t.schema,t.statusField,t.commands))}function g8e(e){let t=A9(e.views);return L("div",{children:[b("h2",{children:"Lifecycles",className:h8e}),t.length!==0?t.map(r=>b("div",{children:b(rOe,{schema:r.schema,statusField:D(r.statusField,""),commands:r.commands,title:r.name}),className:p8e},r.name)):b(ld,{title:"No lifecycles",description:"No view in this plugin declares a status enum with state-scoped commands."})],className:f8e})}let m8e=g8e;function vt(e){return"var("+e+")"}let v8e=w([z("flex"),me("column"),c("gap",vt(F.md)),c("font-family",vt(T.fontFamily))]),_8e=w([z("flex"),ee("center"),c("gap",vt(F.sm)),c("color",vt(x.textSecondary)),c("font-size",vt(T.sizeSm)),c("font-weight",vt(T.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),b8e=w([z("inlineFlex"),ee("center"),c("padding","0 6px"),c("border-radius",vt(Z.full)),c("background",vt(x.surfaceElevated)),c("color",vt(x.textPrimary)),c("font-size",vt(T.sizeXs)),c("letter-spacing","0")]),y8e=w([z("flex"),me("column"),c("gap",vt(F.md))]),x8e=w([z("flex"),ee("flexStart"),c("gap",vt(F.sm))]),S8e=w([z("flex"),me("column"),c("gap","2px"),c("min-width","0"),mo(1)]),E8e=w([z("flex"),ee("baseline"),c("gap",vt(F.sm))]),w8e=w([c("color",vt(x.textPrimary)),c("font-size",vt(T.sizeSm)),c("font-weight",vt(T.weightMedium))]),k8e=w([c("color",vt(x.textDisabled)),c("font-size",vt(T.sizeXs))]),C8e=w([c("color",vt(x.textPrimary)),c("font-size",vt(T.sizeSm)),c("line-height",vt(T.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word")]),R8e=w([c("color",vt(x.textDisabled)),c("font-size",vt(T.sizeSm)),c("padding","var("+F.sm+") 0")]),A8e=w([z("flex"),me("column"),ee("flexEnd"),c("gap",vt(F.sm))]),T8e=w([c("width","100%"),c("min-height","64px"),c("padding",vt(F.sm)),c("background",vt(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",vt(Z.md)),c("color",vt(x.textPrimary)),c("font-family",vt(T.fontFamily)),c("font-size",vt(T.sizeSm)),c("resize","vertical")]),$8e=w([c("background",vt(x.brand)),c("border","none"),c("border-radius",vt(Z.md)),c("color",vt(x.textOnBrand)),c("padding","4px var("+F.md+")"),c("font-size",vt(T.sizeSm)),c("font-weight",vt(T.weightMedium)),Ee("pointer"),LF([c("opacity","0.5"),Ee("default")])]),N8e=w([c("color",vt(x.error)),c("font-size",vt(T.sizeXs)),c("align-self","flex-start")]);function D8e(e){let t=e.comment,r=t.timestamp;return L("div",{children:[b(ud,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[b("span",{children:D(t.author,"Unknown"),className:w8e}),r!==void 0?b("span",{children:nv(e.nowMs,r),className:k8e}):null],className:E8e}),b("span",{children:t.body,className:C8e})],className:S8e})],className:x8e})}function F8e(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,s=e.title,a=e.comments,l=s!==void 0?s:"Comments",u=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=ue(()=>""),p=h[1],g=h[0],m=g.trim(),v=m!==""&&!d,_=()=>{if(v)return ae(i,y=>y(m)),p(y=>"")};return L("div",{children:[L("div",{children:[l,b("span",{children:a.length.toString(),className:b8e})],className:_8e}),a.length===0?b("div",{children:u,className:R8e}):b("div",{children:a.map(y=>b(D8e,{comment:y,nowMs:f},y.id)),className:y8e}),i!==void 0?L("div",{children:[b("textarea",{className:T8e,disabled:d,placeholder:"Write a comment…",value:g,onKeyDown:y=>{if(y.key==="Enter"&&(y.metaKey||y.ctrlKey))return y.preventDefault(),_()},onChange:y=>{let E=y.target.value;p(S=>E)}}),r!==void 0?b("span",{children:r,className:N8e}):null,b("button",{children:d?"Posting…":"Comment",className:$8e,disabled:!v,onClick:y=>_()})],className:A8e}):null],className:v8e})}let I8e=F8e;function P8e(e){let t=e.entityId,r=e.binding,n=_i(),i=ws(),o=El(),s=fe(e.requiredAccess,!1,v=>!o(v)),a=bu(r.readModel,!s),l=ue(()=>!1),u=l[1],d=ue(()=>{}),f=d[1],h=v=>{let _=r.postCommand;if(n!==void 0&&_!==void 0){u(y=>!0),f(y=>{}),Vt(n(_.mutationDocument,WTe(r,t,v)).then(y=>{u(S=>!1);let E=Ad(y);if(typeof E!="object")return a.refetch(),Promise.resolve();{let S=E._0;return gp(n,i,S.errorCode,S.detail).then(k=>(f(C=>k),Promise.resolve()))}}),y=>(u(E=>!1),f(E=>"Could not post the comment."),Promise.resolve()));return}};if(s)return null;let p=HTe(r,a.rows,t),g=r.postCommand;return b(I8e,{comments:p,onPost:n!==void 0&&g!==void 0?h:void 0,posting:l[0],error:d[0]})}let O8e=P8e;function On(e){return"var("+e+")"}let M8e=w([z("flex"),me("column"),c("gap",On(F.lg))]),L8e=w([z("flex"),ee("center"),Ye("spaceBetween"),c("gap",On(F.md))]),z8e=w([c("font-size",On(T.sizeXl)),c("font-weight",On(T.weightMedium)),c("color",On(x.textPrimary)),yn(Re(0))]),U8e=w([z("flex"),gi("wrap"),ee("center"),c("gap",On(F.md)),c("font-size",On(T.sizeSm)),c("color",On(x.textSecondary))]),B8e=w([z("inlineFlex"),ee("center"),c("gap","4px"),Ee("pointer")]);function j8e(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let qD=w([c("font-size",On(T.sizeXs)),c("color",On(x.textDisabled))]),q8e=w([z("flex"),ee("center"),c("gap",On(F.sm))]),V8e=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",On(Z.sm)),c("padding","2px var("+F.sm+")"),c("color",On(x.textSecondary)),c("font-size",On(T.sizeSm)),Ee("pointer"),He([c("background",On(x.surfaceSubtle)),c("color",On(x.textPrimary))])]);function K8e(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,s=t!==void 0?t:{},a=yl(),l=El(),u=_i(),d=ws(),f=O2(),h=ue(()=>[]),p=h[1],g=h[0],m=K=>jr(K.schema,R(r,G=>hl(G,K.name)),{field:K.labelField,source:K.labelFieldSource}),v=bu(i,!0),_=i.name,y=v.rows,E=i.schema,S=m(i),k=ig(v.canLoadMore),A={readModelName:_,rows:y,schema:E,semantics:S,window:k,onOpenRow:(K,G)=>a(na(o,i.name,K,[])),role:xu},N=n.map((K,G)=>{let ne=Xg(s,K.readModel.name,l),se=ne&&!g.includes(K.readModel.name),be=bu(K.readModel,se);return[K,G,se,ne,be]}),O=(K,G)=>D(R(R(r,ne=>ro(ne,K.name)),ne=>ne.accent),id[Lo(G,id.length)]),P=oe(N,K=>{let G=K[4],ne=K[0],se=s9(ne.readModel.commands,ne.resourceRef),be=M2(u,ne.readModel.commands,ne.readModel.name,G.isLive,G.refetch,d,f.onNotice,void 0);if(K[2])return{readModelName:ne.readModel.name,rows:G.rows,schema:ne.readModel.schema,semantics:m(ne.readModel),accent:O(ne.readModel,K[1]),window:ig(G.canLoadMore),onOpenRow:(Ae,$e)=>a(na(o,ne.readModel.name,Ae,[])),onCommand:J(se,Ae=>be),role:Su,resourceRef:ne.resourceRef,assignCommand:se}}),I=[A].concat(P),U=(v.canLoadMore?[i.name]:[]).concat(oe(N,K=>{if(K[2]&&K[4].canLoadMore)return K[0].readModel.name})),B=()=>{v.canLoadMore&&v.loadMore(),N.forEach(K=>{let G=K[4];if(K[2]&&G.canLoadMore)return G.loadMore()})},V=v.fetchState,W;W=typeof V!="object"?V==="Loading"?[i.name+": loading…"]:[]:[i.name+": "+V._0];let Q=W.concat(oe(N,K=>{let G=K[0],ne=K[4].fetchState;if(K[2])return typeof ne!="object"?ne==="Loading"?G.readModel.name+": loading…":void 0:G.readModel.name+": "+ne._0}).concat(v2(s,n.map(K=>K.readModel.name),l)));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:z8e}),className:L8e}),b("div",{children:N.filter(K=>K[3]).map(K=>{let G=K[0];return L("label",{children:[b("input",{checked:K[2],type:"checkbox",onChange:ne=>{let se=G.readModel.name;p(be=>be.includes(se)?be.filter(Ae=>Ae!==se):be.concat([se]))}}),b("span",{className:j8e(O(G.readModel,K[1]))}),G.readModel.name],className:B8e},G.readModel.name)}),className:U8e}),f.element,e.mode.render(I),U.length!==0?L("div",{children:[b("button",{children:"Load more",className:V8e,onClick:K=>B()}),b("span",{children:"More rows available: "+U.join(", "),className:qD})],className:q8e}):null,Q.length!==0?b("span",{children:Q.join(" · "),className:qD}):null],className:M8e})}let H8e=K8e;function W8e(e){return e}function VD(e){return e.map(t=>({name:t.name,schema:t.schema,commands:t.commands,declaredLabelField:t.labelField,declaredLabelSource:t.labelFieldSource}))}function G8e(e){if(typeof e=="object")return"heuristic:"+e._0;switch(e){case"Annotation":return"annotation";case"Type":return"type";case"Hint":return"hint"}}function T9(e,t,r){return t!==void 0?Object.entries(uOe(e.schema,t,e.commands,R(r,n=>n.transitions))):[]}function $9(e){return J(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function N9(e,t){return fe(fm(e.declaredLabelSource,r=>We(e.declaredLabelField,t)),t,r=>t+" ("+r+")")}function J8e(e,t,r){let n=e.name,i=e.schema,o=jr(i,t,$9(e)),s=Ge(o.semantics).map(d=>{let f=d[1];return dt([["field",d[0]],["semantic",Oh(f.semantic)],["provenance",G8e(f.provenance)]])}),a=[];ae(o.geo,d=>{a.push(["geo",d.latField+"/"+d.lngField])}),ae(o.dateSpan,d=>{a.push(["dateSpan",fe(d.endField,d.startField,f=>d.startField+".."+f)])}),ae(o.statusField,d=>{a.push(["status",d])}),ae(o.labelField,d=>{a.push(["label",N9(e,d)])}),ae(o.imageField,d=>{a.push(["image",d])}),ae(o.parentField,d=>{a.push(["parent",d])});let l=tE(i).map(d=>d.id),u=T9(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+nOe(f.tier)+")"]});return dt([["view",n],["capableModes",l],["roles",dt(a)],["transitions",dt(u)],["fields",s]])}function D9(e,t,r,n){return dt([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(W8e)],["views",t.map(o=>J8e(o,R(r,s=>hl(s,o.name)),R(r,s=>ro(s,o.name))))]])}function Q8e(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=jr(i,R(t,g=>hl(g,n)),$9(r)),s=tE(i).map(g=>g.id).join(", "),a=[];ae(o.geo,g=>{a.push("geo="+g.latField+"/"+g.lngField)}),ae(o.dateSpan,g=>{a.push("dateSpan="+fe(g.endField,g.startField,m=>g.startField+".."+m))}),ae(o.statusField,g=>{a.push("status="+g)}),ae(o.labelField,g=>{a.push("label="+N9(r,g))}),ae(o.imageField,g=>{a.push("image="+g)}),ae(o.parentField,g=>{a.push("parent="+g)});let l=a.length===0?"":"; "+a.join("; "),u=Object.keys(o.semantics).length,d=T9(r,o.statusField,R(t,g=>ro(g,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"";return n+": modes "+s+l+p+"; "+u.toString()+" field semantic(s)"})}function Y8e(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),Q8e(t,r).forEach(o=>{console.log(" "+o)}),console.log(JSON.stringify(D9(e,t,r,i),null,2))}function xy(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function X8e(e,t,r){return"/"+xy(e)+"/"+xy(t)+"/"+xy(r)}function Z8e(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function e5e(e){let t=_e.object(e);if(t===void 0)return;let r=o=>R(t[o],_e.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:D(R(t.sentAt,_e.float),0),body:D(t.body,null)}}function t5e(e,t,r,n,i){let o=n!==void 0?n:!0,s=rp(),a=R(s,h=>h.clientNamespace()),l=o&&Le(a)&&fe(s,!1,h=>h.clientChannelsAvailable()),u=a!==void 0?X8e(a,e,t):void 0,d=Qe(i);return d.current=i,Te(()=>{let h=l?s:void 0;if(h!==void 0&&u!==void 0)return h.subscribe("Domain",u,p=>{let g=e5e(p);if(g!==void 0&&g.senderId!==r)return d.current(g)})},[l,D(u,""),r]),{available:l,publish:(h,p)=>{let g=l?s:void 0;if(g===void 0||u===void 0)return;let m=Date.now(),v={kind:h,senderId:r,sentAt:m,body:p};g.publish("Domain",u,[Z8e(v)]).then(_=>{_.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+u+" failed: "+_._0)})}}}let yx="heartbeat",xx="hello",F9="leave";function KD(e){let t=_e.object(e);if(t===void 0)return;let r=i=>R(t[i],_e.string),n=r("userId");if(n!==void 0&&n!=="")return[n,D(r("username"),n)]}function r5e(e,t,r){let n=t.kind;if(n===F9){let a=KD(t.body);if(a===void 0)return e;let l=a[0];return e.filter(u=>u.userId!==l)}if(n!==yx&&n!==xx)return e;let i=KD(t.body);if(i===void 0)return e;let o=i[0];return e.filter(a=>a.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function n5e(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function i5e(e,t){return Object.fromEntries([["userId",e],["username",t]])}function o5e(e,t,r,n,i){let o="presence",s=i!==void 0?i:!0,a=ue(()=>[]),l=a[1],u=Qe(void 0),f=t5e(o,t,r,s&&r!=="",g=>{if(l(v=>r5e(v,g,Date.now())),g.kind!==xx)return;let m=u.current;if(m!==void 0){setTimeout(()=>m(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return Te(()=>{if(!h)return;let g=i5e(r,n),m=()=>p(yx,g);u.current=m,p(xx,g),p(yx,g);let v=setInterval(m,1e4);return()=>{clearInterval(v),u.current=void 0,p(F9,g)}},[h,r,n,t]),Te(()=>{if(!h)return;let g=setInterval(()=>l(m=>n5e(m,Date.now())),1e4);return()=>{clearInterval(g)}},[h]),h?a[0]:[]}function Y0(e){return"var("+e+")"}let s5e=w([z("inlineFlex"),ee("center"),c("gap",Y0(F.xs))]),a5e=w([c("font-family",Y0(T.fontFamily)),c("font-size",Y0(T.sizeSm)),c("color",Y0(x.textSecondary)),c("white-space","nowrap")]);function l5e(e){return e===1?"1 other here":e.toString()+" others here"}function u5e(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",s=r!==void 0?r:4,a=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(WF,{members:l,size:o,max:s}),a?b("span",{children:l5e(i.length),className:a5e}):null],className:s5e,title:i.map(u=>u.username).join(", ")})}let c5e=u5e;function d5e(e){let t=As(),r=R(t,a=>a.identity),n=fe(r,"",a=>a.userId),i=fe(r,"",a=>a.username),s=o5e(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(a=>({userId:a.userId,username:a.username}));return b(c5e,{people:s})}let f5e=d5e;function I9(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function Uv(e){return e.endsWith("s")?e:e+"s"}function Ya(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let Sx={contents:[]},Ex={contents:[]};function wx(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!Sx.contents.some(i=>i===n)){Sx.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 kx(e,t,r,n){if(r==="id"||n.length!==0&&n.some(o=>o===r))return;let i=e+"."+t;if(!Ex.contents.some(o=>o===i)){Ex.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 P9(e){let t=[];return e.forEach(r=>{r.readModels.forEach(n=>{wx(r.id,n.name,n.labelField),kx(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Ya(n.queryField),labelField:n.labelField})}),r.stateViewSlices.forEach(n=>{wx(r.id,n.name,n.labelField),kx(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Ya(n.queryField),labelField:n.labelField})})}),t}function X0(e,t){let r=e.toLowerCase(),n=o=>{let s=o.length,a=e.length;if(a>s&&r.endsWith(o))return e.slice(0,a-s|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function H2(e){return e.endsWith("s")?[Ya(e),e]:[e,Uv(e)]}function od(e,t){return e.find(r=>r.name===t)}function W2(e,t){let r=I9(t),n=Uv(r),i=od(e,n);return i!==void 0?i:od(e,r)}function O9(e){return oe(D(R(R(Y(e),t=>M(t,"required")),mr),[]),de)}function M9(e,t,r,n){return oe(e.references,i=>{let o=M(n,i.fieldName),s=R(o,Y),a=R(R(s,p=>M(p,"type")),de),l=We(a,"array"),u=i.plugin,d=u!==void 0?t.filter(p=>p.pluginId===u):t,f=od(d,i.entity),h=f!==void 0?f:W2(d,i.entity);if(h!==void 0){let p=H2(h.name);return{propertyKey:i.fieldName,queryField:h.queryField,singleQueryField:h.singleQueryField,labelField:h.labelField,multi:l,required:r.some(g=>g===i.fieldName),entityName:p[0],entityNamePlural:p[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.')})}function L9(e,t,r,n,i,o){let s=[];return i!==void 0&&Ge(i).forEach(a=>{let l=a[0],u=Y(a[1]);if(Le(R(u,E=>M(E,"const"))))return;let f=R(R(u,E=>M(E,"type")),de),h=R(R(R(R(u,E=>M(E,"items")),Y),E=>M(E,"type")),de),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 g=!1;if(e.level==="Collection"&&!p){let E;if(t!==void 0)if(We(e.aggregateIdField,l))E=!0;else{let S=X0(l,!1);E=S!==void 0?S.toLowerCase()===t.name.toLowerCase():!1}else E=We(e.aggregateIdField,l);g=E}if(g)return;let m=e.aggregateIdField,v;if(m!==void 0&&t!==void 0&&m===l&&!p){let E=od(r,Uv(t.name));v=E!==void 0?E:od(r,t.name)}else v=void 0;let _;if(v!==void 0)_=v;else{let E=X0(l,p);_=E!==void 0?W2(r,E):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 E=H2(_.name),S=_.queryField,k=_.singleQueryField,C=_.labelField,$=n.some(P=>P===l),A=E[0],N=E[1],O={propertyKey:l,queryField:S,singleQueryField:k,labelField:C,multi:p,required:$,entityName:A,entityNamePlural:N};s.push(O);return}if(X0(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}}),s}function z9(e,t,r,n){let i=O9(e.schema),o=R(R(Y(e.schema),a=>M(a,"properties")),Y);if(e.references.length===0)return L9(e,t,r,i,o,n);let s=D(o,{});return M9(e,r,i,s)}function U9(e,t){let r=(n,i)=>({name:n.name,label:n.label,schema:n.schema,mutationDocument:n.mutationDocument,requiredRole:n.requiredRole,level:n.level,aggregateIdField:n.aggregateIdField,refFields:z9(n,i,t,e.id),references:n.references,allowedStates:n.allowedStates,targetState:n.targetState});return{id:e.id,name:e.name,readModels:e.readModels.map(n=>{let i={...n};return i.commands=n.commands.map(o=>r(o,void 0)),i}),aggregates:e.aggregates.map(n=>({name:n.name,schema:n.schema,commands:n.commands.map(i=>r(i,n)),linkedViews:n.linkedViews})),stateViewSlices:e.stateViewSlices,stateChangeSlices:e.stateChangeSlices.map(n=>({name:n.name,commands:n.commands.map(i=>r(i,void 0)),linkedViews:n.linkedViews,consistencyRead:n.consistencyRead}))}}let h5e={capitalize:I9,pluralize:Uv,singularize:Ya,warnedIdLabel:Sx,warnedUnsearchable:Ex,warnIfIdLabel:wx,warnIfUnsearchable:kx,buildRegistry:P9,stemFromKey:X0,entityDisplayNames:H2,findByName:od,findByStem:W2,requiredSet:O9,resolveExplicitRefs:M9,resolveByHeuristic:L9,resolveForCommand:z9,enrichPlugin:U9};function Bv(e){let t=_e.object(e);if(t===void 0)return;let r=R(t.properties,_e.object);if(r!==void 0)return r;let n=R(R(R(t.items,_e.object),i=>i.properties),_e.object);return n!==void 0?n:it(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:R(R(t[o],_e.array),s=>it(s,void 0,(a,l)=>a!==void 0?a:Bv(l))))}function B9(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(a=>{if(n<=0)return a;let l=R(e[a],Bv);return l!==void 0?a+" { "+B9(l,n-1|0,!1)+" }":a}).join(" ")}function p5e(e,t){return Object.keys(e).filter(i=>{let o=e[i];return o!==void 0?Pi(Bv(o)):!0}).join(" ")}function j9(e,t,r){let n=Object.keys(e),i=n.includes("id")?n:["id"].concat(n);return oe(i,o=>{let s=e[o];if(s===void 0)return o;let a=Bv(s);if(a===void 0)return o;let l=p5e(a);if(l!=="")return o+" { "+l+" }"}).join(" ")}function jv(e){return D(R(R(_e.object(e),t=>t.properties),_e.object),{})}function HD(e,t,r,n,i,o){let s=n!==void 0?n:!1,a=i!==void 0?i:!1,l=o!==void 0?o:!1,u=j9(jv(t)),d=s||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,y=a?v.concat(["$orderBy: "+r+"OrderBy"]):v,E=a?_.concat(["orderBy: $orderBy"]):_;p=[y,E]}else p=[f,h];let g=p[0].join(", "),m=p[1].join(", ");return"query("+g+") { "+e+"("+m+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+u+" } } } }"}function WD(e,t){let r=B9(jv(t),void 0,void 0),n=Kx(t);return n!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+n+": $subId) { "+r+" } }":"query($id: ID!) { "+e+"(id: $id) { "+r+" } }"}function g5e(e,t){let r=j9(jv(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function m5e(e){return Vx(e).length===0?Pi(Kx(e)):!1}function v5e(e){let t=Object.keys(jv(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function _5e(e,t,r,n,i,o,s,a,l,u,d,f){let h=[],p=i!==void 0?i:[],g=o!==void 0?o:[],m=s!==void 0?s:[],v={},_={},y={},E=fe(d,[],j=>eie(j,e)),S=p.length===0?[e]:p,k=P9(S),C=U9(e,k),$={},A=(j,le)=>{let xe=M($,j);xe!==void 0?$[j]=xe.concat(le):$[j]=le};C.aggregates.forEach(j=>{j.linkedViews.forEach(le=>A(le,j.commands))}),C.stateChangeSlices.forEach(j=>{let le=j.commands.filter(X=>X.level==="Collection"),xe=j.commands.filter(X=>X.level==="Instance");j.linkedViews.forEach(X=>A(X,le)),ae(j.consistencyRead,X=>A(X,xe))});let N=[],O=nu(),P=C.id,I=(j,le,xe,X,he,qe)=>{let Ve=m5e(j.schema),Ke=Ve?j.queryField+"ByIds":void 0,pt=Ve?g5e(j.queryField,j.schema):void 0,gt=v5e(j.schema),jt=D(AK(j.schema),!0),ge=j.name,Oe=qs(Da(P,ge)),St=M(_,ge),er=xe+ge,lr={label:ge,icon:void 0,group:C.name,sortOrder:j.sortIndex},yi={fragmentId:er,title:ge,menuEntry:lr,requiredAccess:St,url:Oe},xi=P+"."+ge,qt=(Tn,ji)=>b(dMe,{readModel:j,detailView:le,pluginId:P,openRowId:Tn,drillPath:ji,singleQueryField:X,detailQueryDocument:he,byIdsQueryField:Ke,byIdsQueryDocument:pt,sortKeyField:gt,liveDefault:jt,uiHints:d,schedulerJoin:qe},xi);return N.push(nc(oc(P,ge),Tn=>{let ji=QK(Tn);return b(k0,{definition:yi,children:qt(ji[0],ji[1])})})),fU(O,P,ge,Da(P,ge)),yi},U=C.readModels.filter(j=>!g.includes(j.name)).map(j=>{let le=D(M($,j.name),j.commands),xe=Ya(j.queryField),X=vx(j.schema);if(j.queryDocument===""){let qe={...j};return qe.commands=le,qe.queryDocument=HD(j.queryField,j.schema,xe,X.hasFilter,X.hasSort,X.hasSearch),qe}let he={...j};return he.commands=le,he}),B=C.stateViewSlices.filter(j=>!g.includes(j.name)).map(j=>{let le=D(M($,j.name),[]),xe=Ya(j.queryField),X=vx(j.schema),he=HD(j.queryField,j.schema,xe,X.hasFilter,X.hasSort,X.hasSearch);return{name:j.name,schema:j.schema,queryDocument:he,queryField:j.queryField,sortIndex:j.sortIndex,commands:le,linkedWriteSide:j.linkedWriteSide,labelField:j.labelField,labelFieldSource:j.labelFieldSource,searchableFields:j.searchableFields,statusField:j.statusField}}),V=vOe(U.concat(B),d,(j,le)=>{console.warn("[AutoUI] "+C.id+': scheduler canvas "'+j+'" has '+le.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),W=C.aggregates,Q={readModels:U,aggregates:W},K=j=>J(KTe(Q,j),le=>{let xe=M(_,le.readModel.name);return X=>b(O8e,{binding:le,entityId:X,requiredAccess:xe})}),G=j=>{let le=D(d,D1),xe=rie(ro(le,j.name),pTe(j.schema));return J(gTe(j,xe),X=>{let he=M(_,j.name);return qe=>b(SLe,{binding:X,entityId:qe,requiredAccess:he})})},ne=j=>{let le=D(d,D1);if(nie(ro(le,j.name)))return xe=>b(f5e,{readModel:j.name,entityId:xe})},se=j=>{let le=K(j.name),xe=G(j);if(!(le===void 0&&xe===void 0))return X=>L(Br,{children:[fe(le,null,he=>he(X)),fe(xe,null,he=>he(X))]})},be=U.map(j=>{let le=Ya(j.queryField),xe=WD(le,j.schema),X=D(J(oe(j.linkedWriteSide,Ve=>C.aggregates.find(Ke=>Ke.name===Ve))[0],Ve=>Ve.commands),j.commands),he=M(v,j.name);return I(j,he!==void 0?he:(Ve,Ke,pt)=>b(jD,{data:pt,schema:j.schema,rootLabel:j.name,commands:X,statusField:j.statusField,aggregateId:Ve,labelField:j.labelField,drillPath:Ke,pluginId:C.id,viewName:j.name,uiHints:d,entityPanel:se(j),headerAccessory:ne(j)}),C.id+".",le,xe,M(V,j.name))}),Ae=B.map(j=>{let le=Ya(j.queryField),xe=WD(le,j.schema),X=M(v,j.name);return I(j,X!==void 0?X:(qe,Ve,Ke)=>b(jD,{data:Ke,schema:j.schema,rootLabel:j.name,commands:j.commands,statusField:j.statusField,aggregateId:qe,labelField:j.labelField,drillPath:Ve,pluginId:C.id,viewName:j.name,uiHints:d,entityPanel:se(j),headerAccessory:ne(j)}),C.id+".slice.",le,xe,M(V,j.name))}),$e=C.stateChangeSlices.filter(j=>!m.includes(j.name)).map(j=>({fragmentId:C.id+".commands."+j.name,title:j.name,description:"Auto-generated command panel for "+j.name,extensionPackage:C.id,positions:h,component:le=>b(d8e,{slice:j,contextId:le.contextId}),requiredAccess:M(y,j.name),minWidth:void 0})),ot=U.concat(B).toSorted((j,le)=>j.sortIndex===le.sortIndex?jf(j.name,le.name):$x(j.sortIndex,le.sortIndex));Le(nE("autoui.inferenceReport"))&&Y8e(C.id,VD(ot),d,E),ae(f,j=>j(D9(C.id,VD(ot),d,E)));let ye=oe(Ug(),j=>{let le=j.arity;if(!(typeof le!="object"||le.TAG!=="Multi"))return[j,le.min]}).flatMap(j=>{let le=j[1],xe=j[0],X={};return ot.forEach(he=>{let qe=R(d,gt=>ro(gt,he.name)),Ve=fe(R(qe,gt=>gt.suppress),!1,gt=>gt.includes(xe.id));if(!(xe.isCapable(he.schema)&&!Ve))return;let Ke=D(R(qe,gt=>gt.canvas),xe.label),pt=M(X,Ke);pt!==void 0?pt.push(he):X[Ke]=[he]}),oe(Ge(X),he=>{let qe=he[1];if(qe.length>=le)return[xe,he[0],qe]})}),we=(j,le)=>ye.some(xe=>xe[1]===le?xe[0].id!==j.id:!1)?le+" — "+j.label:le,Ze=ye.map(j=>{let le=j[2],xe=j[0],X=we(xe,j[1]),he=C.id+".canvas."+X,qe={label:X,icon:void 0,group:C.name,sortOrder:900},Ve=f3(_,le.map(gt=>gt.name)),Ke=qs(Da(P,X)),pt={fragmentId:he,title:X,menuEntry:qe,requiredAccess:Ve,url:Ke};return N.push(nc(oc(P,X),gt=>b(k0,{definition:pt,children:b(DLe,{pluginId:P,mode:xe,canvasName:X,readModels:le,uiHints:d,viewAccess:_})}))),pt}),Zt=oe(Ug(),j=>{let le=j.arity;if(!(typeof le!="object"||le.TAG==="Multi"))return[j,le._0]}).flatMap(j=>{let le=j[1],xe=j[0],X={},he={},qe=(gt,jt,ge)=>{let Oe=M(gt,jt);Oe!==void 0?Oe.push(ge):gt[jt]=[ge]};ot.forEach(gt=>{let jt=R(d,St=>ro(St,gt.name)),ge=D(R(jt,St=>St.canvas),xe.label),Oe=R(jt,St=>St.role);if(Oe!==void 0)return Oe===xu?qe(X,ge,gt):Oe===Su?ae(R(jt,St=>St.resourceRef),St=>qe(he,ge,[gt,St])):void 0});let Ve=(gt,jt)=>fe(le.find(ge=>ge.role===gt),jt,ge=>ge.min),Ke=Ve(xu,1),pt=Ve(Su,1);return oe(Ge(X),gt=>{let jt=gt[1],ge=gt[0],Oe=D(M(he,ge),[]),St=jt[0];if(St===void 0||!(jt.length>=Ke&&Oe.length>=pt))return;let er=Oe.map(Tn=>({readModel:Tn[0],resourceRef:Tn[1]})),lr=C.id+".scheduler."+ge,Kr={label:ge,icon:void 0,group:C.name,sortOrder:910},yi=ITe(_,St.name),xi=qs(Da(P,ge)),qt={fragmentId:lr,title:ge,menuEntry:Kr,requiredAccess:yi,url:xi};return N.push(nc(oc(P,ge),Tn=>b(k0,{definition:qt,children:b(H8e,{pluginId:P,canvasName:ge,mode:xe,resource:St,events:er,uiHints:d,viewAccess:_})}))),qt})}),Ut=U.concat(B).flatMap(j=>kK(j.schema).map(le=>({view:j.name,label:le[2],field:le[0],aggregate:le[1]}))),Qn=D(R(d,j=>j.dashboard),[]),ar=Qn.map(j=>[j.view,D(j.field,"")]),Bi=Qn.concat(Ut.filter(j=>!ar.some(le=>le[0]===j.view?le[1]===D(j.field,""):!1))),$r;if(Bi.length!==0){let j="Dashboard",le=U.concat(B),xe=C.id+".dashboard",X={label:j,icon:void 0,group:C.name,sortOrder:-100},he=f3(_,it(Bi.map(Ke=>Ke.view),[],(Ke,pt)=>Ke.includes(pt)?Ke:Ke.concat([pt])).filter(Ke=>le.some(pt=>pt.name===Ke))),qe=qs(Da(P,j)),Ve={fragmentId:xe,title:j,menuEntry:X,requiredAccess:he,url:qe};N.push(nc(oc(P,j),Ke=>b(k0,{definition:Ve,children:b(uLe,{pluginId:P,metrics:Bi,readModels:le,uiHints:d,viewAccess:_})}))),$r=[Ve]}else $r=[];let Yn=A9(U.concat(B)),Nr;if(Yn.length!==0){let j="Lifecycles",le=C.id+".lifecycles",xe={label:j,icon:void 0,group:C.name,sortOrder:-50},X=qs(Da(P,j)),he={fragmentId:le,title:j,menuEntry:xe,requiredAccess:void 0,url:X};N.push(nc(oc(P,j),qe=>b(m8e,{views:Yn}))),Nr=[he]}else Nr=[];return{pages:$r.concat(Nr.concat(be.concat(Ae.concat(Ze.concat(Zt))))),panels:$e,routes:N,publicLinks:O}}let GD=new Map;function b5e(e,t){let r=GD.get(e);if(!(r!==void 0?r===t:!1)){oF.registerRemotes([{name:e,entry:t}]),GD.set(e,t);return}}async function y5e(e,t,r){b5e(e,r);try{let n=await oF.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=Eu(n);if(i.RE_EXN_ID!==um)return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r};let o=D(i._1.message,"unknown error");return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r+": "+o}}}const x5e=ur(null),Sy={didCatch:!1,error:null};class S5e extends m7{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Sy}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),s=0;s<i;s++)o[s]=arguments[s];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(Sy)}}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&&E5e(t.resetKeys,i)){var o,s;(o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Sy)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=t;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")a=r(l);else if(n)a=Sr(n,l);else if(i!==void 0)a=i;else throw s}return Sr(x5e.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function E5e(){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 w5e(e){let t=D(e.error.message,"unknown error");return b("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function k5e(e,t){console.error("Fragment crashed:",e)}function C5e(e){let t=e.fallbackComponent;return Sr(S5e,{FallbackComponent:t!==void 0?t:w5e,onError:k5e,children:e.children})}let R5e=C5e;function A5e(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=ue(()=>"Loading"),o=i[1],s=i[0];return Te(()=>{o(l=>"Loading");let a={contents:!1};return y5e(n,r,t).then(l=>{if(a.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}))}),()=>{a.contents=!0}},[n,r,t]),typeof s!="object"?b("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):s.TAG==="Loaded"?b(R5e,{children:Sr(s._0,e.panelProps)}):b("div",{children:"Panel error: "+s._0,style:{color:"#a00",padding:"0.75rem"}})}let T5e=A5e;function ti(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function zl(e){return ti(e)==="object"}function $5e(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function JD(e,t){return e.length<124?e:t}const N5e="graphql-transport-ws";var Ei;(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"})(Ei||(Ei={}));var Pr;(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"})(Pr||(Pr={}));function q9(e){if(!zl(e))throw new Error(`Message is expected to be an object, but got ${ti(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 ${ti(e.type)}`);switch(e.type){case Pr.ConnectionInit:case Pr.ConnectionAck:case Pr.Ping:case Pr.Pong:{if(e.payload!=null&&!zl(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 Pr.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!zl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${ti(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 ${ti(e.payload.query)}`);if(e.payload.variables!=null&&!zl(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 ${ti(e.payload.variables)}`);if(e.payload.operationName!=null&&ti(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 ${ti(e.payload.operationName)}`);if(e.payload.extensions!=null&&!zl(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 ${ti(e.payload.extensions)}`);break}case Pr.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!zl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${ti(e.payload)}`);break}case Pr.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$5e(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 Pr.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${ti(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 D5e(e,t){return q9(typeof e=="string"?JSON.parse(e,t):e)}function cf(e,t){return q9(e),JSON.stringify(e,t)}var Lc=function(e){return this instanceof Lc?(this.v=e,this):new Lc(e)},F5e=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),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(p){return function(g){return Promise.resolve(g).then(p,f)}}function a(p,g){n[p]&&(i[p]=function(m){return new Promise(function(v,_){o.push([p,m,v,_])>1||l(p,m)})},g&&(i[p]=g(i[p])))}function l(p,g){try{u(n[p](g))}catch(m){h(o[0][3],m)}}function u(p){p.value instanceof Lc?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,g){p(g),o.shift(),o.length&&l(o[0][0],o[0][1])}};function I5e(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:s=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(W){let Q=1e3;for(let K=0;K<W;K++)Q*=2;await new Promise(K=>setTimeout(K,Q+Math.floor(Math.random()*2700+300)))},shouldRetry:f=Ey,isFatalConnectionProblem:h,on:p,webSocketImpl:g,generateID:m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,W=>{const Q=Math.random()*16|0;return(W=="x"?Q:Q&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:_}=e;let y;if(g){if(!O5e(g))throw new Error("Invalid WebSocket implementation provided");y=g}else typeof WebSocket<"u"?y=WebSocket:typeof global<"u"?y=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(y=window.WebSocket||window.MozWebSocket);if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const E=y,S=(()=>{const V=(()=>{const Q={};return{on(K,G){return Q[K]=G,()=>{delete Q[K]}},emit(K){var G;"id"in K&&((G=Q[K.id])===null||G===void 0||G.call(Q,K))}}})(),W={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?[V.emit,p.message]:[V.emit],closed:p?.closed?[p.closed]:[],error:p?.error?[p.error]:[]};return{onMessage:V.on,on(Q,K){const G=W[Q];return G.push(K),()=>{G.splice(G.indexOf(K),1)}},emit(Q,...K){for(const G of[...W[Q]])G(...K)}}})();function k(V){const W=[S.on("error",Q=>{W.forEach(K=>K()),V(Q)}),S.on("closed",Q=>{W.forEach(K=>K()),V(Q)})]}let C,$=0,A,N=!1,O=0,P=!1;async function I(){clearTimeout(A);const[V,W]=await(C??(C=new Promise((G,ne)=>(async()=>{if(N){if(await d(O),!$)return C=void 0,ne({code:1e3,reason:"All Subscriptions Gone"});O++}S.emit("connecting",N);const se=new E(typeof t=="function"?await t():t,N5e);let be,Ae;function $e(){isFinite(s)&&s>0&&(clearTimeout(Ae),Ae=setTimeout(()=>{se.readyState===E.OPEN&&(se.send(cf({type:Pr.Ping})),S.emit("ping",!1,void 0))},s))}k(ye=>{C=void 0,clearTimeout(be),clearTimeout(Ae),ne(ye),ye instanceof QD&&(se.close(4499,"Terminated"),se.onerror=null,se.onclose=null)}),se.onerror=ye=>S.emit("error",ye),se.onclose=ye=>S.emit("closed",ye),se.onopen=async()=>{try{S.emit("opened",se);const ye=typeof r=="function"?await r():r;if(se.readyState!==E.OPEN)return;se.send(cf(ye?{type:Pr.ConnectionInit,payload:ye}:{type:Pr.ConnectionInit},v)),isFinite(l)&&l>0&&(be=setTimeout(()=>{se.close(Ei.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),$e()}catch(ye){S.emit("error",ye),se.close(Ei.InternalClientError,JD(ye instanceof Error?ye.message:new Error(ye).message,"Internal client error"))}};let ot=!1;se.onmessage=({data:ye})=>{try{const we=D5e(ye,_);if(S.emit("message",we),we.type==="ping"||we.type==="pong"){S.emit(we.type,!0,we.payload),we.type==="pong"?$e():a||(se.send(cf(we.payload?{type:Pr.Pong,payload:we.payload}:{type:Pr.Pong})),S.emit("pong",!1,we.payload));return}if(ot)return;if(we.type!==Pr.ConnectionAck)throw new Error(`First message cannot be of type ${we.type}`);clearTimeout(be),ot=!0,S.emit("connected",se,we.payload,N),N=!1,O=0,G([se,new Promise((Ze,Zt)=>k(Zt))])}catch(we){se.onmessage=null,S.emit("error",we),se.close(Ei.BadResponse,JD(we instanceof Error?we.message:new Error(we).message,"Bad response"))}}})())));V.readyState===E.CLOSING&&await W;let Q=()=>{};const K=new Promise(G=>Q=G);return[V,Q,Promise.race([K.then(()=>{if(!$){const G=()=>V.close(1e3,"Normal Closure");isFinite(o)&&o>0?A=setTimeout(()=>{V.readyState===E.OPEN&&G()},o):G()}}),W])]}function U(V){if(Ey(V)&&(P5e(V.code)||[Ei.InternalServerError,Ei.InternalClientError,Ei.BadRequest,Ei.BadResponse,Ei.Unauthorized,Ei.SubprotocolNotAcceptable,Ei.SubscriberAlreadyExists,Ei.TooManyInitialisationRequests].includes(V.code)))throw V;if(P)return!1;if(Ey(V)&&V.code===1e3)return $>0;if(!u||O>=u||!f(V)||h?.(V))throw V;return N=!0}n||(async()=>{for($++;;)try{const[,,V]=await I();await V}catch(V){try{if(!U(V))return}catch(W){return i?.(W)}}})();function B(V,W){const Q=m(V);let K=!1,G=!1,ne=()=>{$--,K=!0};return(async()=>{for($++;;)try{const[se,be,Ae]=await I();if(K)return be();const $e=S.onMessage(Q,ot=>{switch(ot.type){case Pr.Next:{W.next(ot.payload);return}case Pr.Error:{G=!0,K=!0,W.error(ot.payload),ne();return}case Pr.Complete:{K=!0,ne();return}}});se.send(cf({id:Q,type:Pr.Subscribe,payload:V},v)),ne=()=>{!K&&se.readyState===E.OPEN&&se.send(cf({id:Q,type:Pr.Complete},v)),$--,K=!0,be()},await Ae.finally($e);return}catch(se){if(!U(se))return}})().then(()=>{G||W.complete()}).catch(se=>{W.error(se)}),()=>{K||ne()}}return{on:S.on,subscribe:B,iterate(V){const W=[],Q={done:!1,error:null,resolve:()=>{}},K=B(V,{next(ne){W.push(ne),Q.resolve()},error(ne){Q.done=!0,Q.error=ne,Q.resolve()},complete(){Q.done=!0,Q.resolve()}}),G=(function(){return F5e(this,arguments,function*(){for(;;){for(W.length||(yield Lc(new Promise(be=>Q.resolve=be)));W.length;)yield yield Lc(W.shift());if(Q.error)throw Q.error;if(Q.done)return yield Lc(void 0)}})})();return G.throw=async ne=>(Q.done||(Q.done=!0,Q.error=ne,Q.resolve()),{done:!0,value:void 0}),G.return=async()=>(K(),{done:!0,value:void 0}),G},async dispose(){if(P=!0,C){const[V]=await C;V.close(1e3,"Normal Closure")}},terminate(){C&&S.emit("closed",new QD)}}}class QD extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function Ey(e){return zl(e)&&"code"in e&&"reason"in e}function P5e(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function O5e(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function M5e(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return I5e({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function Nh(e,t){return R(e[t],_e.string)}function Fo(e,t){return D(Nh(e,t),"")}function L5e(e,t){return J(R(e[t],_e.float),r=>r|0)}function z5e(e,t){return oe(D(R(e[t],_e.array),[]),_e.string)}function U5e(e){let t=_e.object(e);return t!==void 0?{label:Fo(t,"label"),icon:Nh(t,"icon"),group:Nh(t,"group"),sortOrder:D(L5e(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function B5e(e){return J(_e.object(e),t=>({fragmentId:Fo(t,"fragmentId"),title:Fo(t,"title"),description:Fo(t,"description"),positions:z5e(t,"positions"),requiredAccess:Nh(t,"requiredAccess")}))}function j5e(e){return J(_e.object(e),t=>({fragmentId:Fo(t,"fragmentId"),title:Fo(t,"title"),menuEntry:D(J(t.menuEntry,U5e),{label:Fo(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:Nh(t,"requiredAccess")}))}function q5e(e){return J(_e.object(e),t=>({pluginId:Fo(t,"pluginId"),remoteEntryUrl:Fo(t,"remoteEntryUrl"),panels:oe(D(R(t.panels,_e.array),[]),B5e),pages:oe(D(R(t.pages,_e.array),[]),j5e),registeredAt:Fo(t,"registeredAt"),updatedAt:Fo(t,"updatedAt")}))}function V5e(e){return oe(D(R(R(R(R(_e.object(e),t=>t.data),_e.object),t=>t.Platform_UIFragments),_e.array),[]),q5e)}let K5e=`{
|
|
92
|
+
Platform_UIFragments {
|
|
93
|
+
pluginId
|
|
94
|
+
remoteEntryUrl
|
|
95
|
+
panels { fragmentId title description positions requiredAccess }
|
|
96
|
+
pages {
|
|
97
|
+
fragmentId
|
|
98
|
+
title
|
|
99
|
+
menuEntry { label icon group sortOrder }
|
|
100
|
+
requiredAccess
|
|
101
|
+
}
|
|
102
|
+
registeredAt
|
|
103
|
+
updatedAt
|
|
104
|
+
}
|
|
105
|
+
}`;function H5e(e,t){return ae(R(R(Y(t),r=>M(r,"properties")),Y),r=>{Fx(r).forEach(n=>ae(R(R(Y(n),i=>M(i,"x-reventless-semantic-target")),Y),i=>{let o=M(i,"store"),s=M(i,"plugin");if(o!==void 0&&s===void 0){i.plugin=e;return}}))}),t}function Cx(e,t){let r=de(t);return H5e(e,r!==void 0?JSON.parse(r):t)}function YD(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function XD(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function W5e(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function G5e(e,t){let r=D(R(M(t,"type"),de),"string");return r!=="array"?XD(e)&&r==="string"?"ID":YD(r):"["+D(J(R(R(R(M(t,"items"),Y),i=>M(i,"type")),de),i=>i==="string"&&(W5e(e)||XD(e))?"ID":YD(i)),"String")+"!]"}function J5e(e,t,r){let n=D(J(R(R(Y(t),u=>M(u,"properties")),Y),u=>Object.keys(u).filter(d=>d!=="TAG").map(d=>{let f=D(J(R(M(u,d),Y),h=>G5e(d,h)),"String");return[d,f]})),[]),o=(r!==void 0?[]:[["id","ID"]]).concat(n),s="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(o.length===0)return"mutation { "+e+" { "+s+" } }";let a=o.map(u=>"$"+u[0]+": "+u[1]+"!").join(", "),l=o.map(u=>{let d=u[0];return d+": $"+d}).join(", ");return"mutation "+e+"("+a+") { "+e+"("+l+") { "+s+" } }"}function Q5e(e){let t=e.split(".");return D(t[t.length-1|0],e)}function Y5e(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function X5e(e){return oe(D(mr(e),[]),t=>J(Y(t),r=>{let n=i=>D(R(M(r,i),de),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:R(M(r,"plugin"),de)}}))}function ZD(e,t){return oe(D(mr(t),[]),r=>J(R(Y(r),n=>{let i=R(M(n,"apiExposed"),bF);if(!We(i,!1))return n}),n=>{let i=g=>D(R(M(n,g),de),""),o=i("name"),a=i("level")==="Instance"?"Instance":"Collection",l=D(J(M(n,"schema"),g=>Cx(e,g)),null),u=i("mutationField"),d=R(M(n,"aggregateIdField"),de),f=D(J(M(n,"references"),X5e),[]),h=J(R(M(n,"allowedStates"),mr),g=>oe(g,de)),p=R(M(n,"targetState"),de);return{name:o,label:Y5e(Q5e(o)),schema:l,mutationDocument:J5e(u,l,d),requiredRole:void 0,level:a,aggregateIdField:d,refFields:[],references:f,allowedStates:h,targetState:p}}))}function Z5e(e){return oe(D(mr(e),[]),t=>J(Y(t),r=>{let n=f=>D(R(M(r,f),de),""),i=f=>D(R(M(r,f),mr),[]),o=(f,h)=>oe(D(R(M(f,h),mr),[]),de),s=n("pluginId"),a=oe(i("readModels"),f=>J(Y(f),h=>{let p=g=>D(R(M(h,g),de),"");return{name:p("name"),schema:D(J(M(h,"schema"),g=>Cx(s,g)),null),queryDocument:"",queryField:p("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(h,"linkedWriteSide"),labelField:p("labelField"),labelFieldSource:R(M(h,"labelFieldSource"),de),searchableFields:o(h,"searchableFields"),statusField:R(M(h,"statusField"),de)}})),l=oe(i("aggregates"),f=>J(Y(f),h=>({name:(g=>D(R(M(h,g),de),""))("name"),schema:null,commands:ZD(s,D(M(h,"commands"),[])),linkedViews:o(h,"linkedViews")}))),u=oe(i("stateViewSlices"),f=>J(Y(f),h=>{let p=g=>D(R(M(h,g),de),"");return{name:p("name"),schema:D(J(M(h,"schema"),g=>Cx(s,g)),null),queryField:p("queryField"),sortIndex:0,linkedWriteSide:o(h,"linkedWriteSide"),labelField:p("labelField"),labelFieldSource:R(M(h,"labelFieldSource"),de),searchableFields:o(h,"searchableFields"),statusField:R(M(h,"statusField"),de)}})),d=oe(i("stateChangeSlices"),f=>J(Y(f),h=>({name:(g=>D(R(M(h,g),de),""))("name"),commands:ZD(s,D(M(h,"commands"),[])),linkedViews:o(h,"linkedViews"),consistencyRead:R(M(h,"consistencyRead"),de)})));return{id:s,name:s,readModels:a,aggregates:l,stateViewSlices:u,stateChangeSlices:d}}))}function eze(e){return D(J(R(R(R(_e.object(e),t=>t.data),_e.object),t=>t.Platform_ComponentDefinitions),Z5e),[])}let tze=`{
|
|
106
|
+
Platform_ComponentDefinitions {
|
|
107
|
+
pluginId
|
|
108
|
+
readModels { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField }
|
|
109
|
+
aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed } linkedViews }
|
|
110
|
+
stateViewSlices { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField }
|
|
111
|
+
stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed } linkedViews consistencyRead }
|
|
112
|
+
}
|
|
113
|
+
}`;function Rx(e,t){return e+"/"+t}function rze(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(Rx(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(Rx(r.pluginId,i.fragmentId),n)});return}}),t}function nze(e,t,r){return e.get(Rx(t,r))}function ize(e,t,r){return e.map(n=>{let i=nze(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(T5e,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function eF(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(J([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function oze(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>eF(n.fragmentId,e)),r.panels.map(n=>eF(n.fragmentId,e))]:[[],[]]}function tF(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),Vt(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function sze(e,t,r,n,i,o,s,a){let l=rze(s);n(h5e.buildRegistry(o)),i(oe(o,p=>J(Npe(p),g=>({pluginId:p.id,binding:g}))));let u=[],d=[],f=[],h={contents:nu()};o.forEach(p=>{let g=oze(p.id,s),m=_5e(p,void 0,void 0,void 0,o,g[0],g[1],void 0,void 0,void 0,a[p.id],void 0),v=ize(m.panels,p.id,l);m.pages.forEach(_=>{u.push(_)}),v.forEach(_=>{d.push(_)}),m.routes.forEach(_=>{f.push(_)}),h.contents=Ty(h.contents,m.publicLinks)}),ae(e,p=>p.setPluginPages(u)),ae(t,p=>p.setPluginPanels(d)),ae(r,p=>p.setPluginRoutes(f,h.contents)),s.forEach(p=>{})}function rF(e,t,r,n,i,o,s,a,l){let u=tF(e.platformApiEndpoint,tze,t),d=tF(e.platformApiEndpoint,K5e,t);return Promise.all([u,d]).then(f=>{let h=f[1],p=f[0];(Bg(p)||Bg(h))&&r();let g=eze(p),m=V5e(h);sze(n,i,o,s,a,g,m,l)})}let aze=`subscription OnPluginStatusChange {
|
|
114
|
+
onPluginStatusChange { pluginId status }
|
|
115
|
+
}`,lze=`subscription OnUIFragmentChange {
|
|
116
|
+
onUIFragmentChange { pluginId changeKind }
|
|
117
|
+
}`;function uze(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=It(ep),o=It(tp),s=yw(),a=WK(),l=C0e(),u=As(),d=R(u,f=>f.getToken());return Te(()=>{rF(r,d,()=>ae(u,f=>f.logout()),i,o,s,a,l,n)},[d]),Te(()=>{try{let f=M5e(r.platformApiSubscriptionEndpoint,d),h=()=>{rF(r,d,()=>ae(u,m=>m.logout()),i,o,s,a,l,n)},p=f.subscribe({query:aze,variables:void 0},{next:m=>h(),error:m=>{},complete:()=>{}}),g=f.subscribe({query:lze,variables:void 0},{next:m=>h(),error:m=>{},complete:()=>{}});return()=>{p(),g(),f.dispose()}}catch{return}},[d]),null}let cze=uze;function $i(e){return"var("+e+")"}let dze=w([c("background",$i(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",$i(Z.md)),c("padding",$i(F.lg)),z("flex"),me("column"),ee("center"),Ye("center"),c("gap",$i(F.sm)),c("min-height","160px"),ca("center"),jo({NAME:"percent",VAL:100}),c("box-sizing","border-box")]),fze=w([c("font-size","32px"),c("line-height","1"),Em(Re(4))]),hze=w([c("color",$i(x.textPrimary)),c("font-size",$i(T.sizeMd)),c("font-weight",$i(T.weightMedium)),Em(Re(4))]),pze=w([c("color",$i(x.textSecondary)),c("font-size",$i(T.sizeSm)),c("line-height",$i(T.lineHeightNormal))]),gze=w([c("color",$i(x.textDisabled)),c("font-size",$i(T.sizeXs)),c("font-family",$i(T.fontFamilyMono)),Es(Re(8))]);function mze(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:fze}),b("div",{children:t.title,className:hze}),b("div",{children:t.description,className:pze}),b("div",{children:t.extensionPackage,className:gze})],className:dze})}let vze=mze,_ze=w([z("flex"),ee("center"),Ye("center"),c("min-height","160px"),c("color","var("+x.textSecondary+")"),c("font-size","var("+T.sizeSm+")")]);function bze(e){return b("div",{children:"Loading…",className:_ze})}w([z("flex"),ee("center"),Ye("center"),c("min-height","160px"),c("color","var("+x.error+")"),c("font-size","var("+T.sizeSm+")")]);function yze(e){let t=El(),r=khe(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?b(vze,{definition:r}):b(v7,{children:r.component(e.props),fallback:b(bze,{})})}let xze=yze;function Sze(e){let t=whe(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?b("div",{children:t.map(o=>b(xze,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let Eze=Sze;function wze(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(Eze,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let kze=wze,Cze="host.home",Rze="/",Aze={label:"Home",icon:void 0,group:void 0,sortOrder:0},Tze=Rze,$ze={fragmentId:Cze,title:"Home",menuEntry:Aze,requiredAccess:void 0,url:Tze};function Nze(e){let t=e.config,r=It(ep),n=yw(),i=D4(),o=dm();return Te(()=>{t.autoRedirectFirstPage||(ae(r,s=>s.register([$ze])),ae(n,s=>s.register([nc(gF(a=>a),b(kze,{}))],nu())))},[]),Te(()=>{if(t.autoRedirectFirstPage&&(o===""||o==="/")){let s=i.find(a=>Le(a.url));if(s!==void 0){let a=s.url;a!==void 0&&zc(a)}}},[i.length,o]),null}let Dze=Nze;function Fze(e){return R(Y(e),t=>{let r=R(M(t,"uploadUrl"),de),n=R(M(t,"storageRef"),de);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function Ize(e,t,r,n,i){return new Promise((o,s)=>{let a=new XMLHttpRequest;a.open("PUT",e),a.setRequestHeader("Content-Type",n),a.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},a.onload=()=>{let l=a.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},a.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),a.send(r)})}function Pze(e,t){let r=t!==void 0?t:()=>{};return{upload:(n,i)=>{let o=n.type,s=dt([["content-type","application/json"]]);ae(r(),l=>{s.authorization="Bearer "+l});let a=D(JSON.stringify({fileName:n.name,contentType:o}),"{}");return Vt(fetch(e,{method:"POST",headers:s,body:a}).then(l=>l.ok?l.json().then(Fze):Promise.resolve(void 0)).then(l=>l!==void 0?Ize(l.uploadUrl,l.storageRef,n,o,i):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})),l=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))}}}let Oze=[],Mze=[],Lze=[],zze={pages:Oze,panels:Mze,routes:Lze};function V9(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 G2(e){return b("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function Uze(e){let t=e.extensions,r=It(ep),n=It(tp),i=yw();return Te(()=>{t.pages.length!==0&&ae(r,o=>o.register(t.pages)),t.panels.length!==0&&ae(n,o=>o.register(t.panels)),t.routes.length!==0&&ae(i,o=>o.register(t.routes,nu()))},[]),null}function Ax(e){let t=e.config,r=zhe(),n=Lhe(),i=L("div",{children:[b(N0e,{}),b(Vhe,{}),b(Sfe,{})],style:{borderBottom:"1px solid var("+x.borderSubtle+")",display:"flex",padding:"0.5rem 1rem",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem"}});return L(Br,{children:[b(Dze,{config:t}),b(cze,{config:t,uiHints:e.uiHints}),b(Uze,{extensions:e.extensions}),b(ahe,{appName:"Reventless",router:r,headerSlot:i,routesReady:n,loading:b(G2,{})})]})}function Bze(e){let t=e.discoverPlatforms,r=dm(),n=M4(r);if(n===void 0)return t!==void 0?b(gpe,{discover:t}):b(V9,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return b(L4.make,{scope:i,children:b(O7,{value:{prefix:bw(i),path:n[1]},children:b(Ax,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function nF(e){let t=e.access;return b(zfe,{access:t,children:b(Ffe.make,{children:b(Ehe.make,{access:t,children:b(Mhe.make,{children:b(HK.make,{children:b(w0e.make,{children:e.children})})})})})})}function jze(e){let t=e.uiHints,r=e.extensions,n=e.config,i=As(),o=n.mode,s;if(o==="Single"){let u=n.environment,d=n.platformName;s=u!==void 0&&d!==void 0?b(L4.make,{scope:{environment:u,platformName:d},children:b(Ax,{config:n,extensions:r,uiHints:t})}):b(Ax,{config:n,extensions:r,uiHints:t})}else s=b(Bze,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return b(nF,{access:n.accessTiers,children:s});if(i===void 0)return b(IT,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?b(nF,{access:l.groups.concat(n.accessTiers),children:s}):b(IT,{})}function qze(e){let t=e.config,r=As();mU(t.assetOrigins);let n=dm(),i=t.mode,o;o=i==="Single"?void 0:J(M4(n),f=>f[0]);let s=fe(o,"",f=>f.environment+"|"+f.platformName),a=Mt(()=>{let f=die(t.apiEndpoint,t.platformApiEndpoint,()=>R(r,h=>h.getToken()),()=>ae(r,h=>h.logout()));return o!==void 0?cpe(o)(f):f},[t,r,s]),l=()=>R(r,f=>f.getToken()),u=Qe(l);u.current=l;let d=t.uploadEndpoints;return Te(()=>{let f={},h=p=>{let g=f[p];if(g!==void 0)return g;let m=Pze(p,()=>u.current());return f[p]=m,m};(Le(t.uploadEndpoint)||Object.entries(d).length!==0)&&J0e(J(t.uploadEndpoint,h),p=>J(d[p],h),void 0)},[t.uploadEndpoint,d]),b($ne.make,{execute:a,children:b(cTe,{config:t,children:b(ope.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,getToken:l,children:b(yhe.make,{initialPreset:"Light",children:b(jze,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})})})})}function Vze(e,t){let r=ue(()=>{}),n=r[1];return Te(()=>{uie(e.uiHintsUrl).then(i=>n(o=>i))},[e.uiHintsUrl]),J(r[0],i=>Jne(i,D(t.uiHints,{})))}function Kze(e){let t=e.extensions,r=e.config,n=Vze(r,t);return b(pfe.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:n!==void 0?b(qze,{config:r,extensions:t,uiHints:n,discoverPlatforms:e.discoverPlatforms}):b(G2,{})})}function Hze(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:zze,i=ue(()=>"LoadingConfig"),o=i[1],s=i[0];return Te(()=>{cie().then(a=>{if(a.TAG==="Ok"){let u=a._0;return t!==void 0?Vt(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=a._0;return o(u=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof s!="object"?b(G2,{}):s.TAG==="Ready"?b(Kze,{config:s._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):b(V9,{message:s._0})}let Wze={make:Hze},iF=document.querySelector("#root");iF!=null&&f7(iF).render(b(Wze.make,{registerModes:k7}));export{Vt as $,Y as A,vs as B,x as C,Le as D,jr as E,Ar as F,aE as G,ed as H,Z as R,F as S,T,bs as a,Xr as b,vne as c,de as d,D as e,oe as f,M as g,mt as h,R as i,mr as j,dt as k,ae as l,fe as m,Wt as n,Lo as o,Sa as p,qz as q,it as r,go as s,ju as t,vhe as u,or as v,Zh as w,Wo as x,ol as y,_s as z};
|