@blueprint-chart/editor 0.1.13 → 0.1.15
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/{CopyRedirect-CoFpxhie.js → CopyRedirect-CtcHi_O0.js} +1 -1
- package/dist/assets/{LandingPage-DebUeQGa.js → LandingPage-DSzan2c-.js} +1 -1
- package/dist/assets/index-BQNfF0-i.css +5 -0
- package/dist/assets/index-UVmZmtkf.js +859 -0
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/dist/assets/index-BG3Ltf1a.css +0 -5
- package/dist/assets/index-BL5yRcMU.js +0 -859
|
@@ -0,0 +1,859 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LandingPage-DSzan2c-.js","assets/LandingPage-BWDtyjsV.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var cB=Object.defineProperty;var uB=(t,e,n)=>e in t?cB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var qn=(t,e,n)=>uB(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/**
|
|
3
|
+
* @vue/shared v3.5.29
|
|
4
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
|
+
* @license MIT
|
|
6
|
+
**/function Pb(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const Wt={},xc=[],si=()=>{},RS=()=>!1,S0=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Db=t=>t.startsWith("onUpdate:"),Nn=Object.assign,Eb=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},dB=Object.prototype.hasOwnProperty,Kt=(t,e)=>dB.call(t,e),ct=Array.isArray,wc=t=>uf(t)==="[object Map]",au=t=>uf(t)==="[object Set]",Sx=t=>uf(t)==="[object Date]",vt=t=>typeof t=="function",vn=t=>typeof t=="string",ui=t=>typeof t=="symbol",Yt=t=>t!==null&&typeof t=="object",FS=t=>(Yt(t)||vt(t))&&vt(t.then)&&vt(t.catch),VS=Object.prototype.toString,uf=t=>VS.call(t),fB=t=>uf(t).slice(8,-1),zS=t=>uf(t)==="[object Object]",k0=t=>vn(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,od=Pb(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),C0=t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))},hB=/-\w/g,Sr=C0(t=>t.replace(hB,e=>e.slice(1).toUpperCase())),pB=/\B([A-Z])/g,Hs=C0(t=>t.replace(pB,"-$1").toLowerCase()),A0=C0(t=>t.charAt(0).toUpperCase()+t.slice(1)),fg=C0(t=>t?`on${A0(t)}`:""),Jo=(t,e)=>!Object.is(t,e),Bh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},HS=(t,e,n,o=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:o,value:n})},$0=t=>{const e=parseFloat(t);return isNaN(e)?t:e},mB=t=>{const e=vn(t)?Number(t):NaN;return isNaN(e)?t:e};let kx;const T0=()=>kx||(kx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pt(t){if(ct(t)){const e={};for(let n=0;n<t.length;n++){const o=t[n],r=vn(o)?yB(o):Pt(o);if(r)for(const i in r)e[i]=r[i]}return e}else if(vn(t)||Yt(t))return t}const gB=/;(?![^(]*\))/g,vB=/:([^]+)/,bB=/\/\*[^]*?\*\//g;function yB(t){const e={};return t.replace(bB,"").split(gB).forEach(n=>{if(n){const o=n.split(vB);o.length>1&&(e[o[0].trim()]=o[1].trim())}}),e}function $e(t){let e="";if(vn(t))e=t;else if(ct(t))for(let n=0;n<t.length;n++){const o=$e(t[n]);o&&(e+=o+" ")}else if(Yt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Vn(t){if(!t)return null;let{class:e,style:n}=t;return e&&!vn(e)&&(t.class=$e(e)),n&&(t.style=Pt(n)),t}const xB="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wB=Pb(xB);function WS(t){return!!t||t===""}function _B(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=xa(t[o],e[o]);return n}function xa(t,e){if(t===e)return!0;let n=Sx(t),o=Sx(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=ui(t),o=ui(e),n||o)return t===e;if(n=ct(t),o=ct(e),n||o)return n&&o?_B(t,e):!1;if(n=Yt(t),o=Yt(e),n||o){if(!n||!o)return!1;const r=Object.keys(t).length,i=Object.keys(e).length;if(r!==i)return!1;for(const s in t){const a=t.hasOwnProperty(s),l=e.hasOwnProperty(s);if(a&&!l||!a&&l||!xa(t[s],e[s]))return!1}}return String(t)===String(e)}function Ib(t,e){return t.findIndex(n=>xa(n,e))}const US=t=>!!(t&&t.__v_isRef===!0),ye=t=>vn(t)?t:t==null?"":ct(t)||Yt(t)&&(t.toString===VS||!vt(t.toString))?US(t)?ye(t.value):JSON.stringify(t,GS,2):String(t),GS=(t,e)=>US(e)?GS(t,e.value):wc(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[o,r],i)=>(n[hg(o,i)+" =>"]=r,n),{})}:au(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>hg(n))}:ui(e)?hg(e):Yt(e)&&!ct(e)&&!zS(e)?String(e):e,hg=(t,e="")=>{var n;return ui(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function SB(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}/**
|
|
7
|
+
* @vue/reactivity v3.5.29
|
|
8
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
9
|
+
* @license MIT
|
|
10
|
+
**/let vo;class qS{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=vo,!e&&vo&&(this.index=(vo.scopes||(vo.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=vo;try{return vo=this,e()}finally{vo=n}}}on(){++this._on===1&&(this.prevScope=vo,vo=this)}off(){this._on>0&&--this._on===0&&(vo=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function M0(t){return new qS(t)}function Fl(){return vo}function wa(t,e=!1){vo&&vo.cleanups.push(t)}let dn;const pg=new WeakSet;class YS{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,vo&&vo.active&&vo.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pg.has(this)&&(pg.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||XS(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Cx(this),KS(this);const e=dn,n=ai;dn=this,ai=!0;try{return this.fn()}finally{ZS(this),dn=e,ai=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Fb(e);this.deps=this.depsTail=void 0,Cx(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pg.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Nv(this)&&this.run()}get dirty(){return Nv(this)}}let jS=0,rd,id;function XS(t,e=!1){if(t.flags|=8,e){t.next=id,id=t;return}t.next=rd,rd=t}function Nb(){jS++}function Rb(){if(--jS>0)return;if(id){let e=id;for(id=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;rd;){let e=rd;for(rd=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(o){t||(t=o)}e=n}}if(t)throw t}function KS(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function ZS(t){let e,n=t.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),Fb(o),kB(o)):e=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}t.deps=e,t.depsTail=n}function Nv(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(QS(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function QS(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Cd)||(t.globalVersion=Cd,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Nv(t))))return;t.flags|=2;const e=t.dep,n=dn,o=ai;dn=t,ai=!0;try{KS(t);const r=t.fn(t._value);(e.version===0||Jo(r,t._value))&&(t.flags|=128,t._value=r,e.version++)}catch(r){throw e.version++,r}finally{dn=n,ai=o,ZS(t),t.flags&=-3}}function Fb(t,e=!1){const{dep:n,prevSub:o,nextSub:r}=t;if(o&&(o.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=o,t.nextSub=void 0),n.subs===t&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Fb(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function kB(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let ai=!0;const JS=[];function Ds(){JS.push(ai),ai=!1}function Es(){const t=JS.pop();ai=t===void 0?!0:t}function Cx(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=dn;dn=void 0;try{e()}finally{dn=n}}}let Cd=0;class CB{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class O0{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!dn||!ai||dn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dn)n=this.activeLink=new CB(dn,this),dn.deps?(n.prevDep=dn.depsTail,dn.depsTail.nextDep=n,dn.depsTail=n):dn.deps=dn.depsTail=n,ek(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=dn.depsTail,n.nextDep=void 0,dn.depsTail.nextDep=n,dn.depsTail=n,dn.deps===n&&(dn.deps=o)}return n}trigger(e){this.version++,Cd++,this.notify(e)}notify(e){Nb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Rb()}}}function ek(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let o=e.deps;o;o=o.nextDep)ek(o)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Jh=new WeakMap,vl=Symbol(""),Rv=Symbol(""),Ad=Symbol("");function xo(t,e,n){if(ai&&dn){let o=Jh.get(t);o||Jh.set(t,o=new Map);let r=o.get(n);r||(o.set(n,r=new O0),r.map=o,r.key=n),r.track()}}function xs(t,e,n,o,r,i){const s=Jh.get(t);if(!s){Cd++;return}const a=l=>{l&&l.trigger()};if(Nb(),e==="clear")s.forEach(a);else{const l=ct(t),c=l&&k0(n);if(l&&n==="length"){const u=Number(o);s.forEach((d,f)=>{(f==="length"||f===Ad||!ui(f)&&f>=u)&&a(d)})}else switch((n!==void 0||s.has(void 0))&&a(s.get(n)),c&&a(s.get(Ad)),e){case"add":l?c&&a(s.get("length")):(a(s.get(vl)),wc(t)&&a(s.get(Rv)));break;case"delete":l||(a(s.get(vl)),wc(t)&&a(s.get(Rv)));break;case"set":wc(t)&&a(s.get(vl));break}}Rb()}function AB(t,e){const n=Jh.get(t);return n&&n.get(e)}function nc(t){const e=Bt(t);return e===t?e:(xo(e,"iterate",Ad),xr(t)?e:e.map(di))}function B0(t){return xo(t=Bt(t),"iterate",Ad),t}function sa(t,e){return Is(t)?Ec(Wi(t)?di(e):e):di(e)}const $B={__proto__:null,[Symbol.iterator](){return mg(this,Symbol.iterator,t=>sa(this,t))},concat(...t){return nc(this).concat(...t.map(e=>ct(e)?nc(e):e))},entries(){return mg(this,"entries",t=>(t[1]=sa(this,t[1]),t))},every(t,e){return ss(this,"every",t,e,void 0,arguments)},filter(t,e){return ss(this,"filter",t,e,n=>n.map(o=>sa(this,o)),arguments)},find(t,e){return ss(this,"find",t,e,n=>sa(this,n),arguments)},findIndex(t,e){return ss(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ss(this,"findLast",t,e,n=>sa(this,n),arguments)},findLastIndex(t,e){return ss(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ss(this,"forEach",t,e,void 0,arguments)},includes(...t){return gg(this,"includes",t)},indexOf(...t){return gg(this,"indexOf",t)},join(t){return nc(this).join(t)},lastIndexOf(...t){return gg(this,"lastIndexOf",t)},map(t,e){return ss(this,"map",t,e,void 0,arguments)},pop(){return $u(this,"pop")},push(...t){return $u(this,"push",t)},reduce(t,...e){return Ax(this,"reduce",t,e)},reduceRight(t,...e){return Ax(this,"reduceRight",t,e)},shift(){return $u(this,"shift")},some(t,e){return ss(this,"some",t,e,void 0,arguments)},splice(...t){return $u(this,"splice",t)},toReversed(){return nc(this).toReversed()},toSorted(t){return nc(this).toSorted(t)},toSpliced(...t){return nc(this).toSpliced(...t)},unshift(...t){return $u(this,"unshift",t)},values(){return mg(this,"values",t=>sa(this,t))}};function mg(t,e,n){const o=B0(t),r=o[e]();return o!==t&&!xr(t)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const TB=Array.prototype;function ss(t,e,n,o,r,i){const s=B0(t),a=s!==t&&!xr(t),l=s[e];if(l!==TB[e]){const d=l.apply(t,i);return a?di(d):d}let c=n;s!==t&&(a?c=function(d,f){return n.call(this,sa(t,d),f,t)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,t)}));const u=l.call(s,c,o);return a&&r?r(u):u}function Ax(t,e,n,o){const r=B0(t);let i=n;return r!==t&&(xr(t)?n.length>3&&(i=function(s,a,l){return n.call(this,s,a,l,t)}):i=function(s,a,l){return n.call(this,s,sa(t,a),l,t)}),r[e](i,...o)}function gg(t,e,n){const o=Bt(t);xo(o,"iterate",Ad);const r=o[e](...n);return(r===-1||r===!1)&&D0(n[0])?(n[0]=Bt(n[0]),o[e](...n)):r}function $u(t,e,n=[]){Ds(),Nb();const o=Bt(t)[e].apply(t,n);return Rb(),Es(),o}const MB=Pb("__proto__,__v_isRef,__isVue"),tk=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ui));function OB(t){ui(t)||(t=String(t));const e=Bt(this);return xo(e,"has",t),e.hasOwnProperty(t)}class nk{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,o){if(n==="__v_skip")return e.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?lk:ak:i?sk:ik).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(o)?e:void 0;const s=ct(e);if(!r){let l;if(s&&(l=$B[n]))return l;if(n==="hasOwnProperty")return OB}const a=Reflect.get(e,n,Ke(e)?e:o);if((ui(n)?tk.has(n):MB(n))||(r||xo(e,"get",n),i))return a;if(Ke(a)){const l=s&&k0(n)?a:a.value;return r&&Yt(l)?io(l):l}return Yt(a)?r?io(a):ar(a):a}}class ok extends nk{constructor(e=!1){super(!1,e)}set(e,n,o,r){let i=e[n];const s=ct(e)&&k0(n);if(!this._isShallow){const c=Is(i);if(!xr(o)&&!Is(o)&&(i=Bt(i),o=Bt(o)),!s&&Ke(i)&&!Ke(o))return c||(i.value=o),!0}const a=s?Number(n)<e.length:Kt(e,n),l=Reflect.set(e,n,o,Ke(e)?e:r);return e===Bt(r)&&(a?Jo(o,i)&&xs(e,"set",n,o):xs(e,"add",n,o)),l}deleteProperty(e,n){const o=Kt(e,n);e[n];const r=Reflect.deleteProperty(e,n);return r&&o&&xs(e,"delete",n,void 0),r}has(e,n){const o=Reflect.has(e,n);return(!ui(n)||!tk.has(n))&&xo(e,"has",n),o}ownKeys(e){return xo(e,"iterate",ct(e)?"length":vl),Reflect.ownKeys(e)}}class rk extends nk{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const BB=new ok,LB=new rk,PB=new ok(!0),DB=new rk(!0),Fv=t=>t,Rf=t=>Reflect.getPrototypeOf(t);function EB(t,e,n){return function(...o){const r=this.__v_raw,i=Bt(r),s=wc(i),a=t==="entries"||t===Symbol.iterator&&s,l=t==="keys"&&s,c=r[t](...o),u=n?Fv:e?Ec:di;return!e&&xo(i,"iterate",l?Rv:vl),Nn(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function Ff(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function IB(t,e){const n={get(r){const i=this.__v_raw,s=Bt(i),a=Bt(r);t||(Jo(r,a)&&xo(s,"get",r),xo(s,"get",a));const{has:l}=Rf(s),c=e?Fv:t?Ec:di;if(l.call(s,r))return c(i.get(r));if(l.call(s,a))return c(i.get(a));i!==s&&i.get(r)},get size(){const r=this.__v_raw;return!t&&xo(Bt(r),"iterate",vl),r.size},has(r){const i=this.__v_raw,s=Bt(i),a=Bt(r);return t||(Jo(r,a)&&xo(s,"has",r),xo(s,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const s=this,a=s.__v_raw,l=Bt(a),c=e?Fv:t?Ec:di;return!t&&xo(l,"iterate",vl),a.forEach((u,d)=>r.call(i,c(u),c(d),s))}};return Nn(n,t?{add:Ff("add"),set:Ff("set"),delete:Ff("delete"),clear:Ff("clear")}:{add(r){!e&&!xr(r)&&!Is(r)&&(r=Bt(r));const i=Bt(this);return Rf(i).has.call(i,r)||(i.add(r),xs(i,"add",r,r)),this},set(r,i){!e&&!xr(i)&&!Is(i)&&(i=Bt(i));const s=Bt(this),{has:a,get:l}=Rf(s);let c=a.call(s,r);c||(r=Bt(r),c=a.call(s,r));const u=l.call(s,r);return s.set(r,i),c?Jo(i,u)&&xs(s,"set",r,i):xs(s,"add",r,i),this},delete(r){const i=Bt(this),{has:s,get:a}=Rf(i);let l=s.call(i,r);l||(r=Bt(r),l=s.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return l&&xs(i,"delete",r,void 0),c},clear(){const r=Bt(this),i=r.size!==0,s=r.clear();return i&&xs(r,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=EB(r,t,e)}),n}function L0(t,e){const n=IB(t,e);return(o,r,i)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?o:Reflect.get(Kt(n,r)&&r in o?n:o,r,i)}const NB={get:L0(!1,!1)},RB={get:L0(!1,!0)},FB={get:L0(!0,!1)},VB={get:L0(!0,!0)},ik=new WeakMap,sk=new WeakMap,ak=new WeakMap,lk=new WeakMap;function zB(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function HB(t){return t.__v_skip||!Object.isExtensible(t)?0:zB(fB(t))}function ar(t){return Is(t)?t:P0(t,!1,BB,NB,ik)}function ck(t){return P0(t,!1,PB,RB,sk)}function io(t){return P0(t,!0,LB,FB,ak)}function ol(t){return P0(t,!0,DB,VB,lk)}function P0(t,e,n,o,r){if(!Yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=HB(t);if(i===0)return t;const s=r.get(t);if(s)return s;const a=new Proxy(t,i===2?o:n);return r.set(t,a),a}function Wi(t){return Is(t)?Wi(t.__v_raw):!!(t&&t.__v_isReactive)}function Is(t){return!!(t&&t.__v_isReadonly)}function xr(t){return!!(t&&t.__v_isShallow)}function D0(t){return t?!!t.__v_raw:!1}function Bt(t){const e=t&&t.__v_raw;return e?Bt(e):t}function Te(t){return!Kt(t,"__v_skip")&&Object.isExtensible(t)&&HS(t,"__v_skip",!0),t}const di=t=>Yt(t)?ar(t):t,Ec=t=>Yt(t)?io(t):t;function Ke(t){return t?t.__v_isRef===!0:!1}function Ie(t){return uk(t,!1)}function De(t){return uk(t,!0)}function uk(t,e){return Ke(t)?t:new WB(t,e)}class WB{constructor(e,n){this.dep=new O0,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:Bt(e),this._value=n?e:di(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,o=this.__v_isShallow||xr(e)||Is(e);e=o?e:Bt(e),Jo(e,n)&&(this._rawValue=e,this._value=o?e:di(e),this.dep.trigger())}}function p(t){return Ke(t)?t.value:t}function bt(t){return vt(t)?t():p(t)}const UB={get:(t,e,n)=>e==="__v_raw"?t:p(Reflect.get(t,e,n)),set:(t,e,n,o)=>{const r=t[e];return Ke(r)&&!Ke(n)?(r.value=n,!0):Reflect.set(t,e,n,o)}};function dk(t){return Wi(t)?t:new Proxy(t,UB)}class GB{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new O0,{get:o,set:r}=e(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function fk(t){return new GB(t)}function E0(t){const e=ct(t)?new Array(t.length):{};for(const n in t)e[n]=hk(t,n);return e}class qB{constructor(e,n,o){this._object=e,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._raw=Bt(e);let r=!0,i=e;if(!ct(e)||!k0(String(n)))do r=!D0(i)||xr(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=p(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Ke(this._raw[this._key])){const n=this._object[this._key];if(Ke(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return AB(this._raw,this._key)}}class YB{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Vt(t,e,n){return Ke(t)?t:vt(t)?new YB(t):Yt(t)&&arguments.length>1?hk(t,e,n):Ie(t)}function hk(t,e,n){return new qB(t,e,n)}class jB{constructor(e,n,o){this.fn=e,this.setter=n,this._value=void 0,this.dep=new O0(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cd-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&dn!==this)return XS(this,!0),!0}get value(){const e=this.dep.track();return QS(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function XB(t,e,n=!1){let o,r;return vt(t)?o=t:(o=t.get,r=t.set),new jB(o,r,n)}const Vf={},ep=new WeakMap;let rl;function KB(t,e=!1,n=rl){if(n){let o=ep.get(n);o||ep.set(n,o=[]),o.push(t)}}function ZB(t,e,n=Wt){const{immediate:o,deep:r,once:i,scheduler:s,augmentJob:a,call:l}=n,c=_=>r?_:xr(_)||r===!1||r===0?ws(_,1):ws(_);let u,d,f,h,g=!1,b=!1;if(Ke(t)?(d=()=>t.value,g=xr(t)):Wi(t)?(d=()=>c(t),g=!0):ct(t)?(b=!0,g=t.some(_=>Wi(_)||xr(_)),d=()=>t.map(_=>{if(Ke(_))return _.value;if(Wi(_))return c(_);if(vt(_))return l?l(_,2):_()})):vt(t)?e?d=l?()=>l(t,2):t:d=()=>{if(f){Ds();try{f()}finally{Es()}}const _=rl;rl=u;try{return l?l(t,3,[h]):t(h)}finally{rl=_}}:d=si,e&&r){const _=d,S=r===!0?1/0:r;d=()=>ws(_(),S)}const m=Fl(),v=()=>{u.stop(),m&&m.active&&Eb(m.effects,u)};if(i&&e){const _=e;e=(...S)=>{_(...S),v()}}let y=b?new Array(t.length).fill(Vf):Vf;const x=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(e){const S=u.run();if(r||g||(b?S.some((E,M)=>Jo(E,y[M])):Jo(S,y))){f&&f();const E=rl;rl=u;try{const M=[S,y===Vf?void 0:b&&y[0]===Vf?[]:y,h];y=S,l?l(e,3,M):e(...M)}finally{rl=E}}}else u.run()};return a&&a(x),u=new YS(d),u.scheduler=s?()=>s(x,!1):x,h=_=>KB(_,!1,u),f=u.onStop=()=>{const _=ep.get(u);if(_){if(l)l(_,4);else for(const S of _)S();ep.delete(u)}},e?o?x(!0):y=u.run():s?s(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function ws(t,e=1/0,n){if(e<=0||!Yt(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,Ke(t))ws(t.value,e,n);else if(ct(t))for(let o=0;o<t.length;o++)ws(t[o],e,n);else if(au(t)||wc(t))t.forEach(o=>{ws(o,e,n)});else if(zS(t)){for(const o in t)ws(t[o],e,n);for(const o of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,o)&&ws(t[o],e,n)}return t}/**
|
|
11
|
+
* @vue/runtime-core v3.5.29
|
|
12
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
13
|
+
* @license MIT
|
|
14
|
+
**/function df(t,e,n,o){try{return o?t(...o):t()}catch(r){I0(r,e,n)}}function fi(t,e,n,o){if(vt(t)){const r=df(t,e,n,o);return r&&FS(r)&&r.catch(i=>{I0(i,e,n)}),r}if(ct(t)){const r=[];for(let i=0;i<t.length;i++)r.push(fi(t[i],e,n,o));return r}}function I0(t,e,n,o=!0){const r=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:s}=e&&e.appContext.config||Wt;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](t,l,c)===!1)return}a=a.parent}if(i){Ds(),df(i,null,10,[t,l,c]),Es();return}}QB(t,n,r,o,s)}function QB(t,e,n,o=!0,r=!1){if(r)throw t;console.error(t)}const Ho=[];let Di=-1;const _c=[];let aa=null,uc=0;const pk=Promise.resolve();let tp=null;function wn(t){const e=tp||pk;return t?e.then(this?t.bind(this):t):e}function JB(t){let e=Di+1,n=Ho.length;for(;e<n;){const o=e+n>>>1,r=Ho[o],i=$d(r);i<t||i===t&&r.flags&2?e=o+1:n=o}return e}function Vb(t){if(!(t.flags&1)){const e=$d(t),n=Ho[Ho.length-1];!n||!(t.flags&2)&&e>=$d(n)?Ho.push(t):Ho.splice(JB(e),0,t),t.flags|=1,mk()}}function mk(){tp||(tp=pk.then(bk))}function gk(t){ct(t)?_c.push(...t):aa&&t.id===-1?aa.splice(uc+1,0,t):t.flags&1||(_c.push(t),t.flags|=1),mk()}function $x(t,e,n=Di+1){for(;n<Ho.length;n++){const o=Ho[n];if(o&&o.flags&2){if(t&&o.id!==t.uid)continue;Ho.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function vk(t){if(_c.length){const e=[...new Set(_c)].sort((n,o)=>$d(n)-$d(o));if(_c.length=0,aa){aa.push(...e);return}for(aa=e,uc=0;uc<aa.length;uc++){const n=aa[uc];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}aa=null,uc=0}}const $d=t=>t.id==null?t.flags&2?-1:1/0:t.id;function bk(t){try{for(Di=0;Di<Ho.length;Di++){const e=Ho[Di];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),df(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Di<Ho.length;Di++){const e=Ho[Di];e&&(e.flags&=-2)}Di=-1,Ho.length=0,vk(),tp=null,(Ho.length||_c.length)&&bk()}}let ro=null,yk=null;function np(t){const e=ro;return ro=t,yk=t&&t.type.__scopeId||null,e}function J(t,e=ro,n){if(!e||t._n)return t;const o=(...r)=>{o._d&&sp(-1);const i=np(e);let s;try{s=t(...r)}finally{np(i),o._d&&sp(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function sr(t,e){if(ro===null)return t;const n=G0(ro),o=t.dirs||(t.dirs=[]);for(let r=0;r<e.length;r++){let[i,s,a,l=Wt]=e[r];i&&(vt(i)&&(i={mounted:i,updated:i}),i.deep&&ws(s),o.push({dir:i,instance:n,value:s,oldValue:void 0,arg:a,modifiers:l}))}return t}function Ka(t,e,n,o){const r=t.dirs,i=e&&e.dirs;for(let s=0;s<r.length;s++){const a=r[s];i&&(a.oldValue=i[s].value);let l=a.dir[o];l&&(Ds(),fi(l,n,8,[t.el,a,t,e]),Es())}}function Ui(t,e){if(So){let n=So.provides;const o=So.parent&&So.parent.provides;o===n&&(n=So.provides=Object.create(o)),n[t]=e}}function en(t,e,n=!1){const o=Lo();if(o||bl){let r=bl?bl._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(r&&t in r)return r[t];if(arguments.length>1)return n&&vt(e)?e.call(o&&o.proxy):e}}function zb(){return!!(Lo()||bl)}const e9=Symbol.for("v-scx"),t9=()=>en(e9);function N0(t,e){return R0(t,null,e)}function n9(t,e){return R0(t,null,{flush:"sync"})}function Ve(t,e,n){return R0(t,e,n)}function R0(t,e,n=Wt){const{immediate:o,deep:r,flush:i,once:s}=n,a=Nn({},n),l=e&&o||!e&&i!=="post";let c;if(Bd){if(i==="sync"){const h=t9();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=si,h.resume=si,h.pause=si,h}}const u=So;a.call=(h,g,b)=>fi(h,u,g,b);let d=!1;i==="post"?a.scheduler=h=>{go(h,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,g)=>{g?h():Vb(h)}),a.augmentJob=h=>{e&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const f=ZB(t,e,a);return Bd&&(c?c.push(f):l&&f()),f}function o9(t,e,n){const o=this.proxy,r=vn(t)?t.includes(".")?xk(o,t):()=>o[t]:t.bind(o,o);let i;vt(e)?i=e:(i=e.handler,n=e);const s=ff(this),a=R0(r,i.bind(o),n);return s(),a}function xk(t,e){const n=e.split(".");return()=>{let o=t;for(let r=0;r<n.length&&o;r++)o=o[n[r]];return o}}const wk=Symbol("_vte"),_k=t=>t.__isTeleport,sd=t=>t&&(t.disabled||t.disabled===""),Tx=t=>t&&(t.defer||t.defer===""),Mx=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Ox=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Vv=(t,e)=>{const n=t&&t.to;return vn(n)?e?e(n):null:n},Sk={name:"Teleport",__isTeleport:!0,process(t,e,n,o,r,i,s,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:b,createComment:m}}=c,v=sd(e.props);let{shapeFlag:y,children:x,dynamicChildren:_}=e;if(t==null){const S=e.el=b(""),E=e.anchor=b("");h(S,n,o),h(E,n,o);const M=(O,P)=>{y&16&&u(x,O,P,r,i,s,a,l)},C=()=>{const O=e.target=Vv(e.props,g),P=zv(O,e,b,h);O&&(s!=="svg"&&Mx(O)?s="svg":s!=="mathml"&&Ox(O)&&(s="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(O),v||(M(O,P),Lh(e,!1)))};v&&(M(n,E),Lh(e,!0)),Tx(e.props)?(e.el.__isMounted=!1,go(()=>{C(),delete e.el.__isMounted},i)):C()}else{if(Tx(e.props)&&t.el.__isMounted===!1){go(()=>{Sk.process(t,e,n,o,r,i,s,a,l,c)},i);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,E=e.target=t.target,M=e.targetAnchor=t.targetAnchor,C=sd(t.props),O=C?n:E,P=C?S:M;if(s==="svg"||Mx(E)?s="svg":(s==="mathml"||Ox(E))&&(s="mathml"),_?(f(t.dynamicChildren,_,O,r,i,s,a),qb(t,e,!0)):l||d(t,e,O,P,r,i,s,a,!1),v)C?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):zf(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const R=e.target=Vv(e.props,g);R&&zf(e,R,null,c,0)}else C&&zf(e,E,M,c,1);Lh(e,v)}},remove(t,e,n,{um:o,o:{remove:r}},i){const{shapeFlag:s,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=t;if(d&&(r(c),r(u)),i&&r(l),s&16){const h=i||!sd(f);for(let g=0;g<a.length;g++){const b=a[g];o(b,e,n,h,!!b.dynamicChildren)}}},move:zf,hydrate:r9};function zf(t,e,n,{o:{insert:o},m:r},i=2){i===0&&o(t.targetAnchor,e,n);const{el:s,anchor:a,shapeFlag:l,children:c,props:u}=t,d=i===2;if(d&&o(s,e,n),(!d||sd(u))&&l&16)for(let f=0;f<c.length;f++)r(c[f],e,n,2);d&&o(a,e,n)}function r9(t,e,n,o,r,i,{o:{nextSibling:s,parentNode:a,querySelector:l,insert:c,createText:u}},d){function f(m,v){let y=v;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")e.targetStart=y;else if(y.data==="teleport anchor"){e.targetAnchor=y,m._lpa=e.targetAnchor&&s(e.targetAnchor);break}}y=s(y)}}function h(m,v){v.anchor=d(s(m),v,a(m),n,o,r,i)}const g=e.target=Vv(e.props,l),b=sd(e.props);if(g){const m=g._lpa||g.firstChild;e.shapeFlag&16&&(b?(h(t,e),f(g,m),e.targetAnchor||zv(g,e,u,c,a(t)===g?t:null)):(e.anchor=s(t),f(g,m),e.targetAnchor||zv(g,e,u,c),d(m&&s(m),e,g,n,o,r,i))),Lh(e,b)}else b&&e.shapeFlag&16&&(h(t,e),e.targetStart=t,e.targetAnchor=s(t));return e.anchor&&s(e.anchor)}const Hb=Sk;function Lh(t,e){const n=t.ctx;if(n&&n.ut){let o,r;for(e?(o=t.el,r=t.anchor):(o=t.targetStart,r=t.targetAnchor);o&&o!==r;)o.nodeType===1&&o.setAttribute("data-v-owner",n.uid),o=o.nextSibling;n.ut()}}function zv(t,e,n,o,r=null){const i=e.targetStart=n(""),s=e.targetAnchor=n("");return i[wk]=s,t&&(o(i,t,r),o(s,t,r)),s}const Ei=Symbol("_leaveCb"),Tu=Symbol("_enterCb");function i9(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return hn(()=>{t.isMounted=!0}),Ns(()=>{t.isUnmounting=!0}),t}const Br=[Function,Array],kk={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Br,onEnter:Br,onAfterEnter:Br,onEnterCancelled:Br,onBeforeLeave:Br,onLeave:Br,onAfterLeave:Br,onLeaveCancelled:Br,onBeforeAppear:Br,onAppear:Br,onAfterAppear:Br,onAppearCancelled:Br},Ck=t=>{const e=t.subTree;return e.component?Ck(e.component):e},s9={name:"BaseTransition",props:kk,setup(t,{slots:e}){const n=Lo(),o=i9();return()=>{const r=e.default&&Tk(e.default(),!0);if(!r||!r.length)return;const i=Ak(r),s=Bt(t),{mode:a}=s;if(o.isLeaving)return vg(i);const l=Bx(i);if(!l)return vg(i);let c=Hv(l,s,o,n,d=>c=d);l.type!==_o&&Td(l,c);let u=n.subTree&&Bx(n.subTree);if(u&&u.type!==_o&&!ul(u,l)&&Ck(n).type!==_o){let d=Hv(u,s,o,n);if(Td(u,d),a==="out-in"&&l.type!==_o)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},vg(i);a==="in-out"&&l.type!==_o?d.delayLeave=(f,h,g)=>{const b=$k(o,u);b[String(u.key)]=u,f[Ei]=()=>{h(),f[Ei]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{g(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function Ak(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==_o){e=n;break}}return e}const a9=s9;function $k(t,e){const{leavingVNodes:n}=t;let o=n.get(e.type);return o||(o=Object.create(null),n.set(e.type,o)),o}function Hv(t,e,n,o,r){const{appear:i,mode:s,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:g,onLeaveCancelled:b,onBeforeAppear:m,onAppear:v,onAfterAppear:y,onAppearCancelled:x}=e,_=String(t.key),S=$k(n,t),E=(O,P)=>{O&&fi(O,o,9,P)},M=(O,P)=>{const R=P[1];E(O,P),ct(O)?O.every($=>$.length<=1)&&R():O.length<=1&&R()},C={mode:s,persisted:a,beforeEnter(O){let P=l;if(!n.isMounted)if(i)P=m||l;else return;O[Ei]&&O[Ei](!0);const R=S[_];R&&ul(t,R)&&R.el[Ei]&&R.el[Ei](),E(P,[O])},enter(O){if(S[_]===t)return;let P=c,R=u,$=d;if(!n.isMounted)if(i)P=v||c,R=y||u,$=x||d;else return;let A=!1;O[Tu]=B=>{A||(A=!0,B?E($,[O]):E(R,[O]),C.delayedLeave&&C.delayedLeave(),O[Tu]=void 0)};const L=O[Tu].bind(null,!1);P?M(P,[O,L]):L()},leave(O,P){const R=String(t.key);if(O[Tu]&&O[Tu](!0),n.isUnmounting)return P();E(f,[O]);let $=!1;O[Ei]=L=>{$||($=!0,P(),L?E(b,[O]):E(g,[O]),O[Ei]=void 0,S[R]===t&&delete S[R])};const A=O[Ei].bind(null,!1);S[R]=t,h?M(h,[O,A]):A()},clone(O){const P=Hv(O,e,n,o,r);return r&&r(P),P}};return C}function vg(t){if(F0(t))return t=_a(t),t.children=null,t}function Bx(t){if(!F0(t))return _k(t.type)&&t.children?Ak(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&vt(n.default))return n.default()}}function Td(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Td(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Tk(t,e=!1,n){let o=[],r=0;for(let i=0;i<t.length;i++){let s=t[i];const a=n==null?s.key:String(n)+String(s.key!=null?s.key:i);s.type===Re?(s.patchFlag&128&&r++,o=o.concat(Tk(s.children,e,a))):(e||s.type!==_o)&&o.push(a!=null?_a(s,{key:a}):s)}if(r>1)for(let i=0;i<o.length;i++)o[i].patchFlag=-2;return o}function se(t,e){return vt(t)?Nn({name:t.name},e,{setup:t}):t}function Mk(){const t=Lo();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function Ok(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function pt(t){const e=Lo(),n=De(null);if(e){const r=e.refs===Wt?e.refs={}:e.refs;Object.defineProperty(r,t,{enumerable:!0,get:()=>n.value,set:i=>n.value=i})}return n}function Lx(t,e){let n;return!!((n=Object.getOwnPropertyDescriptor(t,e))&&!n.configurable)}const op=new WeakMap;function ad(t,e,n,o,r=!1){if(ct(t)){t.forEach((b,m)=>ad(b,e&&(ct(e)?e[m]:e),n,o,r));return}if(Sc(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&ad(t,e,n,o.component.subTree);return}const i=o.shapeFlag&4?G0(o.component):o.el,s=r?null:i,{i:a,r:l}=t,c=e&&e.r,u=a.refs===Wt?a.refs={}:a.refs,d=a.setupState,f=Bt(d),h=d===Wt?RS:b=>Lx(u,b)?!1:Kt(f,b),g=(b,m)=>!(m&&Lx(u,m));if(c!=null&&c!==l){if(Px(e),vn(c))u[c]=null,h(c)&&(d[c]=null);else if(Ke(c)){const b=e;g(c,b.k)&&(c.value=null),b.k&&(u[b.k]=null)}}if(vt(l))df(l,a,12,[s,u]);else{const b=vn(l),m=Ke(l);if(b||m){const v=()=>{if(t.f){const y=b?h(l)?d[l]:u[l]:g()||!t.k?l.value:u[t.k];if(r)ct(y)&&Eb(y,i);else if(ct(y))y.includes(i)||y.push(i);else if(b)u[l]=[i],h(l)&&(d[l]=u[l]);else{const x=[i];g(l,t.k)&&(l.value=x),t.k&&(u[t.k]=x)}}else b?(u[l]=s,h(l)&&(d[l]=s)):m&&(g(l,t.k)&&(l.value=s),t.k&&(u[t.k]=s))};if(s){const y=()=>{v(),op.delete(t)};y.id=-1,op.set(t,y),go(y,n)}else Px(t),v()}}}function Px(t){const e=op.get(t);e&&(e.flags|=8,op.delete(t))}T0().requestIdleCallback;T0().cancelIdleCallback;const Sc=t=>!!t.type.__asyncLoader,F0=t=>t.type.__isKeepAlive;function Wb(t,e){Lk(t,"a",e)}function Bk(t,e){Lk(t,"da",e)}function Lk(t,e,n=So){const o=t.__wdc||(t.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return t()});if(V0(e,o,n),n){let r=n.parent;for(;r&&r.parent;)F0(r.parent.vnode)&&l9(o,e,n,r),r=r.parent}}function l9(t,e,n,o){const r=V0(e,t,o,!0);Us(()=>{Eb(o[e],r)},n)}function V0(t,e,n=So,o=!1){if(n){const r=n[t]||(n[t]=[]),i=e.__weh||(e.__weh=(...s)=>{Ds();const a=ff(n),l=fi(e,n,t,s);return a(),Es(),l});return o?r.unshift(i):r.push(i),i}}const Ws=t=>(e,n=So)=>{(!Bd||t==="sp")&&V0(t,(...o)=>e(...o),n)},c9=Ws("bm"),hn=Ws("m"),Pk=Ws("bu"),u9=Ws("u"),Ns=Ws("bum"),Us=Ws("um"),d9=Ws("sp"),f9=Ws("rtg"),h9=Ws("rtc");function p9(t,e=So){V0("ec",t,e)}const Dk="components";function z0(t,e){return Ik(Dk,t,!0,e)||t}const Ek=Symbol.for("v-ndc");function Gt(t){return vn(t)?Ik(Dk,t,!1)||t:t||Ek}function Ik(t,e,n=!0,o=!1){const r=ro||So;if(r){const i=r.type;{const a=X9(i,!1);if(a&&(a===e||a===Sr(e)||a===A0(Sr(e))))return i}const s=Dx(r[t]||i[t],e)||Dx(r.appContext[t],e);return!s&&o?i:s}}function Dx(t,e){return t&&(t[e]||t[Sr(e)]||t[A0(Sr(e))])}function mt(t,e,n,o){let r;const i=n,s=ct(t);if(s||vn(t)){const a=s&&Wi(t);let l=!1,c=!1;a&&(l=!xr(t),c=Is(t),t=B0(t)),r=new Array(t.length);for(let u=0,d=t.length;u<d;u++)r[u]=e(l?c?Ec(di(t[u])):di(t[u]):t[u],u,void 0,i)}else if(typeof t=="number"){r=new Array(t);for(let a=0;a<t;a++)r[a]=e(a+1,a,void 0,i)}else if(Yt(t))if(t[Symbol.iterator])r=Array.from(t,(a,l)=>e(a,l,void 0,i));else{const a=Object.keys(t);r=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];r[l]=e(t[u],u,l,i)}}else r=[];return r}function hi(t,e){for(let n=0;n<e.length;n++){const o=e[n];if(ct(o))for(let r=0;r<o.length;r++)t[o[r].name]=o[r].fn;else o&&(t[o.name]=o.key?(...r)=>{const i=o.fn(...r);return i&&(i.key=o.key),i}:o.fn)}return t}function Ce(t,e,n={},o,r){if(ro.ce||ro.parent&&Sc(ro.parent)&&ro.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),w(),Q(Re,null,[H("slot",n,o&&o())],c?-2:64)}let i=t[e];i&&i._c&&(i._d=!1),w();const s=i&&Nk(i(n)),a=n.key||s&&s.key,l=Q(Re,{key:(a&&!ui(a)?a:`_${e}`)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&t._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Nk(t){return t.some(e=>Od(e)?!(e.type===_o||e.type===Re&&!Nk(e.children)):!0)?t:null}const Wv=t=>t?r3(t)?G0(t):Wv(t.parent):null,ld=Nn(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Wv(t.parent),$root:t=>Wv(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Vk(t),$forceUpdate:t=>t.f||(t.f=()=>{Vb(t.update)}),$nextTick:t=>t.n||(t.n=wn.bind(t.proxy)),$watch:t=>o9.bind(t)}),bg=(t,e)=>t!==Wt&&!t.__isScriptSetup&&Kt(t,e),m9={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:s,type:a,appContext:l}=t;if(e[0]!=="$"){const f=s[e];if(f!==void 0)switch(f){case 1:return o[e];case 2:return r[e];case 4:return n[e];case 3:return i[e]}else{if(bg(o,e))return s[e]=1,o[e];if(r!==Wt&&Kt(r,e))return s[e]=2,r[e];if(Kt(i,e))return s[e]=3,i[e];if(n!==Wt&&Kt(n,e))return s[e]=4,n[e];Uv&&(s[e]=0)}}const c=ld[e];let u,d;if(c)return e==="$attrs"&&xo(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==Wt&&Kt(n,e))return s[e]=4,n[e];if(d=l.config.globalProperties,Kt(d,e))return d[e]},set({_:t},e,n){const{data:o,setupState:r,ctx:i}=t;return bg(r,e)?(r[e]=n,!0):o!==Wt&&Kt(o,e)?(o[e]=n,!0):Kt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:o,appContext:r,props:i,type:s}},a){let l;return!!(n[a]||t!==Wt&&a[0]!=="$"&&Kt(t,a)||bg(e,a)||Kt(i,a)||Kt(o,a)||Kt(ld,a)||Kt(r.config.globalProperties,a)||(l=s.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Kt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function ns(){return Rk().slots}function H0(){return Rk().attrs}function Rk(t){const e=Lo();return e.setupContext||(e.setupContext=s3(e))}function rp(t){return ct(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function nt(t,e){return!t||!e?t||e:ct(t)&&ct(e)?t.concat(e):Nn({},rp(t),rp(e))}let Uv=!0;function g9(t){const e=Vk(t),n=t.proxy,o=t.ctx;Uv=!1,e.beforeCreate&&Ex(e.beforeCreate,t,"bc");const{data:r,computed:i,methods:s,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:b,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:x,unmounted:_,render:S,renderTracked:E,renderTriggered:M,errorCaptured:C,serverPrefetch:O,expose:P,inheritAttrs:R,components:$,directives:A,filters:L}=e;if(c&&v9(c,o,null),s)for(const z in s){const V=s[z];vt(V)&&(o[z]=V.bind(n))}if(r){const z=r.call(n,n);Yt(z)&&(t.data=ar(z))}if(Uv=!0,i)for(const z in i){const V=i[z],U=vt(V)?V.bind(n,n):vt(V.get)?V.get.bind(n,n):si,ie=!vt(V)&&vt(V.set)?V.set.bind(n):si,ue=k({get:U,set:ie});Object.defineProperty(o,z,{enumerable:!0,configurable:!0,get:()=>ue.value,set:fe=>ue.value=fe})}if(a)for(const z in a)Fk(a[z],o,n,z);if(l){const z=vt(l)?l.call(n):l;Reflect.ownKeys(z).forEach(V=>{Ui(V,z[V])})}u&&Ex(u,t,"c");function F(z,V){ct(V)?V.forEach(U=>z(U.bind(n))):V&&z(V.bind(n))}if(F(c9,d),F(hn,f),F(Pk,h),F(u9,g),F(Wb,b),F(Bk,m),F(p9,C),F(h9,E),F(f9,M),F(Ns,y),F(Us,_),F(d9,O),ct(P))if(P.length){const z=t.exposed||(t.exposed={});P.forEach(V=>{Object.defineProperty(z,V,{get:()=>n[V],set:U=>n[V]=U,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===si&&(t.render=S),R!=null&&(t.inheritAttrs=R),$&&(t.components=$),A&&(t.directives=A),O&&Ok(t)}function v9(t,e,n=si){ct(t)&&(t=Gv(t));for(const o in t){const r=t[o];let i;Yt(r)?"default"in r?i=en(r.from||o,r.default,!0):i=en(r.from||o):i=en(r),Ke(i)?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):e[o]=i}}function Ex(t,e,n){fi(ct(t)?t.map(o=>o.bind(e.proxy)):t.bind(e.proxy),e,n)}function Fk(t,e,n,o){let r=o.includes(".")?xk(n,o):()=>n[o];if(vn(t)){const i=e[t];vt(i)&&Ve(r,i)}else if(vt(t))Ve(r,t.bind(n));else if(Yt(t))if(ct(t))t.forEach(i=>Fk(i,e,n,o));else{const i=vt(t.handler)?t.handler.bind(n):e[t.handler];vt(i)&&Ve(r,i,t)}}function Vk(t){const e=t.type,{mixins:n,extends:o}=e,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=t.appContext,a=i.get(e);let l;return a?l=a:!r.length&&!n&&!o?l=e:(l={},r.length&&r.forEach(c=>ip(l,c,s,!0)),ip(l,e,s)),Yt(e)&&i.set(e,l),l}function ip(t,e,n,o=!1){const{mixins:r,extends:i}=e;i&&ip(t,i,n,!0),r&&r.forEach(s=>ip(t,s,n,!0));for(const s in e)if(!(o&&s==="expose")){const a=b9[s]||n&&n[s];t[s]=a?a(t[s],e[s]):e[s]}return t}const b9={data:Ix,props:Nx,emits:Nx,methods:qu,computed:qu,beforeCreate:Ro,created:Ro,beforeMount:Ro,mounted:Ro,beforeUpdate:Ro,updated:Ro,beforeDestroy:Ro,beforeUnmount:Ro,destroyed:Ro,unmounted:Ro,activated:Ro,deactivated:Ro,errorCaptured:Ro,serverPrefetch:Ro,components:qu,directives:qu,watch:x9,provide:Ix,inject:y9};function Ix(t,e){return e?t?function(){return Nn(vt(t)?t.call(this,this):t,vt(e)?e.call(this,this):e)}:e:t}function y9(t,e){return qu(Gv(t),Gv(e))}function Gv(t){if(ct(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Ro(t,e){return t?[...new Set([].concat(t,e))]:e}function qu(t,e){return t?Nn(Object.create(null),t,e):e}function Nx(t,e){return t?ct(t)&&ct(e)?[...new Set([...t,...e])]:Nn(Object.create(null),rp(t),rp(e??{})):e}function x9(t,e){if(!t)return e;if(!e)return t;const n=Nn(Object.create(null),t);for(const o in e)n[o]=Ro(t[o],e[o]);return n}function zk(){return{app:null,config:{isNativeTag:RS,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let w9=0;function _9(t,e){return function(o,r=null){vt(o)||(o=Nn({},o)),r!=null&&!Yt(r)&&(r=null);const i=zk(),s=new WeakSet,a=[];let l=!1;const c=i.app={_uid:w9++,_component:o,_props:r,_container:null,_context:i,_instance:null,version:Z9,get config(){return i.config},set config(u){},use(u,...d){return s.has(u)||(u&&vt(u.install)?(s.add(u),u.install(c,...d)):vt(u)&&(s.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,f){if(!l){const h=c._ceVNode||H(o,r);return h.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),t(h,u,f),l=!0,c._container=u,u.__vue_app__=c,G0(h.component)}},onUnmount(u){a.push(u)},unmount(){l&&(fi(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=bl;bl=c;try{return u()}finally{bl=d}}};return c}}let bl=null;function ft(t,e,n=Wt){const o=Lo(),r=Sr(e),i=Hs(e),s=Hk(t,r),a=fk((l,c)=>{let u,d=Wt,f;return n9(()=>{const h=t[r];Jo(u,h)&&(u=h,c())}),{get(){return l(),n.get?n.get(u):u},set(h){const g=n.set?n.set(h):h;if(!Jo(g,u)&&!(d!==Wt&&Jo(h,d)))return;const b=o.vnode.props;b&&(e in b||r in b||i in b)&&(`onUpdate:${e}`in b||`onUpdate:${r}`in b||`onUpdate:${i}`in b)||(u=h,c()),o.emit(`update:${e}`,g),Jo(h,g)&&Jo(h,d)&&!Jo(g,f)&&c(),d=h,f=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||Wt:a,done:!1}:{done:!0}}}},a}const Hk=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Sr(e)}Modifiers`]||t[`${Hs(e)}Modifiers`];function S9(t,e,...n){if(t.isUnmounted)return;const o=t.vnode.props||Wt;let r=n;const i=e.startsWith("update:"),s=i&&Hk(o,e.slice(7));s&&(s.trim&&(r=n.map(u=>vn(u)?u.trim():u)),s.number&&(r=n.map($0)));let a,l=o[a=fg(e)]||o[a=fg(Sr(e))];!l&&i&&(l=o[a=fg(Hs(e))]),l&&fi(l,t,6,r);const c=o[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,fi(c,t,6,r)}}const k9=new WeakMap;function Wk(t,e,n=!1){const o=n?k9:e.emitsCache,r=o.get(t);if(r!==void 0)return r;const i=t.emits;let s={},a=!1;if(!vt(t)){const l=c=>{const u=Wk(c,e,!0);u&&(a=!0,Nn(s,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!a?(Yt(t)&&o.set(t,null),null):(ct(i)?i.forEach(l=>s[l]=null):Nn(s,i),Yt(t)&&o.set(t,s),s)}function W0(t,e){return!t||!S0(e)?!1:(e=e.slice(2).replace(/Once$/,""),Kt(t,e[0].toLowerCase()+e.slice(1))||Kt(t,Hs(e))||Kt(t,e))}function Rx(t){const{type:e,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:s,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:h,ctx:g,inheritAttrs:b}=t,m=np(t);let v,y;try{if(n.shapeFlag&4){const _=r||o,S=_;v=Ii(c.call(S,_,u,d,h,f,g)),y=a}else{const _=e;v=Ii(_.length>1?_(d,{attrs:a,slots:s,emit:l}):_(d,null)),y=e.props?a:C9(a)}}catch(_){ud.length=0,I0(_,t,1),v=H(_o)}let x=v;if(y&&b!==!1){const _=Object.keys(y),{shapeFlag:S}=x;_.length&&S&7&&(i&&_.some(Db)&&(y=A9(y,i)),x=_a(x,y,!1,!0))}return n.dirs&&(x=_a(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&Td(x,n.transition),v=x,np(m),v}const C9=t=>{let e;for(const n in t)(n==="class"||n==="style"||S0(n))&&((e||(e={}))[n]=t[n]);return e},A9=(t,e)=>{const n={};for(const o in t)(!Db(o)||!(o.slice(9)in e))&&(n[o]=t[o]);return n};function $9(t,e,n){const{props:o,children:r,component:i}=t,{props:s,children:a,patchFlag:l}=e,c=i.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return o?Fx(o,s,c):!!s;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(Uk(s,o,f)&&!W0(c,f))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:o===s?!1:o?s?Fx(o,s,c):!0:!!s;return!1}function Fx(t,e,n){const o=Object.keys(e);if(o.length!==Object.keys(t).length)return!0;for(let r=0;r<o.length;r++){const i=o[r];if(Uk(e,t,i)&&!W0(n,i))return!0}return!1}function Uk(t,e,n){const o=t[n],r=e[n];return n==="style"&&Yt(o)&&Yt(r)?!xa(o,r):o!==r}function T9({vnode:t,parent:e},n){for(;e;){const o=e.subTree;if(o.suspense&&o.suspense.activeBranch===t&&(o.el=t.el),o===t)(t=e.vnode).el=n,e=e.parent;else break}}const Gk={},qk=()=>Object.create(Gk),Yk=t=>Object.getPrototypeOf(t)===Gk;function M9(t,e,n,o=!1){const r={},i=qk();t.propsDefaults=Object.create(null),jk(t,e,r,i);for(const s in t.propsOptions[0])s in r||(r[s]=void 0);n?t.props=o?r:ck(r):t.type.props?t.props=r:t.props=i,t.attrs=i}function O9(t,e,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=t,a=Bt(r),[l]=t.propsOptions;let c=!1;if((o||s>0)&&!(s&16)){if(s&8){const u=t.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(W0(t.emitsOptions,f))continue;const h=e[f];if(l)if(Kt(i,f))h!==i[f]&&(i[f]=h,c=!0);else{const g=Sr(f);r[g]=qv(l,a,g,h,t,!1)}else h!==i[f]&&(i[f]=h,c=!0)}}}else{jk(t,e,r,i)&&(c=!0);let u;for(const d in a)(!e||!Kt(e,d)&&((u=Hs(d))===d||!Kt(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=qv(l,a,d,void 0,t,!0)):delete r[d]);if(i!==a)for(const d in i)(!e||!Kt(e,d))&&(delete i[d],c=!0)}c&&xs(t.attrs,"set","")}function jk(t,e,n,o){const[r,i]=t.propsOptions;let s=!1,a;if(e)for(let l in e){if(od(l))continue;const c=e[l];let u;r&&Kt(r,u=Sr(l))?!i||!i.includes(u)?n[u]=c:(a||(a={}))[u]=c:W0(t.emitsOptions,l)||(!(l in o)||c!==o[l])&&(o[l]=c,s=!0)}if(i){const l=Bt(n),c=a||Wt;for(let u=0;u<i.length;u++){const d=i[u];n[d]=qv(r,l,d,c[d],t,!Kt(c,d))}}return s}function qv(t,e,n,o,r,i){const s=t[n];if(s!=null){const a=Kt(s,"default");if(a&&o===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&vt(l)){const{propsDefaults:c}=r;if(n in c)o=c[n];else{const u=ff(r);o=c[n]=l.call(null,e),u()}}else o=l;r.ce&&r.ce._setProp(n,o)}s[0]&&(i&&!a?o=!1:s[1]&&(o===""||o===Hs(n))&&(o=!0))}return o}const B9=new WeakMap;function Xk(t,e,n=!1){const o=n?B9:e.propsCache,r=o.get(t);if(r)return r;const i=t.props,s={},a=[];let l=!1;if(!vt(t)){const u=d=>{l=!0;const[f,h]=Xk(d,e,!0);Nn(s,f),h&&a.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!i&&!l)return Yt(t)&&o.set(t,xc),xc;if(ct(i))for(let u=0;u<i.length;u++){const d=Sr(i[u]);Vx(d)&&(s[d]=Wt)}else if(i)for(const u in i){const d=Sr(u);if(Vx(d)){const f=i[u],h=s[d]=ct(f)||vt(f)?{type:f}:Nn({},f),g=h.type;let b=!1,m=!0;if(ct(g))for(let v=0;v<g.length;++v){const y=g[v],x=vt(y)&&y.name;if(x==="Boolean"){b=!0;break}else x==="String"&&(m=!1)}else b=vt(g)&&g.name==="Boolean";h[0]=b,h[1]=m,(b||Kt(h,"default"))&&a.push(d)}}const c=[s,a];return Yt(t)&&o.set(t,c),c}function Vx(t){return t[0]!=="$"&&!od(t)}const Ub=t=>t==="_"||t==="_ctx"||t==="$stable",Gb=t=>ct(t)?t.map(Ii):[Ii(t)],L9=(t,e,n)=>{if(e._n)return e;const o=J((...r)=>Gb(e(...r)),n);return o._c=!1,o},Kk=(t,e,n)=>{const o=t._ctx;for(const r in t){if(Ub(r))continue;const i=t[r];if(vt(i))e[r]=L9(r,i,o);else if(i!=null){const s=Gb(i);e[r]=()=>s}}},Zk=(t,e)=>{const n=Gb(e);t.slots.default=()=>n},Qk=(t,e,n)=>{for(const o in e)(n||!Ub(o))&&(t[o]=e[o])},P9=(t,e,n)=>{const o=t.slots=qk();if(t.vnode.shapeFlag&32){const r=e._;r?(Qk(o,e,n),n&&HS(o,"_",r,!0)):Kk(e,o)}else e&&Zk(t,e)},D9=(t,e,n)=>{const{vnode:o,slots:r}=t;let i=!0,s=Wt;if(o.shapeFlag&32){const a=e._;a?n&&a===1?i=!1:Qk(r,e,n):(i=!e.$stable,Kk(e,r)),s=e}else e&&(Zk(t,e),s={default:1});if(i)for(const a in r)!Ub(a)&&s[a]==null&&delete r[a]},go=F9;function E9(t){return I9(t)}function I9(t,e){const n=T0();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:s,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=si,insertStaticContent:g}=t,b=(I,W,X,ae=null,le=null,K=null,oe=void 0,Z=null,Y=!!W.dynamicChildren)=>{if(I===W)return;I&&!ul(I,W)&&(ae=j(I),fe(I,le,K,!0),I=null),W.patchFlag===-2&&(Y=!1,W.dynamicChildren=null);const{type:ee,ref:ge,shapeFlag:pe}=W;switch(ee){case U0:m(I,W,X,ae);break;case _o:v(I,W,X,ae);break;case cd:I==null&&y(W,X,ae,oe);break;case Re:$(I,W,X,ae,le,K,oe,Z,Y);break;default:pe&1?S(I,W,X,ae,le,K,oe,Z,Y):pe&6?A(I,W,X,ae,le,K,oe,Z,Y):(pe&64||pe&128)&&ee.process(I,W,X,ae,le,K,oe,Z,Y,me)}ge!=null&&le?ad(ge,I&&I.ref,K,W||I,!W):ge==null&&I&&I.ref!=null&&ad(I.ref,null,K,I,!0)},m=(I,W,X,ae)=>{if(I==null)o(W.el=a(W.children),X,ae);else{const le=W.el=I.el;W.children!==I.children&&c(le,W.children)}},v=(I,W,X,ae)=>{I==null?o(W.el=l(W.children||""),X,ae):W.el=I.el},y=(I,W,X,ae)=>{[I.el,I.anchor]=g(I.children,W,X,ae,I.el,I.anchor)},x=({el:I,anchor:W},X,ae)=>{let le;for(;I&&I!==W;)le=f(I),o(I,X,ae),I=le;o(W,X,ae)},_=({el:I,anchor:W})=>{let X;for(;I&&I!==W;)X=f(I),r(I),I=X;r(W)},S=(I,W,X,ae,le,K,oe,Z,Y)=>{if(W.type==="svg"?oe="svg":W.type==="math"&&(oe="mathml"),I==null)E(W,X,ae,le,K,oe,Z,Y);else{const ee=I.el&&I.el._isVueCE?I.el:null;try{ee&&ee._beginPatch(),O(I,W,le,K,oe,Z,Y)}finally{ee&&ee._endPatch()}}},E=(I,W,X,ae,le,K,oe,Z)=>{let Y,ee;const{props:ge,shapeFlag:pe,transition:xe,dirs:be}=I;if(Y=I.el=s(I.type,K,ge&&ge.is,ge),pe&8?u(Y,I.children):pe&16&&C(I.children,Y,null,ae,le,yg(I,K),oe,Z),be&&Ka(I,null,ae,"created"),M(Y,I,I.scopeId,oe,ae),ge){for(const Se in ge)Se!=="value"&&!od(Se)&&i(Y,Se,null,ge[Se],K,ae);"value"in ge&&i(Y,"value",null,ge.value,K),(ee=ge.onVnodeBeforeMount)&&Ti(ee,ae,I)}be&&Ka(I,null,ae,"beforeMount");const Oe=N9(le,xe);Oe&&xe.beforeEnter(Y),o(Y,W,X),((ee=ge&&ge.onVnodeMounted)||Oe||be)&&go(()=>{ee&&Ti(ee,ae,I),Oe&&xe.enter(Y),be&&Ka(I,null,ae,"mounted")},le)},M=(I,W,X,ae,le)=>{if(X&&h(I,X),ae)for(let K=0;K<ae.length;K++)h(I,ae[K]);if(le){let K=le.subTree;if(W===K||t3(K.type)&&(K.ssContent===W||K.ssFallback===W)){const oe=le.vnode;M(I,oe,oe.scopeId,oe.slotScopeIds,le.parent)}}},C=(I,W,X,ae,le,K,oe,Z,Y=0)=>{for(let ee=Y;ee<I.length;ee++){const ge=I[ee]=Z?gs(I[ee]):Ii(I[ee]);b(null,ge,W,X,ae,le,K,oe,Z)}},O=(I,W,X,ae,le,K,oe)=>{const Z=W.el=I.el;let{patchFlag:Y,dynamicChildren:ee,dirs:ge}=W;Y|=I.patchFlag&16;const pe=I.props||Wt,xe=W.props||Wt;let be;if(X&&Za(X,!1),(be=xe.onVnodeBeforeUpdate)&&Ti(be,X,W,I),ge&&Ka(W,I,X,"beforeUpdate"),X&&Za(X,!0),(pe.innerHTML&&xe.innerHTML==null||pe.textContent&&xe.textContent==null)&&u(Z,""),ee?P(I.dynamicChildren,ee,Z,X,ae,yg(W,le),K):oe||V(I,W,Z,null,X,ae,yg(W,le),K,!1),Y>0){if(Y&16)R(Z,pe,xe,X,le);else if(Y&2&&pe.class!==xe.class&&i(Z,"class",null,xe.class,le),Y&4&&i(Z,"style",pe.style,xe.style,le),Y&8){const Oe=W.dynamicProps;for(let Se=0;Se<Oe.length;Se++){const Ae=Oe[Se],je=pe[Ae],ot=xe[Ae];(ot!==je||Ae==="value")&&i(Z,Ae,je,ot,le,X)}}Y&1&&I.children!==W.children&&u(Z,W.children)}else!oe&&ee==null&&R(Z,pe,xe,X,le);((be=xe.onVnodeUpdated)||ge)&&go(()=>{be&&Ti(be,X,W,I),ge&&Ka(W,I,X,"updated")},ae)},P=(I,W,X,ae,le,K,oe)=>{for(let Z=0;Z<W.length;Z++){const Y=I[Z],ee=W[Z],ge=Y.el&&(Y.type===Re||!ul(Y,ee)||Y.shapeFlag&198)?d(Y.el):X;b(Y,ee,ge,null,ae,le,K,oe,!0)}},R=(I,W,X,ae,le)=>{if(W!==X){if(W!==Wt)for(const K in W)!od(K)&&!(K in X)&&i(I,K,W[K],null,le,ae);for(const K in X){if(od(K))continue;const oe=X[K],Z=W[K];oe!==Z&&K!=="value"&&i(I,K,Z,oe,le,ae)}"value"in X&&i(I,"value",W.value,X.value,le)}},$=(I,W,X,ae,le,K,oe,Z,Y)=>{const ee=W.el=I?I.el:a(""),ge=W.anchor=I?I.anchor:a("");let{patchFlag:pe,dynamicChildren:xe,slotScopeIds:be}=W;be&&(Z=Z?Z.concat(be):be),I==null?(o(ee,X,ae),o(ge,X,ae),C(W.children||[],X,ge,le,K,oe,Z,Y)):pe>0&&pe&64&&xe&&I.dynamicChildren&&I.dynamicChildren.length===xe.length?(P(I.dynamicChildren,xe,X,le,K,oe,Z),(W.key!=null||le&&W===le.subTree)&&qb(I,W,!0)):V(I,W,X,ge,le,K,oe,Z,Y)},A=(I,W,X,ae,le,K,oe,Z,Y)=>{W.slotScopeIds=Z,I==null?W.shapeFlag&512?le.ctx.activate(W,X,ae,oe,Y):L(W,X,ae,le,K,oe,Y):B(I,W,Y)},L=(I,W,X,ae,le,K,oe)=>{const Z=I.component=G9(I,ae,le);if(F0(I)&&(Z.ctx.renderer=me),q9(Z,!1,oe),Z.asyncDep){if(le&&le.registerDep(Z,F,oe),!I.el){const Y=Z.subTree=H(_o);v(null,Y,W,X),I.placeholder=Y.el}}else F(Z,I,W,X,le,K,oe)},B=(I,W,X)=>{const ae=W.component=I.component;if($9(I,W,X))if(ae.asyncDep&&!ae.asyncResolved){z(ae,W,X);return}else ae.next=W,ae.update();else W.el=I.el,ae.vnode=W},F=(I,W,X,ae,le,K,oe)=>{const Z=()=>{if(I.isMounted){let{next:pe,bu:xe,u:be,parent:Oe,vnode:Se}=I;{const $t=Jk(I);if($t){pe&&(pe.el=Se.el,z(I,pe,oe)),$t.asyncDep.then(()=>{go(()=>{I.isUnmounted||ee()},le)});return}}let Ae=pe,je;Za(I,!1),pe?(pe.el=Se.el,z(I,pe,oe)):pe=Se,xe&&Bh(xe),(je=pe.props&&pe.props.onVnodeBeforeUpdate)&&Ti(je,Oe,pe,Se),Za(I,!0);const ot=Rx(I),ht=I.subTree;I.subTree=ot,b(ht,ot,d(ht.el),j(ht),I,le,K),pe.el=ot.el,Ae===null&&T9(I,ot.el),be&&go(be,le),(je=pe.props&&pe.props.onVnodeUpdated)&&go(()=>Ti(je,Oe,pe,Se),le)}else{let pe;const{el:xe,props:be}=W,{bm:Oe,m:Se,parent:Ae,root:je,type:ot}=I,ht=Sc(W);Za(I,!1),Oe&&Bh(Oe),!ht&&(pe=be&&be.onVnodeBeforeMount)&&Ti(pe,Ae,W),Za(I,!0);{je.ce&&je.ce._hasShadowRoot()&&je.ce._injectChildStyle(ot);const $t=I.subTree=Rx(I);b(null,$t,X,ae,I,le,K),W.el=$t.el}if(Se&&go(Se,le),!ht&&(pe=be&&be.onVnodeMounted)){const $t=W;go(()=>Ti(pe,Ae,$t),le)}(W.shapeFlag&256||Ae&&Sc(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&I.a&&go(I.a,le),I.isMounted=!0,W=X=ae=null}};I.scope.on();const Y=I.effect=new YS(Z);I.scope.off();const ee=I.update=Y.run.bind(Y),ge=I.job=Y.runIfDirty.bind(Y);ge.i=I,ge.id=I.uid,Y.scheduler=()=>Vb(ge),Za(I,!0),ee()},z=(I,W,X)=>{W.component=I;const ae=I.vnode.props;I.vnode=W,I.next=null,O9(I,W.props,ae,X),D9(I,W.children,X),Ds(),$x(I),Es()},V=(I,W,X,ae,le,K,oe,Z,Y=!1)=>{const ee=I&&I.children,ge=I?I.shapeFlag:0,pe=W.children,{patchFlag:xe,shapeFlag:be}=W;if(xe>0){if(xe&128){ie(ee,pe,X,ae,le,K,oe,Z,Y);return}else if(xe&256){U(ee,pe,X,ae,le,K,oe,Z,Y);return}}be&8?(ge&16&&_e(ee,le,K),pe!==ee&&u(X,pe)):ge&16?be&16?ie(ee,pe,X,ae,le,K,oe,Z,Y):_e(ee,le,K,!0):(ge&8&&u(X,""),be&16&&C(pe,X,ae,le,K,oe,Z,Y))},U=(I,W,X,ae,le,K,oe,Z,Y)=>{I=I||xc,W=W||xc;const ee=I.length,ge=W.length,pe=Math.min(ee,ge);let xe;for(xe=0;xe<pe;xe++){const be=W[xe]=Y?gs(W[xe]):Ii(W[xe]);b(I[xe],be,X,null,le,K,oe,Z,Y)}ee>ge?_e(I,le,K,!0,!1,pe):C(W,X,ae,le,K,oe,Z,Y,pe)},ie=(I,W,X,ae,le,K,oe,Z,Y)=>{let ee=0;const ge=W.length;let pe=I.length-1,xe=ge-1;for(;ee<=pe&&ee<=xe;){const be=I[ee],Oe=W[ee]=Y?gs(W[ee]):Ii(W[ee]);if(ul(be,Oe))b(be,Oe,X,null,le,K,oe,Z,Y);else break;ee++}for(;ee<=pe&&ee<=xe;){const be=I[pe],Oe=W[xe]=Y?gs(W[xe]):Ii(W[xe]);if(ul(be,Oe))b(be,Oe,X,null,le,K,oe,Z,Y);else break;pe--,xe--}if(ee>pe){if(ee<=xe){const be=xe+1,Oe=be<ge?W[be].el:ae;for(;ee<=xe;)b(null,W[ee]=Y?gs(W[ee]):Ii(W[ee]),X,Oe,le,K,oe,Z,Y),ee++}}else if(ee>xe)for(;ee<=pe;)fe(I[ee],le,K,!0),ee++;else{const be=ee,Oe=ee,Se=new Map;for(ee=Oe;ee<=xe;ee++){const Mt=W[ee]=Y?gs(W[ee]):Ii(W[ee]);Mt.key!=null&&Se.set(Mt.key,ee)}let Ae,je=0;const ot=xe-Oe+1;let ht=!1,$t=0;const Ft=new Array(ot);for(ee=0;ee<ot;ee++)Ft[ee]=0;for(ee=be;ee<=pe;ee++){const Mt=I[ee];if(je>=ot){fe(Mt,le,K,!0);continue}let Nt;if(Mt.key!=null)Nt=Se.get(Mt.key);else for(Ae=Oe;Ae<=xe;Ae++)if(Ft[Ae-Oe]===0&&ul(Mt,W[Ae])){Nt=Ae;break}Nt===void 0?fe(Mt,le,K,!0):(Ft[Nt-Oe]=ee+1,Nt>=$t?$t=Nt:ht=!0,b(Mt,W[Nt],X,null,le,K,oe,Z,Y),je++)}const un=ht?R9(Ft):xc;for(Ae=un.length-1,ee=ot-1;ee>=0;ee--){const Mt=Oe+ee,Nt=W[Mt],tn=W[Mt+1],Cn=Mt+1<ge?tn.el||e3(tn):ae;Ft[ee]===0?b(null,Nt,X,Cn,le,K,oe,Z,Y):ht&&(Ae<0||ee!==un[Ae]?ue(Nt,X,Cn,2):Ae--)}}},ue=(I,W,X,ae,le=null)=>{const{el:K,type:oe,transition:Z,children:Y,shapeFlag:ee}=I;if(ee&6){ue(I.component.subTree,W,X,ae);return}if(ee&128){I.suspense.move(W,X,ae);return}if(ee&64){oe.move(I,W,X,me);return}if(oe===Re){o(K,W,X);for(let pe=0;pe<Y.length;pe++)ue(Y[pe],W,X,ae);o(I.anchor,W,X);return}if(oe===cd){x(I,W,X);return}if(ae!==2&&ee&1&&Z)if(ae===0)Z.beforeEnter(K),o(K,W,X),go(()=>Z.enter(K),le);else{const{leave:pe,delayLeave:xe,afterLeave:be}=Z,Oe=()=>{I.ctx.isUnmounted?r(K):o(K,W,X)},Se=()=>{K._isLeaving&&K[Ei](!0),pe(K,()=>{Oe(),be&&be()})};xe?xe(K,Oe,Se):Se()}else o(K,W,X)},fe=(I,W,X,ae=!1,le=!1)=>{const{type:K,props:oe,ref:Z,children:Y,dynamicChildren:ee,shapeFlag:ge,patchFlag:pe,dirs:xe,cacheIndex:be}=I;if(pe===-2&&(le=!1),Z!=null&&(Ds(),ad(Z,null,X,I,!0),Es()),be!=null&&(W.renderCache[be]=void 0),ge&256){W.ctx.deactivate(I);return}const Oe=ge&1&&xe,Se=!Sc(I);let Ae;if(Se&&(Ae=oe&&oe.onVnodeBeforeUnmount)&&Ti(Ae,W,I),ge&6)de(I.component,X,ae);else{if(ge&128){I.suspense.unmount(X,ae);return}Oe&&Ka(I,null,W,"beforeUnmount"),ge&64?I.type.remove(I,W,X,me,ae):ee&&!ee.hasOnce&&(K!==Re||pe>0&&pe&64)?_e(ee,W,X,!1,!0):(K===Re&&pe&384||!le&&ge&16)&&_e(Y,W,X),ae&&he(I)}(Se&&(Ae=oe&&oe.onVnodeUnmounted)||Oe)&&go(()=>{Ae&&Ti(Ae,W,I),Oe&&Ka(I,null,W,"unmounted")},X)},he=I=>{const{type:W,el:X,anchor:ae,transition:le}=I;if(W===Re){ce(X,ae);return}if(W===cd){_(I);return}const K=()=>{r(X),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(I.shapeFlag&1&&le&&!le.persisted){const{leave:oe,delayLeave:Z}=le,Y=()=>oe(X,K);Z?Z(I.el,K,Y):Y()}else K()},ce=(I,W)=>{let X;for(;I!==W;)X=f(I),r(I),I=X;r(W)},de=(I,W,X)=>{const{bum:ae,scope:le,job:K,subTree:oe,um:Z,m:Y,a:ee}=I;zx(Y),zx(ee),ae&&Bh(ae),le.stop(),K&&(K.flags|=8,fe(oe,I,W,X)),Z&&go(Z,W),go(()=>{I.isUnmounted=!0},W)},_e=(I,W,X,ae=!1,le=!1,K=0)=>{for(let oe=K;oe<I.length;oe++)fe(I[oe],W,X,ae,le)},j=I=>{if(I.shapeFlag&6)return j(I.component.subTree);if(I.shapeFlag&128)return I.suspense.next();const W=f(I.anchor||I.el),X=W&&W[wk];return X?f(X):W};let te=!1;const ne=(I,W,X)=>{let ae;I==null?W._vnode&&(fe(W._vnode,null,null,!0),ae=W._vnode.component):b(W._vnode||null,I,W,null,null,null,X),W._vnode=I,te||(te=!0,$x(ae),vk(),te=!1)},me={p:b,um:fe,m:ue,r:he,mt:L,mc:C,pc:V,pbc:P,n:j,o:t};return{render:ne,hydrate:void 0,createApp:_9(ne)}}function yg({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Za({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function N9(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function qb(t,e,n=!1){const o=t.children,r=e.children;if(ct(o)&&ct(r))for(let i=0;i<o.length;i++){const s=o[i];let a=r[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[i]=gs(r[i]),a.el=s.el),!n&&a.patchFlag!==-2&&qb(s,a)),a.type===U0&&(a.patchFlag===-1&&(a=r[i]=gs(a)),a.el=s.el),a.type===_o&&!a.el&&(a.el=s.el)}}function R9(t){const e=t.slice(),n=[0];let o,r,i,s,a;const l=t.length;for(o=0;o<l;o++){const c=t[o];if(c!==0){if(r=n[n.length-1],t[r]<c){e[o]=r,n.push(o);continue}for(i=0,s=n.length-1;i<s;)a=i+s>>1,t[n[a]]<c?i=a+1:s=a;c<t[n[i]]&&(i>0&&(e[o]=n[i-1]),n[i]=o)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=e[s];return n}function Jk(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Jk(e)}function zx(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function e3(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?e3(e.subTree):null}const t3=t=>t.__isSuspense;function F9(t,e){e&&e.pendingBranch?ct(t)?e.effects.push(...t):e.effects.push(t):gk(t)}const Re=Symbol.for("v-fgt"),U0=Symbol.for("v-txt"),_o=Symbol.for("v-cmt"),cd=Symbol.for("v-stc"),ud=[];let br=null;function w(t=!1){ud.push(br=t?null:[])}function V9(){ud.pop(),br=ud[ud.length-1]||null}let Md=1;function sp(t,e=!1){Md+=t,t<0&&br&&e&&(br.hasOnce=!0)}function n3(t){return t.dynamicChildren=Md>0?br||xc:null,V9(),Md>0&&br&&br.push(t),t}function N(t,e,n,o,r,i){return n3(T(t,e,n,o,r,i,!0))}function Q(t,e,n,o,r){return n3(H(t,e,n,o,r,!0))}function Od(t){return t?t.__v_isVNode===!0:!1}function ul(t,e){return t.type===e.type&&t.key===e.key}const o3=({key:t})=>t??null,Ph=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?vn(t)||Ke(t)||vt(t)?{i:ro,r:t,k:e,f:!!n}:t:null);function T(t,e=null,n=null,o=0,r=null,i=t===Re?0:1,s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&o3(e),ref:e&&Ph(e),scopeId:yk,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ro};return a?(Yb(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=vn(n)?8:16),Md>0&&!s&&br&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&br.push(l),l}const H=z9;function z9(t,e=null,n=null,o=0,r=null,i=!1){if((!t||t===Ek)&&(t=_o),Od(t)){const a=_a(t,e,!0);return n&&Yb(a,n),Md>0&&!i&&br&&(a.shapeFlag&6?br[br.indexOf(t)]=a:br.push(a)),a.patchFlag=-2,a}if(K9(t)&&(t=t.__vccOpts),e){e=er(e);let{class:a,style:l}=e;a&&!vn(a)&&(e.class=$e(a)),Yt(l)&&(D0(l)&&!ct(l)&&(l=Nn({},l)),e.style=Pt(l))}const s=vn(t)?1:t3(t)?128:_k(t)?64:Yt(t)?4:vt(t)?2:0;return T(t,e,n,o,r,s,i,!0)}function er(t){return t?D0(t)||Yk(t)?Nn({},t):t:null}function _a(t,e,n=!1,o=!1){const{props:r,ref:i,patchFlag:s,children:a,transition:l}=t,c=e?Ct(r||{},e):r,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&o3(c),ref:e&&e.ref?n&&i?ct(i)?i.concat(Ph(e)):[i,Ph(e)]:Ph(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Re?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&_a(t.ssContent),ssFallback:t.ssFallback&&_a(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&o&&Td(u,l.clone(u)),u}function Ue(t=" ",e=0){return H(U0,null,t,e)}function H9(t,e){const n=H(cd,null,t);return n.staticCount=e,n}function re(t="",e=!1){return e?(w(),Q(_o,null,t)):H(_o,null,t)}function Ii(t){return t==null||typeof t=="boolean"?H(_o):ct(t)?H(Re,null,t.slice()):Od(t)?gs(t):H(U0,null,String(t))}function gs(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:_a(t)}function Yb(t,e){let n=0;const{shapeFlag:o}=t;if(e==null)e=null;else if(ct(e))n=16;else if(typeof e=="object")if(o&65){const r=e.default;r&&(r._c&&(r._d=!1),Yb(t,r()),r._c&&(r._d=!0));return}else{n=32;const r=e._;!r&&!Yk(e)?e._ctx=ro:r===3&&ro&&(ro.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else vt(e)?(e={default:e,_ctx:ro},n=32):(e=String(e),o&64?(n=16,e=[Ue(e)]):n=8);t.children=e,t.shapeFlag|=n}function Ct(...t){const e={};for(let n=0;n<t.length;n++){const o=t[n];for(const r in o)if(r==="class")e.class!==o.class&&(e.class=$e([e.class,o.class]));else if(r==="style")e.style=Pt([e.style,o.style]);else if(S0(r)){const i=e[r],s=o[r];s&&i!==s&&!(ct(i)&&i.includes(s))&&(e[r]=i?[].concat(i,s):s)}else r!==""&&(e[r]=o[r])}return e}function Ti(t,e,n,o=null){fi(t,e,7,[n,o])}const W9=zk();let U9=0;function G9(t,e,n){const o=t.type,r=(e?e.appContext:t.appContext)||W9,i={uid:U9++,vnode:t,type:o,parent:e,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new qS(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(r.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Xk(o,r),emitsOptions:Wk(o,r),emit:null,emitted:null,propsDefaults:Wt,inheritAttrs:o.inheritAttrs,ctx:Wt,data:Wt,props:Wt,attrs:Wt,slots:Wt,refs:Wt,setupState:Wt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=e?e.root:i,i.emit=S9.bind(null,i),t.ce&&t.ce(i),i}let So=null;const Lo=()=>So||ro;let ap,Yv;{const t=T0(),e=(n,o)=>{let r;return(r=t[n])||(r=t[n]=[]),r.push(o),i=>{r.length>1?r.forEach(s=>s(i)):r[0](i)}};ap=e("__VUE_INSTANCE_SETTERS__",n=>So=n),Yv=e("__VUE_SSR_SETTERS__",n=>Bd=n)}const ff=t=>{const e=So;return ap(t),t.scope.on(),()=>{t.scope.off(),ap(e)}},Hx=()=>{So&&So.scope.off(),ap(null)};function r3(t){return t.vnode.shapeFlag&4}let Bd=!1;function q9(t,e=!1,n=!1){e&&Yv(e);const{props:o,children:r}=t.vnode,i=r3(t);M9(t,o,i,e),P9(t,r,n||e);const s=i?Y9(t,e):void 0;return e&&Yv(!1),s}function Y9(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,m9);const{setup:o}=n;if(o){Ds();const r=t.setupContext=o.length>1?s3(t):null,i=ff(t),s=df(o,t,0,[t.props,r]),a=FS(s);if(Es(),i(),(a||t.sp)&&!Sc(t)&&Ok(t),a){if(s.then(Hx,Hx),e)return s.then(l=>{Wx(t,l)}).catch(l=>{I0(l,t,0)});t.asyncDep=s}else Wx(t,s)}else i3(t)}function Wx(t,e,n){vt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Yt(e)&&(t.setupState=dk(e)),i3(t)}function i3(t,e,n){const o=t.type;t.render||(t.render=o.render||si);{const r=ff(t);Ds();try{g9(t)}finally{Es(),r()}}}const j9={get(t,e){return xo(t,"get",""),t[e]}};function s3(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,j9),slots:t.slots,emit:t.emit,expose:e}}function G0(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(dk(Te(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in ld)return ld[n](t)},has(e,n){return n in e||n in ld}})):t.proxy}function X9(t,e=!0){return vt(t)?t.displayName||t.name:t.name||e&&t.__name}function K9(t){return vt(t)&&"__vccOpts"in t}const k=(t,e)=>XB(t,e,Bd);function Rt(t,e,n){try{sp(-1);const o=arguments.length;return o===2?Yt(e)&&!ct(e)?Od(e)?H(t,null,[e]):H(t,e):H(t,null,e):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Od(n)&&(n=[n]),H(t,e,n))}finally{sp(1)}}const Z9="3.5.29";/**
|
|
15
|
+
* @vue/runtime-dom v3.5.29
|
|
16
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
17
|
+
* @license MIT
|
|
18
|
+
**/let jv;const Ux=typeof window<"u"&&window.trustedTypes;if(Ux)try{jv=Ux.createPolicy("vue",{createHTML:t=>t})}catch{}const a3=jv?t=>jv.createHTML(t):t=>t,Q9="http://www.w3.org/2000/svg",J9="http://www.w3.org/1998/Math/MathML",ps=typeof document<"u"?document:null,Gx=ps&&ps.createElement("template"),eL={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,o)=>{const r=e==="svg"?ps.createElementNS(Q9,t):e==="mathml"?ps.createElementNS(J9,t):n?ps.createElement(t,{is:n}):ps.createElement(t);return t==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:t=>ps.createTextNode(t),createComment:t=>ps.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ps.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,o,r,i){const s=n?n.previousSibling:e.lastChild;if(r&&(r===i||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Gx.innerHTML=a3(o==="svg"?`<svg>${t}</svg>`:o==="mathml"?`<math>${t}</math>`:t);const a=Gx.content;if(o==="svg"||o==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[s?s.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},ta="transition",Mu="animation",Ld=Symbol("_vtc"),l3={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},tL=Nn({},kk,l3),nL=t=>(t.displayName="Transition",t.props=tL,t),kl=nL((t,{slots:e})=>Rt(a9,oL(t),e)),Qa=(t,e=[])=>{ct(t)?t.forEach(n=>n(...e)):t&&t(...e)},qx=t=>t?ct(t)?t.some(e=>e.length>1):t.length>1:!1;function oL(t){const e={};for(const $ in t)$ in l3||(e[$]=t[$]);if(t.css===!1)return e;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:c=s,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,g=rL(r),b=g&&g[0],m=g&&g[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:x,onLeave:_,onLeaveCancelled:S,onBeforeAppear:E=v,onAppear:M=y,onAppearCancelled:C=x}=e,O=($,A,L,B)=>{$._enterCancelled=B,Ja($,A?u:a),Ja($,A?c:s),L&&L()},P=($,A)=>{$._isLeaving=!1,Ja($,d),Ja($,h),Ja($,f),A&&A()},R=$=>(A,L)=>{const B=$?M:y,F=()=>O(A,$,L);Qa(B,[A,F]),Yx(()=>{Ja(A,$?l:i),as(A,$?u:a),qx(B)||jx(A,o,b,F)})};return Nn(e,{onBeforeEnter($){Qa(v,[$]),as($,i),as($,s)},onBeforeAppear($){Qa(E,[$]),as($,l),as($,c)},onEnter:R(!1),onAppear:R(!0),onLeave($,A){$._isLeaving=!0;const L=()=>P($,A);as($,d),$._enterCancelled?(as($,f),Zx($)):(Zx($),as($,f)),Yx(()=>{$._isLeaving&&(Ja($,d),as($,h),qx(_)||jx($,o,m,L))}),Qa(_,[$,L])},onEnterCancelled($){O($,!1,void 0,!0),Qa(x,[$])},onAppearCancelled($){O($,!0,void 0,!0),Qa(C,[$])},onLeaveCancelled($){P($),Qa(S,[$])}})}function rL(t){if(t==null)return null;if(Yt(t))return[xg(t.enter),xg(t.leave)];{const e=xg(t);return[e,e]}}function xg(t){return mB(t)}function as(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Ld]||(t[Ld]=new Set)).add(e)}function Ja(t,e){e.split(/\s+/).forEach(o=>o&&t.classList.remove(o));const n=t[Ld];n&&(n.delete(e),n.size||(t[Ld]=void 0))}function Yx(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let iL=0;function jx(t,e,n,o){const r=t._endId=++iL,i=()=>{r===t._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:s,timeout:a,propCount:l}=sL(t,e);if(!s)return o();const c=s+"end";let u=0;const d=()=>{t.removeEventListener(c,f),i()},f=h=>{h.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,f)}function sL(t,e){const n=window.getComputedStyle(t),o=g=>(n[g]||"").split(", "),r=o(`${ta}Delay`),i=o(`${ta}Duration`),s=Xx(r,i),a=o(`${Mu}Delay`),l=o(`${Mu}Duration`),c=Xx(a,l);let u=null,d=0,f=0;e===ta?s>0&&(u=ta,d=s,f=i.length):e===Mu?c>0&&(u=Mu,d=c,f=l.length):(d=Math.max(s,c),u=d>0?s>c?ta:Mu:null,f=u?u===ta?i.length:l.length:0);const h=u===ta&&/\b(?:transform|all)(?:,|$)/.test(o(`${ta}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function Xx(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,o)=>Kx(n)+Kx(t[o])))}function Kx(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Zx(t){return(t?t.ownerDocument:document).body.offsetHeight}function aL(t,e,n){const o=t[Ld];o&&(e=(e?[e,...o]:[...o]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const lp=Symbol("_vod"),c3=Symbol("_vsh"),Ic={name:"show",beforeMount(t,{value:e},{transition:n}){t[lp]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Ou(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:o}){!e!=!n&&(o?e?(o.beforeEnter(t),Ou(t,!0),o.enter(t)):o.leave(t,()=>{Ou(t,!1)}):Ou(t,e))},beforeUnmount(t,{value:e}){Ou(t,e)}};function Ou(t,e){t.style.display=e?t[lp]:"none",t[c3]=!e}const u3=Symbol("");function d3(t){const e=Lo();if(!e)return;const n=e.ut=(r=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(i=>cp(i,r))},o=()=>{const r=t(e.proxy);e.ce?cp(e.ce,r):Xv(e.subTree,r),n(r)};Pk(()=>{gk(o)}),hn(()=>{Ve(o,si,{flush:"post"});const r=new MutationObserver(o);r.observe(e.subTree.el.parentNode,{childList:!0}),Us(()=>r.disconnect())})}function Xv(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Xv(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)cp(t.el,e);else if(t.type===Re)t.children.forEach(n=>Xv(n,e));else if(t.type===cd){let{el:n,anchor:o}=t;for(;n&&(cp(n,e),n!==o);)n=n.nextSibling}}function cp(t,e){if(t.nodeType===1){const n=t.style;let o="";for(const r in e){const i=SB(e[r]);n.setProperty(`--${r}`,i),o+=`--${r}: ${i};`}n[u3]=o}}const lL=/(?:^|;)\s*display\s*:/;function cL(t,e,n){const o=t.style,r=vn(n);let i=!1;if(n&&!r){if(e)if(vn(e))for(const s of e.split(";")){const a=s.slice(0,s.indexOf(":")).trim();n[a]==null&&Dh(o,a,"")}else for(const s in e)n[s]==null&&Dh(o,s,"");for(const s in n)s==="display"&&(i=!0),Dh(o,s,n[s])}else if(r){if(e!==n){const s=o[u3];s&&(n+=";"+s),o.cssText=n,i=lL.test(n)}}else e&&t.removeAttribute("style");lp in t&&(t[lp]=i?o.display:"",t[c3]&&(o.display="none"))}const Qx=/\s*!important$/;function Dh(t,e,n){if(ct(n))n.forEach(o=>Dh(t,e,o));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const o=uL(t,e);Qx.test(n)?t.setProperty(Hs(o),n.replace(Qx,""),"important"):t[o]=n}}const Jx=["Webkit","Moz","ms"],wg={};function uL(t,e){const n=wg[e];if(n)return n;let o=Sr(e);if(o!=="filter"&&o in t)return wg[e]=o;o=A0(o);for(let r=0;r<Jx.length;r++){const i=Jx[r]+o;if(i in t)return wg[e]=i}return e}const ew="http://www.w3.org/1999/xlink";function tw(t,e,n,o,r,i=wB(e)){o&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(ew,e.slice(6,e.length)):t.setAttributeNS(ew,e,n):n==null||i&&!WS(n)?t.removeAttribute(e):t.setAttribute(e,i?"":ui(n)?String(n):n)}function nw(t,e,n,o,r){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?a3(n):n);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let s=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=WS(n):n==null&&a==="string"?(n="",s=!0):a==="number"&&(n=0,s=!0)}try{t[e]=n}catch{}s&&t.removeAttribute(r||e)}function _s(t,e,n,o){t.addEventListener(e,n,o)}function dL(t,e,n,o){t.removeEventListener(e,n,o)}const ow=Symbol("_vei");function fL(t,e,n,o,r=null){const i=t[ow]||(t[ow]={}),s=i[e];if(o&&s)s.value=o;else{const[a,l]=hL(e);if(o){const c=i[e]=gL(o,r);_s(t,a,c,l)}else s&&(dL(t,a,s,l),i[e]=void 0)}}const rw=/(?:Once|Passive|Capture)$/;function hL(t){let e;if(rw.test(t)){e={};let o;for(;o=t.match(rw);)t=t.slice(0,t.length-o[0].length),e[o[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Hs(t.slice(2)),e]}let _g=0;const pL=Promise.resolve(),mL=()=>_g||(pL.then(()=>_g=0),_g=Date.now());function gL(t,e){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;fi(vL(o,n.value),e,5,[o])};return n.value=t,n.attached=mL(),n}function vL(t,e){if(ct(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(o=>r=>!r._stopped&&o&&o(r))}else return e}const iw=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,bL=(t,e,n,o,r,i)=>{const s=r==="svg";e==="class"?aL(t,o,s):e==="style"?cL(t,n,o):S0(e)?Db(e)||fL(t,e,n,o,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):yL(t,e,o,s))?(nw(t,e,o),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&tw(t,e,o,s,i,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!vn(o))?nw(t,Sr(e),o,i,e):(e==="true-value"?t._trueValue=o:e==="false-value"&&(t._falseValue=o),tw(t,e,o,s))};function yL(t,e,n,o){if(o)return!!(e==="innerHTML"||e==="textContent"||e in t&&iw(e)&&vt(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return iw(e)&&vn(n)?!1:e in t}const Sa=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ct(e)?n=>Bh(e,n):e};function xL(t){t.target.composing=!0}function sw(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ir=Symbol("_assign");function aw(t,e,n){return e&&(t=t.trim()),n&&(t=$0(t)),t}const up={created(t,{modifiers:{lazy:e,trim:n,number:o}},r){t[Ir]=Sa(r);const i=o||r.props&&r.props.type==="number";_s(t,e?"change":"input",s=>{s.target.composing||t[Ir](aw(t.value,n,i))}),(n||i)&&_s(t,"change",()=>{t.value=aw(t.value,n,i)}),e||(_s(t,"compositionstart",xL),_s(t,"compositionend",sw),_s(t,"change",sw))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},s){if(t[Ir]=Sa(s),t.composing)return;const a=(i||t.type==="number")&&!/^0\d/.test(t.value)?$0(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(o&&e===n||r&&t.value.trim()===l)||(t.value=l))}},f3={deep:!0,created(t,e,n){t[Ir]=Sa(n),_s(t,"change",()=>{const o=t._modelValue,r=Nc(t),i=t.checked,s=t[Ir];if(ct(o)){const a=Ib(o,r),l=a!==-1;if(i&&!l)s(o.concat(r));else if(!i&&l){const c=[...o];c.splice(a,1),s(c)}}else if(au(o)){const a=new Set(o);i?a.add(r):a.delete(r),s(a)}else s(h3(t,i))})},mounted:lw,beforeUpdate(t,e,n){t[Ir]=Sa(n),lw(t,e,n)}};function lw(t,{value:e,oldValue:n},o){t._modelValue=e;let r;if(ct(e))r=Ib(e,o.props.value)>-1;else if(au(e))r=e.has(o.props.value);else{if(e===n)return;r=xa(e,h3(t,!0))}t.checked!==r&&(t.checked=r)}const wL={created(t,{value:e},n){t.checked=xa(e,n.props.value),t[Ir]=Sa(n),_s(t,"change",()=>{t[Ir](Nc(t))})},beforeUpdate(t,{value:e,oldValue:n},o){t[Ir]=Sa(o),e!==n&&(t.checked=xa(e,o.props.value))}},_L={deep:!0,created(t,{value:e,modifiers:{number:n}},o){const r=au(e);_s(t,"change",()=>{const i=Array.prototype.filter.call(t.options,s=>s.selected).map(s=>n?$0(Nc(s)):Nc(s));t[Ir](t.multiple?r?new Set(i):i:i[0]),t._assigning=!0,wn(()=>{t._assigning=!1})}),t[Ir]=Sa(o)},mounted(t,{value:e}){cw(t,e)},beforeUpdate(t,e,n){t[Ir]=Sa(n)},updated(t,{value:e}){t._assigning||cw(t,e)}};function cw(t,e){const n=t.multiple,o=ct(e);if(!(n&&!o&&!au(e))){for(let r=0,i=t.options.length;r<i;r++){const s=t.options[r],a=Nc(s);if(n)if(o){const l=typeof a;l==="string"||l==="number"?s.selected=e.some(c=>String(c)===String(a)):s.selected=Ib(e,a)>-1}else s.selected=e.has(a);else if(xa(Nc(s),e)){t.selectedIndex!==r&&(t.selectedIndex=r);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Nc(t){return"_value"in t?t._value:t.value}function h3(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const SL=["ctrl","shift","alt","meta"],kL={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>SL.some(n=>t[`${n}Key`]&&!e.includes(n))},gn=(t,e)=>{if(!t)return t;const n=t._withMods||(t._withMods={}),o=e.join(".");return n[o]||(n[o]=((r,...i)=>{for(let s=0;s<e.length;s++){const a=kL[e[s]];if(a&&a(r,e))return}return t(r,...i)}))},CL={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},nr=(t,e)=>{const n=t._withKeys||(t._withKeys={}),o=e.join(".");return n[o]||(n[o]=(r=>{if(!("key"in r))return;const i=Hs(r.key);if(e.some(s=>s===i||CL[s]===i))return t(r)}))},AL=Nn({patchProp:bL},eL);let uw;function $L(){return uw||(uw=E9(AL))}const TL=((...t)=>{const e=$L().createApp(...t),{mount:n}=e;return e.mount=o=>{const r=OL(o);if(!r)return;const i=e._component;!vt(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const s=n(r,!1,ML(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},e});function ML(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function OL(t){return vn(t)?document.querySelector(t):t}/*!
|
|
19
|
+
* pinia v3.0.4
|
|
20
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
21
|
+
* @license MIT
|
|
22
|
+
*/let p3;const q0=t=>p3=t,m3=Symbol();function Kv(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var dd;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(dd||(dd={}));function BL(){const t=M0(!0),e=t.run(()=>Ie({}));let n=[],o=[];const r=Te({install(i){q0(r),r._a=i,i.provide(m3,r),i.config.globalProperties.$pinia=r,o.forEach(s=>n.push(s)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const g3=()=>{};function dw(t,e,n,o=g3){t.add(e);const r=()=>{t.delete(e)&&o()};return!n&&Fl()&&wa(r),r}function oc(t,...e){t.forEach(n=>{n(...e)})}const LL=t=>t(),fw=Symbol(),Sg=Symbol();function Zv(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,o)=>t.set(o,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const o=e[n],r=t[n];Kv(r)&&Kv(o)&&t.hasOwnProperty(n)&&!Ke(o)&&!Wi(o)?t[n]=Zv(r,o):t[n]=o}return t}const PL=Symbol();function DL(t){return!Kv(t)||!Object.prototype.hasOwnProperty.call(t,PL)}const{assign:ia}=Object;function EL(t){return!!(Ke(t)&&t.effect)}function IL(t,e,n,o){const{state:r,actions:i,getters:s}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=r?r():{});const u=E0(n.state.value[t]);return ia(u,i,Object.keys(s||{}).reduce((d,f)=>(d[f]=Te(k(()=>{q0(n);const h=n._s.get(t);return s[f].call(h,h)})),d),{}))}return l=v3(t,c,e,n,o,!0),l}function v3(t,e,n={},o,r,i){let s;const a=ia({actions:{}},n),l={deep:!0};let c,u,d=new Set,f=new Set,h;const g=o.state.value[t];!i&&!g&&(o.state.value[t]={});let b;function m(C){let O;c=u=!1,typeof C=="function"?(C(o.state.value[t]),O={type:dd.patchFunction,storeId:t,events:h}):(Zv(o.state.value[t],C),O={type:dd.patchObject,payload:C,storeId:t,events:h});const P=b=Symbol();wn().then(()=>{b===P&&(c=!0)}),u=!0,oc(d,O,o.state.value[t])}const v=i?function(){const{state:O}=n,P=O?O():{};this.$patch(R=>{ia(R,P)})}:g3;function y(){s.stop(),d.clear(),f.clear(),o._s.delete(t)}const x=(C,O="")=>{if(fw in C)return C[Sg]=O,C;const P=function(){q0(o);const R=Array.from(arguments),$=new Set,A=new Set;function L(z){$.add(z)}function B(z){A.add(z)}oc(f,{args:R,name:P[Sg],store:S,after:L,onError:B});let F;try{F=C.apply(this&&this.$id===t?this:S,R)}catch(z){throw oc(A,z),z}return F instanceof Promise?F.then(z=>(oc($,z),z)).catch(z=>(oc(A,z),Promise.reject(z))):(oc($,F),F)};return P[fw]=!0,P[Sg]=O,P},_={_p:o,$id:t,$onAction:dw.bind(null,f),$patch:m,$reset:v,$subscribe(C,O={}){const P=dw(d,C,O.detached,()=>R()),R=s.run(()=>Ve(()=>o.state.value[t],$=>{(O.flush==="sync"?u:c)&&C({storeId:t,type:dd.direct,events:h},$)},ia({},l,O)));return P},$dispose:y},S=ar(_);o._s.set(t,S);const M=(o._a&&o._a.runWithContext||LL)(()=>o._e.run(()=>(s=M0()).run(()=>e({action:x}))));for(const C in M){const O=M[C];if(Ke(O)&&!EL(O)||Wi(O))i||(g&&DL(O)&&(Ke(O)?O.value=g[C]:Zv(O,g[C])),o.state.value[t][C]=O);else if(typeof O=="function"){const P=x(O,C);M[C]=P,a.actions[C]=O}}return ia(S,M),ia(Bt(S),M),Object.defineProperty(S,"$state",{get:()=>o.state.value[t],set:C=>{m(O=>{ia(O,C)})}}),o._p.forEach(C=>{ia(S,s.run(()=>C({store:S,app:o._a,pinia:o,options:a})))}),g&&i&&n.hydrate&&n.hydrate(S.$state,g),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function Po(t,e,n){let o;const r=typeof e=="function";o=r?n:e;function i(s,a){const l=zb();return s=s||(l?en(m3,null):null),s&&q0(s),s=p3,s._s.has(t)||(r?v3(t,e,o,s):IL(t,o,s)),s._s.get(t)}return i.$id=t,i}function At(t){const e=Bt(t),n={};for(const o in e){const r=e[o];r.effect?n[o]=k({get:()=>t[o],set(i){t[o]=i}}):(Ke(r)||Wi(r))&&(n[o]=Vt(t,o))}return n}function NL(t,e){if(t==null)return;let n=t;for(let o=0;o<e.length;o++){if(n===void 0||n[e[o]]===void 0)return;if(n===null||n[e[o]]===null)return null;n=n[e[o]]}return n}function jb(t,e,n){if(n.length===0)return e;const o=n[0];return n.length>1&&(e=jb(typeof t!="object"||t===null||!Object.prototype.hasOwnProperty.call(t,o)?Number.isInteger(Number(n[1]))?[]:{}:t[o],e,Array.prototype.slice.call(n,1))),Number.isInteger(Number(o))&&Array.isArray(t)?t.slice()[o]:Object.assign({},t,{[o]:e})}function b3(t,e){if(t==null||e.length===0)return t;if(e.length===1){if(t==null)return t;if(Number.isInteger(e[0])&&Array.isArray(t))return Array.prototype.slice.call(t,0).splice(e[0],1);const n={};for(const o in t)n[o]=t[o];return delete n[e[0]],n}if(t[e[0]]==null){if(Number.isInteger(e[0])&&Array.isArray(t))return Array.prototype.concat.call([],t);const n={};for(const o in t)n[o]=t[o];return n}return jb(t,b3(t[e[0]],Array.prototype.slice.call(e,1)),[e[0]])}function y3(t,e){return e.map(n=>n.split(".")).map(n=>[n,NL(t,n)]).filter(n=>n[1]!==void 0).reduce((n,o)=>jb(n,o[1],o[0]),{})}function x3(t,e){return e.map(n=>n.split(".")).reduce((n,o)=>b3(n,o),t)}function hw(t,{storage:e,serializer:n,key:o,debug:r,pick:i,omit:s,beforeHydrate:a,afterHydrate:l},c,u=!0){try{u&&(a==null||a(c));const d=e.getItem(o);if(d){const f=n.deserialize(d),h=i?y3(f,i):f,g=s?x3(h,s):h;t.$patch(g)}u&&(l==null||l(c))}catch(d){r&&console.error("[pinia-plugin-persistedstate]",d)}}function pw(t,{storage:e,serializer:n,key:o,debug:r,pick:i,omit:s}){try{const a=i?y3(t,i):t,l=s?x3(a,s):a,c=n.serialize(l);e.setItem(o,c)}catch(a){r&&console.error("[pinia-plugin-persistedstate]",a)}}function RL(t,e){return typeof t=="function"?t(e):typeof t=="string"?t:e}function FL(t,e,n){const{pinia:o,store:r,options:{persist:i=n}}=t;if(!i)return;// v8 ignore if -- @preserve
|
|
23
|
+
if(!(r.$id in o.state.value)){const a=o._s.get(r.$id.replace("__hot:",""));a&&Promise.resolve().then(()=>a.$persist());return}const s=(Array.isArray(i)?i:i===!0?[{}]:[i]).map(e);r.$hydrate=({runHooks:a=!0}={})=>{s.forEach(l=>{hw(r,l,t,a)})},r.$persist=()=>{s.forEach(a=>{pw(r.$state,a)})},s.forEach(a=>{hw(r,a,t),r.$subscribe((l,c)=>pw(c,a),{detached:!0})})}function VL(t={}){return function(e){FL(e,n=>{const o=RL(n.key,e.store.$id);return{key:(t.key?t.key:r=>r)(o),debug:n.debug??t.debug??!1,serializer:n.serializer??t.serializer??{serialize:r=>JSON.stringify(r),deserialize:r=>JSON.parse(r)},storage:n.storage??t.storage??window.localStorage,beforeHydrate:n.beforeHydrate??t.beforeHydrate,afterHydrate:n.afterHydrate??t.afterHydrate,pick:n.pick,omit:n.omit}},t.auto??!1)}}var zL=VL();const Xb=(t,e="")=>{const n=`${e}___`;return`___BVN__ID__${t}__${e?n:""}`},Ia=t=>Xb(t),Na=t=>Xb(`${t}__plugin`),HL=Ia("checkboxGroup"),w3=Ia("radioGroup"),_3=Ia("collapse"),S3=Na("globalShowHideStorage"),k3=Ia("dropdown"),C3=Ia("navbar"),WL=Na("rtl"),UL=Na("breadcrumbPlugin"),A3=Na("modalManager"),Eh=Na("defaults"),GL=Ia("inputGroup"),$3=Ia("buttonGroup"),qL=Na("toast"),YL=Na("modalController"),jL=Na("popover"),T3=Ia("formGroupPlugin");function Vl(t){return Fl()?(wa(t),!0):!1}function M3(t){let e=0,n,o;const r=()=>{e-=1,o&&e<=0&&(o.stop(),n=void 0,o=void 0)};return(...i)=>(e+=1,o||(o=M0(!0),n=o.run(()=>t(...i))),Vl(r),n)}function XL(t,e){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let o=0;return{next:()=>({value:e[o++],done:o>e.length})}}}),n}else return Object.assign([...e],t)}function so(t){return typeof t=="function"?t():p(t)}const O3=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const KL=t=>t!=null,ZL=Object.prototype.toString,QL=t=>ZL.call(t)==="[object Object]",Ts=()=>{},Qv=JL();function JL(){var t,e;return O3&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function B3(t,e){function n(...o){return new Promise((r,i)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(r).catch(i)})}return n}function eP(t,e={}){let n,o,r=Ts;const i=a=>{clearTimeout(a),r(),r=Ts};return a=>{const l=so(t),c=so(e.maxWait);return n&&i(n),l<=0||c!==void 0&&c<=0?(o&&(i(o),o=null),Promise.resolve(a())):new Promise((u,d)=>{r=e.rejectOnCancel?d:u,c&&!o&&(o=setTimeout(()=>{n&&i(n),o=null,u(a())},c)),n=setTimeout(()=>{o&&i(o),o=null,u(a())},l)})}}function tP(...t){let e=0,n,o=!0,r=Ts,i,s,a,l,c;!Ke(t[0])&&typeof t[0]=="object"?{delay:s,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=t[0]:[s,a=!0,l=!0,c=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,r(),r=Ts)};return f=>{const h=so(s),g=Date.now()-e,b=()=>i=f();return u(),h<=0?(e=Date.now(),b()):(g>h&&(l||!o)?(e=Date.now(),b()):a&&(i=new Promise((m,v)=>{r=c?v:m,n=setTimeout(()=>{e=Date.now(),o=!0,m(b()),u()},Math.max(0,h-g))})),!l&&!n&&(n=setTimeout(()=>o=!0,h)),o=!1,i)}}function nP(t){const e=Object.create(null);return n=>e[n]||(e[n]=t(n))}const oP=/-(\w)/g,rP=nP(t=>t.replace(oP,(e,n)=>n?n.toUpperCase():""));function iP(t,e){var n;if(typeof t=="number")return t+e;const o=((n=t.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",r=t.slice(o.length),i=Number.parseFloat(o)+e;return Number.isNaN(i)?t:i+r}function sP(...t){if(t.length!==1)return Vt(...t);const e=t[0];return typeof e=="function"?io(fk(()=>({get:e,set:Ts}))):Ie(e)}function aP(t,e=200,n={}){return B3(eP(e,n),t)}function mw(t,e=200,n=!1,o=!0,r=!1){return B3(tP(e,n,o,r),t)}function Cl(t,e={}){const{method:n="parseFloat",radix:o,nanToZero:r}=e;return k(()=>{let i=so(t);return typeof i=="string"&&(i=Number[n](i,o)),r&&Number.isNaN(i)&&(i=0),i})}function gw(t={}){const{inheritAttrs:e=!0}=t,n=De(),o=se({setup(i,{slots:s}){return()=>{n.value=s.default}}}),r=se({inheritAttrs:e,setup(i,{attrs:s,slots:a}){return()=>{var l;n.value;const c=(l=n.value)==null?void 0:l.call(n,{...lP(s),$slots:a});return e&&(c==null?void 0:c.length)===1?c[0]:c}}});return XL({define:o,reuse:r},[o,r])}function lP(t){const e={};for(const n in t)e[rP(n)]=t[n];return e}const zl=O3?window:void 0;function ha(t){var e;const n=so(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Pr(...t){let e,n,o,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,r]=t,e=zl):[e,n,o,r]=t,!e)return Ts;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},a=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),l=Ve(()=>[ha(e),so(r)],([u,d])=>{if(s(),!u)return;const f=QL(d)?{...d}:d;i.push(...n.flatMap(h=>o.map(g=>a(u,h,g,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return Vl(c),c}let vw=!1;function L3(t,e,n={}){const{window:o=zl,ignore:r=[],capture:i=!0,detectIframe:s=!1}=n;if(!o)return Ts;Qv&&!vw&&(vw=!0,Array.from(o.document.body.children).forEach(b=>b.addEventListener("click",Ts)),o.document.documentElement.addEventListener("click",Ts));let a=!0;const l=b=>so(r).some(m=>{if(typeof m=="string")return Array.from(o.document.querySelectorAll(m)).some(v=>v===b.target||b.composedPath().includes(v));{const v=ha(m);return v&&(b.target===v||b.composedPath().includes(v))}});function c(b){const m=so(b);return m&&m.$.subTree.shapeFlag===16}function u(b,m){const v=so(b),y=v.$.subTree&&v.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(x=>x.el===m.target||m.composedPath().includes(x.el))}const d=b=>{const m=ha(t);if(b.target!=null&&!(!(m instanceof Element)&&c(t)&&u(t,b))&&!(!m||m===b.target||b.composedPath().includes(m))){if(b.detail===0&&(a=!l(b)),!a){a=!0;return}e(b)}};let f=!1;const h=[Pr(o,"click",b=>{f||(f=!0,setTimeout(()=>{f=!1},0),d(b))},{passive:!0,capture:i}),Pr(o,"pointerdown",b=>{const m=ha(t);a=!l(b)&&!!(m&&!b.composedPath().includes(m))},{passive:!0}),s&&Pr(o,"blur",b=>{setTimeout(()=>{var m;const v=ha(t);((m=o.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(v!=null&&v.contains(o.document.activeElement))&&e(b)},0)})].filter(Boolean);return()=>h.forEach(b=>b())}function cP(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function vs(...t){let e,n,o={};t.length===3?(e=t[0],n=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],o=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:r=zl,eventName:i="keydown",passive:s=!1,dedupe:a=!1}=o,l=cP(e);return Pr(r,i,u=>{u.repeat&&so(a)||l(u)&&n(u)},s)}function uP(){const t=Ie(!1),e=Lo();return e&&hn(()=>{t.value=!0},e),t}function P3(t){const e=uP();return k(()=>(e.value,!!t()))}function dP(t,e,n={}){const{window:o=zl,...r}=n;let i;const s=P3(()=>o&&"MutationObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},l=k(()=>{const f=so(t),h=(Array.isArray(f)?f:[f]).map(ha).filter(KL);return new Set(h)}),c=Ve(()=>l.value,f=>{a(),s.value&&f.size&&(i=new MutationObserver(e),f.forEach(h=>i.observe(h,r)))},{immediate:!0,flush:"post"}),u=()=>i==null?void 0:i.takeRecords(),d=()=>{c(),a()};return Vl(d),{isSupported:s,stop:d,takeRecords:u}}function Bu(t,e={}){const{window:n=zl}=e,o=P3(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=Ie(!1),s=c=>{i.value=c.matches},a=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",s):r.removeListener(s))},l=N0(()=>{o.value&&(a(),r=n.matchMedia(so(t)),"addEventListener"in r?r.addEventListener("change",s):r.addListener(s),i.value=r.matches)});return Vl(()=>{l(),a(),r=void 0}),i}const fP={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};function hP(t,e={}){function n(u,d){let f=so(t[so(u)]);return d!=null&&(f=iP(f,d)),typeof f=="number"&&(f=`${f}px`),f}const{window:o=zl,strategy:r="min-width"}=e;function i(u){return o?o.matchMedia(u).matches:!1}const s=u=>Bu(()=>`(min-width: ${n(u)})`,e),a=u=>Bu(()=>`(max-width: ${n(u)})`,e),l=Object.keys(t).reduce((u,d)=>(Object.defineProperty(u,d,{get:()=>r==="min-width"?s(d):a(d),enumerable:!0,configurable:!0}),u),{});function c(){const u=Object.keys(t).map(d=>[d,s(d)]);return k(()=>u.filter(([,d])=>d.value).map(([d])=>d))}return Object.assign(l,{greaterOrEqual:s,smallerOrEqual:a,greater(u){return Bu(()=>`(min-width: ${n(u,.1)})`,e)},smaller(u){return Bu(()=>`(max-width: ${n(u,-.1)})`,e)},between(u,d){return Bu(()=>`(min-width: ${n(u)}) and (max-width: ${n(d,-.1)})`,e)},isGreater(u){return i(`(min-width: ${n(u,.1)})`)},isGreaterOrEqual(u){return i(`(min-width: ${n(u)})`)},isSmaller(u){return i(`(max-width: ${n(u,-.1)})`)},isSmallerOrEqual(u){return i(`(max-width: ${n(u)})`)},isInBetween(u,d){return i(`(min-width: ${n(u)}) and (max-width: ${n(d,-.1)})`)},current:c,active(){const u=c();return k(()=>u.value.length===0?"":u.value.at(-1))}})}const Hf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wf="__vueuse_ssr_handlers__",pP=mP();function mP(){return Wf in Hf||(Hf[Wf]=Hf[Wf]||{}),Hf[Wf]}function gP(t,e){return pP[t]||e}function Fi(t,e={}){const{initialValue:n=!1,focusVisible:o=!1,preventScroll:r=!1}=e,i=Ie(!1),s=k(()=>ha(t));Pr(s,"focus",l=>{var c,u;(!o||(u=(c=l.target).matches)!=null&&u.call(c,":focus-visible"))&&(i.value=!0)}),Pr(s,"blur",()=>i.value=!1);const a=k({get:()=>i.value,set(l){var c,u;!l&&i.value?(c=s.value)==null||c.blur():l&&!i.value&&((u=s.value)==null||u.focus({preventScroll:r}))}});return Ve(s,()=>{a.value=n},{immediate:!0,flush:"post"}),{focused:a}}function kg(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const vP={page:t=>[t.pageX,t.pageY],client:t=>[t.clientX,t.clientY],screen:t=>[t.screenX,t.screenY],movement:t=>t instanceof Touch?null:[t.movementX,t.movementY]};function bP(t={}){const{type:e="page",touch:n=!0,resetOnTouchEnds:o=!1,initialValue:r={x:0,y:0},window:i=zl,target:s=i,scroll:a=!0,eventFilter:l}=t;let c=null,u=0,d=0;const f=Ie(r.x),h=Ie(r.y),g=Ie(null),b=typeof e=="function"?e:vP[e],m=M=>{const C=b(M);c=M,C&&([f.value,h.value]=C,g.value="mouse"),i&&(u=i.scrollX,d=i.scrollY)},v=M=>{if(M.touches.length>0){const C=b(M.touches[0]);C&&([f.value,h.value]=C,g.value="touch")}},y=()=>{if(!c||!i)return;const M=b(c);c instanceof MouseEvent&&M&&(f.value=M[0]+i.scrollX-u,h.value=M[1]+i.scrollY-d)},x=()=>{f.value=r.x,h.value=r.y},_=l?M=>l(()=>m(M),{}):M=>m(M),S=l?M=>l(()=>v(M),{}):M=>v(M),E=l?()=>l(()=>y(),{}):()=>y();if(s){const M={passive:!0};Pr(s,["mousemove","dragover"],_,M),n&&e!=="movement"&&(Pr(s,["touchstart","touchmove"],S,M),o&&Pr(s,"touchend",x,M)),a&&e==="page"&&Pr(i,"scroll",E,{passive:!0})}return{x:f,y:h,sourceType:g}}function D3(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:D3(n)}}function yP(t){const e=t||window.event,n=e.target;return D3(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const Cg=new WeakMap;function xP(t,e=!1){const n=Ie(e);let o=null,r="";Ve(sP(t),a=>{const l=kg(so(a));if(l){const c=l;if(Cg.get(c)||Cg.set(c,c.style.overflow),c.style.overflow!=="hidden"&&(r=c.style.overflow),c.style.overflow==="hidden")return n.value=!0;if(n.value)return c.style.overflow="hidden"}},{immediate:!0});const i=()=>{const a=kg(so(t));!a||n.value||(Qv&&(o=Pr(a,"touchmove",l=>{yP(l)},{passive:!1})),a.style.overflow="hidden",n.value=!0)},s=()=>{const a=kg(so(t));!a||!n.value||(Qv&&(o==null||o()),a.style.overflow=r,Cg.delete(a),n.value=!1)};return Vl(s),k({get(){return n.value},set(a){a?i():s()}})}const Ag="modal-open",wP=()=>{const t=en(A3),e=o=>{t==null||t.removeStack(o),t==null||t.removeRegistry(o)},n=gP("updateHTMLAttrs",(o,r,i)=>{const s=typeof o=="string"?window==null?void 0:window.document.querySelector(o):ha(o);s&&(r==="class"?s.classList.toggle(Ag,i===Ag):s.setAttribute(r,i))});return Vl(()=>{n("body","class","")}),Ve(()=>t==null?void 0:t.countStack.value,o=>{o!==void 0&&n("body","class",o>0?Ag:"")}),{...t,dispose:e}},_P=(t,e)=>{const{pushRegistry:n,pushStack:o,removeStack:r,stack:i,dispose:s,countStack:a}=wP(),l=Lo();if(!l||l.type.__name!=="BModal")throw new Error("useModalManager must only use in BModal component");n==null||n(l),Vl(()=>{s(l)});const c=(u,d)=>{u?o==null||o(l):d&&!u&&(r==null||r(l))};return c(e,e),Ve(t,c),{activePosition:k(()=>i==null?void 0:i.value.findIndex(u=>{var d,f;return bt((d=u.exposed)==null?void 0:d.id)===bt((f=l.exposed)==null?void 0:f.id)})),activeModalCount:a,stackWithoutSelf:k(()=>(i==null?void 0:i.value.filter(u=>{var d,f;return bt((d=u.exposed)==null?void 0:d.id)!==bt((f=l.exposed)==null?void 0:f.id)}))??[])}},dp=t=>{if(t)return typeof t=="string"?typeof document>"u"?void 0:document.getElementById(t)??document.querySelector(t)??void 0:t.$el??t},SP=/^[0-9]*\.?[0-9]+$/;function kP(t,e=E3("injectSelf")){const{provides:n}=e;if(n&&t in n)return n[t]}function E3(t,e){const n=Lo();if(!n)throw new Error(`[Bvn] ${t} must be called from inside a setup function`);return n}const CP=(t="")=>t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase(),bw=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);function I3(t={},e={},n){const o={};for(const r in t)o[r]=t[r];for(const r in e){const i=t[r],s=e[r];if(bw(i)&&bw(s)){o[r]=I3(i,s);continue}o[r]=s}return o}const AP=(t,e)=>{var n,o;return typeof((n=t.props)==null?void 0:n[e])<"u"||typeof((o=t.props)==null?void 0:o[CP(e)])<"u"};function $P(t={},e){const n=en(Eh,Ie({})),o=E3("useDefaults");if(e=e??o.type.name??o.type.__name,!e)throw new Error("[Bvn] Could not determine component name");const r=k(()=>{var l;return(l=n.value)==null?void 0:l[t._as??e]}),i=new Proxy(t,{get(l,c){var u,d,f,h;const g=Reflect.get(l,c);return c==="class"||c==="style"?[(u=r.value)==null?void 0:u[c],g].filter(b=>b!=null):typeof c=="string"&&!AP(o.vnode,c)?((d=r.value)==null?void 0:d[c])??((h=(f=n.value)==null?void 0:f.global)==null?void 0:h[c])??g:g}}),s=De();N0(()=>{if(r.value){const l=Object.entries(r.value).filter(([c])=>c.startsWith(c[0].toUpperCase()));s.value=l.length?Object.fromEntries(l):void 0}else s.value=void 0});function a(){const l=kP(Eh,o);Ui(Eh,k(()=>s.value?I3((l==null?void 0:l.value)??{},s.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function zt(t,e){const{props:n,provideSubDefaults:o}=$P(t,e);return o(),n}const ko=(t,e)=>{const n=Mk();return k(()=>bt(t)||Xb(n||"",e))},Y0=se({name:"ConditionalTeleport",inheritAttrs:!1,slots:Object,props:{to:{type:[String,Object],default:null},disabled:{type:Boolean,required:!0}},setup(t,{slots:e}){return()=>{var n,o;return t.to?Rt(Hb,{to:t.to,disabled:t.disabled||!t.to},[(o=e.default)==null?void 0:o.call(e,{})]):(n=e.default)==null?void 0:n.call(e,{})}}});var TP=Object.defineProperty,MP=(t,e,n)=>e in t?TP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fs=(t,e,n)=>MP(t,typeof e!="symbol"?e+"":e,n);class fp{constructor(e,n={}){if(fs(this,"cancelable",!0),fs(this,"componentId",null),fs(this,"_defaultPrevented",!1),fs(this,"eventType",""),fs(this,"nativeEvent",null),fs(this,"_preventDefault"),fs(this,"relatedTarget",null),fs(this,"target",null),!e)throw new TypeError(`Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.`);Object.assign(this,fp.Defaults,n,{eventType:e}),this._preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)}}get defaultPrevented(){return this._defaultPrevented}set defaultPrevented(e){this._defaultPrevented=e}get preventDefault(){return this._preventDefault}set preventDefault(e){this._preventDefault=e}static get Defaults(){return{cancelable:!0,componentId:null,eventType:"",nativeEvent:null,relatedTarget:null,target:null}}}class OP extends fp{constructor(e,n={}){super(e,n),fs(this,"trigger",null),Object.assign(this,fp.Defaults,n,{eventType:e})}static get Defaults(){return{...super.Defaults,trigger:null}}}const yw={name:"fade",enterActiveClass:"",enterFromClass:"showing",enterToClass:"",leaveActiveClass:"",leaveFromClass:"",leaveToClass:"showing",css:!0},j0=(t,e,n,o,r,i={transitionProps:{},showFn:()=>{},hideFn:()=>{}})=>{var s;let a=!1;const l=!!t.value&&!e.initialAnimation||e.visible||!1,c=Ie(!1),u=Ie(l),d=Ie(l);let f=typeof t.value!="boolean";Ve(t,()=>{if(f=typeof t.value!="boolean",a){a=!1;return}t.value?y():x()});const h=Ie(l),g=Ie(!1),b=k(()=>e.noAnimation||e.noFade||h.value||!1);hn(()=>{var ce;if(!e.show&&l){const de=m("show",{cancelable:!0});if(n("show",de),de.defaultPrevented){n("show-prevented",m("show-prevented"));return}h.value=!0,t.value||(a=!0,t.value=!0),u.value=!0,d.value=!0,$.value=!0,ue.value=!0,fe.value=!0,c.value=!0,(ce=i.showFn)==null||ce.call(i)}else(e.show||t.value&&e.initialAnimation)&&y()}),Ve(()=>e.visible,ce=>{h.value=!0,wn(()=>{ce&&($.value=!0),ce?y():x()})}),Ve(()=>e.show,ce=>{ce?y():x()}),Pr(o,"bv-toggle",()=>{t.value=!t.value});const m=(ce,de={})=>new OP(ce,{cancelable:!1,target:(o==null?void 0:o.value)||null,relatedTarget:null,trigger:null,...de,componentId:r==null?void 0:r.value});let v;const y=()=>{if(c.value)return;const ce=m("show",{cancelable:!0});if(n("show",ce),ce.defaultPrevented){n("show-prevented",m("show-prevented")),$.value&&($.value=!1),t.value&&!f&&(a=!0,wn(()=>{t.value=!1}));return}u.value=!0,d.value=!0,requestAnimationFrame(()=>{var de;v=setTimeout(()=>{var _e;c.value=!0,(_e=i.showFn)==null||_e.call(i),t.value||(a=!0,wn(()=>{t.value=!0}))},h.value?0:typeof e.delay=="number"?e.delay:((de=e.delay)==null?void 0:de.show)||0)})},x=ce=>{var de;if(!c.value)return;const _e=m("hide",{cancelable:!0,trigger:ce}),j=m(ce||"ignore",{cancelable:!0,trigger:ce});if(ce==="backdrop"&&e.noCloseOnBackdrop||ce==="esc"&&e.noCloseOnEsc){n("hide-prevented",m("hide-prevented"));return}if(v&&(clearTimeout(v),v=void 0),ce&&n(ce,j),n("hide",_e),_e.defaultPrevented||j.defaultPrevented){n("hide-prevented",m("hide-prevented")),t.value||wn(()=>{a=!0,t.value=!0});return}setTimeout(()=>{var te;P.value=!0,c.value=!1,(te=i.hideFn)==null||te.call(i),t.value&&(a=!0,t.value=f?0:!1)},h.value?0:typeof e.delay=="number"?e.delay:((de=e.delay)==null?void 0:de.hide)||0)},_=mw(ce=>x(ce),500),S=mw(()=>y(),500),E=()=>{const ce=m("toggle",{cancelable:!0});if(n("toggle",ce),ce.defaultPrevented){n("toggle-prevented",m("toggle-prevented"));return}c.value?x():y()},M=(s=en(S3,void 0))==null?void 0:s({id:r.value,toggle:E,show:y,hide:x,value:io(c)});Ns(()=>{M==null||M.unregister()});const C=Ie(!1),O=()=>{e.lazy===!0&&(C.value=!0)},P=Ie(!1),R=Ie(!1),$=Ie(!1),A=ce=>{var de,_e,j,te;(_e=(de=i.transitionProps)==null?void 0:de.onBeforeEnter)==null||_e.call(de,ce),(te=(j=e.transitionProps)==null?void 0:j.onBeforeEnter)==null||te.call(j,ce),R.value=!0},L=ce=>{var de,_e,j,te;requestAnimationFrame(()=>{requestAnimationFrame(()=>{$.value=!0})}),(_e=(de=i.transitionProps)==null?void 0:de.onEnter)==null||_e.call(de,ce),(te=(j=e.transitionProps)==null?void 0:j.onEnter)==null||te.call(j,ce)},B=ce=>{var de,_e,j,te;n("shown",m("shown")),O(),(_e=(de=i.transitionProps)==null?void 0:de.onAfterEnter)==null||_e.call(de,ce),(te=(j=e.transitionProps)==null?void 0:j.onAfterEnter)==null||te.call(j,ce),h.value&&requestAnimationFrame(()=>{h.value=!1}),g.value&&(g.value=!1)},F=ce=>{var de,_e,j,te;P.value||(P.value=!0),(_e=(de=i.transitionProps)==null?void 0:de.onBeforeLeave)==null||_e.call(de,ce),(te=(j=e.transitionProps)==null?void 0:j.onBeforeLeave)==null||te.call(j,ce)},z=ce=>{var de,_e,j,te;$.value=!1,(_e=(de=i.transitionProps)==null?void 0:de.onLeave)==null||_e.call(de,ce),(te=(j=e.transitionProps)==null?void 0:j.onLeave)==null||te.call(j,ce)},V=ce=>{var de,_e,j,te;n("hidden",m("hidden")),(_e=(de=i.transitionProps)==null?void 0:de.onAfterLeave)==null||_e.call(de,ce),(te=(j=e.transitionProps)==null?void 0:j.onAfterLeave)==null||te.call(j,ce),P.value=!1,R.value=!1,h.value&&requestAnimationFrame(()=>{h.value=!1}),requestAnimationFrame(()=>{g.value||(u.value=!1)})},U=k(()=>g.value===!0||R.value===!0||e.lazy===!1||e.lazy===!0&&C.value===!0&&e.unmountLazy===!1),ie=Ie(!1);Ve($,ce=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{setTimeout(()=>{ie.value=ce},32)})})})})});const ue=Ie(!1),fe=Ie(!1),he={...i.transitionProps,onBeforeEnter:A,onEnter:L,onAfterEnter:B,onBeforeLeave:F,onLeave:z,onAfterLeave:V};return{showRef:c,renderRef:u,renderBackdropRef:d,isVisible:$,isActive:R,trapActive:ie,show:y,hide:x,toggle:E,throttleHide:_,throttleShow:S,buildTriggerableEvent:m,computedNoAnimation:b,localNoAnimation:h,localTemporaryHide:g,isLeaving:P,transitionProps:{...yw,...e.transitionProps,...he},lazyLoadCompleted:C,markLazyLoadCompleted:O,contentShowing:U,backdropReady:fe,backdropVisible:ue,backdropTransitionProps:{...yw,onBeforeEnter:()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue.value=!0})}),fe.value=!1},onAfterEnter:()=>{fe.value=!0},onBeforeLeave:()=>{ue.value=!1},onAfterLeave:()=>{fe.value=!1,requestAnimationFrame(()=>{d.value=!1})}}}},X0=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},N3=["top","right","bottom","left"],xw=["start","end"],ww=N3.reduce((t,e)=>t.concat(e,e+"-"+xw[0],e+"-"+xw[1]),[]),pi=Math.min,wo=Math.max,hp=Math.round,Uf=Math.floor,Gi=t=>({x:t,y:t}),BP={left:"right",right:"left",bottom:"top",top:"bottom"},LP={start:"end",end:"start"};function Jv(t,e,n){return wo(t,pi(e,n))}function Gs(t,e){return typeof t=="function"?t(e):t}function Vr(t){return t.split("-")[0]}function li(t){return t.split("-")[1]}function R3(t){return t==="x"?"y":"x"}function Kb(t){return t==="y"?"height":"width"}function ka(t){return["top","bottom"].includes(Vr(t))?"y":"x"}function Zb(t){return R3(ka(t))}function F3(t,e,n){n===void 0&&(n=!1);const o=li(t),r=Zb(t),i=Kb(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=mp(s)),[s,mp(s)]}function PP(t){const e=mp(t);return[pp(t),e,pp(e)]}function pp(t){return t.replace(/start|end/g,e=>LP[e])}function DP(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:s;default:return[]}}function EP(t,e,n,o){const r=li(t);let i=DP(Vr(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(pp)))),i}function mp(t){return t.replace(/left|right|bottom|top/g,e=>BP[e])}function IP(t){return{top:0,right:0,bottom:0,left:0,...t}}function Qb(t){return typeof t!="number"?IP(t):{top:t,right:t,bottom:t,left:t}}function Rc(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function _w(t,e,n){let{reference:o,floating:r}=t;const i=ka(e),s=Zb(e),a=Kb(s),l=Vr(e),c=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[a]/2-r[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(li(e)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const NP=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:d}=_w(c,o,l),f=o,h={},g=0;for(let b=0;b<a.length;b++){const{name:m,fn:v}=a[b],{x:y,y:x,data:_,reset:S}=await v({x:u,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});u=y??u,d=x??d,h={...h,[m]:{...h[m],..._}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):S.rects),{x:u,y:d}=_w(c,f,l)),b=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:h}};async function Fc(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Gs(e,t),g=Qb(h),m=a[f?d==="floating"?"reference":"floating":d],v=Rc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Rc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-S.top+g.top)/_.y,bottom:(S.bottom-v.bottom+g.bottom)/_.y,left:(v.left-S.left+g.left)/_.x,right:(S.right-v.right+g.right)/_.x}}const RP=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Gs(t,e)||{};if(c==null)return{};const d=Qb(u),f={x:n,y:o},h=Zb(r),g=Kb(h),b=await s.getDimensions(c),m=h==="y",v=m?"top":"left",y=m?"bottom":"right",x=m?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[h]-f[h]-i.floating[g],S=f[h]-i.reference[h],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let M=E?E[x]:0;(!M||!await(s.isElement==null?void 0:s.isElement(E)))&&(M=a.floating[x]||i.floating[g]);const C=_/2-S/2,O=M/2-b[g]/2-1,P=pi(d[v],O),R=pi(d[y],O),$=P,A=M-b[g]-R,L=M/2-b[g]/2+C,B=Jv($,L,A),F=!l.arrow&&li(r)!=null&&L!==B&&i.reference[g]/2-(L<$?P:R)-b[g]/2<0,z=F?L<$?L-$:L-A:0;return{[h]:f[h]+z,data:{[h]:B,centerOffset:L-B-z,...F&&{alignmentOffset:z}},reset:F}}});function FP(t,e,n){return(t?[...n.filter(r=>li(r)===t),...n.filter(r=>li(r)!==t)]:n.filter(r=>Vr(r)===r)).filter(r=>t?li(r)===t||(e?pp(r)!==r:!1):!0)}const VP=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,r;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:f=ww,autoAlignment:h=!0,...g}=Gs(t,e),b=d!==void 0||f===ww?FP(d||null,h,f):f,m=await Fc(e,g),v=((n=s.autoPlacement)==null?void 0:n.index)||0,y=b[v];if(y==null)return{};const x=F3(y,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==y)return{reset:{placement:b[0]}};const _=[m[Vr(y)],m[x[0]],m[x[1]]],S=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:_}],E=b[v+1];if(E)return{data:{index:v+1,overflows:S},reset:{placement:E}};const M=S.map(P=>{const R=li(P.placement);return[P.placement,R&&u?P.overflows.slice(0,2).reduce(($,A)=>$+A,0):P.overflows[0],P.overflows]}).sort((P,R)=>P[1]-R[1]),O=((r=M.filter(P=>P[2].slice(0,li(P[0])?2:3).every(R=>R<=0))[0])==null?void 0:r[0])||M[0][0];return O!==a?{data:{index:v+1,overflows:S},reset:{placement:O}}:{}}}},zP=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...m}=Gs(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Vr(r),y=ka(a),x=Vr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!b?[mp(a)]:PP(a)),E=g!=="none";!f&&E&&S.push(...EP(a,b,g,_));const M=[a,...S],C=await Fc(e,m),O=[];let P=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&O.push(C[v]),d){const L=F3(r,s,_);O.push(C[L[0]],C[L[1]])}if(P=[...P,{placement:r,overflows:O}],!O.every(L=>L<=0)){var R,$;const L=(((R=i.flip)==null?void 0:R.index)||0)+1,B=M[L];if(B)return{data:{index:L,overflows:P},reset:{placement:B}};let F=($=P.filter(z=>z.overflows[0]<=0).sort((z,V)=>z.overflows[1]-V.overflows[1])[0])==null?void 0:$.placement;if(!F)switch(h){case"bestFit":{var A;const z=(A=P.filter(V=>{if(E){const U=ka(V.placement);return U===y||U==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(U=>U>0).reduce((U,ie)=>U+ie,0)]).sort((V,U)=>V[1]-U[1])[0])==null?void 0:A[0];z&&(F=z);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function Sw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function kw(t){return N3.some(e=>t[e]>=0)}const HP=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=Gs(t,e);switch(o){case"referenceHidden":{const i=await Fc(e,{...r,elementContext:"reference"}),s=Sw(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:kw(s)}}}case"escaped":{const i=await Fc(e,{...r,altBoundary:!0}),s=Sw(i,n.floating);return{data:{escapedOffsets:s,escaped:kw(s)}}}default:return{}}}}};function V3(t){const e=pi(...t.map(i=>i.left)),n=pi(...t.map(i=>i.top)),o=wo(...t.map(i=>i.right)),r=wo(...t.map(i=>i.bottom));return{x:e,y:n,width:o-e,height:r-n}}function WP(t){const e=t.slice().sort((r,i)=>r.y-i.y),n=[];let o=null;for(let r=0;r<e.length;r++){const i=e[r];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i}return n.map(r=>Rc(V3(r)))}const UP=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:s}=e,{padding:a=2,x:l,y:c}=Gs(t,e),u=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(o.reference))||[]),d=WP(u),f=Rc(V3(u)),h=Qb(a);function g(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&c!=null)return d.find(m=>l>m.left-h.left&&l<m.right+h.right&&c>m.top-h.top&&c<m.bottom+h.bottom)||f;if(d.length>=2){if(ka(n)==="y"){const P=d[0],R=d[d.length-1],$=Vr(n)==="top",A=P.top,L=R.bottom,B=$?P.left:R.left,F=$?P.right:R.right,z=F-B,V=L-A;return{top:A,bottom:L,left:B,right:F,width:z,height:V,x:B,y:A}}const m=Vr(n)==="left",v=wo(...d.map(P=>P.right)),y=pi(...d.map(P=>P.left)),x=d.filter(P=>m?P.left===y:P.right===v),_=x[0].top,S=x[x.length-1].bottom,E=y,M=v,C=M-E,O=S-_;return{top:_,bottom:S,left:E,right:M,width:C,height:O,x:E,y:_}}return f}const b=await i.getElementRects({reference:{getBoundingClientRect:g},floating:o.floating,strategy:s});return r.reference.x!==b.reference.x||r.reference.y!==b.reference.y||r.reference.width!==b.reference.width||r.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}};async function GP(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Vr(n),a=li(n),l=ka(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Gs(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const qP=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,l=await GP(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},YP=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:v,y}=m;return{x:v,y}}},...l}=Gs(t,e),c={x:n,y:o},u=await Fc(e,l),d=ka(Vr(r)),f=R3(d);let h=c[f],g=c[d];if(i){const m=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+u[m],x=h-u[v];h=Jv(y,h,x)}if(s){const m=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=g+u[m],x=g-u[v];g=Jv(y,g,x)}const b=a.fn({...e,[f]:h,[d]:g});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[f]:i,[d]:s}}}}}},jP=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:l=()=>{},...c}=Gs(t,e),u=await Fc(e,c),d=Vr(r),f=li(r),h=ka(r)==="y",{width:g,height:b}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const y=b-u.top-u.bottom,x=g-u.left-u.right,_=pi(b-u[m],y),S=pi(g-u[v],x),E=!e.middlewareData.shift;let M=_,C=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(M=y),E&&!f){const P=wo(u.left,0),R=wo(u.right,0),$=wo(u.top,0),A=wo(u.bottom,0);h?C=g-2*(P!==0||R!==0?P+R:wo(u.left,u.right)):M=b-2*($!==0||A!==0?$+A:wo(u.top,u.bottom))}await l({...e,availableWidth:C,availableHeight:M});const O=await s.getDimensions(a.floating);return g!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}};function K0(){return typeof window<"u"}function Hl(t){return Jb(t)?(t.nodeName||"").toLowerCase():"#document"}function wr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function os(t){var e;return(e=(Jb(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Jb(t){return K0()?t instanceof Node||t instanceof wr(t).Node:!1}function mi(t){return K0()?t instanceof Element||t instanceof wr(t).Element:!1}function Zi(t){return K0()?t instanceof HTMLElement||t instanceof wr(t).HTMLElement:!1}function Cw(t){return!K0()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof wr(t).ShadowRoot}function hf(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=gi(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function XP(t){return["table","td","th"].includes(Hl(t))}function Z0(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ey(t){const e=ty(),n=mi(t)?gi(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function KP(t){let e=Ca(t);for(;Zi(e)&&!Vc(e);){if(ey(e))return e;if(Z0(e))return null;e=Ca(e)}return null}function ty(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vc(t){return["html","body","#document"].includes(Hl(t))}function gi(t){return wr(t).getComputedStyle(t)}function Q0(t){return mi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ca(t){if(Hl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Cw(t)&&t.host||os(t);return Cw(e)?e.host:e}function z3(t){const e=Ca(t);return Vc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Zi(e)&&hf(e)?e:z3(e)}function Pd(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=z3(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=wr(r);if(i){const a=e1(s);return e.concat(s,s.visualViewport||[],hf(r)?r:[],a&&n?Pd(a):[])}return e.concat(r,Pd(r,[],n))}function e1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function H3(t){const e=gi(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Zi(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=hp(n)!==i||hp(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function ny(t){return mi(t)?t:t.contextElement}function kc(t){const e=ny(t);if(!Zi(e))return Gi(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=H3(e);let s=(i?hp(n.width):n.width)/o,a=(i?hp(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const ZP=Gi(0);function W3(t){const e=wr(t);return!ty()||!e.visualViewport?ZP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function QP(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==wr(t)?!1:e}function Al(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=ny(t);let s=Gi(1);e&&(o?mi(o)&&(s=kc(o)):s=kc(t));const a=QP(i,n,o)?W3(i):Gi(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const f=wr(i),h=o&&mi(o)?wr(o):o;let g=f,b=e1(g);for(;b&&o&&h!==g;){const m=kc(b),v=b.getBoundingClientRect(),y=gi(b),x=v.left+(b.clientLeft+parseFloat(y.paddingLeft))*m.x,_=v.top+(b.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=_,g=wr(b),b=e1(g)}}return Rc({width:u,height:d,x:l,y:c})}function oy(t,e){const n=Q0(t).scrollLeft;return e?e.left+n:Al(os(t)).left+n}function U3(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:oy(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function JP(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=os(o),a=e?Z0(e.floating):!1;if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Gi(1);const u=Gi(0),d=Zi(o);if((d||!d&&!i)&&((Hl(o)!=="body"||hf(s))&&(l=Q0(o)),Zi(o))){const h=Al(o);c=kc(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=s&&!d&&!i?U3(s,l,!0):Gi(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function e7(t){return Array.from(t.getClientRects())}function t7(t){const e=os(t),n=Q0(t),o=t.ownerDocument.body,r=wo(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=wo(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+oy(t);const a=-n.scrollTop;return gi(o).direction==="rtl"&&(s+=wo(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}function n7(t,e){const n=wr(t),o=os(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const c=ty();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:a,y:l}}function o7(t,e){const n=Al(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=Zi(t)?kc(t):Gi(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=r*i.x,c=o*i.y;return{width:s,height:a,x:l,y:c}}function Aw(t,e,n){let o;if(e==="viewport")o=n7(t,n);else if(e==="document")o=t7(os(t));else if(mi(e))o=o7(e,n);else{const r=W3(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Rc(o)}function G3(t,e){const n=Ca(t);return n===e||!mi(n)||Vc(n)?!1:gi(n).position==="fixed"||G3(n,e)}function r7(t,e){const n=e.get(t);if(n)return n;let o=Pd(t,[],!1).filter(a=>mi(a)&&Hl(a)!=="body"),r=null;const i=gi(t).position==="fixed";let s=i?Ca(t):t;for(;mi(s)&&!Vc(s);){const a=gi(s),l=ey(s);!l&&a.position==="fixed"&&(r=null),(i?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||hf(s)&&!l&&G3(t,s))?o=o.filter(u=>u!==s):r=a,s=Ca(s)}return e.set(t,o),o}function i7(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?Z0(e)?[]:r7(e,this._c):[].concat(n),o],a=s[0],l=s.reduce((c,u)=>{const d=Aw(e,u,r);return c.top=wo(d.top,c.top),c.right=pi(d.right,c.right),c.bottom=pi(d.bottom,c.bottom),c.left=wo(d.left,c.left),c},Aw(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function s7(t){const{width:e,height:n}=H3(t);return{width:e,height:n}}function a7(t,e,n){const o=Zi(e),r=os(e),i=n==="fixed",s=Al(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Gi(0);if(o||!o&&!i)if((Hl(e)!=="body"||hf(r))&&(a=Q0(e)),o){const f=Al(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else r&&(l.x=oy(r));const c=r&&!o&&!i?U3(r,a):Gi(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function $g(t){return gi(t).position==="static"}function $w(t,e){if(!Zi(t)||gi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return os(t)===n&&(n=n.ownerDocument.body),n}function q3(t,e){const n=wr(t);if(Z0(t))return n;if(!Zi(t)){let r=Ca(t);for(;r&&!Vc(r);){if(mi(r)&&!$g(r))return r;r=Ca(r)}return n}let o=$w(t,e);for(;o&&XP(o)&&$g(o);)o=$w(o,e);return o&&Vc(o)&&$g(o)&&!ey(o)?n:o||KP(t)||n}const l7=async function(t){const e=this.getOffsetParent||q3,n=this.getDimensions,o=await n(t.floating);return{reference:a7(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function c7(t){return gi(t).direction==="rtl"}const u7={convertOffsetParentRelativeRectToViewportRelativeRect:JP,getDocumentElement:os,getClippingRect:i7,getOffsetParent:q3,getElementRects:l7,getClientRects:e7,getDimensions:s7,getScale:kc,isElement:mi,isRTL:c7};function d7(t,e){let n=null,o;const r=os(t);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=t.getBoundingClientRect();if(a||e(),!d||!f)return;const h=Uf(u),g=Uf(r.clientWidth-(c+d)),b=Uf(r.clientHeight-(u+f)),m=Uf(c),y={rootMargin:-h+"px "+-g+"px "+-b+"px "+-m+"px",threshold:wo(0,pi(1,l))||1};let x=!0;function _(S){const E=S[0].intersectionRatio;if(E!==l){if(!x)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(_,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(t)}return s(!0),i}function Y3(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=ny(t),u=r||i?[...c?Pd(c):[],...Pd(e)]:[];u.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?d7(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let g,b=l?Al(t):null;l&&m();function m(){const v=Al(t);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&n(),b=v,g=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const j3=qP,f7=VP,X3=YP,K3=zP,Z3=jP,h7=HP,p7=RP,m7=UP,g7=(t,e,n)=>{const o=new Map,r={platform:u7,...n},i={...r.platform,_c:o};return NP(t,e,{...r,platform:i})};function v7(t){return t!=null&&typeof t=="object"&&"$el"in t}function t1(t){if(v7(t)){const e=t.$el;return Jb(e)&&Hl(e)==="#comment"?null:e}return t}function dc(t){return typeof t=="function"?t():p(t)}function b7(t){return{name:"arrow",options:t,fn(e){const n=t1(dc(t.element));return n==null?{}:p7({element:n,padding:t.padding}).fn(e)}}}function Q3(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Tw(t,e){const n=Q3(t);return Math.round(e*n)/n}function J3(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,r=k(()=>{var M;return(M=dc(n.open))!=null?M:!0}),i=k(()=>dc(n.middleware)),s=k(()=>{var M;return(M=dc(n.placement))!=null?M:"bottom"}),a=k(()=>{var M;return(M=dc(n.strategy))!=null?M:"absolute"}),l=k(()=>{var M;return(M=dc(n.transform))!=null?M:!0}),c=k(()=>t1(t.value)),u=k(()=>t1(e.value)),d=Ie(0),f=Ie(0),h=Ie(a.value),g=Ie(s.value),b=De({}),m=Ie(!1),v=k(()=>{const M={position:h.value,left:"0",top:"0"};if(!u.value)return M;const C=Tw(u.value,d.value),O=Tw(u.value,f.value);return l.value?{...M,transform:"translate("+C+"px, "+O+"px)",...Q3(u.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:C+"px",top:O+"px"}});let y;function x(){if(c.value==null||u.value==null)return;const M=r.value;g7(c.value,u.value,{middleware:i.value,placement:s.value,strategy:a.value}).then(C=>{d.value=C.x,f.value=C.y,h.value=C.strategy,g.value=C.placement,b.value=C.middlewareData,m.value=M!==!1})}function _(){typeof y=="function"&&(y(),y=void 0)}function S(){if(_(),o===void 0){x();return}if(c.value!=null&&u.value!=null){y=o(c.value,u.value,x);return}}function E(){r.value||(m.value=!1)}return Ve([i,s,a,r],x,{flush:"sync"}),Ve([c,u],S,{flush:"sync"}),Ve(r,E,{flush:"sync"}),Fl()&&wa(_),{x:ol(d),y:ol(f),strategy:ol(h),placement:ol(g),middlewareData:ol(b),isPositioned:ol(m),floatingStyles:v,update:x}}const y7=M3(bP),x7=["id"],w7=["id"],_7=se({inheritAttrs:!1,__name:"BPopover",props:nt({boundary:{default:"clippingAncestors"},boundaryPadding:{default:void 0},click:{type:Boolean,default:!1},closeOnHide:{type:Boolean,default:!1},content:{default:void 0},customClass:{default:""},delay:{default:()=>({show:100,hide:300})},floatingMiddleware:{default:void 0},hideMargin:{default:2},id:{default:void 0},inline:{type:Boolean,default:!1},manual:{type:Boolean,default:!1},noAutoClose:{type:Boolean,default:!1},noFlip:{type:Boolean,default:!1},noHide:{type:Boolean,default:!1},noShift:{type:Boolean,default:!1},noSize:{type:Boolean,default:!1},noninteractive:{type:Boolean,default:!1},offset:{default:null},placement:{default:"top"},realtime:{type:Boolean,default:!1},reference:{default:null},strategy:{default:"absolute"},target:{default:null},title:{default:void 0},tooltip:{type:Boolean,default:!1},variant:{default:null},teleportDisabled:{type:Boolean,default:!1},teleportTo:{default:void 0},initialAnimation:{type:Boolean,default:!1},noAnimation:{type:Boolean},noFade:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},unmountLazy:{type:Boolean,default:!1},show:{type:Boolean,default:!1},transProps:{},visible:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:nt(["pointerleave","blur","click-outside","close-on-hide","hide","hide-prevented","hidden","show","show-prevented","shown","toggle","toggle-prevented"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const r=zt(t,"BPopover"),i=n,s=ns(),a=ft(t,"modelValue"),l=ko(()=>r.id,"popover"),c=Ie(!1),u=pt("_element"),d=pt("_content"),f=pt("_arrow"),h=pt("_placeholder"),g=Ie(null),b=Ie(null),m=k(()=>r.placement.startsWith("auto")),v=Cl(()=>r.offset??NaN),y=k(()=>ry(r.boundary)?r.boundary:void 0),x=k(()=>t4(r.boundary)?r.boundary:void 0),_=Ie({}),S=k(()=>{if(r.floatingMiddleware!==void 0)return r.floatingMiddleware;const W=r.offset!==null?v.value:r.tooltip?6:8,X=[j3(W)];return r.noFlip===!1&&!m.value&&X.push(K3({boundary:y.value,rootBoundary:x.value,padding:r.boundaryPadding})),m.value&&X.push(f7({alignment:r.placement.split("-")[1]||void 0,boundary:y.value,rootBoundary:x.value,padding:r.boundaryPadding})),r.noShift===!1&&X.push(X3({boundary:y.value,rootBoundary:x.value,padding:r.boundaryPadding})),r.noHide===!1&&X.push(h7({boundary:y.value,rootBoundary:x.value,padding:r.boundaryPadding})),r.inline===!0&&X.push(m7()),X.push(b7({element:f,padding:10})),r.noSize===!1&&X.push(Z3({boundary:y.value,rootBoundary:x.value,padding:r.boundaryPadding,apply({availableWidth:ae,availableHeight:le}){var K,oe;_.value={maxHeight:le>=(((K=d.value)==null?void 0:K.scrollHeight)??0)?void 0:le?`${Math.max(0,le)}px`:void 0,maxWidth:ae>=(((oe=d.value)==null?void 0:oe.scrollWidth)??0)?void 0:ae?`${Math.max(0,ae)}px`:void 0}}})),X}),E=k(()=>m.value?void 0:r.placement),{floatingStyles:M,middlewareData:C,placement:O,update:P}=J3(g,u,{placement:E,middleware:S,strategy:Vt(()=>r.strategy)}),R=Ie({position:"absolute"});Ve(C,W=>{var X,ae;if(r.noHide===!1&&((X=W.hide)!=null&&X.referenceHidden&&!c.value&&A.value?r.closeOnHide&&!r.noAutoClose&&!r.manual?z("close-on-hide"):(he.value=!0,c.value=!0):he.value&&!((ae=W.hide)!=null&&ae.referenceHidden)&&(he.value=!1,c.value=!1)),W.arrow){const{x:le,y:K}=W.arrow;R.value={position:"absolute",top:K?`${K}px`:"",left:le?`${le}px`:""}}});let $;const{showRef:A,hide:L,show:B,toggle:F,throttleHide:z,computedNoAnimation:V,transitionProps:U,contentShowing:ie,isVisible:ue,renderRef:fe,localTemporaryHide:he}=j0(a,r,i,u,l,{showFn:()=>{P(),wn(()=>{$=Y3(g.value,u.value,P,{animationFrame:r.realtime})})},hideFn:()=>{$&&($(),$=void 0)}}),ce=k(()=>{const W=r.tooltip?"tooltip":"popover";return[W,`b-${W}`,{[`b-${W}-${r.variant}`]:r.variant!==null,show:ue.value&&!c.value,fade:!V.value,[`${r.customClass}`]:r.customClass!==void 0,[`bs-${W}-${S7(O.value)}`]:O.value!==void 0}]}),{x:de,y:_e}=y7(),j=()=>{var W,X;const ae=(W=b.value)==null?void 0:W.getBoundingClientRect(),le=(X=u.value)==null?void 0:X.getBoundingClientRect(),K=parseInt(r.hideMargin,10)||0,oe=(window==null?void 0:window.scrollX)||0,Z=(window==null?void 0:window.scrollY)||0,Y=!ae||de.value<ae.left+oe-K||de.value>ae.right+oe+K||_e.value<ae.top+Z-K||_e.value>ae.bottom+Z+K,ee=!le||de.value<le.left+oe-K||de.value>le.right+oe+K||_e.value<le.top+Z-K||_e.value>le.bottom+Z+K;return{triggerIsOutside:Y,isOutside:ee}};let te;const ne=W=>{var X,ae,le;const K=typeof r.delay=="number"?r.delay:((X=r.delay)==null?void 0:X.hide)||0,{triggerIsOutside:oe,isOutside:Z}=j();!r.noninteractive&&Z&&oe&&!((ae=u.value)!=null&&ae.contains(document==null?void 0:document.activeElement))&&!((le=b.value)!=null&&le.contains(document==null?void 0:document.activeElement))||r.noninteractive&&oe?L(W==null?void 0:W.type):(te&&clearTimeout(te),te=setTimeout(()=>{ne(W)},K<50?50:K))};Ve(ue,()=>{P()}),e({hide:L,show:B,toggle:F});const me=W=>{A.value?L(W.type==="click"?"click":"toggle"):B()},ve=()=>{var W;if(r.target){const X=dp(bt(r.target));X?b.value=X:console.warn("Target element not found",r.target)}else b.value=(W=h.value)==null?void 0:W.nextElementSibling;if(r.reference){const X=dp(bt(r.reference));X?g.value=X:console.warn("Reference element not found",r.reference)}else g.value=b.value;if(!(!b.value||r.manual)){if(r.click){b.value.addEventListener("click",me);return}b.value.addEventListener("pointerenter",B),b.value.addEventListener("pointerleave",ne),b.value.addEventListener("focus",B),b.value.addEventListener("blur",ne)}},I=()=>{b.value&&(b.value.removeEventListener("click",me),b.value.removeEventListener("pointerenter",B),b.value.removeEventListener("pointerleave",ne),b.value.removeEventListener("focus",B),b.value.removeEventListener("blur",ne))};return L3(u,()=>{A.value&&r.click&&!r.noAutoClose&&!r.manual&&L("click-outside")},{ignore:[b]}),Ve([()=>r.click,()=>r.target,()=>r.reference],()=>{I(),ve()}),hn(()=>{ve(),wn(()=>{P()})}),Ns(I),(W,X)=>(w(),N(Re,null,[T("span",{id:p(l)+"_placeholder",ref:"_placeholder",style:{display:"none"}},null,8,x7),Ce(W.$slots,"target",{show:p(B),hide:p(L),toggle:p(F),visible:p(A)},void 0,!0),H(Y0,{to:p(r).teleportTo,disabled:!p(r).teleportTo||p(r).teleportDisabled},{default:J(()=>[p(fe)||p(ie)?(w(),Q(kl,Ct({key:0},p(U),{appear:a.value||p(r).visible}),{default:J(()=>[sr(T("div",Ct({id:p(l)},W.$attrs,{ref:"_element",class:ce.value,role:"tooltip",tabindex:"-1",style:p(M)}),[T("div",{ref:"_arrow",class:$e(`${p(r).tooltip?"tooltip":"popover"}-arrow`),style:Pt(R.value),"data-popper-arrow":""},null,6),T("div",{ref:"_content",class:"overflow-auto",style:Pt(_.value)},[p(r).title||s.title?(w(),N("div",{key:0,class:$e(["position-sticky top-0",p(r).tooltip?"tooltip-inner":"popover-header"])},[Ce(W.$slots,"title",{},()=>[Ue(ye(p(r).title),1)],!0)],2)):re("",!0),p(r).tooltip&&!s.title&&!p(r).title||!p(r).tooltip?(w(),N("div",{key:1,class:$e(p(r).tooltip?"tooltip-inner":"popover-body")},[Ce(W.$slots,"default",{},()=>[Ue(ye(p(r).content),1)],!0)],2)):re("",!0)],4)],16,w7),[[Ic,p(A)&&!c.value]])]),_:3},16,["appear"])):re("",!0)]),_:3},8,["to","disabled"])],64))}}),e4=X0(_7,[["__scopeId","data-v-9445feff"]]),S7=t=>{const[e]=t.split("-");switch(e){case"left":return"start";case"right":return"end";default:return e}},k7=t=>{const[e]=t.split("-");switch(e){case"left":return"start";case"right":return"end";case"top":return"up";case"bottom":return"down";default:return e}},ry=t=>t==="clippingAncestors"||t instanceof Element||Array.isArray(t),t4=t=>!ry(t),C7=(t,e)=>[...e].reduce((n,o)=>(n[o]=t[o],n),{}),Lu=(t,e,n)=>{const o=e.split(/[.[\]]/g);let r=t;for(const i of o){if(r===null||r===void 0)return n;i.trim()!==""&&(r=r[i])}return r===void 0?n:r},A7=["type","disabled","aria-label"],n4=se({__name:"BCloseButton",props:{ariaLabel:{default:"Close"},disabled:{type:Boolean,default:!1},type:{default:"button"}},emits:["click"],setup(t,{emit:e}){const o=zt(t,"BCloseButton"),r=e;return(i,s)=>(w(),N("button",{type:p(o).type,class:"btn-close",disabled:p(o).disabled,"aria-label":p(o).ariaLabel,onClick:s[0]||(s[0]=a=>r("click",a))},null,8,A7))}}),$7=(t=[])=>{const{activeElement:e}=document;return e&&!(t!=null&&t.some(n=>n===e))?e:null},T7=(t,e={})=>{const n=o=>o===$7();try{t.focus(e)}catch(o){console.error(o)}return n(t)},zc=t=>((t==null?void 0:t())??[]).length===0,o4=t=>{if(t.getAttribute("display")==="none")return!1;const e=t.getBoundingClientRect();return!!(e&&e.height>0&&e.width>0)},Ms=t=>k(()=>{let e=bt(t);return e={variant:e.variant??null,bgVariant:e.bgVariant??null,textVariant:e.textVariant??null,borderVariant:e.borderVariant??null},{[`text-bg-${e.variant}`]:e.variant!==null,[`text-${e.textVariant}`]:e.textVariant!==null,[`bg-${e.bgVariant}`]:e.bgVariant!==null,[`border-${e.borderVariant}`]:e.borderVariant!==null}}),M7={key:0,class:"visually-hidden"},O7=se({__name:"BSpinner",props:{label:{default:void 0},role:{default:"status"},small:{type:Boolean,default:!1},tag:{default:"span"},type:{default:"border"},variant:{default:null}},setup(t){const n=zt(t,"BSpinner"),o=ns(),r=Ms(k(()=>({textVariant:n.variant}))),i=k(()=>[`spinner-${n.type}`,r.value,{[`spinner-${n.type}-sm`]:n.small}]),s=k(()=>!zc(o.label));return(a,l)=>(w(),Q(Gt(p(n).tag),{class:$e(i.value),role:p(n).label||s.value?p(n).role:null,"aria-hidden":p(n).label||s.value?null:!0},{default:J(()=>[p(n).label||s.value?(w(),N("span",M7,[Ce(a.$slots,"label",{},()=>[Ue(ye(p(n).label),1)])])):re("",!0)]),_:3},8,["class","role","aria-hidden"]))}}),B7=t=>{const e=t.trim();return e.charAt(0).toUpperCase()+e.slice(1)},L7=t=>t.replace(/-./g,e=>e.charAt(1).toUpperCase()).replace(/\b\w/g,e=>e.toUpperCase()).replace(/\s+/g,""),P7=t=>!!(t.href||t.to),iy=(t,e)=>{const n=io(Vt(e)),o=io(Vt(t)),r=k(()=>P7(o.value)),i=k(()=>r.value?C7(o.value,n.value??["active","activeClass","append","href","rel","replace","routerComponentName","target","to","variant","opacity","opacityHover","underlineVariant","underlineOffset","underlineOffsetHover","underlineOpacity","underlineOpacityHover"]):{});return{computedLink:r,computedLinkProps:i}},D7=t=>{const e=Lo(),n=e==null?void 0:e.appContext.app.config.globalProperties.$router,o=e==null?void 0:e.appContext.app.config.globalProperties.$route,r=Gt("RouterLink"),i=typeof r=="string"?null:r.useLink,s=Vt(t),a=Vt(()=>s.value.to||""),l=Vt(()=>s.value.replace),c=k(()=>L7(s.value.routerComponentName)),u=k(()=>!((e==null?void 0:e.appContext.app.component(c.value))!==void 0)||s.value.disabled||!s.value.to?"a":c.value),d=k(()=>u.value==="RouterLink"),f=k(()=>d.value&&typeof(e==null?void 0:e.appContext.app.$nuxt)<"u"),h=k(()=>u.value!=="a"&&!d.value&&!f.value),g=k(()=>d.value||f.value),b=k(()=>({to:a.value,replace:l.value})),m=i==null?void 0:i({to:a,replace:l}),v=k(()=>g.value?m:null),y=k(()=>{var x;if((x=v.value)!=null&&x.href.value)return v.value.href.value;const _="#";if(s.value.href)return s.value.href;if(typeof s.value.to=="string")return s.value.to||_;const{to:S}=s.value;if(S!==void 0&&"path"in S){const E=S.path||"",M=S.query?`?${Object.keys(S.query).map(O=>{var P;return`${O}=${(P=S.query)==null?void 0:P[O]}`}).join("=")}`:"",C=!S.hash||S.hash.charAt(0)==="#"?S.hash||"":`#${S.hash}`;return`${E}${M}${C}`||_}return _});return{isNonStandardTag:h,tag:u,isRouterLink:d,isNuxtLink:f,computedHref:y,routerName:c,router:n,route:o,link:v,linkProps:b}},r4=t=>k(()=>{const e=bt(t);return{[`link-${e.variant}`]:e.variant!==null,[`link-opacity-${e.opacity}`]:e.opacity!==void 0,[`link-opacity-${e.opacityHover}-hover`]:e.opacityHover!==void 0,[`link-underline-${e.underlineVariant}`]:e.underlineVariant!==null,[`link-offset-${e.underlineOffset}`]:e.underlineOffset!==void 0,[`link-offset-${e.underlineOffsetHover}-hover`]:e.underlineOffsetHover!==void 0,"link-underline":e.underlineVariant===null&&(e.underlineOpacity!==void 0||e.underlineOpacityHover!==void 0),[`link-underline-opacity-${e.underlineOpacity}`]:e.underlineOpacity!==void 0,[`link-underline-opacity-${e.underlineOpacityHover}-hover`]:e.underlineOpacityHover!==void 0,"icon-link":e.icon===!0}}),Mw="active",sy=se({__name:"BLink",props:{active:{type:Boolean,default:void 0},activeClass:{default:"router-link-active"},disabled:{type:Boolean,default:!1},exactActiveClass:{default:"router-link-exact-active"},href:{default:void 0},icon:{type:Boolean,default:!1},noRel:{type:Boolean,default:!1},opacity:{default:void 0},opacityHover:{default:void 0},prefetch:{type:Boolean,default:void 0},prefetchOn:{default:void 0},noPrefetch:{type:Boolean,default:void 0},prefetchedClass:{default:void 0},rel:{default:void 0},replace:{type:Boolean,default:!1},routerComponentName:{default:"router-link"},routerTag:{default:"a"},stretched:{type:Boolean,default:!1},target:{default:void 0},to:{default:void 0},underlineOffset:{default:void 0},underlineOffsetHover:{default:void 0},underlineOpacity:{default:void 0},underlineOpacityHover:{default:void 0},underlineVariant:{default:null},variant:{default:null}},emits:["click"],setup(t,{emit:e}){const o=zt(t,"BLink"),r=e,i=H0(),{computedHref:s,tag:a,link:l,isNuxtLink:c,isRouterLink:u,linkProps:d,isNonStandardTag:f}=D7(k(()=>({routerComponentName:o.routerComponentName,disabled:o.disabled,to:o.to,replace:o.replace,href:o.href}))),h=en(_3,null),g=en(C3,null),b=r4(o),m=k(()=>{var M,C;return[b.value,i.class,v.value,{[Mw]:o.active,[o.activeClass]:((M=l.value)==null?void 0:M.isActive.value)||!1,[o.exactActiveClass]:((C=l.value)==null?void 0:C.isExactActive.value)||!1,"stretched-link":o.stretched===!0}]}),v=k(()=>({[Mw]:o.active,disabled:o.disabled})),y=M=>{var C,O,P;if(o.disabled){M.preventDefault(),M.stopImmediatePropagation();return}(((C=h==null?void 0:h.isNav)==null?void 0:C.value)===!0&&g===null||g!==null&&((O=g.autoClose)==null?void 0:O.value)===!0)&&((P=h==null?void 0:h.hide)==null||P.call(h)),r("click",M)},x=k(()=>o.target==="_blank"?!o.rel&&o.noRel?"noopener":o.rel:void 0),_=k(()=>o.disabled?"-1":typeof i.tabindex>"u"?null:i.tabindex),S=k(()=>({prefetch:o.prefetch,noPrefetch:o.noPrefetch,prefetchOn:o.prefetchOn,prefetchedClass:o.prefetchedClass,...d.value})),E=k(()=>({...u.value?d.value:void 0,...c.value||f.value?S.value:void 0}));return(M,C)=>(w(),Q(Gt(p(a)),Ct({class:m.value,target:p(o).target,href:p(s),rel:x.value,tabindex:_.value,"aria-disabled":p(o).disabled?!0:null},E.value,{onClick:C[0]||(C[0]=O=>{var P;y(O),(P=p(l))==null||P.navigate(O)})}),{default:J(()=>[Ce(M.$slots,"default")]),_:3},16,["class","target","href","rel","tabindex","aria-disabled"]))}}),Uo=se({__name:"BButton",props:nt({loading:{type:Boolean,default:!1},loadingFill:{type:Boolean,default:!1},loadingText:{default:"Loading..."},pill:{type:Boolean,default:!1},size:{default:"md"},squared:{type:Boolean,default:!1},tag:{default:"button"},type:{default:"button"},variant:{default:"secondary"},active:{type:Boolean,default:!1},activeClass:{default:void 0},disabled:{type:Boolean,default:void 0},exactActiveClass:{default:void 0},href:{default:void 0},icon:{type:Boolean,default:!1},noRel:{type:Boolean},opacity:{default:void 0},opacityHover:{default:void 0},prefetch:{type:Boolean},prefetchOn:{},noPrefetch:{type:Boolean},prefetchedClass:{},rel:{default:void 0},replace:{type:Boolean,default:void 0},routerComponentName:{default:void 0},routerTag:{default:void 0},stretched:{type:Boolean,default:!1},target:{default:void 0},to:{default:void 0},underlineOffset:{default:void 0},underlineOffsetHover:{default:void 0},underlineOpacity:{default:void 0},underlineOpacityHover:{default:void 0},underlineVariant:{default:null}},{pressed:{type:Boolean,default:void 0},pressedModifiers:{}}),emits:nt(["click"],["update:pressed"]),setup(t,{emit:e}){const o=zt(t,"BButton"),r=e,i=pt("_element"),s=ft(t,"pressed"),{computedLink:a,computedLinkProps:l}=iy(o,["active-class","exact-active-class","replace","routerComponentName","routerTag"]),c=k(()=>typeof s.value=="boolean"),u=k(()=>o.tag==="button"&&o.href===void 0&&o.to===void 0),d=k(()=>o.to!==void 0),f=k(()=>o.href!==void 0?!1:!u.value),h=k(()=>d.value?l.value:[]),g=k(()=>o.href==="#"&&o.disabled?!0:f.value?o.disabled:null),b=k(()=>{var S;return((S=o.variant)==null?void 0:S.startsWith("link"))||!1}),m=k(()=>{var S;return((S=o.variant)==null?void 0:S.startsWith("link-"))||!1}),v=r4(k(()=>{var S;return{...b.value?{icon:o.icon,opacity:o.opacity,opacityHover:o.opacityHover,underlineOffset:o.underlineOffset,underlineOffsetHover:o.underlineOffsetHover,underlineOpacity:o.underlineOpacity,underlineOpacityHover:o.underlineOpacityHover,underlineVariant:o.underlineVariant,variant:m.value===!0?(S=o.variant)==null?void 0:S.slice(5):null}:void 0}})),y=k(()=>[b.value===!0&&a.value===!1?v.value:void 0,[`btn-${o.size}`],{[`btn-${o.variant}`]:o.variant!==null&&m.value===!1,active:o.active||s.value,"rounded-pill":o.pill,"rounded-0":o.squared,disabled:o.disabled}]),x=k(()=>d.value?sy:o.href?"a":o.tag),_=S=>{if(o.disabled){S.preventDefault(),S.stopPropagation();return}r("click",S),c.value&&(s.value=!s.value)};return vs([" ","enter"],S=>{var E;o.href==="#"&&(S.preventDefault(),(E=i.value)==null||E.click())},{target:i}),(S,E)=>(w(),Q(Gt(x.value),Ct({ref:"_element",class:"btn"},h.value,{class:y.value,"aria-disabled":g.value,"aria-pressed":c.value?s.value:null,autocomplete:c.value?"off":null,disabled:u.value?p(o).disabled:null,href:p(o).href,rel:p(a)?p(o).rel:null,role:f.value||p(a)?"button":null,target:p(a)?p(o).target:null,type:u.value?p(o).type:null,to:u.value?null:p(o).to,onClick:_}),{default:J(()=>[p(o).loading?Ce(S.$slots,"loading",{key:0},()=>[p(o).loadingFill?re("",!0):(w(),N(Re,{key:0},[Ue(ye(p(o).loadingText),1)],64)),Ce(S.$slots,"loading-spinner",{},()=>[H(O7,{small:p(o).size!=="lg",label:p(o).loadingFill?p(o).loadingText:void 0},null,8,["small","label"])])]):Ce(S.$slots,"default",{key:1})]),_:3},16,["class","aria-disabled","aria-pressed","autocomplete","disabled","href","rel","role","target","type","to"]))}}),J0=se({name:"ConditionalWrapper",inheritAttrs:!1,slots:Object,props:{tag:{type:String,default:"div"},skip:{type:Boolean,required:!0}},setup(t,{slots:e,attrs:n}){return()=>{var o,r;return t.skip?(o=e.default)==null?void 0:o.call(e,{}):Rt(t.tag,{...n},[(r=e.default)==null?void 0:r.call(e,{})])}}}),ay=se({__name:"BBadge",props:{dotIndicator:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},placement:{default:void 0},tag:{default:"span"},active:{type:Boolean,default:void 0},activeClass:{default:void 0},disabled:{type:Boolean,default:void 0},exactActiveClass:{default:void 0},href:{default:void 0},icon:{type:Boolean,default:void 0},noRel:{type:Boolean},opacity:{default:void 0},opacityHover:{default:void 0},prefetch:{type:Boolean},prefetchOn:{},noPrefetch:{type:Boolean},prefetchedClass:{},rel:{default:void 0},replace:{type:Boolean,default:void 0},routerComponentName:{default:void 0},stretched:{type:Boolean,default:!1},target:{default:void 0},to:{default:void 0},underlineOffset:{default:void 0},underlineOffsetHover:{default:void 0},underlineOpacity:{default:void 0},underlineOpacityHover:{default:void 0},underlineVariant:{default:void 0},variant:{default:"secondary"},bgVariant:{default:null},textVariant:{default:null}},setup(t){const n=zt(t,"BBadge"),{computedLink:o,computedLinkProps:r}=iy(n,["active","activeClass","append","disabled","href","rel","replace","routerComponentName","target","to","opacity","opacityHover","underlineVariant","underlineOffset","underlineOffsetHover","underlineOpacity","underlineOpacityHover","icon"]),i=k(()=>o.value?sy:n.tag),s=k(()=>{const c=n.placement??(n.dotIndicator?"top-end":void 0);return["position-absolute","translate-middle",{"start-0 top-0":c==="top-start","start-0 top-50":c==="start","start-0 top-100":c==="bottom-start","start-50 top-0":c==="top","start-50 top-100":c==="bottom","start-100 top-0":c==="top-end","start-100 top-50":c==="end","start-100 top-100":c==="bottom-end"}]}),a=Ms(n),l=k(()=>[a.value,n.placement!==void 0||n.dotIndicator===!0?s.value:void 0,{active:n.active,disabled:n.disabled,"rounded-pill":n.pill,"p-2 border border-light rounded-circle":n.dotIndicator,"text-decoration-none":o.value}]);return(c,u)=>(w(),Q(Gt(i.value),Ct({class:["badge",l.value]},p(r)),{default:J(()=>[H(J0,Ct({skip:p(n).dotIndicator!==!0,tag:"span"},p(n).dotIndicator?{class:"visually-hidden"}:{}),{default:J(()=>[Ce(c.$slots,"default")]),_:3},16,["skip"])]),_:3},16,["class"]))}}),E7=(t,e="px")=>k(()=>{const n=bt(t),o=bt(e);return SP.test(String(n))?`${Number(n)}${o}`:n}),I7=se({__name:"BButtonGroup",props:{ariaLabel:{default:"Group"},size:{default:"md"},tag:{default:"div"},vertical:{type:Boolean,default:!1}},setup(t){Ui($3,!0);const n=zt(t,"BButtonGroup"),o=k(()=>({"btn-group":!n.vertical,[`btn-group-${n.size}`]:n.size!=="md","btn-group-vertical":n.vertical}));return(r,i)=>(w(),Q(Gt(p(n).tag),{class:$e(o.value),role:"group","aria-label":p(n).ariaLabel},{default:J(()=>[Ce(r.$slots,"default")]),_:3},8,["class","aria-label"]))}}),Tg=(t,e,n,o=n)=>e.reduce((r,i)=>(t[i]&&r.push([o,i.replace(n,""),t[i]].filter(s=>s&&typeof s!="boolean").join("-").toLowerCase()),r),[]),Ow=se({__name:"BCol",props:{alignSelf:{default:void 0},tag:{default:"div"},order:{default:void 0},offset:{default:void 0},cols:{default:void 0},col:{type:Boolean,default:!1},offsetSm:{default:void 0},offsetMd:{default:void 0},offsetLg:{default:void 0},offsetXl:{default:void 0},offsetXxl:{default:void 0},orderSm:{default:void 0},orderMd:{default:void 0},orderLg:{default:void 0},orderXl:{default:void 0},orderXxl:{default:void 0},sm:{type:[Boolean,Number,String],default:!1},md:{type:[Boolean,Number,String],default:!1},lg:{type:[Boolean,Number,String],default:!1},xl:{type:[Boolean,Number,String],default:!1},xxl:{type:[Boolean,Number,String],default:!1}},setup(t){const n=zt(t,"BCol"),o=k(()=>[...Tg({sm:n.sm,md:n.md,lg:n.lg,xl:n.xl,xxl:n.xxl},["sm","md","lg","xl","xxl"],"col"),...Tg({order:n.order,orderLg:n.orderLg,orderMd:n.orderMd,orderSm:n.orderSm,orderXl:n.orderXl,orderXxl:n.orderXxl},["order","orderLg","orderMd","orderSm","orderXl","orderXxl"],"order"),...Tg({offset:n.offset,offsetLg:n.offsetLg,offsetMd:n.offsetMd,offsetSm:n.offsetSm,offsetXl:n.offsetXl,offsetXxl:n.offsetXxl},["offset","offsetLg","offsetMd","offsetSm","offsetXl","offsetXxl"],"offset")]),r=k(()=>[o.value,{col:n.col||!o.value.some(i=>i.startsWith("col-"))&&!n.cols,[`col-${n.cols}`]:n.cols!==void 0,[`offset-${n.offset}`]:n.offset!==void 0,[`order-${n.order}`]:n.order!==void 0,[`align-self-${n.alignSelf}`]:n.alignSelf!==void 0}]);return(i,s)=>(w(),Q(Gt(p(n).tag),{class:$e(r.value)},{default:J(()=>[Ce(i.$slots,"default")]),_:3},8,["class"]))}}),N7={class:"visually-hidden"},R7=["id","aria-labelledby","role"],F7=se({__name:"BDropdown",props:nt({ariaLabel:{default:void 0},autoClose:{type:[Boolean,String],default:!0},boundary:{default:"clippingAncestors"},boundaryPadding:{default:void 0},disabled:{type:Boolean,default:!1},floatingMiddleware:{default:void 0},id:{default:void 0},isNav:{type:Boolean,default:!1},menuClass:{default:void 0},noCaret:{type:Boolean,default:!1},noFlip:{type:Boolean,default:!1},noShift:{type:Boolean,default:!1},noSize:{type:Boolean,default:!1},offset:{default:0},role:{default:"menu"},size:{default:"md"},noWrapper:{type:Boolean,default:!1},split:{type:Boolean,default:!1},splitButtonType:{default:"button"},splitClass:{default:void 0},splitDisabled:{type:Boolean,default:void 0},splitHref:{default:void 0},splitTo:{default:void 0},splitVariant:{default:void 0},strategy:{default:"absolute"},text:{default:void 0},toggleClass:{default:void 0},toggleText:{default:"Toggle dropdown"},variant:{default:"secondary"},wrapperClass:{default:void 0},placement:{default:"bottom-start"},teleportDisabled:{type:Boolean,default:!1},teleportTo:{default:void 0},initialAnimation:{type:Boolean,default:!1},noAnimation:{type:Boolean},noFade:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},unmountLazy:{type:Boolean,default:!1},show:{type:Boolean,default:!1},transProps:{default:void 0},visible:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:nt(["split-click","hide","hide-prevented","hidden","show","show-prevented","shown","toggle","toggle-prevented"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const r=zt(t,"BDropdown"),i=n,s=ko(()=>r.id,"dropdown"),a=ft(t,"modelValue"),l=en(GL,!1),c=en($3,!1),u=k(()=>typeof r.offset=="string"||typeof r.offset=="number"?r.offset:NaN),d=Cl(u),f=pt("_floating"),h=pt("_button"),g=pt("_splitButton"),b=k(()=>ry(r.boundary)?r.boundary:void 0),m=k(()=>t4(r.boundary)?r.boundary:void 0),v=k(()=>r.split?h.value:g.value),{showRef:y,renderRef:x,hide:_,show:S,toggle:E,computedNoAnimation:M,transitionProps:C,contentShowing:O,isVisible:P}=j0(a,r,i,v,s),R=k(()=>[{show:P.value,fade:!M.value}]);vs("Escape",()=>{var he;_(),(he=dp(v.value))==null||he.focus()},{target:v}),vs("Escape",()=>{var he;_(),(he=dp(v.value))==null||he.focus()},{target:f});const $=(he,ce)=>{var de,_e,j,te,ne,me,ve;if((_e=f.value)!=null&&_e.contains((de=he.target)==null?void 0:de.closest("form"))||/input|select|option|textarea|form/i.test((j=he.target)==null?void 0:j.tagName))return;if(he.preventDefault(),!y.value){S();const W=setInterval(()=>{P.value&&(clearInterval(W),wn(()=>$(he,ce)))},16);return}const I=(te=f.value)==null?void 0:te.querySelectorAll(".dropdown-item:not(.disabled):not(:disabled)");if(I)if((ne=f.value)!=null&&ne.contains(document.activeElement)){const W=f.value.querySelector(".dropdown-item:focus"),X=Array.prototype.indexOf.call(I,W)+ce;X>=0&&X<(I==null?void 0:I.length)&&((me=I[X])==null||me.focus())}else(ve=I[ce===-1?I.length-1:0])==null||ve.focus()};vs("ArrowUp",he=>$(he,-1),{target:v}),vs("ArrowDown",he=>$(he,1),{target:v}),vs("ArrowUp",he=>$(he,-1),{target:f}),vs("ArrowDown",he=>$(he,1),{target:f});const A=Ie({}),L=k(()=>{if(r.floatingMiddleware!==void 0)return r.floatingMiddleware;const he=typeof r.offset=="string"||typeof r.offset=="number"?d.value:r.offset,ce=[j3(he)];return r.noFlip===!1&&ce.push(K3({boundary:b.value,rootBoundary:m.value,padding:r.boundaryPadding})),r.noShift===!1&&ce.push(X3({boundary:b.value,rootBoundary:m.value,padding:r.boundaryPadding})),r.noSize===!1&&ce.push(Z3({boundary:b.value,rootBoundary:m.value,padding:r.boundaryPadding,apply({availableWidth:de,availableHeight:_e}){var j,te;A.value={maxHeight:_e>=(((j=f.value)==null?void 0:j.scrollHeight)??0)?void 0:_e?`${Math.max(0,_e)}px`:void 0,maxWidth:de>=(((te=f.value)==null?void 0:te.scrollWidth)??0)?void 0:de?`${Math.max(0,de)}px`:void 0}}})),ce}),{update:B,floatingStyles:F}=J3(v,f,{placement:()=>r.placement,middleware:L,strategy:Vt(()=>r.strategy),whileElementsMounted:Y3}),z=c?{class:"btn-group",role:"group"}:void 0,V=k(()=>[z==null?void 0:z.class,r.wrapperClass,{"btn-group":!r.wrapperClass&&r.split,[`drop${k7(r.placement)}`]:!r.wrapperClass,"position-static":r.boundary!=="clippingAncestors"&&!r.isNav}]),U=k(()=>[r.split?r.splitClass:r.toggleClass,{"nav-link":r.isNav,"dropdown-toggle":!r.split,"dropdown-toggle-no-caret":r.noCaret&&!r.split,show:r.split?void 0:y.value}]),ie=()=>{E()},ue=he=>{if(r.split){i("split-click",he);return}ie()};L3(f,()=>{y.value&&(r.autoClose===!0||r.autoClose==="outside")&&_()},{ignore:[h,g]});const fe=()=>{y.value&&(r.autoClose===!0||r.autoClose==="inside")&&_()};return Ve(P,()=>{B()}),e({hide:_,show:S,toggle:E}),Ui(k3,{id:s,show:S,hide:_,toggle:E,visible:Vt(()=>y.value),isNav:Vt(()=>r.isNav)}),(he,ce)=>{var de;return w(),Q(J0,{skip:p(l)||p(r).noWrapper,class:$e(V.value),role:(de=p(z))==null?void 0:de.role},{default:J(()=>[H(Uo,{id:p(s),ref:"_splitButton",variant:p(r).splitVariant||p(r).variant,size:p(r).size,class:$e(U.value),disabled:p(r).splitDisabled||p(r).disabled,type:p(r).splitButtonType,"aria-label":p(r).ariaLabel,"aria-expanded":p(r).split?void 0:p(y),"aria-haspopup":p(r).split?void 0:"menu",href:p(r).split?p(r).splitHref:void 0,to:p(r).split&&p(r).splitTo?p(r).splitTo:void 0,onClick:ue},{default:J(()=>[Ce(he.$slots,"button-content",{},()=>[Ue(ye(p(r).text),1)],!0)]),_:3},8,["id","variant","size","class","disabled","type","aria-label","aria-expanded","aria-haspopup","href","to"]),p(r).split?(w(),Q(Uo,{key:0,id:p(s)+"-split",ref:"_button",variant:p(r).variant,size:p(r).size,disabled:p(r).disabled,class:$e([[p(r).toggleClass,{show:p(y)}],"dropdown-toggle-split dropdown-toggle"]),"aria-expanded":p(y),"aria-haspopup":"menu",onClick:ie},{default:J(()=>[T("span",N7,[Ce(he.$slots,"toggle-text",{},()=>[Ue(ye(p(r).toggleText),1)],!0)])]),_:3},8,["id","variant","size","disabled","class","aria-expanded"])):re("",!0),H(Y0,{to:p(r).teleportTo,disabled:!p(r).teleportTo||p(r).teleportDisabled},{default:J(()=>[p(x)||p(O)?(w(),Q(kl,Ct({key:0},p(C),{appear:a.value||p(r).visible}),{default:J(()=>[sr(T("ul",{id:p(s)+"-menu",ref:"_floating",style:Pt([p(F),A.value]),class:$e(["dropdown-menu overflow-auto",[p(r).menuClass,R.value]]),"aria-labelledby":p(s),role:p(r).role,onClick:fe},[p(O)?Ce(he.$slots,"default",{key:0,hide:p(_),show:p(S),visible:p(y)},void 0,!0):re("",!0)],14,R7),[[Ic,p(y)]])]),_:3},16,["appear"])):re("",!0)]),_:3},8,["to","disabled"])]),_:3},8,["skip","class","role"])}}}),ly=X0(F7,[["__scopeId","data-v-8ac2524d"]]),V7=se({inheritAttrs:!1,__name:"BDropdownItem",props:{linkClass:{default:void 0},wrapperAttrs:{default:void 0},active:{type:Boolean,default:void 0},activeClass:{default:void 0},disabled:{type:Boolean,default:void 0},exactActiveClass:{default:void 0},href:{default:void 0},icon:{type:Boolean,default:void 0},noRel:{type:Boolean},opacity:{default:void 0},opacityHover:{default:void 0},prefetch:{type:Boolean},prefetchOn:{},noPrefetch:{type:Boolean},prefetchedClass:{},rel:{default:void 0},replace:{type:Boolean,default:void 0},routerComponentName:{default:void 0},stretched:{type:Boolean,default:!1},target:{default:void 0},to:{default:void 0},underlineOffset:{default:void 0},underlineOffsetHover:{default:void 0},underlineOpacity:{default:void 0},underlineOpacityHover:{default:void 0},underlineVariant:{default:void 0},variant:{default:null}},emits:["click"],setup(t,{emit:e}){const o=zt(t,"BDropdownItem"),r=e,i=H0(),s=k(()=>{const{class:m,...v}=i;return{wrapperClass:m,dropdownItemAttrs:v}}),{computedLink:a,computedLinkProps:l}=iy(o),c=Ms(k(()=>({textVariant:o.variant}))),u=k(()=>[o.linkClass,c.value,{active:o.active,disabled:o.disabled}]),d=k(()=>a.value?sy:o.href?"a":"button"),f=en(_3,null),h=en(k3,null),g=en(C3,null),b=m=>{var v,y,x;r("click",m),g!==null&&((v=g==null?void 0:g.autoClose)==null?void 0:v.value)===!0&&((y=f==null?void 0:f.hide)==null||y.call(f)),(x=h==null?void 0:h.hide)==null||x.call(h)};return(m,v)=>(w(),N("li",Ct({role:"presentation",class:s.value.wrapperClass},p(o).wrapperAttrs),[(w(),Q(Gt(d.value),Ct({class:["dropdown-item",u.value],disabled:p(o).disabled,"aria-disabled":p(o).disabled?!0:null,"aria-current":p(o).active?!0:null,href:d.value==="a"?p(o).href:null,rel:p(o).rel,role:"menuitem",type:d.value==="button"?"button":null,target:p(o).target},{...p(l),...s.value.dropdownItemAttrs},{onClick:b}),{default:J(()=>[Ce(m.$slots,"default")]),_:3},16,["class","disabled","aria-disabled","aria-current","href","rel","type","target"]))],16))}}),z7=["disabled"],i4=se({inheritAttrs:!1,__name:"BDropdownItemButton",props:{active:{type:Boolean,default:!1},activeClass:{default:"active"},buttonClass:{default:void 0},wrapperAttrs:{default:void 0},disabled:{type:Boolean,default:!1},variant:{default:null}},emits:["click"],setup(t,{emit:e}){const o=zt(t,"BDropdownItemButton"),r=e,i=H0(),s=k(()=>{const{class:u,...d}=i;return{wrapperClass:u,buttonAttrs:d}}),a=Ms(k(()=>({textVariant:o.variant}))),l=k(()=>[o.buttonClass,a.value,{[o.activeClass]:o.active,disabled:o.disabled}]),c=u=>{if(o.disabled){u.preventDefault(),u.stopPropagation();return}r("click",u)};return(u,d)=>(w(),N("li",Ct({role:"presentation",class:s.value.wrapperClass},p(o).wrapperAttrs),[T("button",Ct({role:"menu",type:"button",class:["dropdown-item",l.value],disabled:p(o).disabled},s.value.buttonAttrs,{onClick:c}),[Ce(u.$slots,"default")],16,z7)],16))}}),H7=["value","disabled"],s4=se({__name:"BFormSelectOption",props:{disabled:{type:Boolean,default:!1},value:{default:void 0}},setup(t){const n=zt(t,"BFormSelectOption");return(o,r)=>(w(),N("option",{value:p(n).value,disabled:p(n).disabled},[Ce(o.$slots,"default")],8,H7))}}),a4=(t,e)=>{const n=s=>typeof s=="object"&&s!==null&&"label"in s,o=s=>{const a=bt(e);if(typeof s=="string")return{value:s,text:s};if(typeof s=="number")return{value:s,text:`${s}`};if(s instanceof Date)return{value:s,text:s.toLocaleString()};const l=Lu(s,a.valueField),c=Lu(s,a.textField),u=Lu(s,a.disabledField),d=a.optionsField?Lu(s,a.optionsField):void 0;return d!==void 0?{label:Lu(s,a.labelField)||c,options:d}:{...typeof s=="object"?s:void 0,value:l,text:c,disabled:u}},r=s=>s.map(a=>o(a));return{normalizedOptions:k(()=>r(bt(t))),isComplex:n}},W7=se({__name:"BFormInvalidFeedback",props:{ariaLive:{default:void 0},forceShow:{type:Boolean,default:!1},id:{default:void 0},role:{default:void 0},state:{type:[Boolean,null],default:null},tag:{default:"div"},text:{default:void 0},tooltip:{type:Boolean,default:!1}},setup(t){const n=zt(t,"BFormInvalidFeedback"),o=k(()=>n.forceShow===!0||n.state===!1),r=k(()=>({"d-block":o.value,"invalid-feedback":!n.tooltip,"invalid-tooltip":n.tooltip}));return(i,s)=>(w(),Q(Gt(p(n).tag),{id:p(n).id,role:p(n).role,"aria-live":p(n).ariaLive,"aria-atomic":p(n).ariaLive?!0:void 0,class:$e(r.value)},{default:J(()=>[Ce(i.$slots,"default",{},()=>[Ue(ye(p(n).text),1)])]),_:3},8,["id","role","aria-live","aria-atomic","class"]))}}),U7=se({__name:"BFormRow",props:{tag:{default:"div"}},setup(t){const n=zt(t,"BFormRow");return(o,r)=>(w(),Q(Gt(p(n).tag),{class:"row d-flex flex-wrap"},{default:J(()=>[Ce(o.$slots,"default")]),_:3}))}}),G7=se({__name:"BFormText",props:{id:{default:void 0},inline:{type:Boolean,default:!1},tag:{default:"small"},text:{default:void 0},textVariant:{default:"body-secondary"}},setup(t){const n=zt(t,"BFormText"),o=Ms(n),r=k(()=>[o.value,{"form-text":!n.inline}]);return(i,s)=>(w(),Q(Gt(p(n).tag),{id:p(n).id,class:$e(r.value)},{default:J(()=>[Ce(i.$slots,"default",{},()=>[Ue(ye(p(n).text),1)])]),_:3},8,["id","class"]))}}),q7=se({__name:"BFormValidFeedback",props:{ariaLive:{default:void 0},forceShow:{type:Boolean,default:!1},id:{default:void 0},role:{default:void 0},state:{type:[Boolean,null],default:null},tag:{default:"div"},text:{default:void 0},tooltip:{type:Boolean,default:!1}},setup(t){const n=zt(t,"BFormInvalidFeedback"),o=k(()=>n.forceShow===!0||n.state===!0),r=k(()=>({"d-block":o.value,"valid-feedback":!n.tooltip,"valid-tooltip":n.tooltip}));return(i,s)=>(w(),Q(Gt(p(n).tag),{id:p(n).id,role:p(n).role,"aria-live":p(n).ariaLive,"aria-atomic":p(n).ariaLive?!0:void 0,class:$e(r.value)},{default:J(()=>[Ce(i.$slots,"default",{},()=>[Ue(ye(p(n).text),1)])]),_:3},8,["id","role","aria-live","aria-atomic","class"]))}}),em=(t,e)=>k(()=>{const n=bt(t),o=bt(e);return n===!0?"true":typeof n=="string"?n:o===!1?"true":n===!1?"false":void 0}),tm=t=>k(()=>{const e=bt(t);return e===!0?"is-valid":e===!1?"is-invalid":null}),l4=t=>k(()=>{const e=bt(t);return{"form-check":e.plain===!1&&e.button===!1&&e.hasDefaultSlot,"form-check-reverse":e.reverse===!0,"form-check-inline":e.inline===!0,"form-switch":e.switch===!0,[`form-control-${e.size}`]:e.size!==void 0&&e.size!=="md"&&e.button===!1}}),c4=t=>{const e=io(Vt(t)),n=tm(()=>e.value.state??null);return k(()=>[n.value,{"form-check-input":e.value.plain===!1&&e.value.button===!1,"btn-check":e.value.button===!0}])},u4=t=>k(()=>{const e=bt(t);return{"form-check-label":e.plain===!1&&e.button===!1,btn:e.button===!0,[`btn-${e.buttonVariant}`]:e.button===!0&&e.buttonVariant!==void 0&&e.buttonVariant!==null,[`btn-${e.size}`]:e.button&&e.size&&e.size!=="md"}}),Y7=t=>{const e=io(Vt(t)),n=em(()=>e.value.ariaInvalid,()=>e.value.state);return k(()=>({"aria-invalid":n.value,"aria-required":e.value.required===!0?!0:void 0}))},j7=t=>k(()=>{const e=bt(t);return{"was-validated":e.validated===!0,"btn-group":e.buttons===!0&&e.stacked===!1,"btn-group-vertical":e.stacked===!0&&e.buttons===!0,[`btn-group-${e.size}`]:e.size!==void 0}}),X7=["id","disabled","required","name","form","aria-label","aria-labelledby","aria-required","value","true-value","false-value","indeterminate"],K7=["for"],Os=se({inheritAttrs:!1,__name:"BFormCheckbox",props:nt({ariaLabel:{default:void 0},ariaLabelledby:{default:void 0},autofocus:{type:Boolean,default:!1},button:{type:Boolean,default:!1},buttonGroup:{type:Boolean,default:!1},buttonVariant:{default:null},disabled:{type:Boolean,default:!1},form:{default:void 0},id:{default:void 0},inline:{type:Boolean,default:!1},name:{default:void 0},plain:{type:Boolean,default:!1},required:{type:Boolean,default:void 0},reverse:{type:Boolean,default:!1},size:{default:void 0},state:{type:[Boolean,null],default:null},switch:{type:Boolean,default:!1},uncheckedValue:{type:[Array,Set,String,Boolean,Object,Number,null],default:!1},wrapperAttrs:{default:void 0},inputClass:{default:void 0},value:{type:[String,Boolean,Array,Set,Object,Number,null],default:!0}},{modelValue:{type:[Array,Set,String,Boolean,Object,Number,null],default:void 0},modelModifiers:{},indeterminate:{type:Boolean,default:!1},indeterminateModifiers:{}}),emits:["update:modelValue","update:indeterminate"],setup(t,{expose:e}){const n=H0(),o=k(()=>{const{class:M,...C}=n;return{wrapperClass:M,inputAttrs:C}}),i=zt(t,"BFormCheckbox"),s=ns(),a=ft(t,"modelValue"),l=ft(t,"indeterminate"),c=ko(()=>i.id,"form-check"),u=en(HL,null),d=pt("_input"),{focused:f}=Fi(d,{initialValue:i.autofocus}),h=k(()=>!zc(s.default)),g=k({get:()=>u?u.modelValue.value:a.value,set:M=>{if(M!==void 0){if(l.value=!1,u!==null&&Array.isArray(M)){u.modelValue.value=M;return}a.value=M}}}),b=k(()=>!!(i.name??(u==null?void 0:u.name.value))&&(i.required||(u==null?void 0:u.required.value))),m=k(()=>i.buttonGroup||((u==null?void 0:u.buttons.value)??!1)),v=k(()=>({plain:i.plain||((u==null?void 0:u.plain.value)??!1),button:i.button||((u==null?void 0:u.buttons.value)??!1),inline:i.inline||((u==null?void 0:u.inline.value)??!1),reverse:i.reverse||((u==null?void 0:u.reverse.value)??!1),switch:i.switch||((u==null?void 0:u.switch.value)??!1),state:i.state===!0||i.state===!1?i.state:(u==null?void 0:u.state.value)??null,size:i.size??(u==null?void 0:u.size.value)??"md",buttonVariant:i.buttonVariant??(u==null?void 0:u.buttonVariant.value)??"secondary",hasDefaultSlot:h.value})),y=l4(v),x=k(()=>[y.value,o.value.wrapperClass]),_=c4(v),S=k(()=>[_.value,i.inputClass]),E=u4(v);return e({blur:()=>{f.value=!1},element:d,focus:()=>{f.value=!0}}),(M,C)=>(w(),Q(J0,Ct({skip:m.value},p(i).wrapperAttrs,{class:x.value}),{default:J(()=>{var O,P,R;return[sr(T("input",Ct({id:p(c),ref:"_input","onUpdate:modelValue":C[0]||(C[0]=$=>g.value=$),class:S.value,type:"checkbox",disabled:p(i).disabled||((O=p(u))==null?void 0:O.disabled.value),required:b.value||void 0,name:p(i).name||((P=p(u))==null?void 0:P.name.value),form:p(i).form||((R=p(u))==null?void 0:R.form.value),"aria-label":p(i).ariaLabel,"aria-labelledby":p(i).ariaLabelledby,"aria-required":b.value||void 0,value:p(i).value,"true-value":p(i).value,"false-value":p(i).uncheckedValue,indeterminate:l.value||void 0},o.value.inputAttrs),null,16,X7),[[f3,g.value]]),h.value||p(i).plain===!1?(w(),N("label",{key:0,for:p(c),class:$e(p(E))},[Ce(M.$slots,"default")],10,K7)):re("",!0)]}),_:3},16,["skip","class"]))}}),Bw=(t,e)=>e+(t?B7(t):""),Z7={key:0,ref:"_content",class:"form-floating"},On=se({__name:"BFormGroup",props:{contentCols:{type:[Boolean,String,Number],default:void 0},labelCols:{type:[Boolean,String,Number],default:void 0},labelAlign:{default:void 0},ariaInvalid:{type:[Boolean,String],default:void 0},description:{default:void 0},disabled:{type:Boolean,default:!1},feedbackAriaLive:{default:"assertive"},floating:{type:Boolean,default:!1},id:{default:void 0},invalidFeedback:{default:void 0},label:{default:void 0},labelClass:{default:void 0},labelFor:{default:void 0},labelSize:{default:void 0},labelVisuallyHidden:{type:Boolean,default:!1},state:{type:[Boolean,null],default:null},tooltip:{type:Boolean,default:!1},validFeedback:{default:void 0},validated:{type:Boolean,default:!1},contentColsSm:{type:[Boolean,String,Number],default:void 0},contentColsMd:{type:[Boolean,String,Number],default:void 0},contentColsLg:{type:[Boolean,String,Number],default:void 0},contentColsXl:{type:[Boolean,String,Number],default:void 0},labelColsSm:{type:[Boolean,String,Number],default:void 0},labelColsMd:{type:[Boolean,String,Number],default:void 0},labelColsLg:{type:[Boolean,String,Number],default:void 0},labelColsXl:{type:[Boolean,String,Number],default:void 0},labelAlignSm:{default:void 0},labelAlignMd:{default:void 0},labelAlignLg:{default:void 0},labelAlignXl:{default:void 0}},setup(t){const e=["input","select","textarea"],o=zt(t,"BFormGroup"),r=ns(),i=gw(),s=gw(),a=Vt(()=>o.state),l=Ie([]);Ui(T3,$=>(l.value=[$],{state:a}));const c=k(()=>o.labelFor!==void 0?o.labelFor:l.value[0]&&l.value[0].value?l.value[0].value:null),u=["xs","sm","md","lg","xl"],d=($,A)=>u.reduce((L,B)=>{const F=Bw(B==="xs"?"":B,`${A}Cols`);let z=$[F];if(z=z===""?!0:z||!1,typeof z!="boolean"&&z!=="auto"){const V=Number.parseInt(z);z=Number.isNaN(V)?0:V,z=z>0?z:!1}return z&&(B==="xs"?L[typeof z=="boolean"?"col":"cols"]=z:L[B||(typeof z=="boolean"?"col":"cols")]=z),L},{}),f=pt("_content"),h=k(()=>d(o,"content")),g=k(()=>(($,A)=>u.reduce((L,B)=>{const F=Bw(B==="xs"?"":B,`${A}Align`),z=$[F]||null;return z&&(B==="xs"?L.push(`text-${z}`):L.push(`text-${B}-${z}`)),L},[]))(o,"label")),b=k(()=>d(o,"label")),m=k(()=>Object.keys(h.value).length>0||Object.keys(b.value).length>0),v=tm(a),y=em(()=>o.ariaInvalid,a),x=$=>{if(c.value||f.value===null)return;const{target:A}=$,L=A?A.tagName:"";if([...e,"a","button","label"].indexOf(L)!==-1)return;const B=[...f.value.querySelectorAll(e.map(z=>`${z}:not([disabled])`).join())].filter(o4),[F]=B;B.length===1&&F instanceof HTMLElement&&T7(F)},_=ko(()=>o.id),S=ko(void 0,"_BV_label_"),E=k(()=>c.value?"label":"legend"),M=k(()=>[m.value?"col-form-label":"form-label",{"bv-no-focus-ring":!c.value,"col-form-label":m.value||!c.value,"pt-0":!m.value&&!c.value,"d-block":!m.value&&c.value,[`col-form-label-${o.labelSize}`]:!!o.labelSize,"visually-hidden":o.labelVisuallyHidden},g.value,o.labelClass]),C=ko(void 0,"_BV_feedback_invalid_"),O=ko(void 0,"_BV_feedback_valid_"),P=ko(void 0,"_BV_description_"),R=k(()=>!c.value);return($,A)=>(w(),Q(Gt(R.value?"fieldset":"div"),{id:p(_),disabled:R.value?p(o).disabled:null,role:R.value?null:"group","aria-invalid":p(y),"aria-labelledby":R.value&&m.value?p(S):null,class:$e([[p(v),{"was-validated":p(o).validated}],"b-form-group"])},{default:J(()=>[H(p(s).define,null,{default:J(()=>[r["invalid-feedback"]||p(o).invalidFeedback?(w(),Q(W7,{key:0,id:p(C),"aria-live":p(o).feedbackAriaLive,state:a.value,tooltip:p(o).tooltip},{default:J(()=>[Ce($.$slots,"invalid-feedback",{},()=>[Ue(ye(p(o).invalidFeedback),1)])]),_:3},8,["id","aria-live","state","tooltip"])):re("",!0),r["valid-feedback"]||p(o).validFeedback?(w(),Q(q7,{key:1,id:p(O),"aria-live":p(o).feedbackAriaLive,state:a.value,tooltip:p(o).tooltip},{default:J(()=>[Ce($.$slots,"valid-feedback",{},()=>[Ue(ye(p(o).validFeedback),1)])]),_:3},8,["id","aria-live","state","tooltip"])):re("",!0),r.description||p(o).description?(w(),Q(G7,{key:2,id:p(P)},{default:J(()=>[Ce($.$slots,"description",{},()=>[Ue(ye(p(o).description),1)])]),_:3},8,["id"])):re("",!0)]),_:3}),H(p(i).define,null,{default:J(()=>[r.label||p(o).label||m.value?(w(),N(Re,{key:0},[m.value?(w(),Q(Ow,Vn(Ct({key:0},b.value)),{default:J(()=>[(w(),Q(Gt(E.value),{id:p(S),for:c.value||null,tabindex:R.value?"-1":null,class:$e(M.value),onClick:A[0]||(A[0]=L=>R.value?x:null)},{default:J(()=>[Ce($.$slots,"label",{},()=>[Ue(ye(p(o).label),1)])]),_:3},8,["id","for","tabindex","class"]))]),_:3},16)):(w(),Q(Gt(E.value),{key:1,id:p(S),for:c.value||null,tabindex:R.value?"-1":null,class:$e(M.value),onClick:A[1]||(A[1]=L=>R.value?x:null)},{default:J(()=>[Ce($.$slots,"label",{},()=>[Ue(ye(p(o).label),1)])]),_:3},8,["id","for","tabindex","class"]))],64)):re("",!0)]),_:3}),m.value?(w(),Q(U7,{key:0},{default:J(()=>[H(p(i).reuse),H(Ow,Ct(h.value,{ref:"_content"}),{default:J(()=>[Ce($.$slots,"default",{id:p(_),ariaDescribedby:null,descriptionId:p(P),labelId:p(S)}),H(p(s).reuse)]),_:3},16)]),_:3})):(w(),N(Re,{key:1},[p(o).floating&&!m.value?(w(),N("div",Z7,[Ce($.$slots,"default",{id:p(_),ariaDescribedby:null,descriptionId:p(P),labelId:p(S)}),H(p(i).reuse),H(p(s).reuse)],512)):(w(),N(Re,{key:1},[H(p(i).reuse),Ce($.$slots,"default",{id:p(_),ariaDescribedby:null,descriptionId:p(P),labelId:p(S)}),H(p(s).reuse)],64))],64))]),_:3},8,["id","disabled","role","aria-invalid","aria-labelledby","class"]))}}),d4=(t,e)=>{if(t===null)return;let n=t;if(e.number&&typeof n=="string"&&n!==""){const o=Number.parseFloat(n);n=Number.isNaN(o)?n:o}return n},f4=(t,e,n,o)=>{var r;const i=Ie(0),s=ko(()=>t.id,"input"),a=Cl(()=>t.debounce??0),l=Cl(()=>t.debounceMaxWait??NaN),c=(r=en(T3,null))==null?void 0:r(s),u=k(()=>t.state!==void 0?t.state:(c==null?void 0:c.state.value)??null),d=em(()=>t.ariaInvalid,u),f=tm(u),h=aP(E=>{n.value=E},()=>o.lazy===!0?0:a.value,{maxWait:()=>o.lazy===!0?NaN:l.value}),g=(E,M=!1)=>{o.lazy===!0&&M===!1||h(E)},{focused:b}=Fi(e,{initialValue:t.autofocus}),m=(E,M,C=!1)=>t.formatter!==void 0&&(!t.lazyFormatter||C)?t.formatter(E,M):E;return hn(()=>{var E;e.value&&(e.value.value=((E=n.value)==null?void 0:E.toString())??"")}),Wb(()=>{wn(()=>{t.autofocus&&(b.value=!0)})}),{input:e,computedId:s,computedAriaInvalid:d,onInput:E=>{const{value:M}=E.target,C=m(M,E);if(E.defaultPrevented){E.preventDefault();return}g(C)},onChange:E=>{const{value:M}=E.target,C=m(M,E);if(E.defaultPrevented){E.preventDefault();return}const O=C;n.value!==O&&g(C,!0)},onBlur:E=>{if(!o.lazy&&!t.lazyFormatter&&!o.trim)return;const{value:M}=E.target,C=m(M,E,!0),O=o.trim?C.trim():C,P=O.length!==C.length;n.value!==O&&g(C,!0),o.trim&&P&&(i.value=i.value+1)},focus:()=>{t.disabled||(b.value=!0)},blur:()=>{t.disabled||(b.value=!1)},forceUpdateKey:i,stateClass:f}},Q7=["id","value","name","form","type","disabled","placeholder","required","autocomplete","readonly","min","max","step","list","aria-required","aria-invalid"],qs=se({__name:"BFormInput",props:nt({max:{default:void 0},min:{default:void 0},step:{default:void 0},type:{default:"text"},ariaInvalid:{type:[Boolean,String],default:void 0},autocomplete:{default:void 0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},form:{default:void 0},formatter:{type:Function,default:void 0},id:{default:void 0},lazyFormatter:{type:Boolean,default:!1},list:{default:void 0},name:{default:void 0},placeholder:{default:void 0},plaintext:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{default:void 0},state:{type:[Boolean,null],default:void 0},debounce:{default:0},debounceMaxWait:{default:NaN}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const o=zt(t,"BFormInput"),[r,i]=ft(t,"modelValue",{set:v=>d4(v,i)}),s=pt("_input"),{computedId:a,computedAriaInvalid:l,onInput:c,onChange:u,onBlur:d,stateClass:f,focus:h,blur:g,forceUpdateKey:b}=f4(o,s,r,i),m=k(()=>{const v=o.type==="range",y=o.type==="color";return[f.value,{"form-range":v,"form-control":y||!o.plaintext&&!v,"form-control-color":y,"form-control-plaintext":o.plaintext&&!v&&!y,[`form-control-${o.size}`]:!!o.size}]});return e({blur:g,element:s,focus:h}),(v,y)=>(w(),N("input",{id:p(a),ref:"_input",key:p(b),value:p(r),class:$e(m.value),name:p(o).name||void 0,form:p(o).form||void 0,type:p(o).type,disabled:p(o).disabled,placeholder:p(o).placeholder,required:p(o).required||void 0,autocomplete:p(o).autocomplete||void 0,readonly:p(o).readonly||p(o).plaintext,min:p(o).min,max:p(o).max,step:p(o).step,list:p(o).type!=="password"?p(o).list:void 0,"aria-required":p(o).required||void 0,"aria-invalid":p(l),onInput:y[0]||(y[0]=(...x)=>p(c)&&p(c)(...x)),onChange:y[1]||(y[1]=(...x)=>p(u)&&p(u)(...x)),onBlur:y[2]||(y[2]=(...x)=>p(d)&&p(d)(...x))},null,42,Q7))}}),J7=["id","disabled","required","name","form","aria-label","aria-labelledby","value","aria-required"],eD=["for"],tD=se({inheritAttrs:!1,__name:"BFormRadio",props:nt({ariaLabel:{default:void 0},ariaLabelledby:{default:void 0},autofocus:{type:Boolean,default:!1},button:{type:Boolean,default:!1},buttonGroup:{type:Boolean,default:!1},buttonVariant:{default:null},disabled:{type:Boolean,default:!1},form:{default:void 0},id:{default:void 0},inline:{type:Boolean,default:!1},name:{default:void 0},plain:{type:Boolean,default:!1},required:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},size:{default:void 0},state:{type:[Boolean,null],default:null},value:{type:[Boolean,String,Array,Object,Number,null],default:!0}},{modelValue:{type:[Boolean,String,Array,Object,Number,null],default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const o=zt(t,"BFormRadio"),r=ns(),i=ft(t,"modelValue"),s=ko(()=>o.id,"form-check"),a=en(w3,null),l=pt("_input"),{focused:c}=Fi(l,{initialValue:o.autofocus}),u=k(()=>!zc(r.default)),d=k({get:()=>a?a.modelValue.value:i.value,set:y=>{if(y!==void 0){if(a!==null){a.modelValue.value=y;return}i.value=y}}}),f=k(()=>!!(o.name??(a==null?void 0:a.name.value))&&(o.required||(a==null?void 0:a.required.value))),h=k(()=>o.buttonGroup||((a==null?void 0:a.buttons.value)??!1)),g=k(()=>({plain:o.plain||((a==null?void 0:a.plain.value)??!1),button:o.button||((a==null?void 0:a.buttons.value)??!1),inline:o.inline||((a==null?void 0:a.inline.value)??!1),state:o.state||(a==null?void 0:a.state.value),reverse:o.reverse||((a==null?void 0:a.reverse.value)??!1),size:o.size??(a==null?void 0:a.size.value)??"md",buttonVariant:o.buttonVariant??(a==null?void 0:a.buttonVariant.value)??"secondary",hasDefaultSlot:u.value})),b=l4(g),m=c4(g),v=u4(g);return e({blur:()=>{c.value=!1},element:l,focus:()=>{c.value=!0}}),(y,x)=>(w(),Q(J0,{skip:h.value,class:$e(p(b))},{default:J(()=>{var _,S,E;return[sr(T("input",Ct({id:p(s)},y.$attrs,{ref:"_input","onUpdate:modelValue":x[0]||(x[0]=M=>d.value=M),class:p(m),type:"radio",disabled:p(o).disabled||((_=p(a))==null?void 0:_.disabled.value),required:f.value||void 0,name:p(o).name||((S=p(a))==null?void 0:S.name.value),form:p(o).form||((E=p(a))==null?void 0:E.form.value),"aria-label":p(o).ariaLabel,"aria-labelledby":p(o).ariaLabelledby,value:p(o).value,"aria-required":f.value||void 0}),null,16,J7),[[wL,d.value]]),u.value||p(o).plain===!1?(w(),N("label",{key:0,for:p(s),class:$e(p(v))},[Ce(y.$slots,"default")],10,eD)):re("",!0)]}),_:3},8,["skip","class"]))}}),nD=["id"],oD=se({__name:"BFormRadioGroup",props:nt({ariaInvalid:{type:[Boolean,String],default:void 0},autofocus:{type:Boolean,default:!1},buttonVariant:{default:"secondary"},buttons:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledField:{default:"disabled"},form:{default:void 0},id:{default:void 0},name:{default:void 0},options:{default:()=>[]},plain:{type:Boolean,default:!1},required:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},size:{default:"md"},stacked:{type:Boolean,default:!1},state:{type:[Boolean,null],default:null},textField:{default:"text"},validated:{type:Boolean,default:!1},valueField:{default:"value"}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const o=zt(t,"BFormRadioGroup"),r=ft(t,"modelValue"),i=ko(()=>o.id,"radio"),s=ko(()=>o.name,"checkbox"),a=pt("_element"),{focused:l}=Fi(a,{initialValue:o.autofocus});Ui(w3,{modelValue:r,buttonVariant:Vt(()=>o.buttonVariant),form:Vt(()=>o.form),name:s,buttons:Vt(()=>o.buttons),state:Vt(()=>o.state),plain:Vt(()=>o.plain),size:Vt(()=>o.size),inline:Vt(()=>!o.stacked),reverse:Vt(()=>o.reverse),required:Vt(()=>o.required),disabled:Vt(()=>o.disabled)});const c=k(()=>o.options.map(h=>typeof h=="string"||typeof h=="number"?{value:h,disabled:o.disabled,text:h.toString()}:{value:h[o.valueField],disabled:h[o.disabledField],...h.props?h.props:void 0,text:h[o.textField]})),u=k(()=>({required:o.required,ariaInvalid:o.ariaInvalid,state:o.state,validated:o.validated,buttons:o.buttons,stacked:o.stacked,size:o.size})),d=Y7(u),f=j7(u);return e({blur:()=>{l.value=!1},focus:()=>{l.value=!0}}),(h,g)=>(w(),N("div",Ct(p(d),{id:p(i),ref:"_element",role:"radiogroup",class:[p(f),"bv-no-focus-ring"],tabindex:"-1"}),[Ce(h.$slots,"first"),(w(!0),N(Re,null,mt(c.value,(b,m)=>(w(),Q(tD,Ct({key:m,ref_for:!0},b),{default:J(()=>[Ce(h.$slots,"option",Ct({ref_for:!0},b),()=>[Ue(ye(b.text),1)])]),_:2},1040))),128)),Ce(h.$slots,"default")],16,nD))}}),rD=["label"],iD=se({__name:"BFormSelectOptionGroup",props:{disabledField:{default:"disabled"},label:{default:void 0},options:{default:()=>[]},textField:{default:"text"},valueField:{default:"value"}},setup(t){const n=zt(t,"BFormSelectOptionGroup"),{normalizedOptions:o}=a4(()=>n.options,n),r=k(()=>o.value);return(i,s)=>(w(),N("optgroup",{label:p(n).label},[Ce(i.$slots,"first"),(w(!0),N(Re,null,mt(r.value,(a,l)=>(w(),Q(s4,Ct({key:l,disabled:a.disabled,value:a.value,ref_for:!0},i.$attrs),{default:J(()=>[Ce(i.$slots,"option",Ct({ref_for:!0},a),()=>[Ue(ye(a.text),1)])]),_:2},1040,["disabled","value"]))),128)),Ce(i.$slots,"default")],8,rD))}}),sD=["id","name","form","multiple","size","disabled","required","aria-required","aria-invalid"],Ra=se({__name:"BFormSelect",props:nt({ariaInvalid:{type:[Boolean,String],default:void 0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledField:{default:"disabled"},form:{default:void 0},id:{default:void 0},labelField:{default:"label"},multiple:{type:Boolean,default:!1},name:{default:void 0},options:{default:()=>[]},optionsField:{default:"options"},plain:{type:Boolean,default:!1},required:{type:Boolean,default:!1},selectSize:{default:0},size:{default:"md"},state:{type:[Boolean,null],default:null},textField:{default:"text"},valueField:{default:"value"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const o=zt(t,"BFormSelect"),r=ft(t,"modelValue"),i=ko(()=>o.id,"input"),s=Cl(()=>o.selectSize),a=tm(()=>o.state),l=pt("_input"),{focused:c}=Fi(l,{initialValue:o.autofocus}),u=k(()=>[a.value,{"form-control":o.plain,[`form-control-${o.size}`]:o.size!=="md"&&o.plain,"form-select":!o.plain,[`form-select-${o.size}`]:o.size!=="md"&&!o.plain}]),d=k(()=>s.value||o.plain?s.value:void 0),f=em(()=>o.ariaInvalid,()=>o.state),{normalizedOptions:h,isComplex:g}=a4(()=>o.options,o),b=k(()=>h.value),m=k({get:()=>r.value,set:v=>{r.value=v}});return e({blur:()=>{c.value=!1},element:l,focus:()=>{c.value=!0}}),(v,y)=>sr((w(),N("select",{id:p(i),ref:"_input","onUpdate:modelValue":y[0]||(y[0]=x=>m.value=x),class:$e(u.value),name:p(o).name,form:p(o).form||void 0,multiple:p(o).multiple||void 0,size:d.value,disabled:p(o).disabled,required:p(o).required||void 0,"aria-required":p(o).required||void 0,"aria-invalid":p(f)},[Ce(v.$slots,"first"),(w(!0),N(Re,null,mt(b.value,(x,_)=>(w(),N(Re,{key:_},[p(g)(x)?(w(),Q(iD,{key:0,label:x.label,options:x.options,"value-field":p(o).valueField,"text-field":p(o).textField,"disabled-field":p(o).disabledField},null,8,["label","options","value-field","text-field","disabled-field"])):(w(),Q(s4,{key:1,value:x.value,disabled:x.disabled},{default:J(()=>[Ce(v.$slots,"option",Ct({ref_for:!0},x),()=>[Ue(ye(x.text),1)])]),_:2},1032,["value","disabled"]))],64))),128)),Ce(v.$slots,"default")],10,sD)),[[_L,m.value]])}}),aD=(t,e)=>{const n=Ie(0),o=io(Vt(e)),r=Cl(()=>o.value.maxRows||NaN,{method:"parseInt",nanToZero:!0}),i=Cl(()=>o.value.rows||NaN,{method:"parseInt",nanToZero:!0}),s=k(()=>Math.max(i.value||2,2)),a=k(()=>Math.max(s.value,r.value||0)),l=k(()=>s.value===a.value?s.value:null),c=async()=>{if(!t.value||!o4(t.value)){n.value=null;return}const d=getComputedStyle(t.value),f=Number.parseFloat(d.lineHeight)||1,h=(Number.parseFloat(d.borderTopWidth)||0)+(Number.parseFloat(d.borderBottomWidth)||0),g=(Number.parseFloat(d.paddingTop)||0)+(Number.parseFloat(d.paddingBottom)||0),b=h+g,m=f*s.value+b,v=t.value.style.height||d.height;n.value="auto",await wn();const{scrollHeight:y}=t.value;n.value=v,await wn();const x=Math.max((y-g)/f,2),_=Math.min(Math.max(x,s.value),a.value),S=Math.max(Math.ceil(_*f+b),m);if(o.value.noAutoShrink&&(Number.parseFloat(v.toString())||0)>S){n.value=v;return}n.value=`${S}px`};hn(c);const u=k(()=>({resize:"none",height:typeof n.value=="string"?n.value:n.value?`${n.value}px`:void 0}));return{onInput:c,computedStyles:u,computedRows:l}},lD=["id","name","form","value","disabled","placeholder","required","autocomplete","readonly","aria-required","aria-invalid","rows","wrap"],cy=se({__name:"BFormTextarea",props:nt({noResize:{type:Boolean,default:!1},rows:{default:2},wrap:{default:"soft"},noAutoShrink:{type:Boolean,default:!1},maxRows:{default:void 0},ariaInvalid:{type:[Boolean,String],default:void 0},autocomplete:{default:void 0},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},form:{default:void 0},formatter:{type:Function,default:void 0},id:{default:void 0},lazyFormatter:{type:Boolean,default:!1},list:{default:void 0},name:{default:void 0},placeholder:{default:void 0},plaintext:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{default:void 0},state:{type:[Boolean,null],default:void 0},debounce:{default:0},debounceMaxWait:{default:NaN}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const o=zt(t,"BFormTextarea"),[r,i]=ft(t,"modelValue",{set:S=>d4(S,i)}),s=pt("_input"),{computedId:a,forceUpdateKey:l,computedAriaInvalid:c,onInput:u,stateClass:d,onChange:f,onBlur:h,focus:g,blur:b}=f4(o,s,r,i),m=k(()=>[d.value,o.plaintext?"form-control-plaintext":"form-control",{[`form-control-${o.size}`]:!!o.size}]),{computedStyles:v,onInput:y,computedRows:x}=aD(s,k(()=>({maxRows:o.maxRows,rows:o.rows,noAutoShrink:o.noAutoShrink}))),_=k(()=>({resize:o.noResize?"none":void 0,...o.maxRows||o.noAutoShrink?v.value:void 0}));return e({blur:b,element:s,focus:g}),(S,E)=>(w(),N("textarea",{id:p(a),ref:"_input",key:p(l),class:$e(m.value),name:p(o).name||void 0,form:p(o).form||void 0,value:p(r)??void 0,disabled:p(o).disabled,placeholder:p(o).placeholder,required:p(o).required||void 0,autocomplete:p(o).autocomplete||void 0,readonly:p(o).readonly||p(o).plaintext,"aria-required":p(o).required||void 0,"aria-invalid":p(c),rows:p(x)||2,style:Pt(_.value),wrap:p(o).wrap||void 0,onInput:E[0]||(E[0]=M=>{p(u)(M),p(y)()}),onChange:E[1]||(E[1]=(...M)=>p(f)&&p(f)(...M)),onBlur:E[2]||(E[2]=(...M)=>p(h)&&p(h)(...M))},null,46,lD))}});function cD(t){return Fl()?(wa(t),!0):!1}function n1(t){return typeof t=="function"?t():p(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const uD=t=>t!=null;function dD(t){var e;const n=n1(t);return(e=n==null?void 0:n.$el)!=null?e:n}/*!
|
|
24
|
+
* tabbable 6.2.0
|
|
25
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
26
|
+
*/var h4=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],gp=h4.join(","),p4=typeof Element>"u",$l=p4?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vp=!p4&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},bp=function t(e,n){var o;n===void 0&&(n=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),i=r===""||r==="true",s=i||n&&e&&t(e.parentNode);return s},fD=function(e){var n,o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return o===""||o==="true"},m4=function(e,n,o){if(bp(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(gp));return n&&$l.call(e,gp)&&r.unshift(e),r=r.filter(o),r},g4=function t(e,n,o){for(var r=[],i=Array.from(e);i.length;){var s=i.shift();if(!bp(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:s,candidates:c})}else{var u=$l.call(s,gp);u&&o.filter(s)&&(n||!e.includes(s))&&r.push(s);var d=s.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(s),f=!bp(d,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(s));if(d&&f){var h=t(d===!0?s.children:d.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return r},v4=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},dl=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||fD(e))&&!v4(e)?0:e.tabIndex},hD=function(e,n){var o=dl(e);return o<0&&n&&!v4(e)?0:o},pD=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},b4=function(e){return e.tagName==="INPUT"},mD=function(e){return b4(e)&&e.type==="hidden"},gD=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return n},vD=function(e,n){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===n)return e[o]},bD=function(e){if(!e.name)return!0;var n=e.form||vp(e),o=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=vD(r,e.form);return!i||i===e},yD=function(e){return b4(e)&&e.type==="radio"},xD=function(e){return yD(e)&&!bD(e)},wD=function(e){var n,o=e&&vp(e),r=(n=o)===null||n===void 0?void 0:n.host,i=!1;if(o&&o!==e){var s,a,l;for(i=!!((s=r)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&r;){var c,u,d;o=vp(r),r=(c=o)===null||c===void 0?void 0:c.host,i=!!((u=r)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return i},Lw=function(e){var n=e.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},_D=function(e,n){var o=n.displayCheck,r=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=$l.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if($l.call(s,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="legacy-full"){if(typeof r=="function"){for(var a=e;e;){var l=e.parentElement,c=vp(e);if(l&&!l.shadowRoot&&r(l)===!0)return Lw(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(wD(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Lw(e);return!1},SD=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return $l.call(n,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}n=n.parentElement}return!1},yp=function(e,n){return!(n.disabled||bp(n)||mD(n)||_D(n,e)||gD(n)||SD(n))},o1=function(e,n){return!(xD(n)||dl(n)<0||!yp(e,n))},kD=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},CD=function t(e){var n=[],o=[];return e.forEach(function(r,i){var s=!!r.scopeParent,a=s?r.scopeParent:r,l=hD(a,s),c=s?t(r.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):o.push({documentOrder:i,tabIndex:l,item:r,isScope:s,content:c})}),o.sort(pD).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(n)},AD=function(e,n){n=n||{};var o;return n.getShadowRoot?o=g4([e],n.includeContainer,{filter:o1.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:kD}):o=m4(e,n.includeContainer,o1.bind(null,n)),CD(o)},$D=function(e,n){n=n||{};var o;return n.getShadowRoot?o=g4([e],n.includeContainer,{filter:yp.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=m4(e,n.includeContainer,yp.bind(null,n)),o},rc=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return $l.call(e,gp)===!1?!1:o1(n,e)},TD=h4.concat("iframe").join(","),Mg=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return $l.call(e,TD)===!1?!1:yp(n,e)};/*!
|
|
27
|
+
* focus-trap 7.6.2
|
|
28
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
29
|
+
*/function r1(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function MD(t){if(Array.isArray(t))return r1(t)}function OD(t,e,n){return(e=ED(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function BD(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function LD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function Dw(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pw(Object(n),!0).forEach(function(o){OD(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pw(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function PD(t){return MD(t)||BD(t)||ID(t)||LD()}function DD(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ED(t){var e=DD(t,"string");return typeof e=="symbol"?e:e+""}function ID(t,e){if(t){if(typeof t=="string")return r1(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r1(t,e):void 0}}var Ew={activateTrap:function(e,n){if(e.length>0){var o=e[e.length-1];o!==n&&o.pause()}var r=e.indexOf(n);r===-1||e.splice(r,1),e.push(n)},deactivateTrap:function(e,n){var o=e.indexOf(n);o!==-1&&e.splice(o,1),e.length>0&&e[e.length-1].unpause()}},ND=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},RD=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},fd=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},FD=function(e){return fd(e)&&!e.shiftKey},VD=function(e){return fd(e)&&e.shiftKey},Iw=function(e){return setTimeout(e,0)},Pu=function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,o):e},Gf=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},zD=[],HD=function(e,n){var o=(n==null?void 0:n.document)||document,r=(n==null?void 0:n.trapStack)||zD,i=Dw({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:FD,isKeyBackward:VD},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,l=function(A,L,B){return A&&A[L]!==void 0?A[L]:i[B||L]},c=function(A,L){var B=typeof(L==null?void 0:L.composedPath)=="function"?L.composedPath():void 0;return s.containerGroups.findIndex(function(F){var z=F.container,V=F.tabbableNodes;return z.contains(A)||(B==null?void 0:B.includes(z))||V.find(function(U){return U===A})})},u=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=L.hasFallback,F=B===void 0?!1:B,z=L.params,V=z===void 0?[]:z,U=i[A];if(typeof U=="function"&&(U=U.apply(void 0,PD(V))),U===!0&&(U=void 0),!U){if(U===void 0||U===!1)return U;throw new Error("`".concat(A,"` was specified but was not a node, or did not return a node"))}var ie=U;if(typeof U=="string"){try{ie=o.querySelector(U)}catch(ue){throw new Error("`".concat(A,'` appears to be an invalid selector; error="').concat(ue.message,'"'))}if(!ie&&!F)throw new Error("`".concat(A,"` as selector refers to no known node"))}return ie},d=function(){var A=u("initialFocus",{hasFallback:!0});if(A===!1)return!1;if(A===void 0||A&&!Mg(A,i.tabbableOptions))if(c(o.activeElement)>=0)A=o.activeElement;else{var L=s.tabbableGroups[0],B=L&&L.firstTabbableNode;A=B||u("fallbackFocus")}else A===null&&(A=u("fallbackFocus"));if(!A)throw new Error("Your focus-trap needs to have at least one focusable element");return A},f=function(){if(s.containerGroups=s.containers.map(function(A){var L=AD(A,i.tabbableOptions),B=$D(A,i.tabbableOptions),F=L.length>0?L[0]:void 0,z=L.length>0?L[L.length-1]:void 0,V=B.find(function(ue){return rc(ue)}),U=B.slice().reverse().find(function(ue){return rc(ue)}),ie=!!L.find(function(ue){return dl(ue)>0});return{container:A,tabbableNodes:L,focusableNodes:B,posTabIndexesFound:ie,firstTabbableNode:F,lastTabbableNode:z,firstDomTabbableNode:V,lastDomTabbableNode:U,nextTabbableNode:function(fe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ce=L.indexOf(fe);return ce<0?he?B.slice(B.indexOf(fe)+1).find(function(de){return rc(de)}):B.slice(0,B.indexOf(fe)).reverse().find(function(de){return rc(de)}):L[ce+(he?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(A){return A.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(A){return A.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(A){var L=A.activeElement;if(L)return L.shadowRoot&&L.shadowRoot.activeElement!==null?h(L.shadowRoot):L},g=function(A){if(A!==!1&&A!==h(document)){if(!A||!A.focus){g(d());return}A.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=A,ND(A)&&A.select()}},b=function(A){var L=u("setReturnFocus",{params:[A]});return L||(L===!1?!1:A)},m=function(A){var L=A.target,B=A.event,F=A.isBackward,z=F===void 0?!1:F;L=L||Gf(B),f();var V=null;if(s.tabbableGroups.length>0){var U=c(L,B),ie=U>=0?s.containerGroups[U]:void 0;if(U<0)z?V=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:V=s.tabbableGroups[0].firstTabbableNode;else if(z){var ue=s.tabbableGroups.findIndex(function(j){var te=j.firstTabbableNode;return L===te});if(ue<0&&(ie.container===L||Mg(L,i.tabbableOptions)&&!rc(L,i.tabbableOptions)&&!ie.nextTabbableNode(L,!1))&&(ue=U),ue>=0){var fe=ue===0?s.tabbableGroups.length-1:ue-1,he=s.tabbableGroups[fe];V=dl(L)>=0?he.lastTabbableNode:he.lastDomTabbableNode}else fd(B)||(V=ie.nextTabbableNode(L,!1))}else{var ce=s.tabbableGroups.findIndex(function(j){var te=j.lastTabbableNode;return L===te});if(ce<0&&(ie.container===L||Mg(L,i.tabbableOptions)&&!rc(L,i.tabbableOptions)&&!ie.nextTabbableNode(L))&&(ce=U),ce>=0){var de=ce===s.tabbableGroups.length-1?0:ce+1,_e=s.tabbableGroups[de];V=dl(L)>=0?_e.firstTabbableNode:_e.firstDomTabbableNode}else fd(B)||(V=ie.nextTabbableNode(L))}}else V=u("fallbackFocus");return V},v=function(A){var L=Gf(A);if(!(c(L,A)>=0)){if(Pu(i.clickOutsideDeactivates,A)){a.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Pu(i.allowOutsideClick,A)||A.preventDefault()}},y=function(A){var L=Gf(A),B=c(L,A)>=0;if(B||L instanceof Document)B&&(s.mostRecentlyFocusedNode=L);else{A.stopImmediatePropagation();var F,z=!0;if(s.mostRecentlyFocusedNode)if(dl(s.mostRecentlyFocusedNode)>0){var V=c(s.mostRecentlyFocusedNode),U=s.containerGroups[V].tabbableNodes;if(U.length>0){var ie=U.findIndex(function(ue){return ue===s.mostRecentlyFocusedNode});ie>=0&&(i.isKeyForward(s.recentNavEvent)?ie+1<U.length&&(F=U[ie+1],z=!1):ie-1>=0&&(F=U[ie-1],z=!1))}}else s.containerGroups.some(function(ue){return ue.tabbableNodes.some(function(fe){return dl(fe)>0})})||(z=!1);else z=!1;z&&(F=m({target:s.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(s.recentNavEvent)})),g(F||s.mostRecentlyFocusedNode||d())}s.recentNavEvent=void 0},x=function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=A;var B=m({event:A,isBackward:L});B&&(fd(A)&&A.preventDefault(),g(B))},_=function(A){(i.isKeyForward(A)||i.isKeyBackward(A))&&x(A,i.isKeyBackward(A))},S=function(A){RD(A)&&Pu(i.escapeDeactivates,A)!==!1&&(A.preventDefault(),a.deactivate())},E=function(A){var L=Gf(A);c(L,A)>=0||Pu(i.clickOutsideDeactivates,A)||Pu(i.allowOutsideClick,A)||(A.preventDefault(),A.stopImmediatePropagation())},M=function(){if(s.active)return Ew.activateTrap(r,a),s.delayInitialFocusTimer=i.delayInitialFocus?Iw(function(){g(d())}):g(d()),o.addEventListener("focusin",y,!0),o.addEventListener("mousedown",v,{capture:!0,passive:!1}),o.addEventListener("touchstart",v,{capture:!0,passive:!1}),o.addEventListener("click",E,{capture:!0,passive:!1}),o.addEventListener("keydown",_,{capture:!0,passive:!1}),o.addEventListener("keydown",S),a},C=function(){if(s.active)return o.removeEventListener("focusin",y,!0),o.removeEventListener("mousedown",v,!0),o.removeEventListener("touchstart",v,!0),o.removeEventListener("click",E,!0),o.removeEventListener("keydown",_,!0),o.removeEventListener("keydown",S),a},O=function(A){var L=A.some(function(B){var F=Array.from(B.removedNodes);return F.some(function(z){return z===s.mostRecentlyFocusedNode})});L&&g(d())},P=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(O):void 0,R=function(){P&&(P.disconnect(),s.active&&!s.paused&&s.containers.map(function(A){P.observe(A,{subtree:!0,childList:!0})}))};return a={get active(){return s.active},get paused(){return s.paused},activate:function(A){if(s.active)return this;var L=l(A,"onActivate"),B=l(A,"onPostActivate"),F=l(A,"checkCanFocusTrap");F||f(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=o.activeElement,L==null||L();var z=function(){F&&f(),M(),R(),B==null||B()};return F?(F(s.containers.concat()).then(z,z),this):(z(),this)},deactivate:function(A){if(!s.active)return this;var L=Dw({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},A);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,C(),s.active=!1,s.paused=!1,R(),Ew.deactivateTrap(r,a);var B=l(L,"onDeactivate"),F=l(L,"onPostDeactivate"),z=l(L,"checkCanReturnFocus"),V=l(L,"returnFocus","returnFocusOnDeactivate");B==null||B();var U=function(){Iw(function(){V&&g(b(s.nodeFocusedBeforeActivation)),F==null||F()})};return V&&z?(z(b(s.nodeFocusedBeforeActivation)).then(U,U),this):(U(),this)},pause:function(A){if(s.paused||!s.active)return this;var L=l(A,"onPause"),B=l(A,"onPostPause");return s.paused=!0,L==null||L(),C(),R(),B==null||B(),this},unpause:function(A){if(!s.paused||!s.active)return this;var L=l(A,"onUnpause"),B=l(A,"onPostUnpause");return s.paused=!1,L==null||L(),f(),M(),R(),B==null||B(),this},updateContainerElements:function(A){var L=[].concat(A).filter(Boolean);return s.containers=L.map(function(B){return typeof B=="string"?o.querySelector(B):B}),s.active&&f(),R(),this}},a.updateContainerElements(e),a};function WD(t,e={}){let n;const{immediate:o,...r}=e,i=Ie(!1),s=Ie(!1),a=f=>n&&n.activate(f),l=f=>n&&n.deactivate(f),c=()=>{n&&(n.pause(),s.value=!0)},u=()=>{n&&(n.unpause(),s.value=!1)},d=k(()=>{const f=n1(t);return(Array.isArray(f)?f:[f]).map(h=>{const g=n1(h);return typeof g=="string"?g:dD(g)}).filter(uD)});return Ve(d,f=>{f.length&&(n=HD(f,{...r,onActivate(){i.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){i.value=!1,e.onDeactivate&&e.onDeactivate()}}),o&&a())},{flush:"post"}),cD(()=>l()),{hasFocus:i,isPaused:s,activate:a,deactivate:l,pause:c,unpause:u}}const y4=({element:t,isActive:e,noTrap:n,fallbackFocus:o},r={allowOutsideClick:!0,fallbackFocus:o.ref.value??void 0,escapeDeactivates:!1})=>{const i=io(Vt(e)),s=io(Vt(n)),a=()=>{var u;const d=(u=t.value)==null?void 0:u.querySelectorAll(`a, button, input, select, textarea, [tabindex]:not([tabindex="-1"]):not(.${o.classSelector})`);return!d||d.length===0},l=Ie(a());hn(()=>{dP(t,()=>{l.value=a()},{childList:!0,subtree:!0})});const c=WD(t,r);return Ve(i,async u=>{await wn(),u&&s.value===!1?c.activate():c.deactivate()}),Ve(s,u=>{u===!0&&c.deactivate()}),{needsFallback:io(l)}},UD=M3(xP);let qf="";const el=new Map,x4=(t,e)=>{const n=io(Vt(t)),o=Mk(),r=k(()=>!bt(e)),i=UD(typeof document<"u"?document.body:null,n.value&&r.value);hn(()=>{typeof document>"u"||(el.set(o,!1),Ve([n,r],([s,a])=>{const l=window.innerWidth-document.documentElement.clientWidth,c=Array.from(el.values()).some(f=>f===!0),u=s&&a;el.set(o,u),u&&!c&&!i.value&&(i.value=!0,l>0&&(qf=document.body.style.paddingRight,document.body.style.paddingRight=`${l+qf}px`));const d=Array.from(el.values()).some(f=>f===!0);c&&!d&&(el.set(o,!1),i.value=!1,document.body.style.paddingRight=qf)},{immediate:!0}))}),Us(()=>{el.delete(o),Array.from(el.values()).some(a=>a===!0)||(document.body.style.paddingRight=qf,i.value=!1)})},GD=["id","aria-labelledby","aria-describedby"],qD=["id"],Nw="modal-fallback-focus",Rw=1056,YD=se({inheritAttrs:!1,__name:"BModal",props:nt({autofocus:{type:Boolean,default:!0},autofocusButton:{default:void 0},backdropFirst:{type:Boolean,default:!1},body:{default:void 0},bodyAttrs:{default:void 0},bodyBgVariant:{default:null},bodyClass:{default:null},bodyScrolling:{type:Boolean,default:!1},bodyTextVariant:{default:null},bodyVariant:{default:null},busy:{type:Boolean,default:!1},buttonSize:{default:"md"},cancelDisabled:{type:Boolean,default:!1},cancelTitle:{default:"Cancel"},cancelVariant:{default:"secondary"},centered:{type:Boolean,default:!1},contentClass:{default:void 0},dialogClass:{default:void 0},footerBgVariant:{default:null},footerBorderVariant:{default:null},footerClass:{default:void 0},footerTextVariant:{default:null},footerVariant:{default:null},fullscreen:{type:[Boolean,String],default:!1},headerBgVariant:{default:null},headerBorderVariant:{default:null},headerClass:{default:void 0},headerCloseClass:{default:void 0},headerCloseLabel:{default:"Close"},headerCloseVariant:{default:"secondary"},headerTextVariant:{default:null},headerVariant:{default:null},noBackdrop:{type:Boolean,default:!1},noFooter:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noHeaderClose:{type:Boolean,default:!1},id:{default:void 0},modalClass:{default:void 0},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noTrap:{type:Boolean,default:!1},noStacking:{type:Boolean},okDisabled:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},okTitle:{default:"OK"},okVariant:{default:"primary"},scrollable:{type:Boolean,default:!1},size:{default:"md"},title:{default:void 0},titleClass:{default:void 0},titleVisuallyHidden:{type:Boolean,default:!1},titleTag:{default:"h5"},teleportDisabled:{type:Boolean,default:!1},teleportTo:{default:"body"},initialAnimation:{type:Boolean,default:!1},noAnimation:{type:Boolean},noFade:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},unmountLazy:{type:Boolean,default:!1},show:{type:Boolean,default:!1},transProps:{default:void 0},visible:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:nt(["backdrop","cancel","close","esc","ok","hide","hide-prevented","hidden","show","show-prevented","shown","toggle","toggle-prevented"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const r=zt(t,"BModal"),i=n,s=ns(),a=ko(()=>r.id,"modal"),l=ft(t,"modelValue"),c=pt("_element"),u=pt("_fallbackFocusElement"),d=pt("_okButton"),f=pt("_cancelButton"),h=pt("_closeButton"),g=()=>{r.autofocus!==!1&&(r.autofocusButton==="ok"?z.value=!0:r.autofocusButton==="close"?U.value=!0:r.autofocusButton==="cancel"?V.value=!0:F.value=!0)},b=()=>{g()},{showRef:m,renderRef:v,renderBackdropRef:y,hide:x,show:_,toggle:S,computedNoAnimation:E,transitionProps:M,backdropTransitionProps:C,isLeaving:O,isVisible:P,trapActive:R,contentShowing:$,backdropReady:A,backdropVisible:L}=j0(l,r,i,c,a,{transitionProps:{onAfterEnter:b}}),{needsFallback:B}=y4({element:c,isActive:R,noTrap:()=>r.noTrap,fallbackFocus:{ref:u,classSelector:Nw}});vs("Escape",()=>{x("esc")},{target:c}),x4(m,()=>r.bodyScrolling);const{focused:F}=Fi(c,{initialValue:l.value&&r.autofocusButton===void 0&&r.autofocus===!0}),{focused:z}=Fi(d,{initialValue:l.value&&r.autofocusButton==="ok"&&r.autofocus===!0}),{focused:V}=Fi(f,{initialValue:l.value&&r.autofocusButton==="cancel"&&r.autofocus===!0}),{focused:U}=Fi(h,{initialValue:l.value&&r.autofocusButton==="close"&&r.autofocus===!0}),ie=k(()=>!zc(s["header-close"])),ue=k(()=>[r.dialogClass,{"modal-fullscreen":r.fullscreen===!0,[`modal-fullscreen-${r.fullscreen}-down`]:typeof r.fullscreen=="string",[`modal-${r.size}`]:r.size!=="md","modal-dialog-centered":r.centered,"modal-dialog-scrollable":r.scrollable}]),fe=Ms(()=>({bgVariant:r.bodyBgVariant,textVariant:r.bodyTextVariant,variant:r.bodyVariant})),he=k(()=>[r.bodyClass,fe.value]),ce=Ms(()=>({bgVariant:r.headerBgVariant,textVariant:r.headerTextVariant,variant:r.headerVariant,borderVariant:r.headerBorderVariant})),de=k(()=>[r.headerClass,ce.value]),_e=k(()=>({variant:ie.value?r.headerCloseVariant:void 0,class:r.headerCloseClass})),j=Ms(()=>({bgVariant:r.footerBgVariant,textVariant:r.footerTextVariant,variant:r.footerVariant,borderVariant:r.footerBorderVariant})),te=k(()=>[r.footerClass,j.value]),ne=k(()=>[r.titleClass,{"visually-hidden":r.titleVisuallyHidden}]),me=k(()=>r.cancelDisabled||r.busy),ve=k(()=>r.okDisabled||r.busy),{activePosition:I,activeModalCount:W,stackWithoutSelf:X}=_P(m,l.value);Ve(X,(Z,Y)=>{Z.length>Y.length&&m.value===!0&&r.noStacking===!0&&x()});const ae=k(()=>m.value||O.value?Rw-(((W==null?void 0:W.value)??0)*2-((I==null?void 0:I.value)??0)*2):Rw),le=k(()=>({"z-index":ae.value})),K=k(()=>({"z-index":ae.value-1})),oe=k(()=>({cancel:()=>{x("cancel")},close:()=>{x("close")},hide:x,ok:()=>{x("ok")},active:m.value,visible:m.value}));return e({hide:x,id:a,show:_,toggle:S}),(Z,Y)=>(w(),Q(Y0,{to:p(r).teleportTo,disabled:p(r).teleportDisabled},{default:J(()=>[p(v)||p($)?(w(),Q(kl,Ct({key:0},p(M),{appear:l.value||p(r).visible,onAfterEnter:b}),{default:J(()=>[sr(T("div",Ct({id:p(a),ref:"_element",class:["modal",[p(r).modalClass,{fade:!p(E),show:p(P)}]],role:"dialog","aria-labelledby":p(r).noHeader?void 0:`${p(a)}-label`,"aria-describedby":`${p(a)}-body`,tabindex:"-1"},Z.$attrs,{style:le.value,onClick:Y[4]||(Y[4]=gn(ee=>p(x)("backdrop"),["self"]))}),[T("div",{class:$e(["modal-dialog",ue.value])},[p($)?(w(),N("div",{key:0,class:$e(["modal-content",p(r).contentClass])},[p(r).noHeader?re("",!0):(w(),N("div",{key:0,class:$e(["modal-header",de.value])},[Ce(Z.$slots,"header",Vn(er(oe.value)),()=>[(w(),Q(Gt(p(r).titleTag),{id:`${p(a)}-label`,class:$e(["modal-title",ne.value])},{default:J(()=>[Ce(Z.$slots,"title",Vn(er(oe.value)),()=>[Ue(ye(p(r).title),1)],!0)]),_:3},8,["id","class"])),p(r).noHeaderClose?re("",!0):(w(),N(Re,{key:0},[ie.value?(w(),Q(Uo,Ct({key:0},_e.value,{onClick:Y[0]||(Y[0]=ee=>p(x)("close"))}),{default:J(()=>[Ce(Z.$slots,"header-close",{},void 0,!0)]),_:3},16)):(w(),Q(n4,Ct({key:1,"aria-label":p(r).headerCloseLabel},_e.value,{onClick:Y[1]||(Y[1]=ee=>p(x)("close"))}),null,16,["aria-label"]))],64))],!0)],2)),T("div",Ct({id:`${p(a)}-body`,class:["modal-body",he.value]},p(r).bodyAttrs),[Ce(Z.$slots,"default",Vn(er(oe.value)),()=>[Ue(ye(p(r).body),1)],!0)],16,qD),p(r).noFooter?re("",!0):(w(),N("div",{key:1,class:$e(["modal-footer",te.value])},[Ce(Z.$slots,"footer",Vn(er(oe.value)),()=>[Ce(Z.$slots,"cancel",Vn(er(oe.value)),()=>[p(r).okOnly?re("",!0):(w(),Q(Uo,{key:0,ref:"_cancelButton",disabled:me.value,size:p(r).buttonSize,variant:p(r).cancelVariant,onClick:Y[2]||(Y[2]=ee=>p(x)("cancel"))},{default:J(()=>[Ue(ye(p(r).cancelTitle),1)]),_:1},8,["disabled","size","variant"]))],!0),Ce(Z.$slots,"ok",Vn(er(oe.value)),()=>[H(Uo,{ref:"_okButton",disabled:ve.value,size:p(r).buttonSize,variant:p(r).okVariant,onClick:Y[3]||(Y[3]=ee=>p(x)("ok"))},{default:J(()=>[Ue(ye(p(r).okTitle),1)]),_:1},8,["disabled","size","variant"])],!0)],!0)],2))],2)):re("",!0)],2),p(B)?(w(),N("div",{key:0,ref:"_fallbackFocusElement",class:$e(Nw),tabindex:"0",style:{width:"0",height:"0",overflow:"hidden"}},null,512)):re("",!0)],16,GD),[[Ic,p(m)&&(p(A)&&p(r).backdropFirst||!p(r).backdropFirst)]])]),_:3},16,["appear"])):re("",!0),p(r).noBackdrop?re("",!0):Ce(Z.$slots,"backdrop",Vn(Ct({key:1},oe.value)),()=>[p(y)?(w(),Q(kl,Vn(Ct({key:0},p(C))),{default:J(()=>[sr(T("div",{class:$e(["modal-backdrop",{fade:!p(E),show:p(L)||p(E)}]),style:Pt(K.value),onClick:Y[5]||(Y[5]=ee=>p(x)("backdrop"))},null,6),[[Ic,p(m)||p(O)&&p(r).backdropFirst&&!p(E)]])]),_:1},16)):re("",!0)],!0)]),_:3},8,["to","disabled"]))}}),jD=X0(YD,[["__scopeId","data-v-93972863"]]),XD=["id","aria-labelledby"],KD=["id"],Fw="offcanvas-fallback-focus",ZD=se({inheritAttrs:!1,__name:"BOffcanvas",props:nt({noBackdrop:{type:Boolean,default:!1},backdropFirst:{type:Boolean,default:!1},bodyAttrs:{default:void 0},bodyClass:{default:void 0},bodyScrolling:{type:Boolean,default:!1},footerClass:{default:void 0},headerClass:{default:void 0},headerCloseClass:{default:void 0},headerCloseLabel:{default:"Close"},headerCloseVariant:{default:"secondary"},id:{default:void 0},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noFocus:{type:Boolean,default:!1},noHeader:{type:Boolean,default:!1},noTrap:{type:Boolean,default:!1},noHeaderClose:{type:Boolean,default:!1},placement:{default:"start"},shadow:{type:[String,Boolean],default:!1},title:{default:void 0},responsive:{},width:{default:void 0},teleportDisabled:{type:Boolean,default:!1},teleportTo:{default:"body"},initialAnimation:{type:Boolean,default:!1},noAnimation:{type:Boolean,default:!1},noFade:{type:Boolean},lazy:{type:Boolean,default:!1},unmountLazy:{type:Boolean,default:!1},show:{type:Boolean,default:!1},transProps:{},visible:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:nt(["close","esc","backdrop","breakpoint","hide","hide-prevented","hidden","show","show-prevented","shown","toggle","toggle-prevented"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const r=zt(t,"BOffcanvas"),i=n,s=ns(),a=ft(t,"modelValue"),l=ko(()=>r.id,"offcanvas"),c=pt("_element"),u=pt("_fallbackFocusElement"),d=()=>{wn(()=>{r.noFocus===!1&&!B.value&&(F.value=!0)})},{showRef:f,renderRef:h,renderBackdropRef:g,hide:b,show:m,toggle:v,computedNoAnimation:y,contentShowing:x,transitionProps:_,backdropReady:S,backdropTransitionProps:E,backdropVisible:M,isVisible:C,buildTriggerableEvent:O,localNoAnimation:P,isLeaving:R,trapActive:$}=j0(a,r,i,c,l,{transitionProps:{onAfterEnter:d,enterToClass:"showing",leaveToClass:"hiding",enterActiveClass:"",leaveActiveClass:"",enterFromClass:"",leaveFromClass:""}}),L=hP(fP).smallerOrEqual(()=>r.responsive??"xs"),B=Ie(r.responsive!==void 0&&!L.value);hn(()=>{r.responsive!==void 0&&i("breakpoint",O("breakpoint"),B.value)}),x4(f,()=>r.bodyScrolling||B.value),vs("Escape",()=>{b("esc")},{target:c});const{focused:F}=Fi(c,{initialValue:a.value&&r.noFocus===!1&&!B.value}),{needsFallback:z}=y4({element:c,isActive:$,noTrap:()=>r.noTrap||B.value,fallbackFocus:{classSelector:Fw,ref:u}}),V=k(()=>(r.responsive===void 0||!B.value)&&r.noBackdrop===!1&&(f.value===!0||R.value&&r.backdropFirst&&!y.value)),U=k(()=>!zc(s["header-close"])),ie=k(()=>[{"text-reset":!U.value},r.headerCloseClass]),ue=k(()=>({variant:U.value?r.headerCloseVariant:void 0,class:ie.value})),fe=k(()=>!zc(s.footer)),he=k(()=>[r.responsive===void 0?"offcanvas":`offcanvas-${r.responsive}`,`offcanvas-${r.placement}`,{show:C.value,[`shadow-${r.shadow}`]:!!r.shadow,"no-transition":y.value}]),ce=k(()=>({width:r.width})),de=k(()=>({visible:f.value,placement:r.placement,hide:b}));return Ve(L,_e=>{r.responsive!==void 0&&(_e===!0?(P.value=!0,requestAnimationFrame(()=>{B.value=!1}),i("breakpoint",O("breakpoint"),!1),i("hide",O("hide"))):(P.value=!0,requestAnimationFrame(()=>{B.value=!0}),i("breakpoint",O("breakpoint"),!0),i("show",O("show"))))}),e({hide:b,show:m,toggle:v,isOpenByBreakpoint:B}),(_e,j)=>(w(),Q(Y0,{to:p(r).teleportTo,disabled:p(r).teleportDisabled||B.value},{default:J(()=>[p(h)||p(x)||B.value?(w(),Q(kl,Ct({key:0},p(_),{appear:a.value||p(r).visible}),{default:J(()=>[sr(T("div",Ct({id:p(l),ref:"_element","aria-modal":"true",role:"dialog",class:he.value,style:ce.value,tabindex:"-1","aria-labelledby":`${p(l)}-offcanvas-label`,"data-bs-backdrop":"false"},_e.$attrs),[p(x)||B.value?(w(),N(Re,{key:0},[p(r).noHeader?re("",!0):(w(),N("div",{key:0,class:$e(["offcanvas-header",p(r).headerClass])},[Ce(_e.$slots,"header",Vn(er(de.value)),()=>[T("h5",{id:`${p(l)}-offcanvas-label`,class:"offcanvas-title"},[Ce(_e.$slots,"title",Vn(er(de.value)),()=>[Ue(ye(p(r).title),1)],!0)],8,KD),p(r).noHeaderClose?re("",!0):(w(),N(Re,{key:0},[U.value?(w(),Q(Uo,Ct({key:0},ue.value,{onClick:j[0]||(j[0]=te=>p(b)("close"))}),{default:J(()=>[Ce(_e.$slots,"header-close",{},void 0,!0)]),_:3},16)):(w(),Q(n4,Ct({key:1,"aria-label":p(r).headerCloseLabel},ue.value,{onClick:j[1]||(j[1]=te=>p(b)("close"))}),null,16,["aria-label"]))],64))],!0)],2)),T("div",Ct({class:["offcanvas-body",p(r).bodyClass]},p(r).bodyAttrs),[Ce(_e.$slots,"default",Vn(er(de.value)),void 0,!0)],16),fe.value?(w(),N("div",{key:1,class:$e(p(r).footerClass)},[Ce(_e.$slots,"footer",Vn(er(de.value)),void 0,!0)],2)):re("",!0)],64)):re("",!0),p(z)?(w(),N("div",{key:1,ref:"_fallbackFocusElement",class:$e(Fw),tabindex:"0",style:{width:"0",height:"0",overflow:"hidden"}},null,512)):re("",!0)],16,XD),[[Ic,p(f)&&(p(S)&&p(r).backdropFirst||!p(r).backdropFirst)||B.value]])]),_:3},16,["appear"])):re("",!0),p(r).noBackdrop?re("",!0):Ce(_e.$slots,"backdrop",Vn(Ct({key:1},de.value)),()=>[p(g)?(w(),Q(kl,Vn(Ct({key:0},p(E))),{default:J(()=>[sr(T("div",{class:$e(["offcanvas-backdrop",{fade:!p(y),show:p(M)||p(y)}]),onClick:j[2]||(j[2]=te=>p(b)("backdrop"))},null,2),[[Ic,V.value]])]),_:1},16)):re("",!0)],!0)]),_:3},8,["to","disabled"]))}}),QD=X0(ZD,[["__scopeId","data-v-77d852fe"]]),JD="300px",eE=se({__name:"BTableSimple",props:{bordered:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},borderVariant:{default:null},captionTop:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},fixed:{type:Boolean,default:!1},hover:{type:Boolean,default:!1},id:{default:void 0},noBorderCollapse:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},responsive:{type:[Boolean,String],default:!1},small:{type:Boolean,default:!1},stacked:{type:[Boolean,String],default:!1},stickyHeader:{type:[Boolean,String,Number],default:!1},striped:{type:Boolean,default:!1},stripedColumns:{type:Boolean,default:!1},variant:{default:null},tableAttrs:{default:void 0},tableClass:{default:void 0}},setup(t){const n=zt(t,"BTableSimple"),o=ko(()=>n.id),r=Ms(k(()=>({borderVariant:n.borderVariant}))),i=k(()=>[n.tableClass,"table","b-table",r.value,{border:n.outlined,"table-bordered":n.bordered,"table-borderless":n.borderless,"caption-top":n.captionTop,"table-dark":n.dark,"table-hover":n.hover,"b-table-stacked":n.stacked===!0,[`b-table-stacked-${n.stacked}`]:typeof n.stacked=="string","table-striped":n.striped,"table-sm":n.small,[`table-${n.variant}`]:n.variant!==null,"table-striped-columns":n.stripedColumns}]),s=k(()=>({id:o.value,class:i.value,...n.tableAttrs})),a=E7(k(()=>(n.stickyHeader===!0?JD:n.stickyHeader)||NaN)),l=k(()=>n.stickyHeader!==!1),c=k(()=>n.responsive!==!1||l.value),u=k(()=>l.value?{maxHeight:a.value}:void 0),d=k(()=>({"table-responsive":n.responsive===!0,[`table-responsive-${n.responsive}`]:typeof n.responsive=="string","b-table-sticky-header":l.value}));return(f,h)=>c.value?(w(),N("div",{key:0,class:$e(d.value),style:Pt(u.value)},[T("table",Vn(er(s.value)),[Ce(f.$slots,"default")],16)],6)):(w(),N("table",Vn(Ct({key:1},s.value)),[Ce(f.$slots,"default")],16))}}),Dd=se({__name:"BTooltip",props:nt({interactive:{type:Boolean,default:void 0},boundary:{},boundaryPadding:{},click:{type:Boolean,default:void 0},closeOnHide:{type:Boolean},content:{default:void 0},customClass:{default:void 0},delay:{default:void 0},floatingMiddleware:{default:void 0},hideMargin:{},id:{default:void 0},inline:{type:Boolean,default:void 0},manual:{type:Boolean,default:void 0},noAutoClose:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},noHide:{type:Boolean,default:void 0},noShift:{type:Boolean,default:void 0},noSize:{type:Boolean},noninteractive:{type:Boolean,default:void 0},offset:{default:void 0},placement:{default:void 0},realtime:{type:Boolean,default:void 0},reference:{default:void 0},strategy:{default:void 0},target:{default:void 0},title:{default:void 0},variant:{default:void 0},teleportDisabled:{type:Boolean,default:void 0},teleportTo:{default:void 0},initialAnimation:{type:Boolean,default:!1},noAnimation:{type:Boolean},noFade:{type:Boolean,default:void 0},lazy:{type:Boolean,default:void 0},unmountLazy:{type:Boolean,default:void 0},show:{type:Boolean,default:void 0},transProps:{},visible:{type:Boolean,default:void 0}},{modelValue:{type:Boolean,default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const o=zt(t,"BTooltip"),r=ns(),i=ft(t,"modelValue"),s=k(()=>{const{interactive:l,noninteractive:c,...u}=o;return{noninteractive:c!==void 0?c:!l,...u}}),a=pt("_popover");return e({hide:()=>{var l;(l=a.value)==null||l.hide()},show:()=>{var l;(l=a.value)==null||l.show()},toggle:()=>{var l;(l=a.value)==null||l.toggle()}}),(l,c)=>(w(),Q(e4,Ct({ref:"_popover"},s.value,{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),tooltip:""}),hi({_:2},[r.default?{name:"default",fn:J(()=>[Ce(l.$slots,"default")]),key:"0"}:void 0,r.target?{name:"target",fn:J(u=>[Ce(l.$slots,"target",Vn(er(u)))]),key:"1"}:void 0,r.title?{name:"title",fn:J(()=>[Ce(l.$slots,"title")]),key:"2"}:void 0]),1040,["modelValue"]))}}),tE=se({__name:"BTbody",props:{variant:{default:null}},setup(t){const n=zt(t,"BTbody"),o=k(()=>({[`thead-${n.variant}`]:n.variant!==null}));return(r,i)=>(w(),N("tbody",{class:$e(o.value)},[Ce(r.$slots,"default")],2))}}),nE=["scope","colspan","rowspan","data-label"],oE={key:0},Vw=se({__name:"BTd",props:{colspan:{default:void 0},rowspan:{default:void 0},stackedHeading:{default:void 0},stickyColumn:{type:Boolean,default:!1},variant:{default:null}},setup(t){const n=zt(t,"BTd"),o=k(()=>({[`table-${n.variant}`]:n.variant!==null,"b-table-sticky-column":n.stickyColumn,"table-b-table-default":n.stickyColumn&&n.variant===null})),r=k(()=>n.colspan?"colspan":n.rowspan?"rowspan":"col");return(i,s)=>(w(),N("td",{scope:r.value,class:$e(o.value),colspan:p(n).colspan,rowspan:p(n).rowspan,"data-label":p(n).stackedHeading},[p(n).stackedHeading?(w(),N("div",oE,[Ce(i.$slots,"default")])):Ce(i.$slots,"default",{key:1})],10,nE))}}),rE=["scope","colspan","rowspan","data-label"],iE={key:0},zw=se({__name:"BTh",props:{colspan:{default:void 0},rowspan:{default:void 0},stackedHeading:{default:void 0},stickyColumn:{type:Boolean,default:!1},variant:{default:null}},setup(t){const n=zt(t,"BTh"),o=k(()=>({[`table-${n.variant}`]:n.variant!==null,"b-table-sticky-column":n.stickyColumn,"table-b-table-default":n.stickyColumn&&n.variant===null})),r=k(()=>n.colspan?"colspan":n.rowspan?"rowspan":"col");return(i,s)=>(w(),N("th",{scope:r.value,class:$e(o.value),colspan:p(n).colspan,rowspan:p(n).rowspan,"data-label":p(n).stackedHeading},[p(n).stackedHeading!==void 0?(w(),N("div",iE,[Ce(i.$slots,"default")])):Ce(i.$slots,"default",{key:1})],10,rE))}}),sE=se({__name:"BThead",props:{variant:{default:null}},setup(t){const n=zt(t,"BThead"),o=k(()=>({[`table-${n.variant}`]:n.variant!==null}));return(r,i)=>(w(),N("thead",{class:$e(o.value)},[Ce(r.$slots,"default")],2))}}),Hw=se({__name:"BTr",props:{variant:{default:null}},setup(t){const n=zt(t,"BTr"),o=k(()=>({[`table-${n.variant}`]:n.variant!==null}));return(r,i)=>(w(),N("tr",{class:$e(o.value)},[Ce(r.$slots,"default")],2))}});Object.freeze(Object.keys({bordered:0,borderless:0,borderVariant:0,captionTop:0,dark:0,fixed:0,hover:0,id:0,noBorderCollapse:0,outlined:0,responsive:0,small:0,stacked:0,stickyHeader:0,striped:0,stripedColumns:0,variant:0,tableAttrs:0,tableClass:0}));Object.freeze(Object.keys({align:0,caption:0,detailsTdClass:0,fieldColumnClass:0,fields:0,footClone:0,footRowVariant:0,footVariant:0,headRowVariant:0,headVariant:0,items:0,labelStacked:0,modelValue:0,primaryKey:0,tbodyClass:0,tbodyTrAttrs:0,tbodyTrClass:0,tfootClass:0,tfootTrClass:0,theadClass:0,theadTrClass:0}));const w4={BAccordion:"/components/BAccordion",BAccordionItem:"/components/BAccordion",BAlert:"/components/BAlert",BAvatar:"/components/BAvatar",BAvatarGroup:"/components/BAvatar",BBadge:"/components/BBadge",BBreadcrumb:"/components/BBreadcrumb",BBreadcrumbItem:"/components/BBreadcrumb",BButton:"/components/BButton",BButtonGroup:"/components/BButton",BButtonToolbar:"/components/BButton",BCloseButton:"/components/BButton",BCard:"/components/BCard",BCardBody:"/components/BCard",BCardFooter:"/components/BCard",BCardGroup:"/components/BCard",BCardHeader:"/components/BCard",BCardImg:"/components/BCard",BCardSubtitle:"/components/BCard",BCardText:"/components/BCard",BCardTitle:"/components/BCard",BCarousel:"/components/BCarousel",BCarouselSlide:"/components/BCarousel",BCol:"/components/BContainer",BCollapse:"/components/BCollapse",BContainer:"/components/BContainer",BDropdown:"/components/BDropdown",BDropdownDivider:"/components/BDropdown",BDropdownForm:"/components/BDropdown",BDropdownGroup:"/components/BDropdown",BDropdownHeader:"/components/BDropdown",BDropdownItem:"/components/BDropdown",BDropdownItemButton:"/components/BDropdown",BDropdownText:"/components/BDropdown",BForm:"/components/BForm",BFormCheckbox:"/components/BFormCheckbox",BFormCheckboxGroup:"/components/BFormCheckbox",BFormDatalist:"/components/BForm",BFormFile:"/components/BFormFile",BFormFloatingLabel:"/components/BForm",BFormGroup:"/components/BFormGroup",BFormInput:"/components/BFormInput",BFormInvalidFeedback:"/components/BForm",BFormRadio:"/components/BFormRadio",BFormRadioGroup:"/components/BFormRadio",BFormRow:"/components/BForm",BFormSelect:"/components/BFormSelect",BFormSelectOption:"/components/BFormSelect",BFormSelectOptionGroup:"/components/BFormSelect",BFormSpinbutton:"/components/BFormSpinbutton",BFormTag:"/components/BFormTags",BFormTags:"/components/BFormTags",BFormText:"/components/BForm",BFormTextarea:"/components/BFormTextarea",BFormValidFeedback:"/components/BForm",BImg:"/components/BImg",BInput:"/components/BFormInput",BInputGroup:"/components/BInputGroup",BInputGroupText:"/components/BInputGroup",BListGroup:"/components/BListGroup",BListGroupItem:"/components/BListGroup",BModal:"/components/BModal",BModalOrchestrator:"/components/BModal",BNav:"/components/BNav",BNavForm:"/components/BNav",BNavItem:"/components/BNav",BNavItemDropdown:"/components/BNav",BNavText:"/components/BNav",BNavbar:"/components/BNavbar",BNavbarBrand:"/components/BNavbar",BNavbarNav:"/components/BNavbar",BNavbarToggle:"/components/BNavbar",BOffcanvas:"/components/BOffcanvas",BOverlay:"/components/BOverlay",BPagination:"/components/BPagination",BPlaceholder:"/components/BPlaceholder",BPlaceholderButton:"/components/BPlaceholder",BPlaceholderCard:"/components/BPlaceholder",BPlaceholderTable:"/components/BPlaceholder",BPlaceholderWrapper:"/components/BPlaceholder",BPopover:"/components/BPopover",BProgress:"/components/BProgress",BRow:"/components/BContainer",BSpinner:"/components/BSpinner",BTab:"/components/BTabs",BTabs:"/components/BTabs",BToast:"/components/BToast",BToastOrchestrator:"/components/BToast",BTooltip:"/components/BTooltip",BLink:"/components/BLink",BProgressBar:"/components/BProgress",BTableSimple:"/components/BTable",BTableLite:"/components/BTable",BTable:"/components/BTable",BTbody:"/components/BTable",BTd:"/components/BTable",BTh:"/components/BTable",BThead:"/components/BTable",BTfoot:"/components/BTable",BTr:"/components/BTable",BPopoverOrchestrator:"/components/BPopover"},aE=Object.freeze(Object.keys(w4)),_4={vBColorMode:"/directives/BColorMode",vBModal:"/directives/BModal",vBPopover:"/directives/BPopover",vBScrollspy:"/directives/BScrollspy",vBToggle:"/directives/BToggle",vBTooltip:"/directives/BTooltip"},lE=Object.freeze(Object.keys(_4)),cE={useBreadcrumb:"/composables/useBreadcrumb",useColorMode:"/composables/useColorMode",useModal:"/composables/useModal",useModalController:"/composables/useModalController",useScrollspy:"/composables/useScrollspy",useToastController:"/composables/useToastController",usePopoverController:"/composables/usePopoverController"};Object.freeze(Object.keys(cE));const Ww="bootstrap-vue-next",Uw=(t,e)=>{const{all:n,...o}=t,r={};n&&e.forEach(s=>{r[s]=n});const i={...r,...o};return Object.entries(i).filter(([s,a])=>!!a&&e.includes(s)).map(([s])=>s)},Og=new Set,Gw=new Set;Object.assign(({aliases:t={},directives:e=!0,components:n=!0}={})=>{const r=Uw(typeof n=="boolean"?{all:n}:n,aE).reduce((l,c)=>(l.set(c,`${Ww}${w4[c]}`),l),new Map),s=Uw(typeof e=="boolean"?{all:e}:e,lE).reduce((l,c)=>{const u=c.toLowerCase().startsWith("v")?c:`v${c}`;return l.set(u,`${Ww}${_4[u]}`),l},new Map);return[{type:"component",resolve(l){const c=r.get(l),u=r.get(t[l]);if(u){const d=t[l];return Og.add(d),{name:d,from:u}}if(c)return Og.add(l),{name:l,from:c}}},{type:"directive",resolve(l){const c=`v${l}`,u=s.get(c);if(u)return Gw.add(c),{name:c,from:u}}}]},{__usedComponents:Og,__usedDirectives:Gw});const uE={install(t,e){const n=(e==null?void 0:e.components)??{};t.provide(Eh,Ie(n))}},dE={install(t){const e=Ie([]),n=()=>{e.value.splice(0,e.value.length)};t.provide(UL,{items:e,reset:n})}},fE={install(t){const e=Ie(new Map),n=()=>{let l=()=>{};return{value:new Promise(u=>{l=u}),resolve:l}},o=l=>[n(),l||Symbol("Modals controller"),!0],r=(l={})=>{var c;const u=Vt(l.props),[d,f,h]=o((c=u.value)==null?void 0:c.id);return e.value.set(f,{component:l.component?Te(l.component):void 0,props:{...u.value,_isConfirm:!1,_promise:d,_modelValue:h}}),Ve(u,g=>{const b=e.value.get(f);b&&e.value.set(f,{component:l.component?Te(l.component):void 0,props:{...b.props,...g}})}),d.value},i=(l={})=>{var c;const u=Vt(l.props),[d,f,h]=o((c=u.value)==null?void 0:c.id);return e.value.set(f,{component:l.component?Te(l.component):void 0,props:{...u.value,_isConfirm:!0,_promise:d,_modelValue:h}}),Ve(u,g=>{const b=e.value.get(f);b&&e.value.set(f,{component:l.component?Te(l.component):void 0,props:{...b.props,...g}})}),d.value},s=l=>{const c=e.value.get(l);c!=null&&c.props&&(c.props={...c.props,_modelValue:!1})},a=l=>{e.value.delete(l)};t.provide(YL,{modals:e,remove:a,show:r,confirm:i,leave:s})}},hE={install(t){const e=Ie(new Map),n=k(()=>e.value.size),o=k(()=>[...e.value.values()]),r=k(()=>o.value[o.value.length-1]),i=u=>{e.value.set(u.uid,u)},s=u=>{e.value.delete(u.uid)},a=Ie(new Map),l=u=>{a.value.set(u.uid,u)},c=u=>{a.value.delete(u.uid)};t.provide(A3,{countStack:n,lastStack:r,registry:io(a),stack:o,pushStack:i,removeStack:s,pushRegistry:l,removeRegistry:c})}},pE={install(t){const e=Ie(new Map),n=c=>{var u;const d=Vt(c),f=((u=d.value)==null?void 0:u.id)||Symbol("Popover controller");return Ve(d,h=>{e.value.set(f,{...h,...typeof h.modelValue<"u"&&Ke(c)?{"onUpdate:modelValue":g=>{var b;(b=h["onUpdate:modelValue"])==null||b.call(h,g),c.value.modelValue=g}}:{}})},{immediate:!0,deep:!0}),wa(()=>e.value.delete(f),!0),f},o=(c,u)=>{const d=e.value.get(c);d&&e.value.set(c,{...d,...bt(u)})},r=c=>e.value.delete(c),i=Ie(new Map),s=c=>{var u;const d=Vt(c),f=((u=d.value)==null?void 0:u.id)||Symbol("Tooltip controller");return Ve(d,h=>{e.value.set(f,{...h,...typeof h.modelValue<"u"&&Ke(c)?{"onUpdate:modelValue":g=>{var b;(b=h["onUpdate:modelValue"])==null||b.call(h,g),c.value.modelValue=g}}:{}})},{immediate:!0,deep:!0}),wa(()=>i.value.delete(f),!0),f},a=(c,u)=>{const d=i.value.get(c);d&&i.value.set(c,{...d,...bt(u)})},l=c=>i.value.delete(c);t.provide(jL,{popovers:e,tooltips:i,tooltip:s,popover:n,setPopover:o,setTooltip:a,removePopover:r,removeTooltip:l})}},mE={install(t,e){var n,o;const s=typeof(e==null?void 0:e.rtl)=="boolean"?!1:((n=e==null?void 0:e.rtl)==null?void 0:n.rtlInitial)??!1,a=typeof(e==null?void 0:e.rtl)=="boolean"?void 0:((o=e==null?void 0:e.rtl)==null?void 0:o.localeInitial)??void 0,l=Ie(s),c=Ie(a);t.provide(WL,{isRtl:l,locale:c})}},gE="top-end",vE={install(t){const e=Ie([]),n=Ie(!1),o=a=>{n.value=a},r=(a={})=>{var l,c,u,d;const f=Vt(a.props),h=((l=f.value)==null?void 0:l.id)||Symbol("Toast controller"),g={component:a.component?Te(a.component):void 0,props:{...f.value,pos:((c=f.value)==null?void 0:c.pos)||gE,_modelValue:((u=f.value)==null?void 0:u.value)||5e3,_self:h}};return(((d=f.value)==null?void 0:d.appendToast)!==void 0?f.value.appendToast:n.value)?e.value.push(g):e.value.unshift(g),Ve(f,b=>{const m=e.value.findIndex(v=>v.props._self===h);m!==-1&&e.value.splice(m,1,{component:a.component?Te(a.component):void 0,props:{...e.value[m].props,...b,_modelValue:(b==null?void 0:b.value)||e.value[m].props._modelValue||5e3}})}),h},i=a=>{e.value=e.value.filter(l=>l.props._self!==a)},s=a=>{const l=e.value.findIndex(c=>c.props._self===a);l!==-1&&e.value.splice(l,1,{component:e.value[l].component?Te(e.value[l].component):void 0,props:{...e.value[l].props,_modelValue:!1}})};t.provide(qL,{_setIsAppend:o,toasts:e,show:r,remove:i,leave:s})}},bE={install(t){const e=ar({}),n=({id:o,value:r,toggle:i,show:s,hide:a})=>(e[o]=k(()=>({value:r.value,toggle:i,show:s,hide:a})),{unregister(){delete e[o]}});n.map=io(e),t.provide(S3,n)}},yE=(t={})=>({install(e){(t.breadcrumb??!0)&&e.use(dE),(t.modalController??!0)&&e.use(fE),(t.modalManager??!0)&&e.use(hE),((t.rtl??!0)||typeof t.rtl=="object")&&e.use(mE,t),(t.toast??!0)&&e.use(vE),(t.popover??!0)&&e.use(pE),e.use(bE),e.use(uE,t)}});/*!
|
|
31
|
+
* vue-router v4.6.4
|
|
32
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
33
|
+
* @license MIT
|
|
34
|
+
*/const fc=typeof document<"u";function S4(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function xE(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&S4(t.default)}const Xt=Object.assign;function Bg(t,e){const n={};for(const o in e){const r=e[o];n[o]=vi(r)?r.map(t):t(r)}return n}const hd=()=>{},vi=Array.isArray;function qw(t,e){const n={};for(const o in t)n[o]=o in e?e[o]:t[o];return n}const k4=/#/g,wE=/&/g,_E=/\//g,SE=/=/g,kE=/\?/g,C4=/\+/g,CE=/%5B/g,AE=/%5D/g,A4=/%5E/g,$E=/%60/g,$4=/%7B/g,TE=/%7C/g,T4=/%7D/g,ME=/%20/g;function uy(t){return t==null?"":encodeURI(""+t).replace(TE,"|").replace(CE,"[").replace(AE,"]")}function OE(t){return uy(t).replace($4,"{").replace(T4,"}").replace(A4,"^")}function i1(t){return uy(t).replace(C4,"%2B").replace(ME,"+").replace(k4,"%23").replace(wE,"%26").replace($E,"`").replace($4,"{").replace(T4,"}").replace(A4,"^")}function BE(t){return i1(t).replace(SE,"%3D")}function LE(t){return uy(t).replace(k4,"%23").replace(kE,"%3F")}function PE(t){return LE(t).replace(_E,"%2F")}function Ed(t){if(t==null)return null;try{return decodeURIComponent(""+t)}catch{}return""+t}const DE=/\/$/,EE=t=>t.replace(DE,"");function Lg(t,e,n="/"){let o,r={},i="",s="";const a=e.indexOf("#");let l=e.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(o=e.slice(0,l),i=e.slice(l,a>0?a:e.length),r=t(i.slice(1))),a>=0&&(o=o||e.slice(0,a),s=e.slice(a,e.length)),o=FE(o??e,n),{fullPath:o+i+s,path:o,query:r,hash:Ed(s)}}function IE(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Yw(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function NE(t,e,n){const o=e.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hc(e.matched[o],n.matched[r])&&M4(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Hc(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function M4(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!RE(t[n],e[n]))return!1;return!0}function RE(t,e){return vi(t)?jw(t,e):vi(e)?jw(e,t):(t==null?void 0:t.valueOf())===(e==null?void 0:e.valueOf())}function jw(t,e){return vi(e)?t.length===e.length&&t.every((n,o)=>n===e[o]):t.length===1&&t[0]===e}function FE(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),o=t.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,s,a;for(s=0;s<o.length;s++)if(a=o[s],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(s).join("/")}const na={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let s1=(function(t){return t.pop="pop",t.push="push",t})({}),Pg=(function(t){return t.back="back",t.forward="forward",t.unknown="",t})({});function VE(t){if(!t)if(fc){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),EE(t)}const zE=/^[^#]+#/;function HE(t,e){return t.replace(zE,"#")+e}function WE(t,e){const n=document.documentElement.getBoundingClientRect(),o=t.getBoundingClientRect();return{behavior:e.behavior,left:o.left-n.left-(e.left||0),top:o.top-n.top-(e.top||0)}}const nm=()=>({left:window.scrollX,top:window.scrollY});function UE(t){let e;if("el"in t){const n=t.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;e=WE(r,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function Xw(t,e){return(history.state?history.state.position-e:-1)+t}const a1=new Map;function GE(t,e){a1.set(t,e)}function qE(t){const e=a1.get(t);return a1.delete(t),e}function YE(t){return typeof t=="string"||t&&typeof t=="object"}function O4(t){return typeof t=="string"||typeof t=="symbol"}let yn=(function(t){return t[t.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",t[t.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",t[t.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",t[t.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",t[t.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",t})({});const B4=Symbol("");yn.MATCHER_NOT_FOUND+"",yn.NAVIGATION_GUARD_REDIRECT+"",yn.NAVIGATION_ABORTED+"",yn.NAVIGATION_CANCELLED+"",yn.NAVIGATION_DUPLICATED+"";function Wc(t,e){return Xt(new Error,{type:t,[B4]:!0},e)}function ls(t,e){return t instanceof Error&&B4 in t&&(e==null||!!(t.type&e))}const jE=["params","query","hash"];function XE(t){if(typeof t=="string")return t;if(t.path!=null)return t.path;const e={};for(const n of jE)n in t&&(e[n]=t[n]);return JSON.stringify(e,null,2)}function KE(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let o=0;o<n.length;++o){const r=n[o].replace(C4," "),i=r.indexOf("="),s=Ed(i<0?r:r.slice(0,i)),a=i<0?null:Ed(r.slice(i+1));if(s in e){let l=e[s];vi(l)||(l=e[s]=[l]),l.push(a)}else e[s]=a}return e}function Kw(t){let e="";for(let n in t){const o=t[n];if(n=BE(n),o==null){o!==void 0&&(e+=(e.length?"&":"")+n);continue}(vi(o)?o.map(r=>r&&i1(r)):[o&&i1(o)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function ZE(t){const e={};for(const n in t){const o=t[n];o!==void 0&&(e[n]=vi(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return e}const L4=Symbol(""),Zw=Symbol(""),om=Symbol(""),dy=Symbol(""),l1=Symbol("");function Du(){let t=[];function e(o){return t.push(o),()=>{const r=t.indexOf(o);r>-1&&t.splice(r,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function QE(t,e,n){const o=()=>{t[e].delete(n)};Us(o),Bk(o),Wb(()=>{t[e].add(n)}),t[e].add(n)}function JE(t){const e=en(L4,{}).value;e&&QE(e,"leaveGuards",t)}function la(t,e,n,o,r,i=s=>s()){const s=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(Wc(yn.NAVIGATION_ABORTED,{from:n,to:e})):f instanceof Error?l(f):YE(f)?l(Wc(yn.NAVIGATION_GUARD_REDIRECT,{from:e,to:f})):(s&&o.enterCallbacks[r]===s&&typeof f=="function"&&s.push(f),a())},u=i(()=>t.call(o&&o.instances[r],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function Dg(t,e,n,o,r=i=>i()){const i=[];for(const s of t)for(const a in s.components){let l=s.components[a];if(!(e!=="beforeRouteEnter"&&!s.instances[a]))if(S4(l)){const c=(l.__vccOpts||l)[e];c&&i.push(la(c,n,o,s,a,r))}else{let c=l();i.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${s.path}"`);const d=xE(u)?u.default:u;s.mods[a]=u,s.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&la(f,n,o,s,a,r)()}))}}return i}function eI(t,e){const n=[],o=[],r=[],i=Math.max(e.matched.length,t.matched.length);for(let s=0;s<i;s++){const a=e.matched[s];a&&(t.matched.find(c=>Hc(c,a))?o.push(a):n.push(a));const l=t.matched[s];l&&(e.matched.find(c=>Hc(c,l))||r.push(l))}return[n,o,r]}/*!
|
|
35
|
+
* vue-router v4.6.4
|
|
36
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
37
|
+
* @license MIT
|
|
38
|
+
*/let tI=()=>location.protocol+"//"+location.host;function P4(t,e){const{pathname:n,search:o,hash:r}=e,i=t.indexOf("#");if(i>-1){let s=r.includes(t.slice(i))?t.slice(i).length:1,a=r.slice(s);return a[0]!=="/"&&(a="/"+a),Yw(a,"")}return Yw(n,t)+o+r}function nI(t,e,n,o){let r=[],i=[],s=null;const a=({state:f})=>{const h=P4(t,location),g=n.value,b=e.value;let m=0;if(f){if(n.value=h,e.value=f,s&&s===g){s=null;return}m=b?f.position-b.position:0}else o(h);r.forEach(v=>{v(n.value,g,{delta:m,type:s1.pop,direction:m?m>0?Pg.forward:Pg.back:Pg.unknown})})};function l(){s=n.value}function c(f){r.push(f);const h=()=>{const g=r.indexOf(f);g>-1&&r.splice(g,1)};return i.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(Xt({},f.state,{scroll:nm()}),"")}}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:c,destroy:d}}function Qw(t,e,n,o=!1,r=!1){return{back:t,current:e,forward:n,replaced:o,position:window.history.length,scroll:r?nm():null}}function oI(t){const{history:e,location:n}=window,o={value:P4(t,n)},r={value:e.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:tI()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function s(l,c){i(l,Xt({},e.state,Qw(r.value.back,l,r.value.forward,!0),c,{position:r.value.position}),!0),o.value=l}function a(l,c){const u=Xt({},r.value,e.state,{forward:l,scroll:nm()});i(u.current,u,!0),i(l,Xt({},Qw(o.value,l,null),{position:u.position+1},c),!1),o.value=l}return{location:o,state:r,push:a,replace:s}}function rI(t){t=VE(t);const e=oI(t),n=nI(t,e.state,e.location,e.replace);function o(i,s=!0){s||n.pauseListeners(),history.go(i)}const r=Xt({location:"",base:t,go:o,createHref:HE.bind(null,t)},e,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function iI(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),rI(t)}let hl=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.Group=2]="Group",t})({});var Fn=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.ParamRegExp=2]="ParamRegExp",t[t.ParamRegExpEnd=3]="ParamRegExpEnd",t[t.EscapeNext=4]="EscapeNext",t})(Fn||{});const sI={type:hl.Static,value:""},aI=/[a-zA-Z0-9_]/;function lI(t){if(!t)return[[]];if(t==="/")return[[sI]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=Fn.Static,o=n;const r=[];let i;function s(){i&&r.push(i),i=[]}let a=0,l,c="",u="";function d(){c&&(n===Fn.Static?i.push({type:hl.Static,value:c}):n===Fn.Param||n===Fn.ParamRegExp||n===Fn.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:hl.Param,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==Fn.ParamRegExp){o=n,n=Fn.EscapeNext;continue}switch(n){case Fn.Static:l==="/"?(c&&d(),s()):l===":"?(d(),n=Fn.Param):f();break;case Fn.EscapeNext:f(),n=o;break;case Fn.Param:l==="("?n=Fn.ParamRegExp:aI.test(l)?f():(d(),n=Fn.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Fn.ParamRegExp:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=Fn.ParamRegExpEnd:u+=l;break;case Fn.ParamRegExpEnd:d(),n=Fn.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===Fn.ParamRegExp&&e(`Unfinished custom RegExp for param "${c}"`),d(),s(),r}const Jw="[^/]+?",cI={sensitive:!1,strict:!1,start:!0,end:!0};var Fo=(function(t){return t[t._multiplier=10]="_multiplier",t[t.Root=90]="Root",t[t.Segment=40]="Segment",t[t.SubSegment=30]="SubSegment",t[t.Static=40]="Static",t[t.Dynamic=20]="Dynamic",t[t.BonusCustomRegExp=10]="BonusCustomRegExp",t[t.BonusWildcard=-50]="BonusWildcard",t[t.BonusRepeatable=-20]="BonusRepeatable",t[t.BonusOptional=-8]="BonusOptional",t[t.BonusStrict=.7000000000000001]="BonusStrict",t[t.BonusCaseSensitive=.25]="BonusCaseSensitive",t})(Fo||{});const uI=/[.+*?^${}()[\]/\\]/g;function dI(t,e){const n=Xt({},cI,e),o=[];let r=n.start?"^":"";const i=[];for(const c of t){const u=c.length?[]:[Fo.Root];n.strict&&!c.length&&(r+="/");for(let d=0;d<c.length;d++){const f=c[d];let h=Fo.Segment+(n.sensitive?Fo.BonusCaseSensitive:0);if(f.type===hl.Static)d||(r+="/"),r+=f.value.replace(uI,"\\$&"),h+=Fo.Static;else if(f.type===hl.Param){const{value:g,repeatable:b,optional:m,regexp:v}=f;i.push({name:g,repeatable:b,optional:m});const y=v||Jw;if(y!==Jw){h+=Fo.BonusCustomRegExp;try{`${y}`}catch(_){throw new Error(`Invalid custom RegExp for param "${g}" (${y}): `+_.message)}}let x=b?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;d||(x=m&&c.length<2?`(?:/${x})`:"/"+x),m&&(x+="?"),r+=x,h+=Fo.Dynamic,m&&(h+=Fo.BonusOptional),b&&(h+=Fo.BonusRepeatable),y===".*"&&(h+=Fo.BonusWildcard)}u.push(h)}o.push(u)}if(n.strict&&n.end){const c=o.length-1;o[c][o[c].length-1]+=Fo.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const s=new RegExp(r,n.sensitive?"":"i");function a(c){const u=c.match(s),d={};if(!u)return null;for(let f=1;f<u.length;f++){const h=u[f]||"",g=i[f-1];d[g.name]=h&&g.repeatable?h.split("/"):h}return d}function l(c){let u="",d=!1;for(const f of t){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const h of f)if(h.type===hl.Static)u+=h.value;else if(h.type===hl.Param){const{value:g,repeatable:b,optional:m}=h,v=g in c?c[g]:"";if(vi(v)&&!b)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const y=vi(v)?v.join("/"):v;if(!y)if(m)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);u+=y}}return u||"/"}return{re:s,score:o,keys:i,parse:a,stringify:l}}function fI(t,e){let n=0;for(;n<t.length&&n<e.length;){const o=e[n]-t[n];if(o)return o;n++}return t.length<e.length?t.length===1&&t[0]===Fo.Static+Fo.Segment?-1:1:t.length>e.length?e.length===1&&e[0]===Fo.Static+Fo.Segment?1:-1:0}function D4(t,e){let n=0;const o=t.score,r=e.score;for(;n<o.length&&n<r.length;){const i=fI(o[n],r[n]);if(i)return i;n++}if(Math.abs(r.length-o.length)===1){if(e_(o))return 1;if(e_(r))return-1}return r.length-o.length}function e_(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const hI={strict:!1,end:!0,sensitive:!1};function pI(t,e,n){const o=dI(lI(t.path),n),r=Xt(o,{record:t,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function mI(t,e){const n=[],o=new Map;e=qw(hI,e);function r(d){return o.get(d)}function i(d,f,h){const g=!h,b=n_(d);b.aliasOf=h&&h.record;const m=qw(e,d),v=[b];if("alias"in d){const _=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of _)v.push(n_(Xt({},b,{components:h?h.record.components:b.components,path:S,aliasOf:h?h.record:b})))}let y,x;for(const _ of v){const{path:S}=_;if(f&&S[0]!=="/"){const E=f.record.path,M=E[E.length-1]==="/"?"":"/";_.path=f.record.path+(S&&M+S)}if(y=pI(_,f,m),h?h.alias.push(y):(x=x||y,x!==y&&x.alias.push(y),g&&d.name&&!o_(y)&&s(d.name)),E4(y)&&l(y),b.children){const E=b.children;for(let M=0;M<E.length;M++)i(E[M],y,h&&h.children[M])}h=h||y}return x?()=>{s(x)}:hd}function s(d){if(O4(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(s),f.alias.forEach(s))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(s),d.alias.forEach(s))}}function a(){return n}function l(d){const f=bI(d,n);n.splice(f,0,d),d.record.name&&!o_(d)&&o.set(d.record.name,d)}function c(d,f){let h,g={},b,m;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw Wc(yn.MATCHER_NOT_FOUND,{location:d});m=h.record.name,g=Xt(t_(f.params,h.keys.filter(x=>!x.optional).concat(h.parent?h.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&t_(d.params,h.keys.map(x=>x.name))),b=h.stringify(g)}else if(d.path!=null)b=d.path,h=n.find(x=>x.re.test(b)),h&&(g=h.parse(b),m=h.record.name);else{if(h=f.name?o.get(f.name):n.find(x=>x.re.test(f.path)),!h)throw Wc(yn.MATCHER_NOT_FOUND,{location:d,currentLocation:f});m=h.record.name,g=Xt({},f.params,d.params),b=h.stringify(g)}const v=[];let y=h;for(;y;)v.unshift(y.record),y=y.parent;return{name:m,path:b,params:g,matched:v,meta:vI(v)}}t.forEach(d=>i(d));function u(){n.length=0,o.clear()}return{addRoute:i,resolve:c,removeRoute:s,clearRoutes:u,getRoutes:a,getRecordMatcher:r}}function t_(t,e){const n={};for(const o of e)o in t&&(n[o]=t[o]);return n}function n_(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:gI(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function gI(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const o in t.components)e[o]=typeof n=="object"?n[o]:n;return e}function o_(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function vI(t){return t.reduce((e,n)=>Xt(e,n.meta),{})}function bI(t,e){let n=0,o=e.length;for(;n!==o;){const i=n+o>>1;D4(t,e[i])<0?o=i:n=i+1}const r=yI(t);return r&&(o=e.lastIndexOf(r,o-1)),o}function yI(t){let e=t;for(;e=e.parent;)if(E4(e)&&D4(t,e)===0)return e}function E4({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function r_(t){const e=en(om),n=en(dy),o=k(()=>{const l=p(t.to);return e.resolve(l)}),r=k(()=>{const{matched:l}=o.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Hc.bind(null,u));if(f>-1)return f;const h=i_(l[c-2]);return c>1&&i_(u)===h&&d[d.length-1].path!==h?d.findIndex(Hc.bind(null,l[c-2])):f}),i=k(()=>r.value>-1&&kI(n.params,o.value.params)),s=k(()=>r.value>-1&&r.value===n.matched.length-1&&M4(n.params,o.value.params));function a(l={}){if(SI(l)){const c=e[p(t.replace)?"replace":"push"](p(t.to)).catch(hd);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:o,href:k(()=>o.value.href),isActive:i,isExactActive:s,navigate:a}}function xI(t){return t.length===1?t[0]:t}const wI=se({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:r_,setup(t,{slots:e}){const n=ar(r_(t)),{options:o}=en(om),r=k(()=>({[s_(t.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[s_(t.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=e.default&&xI(e.default(n));return t.custom?i:Rt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),_I=wI;function SI(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function kI(t,e){for(const n in e){const o=e[n],r=t[n];if(typeof o=="string"){if(o!==r)return!1}else if(!vi(r)||r.length!==o.length||o.some((i,s)=>i.valueOf()!==r[s].valueOf()))return!1}return!0}function i_(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const s_=(t,e,n)=>t??e??n,CI=se({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const o=en(l1),r=k(()=>t.route||o.value),i=en(Zw,0),s=k(()=>{let c=p(i);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=k(()=>r.value.matched[s.value]);Ui(Zw,k(()=>s.value+1)),Ui(L4,a),Ui(l1,r);const l=Ie();return Ve(()=>[l.value,a.value,t.name],([c,u,d],[f,h,g])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Hc(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(b=>b(c))},{flush:"post"}),()=>{const c=r.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return a_(n.default,{Component:f,route:c});const h=d.props[u],g=h?h===!0?c.params:typeof h=="function"?h(c):h:null,m=Rt(f,Xt({},g,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return a_(n.default,{Component:m,route:c})||m}}});function a_(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const AI=CI;function $I(t){const e=mI(t.routes,t),n=t.parseQuery||KE,o=t.stringifyQuery||Kw,r=t.history,i=Du(),s=Du(),a=Du(),l=De(na);let c=na;fc&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Bg.bind(null,j=>""+j),d=Bg.bind(null,PE),f=Bg.bind(null,Ed);function h(j,te){let ne,me;return O4(j)?(ne=e.getRecordMatcher(j),me=te):me=j,e.addRoute(me,ne)}function g(j){const te=e.getRecordMatcher(j);te&&e.removeRoute(te)}function b(){return e.getRoutes().map(j=>j.record)}function m(j){return!!e.getRecordMatcher(j)}function v(j,te){if(te=Xt({},te||l.value),typeof j=="string"){const X=Lg(n,j,te.path),ae=e.resolve({path:X.path},te),le=r.createHref(X.fullPath);return Xt(X,ae,{params:f(ae.params),hash:Ed(X.hash),redirectedFrom:void 0,href:le})}let ne;if(j.path!=null)ne=Xt({},j,{path:Lg(n,j.path,te.path).path});else{const X=Xt({},j.params);for(const ae in X)X[ae]==null&&delete X[ae];ne=Xt({},j,{params:d(X)}),te.params=d(te.params)}const me=e.resolve(ne,te),ve=j.hash||"";me.params=u(f(me.params));const I=IE(o,Xt({},j,{hash:OE(ve),path:me.path})),W=r.createHref(I);return Xt({fullPath:I,hash:ve,query:o===Kw?ZE(j.query):j.query||{}},me,{redirectedFrom:void 0,href:W})}function y(j){return typeof j=="string"?Lg(n,j,l.value.path):Xt({},j)}function x(j,te){if(c!==j)return Wc(yn.NAVIGATION_CANCELLED,{from:te,to:j})}function _(j){return M(j)}function S(j){return _(Xt(y(j),{replace:!0}))}function E(j,te){const ne=j.matched[j.matched.length-1];if(ne&&ne.redirect){const{redirect:me}=ne;let ve=typeof me=="function"?me(j,te):me;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=y(ve):{path:ve},ve.params={}),Xt({query:j.query,hash:j.hash,params:ve.path!=null?{}:j.params},ve)}}function M(j,te){const ne=c=v(j),me=l.value,ve=j.state,I=j.force,W=j.replace===!0,X=E(ne,me);if(X)return M(Xt(y(X),{state:typeof X=="object"?Xt({},ve,X.state):ve,force:I,replace:W}),te||ne);const ae=ne;ae.redirectedFrom=te;let le;return!I&&NE(o,me,ne)&&(le=Wc(yn.NAVIGATION_DUPLICATED,{to:ae,from:me}),ue(me,me,!0,!1)),(le?Promise.resolve(le):P(ae,me)).catch(K=>ls(K)?ls(K,yn.NAVIGATION_GUARD_REDIRECT)?K:ie(K):V(K,ae,me)).then(K=>{if(K){if(ls(K,yn.NAVIGATION_GUARD_REDIRECT))return M(Xt({replace:W},y(K.to),{state:typeof K.to=="object"?Xt({},ve,K.to.state):ve,force:I}),te||ae)}else K=$(ae,me,!0,W,ve);return R(ae,me,K),K})}function C(j,te){const ne=x(j,te);return ne?Promise.reject(ne):Promise.resolve()}function O(j){const te=ce.values().next().value;return te&&typeof te.runWithContext=="function"?te.runWithContext(j):j()}function P(j,te){let ne;const[me,ve,I]=eI(j,te);ne=Dg(me.reverse(),"beforeRouteLeave",j,te);for(const X of me)X.leaveGuards.forEach(ae=>{ne.push(la(ae,j,te))});const W=C.bind(null,j,te);return ne.push(W),_e(ne).then(()=>{ne=[];for(const X of i.list())ne.push(la(X,j,te));return ne.push(W),_e(ne)}).then(()=>{ne=Dg(ve,"beforeRouteUpdate",j,te);for(const X of ve)X.updateGuards.forEach(ae=>{ne.push(la(ae,j,te))});return ne.push(W),_e(ne)}).then(()=>{ne=[];for(const X of I)if(X.beforeEnter)if(vi(X.beforeEnter))for(const ae of X.beforeEnter)ne.push(la(ae,j,te));else ne.push(la(X.beforeEnter,j,te));return ne.push(W),_e(ne)}).then(()=>(j.matched.forEach(X=>X.enterCallbacks={}),ne=Dg(I,"beforeRouteEnter",j,te,O),ne.push(W),_e(ne))).then(()=>{ne=[];for(const X of s.list())ne.push(la(X,j,te));return ne.push(W),_e(ne)}).catch(X=>ls(X,yn.NAVIGATION_CANCELLED)?X:Promise.reject(X))}function R(j,te,ne){a.list().forEach(me=>O(()=>me(j,te,ne)))}function $(j,te,ne,me,ve){const I=x(j,te);if(I)return I;const W=te===na,X=fc?history.state:{};ne&&(me||W?r.replace(j.fullPath,Xt({scroll:W&&X&&X.scroll},ve)):r.push(j.fullPath,ve)),l.value=j,ue(j,te,ne,W),ie()}let A;function L(){A||(A=r.listen((j,te,ne)=>{if(!de.listening)return;const me=v(j),ve=E(me,de.currentRoute.value);if(ve){M(Xt(ve,{replace:!0,force:!0}),me).catch(hd);return}c=me;const I=l.value;fc&&GE(Xw(I.fullPath,ne.delta),nm()),P(me,I).catch(W=>ls(W,yn.NAVIGATION_ABORTED|yn.NAVIGATION_CANCELLED)?W:ls(W,yn.NAVIGATION_GUARD_REDIRECT)?(M(Xt(y(W.to),{force:!0}),me).then(X=>{ls(X,yn.NAVIGATION_ABORTED|yn.NAVIGATION_DUPLICATED)&&!ne.delta&&ne.type===s1.pop&&r.go(-1,!1)}).catch(hd),Promise.reject()):(ne.delta&&r.go(-ne.delta,!1),V(W,me,I))).then(W=>{W=W||$(me,I,!1),W&&(ne.delta&&!ls(W,yn.NAVIGATION_CANCELLED)?r.go(-ne.delta,!1):ne.type===s1.pop&&ls(W,yn.NAVIGATION_ABORTED|yn.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),R(me,I,W)}).catch(hd)}))}let B=Du(),F=Du(),z;function V(j,te,ne){ie(j);const me=F.list();return me.length?me.forEach(ve=>ve(j,te,ne)):console.error(j),Promise.reject(j)}function U(){return z&&l.value!==na?Promise.resolve():new Promise((j,te)=>{B.add([j,te])})}function ie(j){return z||(z=!j,L(),B.list().forEach(([te,ne])=>j?ne(j):te()),B.reset()),j}function ue(j,te,ne,me){const{scrollBehavior:ve}=t;if(!fc||!ve)return Promise.resolve();const I=!ne&&qE(Xw(j.fullPath,0))||(me||!ne)&&history.state&&history.state.scroll||null;return wn().then(()=>ve(j,te,I)).then(W=>W&&UE(W)).catch(W=>V(W,j,te))}const fe=j=>r.go(j);let he;const ce=new Set,de={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:e.clearRoutes,hasRoute:m,getRoutes:b,resolve:v,options:t,push:_,replace:S,go:fe,back:()=>fe(-1),forward:()=>fe(1),beforeEach:i.add,beforeResolve:s.add,afterEach:a.add,onError:F.add,isReady:U,install(j){j.component("RouterLink",_I),j.component("RouterView",AI),j.config.globalProperties.$router=de,Object.defineProperty(j.config.globalProperties,"$route",{enumerable:!0,get:()=>p(l)}),fc&&!he&&l.value===na&&(he=!0,_(r.location).catch(me=>{}));const te={};for(const me in na)Object.defineProperty(te,me,{get:()=>l.value[me],enumerable:!0});j.provide(om,de),j.provide(dy,ck(te)),j.provide(l1,l);const ne=j.unmount;ce.add(j),j.unmount=function(){ce.delete(j),ce.size<1&&(c=na,A&&A(),A=null,l.value=na,he=!1,z=!1),ne()}}};function _e(j){return j.reduce((te,ne)=>te.then(()=>O(ne)),Promise.resolve())}return de}function fy(){return en(om)}function Wl(t){return en(dy)}function Id(t,e){return Fl()?(wa(t,e),!0):!1}const Eg=new WeakMap,TI=(...t)=>{var e;const n=t[0],o=(e=Lo())===null||e===void 0?void 0:e.proxy,r=o??Fl();if(r==null&&!zb())throw new Error("injectLocal must be called in setup");return r&&Eg.has(r)&&n in Eg.get(r)?Eg.get(r)[n]:en(...t)},c1=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const MI=t=>t!=null,OI=Object.prototype.toString,BI=t=>OI.call(t)==="[object Object]",pa=()=>{};function I4(t,e){function n(...o){return new Promise((r,i)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(r).catch(i)})}return n}function LI(t,e={}){let n,o,r=pa;const i=l=>{clearTimeout(l),r(),r=pa};let s;return l=>{const c=bt(t),u=bt(e.maxWait);return n&&i(n),c<=0||u!==void 0&&u<=0?(o&&(i(o),o=void 0),Promise.resolve(l())):new Promise((d,f)=>{r=e.rejectOnCancel?f:d,s=l,u&&!o&&(o=setTimeout(()=>{n&&i(n),o=void 0,d(s())},u)),n=setTimeout(()=>{o&&i(o),o=void 0,d(l())},c)})}}function PI(...t){let e=0,n,o=!0,r=pa,i,s,a,l,c;!Ke(t[0])&&typeof t[0]=="object"?{delay:s,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=t[0]:[s,a=!0,l=!0,c=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,r(),r=pa)};return f=>{const h=bt(s),g=Date.now()-e,b=()=>i=f();return u(),h<=0?(e=Date.now(),b()):(g>h?(e=Date.now(),(l||!o)&&b()):a&&(i=new Promise((m,v)=>{r=c?v:m,n=setTimeout(()=>{e=Date.now(),o=!0,m(b()),u()},Math.max(0,h-g))})),!l&&!n&&(n=setTimeout(()=>o=!0,h)),o=!1,i)}}function l_(t){return t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t)}function pd(t){return Array.isArray(t)?t:[t]}function DI(t){return Lo()}function EI(t,e=200,n={}){return I4(LI(e,n),t)}function II(t,e=200,n=!1,o=!0,r=!1){return I4(PI(e,n,o,r),t)}function hy(t,e=!0,n){DI()?hn(t,n):e?t():wn(t)}function u1(t,e=1e3,n={}){const{immediate:o=!0,immediateCallback:r=!1}=n;let i=null;const s=De(!1);function a(){i&&(clearInterval(i),i=null)}function l(){s.value=!1,a()}function c(){const u=bt(e);u<=0||(s.value=!0,r&&t(),a(),s.value&&(i=setInterval(t,u)))}return o&&c1&&c(),(Ke(e)||typeof e=="function")&&Id(Ve(e,()=>{s.value&&c1&&c()})),Id(l),{isActive:ol(s),pause:l,resume:c}}function NI(t,e,n){return Ve(t,e,{...n,immediate:!0})}const Fa=c1?window:void 0;function or(t){var e;const n=bt(t);return(e=n==null?void 0:n.$el)!==null&&e!==void 0?e:n}function Bs(...t){const e=(o,r,i,s)=>(o.addEventListener(r,i,s),()=>o.removeEventListener(r,i,s)),n=k(()=>{const o=pd(bt(t[0])).filter(r=>r!=null);return o.every(r=>typeof r!="string")?o:void 0});return NI(()=>{var o,r;return[(o=(r=n.value)===null||r===void 0?void 0:r.map(i=>or(i)))!==null&&o!==void 0?o:[Fa].filter(i=>i!=null),pd(bt(n.value?t[1]:t[0])),pd(p(n.value?t[2]:t[1])),bt(n.value?t[3]:t[2])]},([o,r,i,s],a,l)=>{if(!(o!=null&&o.length)||!(r!=null&&r.length)||!(i!=null&&i.length))return;const c=BI(s)?{...s}:s,u=o.flatMap(d=>r.flatMap(f=>i.map(h=>e(d,f,h,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function RI(t,e,n={}){const{window:o=Fa,ignore:r=[],capture:i=!0,detectIframe:s=!1,controls:a=!1}=n;if(!o)return a?{stop:pa,cancel:pa,trigger:pa}:pa;let l=!0;const c=m=>bt(r).some(v=>{if(typeof v=="string")return Array.from(o.document.querySelectorAll(v)).some(y=>y===m.target||m.composedPath().includes(y));{const y=or(v);return y&&(m.target===y||m.composedPath().includes(y))}});function u(m){const v=bt(m);return v&&v.$.subTree.shapeFlag===16}function d(m,v){const y=bt(m),x=y.$.subTree&&y.$.subTree.children;return x==null||!Array.isArray(x)?!1:x.some(_=>_.el===v.target||v.composedPath().includes(_.el))}const f=m=>{const v=or(t);if(m.target!=null&&!(!(v instanceof Element)&&u(t)&&d(t,m))&&!(!v||v===m.target||m.composedPath().includes(v))){if("detail"in m&&m.detail===0&&(l=!c(m)),!l){l=!0;return}e(m)}};let h=!1;const g=[Bs(o,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),f(m))},{passive:!0,capture:i}),Bs(o,"pointerdown",m=>{const v=or(t);l=!c(m)&&!!(v&&!m.composedPath().includes(v))},{passive:!0}),s&&Bs(o,"blur",m=>{setTimeout(()=>{var v;const y=or(t);((v=o.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!(y!=null&&y.contains(o.document.activeElement))&&e(m)},0)},{passive:!0})].filter(Boolean),b=()=>g.forEach(m=>m());return a?{stop:b,cancel:()=>{l=!1},trigger:m=>{l=!0,f(m),l=!1}}:b}function FI(){const t=De(!1),e=Lo();return e&&hn(()=>{t.value=!0},e),t}function py(t){const e=FI();return k(()=>(e.value,!!t()))}function VI(t,e,n={}){const{window:o=Fa,...r}=n;let i;const s=py(()=>o&&"MutationObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},l=Ve(k(()=>{const d=pd(bt(t)).map(or).filter(MI);return new Set(d)}),d=>{a(),s.value&&d.size&&(i=new MutationObserver(e),d.forEach(f=>i.observe(f,r)))},{immediate:!0,flush:"post"}),c=()=>i==null?void 0:i.takeRecords(),u=()=>{l(),a()};return Id(u),{isSupported:s,stop:u,takeRecords:c}}function c_(t,e={}){const{immediate:n=!0,fpsLimit:o=null,window:r=Fa,once:i=!1}=e,s=De(!1),a=k(()=>{const h=bt(o);return h?1e3/h:null});let l=0,c=null;function u(h){if(!s.value||!r)return;l||(l=h);const g=h-l;if(a.value&&g<a.value){c=r.requestAnimationFrame(u);return}if(l=h,t({delta:g,timestamp:h}),i){s.value=!1,c=null;return}c=r.requestAnimationFrame(u)}function d(){!s.value&&r&&(s.value=!0,l=0,c=r.requestAnimationFrame(u))}function f(){s.value=!1,c!=null&&r&&(r.cancelAnimationFrame(c),c=null)}return n&&d(),Id(f),{isActive:io(s),pause:f,resume:d}}const zI=Symbol("vueuse-ssr-width");function HI(){const t=zb()?TI(zI,null):null;return typeof t=="number"?t:void 0}function my(t,e={}){const{window:n=Fa,ssrWidth:o=HI()}=e,r=py(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=De(typeof o=="number"),s=De(),a=De(!1),l=c=>{a.value=c.matches};return N0(()=>{if(i.value){i.value=!r.value,a.value=bt(t).split(",").some(c=>{const u=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),f=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let h=!!(d||f);return d&&h&&(h=o>=l_(d[1])),f&&h&&(h=o<=l_(f[1])),u?!h:h});return}r.value&&(s.value=n.matchMedia(bt(t)),a.value=s.value.matches)}),Bs(s,"change",l,{passive:!0}),k(()=>a.value)}function Qi(t,e,n={}){const{window:o=Fa,...r}=n;let i;const s=py(()=>o&&"ResizeObserver"in o),a=()=>{i&&(i.disconnect(),i=void 0)},l=Ve(k(()=>{const u=bt(t);return Array.isArray(u)?u.map(d=>or(d)):[or(u)]}),u=>{if(a(),s.value&&o){i=new ResizeObserver(e);for(const d of u)d&&i.observe(d,r)}},{immediate:!0,flush:"post"}),c=()=>{a(),l()};return Id(c),{isSupported:s,stop:c}}function WI(t,e={}){const{reset:n=!0,windowResize:o=!0,windowScroll:r=!0,immediate:i=!0,updateTiming:s="sync"}=e,a=De(0),l=De(0),c=De(0),u=De(0),d=De(0),f=De(0),h=De(0),g=De(0);function b(){const v=or(t);if(!v){n&&(a.value=0,l.value=0,c.value=0,u.value=0,d.value=0,f.value=0,h.value=0,g.value=0);return}const y=v.getBoundingClientRect();a.value=y.height,l.value=y.bottom,c.value=y.left,u.value=y.right,d.value=y.top,f.value=y.width,h.value=y.x,g.value=y.y}function m(){s==="sync"?b():s==="next-frame"&&requestAnimationFrame(()=>b())}return Qi(t,m),Ve(()=>or(t),v=>!v&&m()),VI(t,m,{attributeFilter:["style","class"]}),r&&Bs("scroll",m,{capture:!0,passive:!0}),o&&Bs("resize",m,{passive:!0}),hy(()=>{i&&m()}),{height:a,bottom:l,left:c,right:u,top:d,width:f,x:h,y:g,update:m}}function UI(t,e={width:0,height:0},n={}){const{window:o=Fa,box:r="content-box"}=n,i=k(()=>{var d;return(d=or(t))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=De(e.width),a=De(e.height),{stop:l}=Qi(t,([d])=>{const f=r==="border-box"?d.borderBoxSize:r==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&i.value){const h=or(t);if(h){const g=h.getBoundingClientRect();s.value=g.width,a.value=g.height}}else if(f){const h=pd(f);s.value=h.reduce((g,{inlineSize:b})=>g+b,0),a.value=h.reduce((g,{blockSize:b})=>g+b,0)}else s.value=d.contentRect.width,a.value=d.contentRect.height},n);hy(()=>{const d=or(t);d&&(s.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=Ve(()=>or(t),d=>{s.value=d?e.width:0,a.value=d?e.height:0});function u(){l(),c()}return{width:s,height:a,stop:u}}function GI(t){if("interval"in t||"immediate"in t){const{interval:e="requestAnimationFrame",immediate:n=!0}=t;return e==="requestAnimationFrame"?o=>c_(o,{immediate:n}):o=>u1(o,e,t)}return c_}function qI(t={}){const{controls:e=!1,scheduler:n=GI(t)}=t,o=Ie(new Date),i=n(()=>o.value=new Date);return e?{now:o,...i}:o}const YI=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],jI={justNow:"just now",past:t=>t.match(/\d/)?`${t} ago`:t,future:t=>t.match(/\d/)?`in ${t}`:t,month:(t,e)=>t===1?e?"last month":"next month":`${t} month${t>1?"s":""}`,year:(t,e)=>t===1?e?"last year":"next year":`${t} year${t>1?"s":""}`,day:(t,e)=>t===1?e?"yesterday":"tomorrow":`${t} day${t>1?"s":""}`,week:(t,e)=>t===1?e?"last week":"next week":`${t} week${t>1?"s":""}`,hour:t=>`${t} hour${t>1?"s":""}`,minute:t=>`${t} minute${t>1?"s":""}`,second:t=>`${t} second${t>1?"s":""}`,invalid:""};function XI(t){return t.toISOString().slice(0,10)}function KI(t){if("updateInterval"in t){const{updateInterval:e=3e4}=t;return n=>u1(n,e)}return e=>u1(e,3e4)}function ZI(t,e={}){const{controls:n=!1,scheduler:o=KI(e)}=e,{now:r,...i}=qI({scheduler:o,controls:!0}),s=k(()=>QI(new Date(bt(t)),e,bt(r)));return n?{timeAgo:s,...i}:s}function QI(t,e={},n=Date.now()){const{max:o,messages:r=jI,fullDateFormatter:i=XI,units:s=YI,showSecond:a=!1,rounding:l="round"}=e,c=typeof l=="number"?m=>+m.toFixed(l):Math[l],u=+n-+t,d=Math.abs(u);function f(m,v){return c(Math.abs(m)/v.value)}function h(m,v){const y=f(m,v),x=m>0,_=g(v.name,y,x);return g(x?"past":"future",_,x)}function g(m,v,y){const x=r[m];return typeof x=="function"?x(v,y):x.replace("{0}",v.toString())}if(d<6e4&&!a)return r.justNow;if(typeof o=="number"&&d>o)return i(new Date(t));if(typeof o=="string"){var b;const m=(b=s.find(v=>v.name===o))===null||b===void 0?void 0:b.max;if(m&&d>m)return i(new Date(t))}for(const[m,v]of s.entries()){if(f(u,v)<=0&&s[m-1])return h(u,s[m-1]);if(d<v.max)return h(u,v)}return r.invalid}function JI(t={}){const{window:e=Fa,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:s="inner"}=t,a=De(n),l=De(o),c=()=>{if(e)if(s==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(s==="visual"&&e.visualViewport){const{width:d,height:f,scale:h}=e.visualViewport;a.value=Math.round(d*h),l.value=Math.round(f*h)}else i?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),hy(c);const u={passive:!0};return Bs("resize",c,u),e&&s==="visual"&&e.visualViewport&&Bs(e.visualViewport,"resize",c,u),r&&Ve(my("(orientation: portrait)"),()=>c()),{width:a,height:l}}var an=(t=>(t.BarVertical="bar-vertical",t.BarHorizontal="bar-horizontal",t.BarMulti="bar-multi",t.ColumnStacked="column-stacked",t.BarStacked="bar-stacked",t.BarSplit="bar-split",t.BarGrouped="bar-grouped",t.Line="line",t.LineMulti="line-multi",t.Area="area",t.AreaStacked="area-stacked",t.Donut="donut",t.Pie="pie",t))(an||{});function pf(t){const e=new Map,n=Ie([]);function o(){n.value=Array.from(e.values())}return Ui(t,{register(i,s){e.set(i,s),o()},update(i,s){e.set(i,s),o()},unregister(i){e.delete(i),o()}}),{entries:n}}function N4(t,e){const n=en(t,null);if(!n)return;const o=Lo();if(!o)return;const r=o.uid;hn(()=>{n.register(r,e())}),Ve(e,i=>{n.update(r,i)}),Ns(()=>{n.unregister(r)})}const R4=Symbol("ButtonGroupEntries"),F4=Symbol("DropdownEntries"),eN=Symbol("PaletteEntries"),tN=Symbol("IconRailEntries"),nN=Symbol("ToggleEntries"),oN={sm:576,md:768,lg:992,xl:1200,xxl:1400};function qi(t="md"){const e=typeof t=="number"?t:oN[t];return{isNarrow:my(`(max-width: ${e-1}px)`)}}const rN=se({__name:"ButtonIconCounter",props:{counter:{default:null},variant:{default:"secondary"}},setup(t){return(e,n)=>{const o=ay;return t.counter!=null?(w(),Q(o,{key:0,variant:t.variant,class:"button-icon-counter text-nowrap",pill:""},{default:J(()=>[Ce(e.$slots,"default",{},()=>[Ue(ye(t.counter),1)])]),_:3},8,["variant"])):re("",!0)}}}),iN=se({__name:"AppIcon",props:{name:{default:void 0},size:{default:void 0},scale:{default:1},variant:{default:void 0},hoverVariant:{default:void 0},beat:{type:Boolean},beatDuration:{default:"1s"},fade:{type:Boolean},fadeDuration:{default:"1s"},spin:{type:Boolean},spinReverse:{type:Boolean},spinDuration:{default:"1s"},hover:{type:Boolean}},setup(t){const e=t,n=De(!1);function o(){n.value=e.hover}Ve(()=>e.hover,o,{immediate:!0});const r=k(()=>{let u="currentColor";return e.variant&&(u=`var(--bs-${e.variant}, currentColor)`),n.value&&e.hoverVariant&&(u=`var(--bs-${e.hoverVariant}, ${u})`),u}),i=k(()=>typeof e.size=="string"&&e.size.endsWith("%")),s=k(()=>!["2xs","xs","sm","md","lg","xl","2xl",void 0].includes(e.size)&&!i.value),a=k(()=>["2xs","xs","sm","md","lg","xl","2xl"].includes(e.size??"")),l=k(()=>({"--app-icon-color":r.value,"--app-icon-raw-size":s.value?e.size:void 0,"--app-icon-percent-size":i.value?e.size:void 0,"--app-icon-size":a.value?e.size:void 0,"--app-icon-scale":e.scale??1,"--app-icon-spin-duration":e.spinDuration,"--app-icon-beat-duration":e.beatDuration,"--app-icon-fade-duration":e.fadeDuration})),c=k(()=>({[`app-icon--size-${e.size}`]:a.value,"app-icon--has-size":a.value,"app-icon--raw-size":s.value,"app-icon--percent-size":i.value,"app-icon--hover":n.value,"app-icon--spin":e.spin,"app-icon--spin-reverse":e.spinReverse,"app-icon--beat":e.beat,"app-icon--fade":e.fade}));return(u,d)=>(w(),N("span",{class:$e(["app-icon",p(c)]),style:Pt(p(l)),onMouseenter:d[0]||(d[0]=f=>n.value=!0),onMouseleave:d[1]||(d[1]=f=>n.value=t.hover??!1)},[t.name?(w(),Q(Gt(t.name),{key:0})):Ce(u.$slots,"default",{key:1},void 0,!0)],38))}}),Be=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},mf=Be(iN,[["__scopeId","data-v-eaec91c1"]]),sN={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function aN(t,e){return w(),N("svg",sN,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M232 128a104 104 0 0 1-208 0c0-41 23.81-78.36 60.66-95.27a8 8 0 0 1 6.68 14.54C60.15 61.59 40 93.27 40 128a88 88 0 0 0 176 0c0-34.73-20.15-66.41-51.34-80.73a8 8 0 0 1 6.68-14.54C208.19 49.64 232 87 232 128"},null,-1)])])}const lN=Te({name:"ph-circle-notch",render:aN}),cN={key:1,class:"button-icon__label"},uN=se({__name:"ButtonIcon",props:{id:{},iconLeft:{},iconLeftVariant:{},iconLeftHoverVariant:{},iconLeftSize:{default:"1.25em"},iconRight:{},iconRightVariant:{},iconRightHoverVariant:{},iconRightSize:{default:"1.25em"},iconSpinner:{default:()=>lN},hideLabel:{type:Boolean,default:!1},hideTooltip:{type:Boolean,default:!1},label:{},square:{type:Boolean,default:!1},variant:{},size:{},block:{type:Boolean},pill:{type:Boolean},tag:{default:"button"},type:{default:"button"},loading:{type:Boolean},loadingDuration:{default:"1s"},loadingText:{},tooltipLabel:{},tooltipPlacement:{default:"top"},tooltipDelay:{default:()=>({show:0,hide:0})},showTooltipForce:{type:Boolean},hover:{type:Boolean},truncate:{type:Boolean},counter:{default:null},counterVariant:{},counterStyle:{}},emits:["click:icon-right"],setup(t,{emit:e}){let n=0;const o=en("variant","action"),r=en("size","md"),i=pt("element"),s=t,a=e;function l(y){a(`click:${y}`)}const c=De(!1),u=k(()=>s.id??`button-icon-${++n}`),d=k(()=>({"button-icon--square":s.square,"button-icon--loading":s.loading,"button-icon--truncate":s.truncate,"button-icon--hover":c.value,"button-icon--use-injected-variant":!s.variant,"button-icon--use-injected-size":!s.size})),f=k(()=>s.loading?s.iconSpinner:s.iconLeft),h=k(()=>s.loading?s.iconSpinner:s.iconRight),g=k(()=>s.loading&&s.loadingText?s.loadingText:s.label),b=k(()=>s.tooltipLabel??s.label),m=k(()=>!!b.value&&!s.hideTooltip&&(s.showTooltipForce||s.hideLabel)),v=k(()=>({pill:s.pill,pressed:s.pressed,size:s.size??r,tag:s.tag,type:s.type,variant:s.variant??o}));return(y,x)=>{const _=mf,S=rN,E=Dd,M=Uo;return w(),Q(M,Ct(p(v),{id:p(u),ref:"element",class:["button-icon",p(d)],"aria-label":p(b),onMouseenter:x[1]||(x[1]=C=>c.value=!0),onMouseleave:x[2]||(x[2]=C=>c.value=!1)}),{default:J(()=>[Ce(y.$slots,"start",{},void 0,!0),t.iconLeft||!t.iconLeft&&!t.iconRight&&t.loading?(w(),Q(_,{key:0,name:p(f),size:t.iconLeftSize,spin:t.loading,"spin-duration":t.loadingDuration,variant:t.iconLeftVariant,"hover-variant":t.iconLeftHoverVariant,hover:p(c),class:"button-icon__icon-left"},null,8,["name","size","spin","spin-duration","variant","hover-variant","hover"])):re("",!0),t.hideLabel?re("",!0):(w(),N("span",cN,[Ce(y.$slots,"default",Vn(er({labelOrLoadingText:p(g)})),()=>[Ue(ye(p(g)),1)],!0)])),t.iconRight?(w(),Q(_,{key:2,name:p(h),size:t.iconRightSize,spin:t.loading,"spin-duration":t.loadingDuration,variant:t.iconRightVariant,"hover-variant":t.iconRightHoverVariant,hover:p(c),class:"button-icon__icon-right",onClick:x[0]||(x[0]=C=>l("icon-right"))},null,8,["name","size","spin","spin-duration","variant","hover-variant","hover"])):re("",!0),t.counter!==null?(w(),Q(S,{key:3,counter:t.counter,variant:t.counterVariant,style:Pt(t.counterStyle)},null,8,["counter","variant","style"])):re("",!0),Ce(y.$slots,"end",{},void 0,!0),p(m)?(w(),Q(E,{key:4,"teleport-to":"body",delay:t.tooltipDelay,"boundary-padding":20,placement:t.tooltipPlacement,target:p(i),title:p(b)},null,8,["delay","placement","target","title"])):re("",!0)]),_:3},16,["id","class","aria-label"])}}}),Kn=Be(uN,[["__scopeId","data-v-7adc8c82"]]),dN={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function fN(t,e){return w(),N("svg",dN,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8m-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z"},null,-1)])])}const V4=Te({name:"ph-copy",render:fN}),hN={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function pN(t,e){return w(),N("svg",hN,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m229.66 77.66l-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69L218.34 66.34a8 8 0 0 1 11.32 11.32"},null,-1)])])}const gy=Te({name:"ph-check",render:pN}),u_=se({__name:"ActionCopyButton",props:{text:{},label:{default:"Copy"},variant:{default:"outline-secondary"},size:{default:"sm"}},setup(t){const e=t,n=De(!1);let o;async function r(){try{await globalThis.navigator.clipboard.writeText(e.text),n.value=!0,clearTimeout(o),o=setTimeout(()=>{n.value=!1},1500)}catch{}}return(i,s)=>{const a=Kn;return w(),Q(a,{"icon-left":p(n)?p(gy):p(V4),label:p(n)?"Copied!":t.label,variant:p(n)?"success":t.variant,size:t.size,onClick:r},null,8,["icon-left","label","variant","size"])}}}),Qt=se({__name:"FormControlCheckbox",props:nt({label:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue");return(n,o)=>{const r=Os,i=On;return w(),Q(i,{class:"form-control-checkbox"},{default:J(()=>[H(r,{"model-value":e.value,class:"form-control-checkbox__input",switch:"","onUpdate:modelValue":o[0]||(o[0]=s=>e.value=s)},{default:J(()=>[Ce(n.$slots,"default",{},()=>[Ue(ye(t.label),1)])]),_:3},8,["model-value"]),e.value?Ce(n.$slots,"section",{key:0}):re("",!0)]),_:3})}}});function xp(t){"@babel/helpers - typeof";return xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xp(t)}var mN=/^\s+/,gN=/\s+$/;function Je(t,e){if(t=t||"",e=e||{},t instanceof Je)return t;if(!(this instanceof Je))return new Je(t,e);var n=vN(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Je.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),e,n,o,r,i,s;return e=t.r/255,n=t.g/255,o=t.b/255,e<=.03928?r=e/12.92:r=Math.pow((e+.055)/1.055,2.4),n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),o<=.03928?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*r+.7152*i+.0722*s},setAlpha:function(t){return this._a=z4(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=f_(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f_(this._r,this._g,this._b),e=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+e+", "+n+"%, "+o+"%)":"hsva("+e+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=d_(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d_(this._r,this._g,this._b),e=Math.round(t.h*360),n=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+e+", "+n+"%, "+o+"%)":"hsla("+e+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return h_(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return wN(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(mn(this._r,255)*100)+"%",g:Math.round(mn(this._g,255)*100)+"%",b:Math.round(mn(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(mn(this._r,255)*100)+"%, "+Math.round(mn(this._g,255)*100)+"%, "+Math.round(mn(this._b,255)*100)+"%)":"rgba("+Math.round(mn(this._r,255)*100)+"%, "+Math.round(mn(this._g,255)*100)+"%, "+Math.round(mn(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:PN[h_(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var e="#"+p_(this._r,this._g,this._b,this._a),n=e,o=this._gradientType?"GradientType = 1, ":"";if(t){var r=Je(t);n="#"+p_(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0,r=!e&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return r?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return Je(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(CN,arguments)},brighten:function(){return this._applyModification(AN,arguments)},darken:function(){return this._applyModification($N,arguments)},desaturate:function(){return this._applyModification(_N,arguments)},saturate:function(){return this._applyModification(SN,arguments)},greyscale:function(){return this._applyModification(kN,arguments)},spin:function(){return this._applyModification(TN,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(BN,arguments)},complement:function(){return this._applyCombination(MN,arguments)},monochromatic:function(){return this._applyCombination(LN,arguments)},splitcomplement:function(){return this._applyCombination(ON,arguments)},triad:function(){return this._applyCombination(m_,[3])},tetrad:function(){return this._applyCombination(m_,[4])}};Je.fromRatio=function(t,e){if(xp(t)=="object"){var n={};for(var o in t)t.hasOwnProperty(o)&&(o==="a"?n[o]=t[o]:n[o]=Yu(t[o]));t=n}return Je(t,e)};function vN(t){var e={r:0,g:0,b:0},n=1,o=null,r=null,i=null,s=!1,a=!1;return typeof t=="string"&&(t=NN(t)),xp(t)=="object"&&(cs(t.r)&&cs(t.g)&&cs(t.b)?(e=bN(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):cs(t.h)&&cs(t.s)&&cs(t.v)?(o=Yu(t.s),r=Yu(t.v),e=xN(t.h,o,r),s=!0,a="hsv"):cs(t.h)&&cs(t.s)&&cs(t.l)&&(o=Yu(t.s),i=Yu(t.l),e=yN(t.h,o,i),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=z4(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function bN(t,e,n){return{r:mn(t,255)*255,g:mn(e,255)*255,b:mn(n,255)*255}}function d_(t,e,n){t=mn(t,255),e=mn(e,255),n=mn(n,255);var o=Math.max(t,e,n),r=Math.min(t,e,n),i,s,a=(o+r)/2;if(o==r)i=s=0;else{var l=o-r;switch(s=a>.5?l/(2-o-r):l/(o+r),o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4;break}i/=6}return{h:i,s,l:a}}function yN(t,e,n){var o,r,i;t=mn(t,360),e=mn(e,100),n=mn(n,100);function s(c,u,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?c+(u-c)*6*d:d<1/2?u:d<2/3?c+(u-c)*(2/3-d)*6:c}if(e===0)o=r=i=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=s(l,a,t+1/3),r=s(l,a,t),i=s(l,a,t-1/3)}return{r:o*255,g:r*255,b:i*255}}function f_(t,e,n){t=mn(t,255),e=mn(e,255),n=mn(n,255);var o=Math.max(t,e,n),r=Math.min(t,e,n),i,s,a=o,l=o-r;if(s=o===0?0:l/o,o==r)i=0;else{switch(o){case t:i=(e-n)/l+(e<n?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4;break}i/=6}return{h:i,s,v:a}}function xN(t,e,n){t=mn(t,360)*6,e=mn(e,100),n=mn(n,100);var o=Math.floor(t),r=t-o,i=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=o%6,c=[n,s,i,i,a,n][l],u=[a,n,n,s,i,i][l],d=[i,i,a,n,n,s][l];return{r:c*255,g:u*255,b:d*255}}function h_(t,e,n,o){var r=[ni(Math.round(t).toString(16)),ni(Math.round(e).toString(16)),ni(Math.round(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function wN(t,e,n,o,r){var i=[ni(Math.round(t).toString(16)),ni(Math.round(e).toString(16)),ni(Math.round(n).toString(16)),ni(H4(o))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function p_(t,e,n,o){var r=[ni(H4(o)),ni(Math.round(t).toString(16)),ni(Math.round(e).toString(16)),ni(Math.round(n).toString(16))];return r.join("")}Je.equals=function(t,e){return!t||!e?!1:Je(t).toRgbString()==Je(e).toRgbString()};Je.random=function(){return Je.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function _N(t,e){e=e===0?0:e||10;var n=Je(t).toHsl();return n.s-=e/100,n.s=rm(n.s),Je(n)}function SN(t,e){e=e===0?0:e||10;var n=Je(t).toHsl();return n.s+=e/100,n.s=rm(n.s),Je(n)}function kN(t){return Je(t).desaturate(100)}function CN(t,e){e=e===0?0:e||10;var n=Je(t).toHsl();return n.l+=e/100,n.l=rm(n.l),Je(n)}function AN(t,e){e=e===0?0:e||10;var n=Je(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),Je(n)}function $N(t,e){e=e===0?0:e||10;var n=Je(t).toHsl();return n.l-=e/100,n.l=rm(n.l),Je(n)}function TN(t,e){var n=Je(t).toHsl(),o=(n.h+e)%360;return n.h=o<0?360+o:o,Je(n)}function MN(t){var e=Je(t).toHsl();return e.h=(e.h+180)%360,Je(e)}function m_(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Je(t).toHsl(),o=[Je(t)],r=360/e,i=1;i<e;i++)o.push(Je({h:(n.h+i*r)%360,s:n.s,l:n.l}));return o}function ON(t){var e=Je(t).toHsl(),n=e.h;return[Je(t),Je({h:(n+72)%360,s:e.s,l:e.l}),Je({h:(n+216)%360,s:e.s,l:e.l})]}function BN(t,e,n){e=e||6,n=n||30;var o=Je(t).toHsl(),r=360/n,i=[Je(t)];for(o.h=(o.h-(r*e>>1)+720)%360;--e;)o.h=(o.h+r)%360,i.push(Je(o));return i}function LN(t,e){e=e||6;for(var n=Je(t).toHsv(),o=n.h,r=n.s,i=n.v,s=[],a=1/e;e--;)s.push(Je({h:o,s:r,v:i})),i=(i+a)%1;return s}Je.mix=function(t,e,n){n=n===0?0:n||50;var o=Je(t).toRgb(),r=Je(e).toRgb(),i=n/100,s={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return Je(s)};Je.readability=function(t,e){var n=Je(t),o=Je(e);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)};Je.isReadable=function(t,e,n){var o=Je.readability(t,e),r,i;switch(i=!1,r=RN(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7;break}return i};Je.mostReadable=function(t,e,n){var o=null,r=0,i,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<e.length;c++)i=Je.readability(t,e[c]),i>r&&(r=i,o=Je(e[c]));return Je.isReadable(t,o,{level:a,size:l})||!s?o:(n.includeFallbackColors=!1,Je.mostReadable(t,["#fff","#000"],n))};var d1=Je.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},PN=Je.hexNames=DN(d1);function DN(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function z4(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function mn(t,e){EN(t)&&(t="100%");var n=IN(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function rm(t){return Math.min(1,Math.max(0,t))}function hr(t){return parseInt(t,16)}function EN(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function IN(t){return typeof t=="string"&&t.indexOf("%")!=-1}function ni(t){return t.length==1?"0"+t:""+t}function Yu(t){return t<=1&&(t=t*100+"%"),t}function H4(t){return Math.round(parseFloat(t)*255).toString(16)}function g_(t){return hr(t)/255}var Zr=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function cs(t){return!!Zr.CSS_UNIT.exec(t)}function NN(t){t=t.replace(mN,"").replace(gN,"").toLowerCase();var e=!1;if(d1[t])t=d1[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Zr.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Zr.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Zr.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Zr.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Zr.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Zr.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Zr.hex8.exec(t))?{r:hr(n[1]),g:hr(n[2]),b:hr(n[3]),a:g_(n[4]),format:e?"name":"hex8"}:(n=Zr.hex6.exec(t))?{r:hr(n[1]),g:hr(n[2]),b:hr(n[3]),format:e?"name":"hex"}:(n=Zr.hex4.exec(t))?{r:hr(n[1]+""+n[1]),g:hr(n[2]+""+n[2]),b:hr(n[3]+""+n[3]),a:g_(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Zr.hex3.exec(t))?{r:hr(n[1]+""+n[1]),g:hr(n[2]+""+n[2]),b:hr(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function RN(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}const v_=(t,e,n=!1)=>{if(n)switch(e){case"rgb":return t.toRgb();case"prgb":return t.toPercentageRgb();case"hsl":return t.toHsl();case"hsv":return t.toHsv();default:return null}else{let o=e;e==="hex"&&t.getAlpha()<1&&(o="hex8");let r=t.toString(o);try{r=JSON.parse(r)}catch{}return r}},Ig=(t,e)=>!!(Object.prototype.hasOwnProperty.call(t,e)&&typeof t[e]<"u"),Yf=t=>typeof t>"u",vy=["update:tinyColor","update:modelValue","input"];function by(t,e,n){let o,r;const i=k({get:()=>{const{modelValue:a,tinyColor:l,value:c}=t,u=l??a??c;return Yf(r)&&(Yf(c)||(r=Je(c).getFormat()),Yf(a)||(r=Je(a).getFormat())),Yf(o)&&(typeof c=="object"&&!(c instanceof Je)&&(o=!0),typeof a=="object"&&(o=!0)),Je(u)},set:a=>{s(a)}}),s=a=>{const l=Je(a);if(Ig(t,"tinyColor")&&e("update:tinyColor",l),Ig(t,"modelValue")){const c=v_(l,r,o);e("update:modelValue",c)}if(Ig(t,"value")){const c=v_(l,r,o);e("input",c)}};return i}const W4=t=>{var n,o,r,i;const e={x:0,y:0};return t instanceof MouseEvent&&(e.x=t.pageX,e.y=t.pageY),typeof TouchEvent<"u"&&t instanceof TouchEvent&&(e.x=(n=t.touches)!=null&&n[0]?t.touches[0].pageX:(o=t.changedTouches)!=null&&o[0]?t.changedTouches[0].pageX:0,e.y=(r=t.touches)!=null&&r[0]?t.touches[0].pageY:(i=t.changedTouches)!=null&&i[0]?t.changedTouches[0].pageY:0),e},FN=()=>{const t=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0,e=window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0;return{x:t,y:e}},U4=t=>{const{x:e,y:n}=FN(),o=t.getBoundingClientRect();return{x:o.left+e,y:o.top+n}},yy=t=>t.code==="ArrowUp"||t.keyCode===38?"up":t.code==="ArrowDown"||t.keyCode===40?"down":t.code==="ArrowLeft"||t.keyCode===37?"left":t.code==="ArrowRight"||t.keyCode===39?"right":null;function VN(t){const e=t.toString();return e.indexOf(".")!==-1?e.split(".")[1].length:0}function Ng(t,e,n){return Math.min(Math.max(t,e),n)}const G4=(t,e=20)=>{let n,o,r;return(...i)=>{n?(clearTimeout(o),o=setTimeout(()=>{Date.now()-r>=e&&(t(...i),r=Date.now())},Math.max(e-(Date.now()-r),0))):(t(...i),r=Date.now(),n=!0)}},zN=["aria-valuetext"],HN=se({__name:"SaturationSlider",props:{hue:{},tinyColor:{},modelValue:{},value:{}},emits:["change"].concat(vy),setup(t,{emit:e}){const n=e,o=t,r=Ie(0),i=by(o,n),s=k(()=>i.value.toHsv()),a=k(()=>o.hue??s.value.h),l=k(()=>`hsl(${a.value}, 100%, 50%)`),c=k(()=>-(s.value.v*100)+1+100+"%"),u=k(()=>s.value.v<=.01?r.value*100+"%":s.value.s*100+"%"),d=Ie(null);function f(x){const _=d.value;if(!_)return;const S=_.clientWidth,E=_.clientHeight,{x:M,y:C}=U4(_),{x:O,y:P}=W4(x),R=Ng(O-M,0,S),$=Ng(P-C,0,E),A=R/S,L=Ng(1-$/E,0,1);r.value=A;let B=Math.round(A*100),F=Math.round(L*100);B===1&&(B=.01),F===1&&(F=.01),h({h:a.value,s:B,v:F,a:s.value.a})}function h(x){i.value=x}const g=G4(f,20);function b(x){x.preventDefault(),x.type.startsWith("mouse")?(window.addEventListener("mousemove",g),window.addEventListener("mouseup",g),window.addEventListener("mouseup",m)):x.type.startsWith("touch")&&(window.addEventListener("touchmove",g),window.addEventListener("touchend",g),window.addEventListener("touchend",m))}function m(){v()}function v(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",g),window.removeEventListener("mouseup",m),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",g),window.removeEventListener("touchend",m)}function y(x){switch(x.preventDefault(),yy(x)){case"left":{const _=s.value.s-.01;h({...s.value,s:_>=0?_:0});break}case"right":{const _=s.value.s+.01;h({...s.value,s:_>1?1:_});break}case"up":{const _=s.value.v+.01;h({...s.value,v:_>1?1:_});break}case"down":{const _=s.value.v-.01;h({...s.value,v:_<0?0:_});break}}}return Us(()=>{v()}),(x,_)=>(w(),N("div",{class:"vc-saturation-slider bg",style:Pt({background:l.value}),ref_key:"containerRef",ref:d,onMousedown:b,onTouchstart:b,role:"application","aria-label":"Saturation and brightness picker"},[_[1]||(_[1]=T("div",{class:"bg white"},null,-1)),_[2]||(_[2]=T("div",{class:"bg black"},null,-1)),T("div",{class:"picker-wrap",style:Pt({top:c.value,left:u.value}),role:"slider",tabindex:"0","aria-valuemin":"0","aria-valuemax":"1","aria-label":"press arrow to change saturation or brightness","aria-valuenow":"?","aria-valuetext":`saturation: ${s.value.s.toFixed(0)}%, brightness: ${s.value.v.toFixed(0)}%`,onKeydown:y},_[0]||(_[0]=[T("div",{class:"picker"},null,-1)]),44,zN)],36))}}),lu=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},WN=lu(HN,[["__scopeId","data-v-4d048d6e"]]),f1=t=>typeof t<"u",UN={class:"vc-base-slider"},GN={key:0,class:"background"},qN=["aria-label","aria-valuemax","aria-valuenow"],YN=se({__name:"BaseSlider",props:{direction:{default:"horizontal"},modelValue:{default:0},value:{default:0},max:{default:100},step:{},ariaLabel:{default:"slider"}},emits:["input","update:modelValue"],setup(t,{emit:e}){const n=t,o=e,r=k(()=>n.modelValue??n.value),i=k(()=>{let g=r.value/n.max;return n.direction==="vertical"&&(g=1-g),100*g+"%"}),s=Ie(null);function a(g){f1(g)&&(o("input",g),o("update:modelValue",g))}function l(g){const{direction:b,max:m}=n,v=s.value;if(!v)return;const y=v.clientWidth,x=v.clientHeight,{x:_,y:S}=U4(v),{x:E,y:M}=W4(g),C=E-_,O=M-S;let P;b==="vertical"?O<0?P=m:O>x?P=0:P=(1-O/x)*m:C<0?P=0:C>y?P=m:P=C/y*m,a(P)}const c=G4(l);function u(g){l(g),g.type.startsWith("mouse")?(window.addEventListener("mousemove",c),window.addEventListener("mouseup",d)):(window.addEventListener("touchmove",c),window.addEventListener("touchend",d))}function d(){f()}function f(){window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",d),window.removeEventListener("touchmove",c),window.removeEventListener("touchend",d)}function h(g){g.preventDefault();const{direction:b,max:m}=n,v=yy(g),y=n.step??m/100,x=r.value;let _;switch(v){case"left":{if(b!=="horizontal")return;_=x-y<0?0:x-y;break}case"right":{if(b!=="horizontal")return;_=x+y>m?m:x+y;break}case"down":{if(b!=="vertical")return;_=x-y<0?0:x-y;break}case"up":{if(b!=="vertical")return;_=x+y>m?m:x+y;break}}a(_)}return Us(()=>{f()}),(g,b)=>(w(),N("div",UN,[g.$slots.background?(w(),N("div",GN,[Ce(g.$slots,"background",{},void 0,!0)])):re("",!0),T("div",{class:$e({slider:!0,horizontal:g.direction==="horizontal",vertical:g.direction==="vertical"}),ref_key:"containerRef",ref:s,onMousedown:u,onTouchstart:u,role:"slider","aria-label":g.ariaLabel,"aria-valuemax":g.max,"aria-valuemin":"0","aria-valuenow":r.value.toFixed(1),tabindex:"0",onKeydown:h},[T("div",{class:"picker-wrap",style:Pt({left:g.direction==="horizontal"?i.value:0,top:g.direction==="vertical"?i.value:0}),role:"presentation"},[Ce(g.$slots,"picker",{},()=>[b[0]||(b[0]=T("div",{class:"picker"},null,-1))],!0)],4)],42,qN)]))}}),jN=lu(YN,[["__scopeId","data-v-972b0fad"]]),XN=se({__name:"HueSlider",props:{direction:{default:"horizontal"},modelValue:{default:0}},emits:["update:modelValue"],setup(t,{emit:e}){d3(u=>({"2f44f39d":r.value}));const n=t,o=e,r=k(()=>`linear-gradient(to ${n.direction==="horizontal"?"right":"top"}, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)`),i=k(()=>{const u=Number(n.modelValue);return Number.isNaN(u)?0:u}),s=Ie();Ve(i,(u,d)=>{u!==0&&u-d>0&&(s.value="right"),u!==0&&u-d<0&&(s.value="left")});const a=k(()=>n.direction==="vertical"?i.value===0&&s.value==="right"?0:i.value:n.direction==="horizontal"?i.value===0&&s.value==="right"?360:i.value:0);function l(u){c(Math.round(u))}function c(u){o("update:modelValue",u)}return(u,d)=>(w(),Q(jN,{class:"vc-hue-slider",max:360,step:1,modelValue:a.value,direction:u.direction,"onUpdate:modelValue":l,"aria-label":"Hue"},{background:J(()=>d[0]||(d[0]=[T("div",{class:"gradient"},null,-1)])),picker:J(()=>[Ce(u.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue","direction"]))}}),q4=lu(XN,[["__scopeId","data-v-5367c985"]]),KN={class:"vc-editable-input"},ZN=["value","aria-label"],QN={key:0,class:"vc-input-desc","aria-hidden":"true"},JN=se({__name:"EditableInput",props:{value:{},label:{},desc:{},max:{},min:{},step:{default:1},a11y:{}},emits:["change","blur"],setup(t,{emit:e}){var u;const n=t,o=e,r=((u=n.a11y)==null?void 0:u.label)??n.label,i=`input__label__${r}__${Math.random().toString().slice(2,5)}`;function s(d){const{min:f,max:h}=n;if(f1(h)&&+d>h){o("change",h);return}if(f1(f)&&+d<f){o("change",f);return}o("change",d)}function a(d){var f;s((f=d.target)==null?void 0:f.value)}function l(d){o("blur",d)}function c(d){let f=Number(n.value);if(!isNaN(f)){let h=n.step;const g=VN(h),b=yy(d);b==="up"&&(s((f+h).toFixed(g)),d.preventDefault()),b==="down"&&(s((f-h).toFixed(g)),d.preventDefault())}}return(d,f)=>(w(),N("div",KN,[T("input",{class:"vc-input-input",value:n.value,onKeydown:c,onInput:a,onBlur:l,"aria-label":p(r),id:i},null,40,ZN),T("label",{for:i,class:"vc-input-label","aria-hidden":"true"},ye(n.label),1),d.desc?(w(),N("span",QN,ye(d.desc),1)):re("",!0)]))}}),il=lu(JN,[["__scopeId","data-v-9c267b2b"]]),b_=t=>Je(t).isValid(),Y4=se({__name:"HexInput",props:{value:{},label:{},desc:{},a11y:{},type:{default:"hex"},withHash:{type:Boolean,default:!1}},emits:["change"],setup(t,{emit:e}){const n=t,o=e,r={label:n.type==="hex"?"Hex":"Hex with transparency",...n.a11y},i=(c,u="hex")=>{let d="";return u==="hex"&&(d=Je(c).toHexString()),u==="hex8"&&(d=Je(c).toHex8String()),n.withHash!==!0&&(d=d.replace("#","")),d},s=Ie(i(n.value,n.type));Ve(()=>n.value,c=>{Je.equals(c,s.value)||(s.value=i(c,n.type))});const a=c=>{if(!c)return;s.value=c;let u=c.length;c[0]==="#"&&(u=u-1),!(n.type==="hex"&&u%3!==0&&u!==8)&&(n.type==="hex8"&&u!==8||b_(c)&&o("change",c))},l=()=>{let c=s.value.length;s.value[0]==="#"&&(c=c-1),!(b_(s.value)&&(n.type==="hex"&&c===6||n.type==="hex8"&&c===8))&&(s.value=i(n.value,n.type))};return(c,u)=>(w(),Q(il,{label:n.label,a11y:r,value:s.value,onChange:a,onBlur:l},null,8,["label","value"]))}});function eR(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return t.charAt(Math.floor(Math.random()*t.length))+t.charAt(Math.floor(Math.random()*t.length))}const tR=t=>{const e=Ie(0),n=`__from__vc__hue__${eR()}`;return Ve(t,o=>{if(o[n])return;const r=o.toHsl().h;r===0&&e.value!==0||(e.value=r)},{immediate:!0}),{hueRef:e,updateHueRef:o=>{const r=Je({...t.value.toHsl(),h:o});r[n]=!0,t.value=r,e.value=o}}},nR={class:"title","aria-hidden":"true"},oR={class:"body"},rR={class:"saturation"},iR={class:"hue"},sR={class:"preview"},aR={class:"preview-label","aria-hidden":"true"},lR={class:"preview-swatches"},cR=["aria-label"],uR=["aria-label"],dR={class:"preview-label","aria-hidden":"true"},fR={key:0,class:"actions"},hR=["aria-label"],pR={class:"fields"},mR=["aria-label"];vy.concat(["ok","cancel","reset"]);const gR={class:"body",role:"listbox",tabindex:"0","aria-label":"Select a color"},vR=["onClick","aria-label","title","aria-selected","onKeydown"],bR=["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],yR=se({__name:"TwitterPicker",props:{width:{default:276},presetColors:{default:()=>bR},triangle:{default:"top-left"},tinyColor:{},modelValue:{},value:{}},emits:vy,setup(t,{emit:e}){const n=t,o=by(n,e),r=k(()=>o.value.toHexString()),i=l=>l.toLowerCase()===r.value.toLowerCase(),s=l=>{o.value=l},a=l=>{o.value=l};return(l,c)=>(w(),N("div",{class:$e(["vc-twitter-picker",{tri_hide:n.triangle==="hide",tri_top_left:n.triangle==="top-left",tri_top_right:n.triangle==="top-right"}]),style:Pt({width:typeof n.width=="number"?`${n.width}px`:n.width}),role:"application","aria-label":"Twitter color picker"},[c[2]||(c[2]=T("div",{class:"triangle_shadow"},null,-1)),c[3]||(c[3]=T("div",{class:"triangle"},null,-1)),T("div",gR,[(w(!0),N(Re,null,mt(l.presetColors,(u,d)=>(w(),N("span",{key:d,class:"swatch",style:Pt({background:u,boxShadow:`0 0 4px ${i(u)?u:"transparent"}`}),onClick:f=>s(u),role:"option","aria-label":"color:"+u,title:u,"aria-selected":i(u),onKeydown:nr(f=>s(u),["space"]),tabindex:"0"},null,44,vR))),128)),c[0]||(c[0]=T("div",{class:"hash","aria-hidden":"true"},"#",-1)),H(Y4,{value:r.value,onChange:a},null,8,["value"]),c[1]||(c[1]=T("div",{class:"clear"},null,-1))])],6))}}),xR=lu(yR,[["__scopeId","data-v-e74ac697"]]),wR=se({__name:"HueSlider",props:{modelValue:{},value:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){d3(a=>({"46ac36b6":s.value}));const n=e,o=t,r=k(()=>o.modelValue??o.value??0),i=a=>{n("input",a),n("update:modelValue",a)},s=k(()=>`hsl(${r.value}, 100%, 50%)`);return(a,l)=>(w(),Q(q4,Ct({class:"vc-hue-wrap"},a.$attrs,{modelValue:r.value,"onUpdate:modelValue":i}),null,16,["modelValue"]))}}),_R=lu(wR,[["__scopeId","data-v-b3ac1ab2"]]),j4=se({__name:"FormControlColorInputPopover",props:nt({target:{},manual:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{},open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:modelValue","update:open"],setup(t){const e=ft(t,"modelValue"),n=t,o=ft(t,"open"),r=pt("contentRef");RI(r,()=>{n.manual&&(o.value=!1)},{detectIframe:!0,ignore:()=>[n.target]});const s=k(()=>Je(e.value).toHsv().h);function a(l){const c=Je({h:l,s:1,v:1}).toHexString();e.value=c}return(l,c)=>(w(),Q(p(e4),{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=u=>o.value=u),target:t.target,placement:"bottom","teleport-to":"body",strategy:"fixed",click:!t.manual,manual:t.manual,"custom-class":"color-picker-popover"},{default:J(()=>[T("div",{ref_key:"contentRef",ref:r},[H(p(xR),{modelValue:e.value,"onUpdate:modelValue":c[0]||(c[0]=u=>e.value=u),triangle:"hide",class:"mb-3"},null,8,["modelValue"]),H(p(_R),{"model-value":p(s),class:"color-picker-popover__hue","onUpdate:modelValue":a},null,8,["model-value"])],512)]),_:1},8,["modelValue","target","click","manual"]))}}),SR={class:"form-control-color-input__wrapper"},kR=["id","value"],CR=se({__name:"FormControlColorInput",props:nt({label:{},id:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=pt("swatchRef");function o(i){const s=i.target.value.trim();/^#[0-9a-fA-F]{6}$/.test(s)&&(e.value=s)}function r(i){const s=i.target.value.trim();/^#[0-9a-fA-F]{6}$/.test(s)?e.value=s:i.target.value=e.value}return(i,s)=>{const a=j4,l=On;return w(),Q(l,{class:"form-control-color-input",label:t.label,"label-for":t.id},{default:J(()=>[T("div",SR,[T("button",{ref_key:"swatchRef",ref:n,type:"button",class:"form-control-color-input__wrapper__swatch",style:Pt({backgroundColor:e.value})},null,4),T("input",{id:t.id,class:"form-control form-control-color-input__wrapper__field",value:e.value,onInput:o,onChange:r},null,40,kR)]),H(a,{modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=c=>e.value=c),target:p(n)},null,8,["modelValue","target"])]),_:1},8,["label","label-for"])}}}),Aa=Be(CR,[["__scopeId","data-v-166af452"]]),AR=["data-d","title"],$R=se({__name:"FormControlDirectionPickerHandle",props:{pos:{},label:{},shape:{},active:{type:Boolean}},emits:["select"],setup(t){const e=t,n=k(()=>`direction-picker-handle--${e.shape}`);return(o,r)=>(w(),N("button",{type:"button",class:$e(["direction-picker-handle",[p(n),{"direction-picker-handle--active":t.active}]]),"data-d":t.pos,title:t.label,onClick:r[0]||(r[0]=gn(i=>o.$emit("select"),["stop","prevent"]))},null,10,AR))}}),TR=Be($R,[["__scopeId","data-v-ef260532"]]),MR={class:"direction-picker-field"},OR=se({__name:"FormControlDirectionPickerField",props:{x:{},y:{}},setup(t){const e=t,n=k(()=>`${e.x*100}%`),o=k(()=>`${e.y*100}%`),r=k(()=>{let i,s;return e.x===0?i="-1px":e.x===1?i="calc(100% - var(--rect-w) + 1px)":i=`calc(var(--rect-pad) + ${e.x} * (100% - 2 * var(--rect-pad) - var(--rect-w)))`,e.y===0?s="-1px":e.y===1?s="calc(100% - var(--rect-h) + 1px)":s=`calc(var(--rect-pad) + ${e.y} * (100% - 2 * var(--rect-pad) - var(--rect-h)))`,{left:i,top:s}});return(i,s)=>(w(),N("div",MR,[T("div",{class:"direction-picker-field__crosshair-h",style:Pt({top:p(o)})},null,4),T("div",{class:"direction-picker-field__crosshair-v",style:Pt({left:p(n)})},null,4),T("div",{class:"direction-picker-field__rect",style:Pt(p(r))},null,4)]))}}),BR=Be(OR,[["__scopeId","data-v-2f06dda2"]]),LR=se({__name:"FormControlDirectionPicker",props:nt({label:{},size:{default:"sm"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t,o=[{value:"NW",pos:"nw",label:"Top left",shape:"corner",x:0,y:0},{value:"N",pos:"n",label:"Top",shape:"edge-h",x:.5,y:0},{value:"NE",pos:"ne",label:"Top right",shape:"corner",x:1,y:0},{value:"W",pos:"w",label:"Left",shape:"edge-v",x:0,y:.5},{value:"center",pos:"c",label:"Center",shape:"center",x:.5,y:.5},{value:"E",pos:"e",label:"Right",shape:"edge-v",x:1,y:.5},{value:"SW",pos:"sw",label:"Bottom left",shape:"corner",x:0,y:1},{value:"S",pos:"s",label:"Bottom",shape:"edge-h",x:.5,y:1},{value:"SE",pos:"se",label:"Bottom right",shape:"corner",x:1,y:1}],r=k(()=>o.find(s=>s.value===e.value)??o[4]),i=k(()=>`direction-picker__anchor--${n.size}`);return(s,a)=>{const l=BR,c=TR,u=On;return w(),Q(u,{class:"direction-picker",label:t.label},{default:J(()=>[T("div",{class:$e(["direction-picker__anchor",p(i)])},[H(l,{x:p(r).x,y:p(r).y},null,8,["x","y"]),(w(),N(Re,null,mt(o,d=>H(c,{key:d.value,pos:d.pos,label:d.label,shape:d.shape,active:e.value===d.value,onSelect:f=>e.value=d.value},null,8,["pos","label","shape","active","onSelect"])),64))],2)]),_:1},8,["label"])}}}),X4=Be(LR,[["__scopeId","data-v-37d271a9"]]),PR=se({__name:"DisplayColorSwatch",props:{color:{},bordered:{type:Boolean},size:{default:"md"}},setup(t){const e=t,n=k(()=>({"display-color-swatch--sm":e.size==="sm","display-color-swatch--bordered":e.bordered}));return(o,r)=>(w(),N("span",{class:$e(["display-color-swatch",p(n)]),style:Pt({backgroundColor:t.color})},null,6))}}),im=Be(PR,[["__scopeId","data-v-9e199d96"]]),DR={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function ER(t,e){return w(),N("svg",DR,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 128a8 8 0 0 1-8 8h-80v80a8 8 0 0 1-16 0v-80H40a8 8 0 0 1 0-16h80V40a8 8 0 0 1 16 0v80h80a8 8 0 0 1 8 8"},null,-1)])])}const xy=Te({name:"ph-plus",render:ER}),IR=se({__name:"ButtonAdd",props:{label:{default:"Add"},size:{default:"default"}},emits:["click"],setup(t){return(e,n)=>{const o=Kn;return w(),Q(o,{"icon-left":p(xy),label:t.label,variant:"outline-secondary",class:$e(["button-add",{"button-add--sm":t.size==="sm"}]),onClick:n[0]||(n[0]=r=>e.$emit("click"))},{default:J(()=>[Ce(e.$slots,"default",{},void 0,!0)]),_:3},8,["icon-left","label","class"])}}}),yl=Be(IR,[["__scopeId","data-v-fec65d28"]]),NR={class:"d-flex flex-wrap gap-1"},RR=["onClick"],FR={class:"form-control-colors-input__tag__hex"},VR=["aria-label","onClick"],zR=se({__name:"FormControlColorsInput",props:nt({label:{},id:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=pt("addBtnRef"),o=De("#4e79a7"),r=De(-1),i=Ie(null),s=De(!1);function a(d,f){r.value=d,o.value=e.value[d],i.value=f.currentTarget,s.value=!0}function l(){var d;r.value=-1,o.value="#4e79a7",i.value=((d=n.value)==null?void 0:d.$el)??null,s.value=!0}function c(d){const f=[...e.value];f.splice(d,1),e.value=f}function u(d){if(o.value=d,r.value>=0&&r.value<e.value.length){const f=[...e.value];f[r.value]=d,e.value=f}else e.value=[...e.value,d],s.value=!1}return(d,f)=>{const h=im,g=j4,b=On;return w(),Q(b,{class:"form-control-colors-input",label:t.label,"label-for":t.id},{default:J(()=>[T("div",NR,[(w(!0),N(Re,null,mt(e.value,(m,v)=>(w(),N("span",{key:v,class:"form-control-colors-input__tag"},[T("button",{type:"button",class:"form-control-colors-input__tag__swatch-btn",onClick:y=>a(v,y)},[H(h,{color:m,size:"sm"},null,8,["color"])],8,RR),T("span",FR,ye(m),1),T("button",{type:"button",class:"form-control-colors-input__tag__remove","aria-label":`Remove ${m}`,onClick:y=>c(v)}," × ",8,VR)]))),128)),H(yl,{id:t.id,ref_key:"addBtnRef",ref:n,size:"sm",onClick:l},null,8,["id"])]),H(g,{open:p(s),"onUpdate:open":f[0]||(f[0]=m=>Ke(s)?s.value=m:null),"model-value":p(o),target:p(i),manual:"","onUpdate:modelValue":u},null,8,["open","model-value","target"])]),_:1},8,["label","label-for"])}}}),HR=Be(zR,[["__scopeId","data-v-b39aae3e"]]),WR={class:"form-control-dropdown-item__content"},UR={class:"form-control-dropdown-item__content__text"},GR={key:1,class:"form-control-dropdown-item__content__visual"},qR=["src"],YR=se({__name:"FormControlDropdownItem",props:{label:{},description:{},visual:{},icon:{},active:{type:Boolean},lightLabel:{type:Boolean}},emits:["select"],setup(t){const e=t,n=k(()=>({"form-control-dropdown-item__content__text__label--bold":!e.lightLabel&&e.label&&e.description})),o=k(()=>({"text-white-50":e.active,"text-secondary":!e.active}));return(r,i)=>{const s=i4;return w(),Q(s,{class:"form-control-dropdown-item",active:t.active,"button-class":"form-control-dropdown-item__button",onClick:i[0]||(i[0]=a=>r.$emit("select"))},{default:J(()=>[T("div",WR,[t.icon?(w(),Q(Gt(t.icon),{key:0,class:"form-control-dropdown-item__content__icon"})):re("",!0),T("div",UR,[T("span",{class:$e(["form-control-dropdown-item__content__text__label",p(n)])},ye(t.label),3),t.description?(w(),N("small",{key:0,class:$e(["form-control-dropdown-item__content__text__description",p(o)])},ye(t.description),3)):re("",!0)]),t.visual?(w(),N("div",GR,[typeof t.visual!="string"?(w(),Q(Gt(t.visual),{key:0,class:"form-control-dropdown-item__content__visual__image bg-body rounded-1"})):(w(),N("img",{key:1,src:t.visual,alt:"",class:"form-control-dropdown-item__content__visual__image"},null,8,qR))])):re("",!0)])]),_:1},8,["active"])}}}),jR=Be(YR,[["__scopeId","data-v-b5a1db22"]]),XR={key:0,class:"form-control-dropdown__toggle__content"},KR=se({__name:"FormControlDropdown",props:nt({label:{default:void 0},id:{default:void 0},options:{default:()=>[]},block:{type:Boolean,default:!1},lightLabel:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{default:void 0},size:{default:"md"},autoClose:{type:[Boolean,String],default:!0},menuClass:{default:void 0},minMenuWidth:{default:0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t,{entries:o}=pf(F4),r=k(()=>o.value.length>0?o.value:n.options),i=pt("elementRef"),s=WI(i),a=pt("dropdownRef");function l(){var b,m;const{id:h=null}=((m=(b=a.value)==null?void 0:b.$el)==null?void 0:m.querySelector(".dropdown-toggle"))??{};if(!h)return;const g=document.getElementById(`${h}-menu`);g&&(g.style.width=`${Math.max(s.width.value,n.minMenuWidth)}px`)}Ve(s.width,l);const c=k(()=>({"form-control-dropdown--light-label":n.lightLabel})),u=k(()=>({"form-control-dropdown__toggle--block":n.block})),d=k(()=>r.value.find(h=>h.value===e.value));function f(h){var g;e.value=h,(g=a.value)==null||g.hide()}return(h,g)=>{const b=jR,m=ly,v=On;return w(),Q(v,{ref_key:"elementRef",ref:i,class:$e(["form-control-dropdown",p(c)]),label:t.label,"label-for":t.id,size:t.size},{default:J(()=>{var y;return[Ce(h.$slots,"default",{},void 0,!0),H(m,{ref_key:"dropdownRef",ref:a,class:$e(["form-control-dropdown__toggle",p(u)]),size:t.size,"menu-class":t.menuClass??"form-control-dropdown-menu",text:((y=p(d))==null?void 0:y.label)??t.placeholder??"",disabled:t.disabled,"teleport-to":"body",variant:"outline-secondary","auto-close":t.autoClose,onShow:l,onShown:l},{"button-content":J(()=>[Ce(h.$slots,"button-content",{},()=>{var x,_;return[(x=p(d))!=null&&x.icon?(w(),N("span",XR,[(w(),Q(Gt(p(d).icon),{class:"form-control-dropdown__toggle__icon"})),Ue(" "+ye(p(d).label),1)])):(w(),N(Re,{key:1},[Ue(ye(((_=p(d))==null?void 0:_.label)??t.placeholder??""),1)],64))]},!0)]),default:J(()=>[Ce(h.$slots,"menu",{hide:()=>{var x;return(x=p(a))==null?void 0:x.hide()}},()=>[(w(!0),N(Re,null,mt(p(r),x=>(w(),Q(b,{key:x.value,label:x.label,description:x.description,visual:x.visual,icon:x.icon,active:x.value===e.value,"light-label":t.lightLabel,onSelect:_=>f(x.value)},null,8,["label","description","visual","icon","active","light-label","onSelect"]))),128))],!0)]),_:3},8,["size","menu-class","class","text","disabled","auto-close"])]}),_:3},8,["class","label","label-for","size"])}}}),En=Be(KR,[["__scopeId","data-v-5b435452"]]),ZR={class:"form-control-button-group__container__buttons__visual bg-body rounded-1"},QR=["src"],JR=se({__name:"FormControlButtonGroup",props:nt({label:{},options:{default:()=>[]},block:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t,{entries:o}=pf(R4),r=k(()=>o.value.length>0?o.value:n.options),i=pt("containerRef"),s=De(!1),a=k(()=>({"form-control-button-group__container--block":n.block,"form-control-button-group__container--collapsed":s.value})),l=k(()=>({"form-control-button-group__container__buttons--block":n.block})),c=k(()=>r.value.map(d=>({value:d.value,label:d.text,description:d.description,icon:d.icon,visual:d.visual})));function u(){const d=i.value;if(!d)return;const f=d.querySelectorAll(".btn"),h=Array.from(f).some(g=>g.scrollWidth>g.clientWidth+1);s.value=h||d.scrollWidth>d.clientWidth+1}return Qi(i,u),(d,f)=>{const h=En,g=Kn,b=I7,m=On;return w(),Q(m,{class:"form-control-button-group",label:t.label},{default:J(()=>[p(s)?(w(),Q(h,{key:0,modelValue:e.value,"onUpdate:modelValue":f[0]||(f[0]=v=>e.value=v),options:p(c),block:"","light-label":"",class:"form-control-button-group__dropdown"},null,8,["modelValue","options"])):re("",!0),T("div",{ref_key:"containerRef",ref:i,class:$e(["form-control-button-group__container",p(a)])},[H(b,{class:$e(["form-control-button-group__container__buttons",p(l)])},{default:J(()=>[(w(!0),N(Re,null,mt(p(r),v=>(w(),Q(g,{key:v.value,"icon-left":v.icon??v.iconLeft,label:v.text,"hide-label":!v.icon&&!!v.iconLeft,"hide-tooltip":!v.description,"tooltip-label":v.description,"show-tooltip-force":!!v.description,variant:e.value===v.value?"primary":"outline-primary",tabindex:p(s)?-1:void 0,onClick:y=>e.value=v.value},hi({_:2},[v.visual?{name:"start",fn:J(()=>[T("div",ZR,[typeof v.visual!="string"?(w(),Q(Gt(v.visual),{key:0,class:"form-control-button-group__container__buttons__visual__content"})):(w(),N("img",{key:1,src:v.visual,alt:"",class:"form-control-button-group__container__buttons__visual__content"},null,8,QR))])]),key:"0"}:void 0]),1032,["icon-left","label","hide-label","hide-tooltip","tooltip-label","show-tooltip-force","variant","tabindex","onClick"]))),128))]),_:1},8,["class"])],2),Ce(d.$slots,"default",{},void 0,!0),Ce(d.$slots,`section:${e.value}`,{},void 0,!0)]),_:3},8,["label"])}}}),$n=Be(JR,[["__scopeId","data-v-dfd21712"]]),jf=se({__name:"FormControlButtonGroupEntry",props:{value:{},text:{},iconLeft:{},description:{},visual:{},icon:{}},setup(t){const e=t,n=ns(),o=n["icon-left"]?Te(se({render:()=>n["icon-left"]()})):void 0;return N4(R4,()=>({value:e.value,text:e.text,iconLeft:e.iconLeft??o,description:e.description,visual:e.visual,icon:e.icon})),(r,i)=>Ce(r.$slots,"default")}}),eF={class:"form-control-slider-input__row"},tF={key:0,class:"form-control-slider-input__row__suffix"},nF=se({__name:"FormControlSliderInput",props:nt({label:{},id:{},min:{default:"0"},max:{default:"100"},step:{default:"1"},suffix:{default:void 0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue");return(n,o)=>{const r=qs,i=On;return w(),Q(i,{class:"form-control-slider-input",label:t.label,"label-for":t.id},{default:J(()=>[T("div",eF,[H(r,{id:t.id,type:"range","model-value":e.value,min:t.min,max:t.max,step:t.step,class:"form-control-slider-input__row__range","onUpdate:modelValue":o[0]||(o[0]=s=>e.value=String(s))},null,8,["id","model-value","min","max","step"]),H(r,{"model-value":e.value,class:"form-control-slider-input__row__number",size:"sm","onUpdate:modelValue":o[1]||(o[1]=s=>e.value=String(s))},null,8,["model-value"]),Ce(n.$slots,"suffix",{},()=>[t.suffix?(w(),N("small",tF,ye(t.suffix),1)):re("",!0)],!0)])]),_:3},8,["label","label-for"])}}}),yr=Be(nF,[["__scopeId","data-v-23b8b888"]]),oF={class:"form-control-units-input__row"},rF={class:"form-control-units-input__row__group"},iF=se({__name:"FormControlUnitsInput",props:nt({label:{},id:{},units:{},min:{default:"0"},max:{default:"100"},step:{default:"1"},noSlider:{type:Boolean,default:!1},centerRelative:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t;function o(c){const u=c.match(/^(-?\d*\.?\d+)\s*(%|[a-z]+)?$/i);return u?{num:u[1],unit:u[2]||n.units[0]}:{num:"0",unit:n.units[0]}}const r=k(()=>o(e.value).num),i=k(()=>o(e.value).unit),s=k(()=>i.value==="%"?"100":n.max);function a(c){e.value=`${String(c??"")}${i.value}`}function l(c){const u=i.value,d=parseFloat(r.value),f=parseFloat(n.max);let h=d;u!==c&&f>0&&(n.centerRelative?u==="px"&&c==="%"?h=+((d/f-.5)*100).toFixed(1):u==="%"&&c==="px"&&(h=Math.round((d/100+.5)*f)):u==="px"&&c==="%"?h=Math.round(d/f*100):u==="%"&&c==="px"&&(h=Math.round(d/100*f))),e.value=`${h}${c}`}return(c,u)=>{const d=qs,f=V7,h=ly,g=On;return w(),Q(g,{class:"form-control-units-input",label:t.label,"label-for":t.id},{default:J(()=>[T("div",oF,[t.noSlider?re("",!0):(w(),Q(d,{key:0,id:t.id,type:"range","model-value":p(r),min:t.min,max:p(s),step:t.step,class:"form-control-units-input__row__range","onUpdate:modelValue":a},null,8,["id","model-value","min","max","step"])),T("div",rF,[H(d,{"model-value":p(r),class:"form-control-units-input__row__group__number",size:"sm","onUpdate:modelValue":a},null,8,["model-value"]),H(h,{class:"form-control-units-input__row__group__dropdown",text:p(i),size:"sm",variant:"outline-secondary",end:""},{default:J(()=>[(w(!0),N(Re,null,mt(t.units,b=>(w(),Q(f,{key:b,active:b===p(i),onClick:m=>l(b)},{default:J(()=>[Ue(ye(b),1)]),_:2},1032,["active","onClick"]))),128))]),_:1},8,["text"])])])]),_:1},8,["label","label-for"])}}}),Ih=Be(iF,[["__scopeId","data-v-21f940c0"]]),ic=se({__name:"FormControlDropdownEntry",props:{value:{},label:{},description:{},visual:{},icon:{}},setup(t){const e=t,n=ns(),o=n.icon?Te(se({render:()=>n.icon()})):void 0;return N4(F4,()=>({value:e.value,label:e.label,description:e.description,visual:e.visual,icon:e.icon??o})),(r,i)=>Ce(r.$slots,"default")}}),sF={class:"form-control-text-input__row"},aF={key:0,class:"form-control-text-input__row__suffix"},lF=se({__name:"FormControlTextInput",props:nt({label:{},id:{},placeholder:{default:void 0},suffix:{default:void 0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue");return(n,o)=>{const r=qs,i=On;return w(),Q(i,{class:"form-control-text-input",label:t.label,"label-for":t.id},{default:J(()=>[T("div",sF,[H(r,{id:t.id,"model-value":e.value,placeholder:t.placeholder,class:"form-control-text-input__row__input","onUpdate:modelValue":o[0]||(o[0]=s=>e.value=String(s))},null,8,["id","model-value","placeholder"]),t.suffix?(w(),N("small",aF,ye(t.suffix),1)):re("",!0)])]),_:1},8,["label","label-for"])}}}),sm=Be(lF,[["__scopeId","data-v-f856cd26"]]),cF={class:"display-palette"},uF=se({__name:"DisplayPalette",props:{colors:{},bordered:{type:Boolean}},setup(t){return(e,n)=>{const o=im;return w(),N("span",cF,[(w(!0),N(Re,null,mt(t.colors,(r,i)=>(w(),Q(o,{key:i,color:r,bordered:t.bordered,size:"sm"},null,8,["color","bordered"]))),128))])}}}),dF=Be(uF,[["__scopeId","data-v-329d58de"]]),fF={class:"form-control-palette__preview pe-1"},hF={class:"form-control-palette__preview__name flex-grow-1"},pF={class:"form-control-palette__item"},mF={class:"flex-grow-1"},gF=se({__name:"FormControlPalette",props:nt({label:{default:void 0},id:{default:void 0},palettes:{default:()=>[]}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t,{entries:o}=pf(eN),r=k(()=>o.value.length>0?o.value:n.palettes),i=pt("dropdownRef");function s(){var f;const c=(f=i.value)==null?void 0:f.$el;if(!c)return;const u=c.querySelector(".dropdown-toggle");if(!(u!=null&&u.id))return;const d=document.getElementById(`${u.id}-menu`);d&&(d.style.width=`${u.offsetWidth}px`)}const a=k(()=>r.value.find(c=>c.value===e.value));function l(c){var u;e.value=c,(u=i.value)==null||u.hide()}return(c,u)=>{const d=dF,f=i4,h=ly,g=On;return w(),Q(g,{class:"form-control-palette",label:t.label,"label-for":t.id},{default:J(()=>[Ce(c.$slots,"default",{},void 0,!0),H(h,{ref_key:"dropdownRef",ref:i,class:"form-control-palette__toggle","toggle-class":"d-flex align-items-center","menu-class":["form-control-dropdown-menu"],variant:"outline-secondary","teleport-to":"body",onShown:s},{"button-content":J(()=>{var b;return[T("span",fF,[T("span",hF,ye(((b=p(a))==null?void 0:b.label)??""),1),p(a)?(w(),Q(d,{key:0,colors:p(a).colors,bordered:""},null,8,["colors"])):re("",!0)])]}),default:J(()=>[(w(!0),N(Re,null,mt(p(r),b=>(w(),Q(f,{key:b.value,active:e.value===b.value,onClick:m=>l(b.value)},{default:J(()=>[T("span",pF,[T("span",mF,ye(b.label),1),H(d,{colors:b.colors,bordered:""},null,8,["colors"])])]),_:2},1032,["active","onClick"]))),128))]),_:1},512)]),_:3},8,["label","label-for"])}}}),vF=Be(gF,[["__scopeId","data-v-98c9538c"]]);function bF(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function wp(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),o=t.slice(0,n);return[o.length>1?o[0]+o.slice(2):o,+t.slice(n+1)]}function Uc(t){return t=wp(Math.abs(t)),t?t[1]:NaN}function yF(t,e){return function(n,o){for(var r=n.length,i=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>o&&(a=Math.max(1,o-l)),i.push(n.substring(r-=a,r+a)),!((l+=a+1)>o));)a=t[s=(s+1)%t.length];return i.reverse().join(e)}}function xF(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var wF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _p(t){if(!(e=wF.exec(t)))throw new Error("invalid format: "+t);var e;return new wy({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}_p.prototype=wy.prototype;function wy(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}wy.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _F(t){e:for(var e=t.length,n=1,o=-1,r;n<e;++n)switch(t[n]){case".":o=r=n;break;case"0":o===0&&(o=n),r=n;break;default:if(!+t[n])break e;o>0&&(o=0);break}return o>0?t.slice(0,o)+t.slice(r+1):t}var Sp;function SF(t,e){var n=wp(t,e);if(!n)return Sp=void 0,t.toPrecision(e);var o=n[0],r=n[1],i=r-(Sp=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=o.length;return i===s?o:i>s?o+new Array(i-s+1).join("0"):i>0?o.slice(0,i)+"."+o.slice(i):"0."+new Array(1-i).join("0")+wp(t,Math.max(0,e+i-1))[0]}function y_(t,e){var n=wp(t,e);if(!n)return t+"";var o=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+o:o.length>r+1?o.slice(0,r+1)+"."+o.slice(r+1):o+new Array(r-o.length+2).join("0")}const x_={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:bF,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>y_(t*100,e),r:y_,s:SF,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function w_(t){return t}var __=Array.prototype.map,S_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kF(t){var e=t.grouping===void 0||t.thousands===void 0?w_:yF(__.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",o=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?w_:xF(__.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(d,f){d=_p(d);var h=d.fill,g=d.align,b=d.sign,m=d.symbol,v=d.zero,y=d.width,x=d.comma,_=d.precision,S=d.trim,E=d.type;E==="n"?(x=!0,E="g"):x_[E]||(_===void 0&&(_=12),S=!0,E="g"),(v||h==="0"&&g==="=")&&(v=!0,h="0",g="=");var M=(f&&f.prefix!==void 0?f.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),C=(m==="$"?o:/[%p]/.test(E)?s:"")+(f&&f.suffix!==void 0?f.suffix:""),O=x_[E],P=/[defgprs%]/.test(E);_=_===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function R($){var A=M,L=C,B,F,z;if(E==="c")L=O($)+L,$="";else{$=+$;var V=$<0||1/$<0;if($=isNaN($)?l:O(Math.abs($),_),S&&($=_F($)),V&&+$==0&&b!=="+"&&(V=!1),A=(V?b==="("?b:a:b==="-"||b==="("?"":b)+A,L=(E==="s"&&!isNaN($)&&Sp!==void 0?S_[8+Sp/3]:"")+L+(V&&b==="("?")":""),P){for(B=-1,F=$.length;++B<F;)if(z=$.charCodeAt(B),48>z||z>57){L=(z===46?r+$.slice(B+1):$.slice(B))+L,$=$.slice(0,B);break}}}x&&!v&&($=e($,1/0));var U=A.length+$.length+L.length,ie=U<y?new Array(y-U+1).join(h):"";switch(x&&v&&($=e(ie+$,ie.length?y-L.length:1/0),ie=""),g){case"<":$=A+$+L+ie;break;case"=":$=A+ie+$+L;break;case"^":$=ie.slice(0,U=ie.length>>1)+A+$+L+ie.slice(U);break;default:$=ie+A+$+L;break}return i($)}return R.toString=function(){return d+""},R}function u(d,f){var h=Math.max(-8,Math.min(8,Math.floor(Uc(f)/3)))*3,g=Math.pow(10,-h),b=c((d=_p(d),d.type="f",d),{suffix:S_[8+h/3]});return function(m){return b(g*m)}}return{format:c,formatPrefix:u}}var Xf,cu,K4;CF({thousands:",",grouping:[3],currency:["$",""]});function CF(t){return Xf=kF(t),cu=Xf.format,K4=Xf.formatPrefix,Xf}function AF(t){return Math.max(0,-Uc(Math.abs(t)))}function $F(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Uc(e)/3)))*3-Uc(Math.abs(t)))}function TF(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Uc(e)-Uc(t))+1}const Z4={prefix:"",suffix:"",decimals:"2",scale:"none",negStyle:"minus",thousandsSep:!0};function _y(t){let e="";return t.negStyle==="paren"&&(e+="("),t.thousandsSep&&(e+=","),t.decimals==="auto"?e+="~":e+=`.${t.decimals}`,e+=t.scale==="%"?"%":"f",e}function Rg(t){const e=_y(t);return t.prefix||t.suffix?`${t.prefix}|${e}|${t.suffix}`:e}function MF(t){const e={...Z4};if(!t)return e;let n=t;if(t.includes("|")){const o=t.split("|");e.prefix=o[0]??"",n=o[1]??"",e.suffix=o[2]??""}else e.prefix="",e.suffix="";if(n.startsWith("(")&&(e.negStyle="paren",n=n.slice(1),n.endsWith(")")&&(n=n.slice(0,-1))),e.thousandsSep=n.includes(","),n=n.replace(",",""),n.includes("~"))e.decimals="auto";else{const o=n.match(/\.(\d+)/);o&&(e.decimals=o[1])}return n.endsWith("%")?e.scale="%":e.scale="none",e}function OF(t,e){try{const n=_y(e),o=cu(n)(Math.abs(t)),r=`${e.prefix}${o}${e.suffix}`;return t<0?e.negStyle==="paren"?`(${r})`:`−${r}`:r}catch{return String(t)}}const BF={class:"form-control-number-format__popover"},LF={class:"form-control-number-format__popover__preview"},PF={class:"form-control-number-format__popover__preview__cell__label"},DF={class:"form-control-number-format__popover__body"},EF={class:"form-control-number-format__popover__body__chips"},IF=["onClick"],NF={class:"form-control-number-format__popover__body__grid-2"},RF={class:"form-control-number-format__popover__body__btn-group"},FF=["onClick"],VF={class:"form-control-number-format__popover__body__btn-group"},zF=["onClick"],HF={class:"form-control-number-format__popover__body__check-row"},WF={class:"form-control-number-format__popover__body__d3-row"},UF={class:"form-control-number-format__popover__body__d3-row__value"},GF=se({__name:"FormControlNumberFormat",props:nt({label:{default:void 0},id:{default:void 0},block:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=["0","1","2","3","auto"],o=[{id:"minus",label:"−1,234"},{id:"paren",label:"(1,234)"}],r=[{value:-1234.5,label:"neg",cls:"form-control-number-format__popover__preview__cell__value--neg"},{value:0,label:"zero",cls:"form-control-number-format__popover__preview__cell__value--zero"},{value:9876543,label:"pos",cls:""}],i=[{label:"1,234",config:{prefix:"",suffix:"",decimals:"0",scale:"none",negStyle:"minus",thousandsSep:!0}},{label:"1,234.56",config:{prefix:"",suffix:"",decimals:"2",scale:"none",negStyle:"minus",thousandsSep:!0}},{label:"1234",config:{prefix:"",suffix:"",decimals:"0",scale:"none",negStyle:"minus",thousandsSep:!1}},{label:"12%",config:{prefix:"",suffix:"%",decimals:"0",scale:"none",negStyle:"minus",thousandsSep:!1}},{label:"$1,234",config:{prefix:"$",suffix:"",decimals:"0",scale:"none",negStyle:"minus",thousandsSep:!0}},{label:"(1,234)",config:{prefix:"",suffix:"",decimals:"0",scale:"none",negStyle:"paren",thousandsSep:!0}}],s=ar({...Z4}),a=De(null);Ve(()=>e.value,m=>{m!==Rg(s)&&Object.assign(s,MF(m??""))},{immediate:!0});const l=k(()=>_y(s)),c=k(()=>e.value||"auto");function u(){a.value=null,e.value=Rg(s)}function d(m){s.decimals=m,u()}function f(m){s.negStyle=m,u()}function h(m){Object.assign(s,{...m.config}),a.value=m.label,e.value=Rg(s)}function g(m){return OF(m,s)}const b=k(()=>r.map(m=>({...m,formatted:g(m.value)})));return(m,v)=>{const y=En;return w(),Q(y,{id:t.id,modelValue:e.value,"onUpdate:modelValue":v[4]||(v[4]=x=>e.value=x),label:t.label,block:t.block,placeholder:"auto","auto-close":"outside","menu-class":"form-control-number-format-menu","min-menu-width":260},{"button-content":J(()=>[T("span",{class:$e(["form-control-number-format__trigger-text",{"text-secondary":!e.value}])},ye(p(c)),3)]),menu:J(()=>[T("div",BF,[T("div",LF,[(w(!0),N(Re,null,mt(p(b),(x,_)=>(w(),N("div",{key:_,class:"form-control-number-format__popover__preview__cell"},[T("div",PF,ye(x.label),1),T("div",{class:$e(["form-control-number-format__popover__preview__cell__value",x.cls])},ye(x.formatted),3)]))),128))]),T("div",DF,[T("div",null,[v[5]||(v[5]=T("div",{class:"form-control-number-format__popover__body__section-label"}," Presets ",-1)),T("div",EF,[(w(),N(Re,null,mt(i,x=>T("button",{key:x.label,class:$e(["form-control-number-format__popover__body__chips__chip",{"form-control-number-format__popover__body__chips__chip--active":p(a)===x.label}]),onClick:_=>h(x)},ye(x.label),11,IF)),64))])]),v[12]||(v[12]=T("hr",{class:"form-control-number-format__popover__body__sep"},null,-1)),T("div",NF,[T("div",null,[v[6]||(v[6]=T("div",{class:"form-control-number-format__popover__body__grid-2__field-label"}," Prefix ",-1)),sr(T("input",{"onUpdate:modelValue":v[0]||(v[0]=x=>p(s).prefix=x),class:"form-control-number-format__popover__body__grid-2__input",placeholder:"e.g. $",onInput:u},null,544),[[up,p(s).prefix]])]),T("div",null,[v[7]||(v[7]=T("div",{class:"form-control-number-format__popover__body__grid-2__field-label"}," Suffix ",-1)),sr(T("input",{"onUpdate:modelValue":v[1]||(v[1]=x=>p(s).suffix=x),class:"form-control-number-format__popover__body__grid-2__input",placeholder:"e.g. %",onInput:u},null,544),[[up,p(s).suffix]])])]),T("div",null,[v[8]||(v[8]=T("div",{class:"form-control-number-format__popover__body__section-label"}," Decimal places ",-1)),T("div",RF,[(w(),N(Re,null,mt(n,x=>T("button",{key:x,class:$e(["form-control-number-format__popover__body__btn-group__btn",{"form-control-number-format__popover__body__btn-group__btn--active":p(s).decimals===x}]),onClick:_=>d(x)},ye(x),11,FF)),64))])]),T("div",null,[v[9]||(v[9]=T("div",{class:"form-control-number-format__popover__body__section-label"}," Negatives ",-1)),T("div",VF,[(w(),N(Re,null,mt(o,x=>T("button",{key:x.id,class:$e(["form-control-number-format__popover__body__btn-group__btn",{"form-control-number-format__popover__body__btn-group__btn--active":p(s).negStyle===x.id}]),onClick:_=>f(x.id)},ye(x.label),11,zF)),64))])]),T("label",HF,[sr(T("input",{"onUpdate:modelValue":v[2]||(v[2]=x=>p(s).thousandsSep=x),type:"checkbox",class:"form-control-number-format__popover__body__check-row__checkbox",onChange:v[3]||(v[3]=x=>u())},null,544),[[f3,p(s).thousandsSep]]),v[10]||(v[10]=T("span",null,"Thousands separator",-1))]),v[13]||(v[13]=T("hr",{class:"form-control-number-format__popover__body__sep"},null,-1)),T("div",WF,[v[11]||(v[11]=T("span",{class:"form-control-number-format__popover__body__d3-row__label"},"d3·fmt",-1)),T("span",UF,ye(p(l)),1)])])])]),_:1},8,["id","modelValue","label","block"])}}}),qF=Be(GF,[["__scopeId","data-v-959c1f3d"]]),Fg=new Date,Vg=new Date;function rs(t,e,n,o){function r(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return r.floor=i=>(t(i=new Date(+i)),i),r.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),r.round=i=>{const s=r(i),a=r.ceil(i);return i-s<a-i?s:a},r.offset=(i,s)=>(e(i=new Date(+i),s==null?1:Math.floor(s)),i),r.range=(i,s,a)=>{const l=[];if(i=r.ceil(i),a=a==null?1:Math.floor(a),!(i<s)||!(a>0))return l;let c;do l.push(c=new Date(+i)),e(i,a),t(i);while(c<i&&i<s);return l},r.filter=i=>rs(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!i(s););else for(;--a>=0;)for(;e(s,1),!i(s););}),n&&(r.count=(i,s)=>(Fg.setTime(+i),Vg.setTime(+s),t(Fg),t(Vg),Math.floor(n(Fg,Vg))),r.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?r.filter(o?s=>o(s)%i===0:s=>r.count(0,s)%i===0):r)),r}const YF=1e3,Sy=YF*60,jF=Sy*60,Nd=jF*24,Q4=Nd*7,ky=rs(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Sy)/Nd,t=>t.getDate()-1);ky.range;const Cy=rs(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Nd,t=>t.getUTCDate()-1);Cy.range;const XF=rs(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Nd,t=>Math.floor(t/Nd));XF.range;function Ul(t){return rs(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Sy)/Q4)}const J4=Ul(0),kp=Ul(1),KF=Ul(2),ZF=Ul(3),Gc=Ul(4),QF=Ul(5),JF=Ul(6);J4.range;kp.range;KF.range;ZF.range;Gc.range;QF.range;JF.range;function Gl(t){return rs(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Q4)}const eC=Gl(0),Cp=Gl(1),eV=Gl(2),tV=Gl(3),qc=Gl(4),nV=Gl(5),oV=Gl(6);eC.range;Cp.range;eV.range;tV.range;qc.range;nV.range;oV.range;const Tl=rs(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Tl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:rs(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Tl.range;const Ml=rs(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ml.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:rs(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Ml.range;function Nh(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rV(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tC(t){let e,n,o;t.length!==2?(e=Nh,n=(a,l)=>Nh(t(a),l),o=(a,l)=>t(a)-l):(e=t===Nh||t===rV?t:iV,n=t,o=t);function r(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const d=c+u>>>1;n(a[d],l)<0?c=d+1:u=d}while(c<u)}return c}function i(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const d=c+u>>>1;n(a[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(a,l,c=0,u=a.length){const d=r(a,l,c,u-1);return d>c&&o(a[d-1],l)>-o(a[d],l)?d-1:d}return{left:r,center:s,right:i}}function iV(){return 0}function sV(t){return t===null?NaN:+t}const aV=tC(Nh),lV=aV.right,cV=tC(sV).center;class k_ extends Map{constructor(e,n=fV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[o,r]of e)this.set(o,r)}get(e){return super.get(C_(this,e))}has(e){return super.has(C_(this,e))}set(e,n){return super.set(uV(this,e),n)}delete(e){return super.delete(dV(this,e))}}function C_({_intern:t,_key:e},n){const o=e(n);return t.has(o)?t.get(o):n}function uV({_intern:t,_key:e},n){const o=e(n);return t.has(o)?t.get(o):(t.set(o,n),n)}function dV({_intern:t,_key:e},n){const o=e(n);return t.has(o)&&(n=t.get(o),t.delete(o)),n}function fV(t){return t!==null&&typeof t=="object"?t.valueOf():t}const hV=Math.sqrt(50),pV=Math.sqrt(10),mV=Math.sqrt(2);function Ap(t,e,n){const o=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(o)),i=o/Math.pow(10,r),s=i>=hV?10:i>=pV?5:i>=mV?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Ap(t,e,n*2):[a,l,c]}function gV(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const o=e<t,[r,i,s]=o?Ap(e,t,n):Ap(t,e,n);if(!(i>=r))return[];const a=i-r+1,l=new Array(a);if(o)if(s<0)for(let c=0;c<a;++c)l[c]=(i-c)/-s;else for(let c=0;c<a;++c)l[c]=(i-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function h1(t,e,n){return e=+e,t=+t,n=+n,Ap(t,e,n)[2]}function vV(t,e,n){e=+e,t=+t,n=+n;const o=e<t,r=o?h1(e,t,n):h1(t,e,n);return(o?-1:1)*(r<0?1/-r:r)}function Rd(t,e){let n;if(e===void 0)for(const o of t)o!=null&&(n<o||n===void 0&&o>=o)&&(n=o);else{let o=-1;for(let r of t)(r=e(r,++o,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function bV(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var o=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(r);++o<r;)i[o]=t+o*n;return i}function zg(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Hg(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Eu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function yV(t){var e=t.dateTime,n=t.date,o=t.time,r=t.periods,i=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Iu(r),u=Nu(r),d=Iu(i),f=Nu(i),h=Iu(s),g=Nu(s),b=Iu(a),m=Nu(a),v=Iu(l),y=Nu(l),x={a:z,A:V,b:U,B:ie,c:null,d:B_,e:B_,f:HV,g:QV,G:ez,H:FV,I:VV,j:zV,L:nC,m:WV,M:UV,p:ue,q:fe,Q:D_,s:E_,S:GV,u:qV,U:YV,V:jV,w:XV,W:KV,x:null,X:null,y:ZV,Y:JV,Z:tz,"%":P_},_={a:he,A:ce,b:de,B:_e,c:null,d:L_,e:L_,f:iz,g:mz,G:vz,H:nz,I:oz,j:rz,L:rC,m:sz,M:az,p:j,q:te,Q:D_,s:E_,S:lz,u:cz,U:uz,V:dz,w:fz,W:hz,x:null,X:null,y:pz,Y:gz,Z:bz,"%":P_},S={a:P,A:R,b:$,B:A,c:L,d:M_,e:M_,f:EV,g:T_,G:$_,H:O_,I:O_,j:BV,L:DV,m:OV,M:LV,p:O,q:MV,Q:NV,s:RV,S:PV,u:kV,U:CV,V:AV,w:SV,W:$V,x:B,X:F,y:T_,Y:$_,Z:TV,"%":IV};x.x=E(n,x),x.X=E(o,x),x.c=E(e,x),_.x=E(n,_),_.X=E(o,_),_.c=E(e,_);function E(ne,me){return function(ve){var I=[],W=-1,X=0,ae=ne.length,le,K,oe;for(ve instanceof Date||(ve=new Date(+ve));++W<ae;)ne.charCodeAt(W)===37&&(I.push(ne.slice(X,W)),(K=A_[le=ne.charAt(++W)])!=null?le=ne.charAt(++W):K=le==="e"?" ":"0",(oe=me[le])&&(le=oe(ve,K)),I.push(le),X=W+1);return I.push(ne.slice(X,W)),I.join("")}}function M(ne,me){return function(ve){var I=Eu(1900,void 0,1),W=C(I,ne,ve+="",0),X,ae;if(W!=ve.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(me&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(X=Hg(Eu(I.y,0,1)),ae=X.getUTCDay(),X=ae>4||ae===0?Cp.ceil(X):Cp(X),X=Cy.offset(X,(I.V-1)*7),I.y=X.getUTCFullYear(),I.m=X.getUTCMonth(),I.d=X.getUTCDate()+(I.w+6)%7):(X=zg(Eu(I.y,0,1)),ae=X.getDay(),X=ae>4||ae===0?kp.ceil(X):kp(X),X=ky.offset(X,(I.V-1)*7),I.y=X.getFullYear(),I.m=X.getMonth(),I.d=X.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),ae="Z"in I?Hg(Eu(I.y,0,1)).getUTCDay():zg(Eu(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(ae+5)%7:I.w+I.U*7-(ae+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Hg(I)):zg(I)}}function C(ne,me,ve,I){for(var W=0,X=me.length,ae=ve.length,le,K;W<X;){if(I>=ae)return-1;if(le=me.charCodeAt(W++),le===37){if(le=me.charAt(W++),K=S[le in A_?me.charAt(W++):le],!K||(I=K(ne,ve,I))<0)return-1}else if(le!=ve.charCodeAt(I++))return-1}return I}function O(ne,me,ve){var I=c.exec(me.slice(ve));return I?(ne.p=u.get(I[0].toLowerCase()),ve+I[0].length):-1}function P(ne,me,ve){var I=h.exec(me.slice(ve));return I?(ne.w=g.get(I[0].toLowerCase()),ve+I[0].length):-1}function R(ne,me,ve){var I=d.exec(me.slice(ve));return I?(ne.w=f.get(I[0].toLowerCase()),ve+I[0].length):-1}function $(ne,me,ve){var I=v.exec(me.slice(ve));return I?(ne.m=y.get(I[0].toLowerCase()),ve+I[0].length):-1}function A(ne,me,ve){var I=b.exec(me.slice(ve));return I?(ne.m=m.get(I[0].toLowerCase()),ve+I[0].length):-1}function L(ne,me,ve){return C(ne,e,me,ve)}function B(ne,me,ve){return C(ne,n,me,ve)}function F(ne,me,ve){return C(ne,o,me,ve)}function z(ne){return s[ne.getDay()]}function V(ne){return i[ne.getDay()]}function U(ne){return l[ne.getMonth()]}function ie(ne){return a[ne.getMonth()]}function ue(ne){return r[+(ne.getHours()>=12)]}function fe(ne){return 1+~~(ne.getMonth()/3)}function he(ne){return s[ne.getUTCDay()]}function ce(ne){return i[ne.getUTCDay()]}function de(ne){return l[ne.getUTCMonth()]}function _e(ne){return a[ne.getUTCMonth()]}function j(ne){return r[+(ne.getUTCHours()>=12)]}function te(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var me=E(ne+="",x);return me.toString=function(){return ne},me},parse:function(ne){var me=M(ne+="",!1);return me.toString=function(){return ne},me},utcFormat:function(ne){var me=E(ne+="",_);return me.toString=function(){return ne},me},utcParse:function(ne){var me=M(ne+="",!0);return me.toString=function(){return ne},me}}}var A_={"-":"",_:" ",0:"0"},Zn=/^\s*\d+/,xV=/^%/,wV=/[\\^$*+?|[\]().{}]/g;function qt(t,e,n){var o=t<0?"-":"",r=(o?-t:t)+"",i=r.length;return o+(i<n?new Array(n-i+1).join(e)+r:r)}function _V(t){return t.replace(wV,"\\$&")}function Iu(t){return new RegExp("^(?:"+t.map(_V).join("|")+")","i")}function Nu(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function SV(t,e,n){var o=Zn.exec(e.slice(n,n+1));return o?(t.w=+o[0],n+o[0].length):-1}function kV(t,e,n){var o=Zn.exec(e.slice(n,n+1));return o?(t.u=+o[0],n+o[0].length):-1}function CV(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.U=+o[0],n+o[0].length):-1}function AV(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.V=+o[0],n+o[0].length):-1}function $V(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.W=+o[0],n+o[0].length):-1}function $_(t,e,n){var o=Zn.exec(e.slice(n,n+4));return o?(t.y=+o[0],n+o[0].length):-1}function T_(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.y=+o[0]+(+o[0]>68?1900:2e3),n+o[0].length):-1}function TV(t,e,n){var o=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return o?(t.Z=o[1]?0:-(o[2]+(o[3]||"00")),n+o[0].length):-1}function MV(t,e,n){var o=Zn.exec(e.slice(n,n+1));return o?(t.q=o[0]*3-3,n+o[0].length):-1}function OV(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.m=o[0]-1,n+o[0].length):-1}function M_(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.d=+o[0],n+o[0].length):-1}function BV(t,e,n){var o=Zn.exec(e.slice(n,n+3));return o?(t.m=0,t.d=+o[0],n+o[0].length):-1}function O_(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.H=+o[0],n+o[0].length):-1}function LV(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.M=+o[0],n+o[0].length):-1}function PV(t,e,n){var o=Zn.exec(e.slice(n,n+2));return o?(t.S=+o[0],n+o[0].length):-1}function DV(t,e,n){var o=Zn.exec(e.slice(n,n+3));return o?(t.L=+o[0],n+o[0].length):-1}function EV(t,e,n){var o=Zn.exec(e.slice(n,n+6));return o?(t.L=Math.floor(o[0]/1e3),n+o[0].length):-1}function IV(t,e,n){var o=xV.exec(e.slice(n,n+1));return o?n+o[0].length:-1}function NV(t,e,n){var o=Zn.exec(e.slice(n));return o?(t.Q=+o[0],n+o[0].length):-1}function RV(t,e,n){var o=Zn.exec(e.slice(n));return o?(t.s=+o[0],n+o[0].length):-1}function B_(t,e){return qt(t.getDate(),e,2)}function FV(t,e){return qt(t.getHours(),e,2)}function VV(t,e){return qt(t.getHours()%12||12,e,2)}function zV(t,e){return qt(1+ky.count(Tl(t),t),e,3)}function nC(t,e){return qt(t.getMilliseconds(),e,3)}function HV(t,e){return nC(t,e)+"000"}function WV(t,e){return qt(t.getMonth()+1,e,2)}function UV(t,e){return qt(t.getMinutes(),e,2)}function GV(t,e){return qt(t.getSeconds(),e,2)}function qV(t){var e=t.getDay();return e===0?7:e}function YV(t,e){return qt(J4.count(Tl(t)-1,t),e,2)}function oC(t){var e=t.getDay();return e>=4||e===0?Gc(t):Gc.ceil(t)}function jV(t,e){return t=oC(t),qt(Gc.count(Tl(t),t)+(Tl(t).getDay()===4),e,2)}function XV(t){return t.getDay()}function KV(t,e){return qt(kp.count(Tl(t)-1,t),e,2)}function ZV(t,e){return qt(t.getFullYear()%100,e,2)}function QV(t,e){return t=oC(t),qt(t.getFullYear()%100,e,2)}function JV(t,e){return qt(t.getFullYear()%1e4,e,4)}function ez(t,e){var n=t.getDay();return t=n>=4||n===0?Gc(t):Gc.ceil(t),qt(t.getFullYear()%1e4,e,4)}function tz(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+qt(e/60|0,"0",2)+qt(e%60,"0",2)}function L_(t,e){return qt(t.getUTCDate(),e,2)}function nz(t,e){return qt(t.getUTCHours(),e,2)}function oz(t,e){return qt(t.getUTCHours()%12||12,e,2)}function rz(t,e){return qt(1+Cy.count(Ml(t),t),e,3)}function rC(t,e){return qt(t.getUTCMilliseconds(),e,3)}function iz(t,e){return rC(t,e)+"000"}function sz(t,e){return qt(t.getUTCMonth()+1,e,2)}function az(t,e){return qt(t.getUTCMinutes(),e,2)}function lz(t,e){return qt(t.getUTCSeconds(),e,2)}function cz(t){var e=t.getUTCDay();return e===0?7:e}function uz(t,e){return qt(eC.count(Ml(t)-1,t),e,2)}function iC(t){var e=t.getUTCDay();return e>=4||e===0?qc(t):qc.ceil(t)}function dz(t,e){return t=iC(t),qt(qc.count(Ml(t),t)+(Ml(t).getUTCDay()===4),e,2)}function fz(t){return t.getUTCDay()}function hz(t,e){return qt(Cp.count(Ml(t)-1,t),e,2)}function pz(t,e){return qt(t.getUTCFullYear()%100,e,2)}function mz(t,e){return t=iC(t),qt(t.getUTCFullYear()%100,e,2)}function gz(t,e){return qt(t.getUTCFullYear()%1e4,e,4)}function vz(t,e){var n=t.getUTCDay();return t=n>=4||n===0?qc(t):qc.ceil(t),qt(t.getUTCFullYear()%1e4,e,4)}function bz(){return"+0000"}function P_(){return"%"}function D_(t){return+t}function E_(t){return Math.floor(+t/1e3)}var sc,Fd;yz({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yz(t){return sc=yV(t),Fd=sc.format,sc.parse,sc.utcFormat,sc.utcParse,sc}const gf=[{label:"(automatic)",fmt:"(automatic)"},{label:"Year only",fmt:"YYYY",d3:"%Y"},{label:"Short year",fmt:"'YY",d3:"'%y"},{label:"Quarter",fmt:"Q",d3:"%Y Q%q"},{label:"Month abbr.",fmt:"MMM",d3:"%b"},{label:"Month + year",fmt:"MMM 'YY",d3:"%b '%y"},{label:"Full month",fmt:"MMMM",d3:"%B"},{label:"Month + day",fmt:"MMMM D",d3:"%B %-d"},{label:"Full date",fmt:"MMMM D, YYYY",d3:"%B %-d, %Y"},{label:"MM/DD/YYYY",fmt:"MM/DD/YYYY",d3:"%m/%d/%Y"},{label:"DD/MM/YYYY",fmt:"DD/MM/YYYY",d3:"%d/%m/%Y"},{label:"ISO 8601",fmt:"YYYY-MM-DD",d3:"%Y-%m-%d"},{label:"(custom)",fmt:"(custom)"}],sC=[new Date(2015,0,1),new Date(2016,0,1),new Date(2017,0,1)];function aC(t,e){if(t.includes("%q")){const n=Math.floor(e.getMonth()/3)+1;return Fd(t.replace("%q",String(n)))(e)}return Fd(t)(e)}function I_(t){if(t==="(automatic)")return"auto — adapts to data";if(t==="(custom)")return null;const e=gf.find(n=>n.fmt===t);return e!=null&&e.d3?sC.map(n=>aC(e.d3,n)).join(" · "):null}function xz(t){if(t==="(automatic)")return"";const e=gf.find(n=>n.fmt===t);return(e==null?void 0:e.d3)??""}function wz(t){if(!t)return"";try{return sC.map(e=>aC(t,e)).join(" · ")}catch{return"(invalid format)"}}function _z(t,e,n){if(!t)return"(automatic)";if(e==="(custom)")return n||"(custom)";const o=gf.find(r=>r.d3===t);return(o==null?void 0:o.label)??t}function Sz(t){if(!t)return{selectedPreset:"(automatic)",customStr:""};const e=gf.find(n=>n.d3===t);return e?{selectedPreset:e.fmt,customStr:""}:{selectedPreset:"(custom)",customStr:t}}const kz={class:"form-control-date-format__popover"},Cz={class:"form-control-date-format__popover__list"},Az=["onClick"],$z={class:"form-control-date-format__popover__list__item__body"},Tz={class:"form-control-date-format__popover__list__item__body__label"},Mz={key:0,class:"form-control-date-format__popover__list__item__body__ticks"},Oz={key:0,class:"form-control-date-format__popover__list__item__check"},Bz={key:0,class:"form-control-date-format__popover__custom"},Lz={class:"form-control-date-format__popover__custom__preview"},Pz={class:"form-control-date-format__popover__custom__preview__value"},Dz=se({__name:"FormControlDateFormat",props:nt({label:{default:void 0},id:{default:void 0},block:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=De("(automatic)"),o=De(""),r=k(()=>wz(o.value)),i=k(()=>_z(e.value,n.value,o.value));function s(l,c){n.value=l,l!=="(custom)"&&(e.value=xz(l),c())}function a(){e.value=o.value}return Ve(()=>e.value,l=>{const c=Sz(l);n.value=c.selectedPreset,o.value=c.customStr},{immediate:!0}),(l,c)=>{const u=En;return w(),Q(u,{id:t.id,modelValue:e.value,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value=d),label:t.label,block:t.block,placeholder:"(automatic)","auto-close":"outside","menu-class":"form-control-date-format-menu","min-menu-width":260},{"button-content":J(()=>[T("span",{class:$e(["form-control-date-format__trigger-text",{"text-secondary":!e.value}])},ye(p(i)),3)]),menu:J(({hide:d})=>[T("div",kz,[T("div",Cz,[(w(!0),N(Re,null,mt(p(gf),f=>(w(),N("div",{key:f.fmt,class:$e(["form-control-date-format__popover__list__item",{"form-control-date-format__popover__list__item--active":p(n)===f.fmt}]),onClick:h=>s(f.fmt,d)},[T("div",$z,[T("div",Tz,ye(f.label),1),p(I_)(f.fmt)?(w(),N("div",Mz,ye(p(I_)(f.fmt)),1)):re("",!0)]),p(n)===f.fmt?(w(),N("span",Oz,"✓")):re("",!0)],10,Az))),128))]),p(n)==="(custom)"?(w(),N("div",Bz,[c[3]||(c[3]=T("div",{class:"form-control-date-format__popover__custom__section-label"}," Custom d3-time-format string ",-1)),sr(T("input",{"onUpdate:modelValue":c[0]||(c[0]=f=>Ke(o)?o.value=f:null),class:"form-control-date-format__popover__custom__input",placeholder:"e.g. %b %d, %Y",onInput:a},null,544),[[up,p(o)]]),T("div",Lz,[c[2]||(c[2]=Ue(" Preview: ",-1)),T("span",Pz,ye(p(o)?p(r):"—"),1)])])):re("",!0)])]),_:1},8,["id","modelValue","label","block"])}}}),Ez=Be(Dz,[["__scopeId","data-v-710c73d8"]]),Iz={class:"display-date"},Nz=se({__name:"DisplayDate",props:{value:{},format:{default:"short"}},setup(t){const e=t,n=k(()=>{const o=new Date(e.value);return Number.isNaN(o.getTime())?e.value:e.format==="long"?o.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}):o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})});return(o,r)=>(w(),N("span",Iz,ye(p(n)),1))}}),Rz=Be(Nz,[["__scopeId","data-v-7da39ad7"]]),Fz={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Vz(t,e){return w(),N("svg",Fz,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a16 16 0 0 1-16-16v-40a8 8 0 0 1 0-16a16 16 0 0 1 16 16v40a8 8 0 0 1 8 8m-32-92a12 12 0 1 1 12 12a12 12 0 0 1-12-12"},null,-1)])])}const p1=Te({name:"ph-info",render:Vz}),zz={class:"display-contrast-badge__ratio"},Hz=se({__name:"DisplayContrastBadge",props:{level:{},ratio:{}},setup(t){const e=t,n=pt("badgeRef"),o=k(()=>({"display-contrast-badge--aaa":e.level==="AAA","display-contrast-badge--aa":e.level==="AA","display-contrast-badge--fail":e.level==="Fail"})),r=k(()=>{switch(e.level){case"AAA":return"WCAG AAA — Ratio ≥ 7:1. Enhanced contrast, meets the highest accessibility standard.";case"AA":return"WCAG AA — Ratio ≥ 4.5:1. Minimum contrast for normal text. Sufficient for most users.";default:return"Below WCAG AA — Ratio < 4.5:1. Insufficient contrast. May be hard to read for some users."}});return(i,s)=>(w(),N("span",{ref_key:"badgeRef",ref:n,class:$e(["display-contrast-badge",p(o)])},[Ue(ye(t.level)+" ",1),T("span",zz,ye(t.ratio),1),H(p(p1),{class:"display-contrast-badge__info"}),H(p(Dd),{"teleport-to":"body",target:p(n),title:p(r),placement:"top"},null,8,["target","title"])],2))}}),N_=Be(Hz,[["__scopeId","data-v-2ff89f6d"]]),Wz={[an.BarVertical]:"Columns",[an.BarHorizontal]:"Bars",[an.BarMulti]:"Grouped Columns",[an.ColumnStacked]:"Stacked Columns",[an.BarStacked]:"Stacked Bars",[an.BarSplit]:"Split Bars",[an.BarGrouped]:"Grouped Bars",[an.Line]:"Line",[an.LineMulti]:"Lines",[an.Area]:"Area",[an.AreaStacked]:"Areas",[an.Donut]:"Donut",[an.Pie]:"Pie"};function lC(t){return Wz[t]??t}const Uz={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Gz(t,e){return w(),N("svg",Uz,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 200h-8V40a8 8 0 0 0-8-8h-56a8 8 0 0 0-8 8v40H96a8 8 0 0 0-8 8v40H48a8 8 0 0 0-8 8v64h-8a8 8 0 0 0 0 16h192a8 8 0 0 0 0-16M160 48h40v152h-40Zm-56 48h40v104h-40Zm-48 48h32v56H56Z"},null,-1)])])}const ks=Te({name:"ph-chart-bar",render:Gz}),qz={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Yz(t,e){return w(),N("svg",qz,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 96h-40V56a8 8 0 0 0-8-8H56v-8a8 8 0 0 0-16 0v176a8 8 0 0 0 16 0v-8h88a8 8 0 0 0 8-8v-40h72a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8m-56-32v32H56V64Zm-32 128H56v-32h80Zm80-48H56v-32h160Z"},null,-1)])])}const ju=Te({name:"ph-chart-bar-horizontal",render:Yz}),jz={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Xz(t,e){return w(),N("svg",jz,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v108.69l50.34-50.35a8 8 0 0 1 11.32 0L128 132.69L180.69 80H160a8 8 0 0 1 0-16h40a8 8 0 0 1 8 8v40a8 8 0 0 1-16 0V91.31l-58.34 58.35a8 8 0 0 1-11.32 0L96 123.31l-56 56V200h184a8 8 0 0 1 8 8"},null,-1)])])}const Xu=Te({name:"ph-chart-line-up",render:Xz}),Kz={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Zz(t,e){return w(),N("svg",Kz,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M100 116.43a8 8 0 0 0 4-6.93v-72A8 8 0 0 0 93.34 30a104.06 104.06 0 0 0-67.61 117a8 8 0 0 0 4.52 5.81a7.9 7.9 0 0 0 3.35.74a8 8 0 0 0 4-1.07ZM88 49.62v55.26l-47.88 27.63C40 131 40 129.48 40 128a88.12 88.12 0 0 1 48-78.38M128 24a8 8 0 0 0-8 8v91.82l-78.81 45.91a8 8 0 0 0-2.87 11A104 104 0 1 0 128 24m0 192a88.47 88.47 0 0 1-71.49-36.68l75.52-44a8 8 0 0 0 4-6.92V40.36A88 88 0 0 1 128 216"},null,-1)])])}const cC=Te({name:"ph-chart-pie-slice",render:Zz}),Qz={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Jz(t,e){return w(),N("svg",Qz,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M128 24a8 8 0 0 0-8 8v56a8 8 0 0 0 8 8a32 32 0 1 1-27.72 16a8 8 0 0 0-2.93-10.93l-48.5-28A8 8 0 0 0 37.92 76A104 104 0 1 0 128 24M48.09 91.1L83 111.26A48.1 48.1 0 0 0 80 128c0 1.53.08 3 .22 4.52L41.28 143a88.16 88.16 0 0 1 6.81-51.9m-2.67 67.31l39-10.44A48.1 48.1 0 0 0 120 175.32v40.31a88.2 88.2 0 0 1-74.58-57.22M136 215.63v-40.31a48 48 0 0 0 0-94.65V40.36a88 88 0 0 1 0 175.27"},null,-1)])])}const eH=Te({name:"ph-chart-donut",render:Jz}),tH=se({__name:"DisplayChartTypeBadge",props:{chartType:{},theme:{default:"light"}},setup(t){const e=t,n=k(()=>lC(e.chartType)),o=k(()=>e.theme==="dark"?"dark":"light"),r={[an.BarVertical]:ks,[an.BarHorizontal]:ju,[an.BarMulti]:ks,[an.ColumnStacked]:ks,[an.BarStacked]:ju,[an.BarSplit]:ju,[an.BarGrouped]:ju,[an.Line]:Xu,[an.LineMulti]:Xu,[an.Area]:Xu,[an.AreaStacked]:Xu,[an.Donut]:eH,[an.Pie]:cC},i=k(()=>r[e.chartType]??ks);return(s,a)=>(w(),Q(p(ay),{variant:p(o),pill:"",class:"display-chart-type-badge"},{default:J(()=>[(w(),Q(Gt(p(i)),{class:"display-chart-type-badge__icon"})),Ue(" "+ye(p(n)),1)]),_:1},8,["variant"]))}}),nH=Be(tH,[["__scopeId","data-v-cb8f5582"]]),oH={class:"section-card"},rH={key:0,class:"section-card__label"},iH={key:1,class:"section-card__body"},sH=se({__name:"SectionCard",props:{label:{}},setup(t){return(e,n)=>(w(),N("div",oH,[t.label?(w(),N("div",rH,ye(t.label),1)):re("",!0),Ce(e.$slots,"header",{},void 0,!0),e.$slots.default?(w(),N("div",iH,[Ce(e.$slots,"default",{},void 0,!0)])):re("",!0)]))}}),md=Be(sH,[["__scopeId","data-v-804cd08f"]]),aH={},lH={class:"settings-section-description"};function cH(t,e){return w(),N("p",lH,[Ce(t.$slots,"default",{},void 0,!0)])}const uH=Be(aH,[["render",cH],["__scopeId","data-v-9caa49e3"]]),dH={},fH={class:"settings-section-title"};function hH(t,e){return w(),N("h6",fH,[Ce(t.$slots,"default",{},void 0,!0)])}const pH=Be(dH,[["render",hH],["__scopeId","data-v-c5961a9d"]]),mH={class:"settings-section-icon"},gH=se({__name:"SettingsSectionIcon",props:{icon:{}},setup(t){return(e,n)=>{const o=mf;return w(),N("div",mH,[H(o,{name:t.icon},null,8,["name"])])}}}),vH=Be(gH,[["__scopeId","data-v-e8122360"]]),bH={class:"settings-section"},yH={class:"settings-section__header"},xH={class:"settings-section__header__text"},wH={key:1,class:"settings-section__body"},_H=se({__name:"SettingsSection",props:{title:{},icon:{default:void 0},description:{default:void 0}},setup(t){return(e,n)=>{const o=vH,r=pH,i=uH;return w(),N("section",bH,[T("div",yH,[t.icon?(w(),Q(o,{key:0,icon:t.icon},null,8,["icon"])):re("",!0),T("div",xH,[H(r,null,{default:J(()=>[Ue(ye(t.title),1)]),_:1})])]),e.$slots.description||t.description?(w(),Q(i,{key:0},{default:J(()=>[Ce(e.$slots,"description",{},()=>[Ue(ye(t.description),1)],!0)]),_:3})):re("",!0),e.$slots.default?(w(),N("div",wH,[Ce(e.$slots,"default",{},void 0,!0)])):re("",!0)])}}}),Wo=Be(_H,[["__scopeId","data-v-91596f42"]]),SH={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function kH(t,e){return w(),N("svg",SH,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L50.34 61.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z"},null,-1)])])}const uC=Te({name:"ph-x",render:kH}),CH=se({__name:"ButtonClose",emits:["click"],setup(t){return(e,n)=>{const o=Kn;return w(),Q(o,{"icon-left":p(uC),label:"Close","hide-label":"",square:"",variant:"link",size:"sm",class:"button-panel-action",onClick:n[0]||(n[0]=r=>e.$emit("click"))},null,8,["icon-left"])}}}),dC=Be(CH,[["__scopeId","data-v-d6bb5d7b"]]),AH={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function $H(t,e){return w(),N("svg",AH,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M240 56v48a8 8 0 0 1-8 8h-48a8 8 0 0 1 0-16h27.4l-26.59-24.36l-.25-.24a80 80 0 1 0-1.67 114.78a8 8 0 0 1 11 11.63A95.44 95.44 0 0 1 128 224h-1.32a96 96 0 1 1 69.07-164L224 85.8V56a8 8 0 1 1 16 0"},null,-1)])])}const TH=Te({name:"ph-arrow-clockwise",render:$H}),MH=se({__name:"ButtonRedo",props:{disabled:{type:Boolean,default:!1}},emits:["click"],setup(t){return(e,n)=>{const o=Kn;return w(),Q(o,{"icon-left":p(TH),label:"Redo","hide-label":"",square:"",variant:"outline-secondary",size:"sm",disabled:t.disabled,onClick:n[0]||(n[0]=r=>e.$emit("click"))},null,8,["icon-left","disabled"])}}}),OH={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function BH(t,e){return w(),N("svg",OH,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 128a96 96 0 0 1-94.71 96H128a95.38 95.38 0 0 1-65.9-26.2a8 8 0 0 1 11-11.63a80 80 0 1 0-1.67-114.78a3 3 0 0 1-.26.25L44.59 96H72a8 8 0 0 1 0 16H24a8 8 0 0 1-8-8V56a8 8 0 0 1 16 0v29.8L60.25 60A96 96 0 0 1 224 128"},null,-1)])])}const LH=Te({name:"ph-arrow-counter-clockwise",render:BH}),PH=se({__name:"ButtonUndo",props:{disabled:{type:Boolean,default:!1}},emits:["click"],setup(t){return(e,n)=>{const o=Kn;return w(),Q(o,{"icon-left":p(LH),label:"Undo","hide-label":"",square:"",variant:"outline-secondary",size:"sm",disabled:t.disabled,onClick:n[0]||(n[0]=r=>e.$emit("click"))},null,8,["icon-left","disabled"])}}}),DH={class:"feedback-empty-state"},EH={class:"feedback-empty-state__message"},IH=se({__name:"FeedbackEmptyState",props:{message:{}},setup(t){return(e,n)=>(w(),N("div",DH,[T("p",EH,[Ce(e.$slots,"default",{},()=>[Ue(ye(t.message),1)],!0)])]))}}),NH=Be(IH,[["__scopeId","data-v-dab82b40"]]),RH={key:0,class:"layout-bottom-drawer__header"},FH={class:"layout-bottom-drawer__header__title"},VH={class:"layout-bottom-drawer__body"},zH=80,HH=se({__name:"LayoutBottomDrawer",props:nt({title:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=De(0),o=De(!1),r=k(()=>({"layout-bottom-drawer--dragging":o.value}));let i=0,s=!1;function a(d){i=d.clientY,n.value=0,s=!1,document.addEventListener("pointermove",l),document.addEventListener("pointerup",c,{once:!0}),document.addEventListener("pointercancel",c,{once:!0})}function l(d){const f=d.clientY-i;!o.value&&Math.abs(f)>4&&(o.value=!0),o.value&&(s=!0,n.value=Math.max(0,f))}function c(){document.removeEventListener("pointermove",l),document.removeEventListener("pointercancel",c),o.value&&n.value>=zH?e.value=!1:s||(e.value=!1),n.value=0,o.value=!1}const u=k(()=>n.value>0?{transform:`translateY(${n.value}px)`}:{});return(d,f)=>(w(),N(Re,null,[H(kl,{name:"drawer"},{default:J(()=>[e.value?(w(),N("div",{key:0,class:$e(["layout-bottom-drawer",p(r)]),style:Pt(p(u))},[T("div",{class:"layout-bottom-drawer__handle",onPointerdown:a},[...f[1]||(f[1]=[T("div",{class:"layout-bottom-drawer__handle__bar"},null,-1)])],32),t.title?(w(),N("div",RH,[T("h2",FH,ye(t.title),1)])):re("",!0),T("div",VH,[Ce(d.$slots,"default",{},void 0,!0)])],6)):re("",!0)]),_:3}),e.value?(w(),N("div",{key:0,class:"layout-bottom-drawer__backdrop",onClick:f[0]||(f[0]=h=>e.value=!1)})):re("",!0)],64))}}),fC=Be(HH,[["__scopeId","data-v-6b9a0111"]]),WH={class:"layout-panel"},UH={class:"layout-panel__header"},GH={class:"layout-panel__header__title"},qH={key:0,class:"layout-panel__header__actions"},YH={key:0,class:"layout-panel__toolbar"},jH={class:"layout-panel__body"},XH={key:1,class:"layout-panel__footer"},KH=se({__name:"LayoutPanel",props:{title:{}},setup(t){return(e,n)=>(w(),N("div",WH,[T("div",UH,[T("h2",GH,ye(t.title),1),e.$slots.actions?(w(),N("div",qH,[Ce(e.$slots,"actions",{},void 0,!0)])):re("",!0)]),e.$slots.toolbar?(w(),N("div",YH,[Ce(e.$slots,"toolbar",{},void 0,!0)])):re("",!0),T("div",jH,[Ce(e.$slots,"default",{},void 0,!0)]),e.$slots.footer?(w(),N("div",XH,[Ce(e.$slots,"footer",{},void 0,!0)])):re("",!0)]))}}),ZH=Be(KH,[["__scopeId","data-v-5b00db3c"]]),QH=["aria-label"],JH=["disabled","aria-current","onClick"],eW={class:"navigation-segmented-control__option__label"},tW=se({__name:"NavigationSegmentedControl",props:{items:{},ariaLabel:{default:void 0},size:{default:"md"}},emits:["select"],setup(t,{emit:e}){const n=t,o=e,r=k(()=>`navigation-segmented-control--${n.size}`);function i(s){s.disabled||o("select",s.key)}return(s,a)=>(w(),N("nav",{class:$e(["navigation-segmented-control",p(r)]),"aria-label":t.ariaLabel},[Ce(s.$slots,"default",{},void 0,!0),(w(!0),N(Re,null,mt(t.items,l=>(w(),N("button",{key:l.key,class:$e(["navigation-segmented-control__option",{"navigation-segmented-control__option--active":l.active,"navigation-segmented-control__option--disabled":l.disabled}]),disabled:l.disabled,"aria-current":l.active?"true":void 0,type:"button",onClick:c=>i(l)},[l.icon?(w(),Q(Gt(l.icon),{key:0,class:"navigation-segmented-control__option__icon"})):re("",!0),T("span",eW,ye(l.text),1)],10,JH))),128))],10,QH))}}),hC=Be(tW,[["__scopeId","data-v-7aaaef48"]]),nW=["aria-selected","aria-disabled","tabindex","title","onClick","onKeydown"],oW={key:0,class:"navigation-stepper-tabs__step__icon","aria-hidden":"true"},rW={class:"navigation-stepper-tabs__step__label"},iW={key:0,class:"navigation-stepper-tabs__sep","aria-hidden":"true"},sW=se({__name:"NavigationStepperTabs",props:nt({steps:{},disabledSteps:{default:()=>[]},layout:{default:"inline"},separator:{type:Boolean,default:!0}},{currentStep:{required:!0},currentStepModifiers:{}}),emits:["update:currentStep"],setup(t){const e=t,n=ft(t,"currentStep");function o(l){return l<n.value?"done":l===n.value?"current":"pending"}function r(l){return e.disabledSteps.includes(l)}function i(l,c){return o(c)==="done"?gy:l.icon}function s(l){r(l)||(n.value=l)}function a(l,c){var b;const u=[];for(let m=0;m<e.steps.length;m++)r(m)||u.push(m);if(u.length===0)return;const d=u.indexOf(c);let f=null;switch(l.key){case"ArrowRight":f=u[(d+1)%u.length];break;case"ArrowLeft":f=u[(d-1+u.length)%u.length];break;case"Home":f=u[0];break;case"End":f=u[u.length-1];break;default:return}if(l.preventDefault(),f===null)return;const h=l.currentTarget.closest('[role="tablist"]');if(!h)return;(b=h.querySelectorAll('[role="tab"]')[f])==null||b.focus()}return(l,c)=>(w(),N("div",{class:$e(["navigation-stepper-tabs",`navigation-stepper-tabs--${t.layout}`]),role:"tablist","aria-label":"Progress"},[(w(!0),N(Re,null,mt(t.steps,(u,d)=>(w(),N(Re,{key:u.key??d},[T("button",{type:"button",role:"tab","aria-selected":d===n.value?"true":"false","aria-disabled":r(d)||void 0,tabindex:r(d)?-1:0,class:$e(["navigation-stepper-tabs__step",`navigation-stepper-tabs__step--${o(d)}`,{"navigation-stepper-tabs__step--disabled":r(d)}]),title:u.label,onClick:f=>s(d),onKeydown:f=>a(f,d)},[i(u,d)?(w(),N("span",oW,[(w(),Q(Gt(i(u,d))))])):re("",!0),T("span",rW,ye(u.label),1)],42,nW),t.layout==="inline"&&t.separator&&d<t.steps.length-1?(w(),N("span",iW,"›")):re("",!0)],64))),128))],2))}}),aW=Be(sW,[["__scopeId","data-v-3dbb5c62"]]),lW=se({__name:"NavigationToggle",props:nt({options:{default:()=>[]},size:{default:"md"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t,{entries:o}=pf(nN),r=k(()=>o.value.length>0?o.value:n.options),i=k(()=>r.value.map(a=>({key:a.value,text:a.text,icon:a.icon,active:a.value===e.value,disabled:a.disabled})));function s(a){e.value=a}return(a,l)=>(w(),Q(hC,{items:p(i),size:t.size,onSelect:s},{default:J(()=>[Ce(a.$slots,"default")]),_:3},8,["items","size"]))}}),cW={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function uW(t,e){return w(),N("svg",cW,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32M40 112a72 72 0 1 1 72 72a72.08 72.08 0 0 1-72-72"},null,-1)])])}const Ay=Te({name:"ph-magnifying-glass",render:uW}),dW=["aria-label"],fW={key:0,class:"navigation-command-bar__placeholder"},hW={key:1,class:"navigation-command-bar__kbd"},pW=se({__name:"NavigationCommandBar",props:{placeholder:{},shortcutLabel:{},collapsed:{type:Boolean,default:!1}},emits:["click"],setup(t){return(e,n)=>(w(),N("button",{type:"button",class:$e(["navigation-command-bar",{"navigation-command-bar--collapsed":t.collapsed}]),"aria-label":t.placeholder,onClick:n[0]||(n[0]=o=>e.$emit("click"))},[H(p(Ay),{class:"navigation-command-bar__icon","aria-hidden":"true"}),t.collapsed?re("",!0):(w(),N("span",fW,ye(t.placeholder),1)),t.shortcutLabel&&!t.collapsed?(w(),N("span",hW,ye(t.shortcutLabel),1)):re("",!0)],10,dW))}}),mW=Be(pW,[["__scopeId","data-v-469a4437"]]),gW={class:"navigation-icon-rail"},vW={key:0,class:"navigation-icon-rail__footer"},bW=se({__name:"NavigationIconRail",props:nt({items:{default:()=>[]}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=t,{entries:o}=pf(tN),r=k(()=>o.value.length>0?o.value:n.items);function i(s){return{"navigation-icon-rail__button--active":e.value===s}}return(s,a)=>{const l=Kn;return w(),N("nav",gW,[Ce(s.$slots,"default",{},void 0,!0),(w(!0),N(Re,null,mt(p(r),c=>(w(),Q(l,{key:c.value,"icon-left":c.icon,label:c.tooltip,"tooltip-placement":"left","hide-label":"",square:"",size:"lg",variant:"link",class:$e(["navigation-icon-rail__button",i(c.value)]),"aria-pressed":e.value===c.value,onClick:u=>e.value=c.value},null,8,["icon-left","label","class","aria-pressed","onClick"]))),128)),a[0]||(a[0]=T("div",{class:"navigation-icon-rail__spacer"},null,-1)),s.$slots.footer?(w(),N("div",vW,[Ce(s.$slots,"footer",{},void 0,!0)])):re("",!0)])}}}),yW=Be(bW,[["__scopeId","data-v-0286a414"]]),xW={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function wW(t,e){return w(),N("svg",xW,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 104a8 8 0 0 1-16 0V59.32l-66.33 66.34a8 8 0 0 1-11.32-11.32L196.68 48H152a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-40 24a8 8 0 0 0-8 8v72H48V80h72a8 8 0 0 0 0-16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-72a8 8 0 0 0-8-8"},null,-1)])])}const $p=Te({name:"ph-arrow-square-out",render:wW}),_W=["aria-label"],SW={key:0,class:"navigation-sidebar__header"},kW={class:"navigation-sidebar__body"},CW=se({__name:"NavigationSidebar",props:{ariaLabel:{default:"Sidebar"}},setup(t){return(e,n)=>(w(),N("nav",{class:"navigation-sidebar","aria-label":t.ariaLabel},[e.$slots.header?(w(),N("div",SW,[Ce(e.$slots,"header",{},void 0,!0)])):re("",!0),T("div",kW,[Ce(e.$slots,"default",{},void 0,!0)])],8,_W))}}),AW=Be(CW,[["__scopeId","data-v-007c1edf"]]),$W={class:"navigation-sidebar-group"},TW={key:0,class:"navigation-sidebar-group__eyebrow"},MW={class:"navigation-sidebar-group__items"},OW=se({__name:"NavigationSidebarGroup",props:{eyebrow:{}},setup(t){return(e,n)=>(w(),N("div",$W,[t.eyebrow?(w(),N("div",TW,ye(t.eyebrow),1)):re("",!0),T("div",MW,[Ce(e.$slots,"default",{},void 0,!0)])]))}}),Wg=Be(OW,[["__scopeId","data-v-794922fc"]]),BW=["href"],LW={class:"navigation-sidebar-item__icon"},PW={class:"navigation-sidebar-item__label"},DW={class:"navigation-sidebar-item__external","aria-hidden":"true"},EW=["href","aria-current","onClick"],IW={class:"navigation-sidebar-item__icon"},NW={class:"navigation-sidebar-item__label"},RW={key:0,class:"navigation-sidebar-item__count"},FW=se({__name:"NavigationSidebarItem",props:{to:{default:void 0},href:{default:void 0},label:{},active:{type:Boolean,default:!1},count:{default:void 0}},setup(t){const e=t,n=k(()=>e.href!==void 0);if(e.to===void 0&&e.href===void 0)throw new Error("NavigationSidebarItem requires either `to` or `href`.");if(e.to!==void 0&&e.href!==void 0)throw new Error("NavigationSidebarItem accepts `to` or `href`, not both.");function o(r){return{"navigation-sidebar-item":!0,"navigation-sidebar-item--active":e.active||r}}return(r,i)=>{const s=z0("router-link");return p(n)?(w(),N("a",{key:0,href:t.href,class:$e(o(!1)),target:"_blank",rel:"noopener noreferrer"},[T("span",LW,[Ce(r.$slots,"icon",{},void 0,!0)]),T("span",PW,ye(t.label),1),T("span",DW,[H(p($p))])],10,BW)):(w(),Q(s,{key:1,to:t.to,custom:""},{default:J(({navigate:a,href:l,isActive:c})=>[T("a",{href:l,class:$e(o(c)),"aria-current":c||t.active?"page":void 0,onClick:a},[T("span",IW,[Ce(r.$slots,"icon",{},void 0,!0)]),T("span",NW,ye(t.label),1),t.count!==void 0?(w(),N("span",RW,ye(t.count),1)):re("",!0)],10,EW)]),_:3},8,["to"]))}}}),Ru=Be(FW,[["__scopeId","data-v-d6b18bde"]]),VW=["href","aria-label","onClick"],zW=["src","alt"],HW={key:1,class:"navigation-workspace-switcher__badge","aria-hidden":"true"},WW={key:2,class:"navigation-workspace-switcher__name"},UW=["aria-label"],GW=["src","alt"],qW={key:1,class:"navigation-workspace-switcher__badge","aria-hidden":"true"},YW={key:2,class:"navigation-workspace-switcher__name"},jW=se({__name:"NavigationWorkspaceSwitcher",props:{name:{},logoSrc:{default:void 0},hideName:{type:Boolean,default:!1},to:{default:void 0}},emits:["click"],setup(t){const e=t,n=k(()=>e.name.trim().charAt(0).toUpperCase());return(o,r)=>{const i=z0("router-link");return t.to?(w(),Q(i,{key:0,to:t.to,custom:""},{default:J(({navigate:s,href:a})=>[T("a",{href:a,class:"navigation-workspace-switcher","aria-label":t.name,onClick:s},[t.logoSrc?(w(),N("img",{key:0,src:t.logoSrc,alt:t.name,class:"navigation-workspace-switcher__logo"},null,8,zW)):(w(),N("span",HW,ye(n.value),1)),t.hideName?re("",!0):(w(),N("span",WW,ye(t.name),1))],8,VW)]),_:1},8,["to"])):(w(),N("button",{key:1,type:"button",class:"navigation-workspace-switcher","aria-label":t.name,onClick:r[0]||(r[0]=s=>o.$emit("click"))},[t.logoSrc?(w(),N("img",{key:0,src:t.logoSrc,alt:t.name,class:"navigation-workspace-switcher__logo"},null,8,GW)):(w(),N("span",qW,ye(n.value),1)),t.hideName?re("",!0):(w(),N("span",YW,ye(t.name),1))],8,UW))}}}),pC=Be(jW,[["__scopeId","data-v-c9a99b92"]]),XW={class:"list-item-row__label"},KW=se({__name:"ListItemRow",props:{label:{},active:{type:Boolean}},emits:["click"],setup(t){const e=t,n=k(()=>({"list-item-row--active":e.active}));return(o,r)=>(w(),N("div",{class:$e(["list-item-row",p(n)]),onClick:r[0]||(r[0]=i=>o.$emit("click",i))},[Ce(o.$slots,"leading",{},void 0,!0),T("span",XW,ye(t.label),1),Ce(o.$slots,"actions",{},void 0,!0)],2))}}),mC=Be(KW,[["__scopeId","data-v-51fbb4a2"]]),ZW={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function QW(t,e){return w(),N("svg",ZW,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0m48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0"},null,-1)])])}const gC=Te({name:"ph-trash",render:QW}),JW={class:"list-item-actions"},eU=se({__name:"ListItemActions",props:{actions:{default:()=>["duplicate","remove"]}},emits:["duplicate","remove"],setup(t){return(e,n)=>{const o=Uo,r=mf;return w(),N("div",JW,[t.actions.includes("duplicate")?(w(),Q(o,{key:0,variant:"link",size:"sm",class:"list-item-actions__btn text-body-secondary",title:"Duplicate",onClick:n[0]||(n[0]=gn(i=>e.$emit("duplicate"),["stop"]))},{default:J(()=>[...n[2]||(n[2]=[T("span",{"aria-hidden":"true"},"⧉",-1)])]),_:1})):re("",!0),t.actions.includes("remove")?(w(),Q(o,{key:1,variant:"link",size:"sm",class:"list-item-actions__btn text-danger",title:"Remove",onClick:n[1]||(n[1]=gn(i=>e.$emit("remove"),["stop"]))},{default:J(()=>[H(r,{name:p(gC)},null,8,["name"])]),_:1})):re("",!0)])}}}),tU=Be(eU,[["__scopeId","data-v-29b731f9"]]),nU={class:"border rounded overflow-hidden bg-body-tertiary p-2"},oU={class:"d-flex gap-1 mb-2"},$y=se({__name:"ListSelectPanel",props:nt({items:{},maxHeight:{default:"220px"},onItemClick:{type:Function,default:void 0}},{selected:{required:!0},selectedModifiers:{}}),emits:["update:selected"],setup(t){const e=ft(t,"selected"),n=t;function o(l,c,u){n.onItemClick?n.onItemClick(l,c,u):r(l)}function r(l){e.value.indexOf(l)>=0?e.value=e.value.filter(u=>u!==l):e.value=[...e.value,l]}function i(){e.value=[...n.items]}function s(){e.value=[]}function a(){e.value=n.items.filter(l=>!e.value.includes(l))}return(l,c)=>{const u=mC;return w(),N("div",nU,[T("div",oU,[H(p(Uo),{variant:"outline-secondary",size:"sm",onClick:i},{default:J(()=>[...c[0]||(c[0]=[Ue(" All ",-1)])]),_:1}),H(p(Uo),{variant:"outline-secondary",size:"sm",onClick:s},{default:J(()=>[...c[1]||(c[1]=[Ue(" None ",-1)])]),_:1}),H(p(Uo),{variant:"outline-secondary",size:"sm",onClick:a},{default:J(()=>[...c[2]||(c[2]=[Ue(" Invert ",-1)])]),_:1})]),T("div",{style:Pt({maxHeight:t.maxHeight,overflowY:"auto"})},[(w(!0),N(Re,null,mt(t.items,(d,f)=>(w(),Q(u,{key:d,label:d,active:e.value.includes(d),onClick:h=>o(d,f,h)},hi({_:2},[l.$slots["item-leading"]?{name:"leading",fn:J(()=>[Ce(l.$slots,"item-leading",{item:d,index:f})]),key:"0"}:void 0,l.$slots["item-actions"]?{name:"actions",fn:J(()=>[Ce(l.$slots,"item-actions",{item:d,index:f})]),key:"1"}:void 0]),1032,["label","active","onClick"]))),128))],4)])}}}),rU=["data-bs-theme"],iU=["src"],sU={class:"gallery-card__meta"},aU={key:0,class:"gallery-card__meta__subtitle"},lU={key:1,class:"gallery-card__meta__footer"},cU=se({__name:"GalleryCard",props:{title:{},subtitle:{},thumbSrc:{},selected:{type:Boolean},layout:{},forceLightThumb:{type:Boolean},serifTitle:{type:Boolean}},emits:["click"],setup(t){const e=t,n=k(()=>({"gallery-card--selected":e.selected,"gallery-card--row":e.layout==="row"}));return(o,r)=>(w(),N("div",{class:$e(["gallery-card",p(n)]),role:"button",tabindex:"0",onClick:r[1]||(r[1]=i=>o.$emit("click")),onKeydown:[r[2]||(r[2]=nr(i=>o.$emit("click"),["enter"])),r[3]||(r[3]=nr(gn(i=>o.$emit("click"),["prevent"]),["space"]))]},[T("div",{class:"gallery-card__thumb","data-bs-theme":t.forceLightThumb?"light":void 0},[t.thumbSrc?(w(),N("img",{key:0,src:t.thumbSrc,alt:"",class:"gallery-card__thumb__img"},null,8,iU)):re("",!0),o.$slots.actions?(w(),N("div",{key:1,class:"gallery-card__thumb__actions",onClick:r[0]||(r[0]=gn(()=>{},["stop"]))},[Ce(o.$slots,"actions",{},void 0,!0)])):re("",!0)],8,rU),T("div",sU,[T("div",{class:$e(["gallery-card__meta__title",{"bc-display":t.serifTitle}])},ye(t.title),3),t.subtitle?(w(),N("div",aU,ye(t.subtitle),1)):re("",!0),o.$slots.footer?(w(),N("div",lU,[Ce(o.$slots,"footer",{},void 0,!0)])):re("",!0)])],34))}}),uU=Be(cU,[["__scopeId","data-v-48e157d8"]]),dU=se({__name:"GalleryGrid",props:{layout:{default:"grid"}},setup(t){const e=t,n=k(()=>({"gallery-grid--row":e.layout==="row"}));return(o,r)=>(w(),N("div",{class:$e(["gallery-grid",p(n)])},[Ce(o.$slots,"default",{},void 0,!0)],2))}}),fU=Be(dU,[["__scopeId","data-v-7c69b740"]]),hU={class:"scene-timeline-item__label"},pU=["innerHTML"],mU={key:1,class:"scene-timeline-item__name"},gU=se({__name:"SceneTimelineItem",props:{name:{},index:{},active:{type:Boolean,default:!1},thumbnail:{default:null},removable:{type:Boolean,default:!0}},emits:["select","remove"],setup(t){return(e,n)=>(w(),N("button",{class:$e(["scene-timeline-item",{"scene-timeline-item--active":t.active}]),type:"button",onClick:n[1]||(n[1]=o=>e.$emit("select"))},[t.removable?(w(),N("span",{key:0,class:"scene-timeline-item__remove",role:"button","aria-label":"Remove scene",onClick:n[0]||(n[0]=gn(o=>e.$emit("remove"),["stop"]))}," × ")):re("",!0),T("span",hU,"Scene "+ye(t.index+1),1),T("span",{class:"scene-timeline-item__preview",innerHTML:t.thumbnail},null,8,pU),t.name?(w(),N("span",mU,ye(t.name),1)):re("",!0)],2))}}),vU=Be(gU,[["__scopeId","data-v-e9323b3b"]]),bU={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function yU(t,e){return w(),N("svg",bU,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M240 128a15.74 15.74 0 0 1-7.6 13.51L88.32 229.65a16 16 0 0 1-16.2.3A15.86 15.86 0 0 1 64 216.13V39.87a15.86 15.86 0 0 1 8.12-13.82a16 16 0 0 1 16.2.3l144.08 88.14A15.74 15.74 0 0 1 240 128"},null,-1)])])}const xU=Te({name:"ph-play-fill",render:yU}),wU={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function _U(t,e){return w(),N("svg",wU,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M216 48v160a16 16 0 0 1-16 16h-40a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h40a16 16 0 0 1 16 16M96 32H56a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16"},null,-1)])])}const SU=Te({name:"ph-pause-fill",render:_U}),kU={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function CU(t,e){return w(),N("svg",kU,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M165.66 202.34a8 8 0 0 1-11.32 11.32l-80-80a8 8 0 0 1 0-11.32l80-80a8 8 0 0 1 11.32 11.32L91.31 128Z"},null,-1)])])}const vC=Te({name:"ph-caret-left",render:CU}),AU={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function $U(t,e){return w(),N("svg",AU,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m181.66 133.66l-80 80a8 8 0 0 1-11.32-11.32L164.69 128L90.34 53.66a8 8 0 0 1 11.32-11.32l80 80a8 8 0 0 1 0 11.32"},null,-1)])])}const bC=Te({name:"ph-caret-right",render:$U}),TU={class:"scene-timeline-controls"},MU=["disabled"],OU=["aria-label","disabled"],BU=["disabled"],LU={key:0,class:"scene-timeline-controls__counter"},PU=se({__name:"SceneTimelineControls",props:nt({total:{},playing:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1}},{activeIndex:{default:-1},activeIndexModifiers:{}}),emits:nt(["play","pause"],["update:activeIndex"]),setup(t){const e=ft(t,"activeIndex"),n=t,o=k(()=>n.total===0),r=k(()=>e.value<0?1:e.value+1),i=k(()=>n.total===0?0:e.value<=0?n.total-1:e.value-1),s=k(()=>n.total===0||e.value>=n.total-1?0:e.value+1);return(a,l)=>{const c=mf;return w(),N("div",TU,[T("button",{class:"scene-timeline-controls__nav-btn",type:"button","aria-label":"Previous scene",disabled:p(o),onClick:l[0]||(l[0]=u=>e.value=p(i))},[H(c,{name:p(vC),size:"1em"},null,8,["name"])],8,MU),T("button",{class:"scene-timeline-controls__play-btn",type:"button","aria-label":t.playing?"Pause":"Play",disabled:p(o),onClick:l[1]||(l[1]=u=>t.playing?a.$emit("pause"):a.$emit("play"))},[H(c,{name:t.playing?p(SU):p(xU),size:"1em"},null,8,["name"])],8,OU),T("button",{class:"scene-timeline-controls__nav-btn",type:"button","aria-label":"Next scene",disabled:p(o),onClick:l[2]||(l[2]=u=>e.value=p(s))},[H(c,{name:p(bC),size:"1em"},null,8,["name"])],8,BU),!p(o)&&!t.hideCounter?(w(),N("span",LU,ye(p(r))+" / "+ye(t.total),1)):re("",!0)])}}}),Ty=Be(PU,[["__scopeId","data-v-469c0735"]]),DU={class:"scene-timeline"},EU={class:"scene-timeline__items"},IU={class:"scene-timeline__items__add"},NU=se({__name:"SceneTimeline",props:nt({scenes:{},playing:{type:Boolean,default:!1}},{activeIndex:{default:-1},activeIndexModifiers:{}}),emits:nt(["add","remove","play","pause"],["update:activeIndex"]),setup(t){const e=ft(t,"activeIndex");return(n,o)=>{const r=Ty,i=vU,s=yl;return w(),N("div",DU,[H(r,{"active-index":e.value,"onUpdate:activeIndex":o[0]||(o[0]=a=>e.value=a),total:t.scenes.length,playing:t.playing,onPlay:o[1]||(o[1]=a=>n.$emit("play")),onPause:o[2]||(o[2]=a=>n.$emit("pause"))},null,8,["active-index","total","playing"]),T("div",EU,[(w(!0),N(Re,null,mt(t.scenes,a=>(w(),Q(i,{key:a.index,name:a.name,index:a.index,active:a.index===e.value,thumbnail:a.thumbnail??null,removable:a.removable??!0,onSelect:l=>e.value=a.index,onRemove:l=>n.$emit("remove",a.index)},null,8,["name","index","active","thumbnail","removable","onSelect","onRemove"]))),128)),T("div",IU,[H(s,{onClick:o[3]||(o[3]=a=>n.$emit("add"))})])])])}}}),RU=Be(NU,[["__scopeId","data-v-3b2fb4f2"]]),FU={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function VU(t,e){return w(),N("svg",FU,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M213.66 165.66a8 8 0 0 1-11.32 0L128 91.31l-74.34 74.35a8 8 0 0 1-11.32-11.32l80-80a8 8 0 0 1 11.32 0l80 80a8 8 0 0 1 0 11.32"},null,-1)])])}const zU=Te({name:"ph-caret-up",render:VU}),HU={class:"scene-timeline-compact"},WU=["title"],UU={class:"scene-timeline-compact__counter"},GU=se({__name:"SceneTimelineCompact",props:nt({scenes:{},playing:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1}},{activeIndex:{default:-1},activeIndexModifiers:{}}),emits:nt(["play","pause","expand"],["update:activeIndex"]),setup(t){const e=ft(t,"activeIndex"),n=t,o=k(()=>e.value<0?null:n.scenes.find(a=>a.index===e.value)??null),r=k(()=>{var a;return((a=o.value)==null?void 0:a.name)||" "}),i=k(()=>n.scenes.length),s=k(()=>e.value<0||i.value===0?1:Math.max(1,Math.min(i.value,e.value+1)));return(a,l)=>(w(),N("div",HU,[H(Ty,{"active-index":e.value,"onUpdate:activeIndex":l[0]||(l[0]=c=>e.value=c),total:p(i),playing:t.playing,"hide-counter":"",onPlay:l[1]||(l[1]=c=>a.$emit("play")),onPause:l[2]||(l[2]=c=>a.$emit("pause"))},null,8,["active-index","total","playing"]),T("div",{class:"scene-timeline-compact__name",title:p(r)},ye(p(r)),9,WU),T("div",UU,ye(p(s))+" of "+ye(p(i)),1),H(Kn,{class:"scene-timeline-compact__expand","icon-left":p(zU),label:"Show scenes","hide-label":"",square:"",variant:"link",size:"sm","aria-expanded":t.expanded,onClick:l[3]||(l[3]=c=>a.$emit("expand"))},null,8,["icon-left","aria-expanded"])]))}}),qU=Be(GU,[["__scopeId","data-v-6874749a"]]),YU=["aria-current"],jU=["innerHTML"],XU={key:1,class:"scene-list-item__thumb scene-list-item__thumb--empty","aria-hidden":"true"},KU={class:"scene-list-item__body"},ZU={class:"scene-list-item__label"},QU={key:0,class:"scene-list-item__name"},JU={key:1,class:"scene-list-item__hint"},eG=se({__name:"SceneListItem",props:{index:{},name:{},thumbnail:{},hint:{},active:{type:Boolean,default:!1},removable:{type:Boolean,default:!0}},emits:["select","remove"],setup(t){return(e,n)=>(w(),N("li",{class:$e(["scene-list-item-row",{"scene-list-item-row--active":t.active}])},[T("button",{type:"button",class:$e(["scene-list-item",{"scene-list-item--active":t.active}]),"aria-current":t.active?"true":void 0,onClick:n[0]||(n[0]=o=>e.$emit("select"))},[t.thumbnail?(w(),N("span",{key:0,class:"scene-list-item__thumb",innerHTML:t.thumbnail},null,8,jU)):(w(),N("span",XU)),T("span",KU,[T("span",ZU,"SCENE "+ye(t.index),1),t.name?(w(),N("span",QU,ye(t.name),1)):re("",!0),t.hint?(w(),N("span",JU,ye(t.hint),1)):re("",!0)])],10,YU),t.removable?(w(),N("button",{key:0,type:"button",class:"scene-list-item__remove","aria-label":"Remove scene",onClick:n[1]||(n[1]=gn(o=>e.$emit("remove"),["stop"]))},[H(p(uC))])):re("",!0)],2))}}),tG=Be(eG,[["__scopeId","data-v-4d17a115"]]),nG={class:"scene-list"},oG={class:"scene-list__items",role:"list"},rG=se({__name:"SceneList",props:nt({scenes:{},playing:{type:Boolean,default:!1}},{activeIndex:{default:-1},activeIndexModifiers:{}}),emits:nt(["add","remove","play","pause"],["update:activeIndex"]),setup(t,{emit:e}){const n=ft(t,"activeIndex"),o=e;function r(s){n.value=s}function i(s){o("remove",s)}return(s,a)=>(w(),N("div",nG,[H(Ty,{"active-index":n.value,"onUpdate:activeIndex":a[0]||(a[0]=l=>n.value=l),total:t.scenes.length,playing:t.playing,onPlay:a[1]||(a[1]=l=>s.$emit("play")),onPause:a[2]||(a[2]=l=>s.$emit("pause"))},null,8,["active-index","total","playing"]),T("ul",oG,[(w(!0),N(Re,null,mt(t.scenes,l=>(w(),Q(tG,{key:l.index,index:l.index,name:l.name,thumbnail:l.thumbnail??null,hint:l.hint??null,active:l.index===n.value,removable:l.removable??!0,onSelect:c=>r(l.index),onRemove:c=>i(l.index)},null,8,["index","name","thumbnail","hint","active","removable","onSelect","onRemove"]))),128))]),T("button",{type:"button",class:"scene-list__add",onClick:a[3]||(a[3]=l=>s.$emit("add"))}," + Add scene ")]))}}),iG=Be(rG,[["__scopeId","data-v-a9466f90"]]),sG={class:"bc-scene-player bc-scene-player--progress-bar","data-scene-player":""},aG=["aria-label"],lG={key:0,width:"10",height:"10",viewBox:"0 0 12 12",fill:"currentColor"},cG={key:1,width:"10",height:"10",viewBox:"0 0 12 12",fill:"currentColor"},uG={class:"bc-scene-player__segments"},dG=["aria-label","aria-current","onClick"],fG={class:"bc-scene-player__counter"},hG=se({__name:"ScenePlayerProgressBar",props:nt({total:{},playing:{type:Boolean,default:!1},position:{default:"center"}},{current:{required:!0},currentModifiers:{}}),emits:nt(["play","pause"],["update:current"]),setup(t){const e=ft(t,"current");return(n,o)=>(w(),N("div",sG,[T("button",{type:"button",class:"bc-scene-player__play-btn","aria-label":t.playing?"Pause":"Play",onClick:o[0]||(o[0]=r=>t.playing?n.$emit("pause"):n.$emit("play"))},[t.playing?(w(),N("svg",lG,[...o[1]||(o[1]=[T("rect",{x:"1.5",y:"1",width:"3",height:"10",rx:"0.8"},null,-1),T("rect",{x:"7.5",y:"1",width:"3",height:"10",rx:"0.8"},null,-1)])])):(w(),N("svg",cG,[...o[2]||(o[2]=[T("path",{d:"M2.5 1v10l8-5z"},null,-1)])]))],8,aG),T("div",uG,[(w(!0),N(Re,null,mt(t.total,r=>(w(),N("button",{key:r,type:"button",class:$e(["bc-scene-player__segments__segment",{"bc-scene-player__segments__segment--active":r===e.value,"bc-scene-player__segments__segment--completed":r<e.value}]),"aria-label":`Scene ${r} of ${t.total}`,"aria-current":r===e.value?"step":void 0,onClick:i=>e.value=r},null,10,dG))),128))]),T("span",fG,ye(e.value)+"/"+ye(t.total),1)]))}}),yC=Be(hG,[["__scopeId","data-v-be507f24"]]),pG=["disabled"],mG=["aria-label"],gG={key:0,width:"11",height:"11",viewBox:"0 0 12 12",fill:"currentColor"},vG={key:1,width:"11",height:"11",viewBox:"0 0 12 12",fill:"currentColor"},bG={class:"bc-scene-player__dots"},yG=["aria-label","aria-current","onClick"],xG=["disabled"],wG=se({__name:"ScenePlayerDotStepper",props:nt({total:{},playing:{type:Boolean,default:!1},position:{default:"center"}},{current:{required:!0},currentModifiers:{}}),emits:nt(["play","pause","previous","next"],["update:current"]),setup(t){const e=ft(t,"current");return(n,o)=>(w(),N("div",{class:$e(["bc-scene-player bc-scene-player--dot-stepper",`bc-scene-player--${t.position}`]),"data-scene-player":""},[T("button",{type:"button",class:"bc-scene-player__nav-btn",disabled:e.value<=1,"aria-label":"Previous scene",onClick:o[0]||(o[0]=r=>n.$emit("previous"))},[...o[3]||(o[3]=[T("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[T("path",{d:"M6.5 2L3.5 5l3 3"})],-1)])],8,pG),T("button",{type:"button",class:"bc-scene-player__play-btn","aria-label":t.playing?"Pause":"Play",onClick:o[1]||(o[1]=r=>t.playing?n.$emit("pause"):n.$emit("play"))},[t.playing?(w(),N("svg",gG,[...o[4]||(o[4]=[T("rect",{x:"1.5",y:"1",width:"3",height:"10",rx:"0.8"},null,-1),T("rect",{x:"7.5",y:"1",width:"3",height:"10",rx:"0.8"},null,-1)])])):(w(),N("svg",vG,[...o[5]||(o[5]=[T("path",{d:"M2.5 1v10l8-5z"},null,-1)])]))],8,mG),T("div",bG,[(w(!0),N(Re,null,mt(t.total,r=>(w(),N("button",{key:r,type:"button",class:$e(["bc-scene-player__dots__dot",{"bc-scene-player__dots__dot--active":r===e.value,"bc-scene-player__dots__dot--completed":r<e.value}]),"aria-label":`Scene ${r} of ${t.total}`,"aria-current":r===e.value?"step":void 0,onClick:i=>e.value=r},null,10,yG))),128))]),T("button",{type:"button",class:"bc-scene-player__nav-btn",disabled:e.value>=t.total,"aria-label":"Next scene",onClick:o[2]||(o[2]=r=>n.$emit("next"))},[...o[6]||(o[6]=[T("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[T("path",{d:"M3.5 2L6.5 5l-3 3"})],-1)])],8,xG)],2))}}),xC=Be(wG,[["__scopeId","data-v-3499fe9e"]]),_G={key:0,class:"bc-scene-player__counter"},SG=["disabled"],kG=["aria-label"],CG={key:0,width:"9",height:"9",viewBox:"0 0 12 12",fill:"currentColor"},AG={key:1,width:"9",height:"9",viewBox:"0 0 12 12",fill:"currentColor"},$G=["disabled"],TG={key:1,class:"bc-scene-player__counter bc-scene-player__counter--end"},MG=se({__name:"ScenePlayerMinimalArrows",props:nt({total:{},playing:{type:Boolean,default:!1},position:{default:"center"},wrap:{type:Boolean,default:!1},showCounter:{type:Boolean,default:!0},order:{default:"counter-first"}},{current:{required:!0},currentModifiers:{}}),emits:nt(["play","pause","previous","next"],["update:current"]),setup(t){const e=ft(t,"current");return(n,o)=>(w(),N("div",{class:$e(["bc-scene-player bc-scene-player--minimal-arrows",`bc-scene-player--${t.position}`]),"data-scene-player":""},[t.showCounter&&t.order==="counter-first"?(w(),N("span",_G,ye(e.value)+"/"+ye(t.total),1)):re("",!0),T("button",{type:"button",class:"bc-scene-player__nav-btn",disabled:!t.wrap&&e.value<=1,"aria-label":"Previous scene",onClick:o[0]||(o[0]=r=>n.$emit("previous"))},[...o[3]||(o[3]=[T("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[T("path",{d:"M6.5 2L3.5 5l3 3"})],-1)])],8,SG),T("button",{type:"button",class:"bc-scene-player__play-btn","aria-label":t.playing?"Pause":"Play",onClick:o[1]||(o[1]=r=>t.playing?n.$emit("pause"):n.$emit("play"))},[t.playing?(w(),N("svg",CG,[...o[4]||(o[4]=[T("rect",{x:"1.5",y:"1",width:"3",height:"10",rx:"0.8"},null,-1),T("rect",{x:"7.5",y:"1",width:"3",height:"10",rx:"0.8"},null,-1)])])):(w(),N("svg",AG,[...o[5]||(o[5]=[T("path",{d:"M2.5 1v10l8-5z"},null,-1)])]))],8,kG),T("button",{type:"button",class:"bc-scene-player__nav-btn",disabled:!t.wrap&&e.value>=t.total,"aria-label":"Next scene",onClick:o[2]||(o[2]=r=>n.$emit("next"))},[...o[6]||(o[6]=[T("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[T("path",{d:"M3.5 2L6.5 5l-3 3"})],-1)])],8,$G),t.showCounter&&t.order==="controls-first"?(w(),N("span",TG,ye(e.value)+"/"+ye(t.total),1)):re("",!0)],2))}}),wC=Be(MG,[["__scopeId","data-v-74dd9698"]]),OG={class:"bc-scene-player__btn-group"},BG=["disabled"],LG=["disabled"],PG={class:"bc-scene-player__counter"},DG=se({__name:"ScenePlayerButtons",props:nt({total:{},playing:{type:Boolean,default:!1},position:{default:"left"}},{current:{required:!0},currentModifiers:{}}),emits:nt(["play","pause","previous","next"],["update:current"]),setup(t){const e=ft(t,"current");return(n,o)=>(w(),N("div",{class:$e(["bc-scene-player bc-scene-player--buttons",`bc-scene-player--${t.position}`]),"data-scene-player":""},[T("div",OG,[T("button",{type:"button",class:$e(["bc-scene-player__btn-group__btn",{"bc-scene-player__btn-group__btn--disabled":e.value<=1}]),disabled:e.value<=1,"aria-label":"Previous scene",onClick:o[0]||(o[0]=gn(r=>n.$emit("previous"),["stop"]))},[...o[2]||(o[2]=[T("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},[T("path",{d:"M5.5 1.5L1.5 6l4 4.5"})],-1),Ue(" Back ",-1)])],10,BG),T("button",{type:"button",class:$e(["bc-scene-player__btn-group__btn bc-scene-player__btn-group__btn--next",{"bc-scene-player__btn-group__btn--disabled":e.value>=t.total}]),disabled:e.value>=t.total,"aria-label":"Next scene",onClick:o[1]||(o[1]=gn(r=>n.$emit("next"),["stop"]))},[...o[3]||(o[3]=[Ue(" Next ",-1),T("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},[T("path",{d:"M2.5 1.5L6.5 6l-4 4.5"})],-1)])],10,LG)]),T("span",PG,ye(e.value)+" / "+ye(t.total),1)],2))}}),m1=Be(DG,[["__scopeId","data-v-9b2f8f87"]]),EG=Po("theme",()=>{const t=De("light"),e=my("(prefers-color-scheme: dark)"),n=k(()=>t.value==="dark"||t.value==="auto"&&e.value?"dark":"light");Ve(n,r=>{document.documentElement.setAttribute("data-bs-theme",r)},{immediate:!0});function o(){const r=["light","dark","auto"],i=r.indexOf(t.value);t.value=r[(i+1)%r.length]}return{theme:t,resolvedTheme:n,cycleTheme:o}},{persist:{key:"bc-theme",pick:["theme"]}});function vf(){const t=EG(),{theme:e,resolvedTheme:n}=At(t);return{theme:e,resolvedTheme:n,cycleTheme:t.cycleTheme}}function IG(){return typeof navigator>"u"?!1:/Mac|iPhone|iPod|iPad/i.test(navigator.platform)}function _C(t){const e=t.toUpperCase(),n=IG(),o=n?`⌘ ${e}`:`Ctrl ${e}`,r=n?`Meta+${e}`:`Control+${e}`;function i(s){return s.key.toLowerCase()!==t.toLowerCase()?!1:n?s.metaKey&&!s.ctrlKey:s.ctrlKey&&!s.metaKey}return{keyLabel:o,keys:r,matches:i}}const NG={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function RG(t,e){return w(),N("svg",NG,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0m72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64m-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48M58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32M192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72m5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8m80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8m112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16"},null,-1)])])}const FG=Te({name:"ph-sun",render:RG}),VG={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function zG(t,e){return w(),N("svg",VG,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.1 103.1 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98m-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4"},null,-1)])])}const HG=Te({name:"ph-moon",render:zG}),WG={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function UG(t,e){return w(),N("svg",WG,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m8 16.37a86.4 86.4 0 0 1 16 3v169.3a86.4 86.4 0 0 1-16 3Zm32 9.26a87.8 87.8 0 0 1 16 10.54v135.66a87.8 87.8 0 0 1-16 10.54ZM40 128a88.11 88.11 0 0 1 80-87.63v175.26A88.11 88.11 0 0 1 40 128m160 50.54V77.46a87.82 87.82 0 0 1 0 101.08"},null,-1)])])}const GG=Te({name:"ph-circle-half",render:UG}),qG={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function YG(t,e){return w(),N("svg",qG,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 128a8 8 0 0 1-8 8H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8M40 72h176a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16m176 112H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16"},null,-1)])])}const SC=Te({name:"ph-list",render:YG}),kC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048.042969%2090.607422'%20width='48.042969'%20height='90.607422'%3e%3ctitle%3eBlueprint%20Chart%3c/title%3e%3cpath%20fill='%234B90CF'%20d='M%2020.042969%2034.607422%20A%2028%2028%200%200%201%2023.072266%2034.779297%20A%2028%2028%200%200%200%2020.042969%2034.607422%20z%20M%2023.34375%2034.810547%20A%2028%2028%200%200%201%2026.171875%2035.292969%20A%2028%2028%200%200%200%2023.34375%2034.810547%20z%20M%2016.570312%2034.84375%20A%2028%2028%200%200%200%2015.474609%2035.033203%20A%2028%2028%200%200%201%2016.570312%2034.84375%20z%20M%2026.390625%2035.341797%20A%2028%2028%200%200%201%2029.316406%2036.189453%20A%2028%2028%200%200%200%2026.390625%2035.341797%20z%20M%2013.128906%2035.511719%20A%2028%2028%200%200%200%2011.904297%2035.873047%20A%2028%2028%200%200%201%2013.128906%2035.511719%20z%20M%2029.373047%2036.210938%20A%2028%2028%200%200%201%2032.103516%2037.347656%20A%2028%2028%200%200%200%2029.373047%2036.210938%20z%20M%209.7832031%2036.609375%20A%2028%2028%200%200%200%208.5820312%2037.117188%20A%2028%2028%200%200%201%209.7832031%2036.609375%20z%20M%2032.392578%2037.486328%20A%2028%2028%200%200%201%2034.939453%2038.90625%20A%2028%2028%200%200%200%2032.392578%2037.486328%20z%20M%206.5742188%2038.128906%20A%2028%2028%200%200%200%205.4511719%2038.765625%20A%2028%2028%200%200%201%206.5742188%2038.128906%20z%20M%2035.041016%2038.966797%20A%2028%2028%200%200%201%2037.523438%2040.738281%20A%2028%2028%200%200%200%2035.041016%2038.966797%20z%20M%203.5273438%2040.080078%20A%2028%2028%200%200%200%202.5761719%2040.771484%20A%2028%2028%200%200%201%203.5273438%2040.080078%20z%20M%2037.658203%2040.851562%20A%2028%2028%200%200%201%2039.804688%2042.783203%20A%2028%2028%200%200%200%2037.658203%2040.851562%20z%20M%2040.011719%2042.990234%20A%2028%2028%200%200%201%2042.013672%2045.251953%20A%2028%2028%200%200%200%2040.011719%2042.990234%20z%20M%2042.013672%2045.251953%20A%2028%2028%200%200%201%2020.042969%2056%20A%2028%2028%200%200%201%2014.232422%2055.3125%20A%2016%2016%200%200%201%2016%2062.607422%20A%2016%2016%200%200%201%200%2078.607422%20L%200%2082.121094%20A%2028%2028%200%200%200%2020.042969%2090.607422%20A%2028%2028%200%200%200%2048.042969%2062.607422%20A%2028%2028%200%200%200%2042.013672%2045.251953%20z%20M%201.3007812%2046.667969%20A%2016%2016%200%200%201%201.6191406%2046.697266%20A%2016%2016%200%200%200%201.3007812%2046.667969%20z%20M%204.2558594%2047.189453%20A%2016%2016%200%200%201%204.4355469%2047.242188%20A%2016%2016%200%200%200%204.2558594%2047.189453%20z%20'/%3e%3cpath%20fill='%23163A65'%20d='M%206.0637516%2038.376047%20A%2028%2028%200%200%201%2020.042969%2034.615234%20A%2028%2028%200%200%201%2042.013672%2045.259765%20A%2028%2028%200%200%200%2048.042969%2028.007812%20A%2028%2028%200%200%200%2020.042969%200.0078125%20A%2028%2028%200%200%200%200%208.4941407%20L%200%2016.007812%20A%2012%2012%200%200%201%2012%2028.007812%20A%2012%2012%200%200%201%206.0613693%2038.364443%20'/%3e%3cpath%20fill='%23A3C9E8'%20d='M%2020.042969%2034.607422%20A%2028%2028%200%200%200%205.0878906%2038.970703%20A%2028%2028%200%200%201%206.0644531%2038.376953%20L%206.0605469%2038.365234%20A%2012%2012%200%200%201%200%2040.007812%20L%200%2043.09375%20L%200%2043.101562%20L%200%2046.607422%20A%2016%2016%200%200%201%202.8847656%2046.873047%20A%2016%2016%200%200%201%202.9199219%2046.878906%20A%2016%2016%200%200%201%205.7011719%2047.662109%20A%2016%2016%200%200%201%205.7324219%2047.673828%20A%2016%2016%200%200%201%208.3300781%2048.955078%20A%2016%2016%200%200%201%208.3398438%2048.958984%20A%2016%2016%200%200%201%208.3457031%2048.962891%20A%2016%2016%200%200%201%2010.662109%2050.6875%20A%2016%2016%200%200%201%2010.697266%2050.71875%20A%2016%2016%200%200%201%2012.660156%2052.837891%20A%2016%2016%200%200%201%2012.667969%2052.845703%20A%2016%2016%200%200%201%2012.673828%2052.855469%20A%2016%2016%200%200%201%2014.228516%2055.306641%20A%2016%2016%200%200%201%2014.232422%2055.3125%20A%2028%2028%200%200%200%2020.042969%2056%20A%2028%2028%200%200%200%2042.013672%2045.251953%20A%2028%2028%200%200%200%2020.042969%2034.607422%20z%20M%204.7695312%2039.177734%20A%2028%2028%200%200%200%202.5390625%2040.798828%20A%2028%2028%200%200%201%204.7695312%2039.177734%20z%20M%202.1816406%2041.091797%20A%2028%2028%200%200%200%200.11914062%2042.984375%20A%2028%2028%200%200%201%202.1816406%2041.091797%20z%20'/%3e%3c/svg%3e",CC="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048.042969%2090.607422'%20width='48.042969'%20height='90.607422'%3e%3ctitle%3eBlueprint%20Chart%3c/title%3e%3cpath%20fill='%234B90CF'%20d='M%2020.042969%2034.607422%20A%2028%2028%200%200%201%2023.072266%2034.779297%20A%2028%2028%200%200%200%2020.042969%2034.607422%20z%20M%2023.34375%2034.810547%20A%2028%2028%200%200%201%2026.171875%2035.292969%20A%2028%2028%200%200%200%2023.34375%2034.810547%20z%20M%2016.570312%2034.84375%20A%2028%2028%200%200%200%2015.474609%2035.033203%20A%2028%2028%200%200%201%2016.570312%2034.84375%20z%20M%2026.390625%2035.341797%20A%2028%2028%200%200%201%2029.316406%2036.189453%20A%2028%2028%200%200%200%2026.390625%2035.341797%20z%20M%2013.128906%2035.511719%20A%2028%2028%200%200%200%2011.904297%2035.873047%20A%2028%2028%200%200%201%2013.128906%2035.511719%20z%20M%2029.373047%2036.210938%20A%2028%2028%200%200%201%2032.103516%2037.347656%20A%2028%2028%200%200%200%2029.373047%2036.210938%20z%20M%209.7832031%2036.609375%20A%2028%2028%200%200%200%208.5820312%2037.117188%20A%2028%2028%200%200%201%209.7832031%2036.609375%20z%20M%2032.392578%2037.486328%20A%2028%2028%200%200%201%2034.939453%2038.90625%20A%2028%2028%200%200%200%2032.392578%2037.486328%20z%20M%206.5742188%2038.128906%20A%2028%2028%200%200%200%205.4511719%2038.765625%20A%2028%2028%200%200%201%206.5742188%2038.128906%20z%20M%2035.041016%2038.966797%20A%2028%2028%200%200%201%2037.523438%2040.738281%20A%2028%2028%200%200%200%2035.041016%2038.966797%20z%20M%203.5273438%2040.080078%20A%2028%2028%200%200%200%202.5761719%2040.771484%20A%2028%2028%200%200%201%203.5273438%2040.080078%20z%20M%2037.658203%2040.851562%20A%2028%2028%200%200%201%2039.804688%2042.783203%20A%2028%2028%200%200%200%2037.658203%2040.851562%20z%20M%2040.011719%2042.990234%20A%2028%2028%200%200%201%2042.013672%2045.251953%20A%2028%2028%200%200%200%2040.011719%2042.990234%20z%20M%2042.013672%2045.251953%20A%2028%2028%200%200%201%2020.042969%2056%20A%2028%2028%200%200%201%2014.232422%2055.3125%20A%2016%2016%200%200%201%2016%2062.607422%20A%2016%2016%200%200%201%200%2078.607422%20L%200%2082.121094%20A%2028%2028%200%200%200%2020.042969%2090.607422%20A%2028%2028%200%200%200%2048.042969%2062.607422%20A%2028%2028%200%200%200%2042.013672%2045.251953%20z%20M%201.3007812%2046.667969%20A%2016%2016%200%200%201%201.6191406%2046.697266%20A%2016%2016%200%200%200%201.3007812%2046.667969%20z%20M%204.2558594%2047.189453%20A%2016%2016%200%200%201%204.4355469%2047.242188%20A%2016%2016%200%200%200%204.2558594%2047.189453%20z%20'/%3e%3cpath%20fill='%23163A65'%20d='M%206.0637516%2038.376047%20A%2028%2028%200%200%201%2020.042969%2034.615234%20A%2028%2028%200%200%201%2042.013672%2045.259765%20A%2028%2028%200%200%200%2048.042969%2028.007812%20A%2028%2028%200%200%200%2020.042969%200.0078125%20A%2028%2028%200%200%200%200%208.4941407%20L%200%2016.007812%20A%2012%2012%200%200%201%2012%2028.007812%20A%2012%2012%200%200%201%206.0613693%2038.364443%20'/%3e%3cpath%20fill='%23A3C9E8'%20d='M%2020.042969%2034.607422%20A%2028%2028%200%200%200%205.0878906%2038.970703%20A%2028%2028%200%200%201%206.0644531%2038.376953%20L%206.0605469%2038.365234%20A%2012%2012%200%200%201%200%2040.007812%20L%200%2043.09375%20L%200%2043.101562%20L%200%2046.607422%20A%2016%2016%200%200%201%202.8847656%2046.873047%20A%2016%2016%200%200%201%202.9199219%2046.878906%20A%2016%2016%200%200%201%205.7011719%2047.662109%20A%2016%2016%200%200%201%205.7324219%2047.673828%20A%2016%2016%200%200%201%208.3300781%2048.955078%20A%2016%2016%200%200%201%208.3398438%2048.958984%20A%2016%2016%200%200%201%208.3457031%2048.962891%20A%2016%2016%200%200%201%2010.662109%2050.6875%20A%2016%2016%200%200%201%2010.697266%2050.71875%20A%2016%2016%200%200%201%2012.660156%2052.837891%20A%2016%2016%200%200%201%2012.667969%2052.845703%20A%2016%2016%200%200%201%2012.673828%2052.855469%20A%2016%2016%200%200%201%2014.228516%2055.306641%20A%2016%2016%200%200%201%2014.232422%2055.3125%20A%2028%2028%200%200%200%2020.042969%2056%20A%2028%2028%200%200%200%2042.013672%2045.251953%20A%2028%2028%200%200%200%2020.042969%2034.607422%20z%20M%204.7695312%2039.177734%20A%2028%2028%200%200%200%202.5390625%2040.798828%20A%2028%2028%200%200%201%204.7695312%2039.177734%20z%20M%202.1816406%2041.091797%20A%2028%2028%200%200%200%200.11914062%2042.984375%20A%2028%2028%200%200%201%202.1816406%2041.091797%20z%20'/%3e%3c/svg%3e",jG={class:"layout-navbar"},XG={class:"layout-navbar__lead d-xl-none"},KG=se({__name:"LayoutNavbar",props:{sidebarOpen:{type:Boolean}},emits:["searchClick","toggleSidebar"],setup(t){const{theme:e,cycleTheme:n,resolvedTheme:o}=vf(),{isNarrow:r}=qi(),i=_C("k"),s={light:FG,dark:HG,auto:GG},a=k(()=>s[e.value]),l=k(()=>r.value?"Search…":"Search or jump to…"),c=k(()=>o.value==="dark"?CC:kC);return(u,d)=>(w(),N("header",jG,[T("div",XG,[H(p(Kn),{"icon-left":p(SC),label:"Open navigation","hide-label":"",square:"",size:"sm",variant:"outline-secondary","aria-haspopup":"dialog","aria-expanded":t.sidebarOpen?"true":"false","aria-controls":"layout-sidebar-offcanvas",onClick:d[0]||(d[0]=f=>u.$emit("toggleSidebar"))},null,8,["icon-left","aria-expanded"]),H(p(pC),{name:"Blueprint Chart","logo-src":c.value,to:"/"},null,8,["logo-src"])]),H(p(mW),{placeholder:l.value,"shortcut-label":p(i).keyLabel,collapsed:p(r),class:"layout-navbar__search",onClick:d[1]||(d[1]=f=>u.$emit("searchClick"))},null,8,["placeholder","shortcut-label","collapsed"]),d[2]||(d[2]=T("div",{class:"layout-navbar__spacer"},null,-1)),H(p(Kn),{"icon-left":a.value,label:"Toggle theme","hide-label":"",square:"",variant:"outline-secondary",size:"sm",class:"layout-navbar__theme",onClick:p(n)},null,8,["icon-left","onClick"])]))}}),ZG=Be(KG,[["__scopeId","data-v-06653289"]]);var Le=(t=>(t.BarVertical="bar-vertical",t.BarHorizontal="bar-horizontal",t.BarMulti="bar-multi",t.ColumnStacked="column-stacked",t.BarStacked="bar-stacked",t.BarSplit="bar-split",t.BarGrouped="bar-grouped",t.Line="line",t.LineMulti="line-multi",t.Area="area",t.AreaStacked="area-stacked",t.Donut="donut",t.Pie="pie",t.VerticalBar="vertical-bar",t.HorizontalBar="horizontal-bar",t))(Le||{}),Jr=(t=>(t.Left="left",t.Right="right",t))(Jr||{}),Vd=(t=>(t.Linear="linear",t.Log="log",t))(Vd||{}),Hn=(t=>(t.Solid="solid",t.Dashed="dashed",t.Dotted="dotted",t.None="none",t))(Hn||{}),sn=(t=>(t.Auto="auto",t.Inside="inside",t.Outside="outside",t.Off="off",t))(sn||{}),gd=(t=>(t.Auto="auto",t.Horizontal="horizontal",t.Vertical="vertical",t))(gd||{}),Pn=(t=>(t.NW="NW",t.N="N",t.NE="NE",t.E="E",t.SE="SE",t.S="S",t.SW="SW",t.W="W",t.Center="center",t))(Pn||{}),Co=(t=>(t.Direct="direct",t.CurveLeft="curve-left",t.CurveRight="curve-right",t.Elbow="elbow",t))(Co||{}),Tp=(t=>(t.Solid="solid",t.Dotted="dotted",t.Dashed="dashed",t))(Tp||{}),Lt=(t=>(t.Point="point",t.Range="range",t.Free="free",t))(Lt||{}),AC=(t=>(t.Hide="hide",t.Show="show",t))(AC||{}),$C=(t=>(t.Start="start",t.Center="center",t.End="end",t))($C||{}),Yn=(t=>(t.Vertical="vertical",t.Horizontal="horizontal",t))(Yn||{}),pr=(t=>(t.Circle="circle",t.Square="square",t.Diamond="diamond",t.Triangle="triangle",t.TriangleDown="triangleDown",t.Cross="cross",t.Star="star",t))(pr||{}),gr=(t=>(t.All="all",t.First="first",t.Last="last",t.FirstLast="firstLast",t))(gr||{}),Vo=(t=>(t.Filled="filled",t.Hollow="hollow",t))(Vo||{}),Jt=(t=>(t.Ascending="ascending",t.Descending="descending",t.None="none",t))(Jt||{}),pc=(t=>(t.Total="total",t.WithinGroups="within-groups",t.None="none",t))(pc||{}),hc=(t=>(t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t))(hc||{}),Cs=(t=>(t.Start="start",t.Middle="middle",t.End="end",t))(Cs||{}),yt=(t=>(t.Inside="inside",t.Outside="outside",t.Auto="auto",t))(yt||{}),Ao=(t=>(t.Both="both",t.Vertical="vertical",t.Horizontal="horizontal",t))(Ao||{}),oi=(t=>(t.Solid="solid",t.Dashed="dashed",t.Dotted="dotted",t))(oi||{}),xl=(t=>(t.Normal="normal",t.Percent="percent",t))(xl||{}),Ze=(t=>(t.Colors="colors",t.Boolean="boolean",t.Select="select",t.Text="text",t.NumberFormat="numberFormat",t.DateFormat="dateFormat",t))(Ze||{}),$o=(t=>(t.Off="",t.Auto="auto",t.Outside="outside",t.Inside="inside",t))($o||{}),Qr=(t=>(t.Linear="linear",t.MonotoneX="monotoneX",t.Step="step",t.StepBefore="stepBefore",t.StepAfter="stepAfter",t.Basis="basis",t.Cardinal="cardinal",t.CatmullRom="catmullRom",t))(Qr||{});function QG(t){return t}var Rh=1,Fh=2,g1=3,Ku=4,R_=1e-6;function JG(t){return"translate("+t+",0)"}function eq(t){return"translate(0,"+t+")"}function tq(t){return e=>+t(e)}function nq(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function oq(){return!this.__axis}function am(t,e){var n=[],o=null,r=null,i=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===Rh||t===Ku?-1:1,u=t===Ku||t===Fh?"x":"y",d=t===Rh||t===g1?JG:eq;function f(h){var g=o??(e.ticks?e.ticks.apply(e,n):e.domain()),b=r??(e.tickFormat?e.tickFormat.apply(e,n):QG),m=Math.max(i,0)+a,v=e.range(),y=+v[0]+l,x=+v[v.length-1]+l,_=(e.bandwidth?nq:tq)(e.copy(),l),S=h.selection?h.selection():h,E=S.selectAll(".domain").data([null]),M=S.selectAll(".tick").data(g,e).order(),C=M.exit(),O=M.enter().append("g").attr("class","tick"),P=M.select("line"),R=M.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(O),P=P.merge(O.append("line").attr("stroke","currentColor").attr(u+"2",c*i)),R=R.merge(O.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",t===Rh?"0em":t===g1?"0.71em":"0.32em")),h!==S&&(E=E.transition(h),M=M.transition(h),P=P.transition(h),R=R.transition(h),C=C.transition(h).attr("opacity",R_).attr("transform",function($){return isFinite($=_($))?d($+l):this.getAttribute("transform")}),O.attr("opacity",R_).attr("transform",function($){var A=this.parentNode.__axis;return d((A&&isFinite(A=A($))?A:_($))+l)})),C.remove(),E.attr("d",t===Ku||t===Fh?s?"M"+c*s+","+y+"H"+l+"V"+x+"H"+c*s:"M"+l+","+y+"V"+x:s?"M"+y+","+c*s+"V"+l+"H"+x+"V"+c*s:"M"+y+","+l+"H"+x),M.attr("opacity",1).attr("transform",function($){return d(_($)+l)}),P.attr(u+"2",c*i),R.attr(u,c*m).text(b),S.filter(oq).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Fh?"start":t===Ku?"end":"middle"),S.each(function(){this.__axis=_})}return f.scale=function(h){return arguments.length?(e=h,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(h){return arguments.length?(n=h==null?[]:Array.from(h),f):n.slice()},f.tickValues=function(h){return arguments.length?(o=h==null?null:Array.from(h),f):o&&o.slice()},f.tickFormat=function(h){return arguments.length?(r=h,f):r},f.tickSize=function(h){return arguments.length?(i=s=+h,f):i},f.tickSizeInner=function(h){return arguments.length?(i=+h,f):i},f.tickSizeOuter=function(h){return arguments.length?(s=+h,f):s},f.tickPadding=function(h){return arguments.length?(a=+h,f):a},f.offset=function(h){return arguments.length?(l=+h,f):l},f}function rq(t){return am(Rh,t)}function F_(t){return am(Fh,t)}function iq(t){return am(g1,t)}function V_(t){return am(Ku,t)}var sq={value:()=>{}};function My(){for(var t=0,e=arguments.length,n={},o;t<e;++t){if(!(o=arguments[t]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Vh(n)}function Vh(t){this._=t}function aq(t,e){return t.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Vh.prototype=My.prototype={constructor:Vh,on:function(t,e){var n=this._,o=aq(t+"",n),r,i=-1,s=o.length;if(arguments.length<2){for(;++i<s;)if((r=(t=o[i]).type)&&(r=lq(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<s;)if(r=(t=o[i]).type)n[r]=z_(n[r],t.name,e);else if(e==null)for(r in n)n[r]=z_(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Vh(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],o=0,r=i.length;o<r;++o)i[o].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)}};function lq(t,e){for(var n=0,o=t.length,r;n<o;++n)if((r=t[n]).name===e)return r.value}function z_(t,e,n){for(var o=0,r=t.length;o<r;++o)if(t[o].name===e){t[o]=sq,t=t.slice(0,o).concat(t.slice(o+1));break}return n!=null&&t.push({name:e,value:n}),t}var v1="http://www.w3.org/1999/xhtml";const H_={svg:"http://www.w3.org/2000/svg",xhtml:v1,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function lm(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),H_.hasOwnProperty(e)?{space:H_[e],local:t}:t}function cq(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===v1&&e.documentElement.namespaceURI===v1?e.createElement(t):e.createElementNS(n,t)}}function uq(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function TC(t){var e=lm(t);return(e.local?uq:cq)(e)}function dq(){}function Oy(t){return t==null?dq:function(){return this.querySelector(t)}}function fq(t){typeof t!="function"&&(t=Oy(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i=e[r],s=i.length,a=o[r]=new Array(s),l,c,u=0;u<s;++u)(l=i[u])&&(c=t.call(l,l.__data__,u,i))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new kr(o,this._parents)}function hq(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function pq(){return[]}function MC(t){return t==null?pq:function(){return this.querySelectorAll(t)}}function mq(t){return function(){return hq(t.apply(this,arguments))}}function gq(t){typeof t=="function"?t=mq(t):t=MC(t);for(var e=this._groups,n=e.length,o=[],r=[],i=0;i<n;++i)for(var s=e[i],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(o.push(t.call(l,l.__data__,c,s)),r.push(l));return new kr(o,r)}function OC(t){return function(){return this.matches(t)}}function BC(t){return function(e){return e.matches(t)}}var vq=Array.prototype.find;function bq(t){return function(){return vq.call(this.children,t)}}function yq(){return this.firstElementChild}function xq(t){return this.select(t==null?yq:bq(typeof t=="function"?t:BC(t)))}var wq=Array.prototype.filter;function _q(){return Array.from(this.children)}function Sq(t){return function(){return wq.call(this.children,t)}}function kq(t){return this.selectAll(t==null?_q:Sq(typeof t=="function"?t:BC(t)))}function Cq(t){typeof t!="function"&&(t=OC(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i=e[r],s=i.length,a=o[r]=[],l,c=0;c<s;++c)(l=i[c])&&t.call(l,l.__data__,c,i)&&a.push(l);return new kr(o,this._parents)}function LC(t){return new Array(t.length)}function Aq(){return new kr(this._enter||this._groups.map(LC),this._parents)}function Mp(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Mp.prototype={constructor:Mp,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function $q(t){return function(){return t}}function Tq(t,e,n,o,r,i){for(var s=0,a,l=e.length,c=i.length;s<c;++s)(a=e[s])?(a.__data__=i[s],o[s]=a):n[s]=new Mp(t,i[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function Mq(t,e,n,o,r,i,s){var a,l,c=new Map,u=e.length,d=i.length,f=new Array(u),h;for(a=0;a<u;++a)(l=e[a])&&(f[a]=h=s.call(l,l.__data__,a,e)+"",c.has(h)?r[a]=l:c.set(h,l));for(a=0;a<d;++a)h=s.call(t,i[a],a,i)+"",(l=c.get(h))?(o[a]=l,l.__data__=i[a],c.delete(h)):n[a]=new Mp(t,i[a]);for(a=0;a<u;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function Oq(t){return t.__data__}function Bq(t,e){if(!arguments.length)return Array.from(this,Oq);var n=e?Mq:Tq,o=this._parents,r=this._groups;typeof t!="function"&&(t=$q(t));for(var i=r.length,s=new Array(i),a=new Array(i),l=new Array(i),c=0;c<i;++c){var u=o[c],d=r[c],f=d.length,h=Lq(t.call(u,u&&u.__data__,c,o)),g=h.length,b=a[c]=new Array(g),m=s[c]=new Array(g),v=l[c]=new Array(f);n(u,d,b,m,v,h,e);for(var y=0,x=0,_,S;y<g;++y)if(_=b[y]){for(y>=x&&(x=y+1);!(S=m[x])&&++x<g;);_._next=S||null}}return s=new kr(s,o),s._enter=a,s._exit=l,s}function Lq(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Pq(){return new kr(this._exit||this._groups.map(LC),this._parents)}function Dq(t,e,n){var o=this.enter(),r=this,i=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Eq(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,r=n.length,i=o.length,s=Math.min(r,i),a=new Array(r),l=0;l<s;++l)for(var c=n[l],u=o[l],d=c.length,f=a[l]=new Array(d),h,g=0;g<d;++g)(h=c[g]||u[g])&&(f[g]=h);for(;l<r;++l)a[l]=n[l];return new kr(a,this._parents)}function Iq(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o=t[e],r=o.length-1,i=o[r],s;--r>=0;)(s=o[r])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function Nq(t){t||(t=Rq);function e(d,f){return d&&f?t(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var s=n[i],a=s.length,l=r[i]=new Array(a),c,u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(e)}return new kr(r,this._parents).order()}function Rq(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Fq(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Vq(){return Array.from(this)}function zq(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],r=0,i=o.length;r<i;++r){var s=o[r];if(s)return s}return null}function Hq(){let t=0;for(const e of this)++t;return t}function Wq(){return!this.node()}function Uq(t){for(var e=this._groups,n=0,o=e.length;n<o;++n)for(var r=e[n],i=0,s=r.length,a;i<s;++i)(a=r[i])&&t.call(a,a.__data__,i,r);return this}function Gq(t){return function(){this.removeAttribute(t)}}function qq(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yq(t,e){return function(){this.setAttribute(t,e)}}function jq(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xq(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Kq(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Zq(t,e){var n=lm(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((e==null?n.local?qq:Gq:typeof e=="function"?n.local?Kq:Xq:n.local?jq:Yq)(n,e))}function PC(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Qq(t){return function(){this.style.removeProperty(t)}}function Jq(t,e,n){return function(){this.style.setProperty(t,e,n)}}function eY(t,e,n){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function tY(t,e,n){return arguments.length>1?this.each((e==null?Qq:typeof e=="function"?eY:Jq)(t,e,n??"")):Yc(this.node(),t)}function Yc(t,e){return t.style.getPropertyValue(e)||PC(t).getComputedStyle(t,null).getPropertyValue(e)}function nY(t){return function(){delete this[t]}}function oY(t,e){return function(){this[t]=e}}function rY(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function iY(t,e){return arguments.length>1?this.each((e==null?nY:typeof e=="function"?rY:oY)(t,e)):this.node()[t]}function DC(t){return t.trim().split(/^|\s+/)}function By(t){return t.classList||new EC(t)}function EC(t){this._node=t,this._names=DC(t.getAttribute("class")||"")}EC.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function IC(t,e){for(var n=By(t),o=-1,r=e.length;++o<r;)n.add(e[o])}function NC(t,e){for(var n=By(t),o=-1,r=e.length;++o<r;)n.remove(e[o])}function sY(t){return function(){IC(this,t)}}function aY(t){return function(){NC(this,t)}}function lY(t,e){return function(){(e.apply(this,arguments)?IC:NC)(this,t)}}function cY(t,e){var n=DC(t+"");if(arguments.length<2){for(var o=By(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?lY:e?sY:aY)(n,e))}function uY(){this.textContent=""}function dY(t){return function(){this.textContent=t}}function fY(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function hY(t){return arguments.length?this.each(t==null?uY:(typeof t=="function"?fY:dY)(t)):this.node().textContent}function pY(){this.innerHTML=""}function mY(t){return function(){this.innerHTML=t}}function gY(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function vY(t){return arguments.length?this.each(t==null?pY:(typeof t=="function"?gY:mY)(t)):this.node().innerHTML}function bY(){this.nextSibling&&this.parentNode.appendChild(this)}function yY(){return this.each(bY)}function xY(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wY(){return this.each(xY)}function _Y(t){var e=typeof t=="function"?t:TC(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function SY(){return null}function kY(t,e){var n=typeof t=="function"?t:TC(t),o=e==null?SY:typeof e=="function"?e:Oy(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function CY(){var t=this.parentNode;t&&t.removeChild(this)}function AY(){return this.each(CY)}function $Y(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function TY(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function MY(t){return this.select(t?TY:$Y)}function OY(t){return arguments.length?this.property("__data__",t):this.node().__data__}function BY(t){return function(e){t.call(this,e,this.__data__)}}function LY(t){return t.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{type:e,name:n}})}function PY(t){return function(){var e=this.__on;if(e){for(var n=0,o=-1,r=e.length,i;n<r;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++o]=i;++o?e.length=o:delete this.__on}}}function DY(t,e,n){return function(){var o=this.__on,r,i=BY(e);if(o){for(var s=0,a=o.length;s<a;++s)if((r=o[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=e;return}}this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},o?o.push(r):this.__on=[r]}}function EY(t,e,n){var o=LY(t+""),r,i=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(r=0,u=a[l];r<i;++r)if((s=o[r]).type===u.type&&s.name===u.name)return u.value}return}for(a=e?DY:PY,r=0;r<i;++r)this.each(a(o[r],e,n));return this}function RC(t,e,n){var o=PC(t),r=o.CustomEvent;typeof r=="function"?r=new r(e,n):(r=o.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function IY(t,e){return function(){return RC(this,t,e)}}function NY(t,e){return function(){return RC(this,t,e.apply(this,arguments))}}function RY(t,e){return this.each((typeof e=="function"?NY:IY)(t,e))}function*FY(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],r=0,i=o.length,s;r<i;++r)(s=o[r])&&(yield s)}var FC=[null];function kr(t,e){this._groups=t,this._parents=e}function bf(){return new kr([[document.documentElement]],FC)}function VY(){return this}kr.prototype=bf.prototype={constructor:kr,select:fq,selectAll:gq,selectChild:xq,selectChildren:kq,filter:Cq,data:Bq,enter:Aq,exit:Pq,join:Dq,merge:Eq,selection:VY,order:Iq,sort:Nq,call:Fq,nodes:Vq,node:zq,size:Hq,empty:Wq,each:Uq,attr:Zq,style:tY,property:iY,classed:cY,text:hY,html:vY,raise:yY,lower:wY,append:_Y,insert:kY,remove:AY,clone:MY,datum:OY,on:EY,dispatch:RY,[Symbol.iterator]:FY};function we(t){return typeof t=="string"?new kr([[document.querySelector(t)]],[document.documentElement]):new kr([[t]],FC)}function zY(t){let e;for(;e=t.sourceEvent;)t=e;return t}function HY(t,e){if(t=zY(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}function Ly(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function VC(t,e){var n=Object.create(t.prototype);for(var o in e)n[o]=e[o];return n}function yf(){}var zd=.7,Op=1/zd,Cc="\\s*([+-]?\\d+)\\s*",Hd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",WY=/^#([0-9a-f]{3,8})$/,UY=new RegExp(`^rgb\\(${Cc},${Cc},${Cc}\\)$`),GY=new RegExp(`^rgb\\(${Yi},${Yi},${Yi}\\)$`),qY=new RegExp(`^rgba\\(${Cc},${Cc},${Cc},${Hd}\\)$`),YY=new RegExp(`^rgba\\(${Yi},${Yi},${Yi},${Hd}\\)$`),jY=new RegExp(`^hsl\\(${Hd},${Yi},${Yi}\\)$`),XY=new RegExp(`^hsla\\(${Hd},${Yi},${Yi},${Hd}\\)$`),W_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ly(yf,Ol,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:U_,formatHex:U_,formatHex8:KY,formatHsl:ZY,formatRgb:G_,toString:G_});function U_(){return this.rgb().formatHex()}function KY(){return this.rgb().formatHex8()}function ZY(){return zC(this).formatHsl()}function G_(){return this.rgb().formatRgb()}function Ol(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=WY.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?q_(e):n===3?new rr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Kf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Kf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=UY.exec(t))?new rr(e[1],e[2],e[3],1):(e=GY.exec(t))?new rr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=qY.exec(t))?Kf(e[1],e[2],e[3],e[4]):(e=YY.exec(t))?Kf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=jY.exec(t))?X_(e[1],e[2]/100,e[3]/100,1):(e=XY.exec(t))?X_(e[1],e[2]/100,e[3]/100,e[4]):W_.hasOwnProperty(t)?q_(W_[t]):t==="transparent"?new rr(NaN,NaN,NaN,0):null}function q_(t){return new rr(t>>16&255,t>>8&255,t&255,1)}function Kf(t,e,n,o){return o<=0&&(t=e=n=NaN),new rr(t,e,n,o)}function QY(t){return t instanceof yf||(t=Ol(t)),t?(t=t.rgb(),new rr(t.r,t.g,t.b,t.opacity)):new rr}function b1(t,e,n,o){return arguments.length===1?QY(t):new rr(t,e,n,o??1)}function rr(t,e,n,o){this.r=+t,this.g=+e,this.b=+n,this.opacity=+o}Ly(rr,b1,VC(yf,{brighter(t){return t=t==null?Op:Math.pow(Op,t),new rr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zd:Math.pow(zd,t),new rr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new rr(wl(this.r),wl(this.g),wl(this.b),Bp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Y_,formatHex:Y_,formatHex8:JY,formatRgb:j_,toString:j_}));function Y_(){return`#${pl(this.r)}${pl(this.g)}${pl(this.b)}`}function JY(){return`#${pl(this.r)}${pl(this.g)}${pl(this.b)}${pl((isNaN(this.opacity)?1:this.opacity)*255)}`}function j_(){const t=Bp(this.opacity);return`${t===1?"rgb(":"rgba("}${wl(this.r)}, ${wl(this.g)}, ${wl(this.b)}${t===1?")":`, ${t})`}`}function Bp(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function wl(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function pl(t){return t=wl(t),(t<16?"0":"")+t.toString(16)}function X_(t,e,n,o){return o<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ei(t,e,n,o)}function zC(t){if(t instanceof ei)return new ei(t.h,t.s,t.l,t.opacity);if(t instanceof yf||(t=Ol(t)),!t)return new ei;if(t instanceof ei)return t;t=t.rgb();var e=t.r/255,n=t.g/255,o=t.b/255,r=Math.min(e,n,o),i=Math.max(e,n,o),s=NaN,a=i-r,l=(i+r)/2;return a?(e===i?s=(n-o)/a+(n<o)*6:n===i?s=(o-e)/a+2:s=(e-n)/a+4,a/=l<.5?i+r:2-i-r,s*=60):a=l>0&&l<1?0:s,new ei(s,a,l,t.opacity)}function ej(t,e,n,o){return arguments.length===1?zC(t):new ei(t,e,n,o??1)}function ei(t,e,n,o){this.h=+t,this.s=+e,this.l=+n,this.opacity=+o}Ly(ei,ej,VC(yf,{brighter(t){return t=t==null?Op:Math.pow(Op,t),new ei(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zd:Math.pow(zd,t),new ei(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*e,r=2*n-o;return new rr(Ug(t>=240?t-240:t+120,r,o),Ug(t,r,o),Ug(t<120?t+240:t-120,r,o),this.opacity)},clamp(){return new ei(K_(this.h),Zf(this.s),Zf(this.l),Bp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Bp(this.opacity);return`${t===1?"hsl(":"hsla("}${K_(this.h)}, ${Zf(this.s)*100}%, ${Zf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function K_(t){return t=(t||0)%360,t<0?t+360:t}function Zf(t){return Math.max(0,Math.min(1,t||0))}function Ug(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Py=t=>()=>t;function tj(t,e){return function(n){return t+n*e}}function nj(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(o){return Math.pow(t+o*e,n)}}function oj(t){return(t=+t)==1?HC:function(e,n){return n-e?nj(e,n,t):Py(isNaN(e)?n:e)}}function HC(t,e){var n=e-t;return n?tj(t,n):Py(isNaN(t)?e:t)}const Lp=(function t(e){var n=oj(e);function o(r,i){var s=n((r=b1(r)).r,(i=b1(i)).r),a=n(r.g,i.g),l=n(r.b,i.b),c=HC(r.opacity,i.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return o.gamma=t,o})(1);function rj(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,o=e.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=t[r]*(1-i)+e[r]*i;return o}}function ij(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function sj(t,e){var n=e?e.length:0,o=t?Math.min(n,t.length):0,r=new Array(o),i=new Array(n),s;for(s=0;s<o;++s)r[s]=Dy(t[s],e[s]);for(;s<n;++s)i[s]=e[s];return function(a){for(s=0;s<o;++s)i[s]=r[s](a);return i}}function aj(t,e){var n=new Date;return t=+t,e=+e,function(o){return n.setTime(t*(1-o)+e*o),n}}function no(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function vd(t,e){var n={},o={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=Dy(t[r],e[r]):o[r]=e[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var y1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gg=new RegExp(y1.source,"g");function lj(t){return function(){return t}}function cj(t){return function(e){return t(e)+""}}function WC(t,e){var n=y1.lastIndex=Gg.lastIndex=0,o,r,i,s=-1,a=[],l=[];for(t=t+"",e=e+"";(o=y1.exec(t))&&(r=Gg.exec(e));)(i=r.index)>n&&(i=e.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(o=o[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:no(o,r)})),n=Gg.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?cj(l[0].x):lj(e):(e=l.length,function(c){for(var u=0,d;u<e;++u)a[(d=l[u]).i]=d.x(c);return a.join("")})}function Dy(t,e){var n=typeof e,o;return e==null||n==="boolean"?Py(e):(n==="number"?no:n==="string"?(o=Ol(e))?(e=o,Lp):WC:e instanceof Ol?Lp:e instanceof Date?aj:ij(e)?rj:Array.isArray(e)?sj:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?vd:no)(t,e)}function uj(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Z_=180/Math.PI,x1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function UC(t,e,n,o,r,i){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*o)&&(n-=t*l,o-=e*l),(a=Math.sqrt(n*n+o*o))&&(n/=a,o/=a,l/=a),t*o<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:i,rotate:Math.atan2(e,t)*Z_,skewX:Math.atan(l)*Z_,scaleX:s,scaleY:a}}var Qf;function dj(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?x1:UC(e.a,e.b,e.c,e.d,e.e,e.f)}function fj(t){return t==null||(Qf||(Qf=document.createElementNS("http://www.w3.org/2000/svg","g")),Qf.setAttribute("transform",t),!(t=Qf.transform.baseVal.consolidate()))?x1:(t=t.matrix,UC(t.a,t.b,t.c,t.d,t.e,t.f))}function GC(t,e,n,o){function r(c){return c.length?c.pop()+" ":""}function i(c,u,d,f,h,g){if(c!==d||u!==f){var b=h.push("translate(",null,e,null,n);g.push({i:b-4,x:no(c,d)},{i:b-2,x:no(u,f)})}else(d||f)&&h.push("translate("+d+e+f+n)}function s(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(r(d)+"rotate(",null,o)-2,x:no(c,u)})):u&&d.push(r(d)+"rotate("+u+o)}function a(c,u,d,f){c!==u?f.push({i:d.push(r(d)+"skewX(",null,o)-2,x:no(c,u)}):u&&d.push(r(d)+"skewX("+u+o)}function l(c,u,d,f,h,g){if(c!==d||u!==f){var b=h.push(r(h)+"scale(",null,",",null,")");g.push({i:b-4,x:no(c,d)},{i:b-2,x:no(u,f)})}else(d!==1||f!==1)&&h.push(r(h)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=t(c),u=t(u),i(c.translateX,c.translateY,u.translateX,u.translateY,d,f),s(c.rotate,u.rotate,d,f),a(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var g=-1,b=f.length,m;++g<b;)d[(m=f[g]).i]=m.x(h);return d.join("")}}}var hj=GC(dj,"px, ","px)","deg)"),pj=GC(fj,", ",")",")"),jc=0,Zu=0,Fu=0,qC=1e3,Pp,Qu,Dp=0,Bl=0,cm=0,Wd=typeof performance=="object"&&performance.now?performance:Date,YC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ey(){return Bl||(YC(mj),Bl=Wd.now()+cm)}function mj(){Bl=0}function Ep(){this._call=this._time=this._next=null}Ep.prototype=jC.prototype={constructor:Ep,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ey():+n)+(e==null?0:+e),!this._next&&Qu!==this&&(Qu?Qu._next=this:Pp=this,Qu=this),this._call=t,this._time=n,w1()},stop:function(){this._call&&(this._call=null,this._time=1/0,w1())}};function jC(t,e,n){var o=new Ep;return o.restart(t,e,n),o}function gj(){Ey(),++jc;for(var t=Pp,e;t;)(e=Bl-t._time)>=0&&t._call.call(void 0,e),t=t._next;--jc}function Q_(){Bl=(Dp=Wd.now())+cm,jc=Zu=0;try{gj()}finally{jc=0,bj(),Bl=0}}function vj(){var t=Wd.now(),e=t-Dp;e>qC&&(cm-=e,Dp=t)}function bj(){for(var t,e=Pp,n,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Pp=n);Qu=t,w1(o)}function w1(t){if(!jc){Zu&&(Zu=clearTimeout(Zu));var e=t-Bl;e>24?(t<1/0&&(Zu=setTimeout(Q_,t-Wd.now()-cm)),Fu&&(Fu=clearInterval(Fu))):(Fu||(Dp=Wd.now(),Fu=setInterval(vj,qC)),jc=1,YC(Q_))}}function J_(t,e,n){var o=new Ep;return e=e==null?0:+e,o.restart(r=>{o.stop(),t(r+e)},e,n),o}var yj=My("start","end","cancel","interrupt"),xj=[],XC=0,e8=1,_1=2,zh=3,t8=4,S1=5,Hh=6;function um(t,e,n,o,r,i){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;wj(t,n,{name:e,index:o,group:r,on:yj,tween:xj,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:XC})}function Iy(t,e){var n=Si(t,e);if(n.state>XC)throw new Error("too late; already scheduled");return n}function is(t,e){var n=Si(t,e);if(n.state>zh)throw new Error("too late; already running");return n}function Si(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function wj(t,e,n){var o=t.__transition,r;o[e]=n,n.timer=jC(i,0,n.time);function i(c){n.state=e8,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,d,f,h;if(n.state!==e8)return l();for(u in o)if(h=o[u],h.name===n.name){if(h.state===zh)return J_(s);h.state===t8?(h.state=Hh,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[u]):+u<e&&(h.state=Hh,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[u])}if(J_(function(){n.state===zh&&(n.state=t8,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=_1,n.on.call("start",t,t.__data__,n.index,n.group),n.state===_1){for(n.state=zh,r=new Array(f=n.tween.length),u=0,d=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++d]=h);r.length=d+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=S1,1),d=-1,f=r.length;++d<f;)r[d].call(t,u);n.state===S1&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Hh,n.timer.stop(),delete o[e];for(var c in o)return;delete t.__transition}}function _j(t,e){var n=t.__transition,o,r,i=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((o=n[s]).name!==e){i=!1;continue}r=o.state>_1&&o.state<S1,o.state=Hh,o.timer.stop(),o.on.call(r?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete n[s]}i&&delete t.__transition}}function Sj(t){return this.each(function(){_j(this,t)})}function kj(t,e){var n,o;return function(){var r=is(this,t),i=r.tween;if(i!==n){o=n=i;for(var s=0,a=o.length;s<a;++s)if(o[s].name===e){o=o.slice(),o.splice(s,1);break}}r.tween=o}}function Cj(t,e,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=is(this,t),s=i.tween;if(s!==o){r=(o=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}i.tween=r}}function Aj(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o=Si(this.node(),n).tween,r=0,i=o.length,s;r<i;++r)if((s=o[r]).name===t)return s.value;return null}return this.each((e==null?kj:Cj)(n,t,e))}function Ny(t,e,n){var o=t._id;return t.each(function(){var r=is(this,o);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return Si(r,o).value[e]}}function KC(t,e){var n;return(typeof e=="number"?no:e instanceof Ol?Lp:(n=Ol(e))?(e=n,Lp):WC)(t,e)}function $j(t){return function(){this.removeAttribute(t)}}function Tj(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mj(t,e,n){var o,r=n+"",i;return function(){var s=this.getAttribute(t);return s===r?null:s===o?i:i=e(o=s,n)}}function Oj(t,e,n){var o,r=n+"",i;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===o?i:i=e(o=s,n)}}function Bj(t,e,n){var o,r,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===o&&l===r?i:(r=l,i=e(o=s,a)))}}function Lj(t,e,n){var o,r,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===o&&l===r?i:(r=l,i=e(o=s,a)))}}function Pj(t,e){var n=lm(t),o=n==="transform"?pj:KC;return this.attrTween(t,typeof e=="function"?(n.local?Lj:Bj)(n,o,Ny(this,"attr."+t,e)):e==null?(n.local?Tj:$j)(n):(n.local?Oj:Mj)(n,o,e))}function Dj(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ej(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ij(t,e){var n,o;function r(){var i=e.apply(this,arguments);return i!==o&&(n=(o=i)&&Ej(t,i)),n}return r._value=e,r}function Nj(t,e){var n,o;function r(){var i=e.apply(this,arguments);return i!==o&&(n=(o=i)&&Dj(t,i)),n}return r._value=e,r}function Rj(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var o=lm(t);return this.tween(n,(o.local?Ij:Nj)(o,e))}function Fj(t,e){return function(){Iy(this,t).delay=+e.apply(this,arguments)}}function Vj(t,e){return e=+e,function(){Iy(this,t).delay=e}}function zj(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Fj:Vj)(e,t)):Si(this.node(),e).delay}function Hj(t,e){return function(){is(this,t).duration=+e.apply(this,arguments)}}function Wj(t,e){return e=+e,function(){is(this,t).duration=e}}function Uj(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Hj:Wj)(e,t)):Si(this.node(),e).duration}function Gj(t,e){if(typeof e!="function")throw new Error;return function(){is(this,t).ease=e}}function qj(t){var e=this._id;return arguments.length?this.each(Gj(e,t)):Si(this.node(),e).ease}function Yj(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;is(this,t).ease=n}}function jj(t){if(typeof t!="function")throw new Error;return this.each(Yj(this._id,t))}function Xj(t){typeof t!="function"&&(t=OC(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i=e[r],s=i.length,a=o[r]=[],l,c=0;c<s;++c)(l=i[c])&&t.call(l,l.__data__,c,i)&&a.push(l);return new Rs(o,this._parents,this._name,this._id)}function Kj(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,o=e.length,r=n.length,i=Math.min(o,r),s=new Array(o),a=0;a<i;++a)for(var l=e[a],c=n[a],u=l.length,d=s[a]=new Array(u),f,h=0;h<u;++h)(f=l[h]||c[h])&&(d[h]=f);for(;a<o;++a)s[a]=e[a];return new Rs(s,this._parents,this._name,this._id)}function Zj(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Qj(t,e,n){var o,r,i=Zj(e)?Iy:is;return function(){var s=i(this,t),a=s.on;a!==o&&(r=(o=a).copy()).on(e,n),s.on=r}}function Jj(t,e){var n=this._id;return arguments.length<2?Si(this.node(),n).on.on(t):this.each(Qj(n,t,e))}function eX(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function tX(){return this.on("end.remove",eX(this._id))}function nX(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Oy(t));for(var o=this._groups,r=o.length,i=new Array(r),s=0;s<r;++s)for(var a=o[s],l=a.length,c=i[s]=new Array(l),u,d,f=0;f<l;++f)(u=a[f])&&(d=t.call(u,u.__data__,f,a))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d,um(c[f],e,n,f,c,Si(u,n)));return new Rs(i,this._parents,e,n)}function oX(t){var e=this._name,n=this._id;typeof t!="function"&&(t=MC(t));for(var o=this._groups,r=o.length,i=[],s=[],a=0;a<r;++a)for(var l=o[a],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var f=t.call(u,u.__data__,d,l),h,g=Si(u,n),b=0,m=f.length;b<m;++b)(h=f[b])&&um(h,e,n,b,f,g);i.push(f),s.push(u)}return new Rs(i,s,e,n)}var rX=bf.prototype.constructor;function iX(){return new rX(this._groups,this._parents)}function sX(t,e){var n,o,r;return function(){var i=Yc(this,t),s=(this.style.removeProperty(t),Yc(this,t));return i===s?null:i===n&&s===o?r:r=e(n=i,o=s)}}function ZC(t){return function(){this.style.removeProperty(t)}}function aX(t,e,n){var o,r=n+"",i;return function(){var s=Yc(this,t);return s===r?null:s===o?i:i=e(o=s,n)}}function lX(t,e,n){var o,r,i;return function(){var s=Yc(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Yc(this,t))),s===l?null:s===o&&l===r?i:(r=l,i=e(o=s,a))}}function cX(t,e){var n,o,r,i="style."+e,s="end."+i,a;return function(){var l=is(this,t),c=l.on,u=l.value[i]==null?a||(a=ZC(e)):void 0;(c!==n||r!==u)&&(o=(n=c).copy()).on(s,r=u),l.on=o}}function uX(t,e,n){var o=(t+="")=="transform"?hj:KC;return e==null?this.styleTween(t,sX(t,o)).on("end.style."+t,ZC(t)):typeof e=="function"?this.styleTween(t,lX(t,o,Ny(this,"style."+t,e))).each(cX(this._id,t)):this.styleTween(t,aX(t,o,e),n).on("end.style."+t,null)}function dX(t,e,n){return function(o){this.style.setProperty(t,e.call(this,o),n)}}function fX(t,e,n){var o,r;function i(){var s=e.apply(this,arguments);return s!==r&&(o=(r=s)&&dX(t,s,n)),o}return i._value=e,i}function hX(t,e,n){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,fX(t,e,n??""))}function pX(t){return function(){this.textContent=t}}function mX(t){return function(){var e=t(this);this.textContent=e??""}}function gX(t){return this.tween("text",typeof t=="function"?mX(Ny(this,"text",t)):pX(t==null?"":t+""))}function vX(t){return function(e){this.textContent=t.call(this,e)}}function bX(t){var e,n;function o(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&vX(r)),e}return o._value=t,o}function yX(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,bX(t))}function xX(){for(var t=this._name,e=this._id,n=QC(),o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var u=Si(l,e);um(l,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Rs(o,this._parents,t,n)}function wX(){var t,e,n=this,o=n._id,r=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){--r===0&&i()}};n.each(function(){var c=is(this,o),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&i()})}var _X=0;function Rs(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function QC(){return++_X}var us=bf.prototype;Rs.prototype={constructor:Rs,select:nX,selectAll:oX,selectChild:us.selectChild,selectChildren:us.selectChildren,filter:Xj,merge:Kj,selection:iX,transition:xX,call:us.call,nodes:us.nodes,node:us.node,size:us.size,empty:us.empty,each:us.each,on:Jj,attr:Pj,attrTween:Rj,style:uX,styleTween:hX,text:gX,textTween:yX,remove:tX,tween:Aj,delay:zj,duration:Uj,ease:qj,easeVarying:jj,end:wX,[Symbol.iterator]:us[Symbol.iterator]};function Jf(t){return--t*t*t+1}function k1(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var SX={time:null,delay:0,duration:250,ease:k1};function kX(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function CX(t){var e,n;t instanceof Rs?(e=t._id,t=t._name):(e=QC(),(n=SX).time=Ey(),t=t==null?null:t+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],a=s.length,l,c=0;c<a;++c)(l=s[c])&&um(l,t,e,c,s,n||kX(l,e));return new Rs(o,this._parents,t,e)}bf.prototype.interrupt=Sj;bf.prototype.transition=CX;const C1=Math.PI,A1=2*C1,sl=1e-6,AX=A1-sl;function JC(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function $X(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return JC;const n=10**e;return function(o){this._+=o[0];for(let r=1,i=o.length;r<i;++r)this._+=Math.round(arguments[r]*n)/n+o[r]}}class TX{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?JC:$X(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,o,r){this._append`Q${+e},${+n},${this._x1=+o},${this._y1=+r}`}bezierCurveTo(e,n,o,r,i,s){this._append`C${+e},${+n},${+o},${+r},${this._x1=+i},${this._y1=+s}`}arcTo(e,n,o,r,i){if(e=+e,n=+n,o=+o,r=+r,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,a=this._y1,l=o-e,c=r-n,u=s-e,d=a-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>sl)if(!(Math.abs(d*l-c*u)>sl)||!i)this._append`L${this._x1=e},${this._y1=n}`;else{let h=o-s,g=r-a,b=l*l+c*c,m=h*h+g*g,v=Math.sqrt(b),y=Math.sqrt(f),x=i*Math.tan((C1-Math.acos((b+f-m)/(2*v*y)))/2),_=x/y,S=x/v;Math.abs(_-1)>sl&&this._append`L${e+_*u},${n+_*d}`,this._append`A${i},${i},0,0,${+(d*h>u*g)},${this._x1=e+S*l},${this._y1=n+S*c}`}}arc(e,n,o,r,i,s){if(e=+e,n=+n,o=+o,s=!!s,o<0)throw new Error(`negative radius: ${o}`);let a=o*Math.cos(r),l=o*Math.sin(r),c=e+a,u=n+l,d=1^s,f=s?r-i:i-r;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>sl||Math.abs(this._y1-u)>sl)&&this._append`L${c},${u}`,o&&(f<0&&(f=f%A1+A1),f>AX?this._append`A${o},${o},0,1,${d},${e-a},${n-l}A${o},${o},0,1,${d},${this._x1=c},${this._y1=u}`:f>sl&&this._append`A${o},${o},0,${+(f>=C1)},${d},${this._x1=e+o*Math.cos(i)},${this._y1=n+o*Math.sin(i)}`)}rect(e,n,o,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${o=+o}v${+r}h${-o}Z`}toString(){return this._}}function dm(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const n8=Symbol("implicit");function fm(){var t=new k_,e=[],n=[],o=n8;function r(i){let s=t.get(i);if(s===void 0){if(o!==n8)return o;t.set(i,s=e.push(i)-1)}return n[s%n.length]}return r.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new k_;for(const s of i)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(i){return arguments.length?(n=Array.from(i),r):n.slice()},r.unknown=function(i){return arguments.length?(o=i,r):o},r.copy=function(){return fm(e,n).unknown(o)},dm.apply(r,arguments),r}function Sn(){var t=fm().unknown(void 0),e=t.domain,n=t.range,o=0,r=1,i,s,a=!1,l=0,c=0,u=.5;delete t.unknown;function d(){var f=e().length,h=r<o,g=h?r:o,b=h?o:r;i=(b-g)/Math.max(1,f-l+c*2),a&&(i=Math.floor(i)),g+=(b-g-i*(f-l))*u,s=i*(1-l),a&&(g=Math.round(g),s=Math.round(s));var m=bV(f).map(function(v){return g+i*v});return n(h?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),d()):e()},t.range=function(f){return arguments.length?([o,r]=f,o=+o,r=+r,d()):[o,r]},t.rangeRound=function(f){return[o,r]=f,o=+o,r=+r,a=!0,d()},t.bandwidth=function(){return s},t.step=function(){return i},t.round=function(f){return arguments.length?(a=!!f,d()):a},t.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},t.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},t.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},t.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},t.copy=function(){return Sn(e(),[o,r]).round(a).paddingInner(l).paddingOuter(c).align(u)},dm.apply(d(),arguments)}function eA(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return eA(e())},t}function hm(){return eA(Sn.apply(null,arguments).paddingInner(1))}function MX(t){return function(){return t}}function OX(t){return+t}var o8=[0,1];function mc(t){return t}function $1(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:MX(isNaN(e)?NaN:.5)}function BX(t,e){var n;return t>e&&(n=t,t=e,e=n),function(o){return Math.max(t,Math.min(e,o))}}function LX(t,e,n){var o=t[0],r=t[1],i=e[0],s=e[1];return r<o?(o=$1(r,o),i=n(s,i)):(o=$1(o,r),i=n(i,s)),function(a){return i(o(a))}}function PX(t,e,n){var o=Math.min(t.length,e.length)-1,r=new Array(o),i=new Array(o),s=-1;for(t[o]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<o;)r[s]=$1(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var l=lV(t,a,1,o)-1;return i[l](r[l](a))}}function tA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function nA(){var t=o8,e=o8,n=Dy,o,r,i,s=mc,a,l,c;function u(){var f=Math.min(t.length,e.length);return s!==mc&&(s=BX(t[0],t[f-1])),a=f>2?PX:LX,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=a(t.map(o),e,n)))(o(s(f)))}return d.invert=function(f){return s(r((c||(c=a(e,t.map(o),no)))(f)))},d.domain=function(f){return arguments.length?(t=Array.from(f,OX),u()):t.slice()},d.range=function(f){return arguments.length?(e=Array.from(f),u()):e.slice()},d.rangeRound=function(f){return e=Array.from(f),n=uj,u()},d.clamp=function(f){return arguments.length?(s=f?!0:mc,u()):s!==mc},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,h){return o=f,r=h,u()}}function DX(){return nA()(mc,mc)}function EX(t,e,n,o){var r=vV(t,e,n),i;switch(o=_p(o??",f"),o.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return o.precision==null&&!isNaN(i=$F(r,s))&&(o.precision=i),K4(o,s)}case"":case"e":case"g":case"p":case"r":{o.precision==null&&!isNaN(i=TF(r,Math.max(Math.abs(t),Math.abs(e))))&&(o.precision=i-(o.type==="e"));break}case"f":case"%":{o.precision==null&&!isNaN(i=AF(r))&&(o.precision=i-(o.type==="%")*2);break}}return cu(o)}function oA(t){var e=t.domain;return t.ticks=function(n){var o=e();return gV(o[0],o[o.length-1],n??10)},t.tickFormat=function(n,o){var r=e();return EX(r[0],r[r.length-1],n??10,o)},t.nice=function(n){n==null&&(n=10);var o=e(),r=0,i=o.length-1,s=o[r],a=o[i],l,c,u=10;for(a<s&&(c=s,s=a,a=c,c=r,r=i,i=c);u-- >0;){if(c=h1(s,a,n),c===l)return o[r]=s,o[i]=a,e(o);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function bn(){var t=DX();return t.copy=function(){return tA(t,bn())},dm.apply(t,arguments),oA(t)}function r8(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function i8(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function IX(t){var e=1,n=t(r8(e),i8(e));return n.constant=function(o){return arguments.length?t(r8(e=+o),i8(e)):e},oA(n)}function Va(){var t=IX(nA());return t.copy=function(){return tA(t,Va()).constant(t.constant())},dm.apply(t,arguments)}function kt(t){return function(){return t}}const s8=Math.abs,po=Math.atan2,ms=Math.cos,NX=Math.max,qg=Math.min,Qo=Math.sin,To=Math.sqrt,mo=1e-12,$a=Math.PI,Ip=$a/2,ba=2*$a;function RX(t){return t>1?0:t<-1?$a:Math.acos(t)}function a8(t){return t>=1?Ip:t<=-1?-Ip:Math.asin(t)}function pm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const o=Math.floor(n);if(!(o>=0))throw new RangeError(`invalid digits: ${n}`);e=o}return t},()=>new TX(e)}function FX(t){return t.innerRadius}function VX(t){return t.outerRadius}function zX(t){return t.startAngle}function HX(t){return t.endAngle}function WX(t){return t&&t.padAngle}function UX(t,e,n,o,r,i,s,a){var l=n-t,c=o-e,u=s-r,d=a-i,f=d*l-u*c;if(!(f*f<mo))return f=(u*(e-i)-d*(t-r))/f,[t+f*l,e+f*c]}function eh(t,e,n,o,r,i,s){var a=t-n,l=e-o,c=(s?i:-i)/To(a*a+l*l),u=c*l,d=-c*a,f=t+u,h=e+d,g=n+u,b=o+d,m=(f+g)/2,v=(h+b)/2,y=g-f,x=b-h,_=y*y+x*x,S=r-i,E=f*b-g*h,M=(x<0?-1:1)*To(NX(0,S*S*_-E*E)),C=(E*x-y*M)/_,O=(-E*y-x*M)/_,P=(E*x+y*M)/_,R=(-E*y+x*M)/_,$=C-m,A=O-v,L=P-m,B=R-v;return $*$+A*A>L*L+B*B&&(C=P,O=R),{cx:C,cy:O,x01:-u,y01:-d,x11:C*(r/S-1),y11:O*(r/S-1)}}function rA(){var t=FX,e=VX,n=kt(0),o=null,r=zX,i=HX,s=WX,a=null,l=pm(c);function c(){var u,d,f=+t.apply(this,arguments),h=+e.apply(this,arguments),g=r.apply(this,arguments)-Ip,b=i.apply(this,arguments)-Ip,m=s8(b-g),v=b>g;if(a||(a=u=l()),h<f&&(d=h,h=f,f=d),!(h>mo))a.moveTo(0,0);else if(m>ba-mo)a.moveTo(h*ms(g),h*Qo(g)),a.arc(0,0,h,g,b,!v),f>mo&&(a.moveTo(f*ms(b),f*Qo(b)),a.arc(0,0,f,b,g,v));else{var y=g,x=b,_=g,S=b,E=m,M=m,C=s.apply(this,arguments)/2,O=C>mo&&(o?+o.apply(this,arguments):To(f*f+h*h)),P=qg(s8(h-f)/2,+n.apply(this,arguments)),R=P,$=P,A,L;if(O>mo){var B=a8(O/f*Qo(C)),F=a8(O/h*Qo(C));(E-=B*2)>mo?(B*=v?1:-1,_+=B,S-=B):(E=0,_=S=(g+b)/2),(M-=F*2)>mo?(F*=v?1:-1,y+=F,x-=F):(M=0,y=x=(g+b)/2)}var z=h*ms(y),V=h*Qo(y),U=f*ms(S),ie=f*Qo(S);if(P>mo){var ue=h*ms(x),fe=h*Qo(x),he=f*ms(_),ce=f*Qo(_),de;if(m<$a)if(de=UX(z,V,he,ce,ue,fe,U,ie)){var _e=z-de[0],j=V-de[1],te=ue-de[0],ne=fe-de[1],me=1/Qo(RX((_e*te+j*ne)/(To(_e*_e+j*j)*To(te*te+ne*ne)))/2),ve=To(de[0]*de[0]+de[1]*de[1]);R=qg(P,(f-ve)/(me-1)),$=qg(P,(h-ve)/(me+1))}else R=$=0}M>mo?$>mo?(A=eh(he,ce,z,V,h,$,v),L=eh(ue,fe,U,ie,h,$,v),a.moveTo(A.cx+A.x01,A.cy+A.y01),$<P?a.arc(A.cx,A.cy,$,po(A.y01,A.x01),po(L.y01,L.x01),!v):(a.arc(A.cx,A.cy,$,po(A.y01,A.x01),po(A.y11,A.x11),!v),a.arc(0,0,h,po(A.cy+A.y11,A.cx+A.x11),po(L.cy+L.y11,L.cx+L.x11),!v),a.arc(L.cx,L.cy,$,po(L.y11,L.x11),po(L.y01,L.x01),!v))):(a.moveTo(z,V),a.arc(0,0,h,y,x,!v)):a.moveTo(z,V),!(f>mo)||!(E>mo)?a.lineTo(U,ie):R>mo?(A=eh(U,ie,ue,fe,f,-R,v),L=eh(z,V,he,ce,f,-R,v),a.lineTo(A.cx+A.x01,A.cy+A.y01),R<P?a.arc(A.cx,A.cy,R,po(A.y01,A.x01),po(L.y01,L.x01),!v):(a.arc(A.cx,A.cy,R,po(A.y01,A.x01),po(A.y11,A.x11),!v),a.arc(0,0,f,po(A.cy+A.y11,A.cx+A.x11),po(L.cy+L.y11,L.cx+L.x11),v),a.arc(L.cx,L.cy,R,po(L.y11,L.x11),po(L.y01,L.x01),!v))):a.arc(0,0,f,S,_,v)}if(a.closePath(),u)return a=null,u+""||null}return c.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+r.apply(this,arguments)+ +i.apply(this,arguments))/2-$a/2;return[ms(d)*u,Qo(d)*u]},c.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:kt(+u),c):t},c.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:kt(+u),c):e},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:kt(+u),c):n},c.padRadius=function(u){return arguments.length?(o=u==null?null:typeof u=="function"?u:kt(+u),c):o},c.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:kt(+u),c):r},c.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:kt(+u),c):i},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:kt(+u),c):s},c.context=function(u){return arguments.length?(a=u??null,c):a},c}function mm(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function iA(t){this._context=t}iA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function uu(t){return new iA(t)}function sA(t){return t[0]}function aA(t){return t[1]}function bi(t,e){var n=kt(!0),o=null,r=uu,i=null,s=pm(a);t=typeof t=="function"?t:t===void 0?sA:kt(t),e=typeof e=="function"?e:e===void 0?aA:kt(e);function a(l){var c,u=(l=mm(l)).length,d,f=!1,h;for(o==null&&(i=r(h=s())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+t(d,c,l),+e(d,c,l));if(h)return i=null,h+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:kt(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:kt(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:kt(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,o!=null&&(i=r(o)),a):r},a.context=function(l){return arguments.length?(l==null?o=i=null:i=r(o=l),a):o},a}function Fs(t,e,n){var o=null,r=kt(!0),i=null,s=uu,a=null,l=pm(c);t=typeof t=="function"?t:t===void 0?sA:kt(+t),e=typeof e=="function"?e:kt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?aA:kt(+n);function c(d){var f,h,g,b=(d=mm(d)).length,m,v=!1,y,x=new Array(b),_=new Array(b);for(i==null&&(a=s(y=l())),f=0;f<=b;++f){if(!(f<b&&r(m=d[f],f,d))===v)if(v=!v)h=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=f-1;g>=h;--g)a.point(x[g],_[g]);a.lineEnd(),a.areaEnd()}v&&(x[f]=+t(m,f,d),_[f]=+e(m,f,d),a.point(o?+o(m,f,d):x[f],n?+n(m,f,d):_[f]))}if(y)return a=null,y+""||null}function u(){return bi().defined(r).curve(s).context(i)}return c.x=function(d){return arguments.length?(t=typeof d=="function"?d:kt(+d),o=null,c):t},c.x0=function(d){return arguments.length?(t=typeof d=="function"?d:kt(+d),c):t},c.x1=function(d){return arguments.length?(o=d==null?null:typeof d=="function"?d:kt(+d),c):o},c.y=function(d){return arguments.length?(e=typeof d=="function"?d:kt(+d),n=null,c):e},c.y0=function(d){return arguments.length?(e=typeof d=="function"?d:kt(+d),c):e},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:kt(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(o).y(e)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:kt(!!d),c):r},c.curve=function(d){return arguments.length?(s=d,i!=null&&(a=s(i)),c):s},c.context=function(d){return arguments.length?(d==null?i=a=null:a=s(i=d),c):i},c}function GX(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function qX(t){return t}function YX(){var t=qX,e=GX,n=null,o=kt(0),r=kt(ba),i=kt(0);function s(a){var l,c=(a=mm(a)).length,u,d,f=0,h=new Array(c),g=new Array(c),b=+o.apply(this,arguments),m=Math.min(ba,Math.max(-ba,r.apply(this,arguments)-b)),v,y=Math.min(Math.abs(m)/c,i.apply(this,arguments)),x=y*(m<0?-1:1),_;for(l=0;l<c;++l)(_=g[h[l]=l]=+t(a[l],l,a))>0&&(f+=_);for(e!=null?h.sort(function(S,E){return e(g[S],g[E])}):n!=null&&h.sort(function(S,E){return n(a[S],a[E])}),l=0,d=f?(m-c*x)/f:0;l<c;++l,b=v)u=h[l],_=g[u],v=b+(_>0?_*d:0)+x,g[u]={data:a[u],index:l,value:_,startAngle:b,endAngle:v,padAngle:y};return g}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:kt(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(o=typeof a=="function"?a:kt(+a),s):o},s.endAngle=function(a){return arguments.length?(r=typeof a=="function"?a:kt(+a),s):r},s.padAngle=function(a){return arguments.length?(i=typeof a=="function"?a:kt(+a),s):i},s}const Ry={draw(t,e){const n=To(e/$a);t.moveTo(n,0),t.arc(0,0,n,0,ba)}},jX={draw(t,e){const n=To(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},lA=To(1/3),XX=lA*2,KX={draw(t,e){const n=To(e/XX),o=n*lA;t.moveTo(0,-n),t.lineTo(o,0),t.lineTo(0,n),t.lineTo(-o,0),t.closePath()}},ZX={draw(t,e){const n=To(e),o=-n/2;t.rect(o,o,n,n)}},QX=.8908130915292852,cA=Qo($a/10)/Qo(7*$a/10),JX=Qo(ba/10)*cA,eK=-ms(ba/10)*cA,tK={draw(t,e){const n=To(e*QX),o=JX*n,r=eK*n;t.moveTo(0,-n),t.lineTo(o,r);for(let i=1;i<5;++i){const s=ba*i/5,a=ms(s),l=Qo(s);t.lineTo(l*n,-a*n),t.lineTo(a*o-l*r,l*o+a*r)}t.closePath()}},Yg=To(3),uA={draw(t,e){const n=-To(e/(Yg*3));t.moveTo(0,n*2),t.lineTo(-Yg*n,-n),t.lineTo(Yg*n,-n),t.closePath()}},nK=To(3),oK={draw(t,e){const n=To(e)*.6824,o=n/2,r=n*nK/2;t.moveTo(0,-n),t.lineTo(r,o),t.lineTo(-r,o),t.closePath()}};function rK(t,e){let n=null,o=pm(r);t=typeof t=="function"?t:kt(t||Ry),e=typeof e=="function"?e:kt(e===void 0?64:+e);function r(){let i;if(n||(n=i=o()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(t=typeof i=="function"?i:kt(i),r):t},r.size=function(i){return arguments.length?(e=typeof i=="function"?i:kt(+i),r):e},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function l8(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function dA(t){this._context=t}dA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:l8(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:l8(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function iK(t){return new dA(t)}function c8(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Fy(t,e){this._context=t,this._k=(1-e)/6}Fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:c8(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:c8(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const sK=(function t(e){function n(o){return new Fy(o,e)}return n.tension=function(o){return t(+o)},n})(0);function aK(t,e,n){var o=t._x1,r=t._y1,i=t._x2,s=t._y2;if(t._l01_a>mo){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);o=(o*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>mo){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(o,r,i,s,t._x2,t._y2)}function fA(t,e){this._context=t,this._alpha=e}fA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,o=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:aK(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const lK=(function t(e){function n(o){return e?new fA(o,e):new Fy(o,0)}return n.alpha=function(o){return t(+o)},n})(.5);function u8(t){return t<0?-1:1}function d8(t,e,n){var o=t._x1-t._x0,r=e-t._x1,i=(t._y1-t._y0)/(o||r<0&&-0),s=(n-t._y1)/(r||o<0&&-0),a=(i*r+s*o)/(o+r);return(u8(i)+u8(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(a))||0}function f8(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function jg(t,e,n){var o=t._x0,r=t._y0,i=t._x1,s=t._y1,a=(i-o)/3;t._context.bezierCurveTo(o+a,r+a*e,i-a,s-a*n,i,s)}function Np(t){this._context=t}Np.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:jg(this,this._t0,f8(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,jg(this,f8(this,n=d8(this,t,e)),n);break;default:jg(this,this._t0,n=d8(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};Object.create(Np.prototype).point=function(t,e){Np.prototype.point.call(this,e,t)};function Vy(t){return new Np(t)}function gm(t,e){this._context=t,this._t=e}gm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function cK(t){return new gm(t,.5)}function uK(t){return new gm(t,0)}function dK(t){return new gm(t,1)}function Rp(t,e){if((s=t.length)>1)for(var n=1,o,r,i=t[e[0]],s,a=i.length;n<s;++n)for(r=i,i=t[e[n]],o=0;o<a;++o)i[o][1]+=i[o][0]=isNaN(r[o][1])?r[o][0]:r[o][1]}function Fp(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function fK(t,e){return t[e]}function hK(t){const e=[];return e.key=t,e}function hA(){var t=kt([]),e=Fp,n=Rp,o=fK;function r(i){var s=Array.from(t.apply(this,arguments),hK),a,l=s.length,c=-1,u;for(const d of i)for(a=0,++c;a<l;++a)(s[a][c]=[0,+o(d,s[a].key,c,i)]).data=d;for(a=0,u=mm(e(s));a<l;++a)s[u[a]].index=a;return n(s,u),s}return r.keys=function(i){return arguments.length?(t=typeof i=="function"?i:kt(Array.from(i)),r):t},r.value=function(i){return arguments.length?(o=typeof i=="function"?i:kt(+i),r):o},r.order=function(i){return arguments.length?(e=i==null?Fp:typeof i=="function"?i:kt(Array.from(i)),r):e},r.offset=function(i){return arguments.length?(n=i??Rp,r):n},r}function Ju(t,e,n){this.k=t,this.x=e,this.y=n}Ju.prototype={constructor:Ju,scale:function(t){return t===1?this:new Ju(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ju(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Ju.prototype;function T1(t,e){if(!t)throw new Error(`[d3-blueprint] ${e}`)}class pK{constructor(){qn(this,"properties",new Map)}define(e,n){T1(!this.properties.has(e),`config "${e}" is already defined`);const{defaultValue:o,getter:r,setter:i}=n,s=i?i(o):o;return this.properties.set(e,{value:s,getter:r,setter:i}),this}get(e){const n=this.getProperty(e),{value:o,getter:r}=n;return r?r(o):o}set(e,n){const o=this.getProperty(e);return o.value=o.setter?o.setter(n):n,this}setBatch(e){for(const[n,o]of Object.entries(e))this.set(n,o);return this}getAll(){const e={};for(const[n]of this.properties)e[n]=this.get(n);return e}has(e){return this.properties.has(e)}getProperty(e){const n=this.properties.get(e);return T1(n,`config "${e}" is not defined`),n}}const M1=["update","enter","merge","exit"],pA=new Set([...M1,...M1.map(t=>`${t}:transition`)]);function mK(t){return pA.has(t)}function h8(t){T1(mK(t),`"${t}" is not a valid lifecycle event. Expected one of: ${[...pA].join(", ")}`)}function gK(t,e,n){const o=t.exit(),r={update:t,enter:e,merge:e.merge(t),exit:o};return M1.map(i=>{const s=r[i],a=n.get(i)??[],l=n.get(`${i}:transition`)??[];return{name:i,selection:s,handlers:a,transitionHandlers:l}})}function vK(t,e){for(const n of e)n(t)}function bK(t,e){return e.map(n=>{const o=t.transition();return n(o),yK(o)})}function yK(t){return t.end().then(()=>{},()=>{})}class xK{constructor(e,n){qn(this,"base");qn(this,"dataBindFn");qn(this,"insertFn");qn(this,"handlers",new Map);if(this.base=e,this.dataBindFn=n.dataBind,this.insertFn=n.insert,n.events)for(const[o,r]of Object.entries(n.events))r&&this.on(o,r)}on(e,n){h8(e);const o=this.handlers.get(e)??[];return o.push(n),this.handlers.set(e,o),this}off(e,n){if(h8(e),!n)return this.handlers.delete(e),this;const o=this.handlers.get(e);if(o){const r=o.indexOf(n);r!==-1&&o.splice(r,1)}return this}draw(e){const n=this.dataBindFn(this.base,e),o=n.enter(),r=this.insertFn(o),i=gK(n,r,this.handlers),s=[];for(const a of i){vK(a.selection,a.handlers);const l=bK(a.selection,a.transitionHandlers);s.push(...l)}return Promise.all(s).then(()=>{})}}function wK(t,e,n,o){if(n&&o){const i=new xK(n,o);return t.set(e,i),i}const r=t.get(e);if(!r)throw new Error(`[d3-blueprint] layer "${e}" is not defined`);return r}function _K(t,e,n,o){return typeof n=="string"&&o===void 0?t.get(n):typeof n=="string"?(t.set(n,o),e):(t.setBatch(n),e)}function SK(t,e){const n=[];for(const o of t.values())n.push(o.draw(e));return n}function kK(t,e){const n=[];for(const o of t.values()){const r=o.draw(e);r&&n.push(r)}return n}const CK=["preDraw","postDraw","postTransition"];class ao{constructor(e){qn(this,"base");qn(this,"layers",new Map);qn(this,"attachments",new Map);qn(this,"configs",new pK);qn(this,"dispatcher");qn(this,"attached",new Proxy({},{get:(e,n)=>{const o=this.attachments.get(n);if(!o)throw new Error(`[d3-blueprint] attachment "${n}" is not defined`);return o},has:(e,n)=>this.attachments.has(n)}));this.base=e,this.dispatcher=My(...CK),this.initialize()}initialize(){}transform(e){return e}preDraw(e){}postDraw(e){}postTransition(e){}layer(e,n,o){return wK(this.layers,e,n,o)}attach(e,n,o){if(o!==void 0){const r=n;this.attachments.set(e,new r(o))}else this.attachments.set(e,n);return this}config(e,n){return _K(this.configs,this,e,n)}configDefine(e,n){return this.configs.define(e,n),this}on(e,n){return this.dispatcher.on(e,n),this}off(e){return this.dispatcher.on(e,null),this}use(e,n){const o=n||e.name||"plugin";if(e.install(this),e.preDraw&&this.on(`preDraw.${o}`,r=>e.preDraw(this,r)),e.postDraw&&this.on(`postDraw.${o}`,r=>e.postDraw(this,r)),e.postTransition&&this.on(`postTransition.${o}`,r=>e.postTransition(this,r)),e.destroy){const r=this.destroy.bind(this);this.destroy=()=>{e.destroy(this),r()}}return this}async draw(e){const n=this.transform(e);this.preDraw(n),this.dispatcher.call("preDraw",this,n);const o=SK(this.layers,n),r=kK(this.attachments,n);this.postDraw(n),this.dispatcher.call("postDraw",this,n),await Promise.all([...o,...r]),this.postTransition(n),this.dispatcher.call("postTransition",this,n)}destroy(){this.layers.clear(),this.attachments.clear()}}class AK extends ao{initialize(){const e=this.base.append("div").attr("class","bc-frame"),n=e.append("div").attr("class","bc-frame-header");e.append("div").attr("class","bc-frame-body"),e.append("p").attr("class","bc-frame-note");const o=e.append("div").attr("class","bc-frame-footer").style("display","flex").style("justify-content","space-between").style("align-items","center").style("flex-wrap","wrap").style("gap","0.25rem 1rem"),r=o.append("div").attr("class","bc-frame-footer-left").style("display","flex").style("flex-wrap","wrap").style("gap","0.25rem 0.75rem"),i=o.append("div").attr("class","bc-frame-footer-right").style("display","flex").style("align-items","center");this.layer("headerItems",n,{dataBind:(s,a)=>s.selectAll(".bc-frame-header-item").data(a.headerItems,l=>l.className),insert:s=>s.append(a=>document.createElement(a.tag)),events:{enter:s=>{s.attr("class",a=>a.className).text(a=>a.text)},merge:s=>{s.attr("class",a=>a.className).text(a=>a.text)},exit:s=>{s.remove()}}}),this.layer("footerLeftItems",r,{dataBind:(s,a)=>s.selectAll(".bc-frame-footer-item").data(a.footerLeftItems,l=>l.className),insert:s=>s.append(a=>document.createElement(a.tag)),events:{enter:s=>{s.attr("class",a=>a.className).each(function(a){if(this.textContent="",a.prefix){const l=document.createElement("span");l.className="bc-frame-source-prefix",l.textContent=a.prefix,this.appendChild(l)}if(a.href){const l=document.createElement("a");l.className="bc-frame-source-link",l.href=a.href,l.textContent=a.text,this.appendChild(l)}else this.appendChild(document.createTextNode(a.text))})},merge:s=>{s.attr("class",a=>a.className).each(function(a){if(this.textContent="",a.prefix){const l=document.createElement("span");l.className="bc-frame-source-prefix",l.textContent=a.prefix,this.appendChild(l)}if(a.href){const l=document.createElement("a");l.className="bc-frame-source-link",l.href=a.href,l.textContent=a.text,this.appendChild(l)}else this.appendChild(document.createTextNode(a.text))})},exit:s=>{s.remove()}}}),this.layer("footerRightItems",i,{dataBind:(s,a)=>s.selectAll(".bc-frame-footer-item").data(a.footerRightItems,l=>l.className),insert:s=>s.append(a=>document.createElement(a.tag)),events:{enter:s=>{s.attr("class",a=>a.className).each(function(a){if(a.html){const c=document.createRange().createContextualFragment(a.html);this.appendChild(c)}else this.textContent=a.text}),s.filter(a=>!!a.href).attr("href",a=>a.href)},merge:s=>{s.attr("class",a=>a.className).each(function(a){if(this.textContent="",a.html){const c=document.createRange().createContextualFragment(a.html);this.appendChild(c)}else this.textContent=a.text}),s.filter(a=>!!a.href).attr("href",a=>a.href)},exit:s=>{s.remove()}}})}}function $K(t){const e=[];return t.title&&e.push({tag:"h3",className:"bc-frame-title",text:t.title}),t.description&&e.push({tag:"p",className:"bc-frame-description",text:t.description}),e}function TK(t){const e=[];return t.byline&&e.push({tag:"span",className:"bc-frame-byline",text:t.byline}),t.source&&e.push({tag:"span",className:"bc-frame-source",text:t.source,prefix:"Source: ",href:t.sourceUrl||void 0}),e}const MK='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48.042969 90.607422" width="10" height="18" style="vertical-align:-3px;margin-right:3px"><path fill="currentColor" opacity="0.55" d="M 20.042969 34.607422 A 28 28 0 0 1 23.072266 34.779297 A 28 28 0 0 0 20.042969 34.607422 z M 23.34375 34.810547 A 28 28 0 0 1 26.171875 35.292969 A 28 28 0 0 0 23.34375 34.810547 z M 16.570312 34.84375 A 28 28 0 0 0 15.474609 35.033203 A 28 28 0 0 1 16.570312 34.84375 z M 26.390625 35.341797 A 28 28 0 0 1 29.316406 36.189453 A 28 28 0 0 0 26.390625 35.341797 z M 13.128906 35.511719 A 28 28 0 0 0 11.904297 35.873047 A 28 28 0 0 1 13.128906 35.511719 z M 29.373047 36.210938 A 28 28 0 0 1 32.103516 37.347656 A 28 28 0 0 0 29.373047 36.210938 z M 9.7832031 36.609375 A 28 28 0 0 0 8.5820312 37.117188 A 28 28 0 0 1 9.7832031 36.609375 z M 32.392578 37.486328 A 28 28 0 0 1 34.939453 38.90625 A 28 28 0 0 0 32.392578 37.486328 z M 6.5742188 38.128906 A 28 28 0 0 0 5.4511719 38.765625 A 28 28 0 0 1 6.5742188 38.128906 z M 35.041016 38.966797 A 28 28 0 0 1 37.523438 40.738281 A 28 28 0 0 0 35.041016 38.966797 z M 3.5273438 40.080078 A 28 28 0 0 0 2.5761719 40.771484 A 28 28 0 0 1 3.5273438 40.080078 z M 37.658203 40.851562 A 28 28 0 0 1 39.804688 42.783203 A 28 28 0 0 0 37.658203 40.851562 z M 40.011719 42.990234 A 28 28 0 0 1 42.013672 45.251953 A 28 28 0 0 0 40.011719 42.990234 z M 42.013672 45.251953 A 28 28 0 0 1 20.042969 56 A 28 28 0 0 1 14.232422 55.3125 A 16 16 0 0 1 16 62.607422 A 16 16 0 0 1 0 78.607422 L 0 82.121094 A 28 28 0 0 0 20.042969 90.607422 A 28 28 0 0 0 48.042969 62.607422 A 28 28 0 0 0 42.013672 45.251953 z M 1.3007812 46.667969 A 16 16 0 0 1 1.6191406 46.697266 A 16 16 0 0 0 1.3007812 46.667969 z M 4.2558594 47.189453 A 16 16 0 0 1 4.4355469 47.242188 A 16 16 0 0 0 4.2558594 47.189453 z "/><path fill="currentColor" opacity="0.85" d="M 6.0637516 38.376047 A 28 28 0 0 1 20.042969 34.615234 A 28 28 0 0 1 42.013672 45.259765 A 28 28 0 0 0 48.042969 28.007812 A 28 28 0 0 0 20.042969 0.0078125 A 28 28 0 0 0 0 8.4941407 L 0 16.007812 A 12 12 0 0 1 12 28.007812 A 12 12 0 0 1 6.0613693 38.364443 "/><path fill="currentColor" d="M 20.042969 34.607422 A 28 28 0 0 0 5.0878906 38.970703 A 28 28 0 0 1 6.0644531 38.376953 L 6.0605469 38.365234 A 12 12 0 0 1 0 40.007812 L 0 43.09375 L 0 43.101562 L 0 46.607422 A 16 16 0 0 1 2.8847656 46.873047 A 16 16 0 0 1 2.9199219 46.878906 A 16 16 0 0 1 5.7011719 47.662109 A 16 16 0 0 1 5.7324219 47.673828 A 16 16 0 0 1 8.3300781 48.955078 A 16 16 0 0 1 8.3398438 48.958984 A 16 16 0 0 1 8.3457031 48.962891 A 16 16 0 0 1 10.662109 50.6875 A 16 16 0 0 1 10.697266 50.71875 A 16 16 0 0 1 12.660156 52.837891 A 16 16 0 0 1 12.667969 52.845703 A 16 16 0 0 1 12.673828 52.855469 A 16 16 0 0 1 14.228516 55.306641 A 16 16 0 0 1 14.232422 55.3125 A 28 28 0 0 0 20.042969 56 A 28 28 0 0 0 42.013672 45.251953 A 28 28 0 0 0 20.042969 34.607422 z M 4.7695312 39.177734 A 28 28 0 0 0 2.5390625 40.798828 A 28 28 0 0 1 4.7695312 39.177734 z M 2.1816406 41.091797 A 28 28 0 0 0 0.11914062 42.984375 A 28 28 0 0 1 2.1816406 41.091797 z "/></svg>';function OK(t){return t.showCredit===!1?[]:[{tag:"span",className:"bc-frame-credit",text:"Blueprint Chart",html:MK+"Blueprint Chart"}]}function Wr(t,e){if(e===null)return{wrapper:t,header:t,body:t,footer:t};const n=e??{};new AK(we(t)).draw({headerItems:$K(n),footerLeftItems:TK(n),footerRightItems:OK(n)});const r=t.querySelector(".bc-frame"),i=r.querySelector(".bc-frame-header"),s=r.querySelector(".bc-frame-body"),a=r.querySelector(".bc-frame-note"),l=r.querySelector(".bc-frame-footer");if(n.padding&&r.style.setProperty("--bc-frame-padding",n.padding),n.transparentBackground&&r.style.setProperty("--bc-frame-bg","transparent"),n.note?a.textContent=n.note:a.style.display="none",t.isConnected){const c=getComputedStyle(t),u=c.aspectRatio&&c.aspectRatio!=="auto"&&c.aspectRatio!=="",d=c.display==="flex"&&c.flexDirection==="column";if(u||d){const f=i.offsetHeight,h=l.offsetHeight,g=a.style.display!=="none"?a.offsetHeight:0;r.classList.add("bc-frame--constrained");const b=t.__bcHeaderH??0,m=t.__bcFooterH??0,v=Math.max(f,b),y=Math.max(h+g,m);s.dataset.headerH=String(v),s.dataset.footerH=String(y),t.__bcHeaderH=v,requestAnimationFrame(()=>{t.__bcFooterH=Math.max(l.offsetHeight+g,y)})}}return{wrapper:r,header:i,body:s,footer:l}}function p8(t){return t&&(t.startsWith("(")&&t.endsWith(")")?t.slice(0,-1):t)}function BK(t){if(!t)return{prefix:"",d3Spec:"",suffix:""};if(t.includes("|")){const e=t.split("|");return{prefix:e[0]??"",d3Spec:p8(e[1]??""),suffix:e[2]??""}}return{prefix:"",d3Spec:p8(t),suffix:""}}function Ta(t){if(!t)return null;const{prefix:e,d3Spec:n,suffix:o}=BK(t);if(!n)return null;const r=cu(n);return!e&&!o?r:i=>`${e}${r(i)}${o}`}function ki(t,e){if(!t)return;const n=t.stableTop??t.top,o=e.stableTop??e.top;return{dx:t.left-e.left,dy:n-o}}const LK={top:12,right:20,bottom:24,left:50},mA=600,gA=400;class PK extends ao{initialize(){this.configDefine("totalWidth",{defaultValue:mA}),this.configDefine("totalHeight",{defaultValue:gA}),this.layer("svg",this.base,{dataBind:(e,n)=>e.selectAll("svg").data(n),insert:e=>e.append("svg"),events:{enter:e=>{const n=this.config("totalWidth"),o=this.config("totalHeight");e.attr("width",n).attr("height",o).append("g").attr("transform",r=>`translate(${r.left},${r.top})`)}}})}}const DK=400,Vp=2,zp=9;function ql(t,e,n,o){const r=Math.min(0,...t),i=Math.max(0,...t),s=(e==null?void 0:e.min)??r,a=(e==null?void 0:e.max)??i,l=o==="log"?Va().domain([s,a]).nice():bn().domain([s,a]).nice(),c=l.ticks(),u=n?Ta(n)??l.tickFormat():l.tickFormat(),d=c.map(h=>u(h));if(d.length===0)return 0;try{const g=document.createElement("canvas").getContext("2d");if(g){g.font="10px sans-serif";let b=0;for(const m of d){const v=g.measureText(m).width;v>b&&(b=v)}return Math.ceil(b)+Vp+zp}}catch{}return Math.max(...d.map(h=>h.length))*6+Vp+zp}function vm(t){if(t.length===0)return 0;try{const o=document.createElement("canvas").getContext("2d");if(o){o.font="10px sans-serif";let r=0;for(const i of t){const s=o.measureText(i).width;s>r&&(r=s)}return Math.ceil(r)+Vp+zp}}catch{}return Math.max(...t.map(n=>n.length))*6+Vp+zp}function Ci(t,e,n,o,r,i){const s={},a=r??50,l=o??"left",c=e??"auto",u=c==="auto"?t>0&&t<DK?"inside":"outside":c,d=u==="inside",f=u==="off";return l==="right"?(s.left=0,d||f?s.right=0:s.right=a):(s.right=i!==!1?15:0,d||f?s.left=0:s.left=a),d&&(s.top=35),(i===!1||n==="inside"||n==="off")&&(s.bottom=5),s}function lr(t){const e=t.getBoundingClientRect(),n=getComputedStyle(t);return{width:e.width-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),height:e.height-(parseFloat(n.paddingTop)||0)-(parseFloat(n.paddingBottom)||0)}}function Ur(t,e){const n={...LK,...e},o=t.closest(".bc-frame--constrained")!=null;if(o){const f=parseFloat(t.dataset.headerH||"0"),h=parseFloat(t.dataset.footerH||"0"),g=n.top;n.top=f+g,n.bottom+=h,n.stableTop=g}const r=lr(t),i=r.width>0?r.width:mA,s=r.height>0?r.height:gA,a=i-n.left-n.right,l=s-n.top-n.bottom,c=new PK(we(t));c.config({totalWidth:i,totalHeight:s}),c.draw([n]);const u=t.querySelector("svg"),d=u.querySelector("g");return o&&(u.setAttribute("viewBox",`0 0 ${i} ${s}`),u.setAttribute("preserveAspectRatio","none"),u.removeAttribute("width"),u.removeAttribute("height"),u.style.width="100%",u.style.height="100%",u.style.display="block"),{svg:u,chartArea:d,width:a,height:l,margin:n}}function Yl(t){return typeof window>"u"||typeof window.matchMedia!="function"?t:window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:t}const du=500;let vA=0;function Gr(t){vA=t?du:0}function ut(){return Yl(vA)}function jn(t,e,n,o){if(e.length===0)return;if(n===0&&o===0){e.forEach(s=>t.appendChild(s));return}const r=document.createElementNS("http://www.w3.org/2000/svg","g");r.setAttribute("transform",`translate(${n},${o})`),e.forEach(s=>r.appendChild(s)),t.appendChild(r);const i=ut();if(i>0)we(r).transition().duration(i).attrTween("transform",()=>{const s=no(n,0),a=no(o,0);return l=>`translate(${s(l)},${a(l)})`}).on("end",()=>{for(;r.firstChild;)t.appendChild(r.firstChild);r.remove()});else{for(;r.firstChild;)t.appendChild(r.firstChild);r.remove()}}function Ar(t,e){const n=Yl(du);n<=0||typeof t.animate!="function"||t.animate([{opacity:0},{opacity:1}],{duration:n,easing:"ease-in-out"})}function $r(t,e){if(Yl(du)<=0||t.children.length===0)return null;const o=document.createElement("div");return o.style.position="absolute",o.style.inset="0",o.style.pointerEvents="none",o.dataset.bcFadeOverlay="true",Array.from(t.childNodes).forEach(r=>{o.appendChild(r.cloneNode(!0))}),o.querySelectorAll(".bc-axis-vertical, .bc-axis-horizontal").forEach(r=>{r.remove()}),o.querySelectorAll(".bc-frame-footer, .bc-frame-note").forEach(r=>{r.remove()}),o.querySelectorAll(".bc-frame").forEach(r=>{r.classList.remove("bc-frame"),r.classList.add("bc-frame--fade-snapshot")}),o}function Tr(t,e,n){const o=Yl(du);if(getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.appendChild(e),o>0&&typeof e.animate=="function"){const i=e.animate([{opacity:1},{opacity:0}],{duration:o,easing:"ease-in-out"});i.onfinish=()=>e.remove()}else e.remove()}const m8=30;class EK extends ao{initialize(){this.configDefine("scale",{defaultValue:bn()}),this.configDefine("direction",{defaultValue:Jr.Left}),this.configDefine("showAxis",{defaultValue:!0}),this.configDefine("showTicks",{defaultValue:!1}),this.configDefine("gridStyle",{defaultValue:Hn.Dashed}),this.configDefine("gridWidth",{defaultValue:0}),this.configDefine("height",{defaultValue:0}),this.configDefine("ticks",{defaultValue:null}),this.configDefine("numberFormat",{defaultValue:null}),this.configDefine("labelPosition",{defaultValue:sn.Auto}),this.configDefine("topPadding",{defaultValue:0}),this.configDefine("tickFormat",{defaultValue:null});const e=this.base.append("g");this.layer("axis",e,{dataBind:(n,o)=>n.selectAll(".bc-axis-vertical").data(o),insert:n=>n.append("g").attr("class","bc-axis bc-axis-vertical"),events:{"merge:transition":n=>{const o=this.config("scale"),r=this.config("direction"),i=this.config("showAxis"),s=this.config("showTicks"),a=this.config("labelPosition"),l=this.config("gridWidth"),c=this.config("height"),u=r===Jr.Right?F_(o):V_(o);s||u.tickSizeOuter(0);const d=this.config("ticks");if(d)u.tickValues(d);else if(c>0){const b=Math.max(2,Math.floor(c/m8));u.ticks(b)}const f=this.config("tickFormat");if(f)u.tickFormat(f);else{const b=this.config("numberFormat"),m=b?Ta(b):null;m&&u.tickFormat(m)}const h=ut(),g=n.node();if(g){h>0?n.duration(h).call(u):we(g).call(u),i||we(g).select(".domain").remove(),s||we(g).selectAll(".tick line").attr("opacity",0);const m=a===sn.Auto?l>0&&l<400?sn.Inside:sn.Outside:a;if(m===sn.Inside){const v=i?4:0;r===Jr.Right?we(g).selectAll(".tick text").attr("x",-v).attr("dy","-0.4em").attr("text-anchor","end"):we(g).selectAll(".tick text").attr("x",v).attr("dy","-0.4em").attr("text-anchor","start")}else m===sn.Off&&we(g).selectAll(".tick text").attr("opacity",0)}},exit:n=>{n.remove()},enter:n=>{const o=this.config("scale"),r=this.config("direction"),i=this.config("labelPosition"),s=this.config("gridWidth"),a=this.config("height"),l=this.config("topPadding"),c=r===Jr.Right?F_(o):V_(o);this.config("showTicks")||c.tickSizeOuter(0);const u=this.config("ticks");if(u)c.tickValues(u);else if(a>0){const m=Math.max(2,Math.floor(a/m8));c.ticks(m)}const d=this.config("tickFormat");if(d)c.tickFormat(d);else{const m=this.config("numberFormat"),v=m?Ta(m):null;v&&c.tickFormat(v)}n.call(c);const f=this.config("showAxis"),h=this.config("showTicks");f||n.select(".domain").remove();const b=i===sn.Auto?s>0&&s<400?sn.Inside:sn.Outside:i;if(b===sn.Inside){const m=f?4:0;if(r===Jr.Right?n.selectAll(".tick text").attr("x",-m).attr("dy","-0.4em").attr("text-anchor","end"):n.selectAll(".tick text").attr("x",m).attr("dy","-0.4em").attr("text-anchor","start"),h?n.selectAll(".tick line").attr("x2",r===Jr.Right?-6:6):n.selectAll(".tick line").remove(),l>0&&f){const v=n.select(".domain");if(!v.empty()){const y=v.attr("d"),x=y.replace(/V[\d.]+/,`V${-l}`);x!==y&&v.attr("d",x)}}}else h||n.selectAll(".tick line").remove(),b===sn.Off&&n.selectAll(".tick text").remove()}}})}postDraw(){const e=this.config("gridStyle"),n=this.config("gridWidth"),o=this.config("direction"),r=this.base.select(".bc-axis-vertical").node();if(r&&e!==Hn.None&&n>0){const i=o===Jr.Right?-n:n;IK(r,e,i)}}}function IK(t,e,n){var a;const o=((a=t.ownerSVGElement)==null?void 0:a.parentElement)??document.documentElement,i=getComputedStyle(o).getPropertyValue("--bc-grid-color").trim()||"#ccc";we(t).selectAll(".tick").each(function(){const c=we(this).append("line").attr("class","bc-grid-line").attr("x1",0).attr("x2",n).attr("y1",0).attr("y2",0).attr("stroke",i).attr("stroke-width",1);e===Hn.Dashed?c.attr("stroke-dasharray","4,4"):e===Hn.Dotted&&c.attr("stroke-dasharray","1,3")})}function bA(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wh={exports:{}},NK=Wh.exports,g8;function RK(){return g8||(g8=1,(function(t,e){(function(n,o){t.exports=o()})(NK,(function(){var n=1e3,o=6e4,r=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",g="date",b="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var B=["th","st","nd","rd"],F=L%100;return"["+L+(B[(F-20)%10]||B[F]||B[0])+"]"}},x=function(L,B,F){var z=String(L);return!z||z.length>=B?L:""+Array(B+1-z.length).join(F)+L},_={s:x,z:function(L){var B=-L.utcOffset(),F=Math.abs(B),z=Math.floor(F/60),V=F%60;return(B<=0?"+":"-")+x(z,2,"0")+":"+x(V,2,"0")},m:function L(B,F){if(B.date()<F.date())return-L(F,B);var z=12*(F.year()-B.year())+(F.month()-B.month()),V=B.clone().add(z,d),U=F-V<0,ie=B.clone().add(z+(U?-1:1),d);return+(-(z+(F-V)/(U?V-ie:ie-V))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:d,y:h,w:u,d:c,D:g,h:l,m:a,s,ms:i,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},S="en",E={};E[S]=y;var M="$isDayjsObject",C=function(L){return L instanceof $||!(!L||!L[M])},O=function L(B,F,z){var V;if(!B)return S;if(typeof B=="string"){var U=B.toLowerCase();E[U]&&(V=U),F&&(E[U]=F,V=U);var ie=B.split("-");if(!V&&ie.length>1)return L(ie[0])}else{var ue=B.name;E[ue]=B,V=ue}return!z&&V&&(S=V),V||!z&&S},P=function(L,B){if(C(L))return L.clone();var F=typeof B=="object"?B:{};return F.date=L,F.args=arguments,new $(F)},R=_;R.l=O,R.i=C,R.w=function(L,B){return P(L,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var $=(function(){function L(F){this.$L=O(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[M]=!0}var B=L.prototype;return B.parse=function(F){this.$d=(function(z){var V=z.date,U=z.utc;if(V===null)return new Date(NaN);if(R.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var ie=V.match(m);if(ie){var ue=ie[2]-1||0,fe=(ie[7]||"0").substring(0,3);return U?new Date(Date.UTC(ie[1],ue,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,fe)):new Date(ie[1],ue,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,fe)}}return new Date(V)})(F),this.init()},B.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},B.$utils=function(){return R},B.isValid=function(){return this.$d.toString()!==b},B.isSame=function(F,z){var V=P(F);return this.startOf(z)<=V&&V<=this.endOf(z)},B.isAfter=function(F,z){return P(F)<this.startOf(z)},B.isBefore=function(F,z){return this.endOf(z)<P(F)},B.$g=function(F,z,V){return R.u(F)?this[z]:this.set(V,F)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(F,z){var V=this,U=!!R.u(z)||z,ie=R.p(F),ue=function(ne,me){var ve=R.w(V.$u?Date.UTC(V.$y,me,ne):new Date(V.$y,me,ne),V);return U?ve:ve.endOf(c)},fe=function(ne,me){return R.w(V.toDate()[ne].apply(V.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(me)),V)},he=this.$W,ce=this.$M,de=this.$D,_e="set"+(this.$u?"UTC":"");switch(ie){case h:return U?ue(1,0):ue(31,11);case d:return U?ue(1,ce):ue(0,ce+1);case u:var j=this.$locale().weekStart||0,te=(he<j?he+7:he)-j;return ue(U?de-te:de+(6-te),ce);case c:case g:return fe(_e+"Hours",0);case l:return fe(_e+"Minutes",1);case a:return fe(_e+"Seconds",2);case s:return fe(_e+"Milliseconds",3);default:return this.clone()}},B.endOf=function(F){return this.startOf(F,!1)},B.$set=function(F,z){var V,U=R.p(F),ie="set"+(this.$u?"UTC":""),ue=(V={},V[c]=ie+"Date",V[g]=ie+"Date",V[d]=ie+"Month",V[h]=ie+"FullYear",V[l]=ie+"Hours",V[a]=ie+"Minutes",V[s]=ie+"Seconds",V[i]=ie+"Milliseconds",V)[U],fe=U===c?this.$D+(z-this.$W):z;if(U===d||U===h){var he=this.clone().set(g,1);he.$d[ue](fe),he.init(),this.$d=he.set(g,Math.min(this.$D,he.daysInMonth())).$d}else ue&&this.$d[ue](fe);return this.init(),this},B.set=function(F,z){return this.clone().$set(F,z)},B.get=function(F){return this[R.p(F)]()},B.add=function(F,z){var V,U=this;F=Number(F);var ie=R.p(z),ue=function(ce){var de=P(U);return R.w(de.date(de.date()+Math.round(ce*F)),U)};if(ie===d)return this.set(d,this.$M+F);if(ie===h)return this.set(h,this.$y+F);if(ie===c)return ue(1);if(ie===u)return ue(7);var fe=(V={},V[a]=o,V[l]=r,V[s]=n,V)[ie]||1,he=this.$d.getTime()+F*fe;return R.w(he,this)},B.subtract=function(F,z){return this.add(-1*F,z)},B.format=function(F){var z=this,V=this.$locale();if(!this.isValid())return V.invalidDate||b;var U=F||"YYYY-MM-DDTHH:mm:ssZ",ie=R.z(this),ue=this.$H,fe=this.$m,he=this.$M,ce=V.weekdays,de=V.months,_e=V.meridiem,j=function(me,ve,I,W){return me&&(me[ve]||me(z,U))||I[ve].slice(0,W)},te=function(me){return R.s(ue%12||12,me,"0")},ne=_e||function(me,ve,I){var W=me<12?"AM":"PM";return I?W.toLowerCase():W};return U.replace(v,(function(me,ve){return ve||(function(I){switch(I){case"YY":return String(z.$y).slice(-2);case"YYYY":return R.s(z.$y,4,"0");case"M":return he+1;case"MM":return R.s(he+1,2,"0");case"MMM":return j(V.monthsShort,he,de,3);case"MMMM":return j(de,he);case"D":return z.$D;case"DD":return R.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return j(V.weekdaysMin,z.$W,ce,2);case"ddd":return j(V.weekdaysShort,z.$W,ce,3);case"dddd":return ce[z.$W];case"H":return String(ue);case"HH":return R.s(ue,2,"0");case"h":return te(1);case"hh":return te(2);case"a":return ne(ue,fe,!0);case"A":return ne(ue,fe,!1);case"m":return String(fe);case"mm":return R.s(fe,2,"0");case"s":return String(z.$s);case"ss":return R.s(z.$s,2,"0");case"SSS":return R.s(z.$ms,3,"0");case"Z":return ie}return null})(me)||ie.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(F,z,V){var U,ie=this,ue=R.p(z),fe=P(F),he=(fe.utcOffset()-this.utcOffset())*o,ce=this-fe,de=function(){return R.m(ie,fe)};switch(ue){case h:U=de()/12;break;case d:U=de();break;case f:U=de()/3;break;case u:U=(ce-he)/6048e5;break;case c:U=(ce-he)/864e5;break;case l:U=ce/r;break;case a:U=ce/o;break;case s:U=ce/n;break;default:U=ce}return V?U:R.a(U)},B.daysInMonth=function(){return this.endOf(d).$D},B.$locale=function(){return E[this.$L]},B.locale=function(F,z){if(!F)return this.$L;var V=this.clone(),U=O(F,z,!0);return U&&(V.$L=U),V},B.clone=function(){return R.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},L})(),A=$.prototype;return P.prototype=A,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",h],["$D",g]].forEach((function(L){A[L[1]]=function(B){return this.$g(B,L[0],L[1])}})),P.extend=function(L,B){return L.$i||(L(B,$,P),L.$i=!0),P},P.locale=O,P.isDayjs=C,P.unix=function(L){return P(1e3*L)},P.en=E[S],P.Ls=E,P.p={},P}))})(Wh)),Wh.exports}var FK=RK();const Ac=bA(FK);var Uh={exports:{}},VK=Uh.exports,v8;function zK(){return v8||(v8=1,(function(t,e){(function(n,o){t.exports=o()})(VK,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(v){this[m]=+v}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=(function(v){if(!v||v==="Z")return 0;var y=v.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x})(m)}],f=function(m){var v=l[m];return v&&(v.indexOf?v:v.s.concat(v.f))},h=function(m,v){var y,x=l.meridiem;if(x){for(var _=1;_<=24;_+=1)if(m.indexOf(x(_,0,v))>-1){y=_>12;break}}else y=m===(v?"pm":"PM");return y},g={A:[a,function(m){this.afternoon=h(m,!1)}],a:[a,function(m){this.afternoon=h(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[i,u("day")],Do:[a,function(m){var v=l.ordinal,y=m.match(/\d+/);if(this.day=y[0],v)for(var x=1;x<=31;x+=1)v(x).replace(/\[|\]/g,"")===m&&(this.day=x)}],w:[s,u("week")],ww:[i,u("week")],M:[s,u("month")],MM:[i,u("month")],MMM:[a,function(m){var v=f("months"),y=(f("monthsShort")||v.map((function(x){return x.slice(0,3)}))).indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(m){var v=f("months").indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function b(m){var v,y;v=m,y=l&&l.formats;for(var x=(m=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(P,R,$){var A=$&&$.toUpperCase();return R||y[$]||n[$]||y[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(L,B,F){return B||F.slice(1)}))}))).match(o),_=x.length,S=0;S<_;S+=1){var E=x[S],M=g[E],C=M&&M[0],O=M&&M[1];x[S]=O?{regex:C,parser:O}:E.replace(/^\[|\]$/g,"")}return function(P){for(var R={},$=0,A=0;$<_;$+=1){var L=x[$];if(typeof L=="string")A+=L.length;else{var B=L.regex,F=L.parser,z=P.slice(A),V=B.exec(z)[0];F.call(R,V),P=P.replace(V,"")}}return(function(U){var ie=U.afternoon;if(ie!==void 0){var ue=U.hours;ie?ue<12&&(U.hours+=12):ue===12&&(U.hours=0),delete U.afternoon}})(R),R}}return function(m,v,y){y.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(c=m.parseTwoDigitYear);var x=v.prototype,_=x.parse;x.parse=function(S){var E=S.date,M=S.utc,C=S.args;this.$u=M;var O=C[1];if(typeof O=="string"){var P=C[2]===!0,R=C[3]===!0,$=P||R,A=C[2];R&&(A=C[2]),l=this.$locale(),!P&&A&&(l=y.Ls[A]),this.$d=(function(z,V,U,ie){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*z);var ue=b(V)(z),fe=ue.year,he=ue.month,ce=ue.day,de=ue.hours,_e=ue.minutes,j=ue.seconds,te=ue.milliseconds,ne=ue.zone,me=ue.week,ve=new Date,I=ce||(fe||he?1:ve.getDate()),W=fe||ve.getFullYear(),X=0;fe&&!he||(X=he>0?he-1:ve.getMonth());var ae,le=de||0,K=_e||0,oe=j||0,Z=te||0;return ne?new Date(Date.UTC(W,X,I,le,K,oe,Z+60*ne.offset*1e3)):U?new Date(Date.UTC(W,X,I,le,K,oe,Z)):(ae=new Date(W,X,I,le,K,oe,Z),me&&(ae=ie(ae).week(me).toDate()),ae)}catch{return new Date("")}})(E,O,M,y),this.init(),A&&A!==!0&&(this.$L=this.locale(A).$L),$&&E!=this.format(O)&&(this.$d=new Date("")),l={}}else if(O instanceof Array)for(var L=O.length,B=1;B<=L;B+=1){C[1]=O[B-1];var F=y.apply(this,C);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}B===L&&(this.$d=new Date(""))}else _.call(this,S)}}}))})(Uh)),Uh.exports}var HK=zK();const WK=bA(HK);Ac.extend(WK);const yA=["YYYY-MM-DDTHH:mm:ss","YYYY-MM-DD HH:mm","YYYY-MM-DD","YYYY/MM/DD","MM/DD/YYYY","M/D/YYYY","M/D/YY","DD/MM/YYYY","DD.MM.YYYY","MMM D, YYYY","MMMM D, YYYY","MMM YYYY","MMMM YYYY","YYYY-MM","YYYY/MM","YYYY"];function UK(t){return t.includes("HH")||t.includes("mm")||t.includes("ss")?"datetime":t.includes("DD")||new RegExp("(?<![MA-Z])D(?!D)").test(t)?"day":t==="YYYY"?"year":t.includes("MM")||t.includes("MMM")||t.includes("MMMM")||t.includes("M/")?"month":"day"}function GK(t){const e=t.trim();if(!e)return null;if(/^\d{4}$/.test(e)){const n=Ac(e,"YYYY",!0);return n.isValid()?n.toDate():null}for(const n of yA){if(n==="YYYY")continue;const o=Ac(e,n,!0);if(o.isValid())return o.toDate()}return null}function Ud(t){const e=t.trim();if(!e)return;const n=GK(e);if(n)return n.getTime();const o=parseFloat(e);if(!isNaN(o))return o}function bm(t){if(t.length===0)return null;const e=[];let n=null;const o=t[0].trim();if(!o)return null;if(/^\d{4}$/.test(o)){for(const r of t){const i=r.trim();if(!/^\d{4}$/.test(i))return null;const s=Ac(i,"YYYY",!0);if(!s.isValid())return null;e.push(s.toDate())}return{dates:e,granularity:"year"}}for(const r of yA){if(r==="YYYY")continue;if(Ac(o,r,!0).isValid()){n=r;break}}if(!n)return null;for(const r of t){const i=Ac(r.trim(),n,!0);if(!i.isValid())return null;e.push(i.toDate())}return{dates:e,granularity:UK(n)}}const qK=60,bd=10,zy=1.3,YK=12,jK=3,XK=14,KK=10;function ZK(t,e,n=jK){if(t==="")return[""];if(t.length*bd<=e)return[t];const o=t.split(/\s+/).filter(Boolean);if(o.length===0)return null;const r=[];let i="";for(const s of o){if(s.length*bd>e)return null;const a=i?`${i} ${s}`:s;if(a.length*bd<=e)i=a;else if(r.push(i),i=s,r.length>=n)return null}return i&&r.push(i),r.length>n?null:r}const QK={year:"%Y",month:"%b %Y",day:"%b %-d, %Y",datetime:"%b %-d, %Y %H:%M"};function JK(t){return typeof t.step=="function"}function xA(t,e){const n=bm(e);if(t&&t.includes("%")){if(n){const o=Fd(t),r=new Map;return e.forEach((i,s)=>r.set(i,n.dates[s])),i=>{if(i instanceof Date)return o(i);const s=r.get(String(i));return s?o(s):String(i)}}return null}if(t)return Ta(t)??cu(t);if(n){const o=Fd(QK[n.granularity]??"%Y-%m-%d"),r=new Map;return e.forEach((i,s)=>r.set(i,n.dates[s])),i=>{if(i instanceof Date)return o(i);const s=r.get(String(i));return s?o(s):String(i)}}return null}function xf(t,e){let n=0;for(const o of t){const i=(e?e(o):o).length*bd;i>n&&(n=i)}return n}function eZ(t,e,n){if(t.length<=1)return t;const o=n?xf(t,n):t.reduce((c,u)=>Math.max(c,u.length),0)*bd,r=Math.max(16,Math.ceil(o)+8),i=Math.max(2,Math.floor(e/r));if(t.length<=i)return t;const s=Math.ceil(t.length/i),a=t.filter((c,u)=>u%s===0),l=t[t.length-1];return a[a.length-1]!==l&&a.push(l),a}function tZ(t,e,n,o){if(t.length<=1||e<=0||n==="horizontal")return!1;if(n==="vertical")return!0;if(bm(t))return!1;const r=xf(t,o??null),i=e/t.length;return r>i*zy}function nZ(t,e){if(t.length===0)return 0;const n=xf(t,e??null);return Math.ceil(n)+YK}function oZ(t){let e=1;for(const n of t)n.length>e&&(e=n.length);return e<=1?0:e*XK+KK}function Hy(t,e,n={},o=24){if(t.length===0||e<=0||n.labelPosition==="off"||n.labelPosition==="inside")return;const r=n.tickFormat?n.tickFormat:xA(n.numberFormat??null,t),i=n.labelRotation??"auto";if(!(i!=="vertical"&&bm(t)!==null)&&t.length>1){const u=e/t.length*zy,f=xf(t,r)>u;if(i!=="vertical"&&f){const h=wA(t,u,r);if(h){const g=oZ(Array.from(h.values()));return g>o?g:void 0}}}if(!tZ(t,e,i,r))return;const l=nZ(t,r);return l>o?l:void 0}function wA(t,e,n){const o=new Map;let r=!1;for(const i of t){const s=n?n(i):i,a=ZK(s,e);if(a===null)return null;o.set(i,a),a.length>1&&(r=!0)}return r?o:null}function rZ(t,e){t.selectAll(".tick").each(function(){const n=we(this),o=n.datum(),r=o instanceof Date?o.toISOString():String(o),i=e.get(r);if(!i||i.length<=1)return;const s=n.select("text");s.empty()||(s.attr("dy",null).text(null),i.forEach((a,l)=>{s.append("tspan").attr("x",0).attr("dy",l===0?"0.71em":"1em").text(a)}))})}class iZ extends ao{initialize(){this.configDefine("scale",{defaultValue:Sn()}),this.configDefine("height",{defaultValue:0}),this.configDefine("tickPosition",{defaultValue:"below"}),this.configDefine("showAxis",{defaultValue:!0}),this.configDefine("showTicks",{defaultValue:!1}),this.configDefine("gridStyle",{defaultValue:"dashed"}),this.configDefine("ticks",{defaultValue:null}),this.configDefine("numberFormat",{defaultValue:null}),this.configDefine("width",{defaultValue:0}),this.configDefine("labels",{defaultValue:[]}),this.configDefine("labelPosition",{defaultValue:"auto"}),this.configDefine("labelRotation",{defaultValue:"auto"}),this.configDefine("zeroY",{defaultValue:null}),this.configDefine("tickFormat",{defaultValue:null});const e=this.base.append("g");this.layer("axis",e,{dataBind:(n,o)=>n.selectAll(".bc-axis-horizontal").data(o),insert:n=>n.append("g").attr("class","bc-axis bc-axis-horizontal"),events:{"merge:transition":n=>{this.applyAxis(n,"merge")},exit:n=>{n.remove()},enter:n=>{this.applyAxis(n,"enter")}}})}applyAxis(e,n){const o=this.config("scale"),r=this.config("scale"),i=this.config("tickPosition"),s=this.config("height"),a=this.config("labelPosition"),l=this.config("labelRotation"),c=this.config("width"),u=this.config("numberFormat"),d=this.config("labels"),f=this.config("tickFormat"),h=i==="above"?rq(o):iq(o);this.config("showTicks")||h.tickSizeOuter(0);const g=f||xA(u,d);g&&h.tickFormat(g);const b=JK(r),m=b?r.domain():[],v=b&&l!=="vertical"&&bm(m)!==null;let y=null,x=!1;if(b&&!v&&m.length>1&&c>0){const P=c/m.length*zy,$=xf(m,g)>P;l==="vertical"?x=!0:$&&(y=wA(m,P,g),!y&&l==="auto"&&(x=!0))}let _=this.config("ticks");if(!_&&c>0)if(b){if(v){const O=eZ(m,c,g);O.length<m.length&&(_=O)}}else{const O=Math.max(2,Math.floor(c/qK));h.ticks(O)}_&&h.tickValues(_);const S=i==="above"?0:s,E=e.node();if(n==="merge"){const O=ut();if(!E)return;O>0?(e.attr("transform",`translate(0,${S})`),e.duration(O).call(h)):we(E).attr("transform",`translate(0,${S})`).call(h)}else e.attr("transform",`translate(0,${S})`),e.call(h);const M=n==="merge"&&E?we(E):e;if(!this.config("showAxis"))M.select(".domain").remove();else if(n==="enter"){const O=this.config("zeroY");if(O!=null){const P=O-(i==="above"?0:s);M.select(".domain").attr("transform",`translate(0,${P})`)}}this.config("showTicks")||M.selectAll(".tick line").remove();const C=a==="auto"?"outside":a;C==="off"?M.selectAll(".tick text").remove():C==="inside"&&M.selectAll(".tick text").attr("y",0).attr("dy","-0.6em"),x&&C!=="off"?M.selectAll(".tick text").attr("transform","rotate(-90)").attr("text-anchor","end").attr("x",i==="above"?9:-9).attr("y",0).attr("dy","0.32em"):M.selectAll(".tick text").attr("transform",null),y&&C!=="off"&&rZ(M,y)}postDraw(){const e=this.config("gridStyle"),n=this.config("height"),o=this.base.select(".bc-axis-horizontal").node();o&&e!=="none"&&n>0&&sZ(o,e,n)}}function sZ(t,e,n){var a;const o=((a=t.ownerSVGElement)==null?void 0:a.parentElement)??document.documentElement,i=getComputedStyle(o).getPropertyValue("--bc-grid-color").trim()||"#ccc";we(t).selectAll(".tick").each(function(){const c=we(this).append("line").attr("class","bc-grid-line").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",-n).attr("stroke",i).attr("stroke-width",1);e==="dashed"?c.attr("stroke-dasharray","4,4"):e==="dotted"&&c.attr("stroke-dasharray","1,3")})}const _A=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],aZ=200,b8=.2;class lZ extends ao{initialize(){this.configDefine("colors",{defaultValue:_A}),this.configDefine("yOffset",{defaultValue:-10}),this.configDefine("layout",{defaultValue:"horizontal"}),this.configDefine("valueSuffixes",{defaultValue:[]}),this.configDefine("maxWidth",{defaultValue:0});const e=this.base.append("g").attr("class","bc-legend");this.layer("items",e,{dataBind:(n,o)=>n.selectAll(".bc-legend-item").data(o),insert:n=>n.append("g").attr("class","bc-legend-item"),events:{enter:n=>{var d,f;const o=this.config("colors"),r=this.config("layout"),i=this.config("valueSuffixes"),s=((f=(d=this.base.node())==null?void 0:d.ownerSVGElement)==null?void 0:f.parentElement)??document.documentElement,a=getComputedStyle(s).getPropertyValue("--bc-text-color").trim()||"#555",l=this.config("maxWidth");let c=0,u=0;n.each(function(h,g){const b=we(this),m=i[g],y=16+(m?h.length+1+m.length:h.length)*7+12;r==="horizontal"&&l>0&&c>0&&c+y>l&&(c=0,u+=20),b.attr("transform",`translate(${c},${u})`).attr("data-series",g).style("cursor","default"),b.append("rect").attr("width",12).attr("height",12).attr("fill",o[g%o.length]);const x=b.append("text").attr("x",16).attr("y",10).attr("font-size","12px").attr("fill",a);m?(x.append("tspan").attr("font-weight","bold").text(h),x.append("tspan").text(` ${m}`)):x.text(h),r==="vertical"?u+=20:c+=y})}}})}preDraw(){const e=this.config("yOffset");this.base.select(".bc-legend").attr("transform",`translate(0,${e})`)}}function cZ(t){const e=we(t).selectAll(".bc-legend-item");if(e.empty())return;let n=null,o=null;function r(s){o=s;const a=String(s);e.each(function(){const c=we(this),u=c.attr("data-series")===a;c.transition().duration(150).style("opacity",u?1:b8)}),we(t).selectAll("[data-series]").filter(function(){return!this.closest(".bc-legend")}).each(function(){const c=we(this),u=c.attr("data-series")===a,d=this.classList.contains("bc-direct-label")||this.classList.contains("bc-value-label");c.transition().duration(150).style("opacity",u?1:d?0:b8)})}function i(){o=null,e.transition().duration(150).style("opacity",1),we(t).selectAll("[data-series]").filter(function(){return!this.closest(".bc-legend")}).transition().duration(150).style("opacity",null)}e.each(function(){const s=this,a=parseInt(we(s).attr("data-series")??"0",10);s.addEventListener("mouseenter",()=>{n&&clearTimeout(n),n=setTimeout(()=>r(a),Yl(aZ))}),s.addEventListener("mouseleave",()=>{n&&(clearTimeout(n),n=null),o!==null&&i()})})}function za(t,e,n=_A,o=-10,r="top",i="start",s=0,a=0,l=0,c=[],u={}){const d=r==="left"||r==="right"?"vertical":"horizontal",f=new lZ(we(t));f.config({colors:n,yOffset:o,layout:d,valueSuffixes:c,maxWidth:s}),f.draw(e);const h=t.querySelector(".bc-legend");if(h){let g=0,b=0;const m=e.map((S,E)=>{const M=c[E];return M?S.length+1+M.length:S.length});if(d==="horizontal"){const S=m.map(O=>16+O*7+12);let E=1,M=0,C=0;for(const O of S)s>0&&M>0&&M+O>s?(C=Math.max(C,M),E++,M=O):M+=O;C=Math.max(C,M),g=C,b=E*20}else g=Math.max(...m)*7+16+8,b=e.length*20;const v=u.left??0,y=u.right??0;let x=l,_=o;d==="horizontal"?i==="middle"?x+=-v+(s+v+y-g)/2:i==="end"?x+=s+y-g:x+=-v:i==="middle"?_+=(a-b)/2:i==="end"&&(_+=a-b),h.setAttribute("transform",`translate(${x},${_})`)}return cZ(t),h}const SA=[{name:"Blueprint",label:"Blueprint",colors:["#2563A0","#D4A63A","#C94044","#2D8659","#4B90CF","#163A65"]},{name:"JosefAlbers",label:"Albers",colors:["#c00559","#de1f6c","#f3a20d","#f07a13","#de6716"]},{name:"Durorthod",label:"Amber",colors:["#2c0c00","#803c15","#c6782c","#ffa91d","#fff3ad"]},{name:"X41",label:"Berry",colors:["#411f6b","#623976","#be3979","#db928a","#e2c6a6"]},{name:"Bright",label:"Bright",colors:["#462255","#ff8811","#9dd9d2","#046e8f","#d44d5c"]},{name:"Cancri",label:"Cancri",colors:["#343854","#8c384d","#cf2438","#d95e31","#f0c742","#f8f0e5"]},{name:"Ceres",label:"Ceres",colors:["#181d20","#4a5f71","#6f8ba0","#f8f9fa"]},{name:"MarcChagall",label:"Chagall",colors:["#3f6f76","#69b7ce","#c65840","#f4ce4b","#62496f"]},{name:"Pelewensis",label:"Coral",colors:["#e2b000","#f7f656","#2449a2","#809098","#0d1115"]},{name:"Deathmasks",label:"Deathmasks",colors:["#926159","#87876e","#c7d2d8","#62b7c8","#43535c","#23313c"]},{name:"Leucosternon",label:"Deep Sea",colors:["#071140","#0e34b2","#207cf5","#9ec8ff","#fbfb53"]},{name:"Deelite",label:"Deelite",colors:["#48448e","#8ccc58","#fc4d97","#b82578"]},{name:"X10",label:"Dusk",colors:["#2a2432","#4f3855","#846d86","#efefcf","#d5b77d","#a89e5e"]},{name:"Vitrixerand",label:"Earth",colors:["#281b27","#723f27","#9b6044","#b5804c","#facd9a"]},{name:"Egypt",label:"Egypt",colors:["#dd5129","#0f7ba2","#43b284","#fab255"]},{name:"ElectronicNight",label:"Electric Night",colors:["#cb54d6","#3e45c4","#21191a","#362f78","#57b4ae"]},{name:"LutjanusSebae",label:"Emperor",colors:["#e5e9ea","#a2bac5","#ce3d21","#992216","#490d07"]},{name:"Enara",label:"Enara",colors:["#262626","#3d5983","#5a8a54","#cfb023"]},{name:"Camo871",label:"Fiesta",colors:["#ffff14","#fea31d","#ce2d41","#3a3fa3"]},{name:"Folklore",label:"Folklore",colors:["#272727","#5c5c5c","#bababa","#f8f8f8"]},{name:"Fritsch",label:"Fritsch",colors:["#0f8d7b","#8942bd","#1e1a1a","#eadd17"]},{name:"AgSunset",label:"Glow",colors:["#4b2991","#872ca2","#c0369d","#ea4f88","#fa7876","#f6a97a","#edd9a3"]},{name:"Harvey",label:"Harvey",colors:["#c6d4d6","#274c4f","#a4432d","#b17c51"]},{name:"Heep",label:"Heep",colors:["#466e9a","#e84d45","#21201c","#a1baac"]},{name:"Imperator",label:"Imperator",colors:["#04093a","#0527b4","#555dfe","#faf830","#b8980f"]},{name:"Klimt",label:"Klimt",colors:["#df9ed4","#c93f55","#eacc62","#469d76","#3c4b99","#924099"]},{name:"KnickCity",label:"Knick City",colors:["#0c2340","#ff6720","#707372","#c8c9c7"]},{name:"London",label:"London",colors:["#bd241e","#e56b1e","#ffcd22","#15274d"]},{name:"Lover",label:"Lover",colors:["#b8396b","#ffd1d7","#fff5cc","#76bae0","#b28f81","#54483e"]},{name:"Maya",label:"Maya",colors:["#3d5a80","#98c1d9","#e0fbfc","#ee6c4d","#293241"]},{name:"X24",label:"Mocha",colors:["#2b1917","#7e5945","#bc927b","#f1e6e1"]},{name:"Camo873",label:"Neon",colors:["#132f8a","#5a56c8","#fc7ead","#ffca3e"]},{name:"NetsCity",label:"Nets City",colors:["#010101","#ffb81c","#da291c","#004c97","#418fde"]},{name:"Nodoubt",label:"No Doubt",colors:["#385581","#6dbac6","#dac190","#c9052c"]},{name:"ClaesOldenburg",label:"Oldenburg",colors:["#95b1c9","#263656","#698946","#f8d440","#c82720"]},{name:"Peacesells",label:"Peace Sells",colors:["#9a5155","#483943","#ecc463","#a497b2"]},{name:"PabloPicasso",label:"Picasso",colors:["#4e7989","#a9011b","#e4a826","#80944e","#dcd6b2"]},{name:"Bifasciatum",label:"Reef",colors:["#080214","#16407b","#2b7ff9","#b1fcfc","#6cbe50"]},{name:"SiameseDream",label:"Siamese Dream",colors:["#f0e9e0","#2f1f16","#a34d2c","#cd8e40"]},{name:"X115",label:"Sienna",colors:["#001a29","#633633","#834a39","#e3b571","#eee6a6"]},{name:"Sixers",label:"Sixers",colors:["#888b8d","#e4d5d3","#003da5","#d50032"]},{name:"SolLeWitt",label:"Sol LeWitt",colors:["#0a71b6","#f9c40a","#190506","#eb5432","#eaf2f0"]},{name:"Sunset",label:"Sunset",colors:["#41476b","#675478","#9e6374","#c67b6f","#de9b71","#efbc82","#fbdfa2"]},{name:"Sunset2",label:"Sunset II",colors:["#1d457f","#61599d","#c36377","#eb7f54","#f2af4a"]},{name:"Sunset3",label:"Sunset III",colors:["#390e40","#701c34","#a63228","#c7662a","#eba42b"]},{name:"Pal9",label:"Tropical",colors:["#273b5b","#c1c243","#e73e26","#2e6657","#e8f5b3","#24a99c"]},{name:"Salvelinus",label:"Trout",colors:["#e6452e","#e49a36","#f9dd4c","#5b4a4c","#01040e"]},{name:"TheovanDoesburg",label:"Van Doesburg",colors:["#bd748f","#3d578e","#bfab68","#dad7d0","#272928"]},{name:"Wizards",label:"Wizards",colors:["#c8102e","#0c2340","#8d9093","#c8c9c7"]},{name:"FrancescoXanto",label:"Xanto",colors:["#2c6aa5","#d9ae2c","#ddc655","#d88c27","#64894d"]},{name:"Zeppelin",label:"Zeppelin",colors:["#efdb15","#739c9c","#0d484c","#c71a08"]}],uZ=Object.fromEntries(SA.map(t=>[t.name,t.colors]));function kA(t){if(!t)return;const e=uZ[t];return e?[...e]:void 0}function CA(){return SA}function ym(t,e){if(!e||e.min===void 0&&e.max===void 0)return t.map((o,r)=>r);const n=[];for(let o=0;o<t.length;o++){const r=Ud(t[o]);if(r===void 0){n.push(o);continue}e.min!==void 0&&r<e.min||e.max!==void 0&&r>e.max||n.push(o)}return n}const Gd=60;function jl(t){const e=Number.isFinite(t)?Math.max(0,Math.min(100,t)):Gd;return e/(e+100)}function fu(t,e){const n=Math.min(0,...t),o=Math.max(0,...t);let r=(e==null?void 0:e.min)??n,i=(e==null?void 0:e.max)??o;if(r>i&&([r,i]=[i,r]),r===i)if(r===0)i=1;else{const s=Math.abs(r)*.1;r=r-s,i=i+s}return[r,i]}function dZ(t){return typeof t.step=="function"}const th=new WeakMap;class Mr{constructor(e){qn(this,"vGroup",null);qn(this,"hGroup",null);qn(this,"vChart",null);qn(this,"hChart",null);qn(this,"container");qn(this,"initialized",!1);this.container=e}static for(e){let n=th.get(e);return n||(n=new Mr(e),th.set(e,n)),n}static clear(e){th.delete(e)}detach(){var e,n;(e=this.vGroup)!=null&&e.parentNode&&(this.vGroup.querySelectorAll(".bc-grid-line").forEach(o=>o.remove()),this.vGroup.remove()),(n=this.hGroup)!=null&&n.parentNode&&(this.hGroup.querySelectorAll(".bc-grid-line").forEach(o=>o.remove()),this.hGroup.remove())}attach(e,n){if(!this.initialized)this.vGroup=document.createElementNS("http://www.w3.org/2000/svg","g"),this.vGroup.setAttribute("class","bc-axis-service-v"),this.hGroup=document.createElementNS("http://www.w3.org/2000/svg","g"),this.hGroup.setAttribute("class","bc-axis-service-h"),e.appendChild(this.vGroup),e.appendChild(this.hGroup),this.vChart=new EK(we(this.vGroup)),this.hChart=new iZ(we(this.hGroup)),this.initialized=!0;else{for(const o of[this.vGroup,this.hGroup])we(o).selectAll(".tick").interrupt().remove();if(e.appendChild(this.vGroup),e.appendChild(this.hGroup),n&&(n.dx!==0||n.dy!==0)){const{dx:o,dy:r}=n;for(const i of[this.vGroup,this.hGroup]){i.setAttribute("transform",`translate(${o},${r})`);const s=ut();s>0?we(i).transition().duration(s).attrTween("transform",()=>{const a=no(o,0),l=no(r,0);return c=>`translate(${a(c)},${l(c)})`}):i.removeAttribute("transform")}}}}update(e){const n=e.order??"vertical-first";n==="horizontal-first"?(this.updateHorizontal(e.horizontal),this.updateVertical(e.vertical)):(this.updateVertical(e.vertical),this.updateHorizontal(e.horizontal)),n==="horizontal-first"?this.hGroup&&this.vGroup&&this.hGroup.parentNode&&this.hGroup.parentNode.insertBefore(this.hGroup,this.vGroup):this.vGroup&&this.hGroup&&this.vGroup.parentNode&&this.vGroup.parentNode.insertBefore(this.vGroup,this.hGroup)}updateVertical(e){if(!this.vChart||!this.vGroup)return;if(!e){this.vGroup.style.display="none";return}this.vGroup.style.display="";const n=e.options;this.vChart.config({scale:e.scale,direction:n.direction??"left",showAxis:n.showAxis??!0,showTicks:n.showTicks??!1,gridStyle:n.gridStyle??"dashed",gridWidth:n.gridWidth??0,height:e.height,ticks:n.ticks??null,numberFormat:n.numberFormat??null,labelPosition:n.labelPosition??"auto",topPadding:n.topPadding??0,tickFormat:n.tickFormat??null}),this.vChart.draw([{placeholder:!0}]);const o=this.vGroup.querySelector(".bc-axis-vertical");o&&(n.direction??"left")==="right"?o.setAttribute("transform",`translate(${n.gridWidth??0},0)`):o&&o.removeAttribute("transform")}updateHorizontal(e){if(!this.hChart||!this.hGroup)return;if(!e){this.hGroup.style.display="none";return}this.hGroup.style.display="";const n=e.options,o=e.scale,r=dZ(o)?o.domain():[];this.hChart.config({scale:o,height:e.height,tickPosition:n.tickPosition??"below",showAxis:n.showAxis??!0,showTicks:n.showTicks??!1,gridStyle:n.gridStyle??"dashed",ticks:n.ticks??null,numberFormat:n.numberFormat??null,width:n.width??0,labels:r,labelPosition:n.labelPosition??"auto",labelRotation:n.labelRotation??"auto",zeroY:n.zeroY??null,tickFormat:n.tickFormat??null}),this.hChart.draw([{placeholder:!0}])}destroy(){this.detach(),this.vChart=null,this.hChart=null,this.vGroup=null,this.hGroup=null,this.initialized=!1,th.delete(this.container)}}const O1=Math.min,$c=Math.max,Hp=Math.round,ji=t=>({x:t,y:t}),fZ={left:"right",right:"left",bottom:"top",top:"bottom"},hZ={start:"end",end:"start"};function y8(t,e,n){return $c(t,O1(e,n))}function xm(t,e){return typeof t=="function"?t(e):t}function Ll(t){return t.split("-")[0]}function wm(t){return t.split("-")[1]}function AA(t){return t==="x"?"y":"x"}function $A(t){return t==="y"?"height":"width"}const pZ=new Set(["top","bottom"]);function ma(t){return pZ.has(Ll(t))?"y":"x"}function TA(t){return AA(ma(t))}function mZ(t,e,n){n===void 0&&(n=!1);const o=wm(t),r=TA(t),i=$A(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Wp(s)),[s,Wp(s)]}function gZ(t){const e=Wp(t);return[B1(t),e,B1(e)]}function B1(t){return t.replace(/start|end/g,e=>hZ[e])}const x8=["left","right"],w8=["right","left"],vZ=["top","bottom"],bZ=["bottom","top"];function yZ(t,e,n){switch(t){case"top":case"bottom":return n?e?w8:x8:e?x8:w8;case"left":case"right":return e?vZ:bZ;default:return[]}}function xZ(t,e,n,o){const r=wm(t);let i=yZ(Ll(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(B1)))),i}function Wp(t){return t.replace(/left|right|bottom|top/g,e=>fZ[e])}function wZ(t){return{top:0,right:0,bottom:0,left:0,...t}}function _Z(t){return typeof t!="number"?wZ(t):{top:t,right:t,bottom:t,left:t}}function Up(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function _8(t,e,n){let{reference:o,floating:r}=t;const i=ma(e),s=TA(e),a=$A(s),l=Ll(e),c=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[a]/2-r[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(wm(e)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}async function SZ(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=xm(e,t),g=_Z(h),m=a[f?d==="floating"?"reference":"floating":d],v=Up(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Up(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:x,strategy:l}):y);return{top:(v.top-S.top+g.top)/_.y,bottom:(S.bottom-v.bottom+g.bottom)/_.y,left:(v.left-S.left+g.left)/_.x,right:(S.right-v.right+g.right)/_.x}}const kZ=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:d}=_8(c,o,l),f=o,h={},g=0;for(let m=0;m<a.length;m++){var b;const{name:v,fn:y}=a[m],{x,y:_,data:S,reset:E}=await y({x:u,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:h,rects:c,platform:{...s,detectOverflow:(b=s.detectOverflow)!=null?b:SZ},elements:{reference:t,floating:e}});u=x??u,d=_??d,h={...h,[v]:{...h[v],...S}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):E.rects),{x:u,y:d}=_8(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:h}},CZ=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...m}=xm(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Ll(r),y=ma(a),x=Ll(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!b?[Wp(a)]:gZ(a)),E=g!=="none";!f&&E&&S.push(...xZ(a,b,g,_));const M=[a,...S],C=await l.detectOverflow(e,m),O=[];let P=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&O.push(C[v]),d){const L=mZ(r,s,_);O.push(C[L[0]],C[L[1]])}if(P=[...P,{placement:r,overflows:O}],!O.every(L=>L<=0)){var R,$;const L=(((R=i.flip)==null?void 0:R.index)||0)+1,B=M[L];if(B&&(!(d==="alignment"?y!==ma(B):!1)||P.every(V=>ma(V.placement)===y?V.overflows[0]>0:!0)))return{data:{index:L,overflows:P},reset:{placement:B}};let F=($=P.filter(z=>z.overflows[0]<=0).sort((z,V)=>z.overflows[1]-V.overflows[1])[0])==null?void 0:$.placement;if(!F)switch(h){case"bestFit":{var A;const z=(A=P.filter(V=>{if(E){const U=ma(V.placement);return U===y||U==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(U=>U>0).reduce((U,ie)=>U+ie,0)]).sort((V,U)=>V[1]-U[1])[0])==null?void 0:A[0];z&&(F=z);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}},AZ=new Set(["left","top"]);async function $Z(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Ll(n),a=wm(n),l=ma(n)==="y",c=AZ.has(s)?-1:1,u=i&&l?-1:1,d=xm(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const TZ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,l=await $Z(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},MZ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=xm(t,e),u={x:n,y:o},d=await i.detectOverflow(e,c),f=ma(Ll(r)),h=AA(f);let g=u[h],b=u[f];if(s){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+d[v],_=g-d[y];g=y8(x,g,_)}if(a){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=b+d[v],_=b-d[y];b=y8(x,b,_)}const m=l.fn({...e,[h]:g,[f]:b});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:s,[f]:a}}}}}};function _m(){return typeof window<"u"}function hu(t){return MA(t)?(t.nodeName||"").toLowerCase():"#document"}function _r(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ys(t){var e;return(e=(MA(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function MA(t){return _m()?t instanceof Node||t instanceof _r(t).Node:!1}function yi(t){return _m()?t instanceof Element||t instanceof _r(t).Element:!1}function Ji(t){return _m()?t instanceof HTMLElement||t instanceof _r(t).HTMLElement:!1}function S8(t){return!_m()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _r(t).ShadowRoot}const OZ=new Set(["inline","contents"]);function wf(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=xi(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!OZ.has(r)}const BZ=new Set(["table","td","th"]);function LZ(t){return BZ.has(hu(t))}const PZ=[":popover-open",":modal"];function Sm(t){return PZ.some(e=>{try{return t.matches(e)}catch{return!1}})}const DZ=["transform","translate","scale","rotate","perspective"],EZ=["transform","translate","scale","rotate","perspective","filter"],IZ=["paint","layout","strict","content"];function Wy(t){const e=Uy(),n=yi(t)?xi(t):t;return DZ.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||EZ.some(o=>(n.willChange||"").includes(o))||IZ.some(o=>(n.contain||"").includes(o))}function NZ(t){let e=Ma(t);for(;Ji(e)&&!Xc(e);){if(Wy(e))return e;if(Sm(e))return null;e=Ma(e)}return null}function Uy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const RZ=new Set(["html","body","#document"]);function Xc(t){return RZ.has(hu(t))}function xi(t){return _r(t).getComputedStyle(t)}function km(t){return yi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ma(t){if(hu(t)==="html")return t;const e=t.assignedSlot||t.parentNode||S8(t)&&t.host||Ys(t);return S8(e)?e.host:e}function OA(t){const e=Ma(t);return Xc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ji(e)&&wf(e)?e:OA(e)}function BA(t,e,n){var o;e===void 0&&(e=[]);const r=OA(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=_r(r);return i?(L1(s),e.concat(s,s.visualViewport||[],wf(r)?r:[],[])):e.concat(r,BA(r,[]))}function L1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function LA(t){const e=xi(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Ji(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=Hp(n)!==i||Hp(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function PA(t){return yi(t)?t:t.contextElement}function Tc(t){const e=PA(t);if(!Ji(e))return ji(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=LA(e);let s=(i?Hp(n.width):n.width)/o,a=(i?Hp(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const FZ=ji(0);function DA(t){const e=_r(t);return!Uy()||!e.visualViewport?FZ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function VZ(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==_r(t)?!1:e}function qd(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=PA(t);let s=ji(1);e&&(o?yi(o)&&(s=Tc(o)):s=Tc(t));const a=VZ(i,n,o)?DA(i):ji(0);let l=(r.left+a.x)/s.x,c=(r.top+a.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const f=_r(i),h=o&&yi(o)?_r(o):o;let g=f,b=L1(g);for(;b&&o&&h!==g;){const m=Tc(b),v=b.getBoundingClientRect(),y=xi(b),x=v.left+(b.clientLeft+parseFloat(y.paddingLeft))*m.x,_=v.top+(b.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=_,g=_r(b),b=L1(g)}}return Up({width:u,height:d,x:l,y:c})}function Cm(t,e){const n=km(t).scrollLeft;return e?e.left+n:qd(Ys(t)).left+n}function EA(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Cm(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function zZ(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=Ys(o),a=e?Sm(e.floating):!1;if(o===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ji(1);const u=ji(0),d=Ji(o);if((d||!d&&!i)&&((hu(o)!=="body"||wf(s))&&(l=km(o)),Ji(o))){const h=qd(o);c=Tc(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=s&&!d&&!i?EA(s,l):ji(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function HZ(t){return Array.from(t.getClientRects())}function WZ(t){const e=Ys(t),n=km(t),o=t.ownerDocument.body,r=$c(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=$c(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Cm(t);const a=-n.scrollTop;return xi(o).direction==="rtl"&&(s+=$c(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}const k8=25;function UZ(t,e){const n=_r(t),o=Ys(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,l=0;if(r){i=r.width,s=r.height;const u=Uy();(!u||u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}const c=Cm(o);if(c<=0){const u=o.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-h);g<=k8&&(i-=g)}else c<=k8&&(i+=c);return{width:i,height:s,x:a,y:l}}const GZ=new Set(["absolute","fixed"]);function qZ(t,e){const n=qd(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=Ji(t)?Tc(t):ji(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=r*i.x,c=o*i.y;return{width:s,height:a,x:l,y:c}}function C8(t,e,n){let o;if(e==="viewport")o=UZ(t,n);else if(e==="document")o=WZ(Ys(t));else if(yi(e))o=qZ(e,n);else{const r=DA(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Up(o)}function IA(t,e){const n=Ma(t);return n===e||!yi(n)||Xc(n)?!1:xi(n).position==="fixed"||IA(n,e)}function YZ(t,e){const n=e.get(t);if(n)return n;let o=BA(t,[]).filter(a=>yi(a)&&hu(a)!=="body"),r=null;const i=xi(t).position==="fixed";let s=i?Ma(t):t;for(;yi(s)&&!Xc(s);){const a=xi(s),l=Wy(s);!l&&a.position==="fixed"&&(r=null),(i?!l&&!r:!l&&a.position==="static"&&!!r&&GZ.has(r.position)||wf(s)&&!l&&IA(t,s))?o=o.filter(u=>u!==s):r=a,s=Ma(s)}return e.set(t,o),o}function jZ(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?Sm(e)?[]:YZ(e,this._c):[].concat(n),o],a=s[0],l=s.reduce((c,u)=>{const d=C8(e,u,r);return c.top=$c(d.top,c.top),c.right=O1(d.right,c.right),c.bottom=O1(d.bottom,c.bottom),c.left=$c(d.left,c.left),c},C8(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XZ(t){const{width:e,height:n}=LA(t);return{width:e,height:n}}function KZ(t,e,n){const o=Ji(e),r=Ys(e),i=n==="fixed",s=qd(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=ji(0);function c(){l.x=Cm(r)}if(o||!o&&!i)if((hu(e)!=="body"||wf(r))&&(a=km(e)),o){const h=qd(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else r&&c();i&&!o&&r&&c();const u=r&&!o&&!i?EA(r,a):ji(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Xg(t){return xi(t).position==="static"}function A8(t,e){if(!Ji(t)||xi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ys(t)===n&&(n=n.ownerDocument.body),n}function NA(t,e){const n=_r(t);if(Sm(t))return n;if(!Ji(t)){let r=Ma(t);for(;r&&!Xc(r);){if(yi(r)&&!Xg(r))return r;r=Ma(r)}return n}let o=A8(t,e);for(;o&&LZ(o)&&Xg(o);)o=A8(o,e);return o&&Xc(o)&&Xg(o)&&!Wy(o)?n:o||NZ(t)||n}const ZZ=async function(t){const e=this.getOffsetParent||NA,n=this.getDimensions,o=await n(t.floating);return{reference:KZ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function QZ(t){return xi(t).direction==="rtl"}const JZ={convertOffsetParentRelativeRectToViewportRelativeRect:zZ,getDocumentElement:Ys,getClippingRect:jZ,getOffsetParent:NA,getElementRects:ZZ,getClientRects:HZ,getDimensions:XZ,getScale:Tc,isElement:yi,isRTL:QZ},RA=TZ,FA=MZ,VA=CZ,zA=(t,e,n)=>{const o=new Map,r={platform:JZ,...n},i={...r.platform,_c:o};return kZ(t,e,{...r,platform:i})},HA="bc-tooltip";function eQ(){if(document.getElementById("bc-tooltip-styles"))return;const t=document.createElement("style");t.id="bc-tooltip-styles",t.textContent=`
|
|
39
|
+
.${HA} {
|
|
40
|
+
position: absolute;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
background: var(--bs-body-bg, #fff);
|
|
43
|
+
color: var(--bs-body-color, #212529);
|
|
44
|
+
border: 1px solid var(--bs-border-color, #dee2e6);
|
|
45
|
+
border-radius: 4px;
|
|
46
|
+
padding: 6px 10px;
|
|
47
|
+
font-size: 13px;
|
|
48
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.12);
|
|
49
|
+
z-index: 9999;
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
`,document.head.appendChild(t)}function tQ(t){const e=t?Ta(t):null,n=o=>typeof o=="number"&&e?e(o):String(o);return o=>{if(o&&typeof o=="object"){if("data"in o&&typeof o.data=="number")return n(o.data);const r=o;if("label"in r&&"value"in r)return`${r.label}: ${n(r.value)}`;if("series"in r&&"value"in r)return`${r.series}: ${n(r.value)}`;if("value"in r)return n(r.value)}return String(o)}}function Ha(t){const e=(t==null?void 0:t.format)??tQ(t==null?void 0:t.numberFormat);let n=null;const o=[];return{name:"tooltip",install(){eQ(),n=document.createElement("div"),n.className=HA,document.body.appendChild(n)},postDraw(r){r.base.selectAll(".bc-bar, .bc-dot, .bc-arc").each(function(){const a=this,l=()=>{if(!n)return;const u=we(a).datum();n.textContent=e(u),n.style.display="block",zA(a,n,{placement:"top",middleware:[RA(8),VA(),FA()]}).then(({x:d,y:f})=>{n&&(n.style.left=`${d}px`,n.style.top=`${f}px`)})},c=()=>{n&&(n.style.display="none")};a.addEventListener("mouseenter",l),a.addEventListener("mouseleave",c),o.push(()=>{a.removeEventListener("mouseenter",l),a.removeEventListener("mouseleave",c)})})},destroy(){for(const r of o)r();o.length=0,n&&(n.remove(),n=null)}}}function nQ(t){switch(t){case oi.Solid:return"none";case oi.Dotted:return"2,2";case oi.Dashed:default:return"4,3"}}function Xl(t){const e=(t==null?void 0:t.color)??"#999",n=(t==null?void 0:t.dashArray)??nQ(t==null?void 0:t.style),o=(t==null?void 0:t.direction)??Ao.Both,r=(t==null?void 0:t.orientation)??Yn.Vertical,i=[];return{name:"crosshair",install(){},postDraw(s){const a=s.base,l=(t==null?void 0:t.width)??0,c=(t==null?void 0:t.height)??0,u=o===Ao.Both||o===Ao.Vertical,d=o===Ao.Both||o===Ao.Horizontal,f=u?a.append("line").attr("class","bc-crosshair bc-crosshair-v").attr("y1",0).attr("y2",c).attr("stroke",e).attr("stroke-width",1).style("stroke-dasharray",n).attr("pointer-events","none").style("display","none"):null,h=d?a.append("line").attr("class","bc-crosshair bc-crosshair-h").attr("x1",0).attr("x2",l).attr("stroke",e).attr("stroke-width",1).style("stroke-dasharray",n).attr("pointer-events","none").style("display","none"):null;a.selectAll(".bc-dot, .bc-bar").each(function(){const b=this,m=()=>{const y=we(b);let x,_;if(b.tagName==="circle")x=parseFloat(y.attr("cx")),_=parseFloat(y.attr("cy"));else{const S=parseFloat(y.attr("x")),E=parseFloat(y.attr("width")),M=parseFloat(y.attr("y")),C=parseFloat(y.attr("height"));r===Yn.Horizontal?(x=S+E,_=M+C/2):(x=S+E/2,_=M)}f&&f.attr("x1",x).attr("x2",x).style("display",null),h&&h.attr("y1",_).attr("y2",_).style("display",null)},v=()=>{f&&f.style("display","none"),h&&h.style("display","none")};b.addEventListener("mouseenter",m),b.addEventListener("mouseleave",v),i.push(()=>{b.removeEventListener("mouseenter",m),b.removeEventListener("mouseleave",v)})})},destroy(){for(const s of i)s();i.length=0}}}function Gy(t){const e=t.querySelector(".bc-annotation-line");if(!(!e||!e.hasAttribute("data-line-style")))return{style:e.getAttribute("data-line-style"),fromX:parseFloat(e.getAttribute("data-line-from-x")||"0"),fromY:parseFloat(e.getAttribute("data-line-from-y")||"0"),toX:parseFloat(e.getAttribute("data-line-to-x")||"0"),toY:parseFloat(e.getAttribute("data-line-to-y")||"0"),departVertical:e.getAttribute("data-line-depart-vertical")==="true"}}function cr(t){const e=new Map,n=t.querySelectorAll("g[data-annotation-id]");for(const o of n){const r=o.getAttribute("data-annotation-id"),i=Gy(o);try{const s=o.getBBox();e.set(r,{id:r,element:o,rect:{x:s.x,y:s.y,width:s.width,height:s.height},line:i})}catch{e.set(r,{id:r,element:o,rect:{x:0,y:0,width:0,height:0},line:i})}}return e}const Oa={N:{dx:0,dy:-1},NE:{dx:.707,dy:-.707},E:{dx:1,dy:0},SE:{dx:.707,dy:.707},S:{dx:0,dy:1},SW:{dx:-.707,dy:.707},W:{dx:-1,dy:0},NW:{dx:-.707,dy:-.707},center:{dx:0,dy:0}},$8={N:{nx:0,ny:-1},NE:{nx:1,ny:-1},E:{nx:1,ny:0},SE:{nx:1,ny:1},S:{nx:0,ny:1},SW:{nx:-1,ny:1},W:{nx:-1,ny:0},NW:{nx:-1,ny:-1},center:{nx:0,ny:0}};Pn.N+"",Pn.W,Pn.NE+"",Pn.NW,Pn.E+"",Pn.N,Pn.SE+"",Pn.NE,Pn.S+"",Pn.E,Pn.SW+"",Pn.SE,Pn.W+"",Pn.S,Pn.NW+"",Pn.SW,Pn.Center+"",Pn.Center;function oQ(t,e){const n=Oa[t]??Oa.NW;return{dx:n.dx*e,dy:n.dy*e}}function qy(t){return"step"in t&&!("bandwidth"in t)}function WA(t){if("bandwidth"in t||qy(t))return!1;const e=t.domain();return e.length>0&&e[0]instanceof Date}function UA(t,e){if("bandwidth"in t){const n=t;return(n(e)??0)+n.bandwidth()/2}return qy(t)?t(e)??0:WA(t)?t(new Date(e)):t(Number(e))}function T8(t,e){const n=(e.left+e.right)/2,o=(e.top+e.bottom)/2,r=$8[t]??$8.N;return{x:n+r.nx*(e.right-e.left)/2,y:o+r.ny*(e.bottom-e.top)/2}}function rQ(t,e,n,o,r){if("bandwidth"in e){const c=e,u=c(t.label)??0,d=c.bandwidth(),f=n(t.value),h=n(0);return r==="horizontal"?T8(o,{left:h,right:f,top:u,bottom:u+d}):T8(o,{left:u,right:u+d,top:f,bottom:h})}const i=UA(e,t.label),s=n(t.value),a=2,l=Oa[o]??Oa.N;return{x:i+l.dx*a,y:s+l.dy*a}}function iQ(t,e,n,o=4){const r=t.x+t.width/2,i=t.y+t.height/2;if(e===r&&n===i)return{x:r,y:i};const s=e>=t.x&&e<=t.x+t.width,a=n>=t.y&&n<=t.y+t.height,l=[];if(s&&(n<i?l.push({x:r,y:t.y-o,dist:Math.abs(i-n)}):l.push({x:r,y:t.y+t.height+o,dist:Math.abs(n-i)})),a&&(e>r?l.push({x:t.x+t.width+o,y:i,dist:Math.abs(e-r)}):l.push({x:t.x-o,y:i,dist:Math.abs(r-e)})),l.length>0){l.sort((g,b)=>g.dist-b.dist);const{x:f,y:h}=l[0];return{x:f,y:h}}const c=[{x:r,y:t.y-o},{x:r,y:t.y+t.height+o},{x:t.x+t.width+o,y:i},{x:t.x-o,y:i}];let u=c[0],d=(u.x-e)**2+(u.y-n)**2;for(let f=1;f<c.length;f++){const h=(c[f].x-e)**2+(c[f].y-n)**2;h<d&&(u=c[f],d=h)}return u}function Yy(t,e){if(!t)return"bc-arrow";const n=e??"#666",o=`bc-arrow-${n.replace(/[^a-zA-Z0-9]/g,"")}`;return t.querySelector(`#${o}`)||(we(t).select("defs").empty()?we(t).append("defs"):we(t).select("defs")).append("marker").attr("id",o).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",8).attr("markerHeight",8).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 1 1 L 9 5 L 1 9").attr("fill","none").attr("stroke",n).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round"),o}function sQ(t){switch(t){case Tp.Dotted:return"2,3";case Tp.Dashed:return"5,4";default:return""}}function aQ(t,e,n,o={}){const r=t.append("circle").attr("class","bc-annotation-circle").attr("cx",e).attr("cy",n).attr("r",o.size??4).attr("fill","none").attr("stroke",o.color??"#666").attr("stroke-width",1.5),i=sQ(o.style??Tp.Solid);i&&r.attr("stroke-dasharray",i)}const M8=1/Math.tan(40*Math.PI/180);function lQ(t,e,n){if(n){const i=e.y>=t.y?1:-1,s=Math.max(Math.abs(e.y-t.y)-Math.abs(e.x-t.x)*M8,12);return{x:t.x,y:t.y+i*s}}const o=e.x>=t.x?1:-1,r=Math.max(Math.abs(e.x-t.x)-Math.abs(e.y-t.y)*M8,12);return{x:t.x+o*r,y:t.y}}function cQ(t,e,n){const o=lQ(t,e,n);return`M ${t.x} ${t.y} L ${o.x} ${o.y} L ${e.x} ${e.y}`}function uQ(t,e,n,o=Co.Direct,r={}){var l;let i;switch(o){case Co.CurveLeft:case Co.CurveRight:{const c=n.x-e.x,u=n.y-e.y,f=Math.sqrt(c*c+u*u)*.8,h=o===Co.CurveRight?1:0;i=`M ${e.x} ${e.y} A ${f} ${f} 0 0 ${h} ${n.x} ${n.y}`;break}case Co.Elbow:{i=cQ(e,n,r.departVertical??!1);break}default:i=`M ${e.x} ${e.y} L ${n.x} ${n.y}`}const s=r.color??"#666",a=t.append("path").attr("class","bc-annotation-line").attr("d",i).attr("fill","none").attr("stroke",s).attr("stroke-width",r.lineWeight??1).attr("pathLength","1").attr("data-line-style",o).attr("data-line-from-x",String(e.x)).attr("data-line-from-y",String(e.y)).attr("data-line-to-x",String(n.x)).attr("data-line-to-y",String(n.y)).attr("data-line-depart-vertical",String(r.departVertical??!1));if(r.showArrow===!0){const c=((l=t.node())==null?void 0:l.ownerSVGElement)??null,u=Yy(c,s);a.attr("marker-end",`url(#${u})`)}}function jy(t,e,n,o,r={}){const i=r.textAnchor??"middle",s=r.textOutline!==!1,a=t.append("text").attr("class","bc-annotation-text").attr("x",n).attr("y",o).attr("text-anchor",i).attr("font-size","12px").attr("fill",r.textColor??"currentColor");s&&a.attr("stroke",r.backgroundColor??"#fff").attr("stroke-width",3).attr("paint-order","stroke");const l=e.split(`
|
|
53
|
+
`);if(l.length>1||r.maxWidth&&r.maxWidth>0)if(r.maxWidth&&r.maxWidth>0)dQ(a,e,r.maxWidth);else for(let c=0;c<l.length;c++)a.append("tspan").attr("x",a.attr("x")).attr("dy",c===0?"0":"1.2em").text(l[c]);else a.text(e)}function dQ(t,e,n){const o=e.split(/\s+/);let r="",i=0;for(const s of o){const a=r?`${r} ${s}`:s;r&&a.length*7>n?(t.append("tspan").attr("x",t.attr("x")).attr("dy",i===0?"0":"1.2em").text(r),r=s,i++):r=a}r&&t.append("tspan").attr("x",t.attr("x")).attr("dy",i===0?"0":"1.2em").text(r)}function nh(t,e,n=$C.Center){if("bandwidth"in e){const o=e,r=o(String(t))??0,i=o.bandwidth(),s=o.step()-i;return n==="start"?r-s/2:n==="end"?r+i+s/2:r+i/2}if(qy(e)){const o=e(String(t))??0,r=e.step()/2;return n==="start"?o-r:n==="end"?o+r:o}return WA(e)?e(new Date(String(t))):e(Number(t))}function oh(t,e){return e(Number(t))}function O8(t,e){if(typeof t=="number")return e/2+t/100*e;const n=String(t);return n.endsWith("%")?e/2+parseFloat(n)/100*e:parseFloat(n)||0}function Xy(t,e){if(t==null)return;if(typeof t=="number")return t||void 0;const n=String(t);return n.endsWith("%")?parseFloat(n)/100*e:parseFloat(n)||void 0}function fQ(t){return t<-4?"end":t>4?"start":"middle"}function B8(t,e,n){if("bandwidth"in e){const o=e;return{x:(o(t.label)??0)+o.bandwidth()/2,y:n(t.value)}}return{x:UA(e,t.label),y:n(t.value)}}function GA(t,e,n,o){const r="target"in e?e.target:void 0;if(!r)return;const i=n.data.find(v=>v.label===r);if(!i)return;const s=t.append("g").attr("data-annotation-index",String(o));e.id&&s.attr("data-annotation-id",e.id);const a=e,l=a.anchorDirection??Pn.N,c=rQ(i,n.scaleX,n.scaleY,l,n.orientation);let u,d;const f=e;if(f.dx!=null||f.dy!=null){const{x:v,y}=B8(i,n.scaleX,n.scaleY);u=v+(Number(f.dx)||40),d=y+(Number(f.dy)||-40)}else if(f.direction!=null&&f.textOffsetX==null){const{x:v,y}=B8(i,n.scaleX,n.scaleY),x=f.direction,_=f.anchorDistance??60,S=oQ(x,_);u=v+S.dx,d=y+S.dy}else u=c.x+(a.textOffsetX??-42),d=c.y+(a.textOffsetY??-42);const h=e.circleColor??"#666",g=e;if(g.showCircle&&aQ(s,c.x,c.y,{size:g.circleSize,style:g.circleStyle,color:h}),e.text){const v=Math.max(4,Math.min(u,n.width-4)),y=fQ(u-c.x);jy(s,e.text,v,d-4,{textColor:e.textColor,maxWidth:Xy(e.maxWidth,n.width),textAnchor:y,backgroundColor:n.backgroundColor,textOutline:e.textOutline})}if(f.dx!=null||f.dy!=null?a.showLine!==!1:a.showLine===!0){let v={x:u,y:d},y=!1;const x=s.select(".bc-annotation-text").node();if(x)try{const M=x.getBBox();if(M.width>0&&M.height>0){v=iQ(M,c.x,c.y);const C=M.x+M.width/2;y=Math.abs(v.x-C)<1}}catch{}const _=a.showCircle?(a.circleSize??4)+(a.lineTargetDistance??5):a.lineTargetDistance??0;let S=c.x,E=c.y;if(_>0){const M=c.x-v.x,C=c.y-v.y,O=Math.sqrt(M*M+C*C);if(O>0){const P=c.x-M/O*_,R=c.y-C/O*_,$=Oa[l]??Oa.N;S=Math.abs($.dx)>.01?P:c.x,E=Math.abs($.dy)>.01?R:c.y}}uQ(s,v,{x:S,y:E},a.lineStyle??Co.Direct,{showArrow:a.showArrow,lineWeight:a.lineWeight,color:h,departVertical:y})}}function qA(t,e,n,o,r){if(e.kind!==Lt.Range)return;const i=t.append("g").attr("data-annotation-index",String(o));e.id&&i.attr("data-annotation-id",e.id);const s=e.orientation??Yn.Vertical;let a,l,c,u;if(n.orientation===Yn.Horizontal)if(s===Yn.Vertical){const d=nh(e.start,n.scaleX,e.startAnchor),f=nh(e.end,n.scaleX,e.endAnchor);l=Math.min(d,f),u=Math.abs(f-d),a=0,c=n.width}else{const d=oh(e.start,n.scaleY),f=oh(e.end,n.scaleY);a=Math.min(d,f),c=Math.abs(f-d),l=0,u=n.height}else if(s===Yn.Vertical){const d=nh(e.start,n.scaleX,e.startAnchor),f=nh(e.end,n.scaleX,e.endAnchor);a=Math.min(d,f),c=Math.abs(f-d),l=0,u=n.height}else{const d=oh(e.start,n.scaleY),f=oh(e.end,n.scaleY);l=Math.min(d,f),u=Math.abs(f-d),a=0,c=n.width}if(i.append("rect").attr("class","bc-annotation-range").attr("x",a).attr("y",l).attr("width",c).attr("height",u).attr("fill",e.bgColor??"#ccc").attr("opacity",(e.bgOpacity??20)/100),e.text){const d=s===Yn.Vertical?c:u,f=Xy(e.maxWidth,n.width)??Math.max(d,50),h=e.direction??"center",g=4,b=Oa[h]??Oa.center,m=.5+b.dx*.5,v=.5+b.dy*.5,y=Math.max(g,Math.min(a+c*m,n.width-g));let x="middle";m<.25?x="start":m>.75&&(x="end");const S=l+g+12,E=r?r.append("g").attr("data-annotation-index",String(o)):i;if(jy(E,e.text,y,S,{textColor:e.textColor,maxWidth:f,textAnchor:x,backgroundColor:n.backgroundColor,textOutline:e.textOutline}),v>.25){const M=E.select(".bc-annotation-text").node();if(M)try{const C=M.getBBox();let O=0;v>.75?O=l+u-g-(C.y+C.height):O=l+u/2-(C.y+C.height/2),Math.abs(O)>.5&&M.setAttribute("transform",`translate(0, ${O})`)}catch{}}}}function YA(t,e,n,o){if(e.kind!=="free")return;const r=t.append("g").attr("data-annotation-index",String(o));e.id&&r.attr("data-annotation-id",e.id);const i=O8(e.x,n.width),s=O8(e.y,n.height);if(e.text){jy(r,e.text,i,s,{textColor:e.textColor,maxWidth:Xy(e.maxWidth,n.width),textAnchor:"middle",backgroundColor:n.backgroundColor,textOutline:e.textOutline});const a=r.select(".bc-annotation-text").node();if(a)try{const l=a.getBBox(),c=s-(l.y+l.height/2);Math.abs(c)>.5&&a.setAttribute("transform",`translate(0, ${c})`)}catch{}}}function P1(t,e,n,o){const r=n+.45*(t-n);return`M ${t} ${e} L ${r} ${e} L ${n} ${o}`}function hQ(t,e){const n=t.hasAttribute("marker-end"),o=Gy(t.parentElement);if(n&&o){const r=we(t),i=t.getAttribute("d"),s=`M ${o.fromX} ${o.fromY} L ${o.fromX} ${o.fromY}`;if(r.attr("d",s),o.style===Co.Elbow){const a={tipX:o.toX,tipY:o.toY,calloutX:o.fromX,calloutY:o.fromY},l={tipX:o.fromX,tipY:o.fromY,calloutX:o.fromX,calloutY:o.fromY};r.transition().duration(e).ease(Jf).attrTween("d",()=>{const c=vd(l,a);return u=>{const d=c(u);return P1(d.calloutX,d.calloutY,d.tipX,d.tipY)}})}else if(o.style===Co.CurveLeft||o.style===Co.CurveRight){const a={x:o.fromX,y:o.fromY},l={x:o.toX,y:o.toY},c=l.x-a.x,u=l.y-a.y,d=Math.sqrt(c*c+u*u),f=d*.8,h=o.style===Co.CurveRight?1:0,g=d/2,b=g<f?Math.sqrt(f*f-g*g):0,m=(a.x+l.x)/2,v=(a.y+l.y)/2,y=d>0?-u/d:0,x=d>0?c/d:0,_=h===1?1:-1,S=m+_*b*y,E=v+_*b*x,M=Math.atan2(a.y-E,a.x-S);let O=Math.atan2(l.y-E,l.x-S)-M;h===1&&O<=0&&(O+=2*Math.PI),h===0&&O>=0&&(O-=2*Math.PI),r.transition().duration(e).ease(Jf).attrTween("d",()=>P=>{if(P>=.98)return i;const R=M+P*O,$=S+f*Math.cos(R),A=E+f*Math.sin(R);return`M ${a.x} ${a.y} A ${f} ${f} 0 0 ${h} ${$} ${A}`})}else r.transition().duration(e).ease(Jf).attrTween("d",()=>{const a=no(o.fromX,o.toX),l=no(o.fromY,o.toY);return c=>`M ${o.fromX} ${o.fromY} L ${a(c)} ${l(c)}`})}else t.setAttribute("stroke-dasharray","1"),t.setAttribute("stroke-dashoffset","1"),we(t).transition().duration(e).ease(Jf).attr("stroke-dashoffset","0").on("end",()=>{t.removeAttribute("stroke-dasharray"),t.removeAttribute("stroke-dashoffset")})}function pQ(t,e,n){const o=Gy(t.parentElement);if(!o)return;const r=we(t);if(e.style===Co.Elbow&&o.style===Co.Elbow){const i={tipX:e.toX,tipY:e.toY,calloutX:e.fromX,calloutY:e.fromY},s={tipX:o.toX,tipY:o.toY,calloutX:o.fromX,calloutY:o.fromY};r.attr("d",P1(i.calloutX,i.calloutY,i.tipX,i.tipY)),r.transition().duration(n).ease(k1).attrTween("d",()=>{const a=vd(i,s);return l=>{const c=a(l);return P1(c.calloutX,c.calloutY,c.tipX,c.tipY)}})}else{const i={x:e.fromX,y:e.fromY},s={x:e.toX,y:e.toY},a={x:o.fromX,y:o.fromY},l={x:o.toX,y:o.toY},c=t.getAttribute("d"),u=`M ${i.x} ${i.y} L ${s.x} ${s.y}`;r.attr("d",u),r.transition().duration(n).ease(k1).attrTween("d",()=>{const d=vd(i,a),f=vd(s,l);return h=>{if(h>=.98)return c;const g=d(h),b=f(h);if(o.style===Co.Direct||e.style===Co.Direct)return`M ${g.x} ${g.y} L ${b.x} ${b.y}`;const m=b.x-g.x,v=b.y-g.y,x=Math.sqrt(m*m+v*v)*.8,_=o.style===Co.CurveRight?1:0;return`M ${g.x} ${g.y} A ${x} ${x} 0 0 ${_} ${b.x} ${b.y}`}})}}function jA(t,e,n,o){if(o<=0)return;const r=[...t.querySelectorAll("g[data-annotation-id]"),...e.querySelectorAll("g[data-annotation-id]")],i=new Set;for(const s of r){const a=s.getAttribute("data-annotation-id");i.add(a);const l=n.get(a);if(l){const c=s.querySelector(".bc-annotation-line");c&&l.line&&pQ(c,l.line,o);try{const u=s.getBBox(),d=l.rect.x-u.x,f=l.rect.y-u.y;if(Math.abs(d)>.5||Math.abs(f)>.5){const h=s.querySelectorAll(".bc-annotation-text, .bc-annotation-circle");for(const g of h){const b=g;b.style.transition="none",b.setAttribute("transform",`translate(${d}, ${f})`),b.getBoundingClientRect(),b.style.transition=`transform ${o}ms ease`,b.setAttribute("transform","translate(0, 0)")}}}catch{}}else{const c=s.querySelector(".bc-annotation-line");c&&hQ(c,o);const u=s.querySelectorAll(".bc-annotation-text, .bc-annotation-circle");for(const d of u){const f=d;f.style.opacity="0",f.getBoundingClientRect(),f.style.transition=`opacity ${o}ms ease`,f.style.opacity="1"}}}for(const[s,a]of n)if(!i.has(s)){const l=a.element.cloneNode(!0);t.appendChild(l),l.style.opacity="1",l.getBoundingClientRect(),l.style.transition=`opacity ${o}ms ease`,l.style.opacity="0",setTimeout(()=>l.remove(),o)}}function XA(t){if(!t)return;const e=parseFloat(t.getAttribute("width")||"0"),n=parseFloat(t.getAttribute("height")||"0");if(!e||!n)return;const o=t.getBBox();if(o.width===0&&o.height===0)return;const r=8,i=o.x,s=o.y,a=o.x+o.width,l=o.y+o.height,c=i<0?i-r:0,u=s<0?s-r:0,d=a>e?a+r:e,f=l>n?l+r:n;(c<0||u<0||d>e||f>n)&&we(t).attr("viewBox",`${c} ${u} ${d-c} ${f-u}`).attr("preserveAspectRatio","xMidYMid meet")}function Am(t,e,n){const o=t.ownerSVGElement??t;we(o).style("overflow","visible"),Yy(o);const r=we(t);let i;if(n.transition)if(n.priorAnnotations&&n.priorAnnotations.size>0)i=n.priorAnnotations;else{const l=t.querySelector(".bc-annotations"),c=t.querySelector(".bc-annotations-range");if(l||c){if(i=new Map,l)for(const[u,d]of cr(l))i.set(u,d);if(c)for(const[u,d]of cr(c))i.set(u,d)}}t.querySelectorAll(".bc-annotations, .bc-annotations-range").forEach(l=>l.remove());const s=r.insert("g",":first-child").attr("class","bc-annotations-range"),a=r.append("g").attr("class","bc-annotations").attr("data-ctx-width",String(n.width)).attr("data-ctx-height",String(n.height));for(let l=0;l<e.length;l++){const c=e[l];switch(c.kind??Lt.Point){case Lt.Point:GA(a,c,n,l);break;case Lt.Range:qA(s,c,n,l,a);break;case Lt.Free:YA(a,c,n,l);break}}if(n.transition){const l=Yl(du);jA(a.node(),s.node(),i??new Map,l)}XA(o)}function pu(t,e){return{name:"annotations",install(){},postDraw(n){var f;const o=n.base,r=((f=o.node())==null?void 0:f.ownerSVGElement)??o.node();r&&we(r).style("overflow","visible"),Yy(r);const i=o.node(),s=i==null?void 0:i.parentNode,a=s&&s!==r?we(s):o,l=a.node();let c;if(e.transition){if(e.priorAnnotations&&e.priorAnnotations.size>0)c=e.priorAnnotations;else if(l){const h=l.querySelector(".bc-annotations"),g=l.querySelector(".bc-annotations-range");if(h||g){if(c=new Map,h)for(const[b,m]of cr(h))c.set(b,m);if(g)for(const[b,m]of cr(g))c.set(b,m)}}}l&&l.querySelectorAll(".bc-annotations, .bc-annotations-range").forEach(h=>h.remove());const u=a.insert("g",":first-child").attr("class","bc-annotations-range"),d=a.append("g").attr("class","bc-annotations").attr("data-ctx-width",String(e.width)).attr("data-ctx-height",String(e.height));for(let h=0;h<t.length;h++){const g=t[h];switch(g.kind??Lt.Point){case Lt.Point:GA(d,g,e,h);break;case Lt.Range:qA(u,g,e,h,d);break;case Lt.Free:YA(d,g,e,h);break}}if(e.transition){const h=Yl(du);jA(d.node(),u.node(),c??new Map,h)}XA(r)}}}const{min:mQ,max:gQ}=Math,_l=(t,e=0,n=1)=>mQ(gQ(e,t),n),Ky=t=>{t._clipped=!1,t._unclipped=t.slice(0);for(let e=0;e<=3;e++)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]=_l(t[e],0,255)):e===3&&(t[e]=_l(t[e],0,1));return t},KA={};for(let t of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])KA[`[object ${t}]`]=t.toLowerCase();function Ot(t){return KA[Object.prototype.toString.call(t)]||"object"}const St=(t,e=null)=>t.length>=3?Array.prototype.slice.call(t):Ot(t[0])=="object"&&e?e.split("").filter(n=>t[0][n]!==void 0).map(n=>t[0][n]):t[0].slice(0),mu=t=>{if(t.length<2)return null;const e=t.length-1;return Ot(t[e])=="string"?t[e].toLowerCase():null},{PI:$m,min:ZA,max:QA}=Math,Nr=t=>Math.round(t*100)/100,D1=t=>Math.round(t*100)/100,bs=$m*2,Kg=$m/3,vQ=$m/180,bQ=180/$m;function JA(t){return[...t.slice(0,3).reverse(),...t.slice(3)]}const wt={format:{},autodetect:[]};class Ee{constructor(...e){const n=this;if(Ot(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let o=mu(e),r=!1;if(!o){r=!0,wt.sorted||(wt.autodetect=wt.autodetect.sort((i,s)=>s.p-i.p),wt.sorted=!0);for(let i of wt.autodetect)if(o=i.test(...e),o)break}if(wt.format[o]){const i=wt.format[o].apply(null,r?e:e.slice(0,-1));n._rgb=Ky(i)}else throw new Error("unknown format: "+e);n._rgb.length===3&&n._rgb.push(1)}toString(){return Ot(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const yQ="3.2.0",lt=(...t)=>new Ee(...t);lt.version=yQ;const Kc={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},xQ=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,wQ=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,e5=t=>{if(t.match(xQ)){(t.length===4||t.length===7)&&(t=t.substr(1)),t.length===3&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const e=parseInt(t,16),n=e>>16,o=e>>8&255,r=e&255;return[n,o,r,1]}if(t.match(wQ)){(t.length===5||t.length===9)&&(t=t.substr(1)),t.length===4&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const e=parseInt(t,16),n=e>>24&255,o=e>>16&255,r=e>>8&255,i=Math.round((e&255)/255*100)/100;return[n,o,r,i]}throw new Error(`unknown hex color: ${t}`)},{round:rh}=Math,t5=(...t)=>{let[e,n,o,r]=St(t,"rgba"),i=mu(t)||"auto";r===void 0&&(r=1),i==="auto"&&(i=r<1?"rgba":"rgb"),e=rh(e),n=rh(n),o=rh(o);let a="000000"+(e<<16|n<<8|o).toString(16);a=a.substr(a.length-6);let l="0"+rh(r*255).toString(16);switch(l=l.substr(l.length-2),i.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};Ee.prototype.name=function(){const t=t5(this._rgb,"rgb");for(let e of Object.keys(Kc))if(Kc[e]===t)return e.toLowerCase();return t};wt.format.named=t=>{if(t=t.toLowerCase(),Kc[t])return e5(Kc[t]);throw new Error("unknown color name: "+t)};wt.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&Ot(t)==="string"&&Kc[t.toLowerCase()])return"named"}});Ee.prototype.alpha=function(t,e=!1){return t!==void 0&&Ot(t)==="number"?e?(this._rgb[3]=t,this):new Ee([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]};Ee.prototype.clipped=function(){return this._rgb._clipped||!1};const Xi={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},_Q=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function As(t){const e=_Q.get(String(t).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+t);Xi.labWhitePoint=t,Xi.Xn=e[0],Xi.Zn=e[1]}function Yd(){return Xi.labWhitePoint}const Zy=(...t)=>{t=St(t,"lab");const[e,n,o]=t,[r,i,s]=SQ(e,n,o),[a,l,c]=n5(r,i,s);return[a,l,c,t.length>3?t[3]:1]},SQ=(t,e,n)=>{const{kE:o,kK:r,kKE:i,Xn:s,Yn:a,Zn:l}=Xi,c=(t+16)/116,u=.002*e+c,d=c-.005*n,f=u*u*u,h=d*d*d,g=f>o?f:(116*u-16)/r,b=t>i?Math.pow((t+16)/116,3):t/r,m=h>o?h:(116*d-16)/r,v=g*s,y=b*a,x=m*l;return[v,y,x]},Zg=t=>{const e=Math.sign(t);return t=Math.abs(t),(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*e},n5=(t,e,n)=>{const{MtxAdaptMa:o,MtxAdaptMaI:r,MtxXYZ2RGB:i,RefWhiteRGB:s,Xn:a,Yn:l,Zn:c}=Xi,u=a*o.m00+l*o.m10+c*o.m20,d=a*o.m01+l*o.m11+c*o.m21,f=a*o.m02+l*o.m12+c*o.m22,h=s.X*o.m00+s.Y*o.m10+s.Z*o.m20,g=s.X*o.m01+s.Y*o.m11+s.Z*o.m21,b=s.X*o.m02+s.Y*o.m12+s.Z*o.m22,m=(t*o.m00+e*o.m10+n*o.m20)*(h/u),v=(t*o.m01+e*o.m11+n*o.m21)*(g/d),y=(t*o.m02+e*o.m12+n*o.m22)*(b/f),x=m*r.m00+v*r.m10+y*r.m20,_=m*r.m01+v*r.m11+y*r.m21,S=m*r.m02+v*r.m12+y*r.m22,E=Zg(x*i.m00+_*i.m10+S*i.m20),M=Zg(x*i.m01+_*i.m11+S*i.m21),C=Zg(x*i.m02+_*i.m12+S*i.m22);return[E*255,M*255,C*255]},Qy=(...t)=>{const[e,n,o,...r]=St(t,"rgb"),[i,s,a]=o5(e,n,o),[l,c,u]=kQ(i,s,a);return[l,c,u,...r.length>0&&r[0]<1?[r[0]]:[]]};function kQ(t,e,n){const{Xn:o,Yn:r,Zn:i,kE:s,kK:a}=Xi,l=t/o,c=e/r,u=n/i,d=l>s?Math.pow(l,1/3):(a*l+16)/116,f=c>s?Math.pow(c,1/3):(a*c+16)/116,h=u>s?Math.pow(u,1/3):(a*u+16)/116;return[116*f-16,500*(d-f),200*(f-h)]}function Qg(t){const e=Math.sign(t);return t=Math.abs(t),(t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4))*e}const o5=(t,e,n)=>{t=Qg(t/255),e=Qg(e/255),n=Qg(n/255);const{MtxRGB2XYZ:o,MtxAdaptMa:r,MtxAdaptMaI:i,Xn:s,Yn:a,Zn:l,As:c,Bs:u,Cs:d}=Xi;let f=t*o.m00+e*o.m10+n*o.m20,h=t*o.m01+e*o.m11+n*o.m21,g=t*o.m02+e*o.m12+n*o.m22;const b=s*r.m00+a*r.m10+l*r.m20,m=s*r.m01+a*r.m11+l*r.m21,v=s*r.m02+a*r.m12+l*r.m22;let y=f*r.m00+h*r.m10+g*r.m20,x=f*r.m01+h*r.m11+g*r.m21,_=f*r.m02+h*r.m12+g*r.m22;return y*=b/c,x*=m/u,_*=v/d,f=y*i.m00+x*i.m10+_*i.m20,h=y*i.m01+x*i.m11+_*i.m21,g=y*i.m02+x*i.m12+_*i.m22,[f,h,g]};Ee.prototype.lab=function(){return Qy(this._rgb)};const CQ=(...t)=>new Ee(...t,"lab");Object.assign(lt,{lab:CQ,getLabWhitePoint:Yd,setLabWhitePoint:As});wt.format.lab=Zy;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"lab"),Ot(t)==="array"&&t.length===3)return"lab"}});Ee.prototype.darken=function(t=1){const e=this,n=e.lab();return n[0]-=Xi.Kn*t,new Ee(n,"lab").alpha(e.alpha(),!0)};Ee.prototype.brighten=function(t=1){return this.darken(-t)};Ee.prototype.darker=Ee.prototype.darken;Ee.prototype.brighter=Ee.prototype.brighten;Ee.prototype.get=function(t){const[e,n]=t.split("."),o=this[e]();if(n){const r=e.indexOf(n)-(e.substr(0,2)==="ok"?2:0);if(r>-1)return o[r];throw new Error(`unknown channel ${n} in mode ${e}`)}else return o};const{pow:AQ}=Math,$Q=1e-7,TQ=20;Ee.prototype.luminance=function(t,e="rgb"){if(t!==void 0&&Ot(t)==="number"){if(t===0)return new Ee([0,0,0,this._rgb[3]],"rgb");if(t===1)return new Ee([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),o=TQ;const r=(s,a)=>{const l=s.interpolate(a,.5,e),c=l.luminance();return Math.abs(t-c)<$Q||!o--?l:c>t?r(s,l):r(l,a)},i=(n>t?r(new Ee([0,0,0]),this):r(this,new Ee([255,255,255]))).rgb();return new Ee([...i,this._rgb[3]])}return MQ(...this._rgb.slice(0,3))};const MQ=(t,e,n)=>(t=Jg(t),e=Jg(e),n=Jg(n),.2126*t+.7152*e+.0722*n),Jg=t=>(t/=255,t<=.03928?t/12.92:AQ((t+.055)/1.055,2.4)),Mo={},Zc=(t,e,n=.5,...o)=>{let r=o[0]||"lrgb";if(!Mo[r]&&!o.length&&(r=Object.keys(Mo)[0]),!Mo[r])throw new Error(`interpolation mode ${r} is not defined`);return Ot(t)!=="object"&&(t=new Ee(t)),Ot(e)!=="object"&&(e=new Ee(e)),Mo[r](t,e,n).alpha(t.alpha()+n*(e.alpha()-t.alpha()))};Ee.prototype.mix=Ee.prototype.interpolate=function(t,e=.5,...n){return Zc(this,t,e,...n)};Ee.prototype.premultiply=function(t=!1){const e=this._rgb,n=e[3];return t?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new Ee([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};const{sin:OQ,cos:BQ}=Math,r5=(...t)=>{let[e,n,o]=St(t,"lch");return isNaN(o)&&(o=0),o=o*vQ,[e,BQ(o)*n,OQ(o)*n]},Jy=(...t)=>{t=St(t,"lch");const[e,n,o]=t,[r,i,s]=r5(e,n,o),[a,l,c]=Zy(r,i,s);return[a,l,c,t.length>3?t[3]:1]},LQ=(...t)=>{const e=JA(St(t,"hcl"));return Jy(...e)},{sqrt:PQ,atan2:DQ,round:EQ}=Math,i5=(...t)=>{const[e,n,o]=St(t,"lab"),r=PQ(n*n+o*o);let i=(DQ(o,n)*bQ+360)%360;return EQ(r*1e4)===0&&(i=Number.NaN),[e,r,i]},e2=(...t)=>{const[e,n,o,...r]=St(t,"rgb"),[i,s,a]=Qy(e,n,o),[l,c,u]=i5(i,s,a);return[l,c,u,...r.length>0&&r[0]<1?[r[0]]:[]]};Ee.prototype.lch=function(){return e2(this._rgb)};Ee.prototype.hcl=function(){return JA(e2(this._rgb))};const IQ=(...t)=>new Ee(...t,"lch"),NQ=(...t)=>new Ee(...t,"hcl");Object.assign(lt,{lch:IQ,hcl:NQ});wt.format.lch=Jy;wt.format.hcl=LQ;["lch","hcl"].forEach(t=>wt.autodetect.push({p:2,test:(...e)=>{if(e=St(e,t),Ot(e)==="array"&&e.length===3)return t}}));Ee.prototype.saturate=function(t=1){const e=this,n=e.lch();return n[1]+=Xi.Kn*t,n[1]<0&&(n[1]=0),new Ee(n,"lch").alpha(e.alpha(),!0)};Ee.prototype.desaturate=function(t=1){return this.saturate(-t)};Ee.prototype.set=function(t,e,n=!1){const[o,r]=t.split("."),i=this[o]();if(r){const s=o.indexOf(r)-(o.substr(0,2)==="ok"?2:0);if(s>-1){if(Ot(e)=="string")switch(e.charAt(0)){case"+":i[s]+=+e;break;case"-":i[s]+=+e;break;case"*":i[s]*=+e.substr(1);break;case"/":i[s]/=+e.substr(1);break;default:i[s]=+e}else if(Ot(e)==="number")i[s]=e;else throw new Error("unsupported value for Color.set");const a=new Ee(i,o);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${r} in mode ${o}`)}else return i};Ee.prototype.tint=function(t=.5,...e){return Zc(this,"white",t,...e)};Ee.prototype.shade=function(t=.5,...e){return Zc(this,"black",t,...e)};const RQ=(t,e,n)=>{const o=t._rgb,r=e._rgb;return new Ee(o[0]+n*(r[0]-o[0]),o[1]+n*(r[1]-o[1]),o[2]+n*(r[2]-o[2]),"rgb")};Mo.rgb=RQ;const{sqrt:ev,pow:ac}=Math,FQ=(t,e,n)=>{const[o,r,i]=t._rgb,[s,a,l]=e._rgb;return new Ee(ev(ac(o,2)*(1-n)+ac(s,2)*n),ev(ac(r,2)*(1-n)+ac(a,2)*n),ev(ac(i,2)*(1-n)+ac(l,2)*n),"rgb")};Mo.lrgb=FQ;const VQ=(t,e,n)=>{const o=t.lab(),r=e.lab();return new Ee(o[0]+n*(r[0]-o[0]),o[1]+n*(r[1]-o[1]),o[2]+n*(r[2]-o[2]),"lab")};Mo.lab=VQ;const gu=(t,e,n,o)=>{let r,i;o==="hsl"?(r=t.hsl(),i=e.hsl()):o==="hsv"?(r=t.hsv(),i=e.hsv()):o==="hcg"?(r=t.hcg(),i=e.hcg()):o==="hsi"?(r=t.hsi(),i=e.hsi()):o==="lch"||o==="hcl"?(o="hcl",r=t.hcl(),i=e.hcl()):o==="oklch"&&(r=t.oklch().reverse(),i=e.oklch().reverse());let s,a,l,c,u,d;(o.substr(0,1)==="h"||o==="oklch")&&([s,l,u]=r,[a,c,d]=i);let f,h,g,b;return!isNaN(s)&&!isNaN(a)?(a>s&&a-s>180?b=a-(s+360):a<s&&s-a>180?b=a+360-s:b=a-s,h=s+n*b):isNaN(s)?isNaN(a)?h=Number.NaN:(h=a,(u==1||u==0)&&o!="hsv"&&(f=c)):(h=s,(d==1||d==0)&&o!="hsv"&&(f=l)),f===void 0&&(f=l+n*(c-l)),g=u+n*(d-u),o==="oklch"?new Ee([g,f,h],o):new Ee([h,f,g],o)},s5=(t,e,n)=>gu(t,e,n,"lch");Mo.lch=s5;Mo.hcl=s5;const zQ=t=>{if(Ot(t)=="number"&&t>=0&&t<=16777215){const e=t>>16,n=t>>8&255,o=t&255;return[e,n,o,1]}throw new Error("unknown num color: "+t)},HQ=(...t)=>{const[e,n,o]=St(t,"rgb");return(e<<16)+(n<<8)+o};Ee.prototype.num=function(){return HQ(this._rgb)};const WQ=(...t)=>new Ee(...t,"num");Object.assign(lt,{num:WQ});wt.format.num=zQ;wt.autodetect.push({p:5,test:(...t)=>{if(t.length===1&&Ot(t[0])==="number"&&t[0]>=0&&t[0]<=16777215)return"num"}});const UQ=(t,e,n)=>{const o=t.num(),r=e.num();return new Ee(o+n*(r-o),"num")};Mo.num=UQ;const{floor:GQ}=Math,qQ=(...t)=>{t=St(t,"hcg");let[e,n,o]=t,r,i,s;o=o*255;const a=n*255;if(n===0)r=i=s=o;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=GQ(e),c=e-l,u=o*(1-n),d=u+a*(1-c),f=u+a*c,h=u+a;switch(l){case 0:[r,i,s]=[h,f,u];break;case 1:[r,i,s]=[d,h,u];break;case 2:[r,i,s]=[u,h,f];break;case 3:[r,i,s]=[u,d,h];break;case 4:[r,i,s]=[f,u,h];break;case 5:[r,i,s]=[h,u,d];break}}return[r,i,s,t.length>3?t[3]:1]},YQ=(...t)=>{const[e,n,o]=St(t,"rgb"),r=ZA(e,n,o),i=QA(e,n,o),s=i-r,a=s*100/255,l=r/(255-s)*100;let c;return s===0?c=Number.NaN:(e===i&&(c=(n-o)/s),n===i&&(c=2+(o-e)/s),o===i&&(c=4+(e-n)/s),c*=60,c<0&&(c+=360)),[c,a,l]};Ee.prototype.hcg=function(){return YQ(this._rgb)};const jQ=(...t)=>new Ee(...t,"hcg");lt.hcg=jQ;wt.format.hcg=qQ;wt.autodetect.push({p:1,test:(...t)=>{if(t=St(t,"hcg"),Ot(t)==="array"&&t.length===3)return"hcg"}});const XQ=(t,e,n)=>gu(t,e,n,"hcg");Mo.hcg=XQ;const{cos:lc}=Math,KQ=(...t)=>{t=St(t,"hsi");let[e,n,o]=t,r,i,s;return isNaN(e)&&(e=0),isNaN(n)&&(n=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(s=(1-n)/3,r=(1+n*lc(bs*e)/lc(Kg-bs*e))/3,i=1-(s+r)):e<2/3?(e-=1/3,r=(1-n)/3,i=(1+n*lc(bs*e)/lc(Kg-bs*e))/3,s=1-(r+i)):(e-=2/3,i=(1-n)/3,s=(1+n*lc(bs*e)/lc(Kg-bs*e))/3,r=1-(i+s)),r=_l(o*r*3),i=_l(o*i*3),s=_l(o*s*3),[r*255,i*255,s*255,t.length>3?t[3]:1]},{min:ZQ,sqrt:QQ,acos:JQ}=Math,eJ=(...t)=>{let[e,n,o]=St(t,"rgb");e/=255,n/=255,o/=255;let r;const i=ZQ(e,n,o),s=(e+n+o)/3,a=s>0?1-i/s:0;return a===0?r=NaN:(r=(e-n+(e-o))/2,r/=QQ((e-n)*(e-n)+(e-o)*(n-o)),r=JQ(r),o>n&&(r=bs-r),r/=bs),[r*360,a,s]};Ee.prototype.hsi=function(){return eJ(this._rgb)};const tJ=(...t)=>new Ee(...t,"hsi");lt.hsi=tJ;wt.format.hsi=KQ;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"hsi"),Ot(t)==="array"&&t.length===3)return"hsi"}});const nJ=(t,e,n)=>gu(t,e,n,"hsi");Mo.hsi=nJ;const E1=(...t)=>{t=St(t,"hsl");const[e,n,o]=t;let r,i,s;if(n===0)r=i=s=o*255;else{const a=[0,0,0],l=[0,0,0],c=o<.5?o*(1+n):o+n-o*n,u=2*o-c,d=e/360;a[0]=d+1/3,a[1]=d,a[2]=d-1/3;for(let f=0;f<3;f++)a[f]<0&&(a[f]+=1),a[f]>1&&(a[f]-=1),6*a[f]<1?l[f]=u+(c-u)*6*a[f]:2*a[f]<1?l[f]=c:3*a[f]<2?l[f]=u+(c-u)*(2/3-a[f])*6:l[f]=u;[r,i,s]=[l[0]*255,l[1]*255,l[2]*255]}return t.length>3?[r,i,s,t[3]]:[r,i,s,1]},a5=(...t)=>{t=St(t,"rgba");let[e,n,o]=t;e/=255,n/=255,o/=255;const r=ZA(e,n,o),i=QA(e,n,o),s=(i+r)/2;let a,l;return i===r?(a=0,l=Number.NaN):a=s<.5?(i-r)/(i+r):(i-r)/(2-i-r),e==i?l=(n-o)/(i-r):n==i?l=2+(o-e)/(i-r):o==i&&(l=4+(e-n)/(i-r)),l*=60,l<0&&(l+=360),t.length>3&&t[3]!==void 0?[l,a,s,t[3]]:[l,a,s]};Ee.prototype.hsl=function(){return a5(this._rgb)};const oJ=(...t)=>new Ee(...t,"hsl");lt.hsl=oJ;wt.format.hsl=E1;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"hsl"),Ot(t)==="array"&&t.length===3)return"hsl"}});const rJ=(t,e,n)=>gu(t,e,n,"hsl");Mo.hsl=rJ;const{floor:iJ}=Math,sJ=(...t)=>{t=St(t,"hsv");let[e,n,o]=t,r,i,s;if(o*=255,n===0)r=i=s=o;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const a=iJ(e),l=e-a,c=o*(1-n),u=o*(1-n*l),d=o*(1-n*(1-l));switch(a){case 0:[r,i,s]=[o,d,c];break;case 1:[r,i,s]=[u,o,c];break;case 2:[r,i,s]=[c,o,d];break;case 3:[r,i,s]=[c,u,o];break;case 4:[r,i,s]=[d,c,o];break;case 5:[r,i,s]=[o,c,u];break}}return[r,i,s,t.length>3?t[3]:1]},{min:aJ,max:lJ}=Math,cJ=(...t)=>{t=St(t,"rgb");let[e,n,o]=t;const r=aJ(e,n,o),i=lJ(e,n,o),s=i-r;let a,l,c;return c=i/255,i===0?(a=Number.NaN,l=0):(l=s/i,e===i&&(a=(n-o)/s),n===i&&(a=2+(o-e)/s),o===i&&(a=4+(e-n)/s),a*=60,a<0&&(a+=360)),[a,l,c]};Ee.prototype.hsv=function(){return cJ(this._rgb)};const uJ=(...t)=>new Ee(...t,"hsv");lt.hsv=uJ;wt.format.hsv=sJ;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"hsv"),Ot(t)==="array"&&t.length===3)return"hsv"}});const dJ=(t,e,n)=>gu(t,e,n,"hsv");Mo.hsv=dJ;function Gp(t,e){let n=t.length;Array.isArray(t[0])||(t=[t]),Array.isArray(e[0])||(e=e.map(s=>[s]));let o=e[0].length,r=e[0].map((s,a)=>e.map(l=>l[a])),i=t.map(s=>r.map(a=>Array.isArray(s)?s.reduce((l,c,u)=>l+c*(a[u]||0),0):a.reduce((l,c)=>l+c*s,0)));return n===1&&(i=i[0]),o===1?i.map(s=>s[0]):i}const t2=(...t)=>{t=St(t,"lab");const[e,n,o,...r]=t,[i,s,a]=fJ([e,n,o]),[l,c,u]=n5(i,s,a);return[l,c,u,...r.length>0&&r[0]<1?[r[0]]:[]]};function fJ(t){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],o=Gp(n,t);return Gp(e,o.map(r=>r**3))}const n2=(...t)=>{const[e,n,o,...r]=St(t,"rgb"),i=o5(e,n,o);return[...hJ(i),...r.length>0&&r[0]<1?[r[0]]:[]]};function hJ(t){const e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],o=Gp(e,t);return Gp(n,o.map(r=>Math.cbrt(r)))}Ee.prototype.oklab=function(){return n2(this._rgb)};const pJ=(...t)=>new Ee(...t,"oklab");Object.assign(lt,{oklab:pJ});wt.format.oklab=t2;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"oklab"),Ot(t)==="array"&&t.length===3)return"oklab"}});const mJ=(t,e,n)=>{const o=t.oklab(),r=e.oklab();return new Ee(o[0]+n*(r[0]-o[0]),o[1]+n*(r[1]-o[1]),o[2]+n*(r[2]-o[2]),"oklab")};Mo.oklab=mJ;const gJ=(t,e,n)=>gu(t,e,n,"oklch");Mo.oklch=gJ;const{pow:tv,sqrt:nv,PI:ov,cos:L8,sin:P8,atan2:vJ}=Math,bJ=(t,e="lrgb",n=null)=>{const o=t.length;n||(n=Array.from(new Array(o)).map(()=>1));const r=o/n.reduce(function(d,f){return d+f});if(n.forEach((d,f)=>{n[f]*=r}),t=t.map(d=>new Ee(d)),e==="lrgb")return yJ(t,n);const i=t.shift(),s=i.get(e),a=[];let l=0,c=0;for(let d=0;d<s.length;d++)if(s[d]=(s[d]||0)*n[0],a.push(isNaN(s[d])?0:n[0]),e.charAt(d)==="h"&&!isNaN(s[d])){const f=s[d]/180*ov;l+=L8(f)*n[0],c+=P8(f)*n[0]}let u=i.alpha()*n[0];t.forEach((d,f)=>{const h=d.get(e);u+=d.alpha()*n[f+1];for(let g=0;g<s.length;g++)if(!isNaN(h[g]))if(a[g]+=n[f+1],e.charAt(g)==="h"){const b=h[g]/180*ov;l+=L8(b)*n[f+1],c+=P8(b)*n[f+1]}else s[g]+=h[g]*n[f+1]});for(let d=0;d<s.length;d++)if(e.charAt(d)==="h"){let f=vJ(c/a[d],l/a[d])/ov*180;for(;f<0;)f+=360;for(;f>=360;)f-=360;s[d]=f}else s[d]=s[d]/a[d];return u/=o,new Ee(s,e).alpha(u>.99999?1:u,!0)},yJ=(t,e)=>{const n=t.length,o=[0,0,0,0];for(let r=0;r<t.length;r++){const i=t[r],s=e[r]/n,a=i._rgb;o[0]+=tv(a[0],2)*s,o[1]+=tv(a[1],2)*s,o[2]+=tv(a[2],2)*s,o[3]+=a[3]*s}return o[0]=nv(o[0]),o[1]=nv(o[1]),o[2]=nv(o[2]),o[3]>.9999999&&(o[3]=1),new Ee(Ky(o))},{pow:xJ}=Math;function qp(t){let e="rgb",n=lt("#ccc"),o=0,r=[0,1],i=[0,1],s=[],a=[0,0],l=!1,c=[],u=!1,d=0,f=1,h=!1,g={},b=!0,m=1;const v=function(C){if(C=C||["#fff","#000"],C&&Ot(C)==="string"&<.brewer&<.brewer[C.toLowerCase()]&&(C=lt.brewer[C.toLowerCase()]),Ot(C)==="array"){C.length===1&&(C=[C[0],C[0]]),C=C.slice(0);for(let O=0;O<C.length;O++)C[O]=lt(C[O]);s.length=0;for(let O=0;O<C.length;O++)s.push(O/(C.length-1))}return E(),c=C},y=function(C){if(l!=null){const O=l.length-1;let P=0;for(;P<O&&C>=l[P];)P++;return P-1}return 0};let x=C=>C,_=C=>C;const S=function(C,O){let P,R;if(O==null&&(O=!1),isNaN(C)||C===null)return n;O?R=C:l&&l.length>2?R=y(C)/(l.length-2):f!==d?R=(C-d)/(f-d):R=1,R=_(R),O||(R=x(R)),m!==1&&(R=xJ(R,m)),R=a[0]+R*(1-a[0]-a[1]),R=_l(R,0,1);const $=Math.floor(R*1e4);if(b&&g[$])P=g[$];else{if(Ot(c)==="array")for(let A=0;A<s.length;A++){const L=s[A];if(R<=L){P=c[A];break}if(R>=L&&A===s.length-1){P=c[A];break}if(R>L&&R<s[A+1]){R=(R-L)/(s[A+1]-L),P=lt.interpolate(c[A],c[A+1],R,e);break}}else Ot(c)==="function"&&(P=c(R));b&&(g[$]=P)}return P};var E=()=>g={};v(t);const M=function(C){const O=lt(S(C));return u&&O[u]?O[u]():O};return M.classes=function(C){if(C!=null){if(Ot(C)==="array")l=C,r=[C[0],C[C.length-1]];else{const O=lt.analyze(r);C===0?l=[O.min,O.max]:l=lt.limits(O,"e",C)}return M}return l},M.domain=function(C){if(!arguments.length)return i;i=C.slice(0),d=C[0],f=C[C.length-1],s=[];const O=c.length;if(C.length===O&&d!==f)for(let P of Array.from(C))s.push((P-d)/(f-d));else{for(let P=0;P<O;P++)s.push(P/(O-1));if(C.length>2){const P=C.map(($,A)=>A/(C.length-1)),R=C.map($=>($-d)/(f-d));R.every(($,A)=>P[A]===$)||(_=$=>{if($<=0||$>=1)return $;let A=0;for(;$>=R[A+1];)A++;const L=($-R[A])/(R[A+1]-R[A]);return P[A]+L*(P[A+1]-P[A])})}}return r=[d,f],M},M.mode=function(C){return arguments.length?(e=C,E(),M):e},M.range=function(C,O){return v(C),M},M.out=function(C){return u=C,M},M.spread=function(C){return arguments.length?(o=C,M):o},M.correctLightness=function(C){return C==null&&(C=!0),h=C,E(),h?x=function(O){const P=S(0,!0).lab()[0],R=S(1,!0).lab()[0],$=P>R;let A=S(O,!0).lab()[0];const L=P+(R-P)*O;let B=A-L,F=0,z=1,V=20;for(;Math.abs(B)>.01&&V-- >0;)(function(){return $&&(B*=-1),B<0?(F=O,O+=(z-O)*.5):(z=O,O+=(F-O)*.5),A=S(O,!0).lab()[0],B=A-L})();return O}:x=O=>O,M},M.padding=function(C){return C!=null?(Ot(C)==="number"&&(C=[C,C]),a=C,M):a},M.colors=function(C,O){arguments.length<2&&(O="hex");let P=[];if(arguments.length===0)P=c.slice(0);else if(C===1)P=[M(.5)];else if(C>1){const R=r[0],$=r[1]-R;P=wJ(0,C).map(A=>M(R+A/(C-1)*$))}else{t=[];let R=[];if(l&&l.length>2)for(let $=1,A=l.length,L=1<=A;L?$<A:$>A;L?$++:$--)R.push((l[$-1]+l[$])*.5);else R=r;P=R.map($=>M($))}return lt[O]&&(P=P.map(R=>R[O]())),P},M.cache=function(C){return C!=null?(b=C,M):b},M.gamma=function(C){return C!=null?(m=C,M):m},M.nodata=function(C){return C!=null?(n=lt(C),M):n},M}function wJ(t,e,n){let o=[],r=t<e,i=e;for(let s=t;r?s<i:s>i;r?s++:s--)o.push(s);return o}const _J=function(t){let e=[1,1];for(let n=1;n<t;n++){let o=[1];for(let r=1;r<=e.length;r++)o[r]=(e[r]||0)+e[r-1];e=o}return e},SJ=function(t){let e,n,o,r;if(t=t.map(i=>new Ee(i)),t.length===2)[n,o]=t.map(i=>i.lab()),e=function(i){const s=[0,1,2].map(a=>n[a]+i*(o[a]-n[a]));return new Ee(s,"lab")};else if(t.length===3)[n,o,r]=t.map(i=>i.lab()),e=function(i){const s=[0,1,2].map(a=>(1-i)*(1-i)*n[a]+2*(1-i)*i*o[a]+i*i*r[a]);return new Ee(s,"lab")};else if(t.length===4){let i;[n,o,r,i]=t.map(s=>s.lab()),e=function(s){const a=[0,1,2].map(l=>(1-s)*(1-s)*(1-s)*n[l]+3*(1-s)*(1-s)*s*o[l]+3*(1-s)*s*s*r[l]+s*s*s*i[l]);return new Ee(a,"lab")}}else if(t.length>=5){let i,s,a;i=t.map(l=>l.lab()),a=t.length-1,s=_J(a),e=function(l){const c=1-l,u=[0,1,2].map(d=>i.reduce((f,h,g)=>f+s[g]*c**(a-g)*l**g*h[d],0));return new Ee(u,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},kJ=t=>{const e=SJ(t);return e.scale=()=>qp(e),e},{round:l5}=Math;Ee.prototype.rgb=function(t=!0){return t===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(l5)};Ee.prototype.rgba=function(t=!0){return this._rgb.slice(0,4).map((e,n)=>n<3?t===!1?e:l5(e):e)};const CJ=(...t)=>new Ee(...t,"rgb");Object.assign(lt,{rgb:CJ});wt.format.rgb=(...t)=>{const e=St(t,"rgba");return e[3]===void 0&&(e[3]=1),e};wt.autodetect.push({p:3,test:(...t)=>{if(t=St(t,"rgba"),Ot(t)==="array"&&(t.length===3||t.length===4&&Ot(t[3])=="number"&&t[3]>=0&&t[3]<=1))return"rgb"}});const wi=(t,e,n)=>{if(!wi[n])throw new Error("unknown blend mode "+n);return wi[n](t,e)},Wa=t=>(e,n)=>{const o=lt(n).rgb(),r=lt(e).rgb();return lt.rgb(t(o,r))},Ua=t=>(e,n)=>{const o=[];return o[0]=t(e[0],n[0]),o[1]=t(e[1],n[1]),o[2]=t(e[2],n[2]),o},AJ=t=>t,$J=(t,e)=>t*e/255,TJ=(t,e)=>t>e?e:t,MJ=(t,e)=>t>e?t:e,OJ=(t,e)=>255*(1-(1-t/255)*(1-e/255)),BJ=(t,e)=>e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255)),LJ=(t,e)=>255*(1-(1-e/255)/(t/255)),PJ=(t,e)=>t===255?255:(t=255*(e/255)/(1-t/255),t>255?255:t);wi.normal=Wa(Ua(AJ));wi.multiply=Wa(Ua($J));wi.screen=Wa(Ua(OJ));wi.overlay=Wa(Ua(BJ));wi.darken=Wa(Ua(TJ));wi.lighten=Wa(Ua(MJ));wi.dodge=Wa(Ua(PJ));wi.burn=Wa(Ua(LJ));const{pow:DJ,sin:EJ,cos:IJ}=Math;function NJ(t=300,e=-1.5,n=1,o=1,r=[0,1]){let i=0,s;Ot(r)==="array"?s=r[1]-r[0]:(s=0,r=[r,r]);const a=function(l){const c=bs*((t+120)/360+e*l),u=DJ(r[0]+s*l,o),f=(i!==0?n[0]+l*i:n)*u*(1-u)/2,h=IJ(c),g=EJ(c),b=u+f*(-.14861*h+1.78277*g),m=u+f*(-.29227*h-.90649*g),v=u+f*(1.97294*h);return lt(Ky([b*255,m*255,v*255,1]))};return a.start=function(l){return l==null?t:(t=l,a)},a.rotations=function(l){return l==null?e:(e=l,a)},a.gamma=function(l){return l==null?o:(o=l,a)},a.hue=function(l){return l==null?n:(n=l,Ot(n)==="array"?(i=n[1]-n[0],i===0&&(n=n[1])):i=0,a)},a.lightness=function(l){return l==null?r:(Ot(l)==="array"?(r=l,s=l[1]-l[0]):(r=[l,l],s=0),a)},a.scale=()=>lt.scale(a),a.hue(n),a}const RJ="0123456789abcdef",{floor:FJ,random:VJ}=Math,zJ=(t=VJ)=>{let e="#";for(let n=0;n<6;n++)e+=RJ.charAt(FJ(t()*16));return new Ee(e,"hex")},{log:D8,pow:HJ,floor:WJ,abs:UJ}=Math;function c5(t,e=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Ot(t)==="object"&&(t=Object.values(t)),t.forEach(o=>{e&&Ot(o)==="object"&&(o=o[e]),o!=null&&!isNaN(o)&&(n.values.push(o),n.sum+=o,o<n.min&&(n.min=o),o>n.max&&(n.max=o),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(o,r)=>u5(n,o,r),n}function u5(t,e="equal",n=7){Ot(t)=="array"&&(t=c5(t));const{min:o,max:r}=t,i=t.values.sort((a,l)=>a-l);if(n===1)return[o,r];const s=[];if(e.substr(0,1)==="c"&&(s.push(o),s.push(r)),e.substr(0,1)==="e"){s.push(o);for(let a=1;a<n;a++)s.push(o+a/n*(r-o));s.push(r)}else if(e.substr(0,1)==="l"){if(o<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*D8(o),l=Math.LOG10E*D8(r);s.push(o);for(let c=1;c<n;c++)s.push(HJ(10,a+c/n*(l-a)));s.push(r)}else if(e.substr(0,1)==="q"){s.push(o);for(let a=1;a<n;a++){const l=(i.length-1)*a/n,c=WJ(l);if(c===l)s.push(i[c]);else{const u=l-c;s.push(i[c]*(1-u)+i[c+1]*u)}}s.push(r)}else if(e.substr(0,1)==="k"){let a;const l=i.length,c=new Array(l),u=new Array(n);let d=!0,f=0,h=null;h=[],h.push(o);for(let m=1;m<n;m++)h.push(o+m/n*(r-o));for(h.push(r);d;){for(let v=0;v<n;v++)u[v]=0;for(let v=0;v<l;v++){const y=i[v];let x=Number.MAX_VALUE,_;for(let S=0;S<n;S++){const E=UJ(h[S]-y);E<x&&(x=E,_=S),u[_]++,c[v]=_}}const m=new Array(n);for(let v=0;v<n;v++)m[v]=null;for(let v=0;v<l;v++)a=c[v],m[a]===null?m[a]=i[v]:m[a]+=i[v];for(let v=0;v<n;v++)m[v]*=1/u[v];d=!1;for(let v=0;v<n;v++)if(m[v]!==h[v]){d=!0;break}h=m,f++,f>200&&(d=!1)}const g={};for(let m=0;m<n;m++)g[m]=[];for(let m=0;m<l;m++)a=c[m],g[a].push(i[m]);let b=[];for(let m=0;m<n;m++)b.push(g[m][0]),b.push(g[m][g[m].length-1]);b=b.sort((m,v)=>m-v),s.push(b[0]);for(let m=1;m<b.length;m+=2){const v=b[m];!isNaN(v)&&s.indexOf(v)===-1&&s.push(v)}}return s}const GJ=(t,e)=>{t=new Ee(t),e=new Ee(e);const n=t.luminance(),o=e.luminance();return n>o?(n+.05)/(o+.05):(o+.05)/(n+.05)};/**
|
|
54
|
+
* @license
|
|
55
|
+
*
|
|
56
|
+
* The APCA contrast prediction algorithm is based of the formulas published
|
|
57
|
+
* in the APCA-1.0.98G specification by Myndex. The specification is available at:
|
|
58
|
+
* https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg
|
|
59
|
+
*
|
|
60
|
+
* Note that the APCA implementation is still beta, so please update to
|
|
61
|
+
* future versions of chroma.js when they become available.
|
|
62
|
+
*
|
|
63
|
+
* You can read more about the APCA Readability Criterion at
|
|
64
|
+
* https://readtech.org/ARC/
|
|
65
|
+
*/const E8=.027,qJ=5e-4,YJ=.1,I8=1.14,ih=.022,N8=1.414,jJ=(t,e)=>{t=new Ee(t),e=new Ee(e),t.alpha()<1&&(t=Zc(e,t,t.alpha(),"rgb"));const n=R8(...t.rgb()),o=R8(...e.rgb()),r=n>=ih?n:n+Math.pow(ih-n,N8),i=o>=ih?o:o+Math.pow(ih-o,N8),s=Math.pow(i,.56)-Math.pow(r,.57),a=Math.pow(i,.65)-Math.pow(r,.62),l=Math.abs(i-r)<qJ?0:r<i?s*I8:a*I8;return(Math.abs(l)<YJ?0:l>0?l-E8:l+E8)*100};function R8(t,e,n){return .2126729*Math.pow(t/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:ds,pow:Bn,min:XJ,max:KJ,atan2:F8,abs:V8,cos:sh,sin:z8,exp:ZJ,PI:H8}=Math;function QJ(t,e,n=1,o=1,r=1){var i=function(he){return 360*he/(2*H8)},s=function(he){return 2*H8*he/360};t=new Ee(t),e=new Ee(e);const[a,l,c]=Array.from(t.lab()),[u,d,f]=Array.from(e.lab()),h=(a+u)/2,g=ds(Bn(l,2)+Bn(c,2)),b=ds(Bn(d,2)+Bn(f,2)),m=(g+b)/2,v=.5*(1-ds(Bn(m,7)/(Bn(m,7)+Bn(25,7)))),y=l*(1+v),x=d*(1+v),_=ds(Bn(y,2)+Bn(c,2)),S=ds(Bn(x,2)+Bn(f,2)),E=(_+S)/2,M=i(F8(c,y)),C=i(F8(f,x)),O=M>=0?M:M+360,P=C>=0?C:C+360,R=V8(O-P)>180?(O+P+360)/2:(O+P)/2,$=1-.17*sh(s(R-30))+.24*sh(s(2*R))+.32*sh(s(3*R+6))-.2*sh(s(4*R-63));let A=P-O;A=V8(A)<=180?A:P<=O?A+360:A-360,A=2*ds(_*S)*z8(s(A)/2);const L=u-a,B=S-_,F=1+.015*Bn(h-50,2)/ds(20+Bn(h-50,2)),z=1+.045*E,V=1+.015*E*$,U=30*ZJ(-Bn((R-275)/25,2)),ue=-(2*ds(Bn(E,7)/(Bn(E,7)+Bn(25,7))))*z8(2*s(U)),fe=ds(Bn(L/(n*F),2)+Bn(B/(o*z),2)+Bn(A/(r*V),2)+ue*(B/(o*z))*(A/(r*V)));return KJ(0,XJ(100,fe))}function JJ(t,e,n="lab"){t=new Ee(t),e=new Ee(e);const o=t.get(n),r=e.get(n);let i=0;for(let s in o){const a=(o[s]||0)-(r[s]||0);i+=a*a}return Math.sqrt(i)}const eee=(...t)=>{try{return new Ee(...t),!0}catch{return!1}},tee={cool(){return qp([lt.hsl(180,1,.9),lt.hsl(250,.7,.4)])},hot(){return qp(["#000","#f00","#ff0","#fff"]).mode("rgb")}},I1={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},d5=Object.keys(I1),W8=new Map(d5.map(t=>[t.toLowerCase(),t])),nee=typeof Proxy=="function"?new Proxy(I1,{get(t,e){const n=e.toLowerCase();if(W8.has(n))return t[W8.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(d5)}}):I1,oee=(...t)=>{t=St(t,"cmyk");const[e,n,o,r]=t,i=t.length>4?t[4]:1;return r===1?[0,0,0,i]:[e>=1?0:255*(1-e)*(1-r),n>=1?0:255*(1-n)*(1-r),o>=1?0:255*(1-o)*(1-r),i]},{max:U8}=Math,ree=(...t)=>{let[e,n,o]=St(t,"rgb");e=e/255,n=n/255,o=o/255;const r=1-U8(e,U8(n,o)),i=r<1?1/(1-r):0,s=(1-e-r)*i,a=(1-n-r)*i,l=(1-o-r)*i;return[s,a,l,r]};Ee.prototype.cmyk=function(){return ree(this._rgb)};const iee=(...t)=>new Ee(...t,"cmyk");Object.assign(lt,{cmyk:iee});wt.format.cmyk=oee;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"cmyk"),Ot(t)==="array"&&t.length===4)return"cmyk"}});const see=(...t)=>{const e=St(t,"hsla");let n=mu(t)||"lsa";return e[0]=Nr(e[0]||0)+"deg",e[1]=Nr(e[1]*100)+"%",e[2]=Nr(e[2]*100)+"%",n==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),n="hsla"):e.length=3,`${n.substr(0,3)}(${e.join(" ")})`},aee=(...t)=>{const e=St(t,"lab");let n=mu(t)||"lab";return e[0]=Nr(e[0])+"%",e[1]=Nr(e[1]),e[2]=Nr(e[2]),n==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},lee=(...t)=>{const e=St(t,"lch");let n=mu(t)||"lab";return e[0]=Nr(e[0])+"%",e[1]=Nr(e[1]),e[2]=isNaN(e[2])?"none":Nr(e[2])+"deg",n==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},cee=(...t)=>{const e=St(t,"lab");return e[0]=Nr(e[0]*100)+"%",e[1]=D1(e[1]),e[2]=D1(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},f5=(...t)=>{const[e,n,o,...r]=St(t,"rgb"),[i,s,a]=n2(e,n,o),[l,c,u]=i5(i,s,a);return[l,c,u,...r.length>0&&r[0]<1?[r[0]]:[]]},uee=(...t)=>{const e=St(t,"lch");return e[0]=Nr(e[0]*100)+"%",e[1]=D1(e[1]),e[2]=isNaN(e[2])?"none":Nr(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},{round:rv}=Math,dee=(...t)=>{const e=St(t,"rgba");let n=mu(t)||"rgb";if(n.substr(0,3)==="hsl")return see(a5(e),n);if(n.substr(0,3)==="lab"){const o=Yd();As("d50");const r=aee(Qy(e),n);return As(o),r}if(n.substr(0,3)==="lch"){const o=Yd();As("d50");const r=lee(e2(e),n);return As(o),r}return n.substr(0,5)==="oklab"?cee(n2(e)):n.substr(0,5)==="oklch"?uee(f5(e)):(e[0]=rv(e[0]),e[1]=rv(e[1]),e[2]=rv(e[2]),(n==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),n="rgba"),`${n.substr(0,3)}(${e.slice(0,n==="rgb"?3:4).join(" ")})`)},h5=(...t)=>{t=St(t,"lch");const[e,n,o,...r]=t,[i,s,a]=r5(e,n,o),[l,c,u]=t2(i,s,a);return[l,c,u,...r.length>0&&r[0]<1?[r[0]]:[]]},Ls=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ci=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Yp=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,zr=/\s*/.source,vu=/\s+/.source,o2=/\s*,\s*/.source,Tm=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,bu=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,p5=new RegExp("^rgba?\\("+zr+[Ls,Ls,Ls].join(vu)+bu+"\\)$"),m5=new RegExp("^rgb\\("+zr+[Ls,Ls,Ls].join(o2)+zr+"\\)$"),g5=new RegExp("^rgba\\("+zr+[Ls,Ls,Ls,ci].join(o2)+zr+"\\)$"),v5=new RegExp("^hsla?\\("+zr+[Tm,Yp,Yp].join(vu)+bu+"\\)$"),b5=new RegExp("^hsl?\\("+zr+[Tm,Yp,Yp].join(o2)+zr+"\\)$"),y5=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,x5=new RegExp("^lab\\("+zr+[ci,ci,ci].join(vu)+bu+"\\)$"),w5=new RegExp("^lch\\("+zr+[ci,ci,Tm].join(vu)+bu+"\\)$"),_5=new RegExp("^oklab\\("+zr+[ci,ci,ci].join(vu)+bu+"\\)$"),S5=new RegExp("^oklch\\("+zr+[ci,ci,Tm].join(vu)+bu+"\\)$"),{round:k5}=Math,cc=t=>t.map((e,n)=>n<=2?_l(k5(e),0,255):e),Ln=(t,e=0,n=100,o=!1)=>(typeof t=="string"&&t.endsWith("%")&&(t=parseFloat(t.substring(0,t.length-1))/100,o?t=e+(t+1)*.5*(n-e):t=e+t*(n-e)),+t),Io=(t,e)=>t==="none"?e:t,r2=t=>{if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e;if(wt.format.named)try{return wt.format.named(t)}catch{}if((e=t.match(p5))||(e=t.match(m5))){let n=e.slice(1,4);for(let r=0;r<3;r++)n[r]=+Ln(Io(n[r],0),0,255);n=cc(n);const o=e[4]!==void 0?+Ln(e[4],0,1):1;return n[3]=o,n}if(e=t.match(g5)){const n=e.slice(1,5);for(let o=0;o<4;o++)n[o]=+Ln(n[o],0,255);return n}if((e=t.match(v5))||(e=t.match(b5))){const n=e.slice(1,4);n[0]=+Io(n[0].replace("deg",""),0),n[1]=+Ln(Io(n[1],0),0,100)*.01,n[2]=+Ln(Io(n[2],0),0,100)*.01;const o=cc(E1(n)),r=e[4]!==void 0?+Ln(e[4],0,1):1;return o[3]=r,o}if(e=t.match(y5)){const n=e.slice(1,4);n[1]*=.01,n[2]*=.01;const o=E1(n);for(let r=0;r<3;r++)o[r]=k5(o[r]);return o[3]=+e[4],o}if(e=t.match(x5)){const n=e.slice(1,4);n[0]=Ln(Io(n[0],0),0,100),n[1]=Ln(Io(n[1],0),-125,125,!0),n[2]=Ln(Io(n[2],0),-125,125,!0);const o=Yd();As("d50");const r=cc(Zy(n));As(o);const i=e[4]!==void 0?+Ln(e[4],0,1):1;return r[3]=i,r}if(e=t.match(w5)){const n=e.slice(1,4);n[0]=Ln(n[0],0,100),n[1]=Ln(Io(n[1],0),0,150,!1),n[2]=+Io(n[2].replace("deg",""),0);const o=Yd();As("d50");const r=cc(Jy(n));As(o);const i=e[4]!==void 0?+Ln(e[4],0,1):1;return r[3]=i,r}if(e=t.match(_5)){const n=e.slice(1,4);n[0]=Ln(Io(n[0],0),0,1),n[1]=Ln(Io(n[1],0),-.4,.4,!0),n[2]=Ln(Io(n[2],0),-.4,.4,!0);const o=cc(t2(n)),r=e[4]!==void 0?+Ln(e[4],0,1):1;return o[3]=r,o}if(e=t.match(S5)){const n=e.slice(1,4);n[0]=Ln(Io(n[0],0),0,1),n[1]=Ln(Io(n[1],0),0,.4,!1),n[2]=+Io(n[2].replace("deg",""),0);const o=cc(h5(n)),r=e[4]!==void 0?+Ln(e[4],0,1):1;return o[3]=r,o}};r2.test=t=>p5.test(t)||v5.test(t)||x5.test(t)||w5.test(t)||_5.test(t)||S5.test(t)||m5.test(t)||g5.test(t)||b5.test(t)||y5.test(t)||t==="transparent";Ee.prototype.css=function(t){return dee(this._rgb,t)};const fee=(...t)=>new Ee(...t,"css");lt.css=fee;wt.format.css=r2;wt.autodetect.push({p:5,test:(t,...e)=>{if(!e.length&&Ot(t)==="string"&&r2.test(t))return"css"}});wt.format.gl=(...t)=>{const e=St(t,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};const hee=(...t)=>new Ee(...t,"gl");lt.gl=hee;Ee.prototype.gl=function(){const t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};Ee.prototype.hex=function(t){return t5(this._rgb,t)};const pee=(...t)=>new Ee(...t,"hex");lt.hex=pee;wt.format.hex=e5;wt.autodetect.push({p:4,test:(t,...e)=>{if(!e.length&&Ot(t)==="string"&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});const{log:ah}=Math,C5=t=>{const e=t/100;let n,o,r;return e<66?(n=255,o=e<6?0:-155.25485562709179-.44596950469579133*(o=e-2)+104.49216199393888*ah(o),r=e<20?0:-254.76935184120902+.8274096064007395*(r=e-10)+115.67994401066147*ah(r)):(n=351.97690566805693+.114206453784165*(n=e-55)-40.25366309332127*ah(n),o=325.4494125711974+.07943456536662342*(o=e-50)-28.0852963507957*ah(o),r=255),[n,o,r,1]},{round:mee}=Math,gee=(...t)=>{const e=St(t,"rgb"),n=e[0],o=e[2];let r=1e3,i=4e4;const s=.4;let a;for(;i-r>s;){a=(i+r)*.5;const l=C5(a);l[2]/l[0]>=o/n?i=a:r=a}return mee(a)};Ee.prototype.temp=Ee.prototype.kelvin=Ee.prototype.temperature=function(){return gee(this._rgb)};const iv=(...t)=>new Ee(...t,"temp");Object.assign(lt,{temp:iv,kelvin:iv,temperature:iv});wt.format.temp=wt.format.kelvin=wt.format.temperature=C5;Ee.prototype.oklch=function(){return f5(this._rgb)};const vee=(...t)=>new Ee(...t,"oklch");Object.assign(lt,{oklch:vee});wt.format.oklch=h5;wt.autodetect.push({p:2,test:(...t)=>{if(t=St(t,"oklch"),Ot(t)==="array"&&t.length===3)return"oklch"}});Object.assign(lt,{analyze:c5,average:bJ,bezier:kJ,blend:wi,brewer:nee,Color:Ee,colors:Kc,contrast:GJ,contrastAPCA:jJ,cubehelix:NJ,deltaE:QJ,distance:JJ,input:wt,interpolate:Zc,limits:u5,mix:Zc,random:zJ,scale:qp,scales:tee,valid:eee});function Bo(t){return lt.contrast(t,"#fff")>=lt.contrast(t,"#333")?"#fff":"#333"}function bee(t,e){return lt.contrast(t,e)}function yee(t){return t>=7?"AAA":t>=4.5?"AA":"Fail"}const jd=4.5;function Cr(t){let e=t;for(;e&&e instanceof Element;){const n=getComputedStyle(e).backgroundColor;if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return n;e=e.parentElement}return"#fff"}function A5(t,e="#fff"){let n=lt(t);if(lt.contrast(n,e)>=jd)return n.hex();const o=lt(e).luminance()>.5;for(let r=0;r<20&&(n=o?n.darken(.3):n.brighten(.3),!(lt.contrast(n,e)>=jd));r++);return n.hex()}const i2=12,jp=.25,$5=20;function T5(t,e){if(t.length===0)return[];const n=lt(e).luminance()>.5,o=t.map(r=>xee(lt(r),e,n));for(let r=1;r<o.length;r++)lt.deltaE(o[r],o[r-1])>=i2||(o[r]=wee(o[r],o[r-1],e,n));return o.map(r=>r.hex())}function xee(t,e,n){for(let o=0;o<$5;o++){if(lt.contrast(t,e)>=jd)return t;t=n?t.darken(jp):t.brighten(jp)}return t}function wee(t,e,n,o){const r=G8(t,e,n,o);if(lt.deltaE(r,e)>=i2)return r;const i=G8(t,e,n,!o);return lt.deltaE(i,e)>lt.deltaE(r,e)&<.contrast(i,n)>=jd?i:r}function G8(t,e,n,o){let r=t,i=lt.deltaE(t,e),s=t;for(let a=0;a<$5;a++){s=o?s.darken(jp):s.brighten(jp);const l=lt.deltaE(s,e);if(l>i&<.contrast(s,n)>=jd&&(r=s,i=l),i>=i2)break}return r}const M5=new WeakMap;function qr(t){return M5.get(t)}function Yr(t,e){M5.set(t,e)}const al=["#4e79a7"],q8=13;class _ee extends ao{initialize(){this.configDefine("x",{defaultValue:Sn()}),this.configDefine("y",{defaultValue:bn()}),this.configDefine("width",{defaultValue:0}),this.configDefine("height",{defaultValue:0}),this.configDefine("colors",{defaultValue:al}),this.configDefine("colorOverrides",{defaultValue:new Map}),this.configDefine("highlightTargets",{defaultValue:new Set}),this.configDefine("swapLabelValue",{defaultValue:!1});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar").data(o,r=>r.label),insert:n=>n.append("rect").attr("class","bc-bar"),events:{enter:n=>{const o=this.config("colors"),r=this.config("colorOverrides"),i=this.config("highlightTargets"),s=i.size>0,a=this.config("x"),l=this.config("y");n.attr("x",c=>a(c.label)??0).attr("y",c=>Math.min(l(0),l(c.value))).attr("width",a.bandwidth()).attr("height",c=>Math.abs(l(c.value)-l(0))).attr("fill",c=>r.get(c.label)??o[0]).attr("opacity",c=>s?i.has(c.label)?1:.35:null)},"merge:transition":n=>{const o=this.config("colors"),r=this.config("colorOverrides"),i=this.config("highlightTargets"),s=i.size>0,a=this.config("x"),l=this.config("y");n.duration(ut()).attr("x",c=>a(c.label)??0).attr("y",c=>Math.min(l(0),l(c.value))).attr("width",a.bandwidth()).attr("height",c=>Math.abs(l(c.value)-l(0))).attr("fill",c=>r.get(c.label)??o[0]).attr("opacity",c=>s?i.has(c.label)?1:.35:null)},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function O5(t,e,n={},o=!1){var me,ve,I,W,X,ae,le,K,oe,Z,Y,ee,ge;Gr(o);let r=[],i=[],s=null,a,l;const c=Mr.for(t);if(o){const pe=qr(t);l=pe==null?void 0:pe.margin,c.detach(),(pe==null?void 0:pe.chartType)==="bar-vertical"?(r=Array.from(t.querySelectorAll(".bc-frame .bc-bar")),i=Array.from(t.querySelectorAll(".bc-frame .bc-value-label"))):pe&&(s=$r(t)),a=new Map;for(const xe of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[be,Oe]of cr(xe))a.set(be,Oe);t.replaceChildren()}const{body:u}=Wr(t,n.frame),d=lr(u).width,f=n.categoryLabelLine===!0,h=ql(e.values,(me=n.verticalAxis)==null?void 0:me.range,(ve=n.verticalAxis)==null?void 0:ve.numberFormat,(I=n.verticalAxis)==null?void 0:I.scaleType),g=f?sn.Off:(W=n.horizontalAxis)==null?void 0:W.labelPosition,b=Ci(d,(X=n.verticalAxis)==null?void 0:X.labelPosition,g,(ae=n.verticalAxis)==null?void 0:ae.direction,h);if(!f){const pe=Math.max(0,d-(b.left??50)-(b.right??20)),xe=Hy(e.labels,pe,n.horizontalAxis);xe!==void 0&&(b.bottom=xe)}const{chartArea:m,width:v,height:y,margin:x}=Ur(u,b),S=y-(f?q8:0),E=ki(l,x),M=kee(e,n),C=M.map(pe=>({label:pe,value:e.values[e.labels.indexOf(pe)]})),O=n.swapLabelValue===!0,P=n.waterfall===!0,R=[];if(P){let pe=0;for(const xe of C){const be=pe;pe+=xe.value,R.push({label:xe.label,value:xe.value,y0:be,y1:pe,isTotal:!1})}n.waterfallTotal&&R.push({label:"Total",value:pe,y0:0,y1:pe,isTotal:!0})}const $=P?R.map(pe=>pe.label):M,A=Sn().domain($).range([0,v]).padding(jl(n.barGap)),L=((le=n.verticalAxis)==null?void 0:le.scaleType)==="log",B=P?R.flatMap(pe=>[pe.y0,pe.y1]):C.map(pe=>pe.value);let[F,z]=fu(B,(K=n.verticalAxis)==null?void 0:K.range);if(n.valueLabels&&F<0&&((Z=(oe=n.verticalAxis)==null?void 0:oe.range)==null?void 0:Z.min)==null){const pe=z-F;F-=pe*.1}const V=L?Va().domain([F,z]).nice().range([S,0]):bn().domain([F,z]).nice().range([S,0]);c.attach(m,E);const U=O&&n.valueLabels&&!P?(()=>{const pe=new Map(C.map(xe=>[xe.label,xe.value]));return{...n.horizontalAxis,width:v,tickFormat:xe=>String(pe.get(xe)??xe)}})():{...n.horizontalAxis,width:v},ie=f?{...U,labelPosition:sn.Off}:U;c.update({vertical:{scale:V,height:y,options:{...n.verticalAxis,gridWidth:v,topPadding:x.top}},horizontal:{scale:A,height:y,options:ie}}),!L&&F<0&&z>0&&we(m).append("line").attr("class","bc-zero-baseline").attr("x1",0).attr("x2",v).attr("y1",V(0)).attr("y2",V(0)).attr("stroke","#666").attr("stroke-width",1);const ue=new Map((n.colorizes??[]).map(pe=>[pe.target,pe.color])),fe=new Set((n.highlights??[]).map(pe=>pe.target)),he=Math.random().toString(36).slice(2,8),ce=`bc-clip-${he}`,de=m.ownerSVGElement,_e=we(de).select("defs").empty()?we(de).append("defs"):we(de).select("defs");_e.append("clipPath").attr("id",ce).append("rect").attr("width",v).attr("height",S);const j=we(m).append("g").attr("clip-path",`url(#${ce})`);if(n.barBackground){const pe=(n.colors??al)[0],xe=P?$:C.map(be=>be.label);j.selectAll(".bc-bar-bg").data(xe,be=>be).enter().append("rect").attr("class","bc-bar-bg").attr("x",be=>A(be)??0).attr("y",0).attr("width",A.bandwidth()).attr("height",S).attr("fill",pe).attr("opacity",.18)}const te=P?$:C.map(pe=>pe.label);if(n.barSeparators&&te.length>1){const pe=A.step();for(let xe=1;xe<te.length;xe++){const be=(A(te[xe-1])??0)+A.bandwidth()+(pe-A.bandwidth())/2;j.append("line").attr("class","bc-bar-separator").attr("x1",be).attr("x2",be).attr("y1",0).attr("y2",S).attr("stroke","currentColor").attr("opacity",.15)}}if(!P&&n.connectedColumns&&C.length>1){const pe=n.colors??al,xe=n.connectionsOpacity??.15;for(let be=0;be<C.length-1;be++){const Oe=C[be],Se=C[be+1];if(Oe.value==null||Se.value==null||Number.isNaN(Oe.value)||Number.isNaN(Se.value)||Oe.value===0||Se.value===0)continue;const Ae=(A(Oe.label)??0)+A.bandwidth(),je=A(Se.label)??0,ot=Math.min(V(0),V(Oe.value)),ht=Math.min(V(0),V(Se.value)),$t=V(0),Ft=ue.get(Oe.label)??pe[0],un=ue.get(Se.label)??pe[0];let Mt;if(Ft===un)Mt=Ft;else{const Nt=`bc-conn-grad-${he}-${be}`,tn=_e.append("linearGradient").attr("id",Nt).attr("x1","0%").attr("x2","100%").attr("y1","0%").attr("y2","0%");tn.append("stop").attr("offset","0%").attr("stop-color",Ft),tn.append("stop").attr("offset","100%").attr("stop-color",un),Mt=`url(#${Nt})`}j.append("polygon").attr("class","bc-bar-connection").attr("points",`${Ae},${ot} ${je},${ht} ${je},${$t} ${Ae},${$t}`).attr("fill",Mt).attr("opacity",xe).attr("pointer-events","none")}}const ne=we(m).append("g");if(P){const pe=n.colors??al,xe="#333";if(n.connectedColumns&&R.length>1){const be=n.colors??al,Oe=n.connectionsOpacity??.15;for(let Se=0;Se<R.length-1;Se++){const Ae=R[Se],je=R[Se+1];if(je.isTotal||Ae.value==null||je.value==null||Number.isNaN(Ae.value)||Number.isNaN(je.value)||Ae.value===0||je.value===0)continue;const ot=(A(Ae.label)??0)+A.bandwidth(),ht=A(je.label)??0,$t=V(Ae.y1),Ft=V(je.y1),un=V(Ae.y0),Mt=V(je.y0),Nt=ue.get(Ae.label)??be[0],tn=ue.get(je.label)??be[0];let Cn;if(Nt===tn)Cn=Nt;else{const lo=`bc-conn-grad-${he}-${Se}`,ze=_e.append("linearGradient").attr("id",lo).attr("x1","0%").attr("x2","100%").attr("y1","0%").attr("y2","0%");ze.append("stop").attr("offset","0%").attr("stop-color",Nt),ze.append("stop").attr("offset","100%").attr("stop-color",tn),Cn=`url(#${lo})`}j.append("polygon").attr("class","bc-bar-connection").attr("points",`${ot},${$t} ${ht},${Ft} ${ht},${Mt} ${ot},${un}`).attr("fill",Cn).attr("opacity",Oe).attr("pointer-events","none")}}for(let be=0;be<R.length-1;be++){const Oe=R[be],Se=R[be+1];if(Se.isTotal)break;j.append("line").attr("class","bc-waterfall-connector").attr("x1",(A(Oe.label)??0)+A.bandwidth()).attr("x2",A(Se.label)??0).attr("y1",V(Oe.y1)).attr("y2",V(Oe.y1)).attr("stroke","currentColor").attr("stroke-dasharray","2,2").attr("opacity",.3)}if(j.selectAll(".bc-bar").data(R,be=>be.label).enter().append("rect").attr("class","bc-bar").attr("x",be=>A(be.label)??0).attr("y",be=>Math.min(V(be.y0),V(be.y1))).attr("width",A.bandwidth()).attr("height",be=>Math.abs(V(be.y0)-V(be.y1))).attr("fill",be=>be.isTotal?xe:ue.get(be.label)??pe[0]).attr("opacity",be=>fe.size>0?fe.has(be.label)?1:.2:null),n.valueLabels){const be=n.valueLabelPosition??yt.Auto,Oe=Ta(((Y=n.verticalAxis)==null?void 0:Y.numberFormat)??""),Se=Ae=>Oe?Oe(Ae):String(Ae);ne.selectAll(".bc-value-label").data(R,Ae=>Ae.label).enter().append("text").attr("class","bc-value-label").attr("font-size","11px").attr("x",Ae=>(A(Ae.label)??0)+A.bandwidth()/2).attr("y",Ae=>{const je=Math.min(V(Ae.y0),V(Ae.y1)),ot=Math.abs(V(Ae.y0)-V(Ae.y1));return be===yt.Inside?je+ot/2:je-4}).attr("text-anchor","middle").attr("dominant-baseline",be===yt.Inside?"central":"auto").attr("fill",Ae=>be===yt.Inside?Bo(Ae.isTotal?xe:ue.get(Ae.label)??pe[0]):"currentColor").text(Ae=>O?Ae.label:Se(Ae.isTotal?Ae.y1:Ae.value))}}else{const pe=new _ee(j);if(pe.config({x:A,y:V,width:v,height:y,colors:n.colors??al,colorOverrides:ue,highlightTargets:fe,swapLabelValue:O}),r.length>0){const xe=j.node().querySelector("g");jn(xe,r,(E==null?void 0:E.dx)??0,(E==null?void 0:E.dy)??0)}n.tooltips&&pe.use(Ha({numberFormat:(ee=n.verticalAxis)==null?void 0:ee.numberFormat})),n.crosshair&&pe.use(Xl({width:v,height:S,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor})),(ge=n.annotations)!=null&&ge.length&&pe.use(pu(n.annotations,{scaleX:A,scaleY:V,data:C,width:v,height:S,backgroundColor:Cr(t),transition:o,priorAnnotations:a})),pe.draw(C),n.valueLabels&&See(ne,C,A,V,{position:n.valueLabelPosition,colorOverrides:ue,colors:n.colors??al,transition:o,priorLabels:i,swapLabelValue:O})}if(f){const pe=we(m).append("g").attr("class","bc-category-labels");for(const xe of $)pe.append("text").attr("class","bc-category-label").attr("x",(A(xe)??0)+A.bandwidth()/2).attr("y",S+q8/2).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size","10px").attr("font-weight","600").attr("fill","currentColor").text(xe)}Yr(t,{chartType:"bar-vertical",margin:x}),s&&(Ar(j.node()),Tr(t,s))}function sv(t,e,n,o){const r=Math.abs(n(t.value)-n(0)),i=o===yt.Inside,s=(e(t.label)??0)+e.bandwidth()/2,a="middle";let l,c;return t.value<0?i?(l=n(t.value)-r/2,c="central"):(l=n(t.value)+4,c="hanging"):i?(l=n(t.value)+r/2,c="central"):(l=n(t.value)-4,c="auto"),{tx:s,ty:l,anchor:a,baseline:c,isInside:i}}function See(t,e,n,o,r){const i=r.position??yt.Auto,s=d=>r.swapLabelValue?d.label:String(d.value);let a=t.select(".bc-value-label-group");if(a.empty()&&(a=t.append("g").attr("class","bc-value-label-group")),r.priorLabels.length>0){const d=a.node();r.priorLabels.forEach(f=>d.appendChild(f))}const l=a.selectAll(".bc-value-label").data(e,d=>d.label);l.exit().transition().duration(ut()).attr("opacity",0).remove();const u=l.enter().append("text").attr("class","bc-value-label").attr("font-size","11px").each(function(d){const f=sv(d,n,o,i);we(this).attr("x",f.tx).attr("y",f.ty).attr("text-anchor",f.anchor).attr("dominant-baseline",f.baseline).attr("fill",f.isInside?Bo(r.colorOverrides.get(d.label)??r.colors[0]):"currentColor").text(s(d))}).merge(l);r.transition?u.each(function(d){const f=sv(d,n,o,i);we(this).text(s(d)).transition().duration(ut()).attr("x",f.tx).attr("y",f.ty).attr("text-anchor",f.anchor).attr("dominant-baseline",f.baseline).attr("fill",f.isInside?Bo(r.colorOverrides.get(d.label)??r.colors[0]):"currentColor")}):u.each(function(d){const f=sv(d,n,o,i);we(this).attr("x",f.tx).attr("y",f.ty).attr("text-anchor",f.anchor).attr("dominant-baseline",f.baseline).attr("fill",f.isInside?Bo(r.colorOverrides.get(d.label)??r.colors[0]):"currentColor").text(s(d))})}function kee(t,e){const n=t.labels.map((o,r)=>({label:o,value:t.values[r]}));return e.sort===Jt.Ascending?n.sort((o,r)=>o.value-r.value):e.sort===Jt.Descending&&n.sort((o,r)=>r.value-o.value),n.map(o=>o.label)}const ll=["#4e79a7"],Y8=13,Cee="11px sans-serif",av=4;class Aee extends ao{initialize(){this.configDefine("x",{defaultValue:bn()}),this.configDefine("y",{defaultValue:Sn()}),this.configDefine("width",{defaultValue:0}),this.configDefine("height",{defaultValue:0}),this.configDefine("colors",{defaultValue:ll}),this.configDefine("colorOverrides",{defaultValue:new Map}),this.configDefine("highlightTargets",{defaultValue:new Set}),this.configDefine("swapLabelValue",{defaultValue:!1}),this.configDefine("categoryLabelOffset",{defaultValue:0});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar").data(o,r=>r.label),insert:n=>n.append("rect").attr("class","bc-bar"),events:{enter:n=>{const o=this.config("colors"),r=this.config("colorOverrides"),i=this.config("highlightTargets"),s=i.size>0,a=this.config("x"),l=this.config("y"),c=this.config("categoryLabelOffset");n.attr("x",u=>Math.min(a(0),a(u.value))).attr("y",u=>(l(u.label)??0)+c).attr("width",u=>Math.abs(a(u.value)-a(0))).attr("height",l.bandwidth()-c).attr("fill",u=>r.get(u.label)??o[0]).attr("opacity",u=>s?i.has(u.label)?1:.35:null)},"merge:transition":n=>{const o=this.config("colors"),r=this.config("colorOverrides"),i=this.config("highlightTargets"),s=i.size>0,a=this.config("x"),l=this.config("y"),c=this.config("categoryLabelOffset");n.duration(ut()).attr("x",u=>Math.min(a(0),a(u.value))).attr("y",u=>(l(u.label)??0)+c).attr("width",u=>Math.abs(a(u.value)-a(0))).attr("height",l.bandwidth()-c).attr("fill",u=>r.get(u.label)??o[0]).attr("opacity",u=>s?i.has(u.label)?1:.35:null)},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function lv(t){try{const n=document.createElement("canvas").getContext("2d");if(n)return n.font=Cee,Math.ceil(n.measureText(t).width)}catch{}return t.length*6.5}function B5(t,e,n={},o=!1){var me,ve,I,W,X,ae,le,K,oe,Z;Gr(o);let r=[],i=[],s=null,a,l;const c=Mr.for(t);if(o){const Y=qr(t);l=Y==null?void 0:Y.margin,c.detach(),(Y==null?void 0:Y.chartType)==="bar-horizontal"?(r=Array.from(t.querySelectorAll(".bc-frame .bc-bar")),i=Array.from(t.querySelectorAll(".bc-frame .bc-value-label"))):Y&&(s=$r(t)),a=new Map;for(const ee of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[ge,pe]of cr(ee))a.set(ge,pe);t.replaceChildren()}const{body:u}=Wr(t,n.frame),d=lr(u).width,f=d>0&&d<400&&((me=n.verticalAxis)==null?void 0:me.labelPosition)!=="outside",h=n.categoryLabelLine===!0||f,g=vm(e.labels),b=h?sn.Off:(ve=n.verticalAxis)==null?void 0:ve.labelPosition,m=Ci(d,b,(I=n.horizontalAxis)==null?void 0:I.labelPosition,(W=n.verticalAxis)==null?void 0:W.direction,g,(X=n.horizontalAxis)==null?void 0:X.showAxis),v=n.valueLabelPosition??yt.Auto,y=n.swapLabelValue===!0;if(n.valueLabels&&v!==yt.Inside)if(y){const Y=e.labels.reduce((ge,pe)=>ge.length>pe.length?ge:pe,""),ee=lv(Y)+av;m.right=Math.max(m.right??15,ee)}else{const Y=Math.max(...e.values),ee=Math.min(...e.values),ge=Y>0?lv(String(Y))+av:0,pe=ee<0?lv(String(ee))+av:0;m.right=Math.max(m.right??15,ge),pe>0&&(m.left=(m.left??50)+pe)}const{chartArea:x,width:_,height:S,margin:E}=Ur(u,m),M=h?Y8:0,C=ki(l,E),O=Tee(e,n),P=O.map(Y=>({label:Y,value:e.values[e.labels.indexOf(Y)]})),R=n.waterfall===!0,$=[];if(R){let Y=0;for(const ee of P){const ge=Y;Y+=ee.value,$.push({label:ee.label,value:ee.value,x0:ge,x1:Y,isTotal:!1})}n.waterfallTotal&&$.push({label:"Total",value:Y,x0:0,x1:Y,isTotal:!0})}const A=((ae=n.horizontalAxis)==null?void 0:ae.scaleType)==="log",L=R?$.flatMap(Y=>[Y.x0,Y.x1]):P.map(Y=>Y.value),[B,F]=fu(L,(le=n.horizontalAxis)==null?void 0:le.range),z=A?Va().domain([B,F]).nice().range([0,_]):bn().domain([B,F]).nice().range([0,_]),V=R?$.map(Y=>Y.label):O,U=Sn().domain(V).range([0,S]).padding(jl(n.barGap)),ie=y&&n.valueLabels&&!R?(()=>{const Y=new Map(P.map(ee=>[ee.label,ee.value]));return{...n.verticalAxis,topPadding:E.top,tickFormat:ee=>String(Y.get(ee)??ee)}})():{...n.verticalAxis,topPadding:E.top},ue=h?{...ie,labelPosition:sn.Off,...f?{showAxis:!1}:{}}:ie;c.attach(x,C),c.update({horizontal:{scale:z,height:S,options:{...n.horizontalAxis,width:_}},vertical:{scale:U,height:S,options:ue},order:"horizontal-first"}),!A&&B<0&&F>0&&we(x).append("line").attr("class","bc-zero-baseline").attr("x1",z(0)).attr("x2",z(0)).attr("y1",0).attr("y2",S).attr("stroke","#666").attr("stroke-width",1);const fe=new Map((n.colorizes??[]).map(Y=>[Y.target,Y.color])),he=new Set((n.highlights??[]).map(Y=>Y.target)),ce=Math.random().toString(36).slice(2,8),de=`bc-clip-${ce}`,_e=x.ownerSVGElement,j=we(_e).select("defs").empty()?we(_e).append("defs"):we(_e).select("defs");j.append("clipPath").attr("id",de).append("rect").attr("width",_).attr("height",S);const te=we(x).append("g").attr("clip-path",`url(#${de})`);if(n.barBackground){const Y=(n.colors??ll)[0],ee=R?V:P.map(ge=>ge.label);te.selectAll(".bc-bar-bg").data(ee,ge=>ge).enter().append("rect").attr("class","bc-bar-bg").attr("x",0).attr("y",ge=>(U(ge)??0)+M).attr("width",_).attr("height",U.bandwidth()-M).attr("fill",Y).attr("opacity",.18)}const ne=R?V:P.map(Y=>Y.label);if(n.barSeparators&&ne.length>1){const Y=U.step();for(let ee=1;ee<ne.length;ee++){const ge=(U(ne[ee-1])??0)+U.bandwidth()+(Y-U.bandwidth())/2;te.append("line").attr("class","bc-bar-separator").attr("x1",0).attr("x2",_).attr("y1",ge).attr("y2",ge).attr("stroke","currentColor").attr("opacity",.15)}}if(!R&&n.connectedColumns&&P.length>1){const Y=n.colors??ll,ee=n.connectionsOpacity??.15;for(let ge=0;ge<P.length-1;ge++){const pe=P[ge],xe=P[ge+1];if(pe.value==null||xe.value==null||Number.isNaN(pe.value)||Number.isNaN(xe.value)||pe.value===0||xe.value===0)continue;const be=(U(pe.label)??0)+U.bandwidth(),Oe=(U(xe.label)??0)+M,Se=Math.max(z(0),z(pe.value)),Ae=Math.max(z(0),z(xe.value)),je=z(0),ot=fe.get(pe.label)??Y[0],ht=fe.get(xe.label)??Y[0];let $t;if(ot===ht)$t=ot;else{const Ft=`bc-conn-grad-${ce}-${ge}`,un=j.append("linearGradient").attr("id",Ft).attr("x1","0%").attr("x2","0%").attr("y1","0%").attr("y2","100%");un.append("stop").attr("offset","0%").attr("stop-color",ot),un.append("stop").attr("offset","100%").attr("stop-color",ht),$t=`url(#${Ft})`}te.append("polygon").attr("class","bc-bar-connection").attr("points",`${Se},${be} ${Ae},${Oe} ${je},${Oe} ${je},${be}`).attr("fill",$t).attr("opacity",ee).attr("pointer-events","none")}}if(R){const Y=n.colors??ll,ee="#333";if(n.connectedColumns&&$.length>1){const ge=n.colors??ll,pe=n.connectionsOpacity??.15;for(let xe=0;xe<$.length-1;xe++){const be=$[xe],Oe=$[xe+1];if(Oe.isTotal||be.value==null||Oe.value==null||Number.isNaN(be.value)||Number.isNaN(Oe.value)||be.value===0||Oe.value===0)continue;const Se=(U(be.label)??0)+U.bandwidth(),Ae=(U(Oe.label)??0)+M,je=z(be.x1),ot=z(Oe.x1),ht=z(be.x0),$t=z(Oe.x0),Ft=fe.get(be.label)??ge[0],un=fe.get(Oe.label)??ge[0];let Mt;if(Ft===un)Mt=Ft;else{const Nt=`bc-conn-grad-${ce}-${xe}`,tn=j.append("linearGradient").attr("id",Nt).attr("x1","0%").attr("x2","0%").attr("y1","0%").attr("y2","100%");tn.append("stop").attr("offset","0%").attr("stop-color",Ft),tn.append("stop").attr("offset","100%").attr("stop-color",un),Mt=`url(#${Nt})`}te.append("polygon").attr("class","bc-bar-connection").attr("points",`${je},${Se} ${ot},${Ae} ${$t},${Ae} ${ht},${Se}`).attr("fill",Mt).attr("opacity",pe).attr("pointer-events","none")}}for(let ge=0;ge<$.length-1;ge++){const pe=$[ge],xe=$[ge+1];if(xe.isTotal)break;te.append("line").attr("class","bc-waterfall-connector").attr("x1",z(pe.x1)).attr("x2",z(pe.x1)).attr("y1",(U(pe.label)??0)+U.bandwidth()).attr("y2",(U(xe.label)??0)+M).attr("stroke","currentColor").attr("stroke-dasharray","2,2").attr("opacity",.3)}if(te.selectAll(".bc-bar").data($,ge=>ge.label).enter().append("rect").attr("class","bc-bar").attr("x",ge=>Math.min(z(ge.x0),z(ge.x1))).attr("y",ge=>(U(ge.label)??0)+M).attr("width",ge=>Math.abs(z(ge.x1)-z(ge.x0))).attr("height",U.bandwidth()-M).attr("fill",ge=>ge.isTotal?ee:fe.get(ge.label)??Y[0]).attr("opacity",ge=>he.size>0?he.has(ge.label)?1:.35:null),n.valueLabels){const ge=v,pe=Ta(((K=n.horizontalAxis)==null?void 0:K.numberFormat)??""),xe=Oe=>pe?pe(Oe):String(Oe);we(x).append("g").selectAll(".bc-value-label").data($,Oe=>Oe.label).enter().append("text").attr("class","bc-value-label").attr("font-size","11px").attr("dominant-baseline","central").attr("y",Oe=>(U(Oe.label)??0)+M+(U.bandwidth()-M)/2).attr("x",Oe=>{const Se=Math.max(z(Oe.x0),z(Oe.x1));return ge===yt.Inside?Se-4:Se+4}).attr("text-anchor",ge===yt.Inside?"end":"start").attr("fill",Oe=>ge===yt.Inside?Bo(Oe.isTotal?ee:fe.get(Oe.label)??Y[0]):"currentColor").text(Oe=>y?Oe.label:xe(Oe.isTotal?Oe.x1:Oe.value))}}else{const Y=new Aee(te);if(Y.config({x:z,y:U,width:_,height:S,colors:n.colors??ll,colorOverrides:fe,highlightTargets:he,swapLabelValue:y,categoryLabelOffset:M}),r.length>0){const ee=te.node().querySelector("g");jn(ee,r,(C==null?void 0:C.dx)??0,(C==null?void 0:C.dy)??0)}if(n.tooltips&&Y.use(Ha({numberFormat:(oe=n.horizontalAxis)==null?void 0:oe.numberFormat})),n.crosshair&&Y.use(Xl({width:_,height:S,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor,orientation:Yn.Horizontal})),(Z=n.annotations)!=null&&Z.length&&Y.use(pu(n.annotations,{scaleX:U,scaleY:z,data:P,width:_,height:S,backgroundColor:Cr(t),orientation:Yn.Horizontal,transition:o,priorAnnotations:a})),Y.draw(P),n.valueLabels){const ee=we(x).append("g");$ee(ee,P,z,U,{position:v,colorOverrides:fe,colors:n.colors??ll,transition:o,priorLabels:i,swapLabelValue:y,categoryLabelOffset:M})}}if(h){const Y=we(x).append("g").attr("class","bc-category-labels");for(const ee of V){const ge=U(ee)??0;Y.append("text").attr("class","bc-category-label").attr("x",2).attr("y",ge+Y8/2).attr("text-anchor","start").attr("dominant-baseline","central").attr("font-size","10px").attr("font-weight","600").attr("fill","currentColor").text(ee)}}Yr(t,{chartType:"bar-horizontal",margin:E}),s&&(Ar(te.node()),Tr(t,s))}function cv(t,e,n,o,r=0){const i=o===yt.Inside,s=(n(t.label)??0)+r+(n.bandwidth()-r)/2;let a,l;if(t.value<0){const c=Math.min(e(0),e(t.value));i?(a=c+4,l="start"):(a=c-4,l="end")}else{const c=e(t.value);i?(a=c-4,l="end"):(a=c+4,l="start")}return{tx:a,ty:s,anchor:l,isInside:i}}function $ee(t,e,n,o,r){const i=r.position??yt.Auto,s=r.categoryLabelOffset??0,a=f=>r.swapLabelValue?f.label:String(f.value);let l=t.select(".bc-value-label-group");if(l.empty()&&(l=t.append("g").attr("class","bc-value-label-group")),r.priorLabels.length>0){const f=l.node();r.priorLabels.forEach(h=>f.appendChild(h))}const c=l.selectAll(".bc-value-label").data(e,f=>f.label);c.exit().transition().duration(ut()).attr("opacity",0).remove();const d=c.enter().append("text").attr("class","bc-value-label").attr("font-size","11px").attr("dominant-baseline","central").each(function(f){const h=cv(f,n,o,i,s);we(this).attr("x",h.tx).attr("y",h.ty).attr("text-anchor",h.anchor).attr("fill",h.isInside?Bo(r.colorOverrides.get(f.label)??r.colors[0]):"currentColor").text(a(f))}).merge(c);r.transition?d.each(function(f){const h=cv(f,n,o,i,s);we(this).text(a(f)).transition().duration(ut()).attr("x",h.tx).attr("y",h.ty).attr("text-anchor",h.anchor).attr("fill",h.isInside?Bo(r.colorOverrides.get(f.label)??r.colors[0]):"currentColor")}):d.each(function(f){const h=cv(f,n,o,i,s);we(this).attr("x",h.tx).attr("y",h.ty).attr("text-anchor",h.anchor).attr("fill",h.isInside?Bo(r.colorOverrides.get(f.label)??r.colors[0]):"currentColor").text(a(f))})}function Tee(t,e){const n=t.labels.map((o,r)=>({label:o,value:t.values[r]}));return e.sort===Jt.Ascending?n.sort((o,r)=>o.value-r.value):e.sort===Jt.Descending&&n.sort((o,r)=>r.value-o.value),n.map(o=>o.label)}function Ga(t,e,n){if(t.length===0)return{width:0,height:0};if(e==="left"||e==="right"){const u=Math.max(...t.map(f=>f.length))*7+16+8,d=t.length*20;return{width:u,height:d}}const r=20,i=t.map(c=>16+c.length*7+12);if(!n||n<=0)return{width:i.reduce((u,d)=>u+d,0),height:r};let s=1,a=0,l=0;for(const c of i)a>0&&a+c>n?(l=Math.max(l,a),s++,a=c):a+=c;return l=Math.max(l,a),{width:l,height:s*r}}function L5(t){return t.length===0?0:Math.max(...t.map(n=>n.length))*7+10}function js(t,e){return e==null?void 0:e.find(n=>n.name===t)}function cn(t,e,n,o){const r=js(t,o);return(r==null?void 0:r.color)??n[e%n.length]}function Mee(t,e){const n=js(t,e);return(n==null?void 0:n.dash)??"solid"}function Oee(t,e){const n=js(t,e);return(n==null?void 0:n.lineWidth)??2}function s2(t,e,n){const o=js(t,n);return!(o!=null&&o.interpolation)||o.interpolation==="global"?e:o.interpolation}function qa(t,e){const n=js(t,e);return(n==null?void 0:n.hidden)??!1}function ya(t,e,n){const o=js(t,n);return!(o!=null&&o.labelMode)||o.labelMode==="global"?e:o.labelMode}function yu(t,e,n){const o=js(t,n);return(o==null?void 0:o.valueLabels)!==void 0?o.valueLabels:e}function _f(t,e){const n=js(t,e);return(n==null?void 0:n.opacity)??1}function Bee(t,e,n){const o=js(t,n);if((o==null?void 0:o.lineSymbols)!==!1&&((o==null?void 0:o.lineSymbols)===!0||e))return{name:t,symbolShape:(o==null?void 0:o.symbolShape)??(e==null?void 0:e.symbolShape),symbolShowOn:(o==null?void 0:o.symbolShowOn)??(e==null?void 0:e.symbolShowOn),symbolStyle:(o==null?void 0:o.symbolStyle)??(e==null?void 0:e.symbolStyle),symbolSize:(o==null?void 0:o.symbolSize)??(e==null?void 0:e.symbolSize),symbolOpacity:(o==null?void 0:o.symbolOpacity)??(e==null?void 0:e.symbolOpacity),lineSymbols:!0}}const P5=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"];class Lee extends ao{initialize(){this.configDefine("x0",{defaultValue:Sn()}),this.configDefine("x1",{defaultValue:Sn()}),this.configDefine("y",{defaultValue:bn()}),this.configDefine("height",{defaultValue:0}),this.configDefine("colors",{defaultValue:P5});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar-multi").data(o,r=>r.label+"\0"+r.seriesName),insert:n=>n.append("rect").attr("class","bc-bar bc-bar-multi"),events:{enter:n=>{const o=this.config("x0"),r=this.config("x1"),i=this.config("y"),s=this.config("colors");n.attr("data-series",a=>a.seriesIndex).attr("x",a=>(o(a.label)??0)+(r(a.series)??0)).attr("y",a=>Math.min(i(0),i(a.value))).attr("width",r.bandwidth()).attr("height",a=>Math.abs(i(a.value)-i(0))).attr("fill",a=>s[a.seriesIndex%s.length])},"merge:transition":n=>{const o=this.config("x0"),r=this.config("x1"),i=this.config("y"),s=this.config("colors");n.duration(ut()).attr("data-series",a=>a.seriesIndex).attr("x",a=>(o(a.label)??0)+(r(a.series)??0)).attr("y",a=>Math.min(i(0),i(a.value))).attr("width",r.bandwidth()).attr("height",a=>Math.abs(i(a.value)-i(0))).attr("fill",a=>s[a.seriesIndex%s.length])},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function Pee(t,e,n={},o=!1){var Ae,je,ot,ht,$t,Ft,un,Mt,Nt,tn,Cn,lo;Gr(o);let r=[],i=null,s,a;const l=Mr.for(t);if(o){const ze=qr(t);a=ze==null?void 0:ze.margin,l.detach(),(ze==null?void 0:ze.chartType)==="bar-multi"?r=Array.from(t.querySelectorAll(".bc-frame .bc-bar-multi")):ze&&(i=$r(t)),s=new Map;for(const Tt of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[Pe,Ge]of cr(Tt))s.set(Pe,Ge);t.replaceChildren()}const{body:c}=Wr(t,n.frame),u=e.series??[],d=u.filter(ze=>!qa(ze.name,n.seriesOverrides)),f=d.map(ze=>ze.name),h=n.colors??P5,g=n.seriesOverrides,b=n.directLabelling===!0||n.directLabelling==="auto"&&n.legend!==!0||!!n.directLabelling&&n.directLabelling!=="auto",m=b?"direct":n.legend!==!1?"legend":"none",v=n.legend!==!1&&!b,y=lr(c).width,x=350,_=n.legendPosition??"top",S=y>0&&y<x&&(_==="left"||_==="right")?"top":_,E=n.legendAnchor??"start",M=d.flatMap(ze=>ze.values),C=ql(M,(Ae=n.verticalAxis)==null?void 0:Ae.range,(je=n.verticalAxis)==null?void 0:je.numberFormat,(ot=n.verticalAxis)==null?void 0:ot.scaleType),O=Ci(y,(ht=n.verticalAxis)==null?void 0:ht.labelPosition,($t=n.horizontalAxis)==null?void 0:$t.labelPosition,(Ft=n.verticalAxis)==null?void 0:Ft.direction,C),P=Math.max(0,y-(O.left??50)-(O.right??20)),R=Hy(e.labels,P,n.horizontalAxis);R!==void 0&&(O.bottom=R);const $=O.top!=null,A=Math.max(0,y-(O.left??50)-(O.right??20)),L=v?Ga(f,S,A):{width:0,height:0},B=v?L.height+10:0,F={...O};if(v&&S==="top"){const ze=$?15:0;F.top=B+ze}v&&S==="bottom"&&(F.bottom=(F.bottom??24)+B),v&&S==="left"&&(F.left=(F.left??50)+L.width+10),v&&S==="right"&&(F.right=(F.right??20)+L.width+10);const{chartArea:z,width:V,height:U,margin:ie}=Ur(c,F),ue=ki(a,ie);let[fe,he]=fu(M,(un=n.verticalAxis)==null?void 0:un.range);if(n.valueLabels&&fe<0&&((Nt=(Mt=n.verticalAxis)==null?void 0:Mt.range)==null?void 0:Nt.min)==null){const ze=he-fe;fe-=ze*.1}let ce=e.labels;if(n.sortMode==="total"){const ze=e.labels.map((Tt,Pe)=>({label:Tt,index:Pe,total:d.reduce((Ge,at)=>Ge+(at.values[Pe]??0),0)}));ze.sort((Tt,Pe)=>Pe.total-Tt.total),ce=ze.map(Tt=>Tt.label)}const de=Sn().domain(ce).range([0,V]).padding(jl(n.barGap)),_e=Sn().domain(f).range([0,de.bandwidth()]).padding(.05),j=((tn=n.verticalAxis)==null?void 0:tn.scaleType)==="log",te=j?Va().domain([fe,he]).nice().range([U,0]):bn().domain([fe,he]).nice().range([U,0]);l.attach(z,ue),l.update({vertical:{scale:te,height:U,options:{...n.verticalAxis,gridWidth:V,topPadding:ie.top}},horizontal:{scale:de,height:U,options:{...n.horizontalAxis,width:V}}}),!j&&fe<0&&he>0&&we(z).append("line").attr("class","bc-zero-baseline").attr("x1",0).attr("x2",V).attr("y1",te(0)).attr("y2",te(0)).attr("stroke","#666").attr("stroke-width",1);const ne=new Map;n.sortMode==="within-groups"&&e.labels.forEach((ze,Tt)=>{const Pe=d.map(Ge=>({name:Ge.name,value:Ge.values[Tt]}));Pe.sort((Ge,at)=>at.value-Ge.value),Pe.forEach((Ge,at)=>{ne.set(`${ze}\0${Ge.name}`,f[at])})});const me=[];e.labels.forEach((ze,Tt)=>{d.forEach(Pe=>{const Ge=u.findIndex(et=>et.name===Pe.name),at=n.sortMode==="within-groups"?ne.get(`${ze}\0${Pe.name}`)??Pe.name:Pe.name;me.push({label:ze,series:at,seriesName:Pe.name,value:Pe.values[Tt],seriesIndex:Ge})})});const ve=n.valueLabels??!1,I=`bc-clip-${Math.random().toString(36).slice(2,8)}`,W=z.ownerSVGElement;(we(W).select("defs").empty()?we(W).append("defs"):we(W).select("defs")).append("clipPath").attr("id",I).append("rect").attr("width",V).attr("height",U);const ae=we(z).append("g").attr("clip-path",`url(#${I})`),le=new Lee(ae);if(le.config({x0:de,x1:_e,y:te,height:U,colors:h}),r.length>0){const ze=ae.node().querySelector("g");jn(ze,r,(ue==null?void 0:ue.dx)??0,(ue==null?void 0:ue.dy)??0)}if(n.tooltips&&le.use(Ha({numberFormat:(Cn=n.verticalAxis)==null?void 0:Cn.numberFormat})),n.crosshair&&le.use(Xl({width:V,height:U,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor})),(lo=n.annotations)!=null&&lo.length){const ze=e.labels.map((Tt,Pe)=>({label:Tt,value:Math.max(...d.map(Ge=>Ge.values[Pe]??0))}));le.use(pu(n.annotations,{scaleX:de,scaleY:te,data:ze,width:V,height:U,backgroundColor:Cr(t),transition:o,priorAnnotations:s}))}le.draw(me),Yr(t,{chartType:"bar-multi",margin:ie}),i&&(Ar(ae.node()),Tr(t,i)),we(z).selectAll(".bc-bar-multi").each(function(ze){const Tt=ze,Pe=cn(Tt.seriesName,Tt.seriesIndex,h,g),Ge=_f(Tt.seriesName,g),at=o?we(this).transition().duration(ut()):we(this);at.attr("fill",Pe),Ge<1&&at.attr("fill-opacity",Ge)});const K=new Set;d.forEach(ze=>{ya(ze.name,m,g)==="direct"&&K.add(ze.name)});const oe=K.size>0,Z=Cr(t),Y=typeof n.directLabelling=="string"?n.directLabelling:n.directLabelling?$o.Auto:$o.Off,ee=n.directLabelAnchor??"middle",ge=n.valueLabelPosition??yt.Auto;function pe(){return ge===yt.Inside?yt.Inside:(ge===yt.Outside,yt.Outside)}function xe(ze){return Y===$o.Inside?yt.Inside:Y===$o.Outside?yt.Outside:ve?pe():yt.Outside}function be(ze,Tt,Pe){return Pe==="start"?ze+12:Pe==="end"?ze+Tt-4:ze+Tt/2}const Oe=we(z).append("g").attr("class","bc-value-labels");me.forEach(ze=>{if(!yu(ze.seriesName,ve,g))return;const Tt=(de(ze.label)??0)+(_e(ze.series)??0)+_e.bandwidth()/2,Pe=Math.min(te(0),te(ze.value)),Ge=Math.abs(te(ze.value)-te(0)),at=pe(),et=oe&&K.has(ze.seriesName),nn=ze.value<0,Rn=Pe+Ge;let Qn,Un,co;if(at===yt.Inside){const Js=cn(ze.seriesName,ze.seriesIndex,h,g);Un=Bo(Js),co="central",et&&xe()===yt.Inside?Qn=be(Pe,Ge,ee)+14:Qn=Pe+Ge/2}else Un="currentColor",nn?(Qn=et&&xe()===yt.Outside?Rn+16:Rn+4,co="hanging"):(Qn=et&&xe()===yt.Outside?Pe-16:Pe-4,co="auto");Oe.append("text").attr("class","bc-value-label").attr("data-series",ze.seriesIndex).attr("x",Tt).attr("y",Qn).attr("text-anchor","middle").attr("dominant-baseline",co).attr("font-size","11px").attr("fill",Un).text(String(ze.value))}),me.forEach(ze=>{var Qn;if(!K.has(ze.seriesName))return;const Tt=(de(ze.label)??0)+(_e(ze.series)??0)+_e.bandwidth()/2,Pe=Math.min(te(0),te(ze.value)),Ge=Math.abs(te(ze.value)-te(0)),at=((Qn=g==null?void 0:g.find(Un=>Un.name===ze.seriesName))==null?void 0:Qn.labelText)||ze.seriesName,et=xe(),nn=cn(ze.seriesName,ze.seriesIndex,h,g),Rn=we(z).append("text").attr("class","bc-direct-label").attr("data-series",ze.seriesIndex).attr("x",Tt).attr("text-anchor","middle").attr("font-size","10px").text(at);if(et===yt.Inside){const Un=be(Pe,Ge,ee);Rn.attr("y",Un).attr("fill",Bo(nn)),ee==="middle"&&Rn.attr("dominant-baseline","central")}else Rn.attr("y",Pe-4).attr("fill",A5(nn,Z))});const Se=f.filter(ze=>ya(ze,m,g)==="legend");if(v&&Se.length>0){const ze=Se.map(Ge=>{const at=u.findIndex(et=>et.name===Ge);return cn(Ge,at,h,g)});let Tt=0,Pe=0;if(S==="top"){const Ge=$?15:0;Pe=-(L.height+5+Ge)}else S==="bottom"?Pe=U+25:S==="left"?Tt=-(L.width+10):S==="right"&&(Tt=V+10);za(z,Se,ze,Pe,S,E,V,U,Tt,[],{left:ie.left,right:ie.right})}}const Dee={linear:uu,monotoneX:Vy,step:cK,stepBefore:uK,stepAfter:dK,basis:iK,cardinal:sK,catmullRom:lK};function Pl(t){return t&&Dee[t]||uu}function D5(t){const e=(t==null?void 0:t.position)??yt.Auto,n=(t==null?void 0:t.orientation)??Yn.Vertical,o=t!=null&&t.format?cu(t.format):r=>String(r);return{name:"value-labels",install(){},postDraw(r){const i=r.base;i.selectAll(".bc-bar").each(function(s){const a=we(this),l=parseFloat(a.attr("x")),c=parseFloat(a.attr("y")),u=parseFloat(a.attr("width")),d=parseFloat(a.attr("height")),f=s.value<0;let h,g,b,m,v;if(n===Yn.Horizontal)if(v=e===yt.Inside,g=c+d/2,m="central",f)v?(h=l+4,b="start"):(h=l-4,b="end");else{const S=l+u;v?(h=S-4,b="end"):(h=S+4,b="start")}else v=e===yt.Inside,h=l+u/2,b="middle",f?v?(g=c+d/2,m="central"):(g=c+d+4,m="hanging"):v?(g=c+d/2,m="central"):(g=c-4,m="auto");const y=a.attr("fill")||"#ccc",x=v?Bo(y):"currentColor";we(this.parentNode).append("text").attr("class","bc-value-label").attr("x",h).attr("y",g).attr("text-anchor",b).attr("dominant-baseline",m).attr("font-size","11px").attr("fill",x).text(o(s.value))}),i.selectAll(".bc-dot").each(function(s){const a=we(this),l=parseFloat(a.attr("cx")),c=parseFloat(a.attr("cy"));we(this.parentNode).append("text").attr("class","bc-value-label").attr("x",l).attr("y",c-8).attr("text-anchor","middle").attr("font-size","11px").attr("fill","currentColor").text(o(s.value))})}}}const E5="bc-tooltip";function Eee(){if(document.getElementById("bc-tooltip-styles"))return;const t=document.createElement("style");t.id="bc-tooltip-styles",t.textContent=`
|
|
66
|
+
.${E5} {
|
|
67
|
+
position: absolute;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
background: var(--bs-body-bg, #fff);
|
|
70
|
+
color: var(--bs-body-color, #212529);
|
|
71
|
+
border: 1px solid var(--bs-border-color, #dee2e6);
|
|
72
|
+
border-radius: 4px;
|
|
73
|
+
padding: 6px 10px;
|
|
74
|
+
font-size: 13px;
|
|
75
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.12);
|
|
76
|
+
z-index: 9999;
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
`,document.head.appendChild(t)}function Iee(t){const e=t?Ta(t):null,n=o=>e?e(o):String(o);return o=>o.series?`${o.series} – ${o.label}: ${n(o.value)}`:`${o.label}: ${n(o.value)}`}function Mm(t,e){const{width:n,height:o,points:r,tooltip:i=!0,crosshair:s=!1,crosshairDirection:a=Ao.Both,crosshairStyle:l=oi.Dashed,crosshairColor:c="#999",format:u=Iee(e.numberFormat)}=e;if(r.length===0)return()=>{};const d=l===oi.Solid?"none":l===oi.Dotted?"2,2":"4,3",f=[...new Set(r.map($=>$.cx))].sort(($,A)=>$-A),h=we(t);let g=null;i&&(Eee(),g=document.createElement("div"),g.className=E5,document.body.appendChild(g));const b=".bc-annotations",m=!h.select(b).empty(),v=$=>m?h.insert($,b):h.append($),y=s&&(a===Ao.Both||a===Ao.Vertical),x=s&&(a===Ao.Both||a===Ao.Horizontal);let _=null,S=null;y&&(_=v("line").attr("class","bc-crosshair bc-crosshair-v").attr("y1",0).attr("y2",o).attr("stroke",c).attr("stroke-width",1).style("stroke-dasharray",d).attr("pointer-events","none").style("display","none")),x&&(S=v("line").attr("class","bc-crosshair bc-crosshair-h").attr("x1",0).attr("x2",n).attr("stroke",c).attr("stroke-width",1).style("stroke-dasharray",d).attr("pointer-events","none").style("display","none"));const E=v("circle").attr("class","bc-proximity-dot").attr("r",6).attr("fill","none").attr("stroke","#333").attr("stroke-width",1).attr("opacity",.45).attr("pointer-events","none").style("display","none"),M=v("rect").attr("class","bc-proximity-overlay").attr("width",n).attr("height",o).attr("fill","none").attr("pointer-events","all");function C($,A){if(f.length===0)return null;const L=cV(f,$),B=f[L],F=r.filter(U=>U.cx===B);if(F.length===0)return null;let z=F[0],V=Math.abs(F[0].cy-A);for(let U=1;U<F.length;U++){const ie=Math.abs(F[U].cy-A);ie<V&&(z=F[U],V=ie)}return z}const O=$=>{const[A,L]=HY($,t),B=C(A,L);B&&(E.attr("cx",B.cx).attr("cy",B.cy).attr("stroke",B.color).style("display",null),g&&(g.textContent=u(B),g.style.display="block",zA(E.node(),g,{placement:"top",middleware:[RA(8),VA(),FA()]}).then(({x:F,y:z})=>{g&&(g.style.left=`${F}px`,g.style.top=`${z}px`)})),_&&_.attr("x1",B.cx).attr("x2",B.cx).style("display",null),S&&S.attr("y1",B.cy).attr("y2",B.cy).style("display",null))},P=()=>{E.style("display","none"),g&&(g.style.display="none"),_&&_.style("display","none"),S&&S.style("display","none")},R=M.node();return R.addEventListener("mousemove",O),R.addEventListener("mouseleave",P),()=>{R.removeEventListener("mousemove",O),R.removeEventListener("mouseleave",P),M.remove(),E.remove(),g&&(g.remove(),g=null),_&&_.remove(),S&&S.remove()}}const Nee=oK??uA,Ree={circle:Ry,square:ZX,diamond:KX,triangle:uA,triangleDown:Nee,cross:jX,star:tK};function Fee(t,e,n){switch(n){case gr.First:return t===0;case gr.Last:return t===e-1;case gr.FirstLast:return t===0||t===e-1;case gr.All:default:return!0}}function a2(t,e,n,o,r=!1){const i=o.symbol??pr.Circle,s=o.showOn??gr.FirstLast,a=o.style??Vo.Filled,l=o.size??3.5,c=o.opacity??1,u="var(--bs-body-bg, #fff)",d=e.filter(h=>Fee(h.index,n,s)),f=r?ut():0;if(i===pr.Circle){const h=t.selectAll(".bc-symbol").data(d).join(b=>b.append("circle").attr("class","bc-symbol").attr("cx",m=>m.cx).attr("cy",m=>m.cy).attr("r",l).attr("fill",m=>a===Vo.Filled?m.color:u).attr("stroke",m=>m.color).attr("stroke-width",a===Vo.Hollow?1.5:0).attr("opacity",c),b=>b,b=>b.remove());(r?h.transition().duration(f):h).attr("cx",b=>b.cx).attr("cy",b=>b.cy).attr("r",l).attr("fill",b=>a===Vo.Filled?b.color:u).attr("stroke",b=>b.color).attr("stroke-width",a===Vo.Hollow?1.5:0).attr("opacity",c)}else{const h=Ree[i]??Ry,g=Math.PI*l*l,b=rK().type(h).size(g),m=t.selectAll(".bc-symbol").data(d).join(y=>y.append("path").attr("class","bc-symbol").attr("transform",x=>`translate(${x.cx},${x.cy})`).attr("d",b).attr("fill",x=>a===Vo.Filled?x.color:u).attr("stroke",x=>x.color).attr("stroke-width",a===Vo.Hollow?1.5:0).attr("opacity",c),y=>y,y=>y.remove());(r?m.transition().duration(f):m).attr("transform",y=>`translate(${y.cx},${y.cy})`).attr("d",b).attr("fill",y=>a===Vo.Filled?y.color:u).attr("stroke",y=>y.color).attr("stroke-width",a===Vo.Hollow?1.5:0).attr("opacity",c)}}const I5="#4e79a7";class Vee extends ao{initialize(){this.configDefine("xPos",{defaultValue:(r,i)=>0}),this.configDefine("y",{defaultValue:bn()}),this.configDefine("color",{defaultValue:I5}),this.configDefine("curve",{defaultValue:uu}),this.configDefine("areaFill",{defaultValue:!1}),this.configDefine("areaFillOpacity",{defaultValue:.2}),this.configDefine("height",{defaultValue:0});const e=this.base.append("g"),n=this.base.append("g"),o=this.base.append("g");this.layer("area",e,{dataBind:(r,i)=>r.selectAll(".bc-area").data(this.config("areaFill")?[i]:[]),insert:r=>r.append("path").attr("class","bc-area"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=this.config("height"),u=this.config("areaFillOpacity"),d=Fs().curve(l).x((f,h)=>i(f,h)).y0(c).y1(f=>s(f.value));r.attr("fill",a).attr("opacity",u).attr("d",d)},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=this.config("height"),u=this.config("areaFillOpacity"),d=Fs().curve(l).x((f,h)=>i(f,h)).y0(c).y1(f=>s(f.value));r.duration(ut()).attr("fill",a).attr("opacity",u).attr("d",d)},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}}),this.layer("line",n,{dataBind:(r,i)=>r.selectAll(".bc-line").data([i]),insert:r=>r.append("path").attr("class","bc-line"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=bi().curve(l).x((u,d)=>i(u,d)).y(u=>s(u.value));r.attr("fill","none").attr("stroke",a).attr("d",c)},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=bi().curve(l).x((u,d)=>i(u,d)).y(u=>s(u.value));r.duration(ut()).attr("fill","none").attr("stroke",a).attr("d",c)},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}}),this.layer("dots",o,{dataBind:(r,i)=>r.selectAll(".bc-dot").data(i,s=>s.label),insert:r=>r.append("circle").attr("class","bc-dot"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color");r.attr("cx",(l,c)=>i(l,c)).attr("cy",l=>s(l.value)).attr("r",3).attr("fill",a)},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color");r.duration(ut()).attr("cx",(l,c)=>i(l,c)).attr("cy",l=>s(l.value)).attr("r",3).attr("fill",a)},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}})}}function zee(t,e,n={},o=!1){var j,te,ne,me,ve,I,W,X,ae,le,K,oe;Gr(o);let r=[],i=[],s=[],a=null,l=null,c,u;const d=Mr.for(t);if(o){const Z=qr(t);u=Z==null?void 0:Z.margin,d.detach(),(Z==null?void 0:Z.chartType)==="line"?(r=Array.from(t.querySelectorAll(".bc-frame .bc-area")),i=Array.from(t.querySelectorAll(".bc-frame .bc-line")),s=Array.from(t.querySelectorAll(".bc-frame .bc-dot")),a=t.querySelector(".bc-frame .bc-symbols")):Z&&(l=$r(t)),c=new Map;for(const Y of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[ee,ge]of cr(Y))c.set(ee,ge);t.replaceChildren()}const{body:f}=Wr(t,n.frame),h=lr(f).width,g=ql(e.values,(j=n.verticalAxis)==null?void 0:j.range,(te=n.verticalAxis)==null?void 0:te.numberFormat,(ne=n.verticalAxis)==null?void 0:ne.scaleType),b=Ci(h,(me=n.verticalAxis)==null?void 0:me.labelPosition,(ve=n.horizontalAxis)==null?void 0:ve.labelPosition,(I=n.verticalAxis)==null?void 0:I.direction,g),{chartArea:m,width:v,height:y,margin:x}=Ur(f,b),_=ki(u,x),S=ym(e.labels,(W=n.horizontalAxis)==null?void 0:W.range),E=S.map(Z=>e.labels[Z]),M=S.map(Z=>e.values[Z]),C=E.map((Z,Y)=>({label:Z,value:M[Y]})),O=hm().domain(E).range([0,v]).padding(n.edgePadding?.6:0),P=O,R=Z=>O(Z.label)??0,$=((X=n.verticalAxis)==null?void 0:X.scaleType)==="log",[A,L]=fu(M,(ae=n.verticalAxis)==null?void 0:ae.range),B=$?Va().domain([A,L]).nice().range([y,0]):bn().domain([A,L]).nice().range([y,0]),F=B.domain(),z=F[0]<0&&F[1]>0?B(0):void 0;d.attach(m,_),d.update({vertical:{scale:B,height:y,options:{...n.verticalAxis,gridWidth:v,topPadding:x.top}},horizontal:{scale:P,height:y,options:{...n.horizontalAxis,width:v,zeroY:z}}});const V=`bc-clip-${Math.random().toString(36).slice(2,8)}`,U=m.ownerSVGElement;(we(U).select("defs").empty()?we(U).append("defs"):we(U).select("defs")).append("clipPath").attr("id",V).append("rect").attr("x",-1).attr("y",-1).attr("width",v+2).attr("height",y+2);const ue=we(m).append("g").attr("clip-path",`url(#${V})`),fe=ue.node(),he=((le=n.colors)==null?void 0:le[0])??I5,ce=Pl(n.interpolation),de=n.lineSymbols,_e=new Vee(we(fe));if(_e.config({xPos:R,y:B,color:he,curve:ce,areaFill:n.areaFill??!1,areaFillOpacity:n.areaFillOpacity??.2,height:y}),i.length>0||r.length>0||s.length>0){const Z=(_==null?void 0:_.dx)??0,Y=(_==null?void 0:_.dy)??0,ee=fe.querySelectorAll(":scope > g");ee[0]&&jn(ee[0],r,Z,Y),ee[1]&&jn(ee[1],i,Z,Y),ee[2]&&jn(ee[2],s,Z,Y)}if(n.valueLabels&&_e.use(D5({position:n.valueLabelPosition,orientation:Yn.Vertical})),_e.draw(C),(K=n.annotations)!=null&&K.length&&Am(m,n.annotations,{scaleX:P,scaleY:B,data:C,width:v,height:y,backgroundColor:Cr(t),transition:o,priorAnnotations:c}),we(fe).selectAll(".bc-dot").attr("fill-opacity",0).attr("stroke-opacity",0).attr("pointer-events","none"),n.tooltips||n.crosshair){const Z=C.map(Y=>({cx:R(Y),cy:B(Y.value),label:Y.label,value:Y.value,color:he}));Mm(m,{width:v,height:y,points:Z,tooltip:n.tooltips,crosshair:n.crosshair,crosshairDirection:n.crosshairDirection,crosshairStyle:n.crosshairStyle,crosshairColor:n.crosshairColor,numberFormat:(oe=n.verticalAxis)==null?void 0:oe.numberFormat})}if(de){const Z=C.map((ee,ge)=>({cx:R(ee),cy:B(ee.value),color:he,index:ge}));let Y;a?(m.appendChild(a),Y=we(a)):Y=we(m).append("g").attr("class","bc-symbols"),a2(Y,Z,C.length,de,o)}Yr(t,{chartType:"line",margin:x}),l&&(Ar(ue.node()),Tr(t,l))}const l2=28,N5=18,R5=20;function c2(t,e,n,o=l2){if(t.length===0)return[];if(t.length===1)return[Math.max(e,Math.min(n,t[0]))];const r=t.length,i=n-e,a=(r-1)*o>i?Math.max(0,i/(r-1)):o,l=[...t];for(let c=0;c<10;c++){for(let u=1;u<l.length;u++)l[u]-l[u-1]<a&&(l[u]=l[u-1]+a);l[l.length-1]>n&&(l[l.length-1]=n);for(let u=l.length-2;u>=0;u--)l[u+1]-l[u]<a&&(l[u]=l[u+1]-a);l[0]<e&&(l[0]=e)}return l}function F5(t,e,n){const{outerRadius:o,fontSize:r=12,bgColor:i="#fff"}=n,s=o+2,a=s+N5,l=l2/a,c=[],u=[];for(const f of e){const h=(f.startAngle+f.endAngle)/2;h<Math.PI?u.push({...f,midAngle:h}):c.push({...f,midAngle:h})}function d(f,h){if(f.length===0)return;f.sort((_,S)=>_.midAngle-S.midAngle);const g=h?.05:Math.PI+.05,b=h?Math.PI-.05:2*Math.PI-.05,m=f.map(_=>_.midAngle),v=c2(m,g,b,l),y=h?1:-1,x=t.append("g").attr("class","bc-arc-labels");f.forEach((_,S)=>{const E=_.showLabel!==!1,M=_.showValue!==!1;if(!E&&!M)return;const O=v[S]-Math.PI/2,P=Math.cos(O)*s,R=Math.sin(O)*s,$=Math.cos(O)*a,A=Math.sin(O)*a,L=$+y*R5;x.append("polyline").attr("class","bc-arc-label-line").attr("points",`${P},${R} ${$},${A} ${L},${A}`).attr("fill","none").attr("stroke","var(--bc-text-color, #999)").attr("stroke-width",1).attr("opacity",.5);const B=L+y*4,F=x.append("text").attr("class","bc-arc-direct-label").attr("x",B).attr("y",A).attr("text-anchor",h?"start":"end").attr("font-size",`${r}px`);if(E&&F.append("tspan").attr("x",B).attr("dy",M?"-0.1em":"0.35em").attr("font-weight","bold").attr("fill",A5(_.color,i)).text(_.label),M){const z=_.displayAsPercentage&&_.percentage!=null?`${Math.round(_.percentage)}%`:String(_.value);F.append("tspan").attr("x",B).attr("dy",E?"1.2em":"0.35em").attr("fill","var(--bc-text-color, #666)").text(z)}})}d(u,!0),d(c,!1)}const V5=.3;function z5(t,e,n){const{outerRadius:o,innerRadius:r=0,fontSize:i=12}=n,s=(r+o)/2,a=t.append("g").attr("class","bc-arc-labels-inside");for(const l of e){if(l.endAngle-l.startAngle<V5)continue;const u=l.showLabel!==!1,d=l.showValue!==!1;if(!u&&!d)continue;const f=(l.startAngle+l.endAngle)/2-Math.PI/2,h=Math.cos(f)*s,g=Math.sin(f)*s,b=a.append("text").attr("class","bc-arc-inside-label").attr("x",h).attr("y",g).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",`${i}px`),m=Bo(l.color);if(u&&b.append("tspan").attr("x",h).attr("dy",d?"-0.5em":"0em").attr("font-weight","bold").attr("fill",m).text(l.label),d){const v=l.displayAsPercentage&&l.percentage!=null?`${Math.round(l.percentage)}%`:String(l.value);b.append("tspan").attr("x",h).attr("dy",u?"1.2em":"0em").attr("fill",m).attr("opacity",.85).text(v)}}}function Hee(t,e,n){const{outerRadius:o,innerRadius:r=0,fontSize:i=12,bgColor:s}=n,a=(r+o)/2,l=[],c=[];for(const u of e){const d=u.endAngle-u.startAngle,f=d*a,h=u.label.length*7;f>h*1.2&&d>=V5?l.push(u):c.push(u)}l.length>0&&z5(t,l,{outerRadius:o,innerRadius:r,fontSize:i}),c.length>0&&F5(t,c,{outerRadius:o,fontSize:i,bgColor:s})}function Wee(t,e){if(t.length===0)return{left:0,right:0,top:0,bottom:0};const n=Math.max(...t.map(a=>a.length)),o=N5+R5+6+4+n*7+6,i=t.length*l2/2,s=Math.max(10,i-e+20);return{left:o,right:o,top:s,bottom:s}}const H5=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"];class Uee extends ao{initialize(){this.configDefine("xPos",{defaultValue:r=>0}),this.configDefine("y",{defaultValue:bn()}),this.configDefine("colors",{defaultValue:H5}),this.configDefine("labels",{defaultValue:[]}),this.configDefine("curve",{defaultValue:uu}),this.configDefine("areaFill",{defaultValue:!1}),this.configDefine("areaFillOpacity",{defaultValue:.2}),this.configDefine("height",{defaultValue:0}),this.configDefine("dots",{defaultValue:[]}),this.configDefine("highlightTargets",{defaultValue:new Set});const e=this.base.append("g"),n=this.base.append("g"),o=this.base.append("g");this.layer("areas",e,{dataBind:(r,i)=>r.selectAll(".bc-area").data(this.config("areaFill")?i:[],s=>s.name),insert:r=>r.append("path").attr("class","bc-area"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("colors"),l=this.config("curve"),c=this.config("height"),u=this.config("areaFillOpacity");r.attr("data-series",d=>d.colorIndex).attr("fill",d=>a[d.colorIndex%a.length]).attr("opacity",u).attr("d",d=>Fs().curve(l).x((h,g)=>i(g)).y0(c).y1(h=>s(h))(d.values))},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("colors"),l=this.config("curve"),c=this.config("height"),u=this.config("areaFillOpacity");r.duration(ut()).attr("data-series",d=>d.colorIndex).attr("fill",d=>a[d.colorIndex%a.length]).attr("opacity",u).attr("d",d=>Fs().curve(l).x((h,g)=>i(g)).y0(c).y1(h=>s(h))(d.values))},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}}),this.layer("lines",n,{dataBind:(r,i)=>r.selectAll(".bc-line").data(i,s=>s.name),insert:r=>r.append("path").attr("class","bc-line"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("colors"),l=this.config("highlightTargets"),c=l.size>0;r.attr("data-series",u=>u.colorIndex).attr("fill","none").attr("stroke",u=>a[u.colorIndex%a.length]).attr("stroke-width",2).attr("opacity",u=>c?l.has(u.name)?1:.3:null).attr("d",u=>{const d=this.config("curve");return bi().curve(d).x((h,g)=>i(g)).y(h=>s(h))(u.values)})},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("colors"),l=this.config("highlightTargets"),c=l.size>0;r.duration(ut()).attr("data-series",u=>u.colorIndex).attr("fill","none").attr("stroke",u=>a[u.colorIndex%a.length]).attr("stroke-width",2).attr("opacity",u=>c?l.has(u.name)?1:.3:null).attr("d",u=>{const d=this.config("curve");return bi().curve(d).x((h,g)=>i(g)).y(h=>s(h))(u.values)})},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}}),this.layer("dots",o,{dataBind:r=>r.selectAll(".bc-dot").data(this.config("dots"),i=>i.label+"\0"+i.series),insert:r=>r.append("circle").attr("class","bc-dot"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("colors"),l=this.config("labels");r.attr("data-series",c=>c.colorIndex).attr("cx",c=>i(l.indexOf(c.label))).attr("cy",c=>s(c.value)).attr("r",3).attr("fill",c=>a[c.colorIndex%a.length])},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("colors"),l=this.config("labels");r.duration(ut()).attr("data-series",c=>c.colorIndex).attr("cx",c=>i(l.indexOf(c.label))).attr("cy",c=>s(c.value)).attr("r",3).attr("fill",c=>a[c.colorIndex%a.length])},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}})}}function Gee(t,e,n={},o=!1){var Pe,Ge,at,et,nn,Rn,Qn,Un,co,Js,Su,ku;Gr(o);let r=e,i=[],s=[],a=[],l=[],c=null,u,d;const f=Mr.for(t);if(o){const He=qr(t);d=He==null?void 0:He.margin,f.detach(),(He==null?void 0:He.chartType)==="line-multi"?(i=Array.from(t.querySelectorAll(".bc-frame .bc-area")),s=Array.from(t.querySelectorAll(".bc-frame .bc-line")),a=Array.from(t.querySelectorAll(".bc-frame .bc-dot")),l=Array.from(t.querySelectorAll(".bc-frame .bc-symbols"))):He&&(c=$r(t)),u=new Map;for(const rt of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[Et,Ht]of cr(rt))u.set(Et,Ht);t.replaceChildren()}const{body:h}=Wr(t,n.frame),g=r.series??[];let b=g.filter(He=>!qa(He.name,n.seriesOverrides));(n.sortMode==="total"||n.sortMode==="within-groups")&&(b=[...b].sort((He,rt)=>{const Et=He.values.reduce((Gn,Jn)=>Gn+Jn,0);return rt.values.reduce((Gn,Jn)=>Gn+Jn,0)-Et}));const m=n.colors??H5,v=b.map(He=>He.name),y=n.seriesOverrides,x=n.directLabelling===!0||n.directLabelling==="auto"&&n.legend!==!0||!!n.directLabelling&&n.directLabelling!=="auto",_=x?"direct":n.legend!==!1?"legend":"none",S=v.filter(He=>ya(He,_,y)==="direct"),E=n.legend!==!1&&!x,M=lr(h).width,C=350,O=n.legendPosition??"top",P=M>0&&M<C&&(O==="left"||O==="right")?"top":O,R=n.legendAnchor??"start",$=ym(r.labels,(Pe=n.horizontalAxis)==null?void 0:Pe.range),A=$.map(He=>r.labels[He]);b=b.map(He=>({...He,values:$.map(rt=>He.values[rt])})),r={...r,labels:A,series:b};const L=b.flatMap(He=>He.values),B=ql(L,(Ge=n.verticalAxis)==null?void 0:Ge.range,(at=n.verticalAxis)==null?void 0:at.numberFormat,(et=n.verticalAxis)==null?void 0:et.scaleType),F=Ci(M,(nn=n.verticalAxis)==null?void 0:nn.labelPosition,(Rn=n.horizontalAxis)==null?void 0:Rn.labelPosition,(Qn=n.verticalAxis)==null?void 0:Qn.direction,B),z=S.length>0?L5(S):0,V=F.top!=null,U=Math.max(0,M-(F.left??50)-(F.right??20)-z),ie=E?Ga(v,P,U):{width:0,height:0},ue=E?ie.height+10:0,fe={...F};if(E&&P==="top"){const He=V?15:0;fe.top=ue+He}E&&P==="bottom"&&(fe.bottom=(fe.bottom??24)+ue),E&&P==="left"&&(fe.left=(fe.left??50)+ie.width+10),E&&P==="right"&&(fe.right=(fe.right??20)+ie.width+10),z>0&&(fe.right=(fe.right??20)+z);const{chartArea:he,width:ce,height:de,margin:_e}=Ur(h,fe),j=ki(d,_e),[te,ne]=fu(L,(Un=n.verticalAxis)==null?void 0:Un.range),me=hm().domain(r.labels).range([0,ce]).padding(n.edgePadding?.6:0),ve=me,I=He=>me(r.labels[He])??0,X=((co=n.verticalAxis)==null?void 0:co.scaleType)==="log"?Va().domain([te,ne]).nice().range([de,0]):bn().domain([te,ne]).nice().range([de,0]),ae=X.domain(),le=ae[0]<0&&ae[1]>0?X(0):void 0;f.attach(he,j),f.update({vertical:{scale:X,height:de,options:{...n.verticalAxis,gridWidth:ce,topPadding:_e.top}},horizontal:{scale:ve,height:de,options:{...n.horizontalAxis,width:ce,zeroY:le}}});const K=`bc-clip-${Math.random().toString(36).slice(2,8)}`,oe=he.ownerSVGElement;(we(oe).select("defs").empty()?we(oe).append("defs"):we(oe).select("defs")).append("clipPath").attr("id",K).append("rect").attr("width",ce).attr("height",de);const Y=we(he).append("g").attr("clip-path",`url(#${K})`),ee=Y.node(),ge=b.map(He=>({name:He.name,values:He.values,colorIndex:g.findIndex(rt=>rt.name===He.name)})),pe=Pl(n.interpolation);(Js=n.areaFills)!=null&&Js.length&&qee(ee,n.areaFills,b,I,r.labels.length,X,pe);const xe=[];b.forEach((He,rt)=>{r.labels.forEach((Et,Ht)=>{xe.push({label:Et,value:He.values[Ht],series:He.name,colorIndex:rt})})});const be=n.lineSymbols,Oe={solid:"",dotted:"2,4",dashed:"8,4","dash-dot":"8,4,2,4"},Se=n.valueLabels??!1,Ae=new Set((n.highlights??[]).map(He=>He.target)),je=Ae.size>0,ot=new Uee(we(ee));ot.config({xPos:I,y:X,colors:m,labels:r.labels,curve:pe,areaFill:n.areaFill??!1,areaFillOpacity:n.areaFillOpacity??.2,height:de,dots:xe,highlightTargets:Ae});const ht=new Set(ge.map(He=>He.name)),$t=i.filter(He=>{var rt;return ht.has(((rt=He.__data__)==null?void 0:rt.name)??"")}),Ft=s.filter(He=>{var rt;return ht.has(((rt=He.__data__)==null?void 0:rt.name)??"")}),un=a.filter(He=>{var rt;return ht.has(((rt=He.__data__)==null?void 0:rt.series)??"")});if(Ft.length>0||$t.length>0||un.length>0){const He=(j==null?void 0:j.dx)??0,rt=(j==null?void 0:j.dy)??0,Et=ee.querySelectorAll(":scope > g");Et[0]&&jn(Et[0],$t,He,rt),Et[1]&&jn(Et[1],Ft,He,rt),Et[2]&&jn(Et[2],un,He,rt)}if(ot.draw(ge),(Su=n.annotations)!=null&&Su.length){const He=r.labels.map((rt,Et)=>{var Ht;return{label:rt,value:((Ht=b[0])==null?void 0:Ht.values[Et])??0}});Am(he,n.annotations,{scaleX:ve,scaleY:X,data:He,width:ce,height:de,backgroundColor:Cr(t),transition:o,priorAnnotations:u})}const Mt=we(ee).append("g").attr("class","bc-value-labels");if(xe.forEach(He=>{if(!yu(He.series,Se,y))return;const rt=I(r.labels.indexOf(He.label)),Et=X(He.value);Mt.append("text").attr("class","bc-value-label").attr("data-series",He.colorIndex).attr("x",rt).attr("y",Et-8).attr("text-anchor","middle").attr("font-size","11px").attr("fill","currentColor").text(String(He.value))}),we(ee).selectAll(".bc-line").each(function(He){const rt=He,Et=cn(rt.name,rt.colorIndex,m,y),Ht=Oee(rt.name,y),Gn=Mee(rt.name,y),Jn=s2(rt.name,n.interpolation??"linear",y),Xr=o?we(this).transition().duration(ut()):we(this);if(Xr.attr("stroke",Et).attr("stroke-width",Ht),je&&Xr.attr("opacity",Ae.has(rt.name)?1:.3),Gn!=="solid"&&we(this).attr("stroke-dasharray",Oe[Gn]??""),Jn!==(n.interpolation??"linear")){const Ql=Pl(Jn),Jl=bi().curve(Ql).x((ea,ug)=>I(ug)).y(ea=>X(ea));Xr.attr("d",Jl(rt.values))}}),we(ee).selectAll(".bc-area").each(function(He){const rt=He,Et=cn(rt.name,rt.colorIndex,m,y),Ht=o?we(this).transition().duration(ut()):we(this);Ht.attr("fill",Et),je&&Ht.attr("opacity",Ae.has(rt.name)?n.areaFillOpacity??.2:.1)}),we(ee).selectAll(".bc-dot").attr("fill-opacity",0).attr("stroke-opacity",0).attr("pointer-events","none"),n.tooltips||n.crosshair){const He=xe.map(rt=>({cx:I(r.labels.indexOf(rt.label)),cy:X(rt.value),label:rt.label,value:rt.value,series:rt.series,color:cn(rt.series,rt.colorIndex,m,y)}));Mm(he,{width:ce,height:de,points:He,tooltip:n.tooltips,crosshair:n.crosshair,crosshairDirection:n.crosshairDirection,crosshairStyle:n.crosshairStyle,crosshairColor:n.crosshairColor,numberFormat:(ku=n.verticalAxis)==null?void 0:ku.numberFormat})}const Nt=be?{symbolShape:be.symbol,symbolShowOn:be.showOn,symbolStyle:be.style,symbolSize:be.size,symbolOpacity:be.opacity}:void 0,tn=r.labels.length;b.forEach((He,rt)=>{const Et=Bee(He.name,Nt,y);if(!Et)return;const Ht={symbol:Et.symbolShape??(be==null?void 0:be.symbol)??pr.Circle,showOn:Et.symbolShowOn??(be==null?void 0:be.showOn)??gr.FirstLast,style:Et.symbolStyle??(be==null?void 0:be.style)??Vo.Filled,size:Et.symbolSize??(be==null?void 0:be.size)??3.5,opacity:Et.symbolOpacity??(be==null?void 0:be.opacity)??1},Gn=r.labels.map((Jl,ea)=>({cx:I(ea),cy:X(He.values[ea]),color:cn(He.name,rt,m,y),index:ea})),Jn=l.find(Jl=>Jl.getAttribute("data-series-name")===He.name);let Xr,Ql=!1;Jn?(he.appendChild(Jn),Xr=we(Jn),Ql=!0):Xr=we(he).append("g").attr("class","bc-symbols").attr("data-series",rt).attr("data-series-name",He.name),a2(Xr,Gn,tn,Ht,o&&Ql)});const Cn=r.labels.length-1,lo=I(Cn)+6,ze=[];if(b.forEach((He,rt)=>{var Jn;if(ya(He.name,_,y)!=="direct")return;const Ht=He.values[Cn],Gn=((Jn=y==null?void 0:y.find(Xr=>Xr.name===He.name))==null?void 0:Jn.labelText)||He.name;ze.push({name:He.name,index:rt,naturalY:X(Ht),text:Gn})}),ze.length>0){ze.sort((Ht,Gn)=>Ht.naturalY-Gn.naturalY);const He=ze.map(Ht=>Ht.naturalY),Et=c2(He,0,de,14);ze.forEach((Ht,Gn)=>{we(he).append("text").attr("class","bc-direct-label").attr("data-series",Ht.index).attr("x",lo).attr("y",Et[Gn]).attr("dy","0.35em").attr("font-size","11px").attr("fill",cn(Ht.name,Ht.index,m,y)).text(Ht.text)})}const Tt=v.filter(He=>ya(He,_,y)==="legend");if(E&&Tt.length>0){const He=Tt.map(Ht=>{const Gn=g.findIndex(Jn=>Jn.name===Ht);return cn(Ht,Gn,m,y)});let rt=0,Et=0;if(P==="top"){const Ht=V?15:0;Et=-(ie.height+5+Ht)}else P==="bottom"?Et=de+25:P==="left"?rt=-(ie.width+10):P==="right"&&(rt=ce+10);za(he,Tt,He,Et,P,R,ce,de,rt,[],{left:_e.left,right:_e.right})}Yr(t,{chartType:"line-multi",margin:_e}),c&&(Ar(Y.node()),Tr(t,c))}function qee(t,e,n,o,r,i,s){const a=we(t).append("g").attr("class","bc-area-fills");for(const l of e){const c=n.find(b=>b.name===l.from),u=n.find(b=>b.name===l.to);if(!c||!u)continue;const d=l.interpolation?Pl(l.interpolation):s,f=(l.opacity??30)/100,h=l.color??"#ccc",g=l.negativeColor;if(g)jee(a,c.values,u.values,o,i,d,h,g,f);else{const b=Fs().curve(d).x((m,v)=>o(v)).y0((m,v)=>i(u.values[v])).y1(m=>i(m));a.append("path").attr("class","bc-area-fill").attr("d",b(c.values)??"").attr("fill",h).attr("opacity",f)}}}function Yee(t,e,n,o){const r=t-n,i=e-o;if(r===0&&i===0||r>0&&i>0||r<0&&i<0)return null;const s=i-r;if(s===0)return null;const a=-r/s;return a<0||a>1?null:a}function jee(t,e,n,o,r,i,s,a,l){const c=e.length;if(c===0)return;const u=[];for(let g=0;g<c;g++){const b=o(g),m=r(e[g]),v=r(n[g]);if(u.push({x:b,fromY:m,toY:v}),g<c-1){const y=r(e[g+1]),x=r(n[g+1]),_=Yee(m,y,v,x);if(_!==null&&_>0&&_<1){const S=b+_*(o(g+1)-b),E=m+_*(y-m),M=v+_*(x-v);u.push({x:S,fromY:E,toY:M})}}}const d=[];let f=[],h=null;for(const g of u){const b=g.fromY-g.toY,m=b<0;h===null?(h=b===0?null:m,f.push(g)):b===0?(f.push(g),f.length>=2&&d.push({points:f,positive:h}),f=[g],h=null):h===m?f.push(g):(f.push(g),f.length>=2&&d.push({points:f,positive:h}),f=[g],h=m)}f.length>=2&&h!==null&&d.push({points:f,positive:h});for(const g of d){const b=g.points;let m=`M${b[0].x},${b[0].fromY}`;for(let v=1;v<b.length;v++)m+=`L${b[v].x},${b[v].fromY}`;for(let v=b.length-1;v>=0;v--)m+=`L${b[v].x},${b[v].toY}`;m+="Z",t.append("path").attr("class",`bc-area-fill ${g.positive?"bc-area-fill-pos":"bc-area-fill-neg"}`).attr("d",m).attr("fill",g.positive?s:a).attr("opacity",l)}}const Xee=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"];class Kee extends ao{initialize(){this.configDefine("arc",{defaultValue:rA()}),this.configDefine("colorScale",{defaultValue:fm()}),this.configDefine("labels",{defaultValue:[]});const e=this.base.append("g");this.layer("arcs",e,{dataBind:(n,o)=>{const r=this.config("labels");return n.selectAll(".bc-arc").data(o,(i,s)=>r[s])},insert:n=>n.append("path").attr("class","bc-arc"),events:{enter:n=>{const o=this.config("arc"),r=this.config("colorScale"),i=this.config("labels");n.attr("d",o).attr("fill",(s,a)=>r(i[a]))},"merge:transition":n=>{const o=this.config("arc"),r=this.config("colorScale"),i=this.config("labels");n.duration(ut()).attr("d",o).attr("fill",(s,a)=>r(i[a]))},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function Zee(t,e,n={},o=!1){W5(t,e,n,.6,o)}function W5(t,e,n,o,r=!1){var _e;Gr(r);let i=[],s=null,a;if(r){const j=qr(t),te=o>0?"donut":"pie";(j==null?void 0:j.chartType)===te?i=Array.from(t.querySelectorAll(".bc-frame .bc-arc")):j&&(s=$r(t)),a=new Map;for(const ne of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[me,ve]of cr(ne))a.set(me,ve);t.replaceChildren()}const{body:l}=Wr(t,n.frame);let c=[...e.labels],u=[...e.values];if(n.sort===Jt.Ascending||n.sort===Jt.Descending){const j=c.map((te,ne)=>({label:te,value:u[ne]}));j.sort((te,ne)=>n.sort===Jt.Ascending?te.value-ne.value:ne.value-te.value),c=j.map(te=>te.label),u=j.map(te=>te.value)}if(n.sliceMax&&n.sliceMax>0&&c.length>n.sliceMax){const j=n.sliceMax-1,te=c.slice(0,j),ne=u.slice(0,j),me=u.slice(j).reduce((ve,I)=>ve+I,0);te.push(n.sliceGroupLabel??"Others"),ne.push(me),c=te,u=ne}const d=u.reduce((j,te)=>j+te,0),f=u.map(j=>d>0?j/d*100:0),h=n.colors??Xee,g=h.length<c.length&&h.length>=2?lt.scale(h).mode("lch").colors(c.length):h,b=typeof n.directLabelling=="string"?n.directLabelling:n.directLabelling?$o.Auto:$o.Off,m=!!b&&!(b===$o.Auto&&n.legend===!0),y=(n.showValues??!0)&&!m?u.map((j,te)=>`(${n.displayAsPercentage?`${Math.round(f[te])}%`:String(j)})`):[],x=n.legend!==!1&&!m,_=lr(l).width,S=350,E=n.legendPosition??"top",M=_>0&&_<S&&(E==="left"||E==="right")?"top":E,C=n.legendAnchor??"start",O=y.length>0?c.map((j,te)=>`${j} ${y[te]}`):c,P=Math.max(0,_-50-20),R=x?Ga(O,M,P):{width:0,height:0},$=x?R.height+10:0,A={};if(x&&M==="top"&&(A.top=$),x&&M==="bottom"&&(A.bottom=24+$),x&&M==="left"&&(A.left=50+R.width+10),x&&M==="right"&&(A.right=20+R.width+10),m){const j=lr(l),te=20,ne=j.width-2*te,me=(j.height>0?j.height:400)-2*te,ve=Math.min(ne,me)/2,I=Wee(c,ve);A.left=(A.left??te)+I.left,A.right=(A.right??te)+I.right,A.top=(A.top??te)+I.top,A.bottom=(A.bottom??te)+I.bottom}const{chartArea:L,width:B,height:F,margin:z}=Ur(l,A),V=Math.min(B,F)/2,U=V*o,ie=fm().domain(c).range(g),ue=YX().sort(null),fe=rA().innerRadius(U).outerRadius(V),he=we(L).append("g").attr("transform",`translate(${B/2},${F/2})`),ce=ue(u),de=new Kee(he);if(de.config({arc:fe,colorScale:ie,labels:c}),i.length>0){const j=he.node().querySelector("g");i.forEach(te=>j.appendChild(te))}if(n.tooltips&&de.use(Ha()),de.draw(ce),(_e=n.annotations)!=null&&_e.length){const j=n.annotations.filter(te=>te.kind==="free");j.length&&pu(j,{scaleX:Sn().domain([]).range([0,B]),scaleY:bn().domain([0,1]).range([F,0]),data:[],width:B,height:F,backgroundColor:Cr(t),transition:r,priorAnnotations:a}).postDraw({base:we(L)},void 0)}if(m){const j=ce.map((ve,I)=>({label:c[I],value:ve.data,startAngle:ve.startAngle,endAngle:ve.endAngle,color:ie(c[I]),percentage:f[I],displayAsPercentage:n.displayAsPercentage,showLabel:n.showLabels??!0,showValue:n.showValues??!0})),te=he,ne=Cr(t),me={outerRadius:V,innerRadius:U,bgColor:ne};b===$o.Inside?z5(te,j,me):b===$o.Auto?Hee(te,j,me):F5(te,j,me)}if(n.showTotal&&o>0&&!n.displayAsPercentage){const j=String(d);he.append("text").attr("class","bc-arc-total-label").attr("text-anchor","middle").attr("dy","-0.3em").attr("font-size","11px").attr("fill","var(--bc-text-color, #555)").attr("opacity",.7).text("Total"),he.append("text").attr("class","bc-arc-total-value").attr("text-anchor","middle").attr("dy","1em").attr("font-size","18px").attr("font-weight","bold").attr("fill","var(--bc-text-color, #555)").text(j)}if(x){let j=0,te=0;M==="top"?te=-(R.height+5):M==="bottom"?te=F+25:M==="left"?j=-(R.width+10):M==="right"&&(j=B+10),za(L,c,g,te,M,C,B,F,j,y,{left:z.left,right:z.right})}Yr(t,{chartType:o>0?"donut":"pie"}),s&&(Ar(he.node()),Tr(t,s))}function Qee(t,e,n={},o=!1){W5(t,e,n,0,o)}const U5="#4e79a7";class Jee extends ao{initialize(){this.configDefine("xPos",{defaultValue:(r,i)=>0}),this.configDefine("y",{defaultValue:bn()}),this.configDefine("color",{defaultValue:U5}),this.configDefine("curve",{defaultValue:Vy}),this.configDefine("areaFillOpacity",{defaultValue:.25}),this.configDefine("height",{defaultValue:0});const e=this.base.append("g"),n=this.base.append("g"),o=this.base.append("g");this.layer("area",e,{dataBind:(r,i)=>r.selectAll(".bc-area").data([i]),insert:r=>r.append("path").attr("class","bc-area"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=this.config("height"),u=this.config("areaFillOpacity"),d=Fs().curve(l).x((f,h)=>i(f,h)).y0(c).y1(f=>s(f.value));r.attr("fill",a).attr("opacity",u).attr("d",d)},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=this.config("height"),u=this.config("areaFillOpacity"),d=Fs().curve(l).x((f,h)=>i(f,h)).y0(c).y1(f=>s(f.value));r.duration(ut()).attr("fill",a).attr("opacity",u).attr("d",d)},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}}),this.layer("line",n,{dataBind:(r,i)=>r.selectAll(".bc-line").data([i]),insert:r=>r.append("path").attr("class","bc-line"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=bi().curve(l).x((u,d)=>i(u,d)).y(u=>s(u.value));r.attr("fill","none").attr("stroke",a).attr("stroke-width",2).attr("d",c)},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color"),l=this.config("curve"),c=bi().curve(l).x((u,d)=>i(u,d)).y(u=>s(u.value));r.duration(ut()).attr("fill","none").attr("stroke",a).attr("stroke-width",2).attr("d",c)},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}}),this.layer("dots",o,{dataBind:(r,i)=>r.selectAll(".bc-dot").data(i,s=>s.label),insert:r=>r.append("circle").attr("class","bc-dot"),events:{enter:r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color");r.attr("cx",(l,c)=>i(l,c)).attr("cy",l=>s(l.value)).attr("r",3).attr("fill",a)},"merge:transition":r=>{const i=this.config("xPos"),s=this.config("y"),a=this.config("color");r.duration(ut()).attr("cx",(l,c)=>i(l,c)).attr("cy",l=>s(l.value)).attr("r",3).attr("fill",a)},"exit:transition":r=>{r.duration(ut()).attr("opacity",0).remove()}}})}}function ete(t,e,n={},o=!1){var j,te,ne,me,ve,I,W,X,ae,le,K,oe;Gr(o);let r=[],i=[],s=[],a=null,l=null,c,u;const d=Mr.for(t);if(o){const Z=qr(t);u=Z==null?void 0:Z.margin,d.detach(),(Z==null?void 0:Z.chartType)==="area"?(r=Array.from(t.querySelectorAll(".bc-frame .bc-area")),i=Array.from(t.querySelectorAll(".bc-frame .bc-line")),s=Array.from(t.querySelectorAll(".bc-frame .bc-dot")),a=t.querySelector(".bc-frame .bc-symbols")):Z&&(l=$r(t)),c=new Map;for(const Y of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[ee,ge]of cr(Y))c.set(ee,ge);t.replaceChildren()}const{body:f}=Wr(t,n.frame),h=lr(f).width,g=ql(e.values,(j=n.verticalAxis)==null?void 0:j.range,(te=n.verticalAxis)==null?void 0:te.numberFormat,(ne=n.verticalAxis)==null?void 0:ne.scaleType),b=Ci(h,(me=n.verticalAxis)==null?void 0:me.labelPosition,(ve=n.horizontalAxis)==null?void 0:ve.labelPosition,(I=n.verticalAxis)==null?void 0:I.direction,g),{chartArea:m,width:v,height:y,margin:x}=Ur(f,b),_=ki(u,x),S=ym(e.labels,(W=n.horizontalAxis)==null?void 0:W.range),E=S.map(Z=>e.labels[Z]),M=S.map(Z=>e.values[Z]),C=E.map((Z,Y)=>({label:Z,value:M[Y]})),O=hm().domain(E).range([0,v]).padding(n.edgePadding?.6:0),P=O,R=Z=>O(Z.label)??0,$=((X=n.verticalAxis)==null?void 0:X.scaleType)==="log",[A,L]=fu(M,(ae=n.verticalAxis)==null?void 0:ae.range),B=$?Va().domain([A,L]).nice().range([y,0]):bn().domain([A,L]).nice().range([y,0]),F=B.domain(),z=F[0]<0&&F[1]>0?B(0):void 0;d.attach(m,_),d.update({vertical:{scale:B,height:y,options:{...n.verticalAxis,gridWidth:v,topPadding:x.top}},horizontal:{scale:P,height:y,options:{...n.horizontalAxis,width:v,zeroY:z}}});const V=`bc-clip-${Math.random().toString(36).slice(2,8)}`,U=m.ownerSVGElement;(we(U).select("defs").empty()?we(U).append("defs"):we(U).select("defs")).append("clipPath").attr("id",V).append("rect").attr("width",v).attr("height",y);const ue=we(m).append("g").attr("clip-path",`url(#${V})`),fe=ue.node(),he=((le=n.colors)==null?void 0:le[0])??U5,ce=Pl(n.interpolation??"monotoneX"),de=n.lineSymbols,_e=new Jee(we(fe));if(_e.config({xPos:R,y:B,color:he,curve:ce,areaFillOpacity:n.areaFillOpacity??.25,height:y}),i.length>0||r.length>0||s.length>0){const Z=(_==null?void 0:_.dx)??0,Y=(_==null?void 0:_.dy)??0,ee=fe.querySelectorAll(":scope > g");ee[0]&&jn(ee[0],r,Z,Y),ee[1]&&jn(ee[1],i,Z,Y),ee[2]&&jn(ee[2],s,Z,Y)}if(n.valueLabels&&_e.use(D5({position:n.valueLabelPosition,orientation:Yn.Vertical})),_e.draw(C),(K=n.annotations)!=null&&K.length&&Am(m,n.annotations,{scaleX:P,scaleY:B,data:C,width:v,height:y,backgroundColor:Cr(t),transition:o,priorAnnotations:c}),we(fe).selectAll(".bc-dot").attr("fill-opacity",0).attr("stroke-opacity",0).attr("pointer-events","none"),n.tooltips||n.crosshair){const Z=C.map(Y=>({cx:R(Y),cy:B(Y.value),label:Y.label,value:Y.value,color:he}));Mm(m,{width:v,height:y,points:Z,tooltip:n.tooltips,crosshair:n.crosshair,crosshairDirection:n.crosshairDirection,crosshairStyle:n.crosshairStyle,crosshairColor:n.crosshairColor,numberFormat:(oe=n.verticalAxis)==null?void 0:oe.numberFormat})}if(de){const Z=C.map((ee,ge)=>({cx:R(ee),cy:B(ee.value),color:he,index:ge}));let Y;a?(m.appendChild(a),Y=we(a)):Y=we(m).append("g").attr("class","bc-symbols"),a2(Y,Z,C.length,de,o)}Yr(t,{chartType:"area",margin:x}),l&&(Ar(ue.node()),Tr(t,l))}function u2(t){const e=t.series??[];if(e.length===0)return[];const n=e.map(i=>i.name),o=t.labels.map((i,s)=>{const a={_index:s};return e.forEach(l=>{a[l.name]=l.values[s]??0}),a});return hA().keys(n).order(Fp).offset(Rp)(o)}function d2(t){const e=t.series??[];if(e.length===0)return[];const n=e.map(i=>i.name),o=t.labels.map((i,s)=>{const a={_index:s},l=e.reduce((c,u)=>c+Math.abs(u.values[s]??0),0);return e.forEach(c=>{a[c.name]=l>0?(c.values[s]??0)/l*100:0}),a});return hA().keys(n).order(Fp).offset(Rp)(o)}const G5=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"];class tte extends ao{initialize(){this.configDefine("xPos",{defaultValue:o=>0}),this.configDefine("colors",{defaultValue:G5}),this.configDefine("curve",{defaultValue:Vy}),this.configDefine("areaFillOpacity",{defaultValue:.85}),this.configDefine("highlightTargets",{defaultValue:new Set});const e=this.base.append("g"),n=this.base.append("g");this.layer("stacked-areas",e,{dataBind:(o,r)=>o.selectAll(".bc-area").data(r,i=>i.name),insert:o=>o.append("path").attr("class","bc-area"),events:{enter:o=>{const r=this.config("xPos"),i=this.config("colors"),s=this.config("curve"),a=this.config("areaFillOpacity"),l=this.config("highlightTargets"),c=l.size>0;o.attr("data-series",u=>u.colorIndex).attr("fill",u=>i[u.colorIndex%i.length]).attr("opacity",u=>c?l.has(u.name)?a:.3:a).attr("d",u=>Fs().curve(s).x((f,h)=>r(h)).y0(f=>f[0]).y1(f=>f[1])(u.points))},"merge:transition":o=>{const r=this.config("xPos"),i=this.config("colors"),s=this.config("curve"),a=this.config("areaFillOpacity"),l=this.config("highlightTargets"),c=l.size>0;o.duration(ut()).attr("data-series",u=>u.colorIndex).attr("fill",u=>i[u.colorIndex%i.length]).attr("opacity",u=>c?l.has(u.name)?a:.3:a).attr("d",u=>Fs().curve(s).x((f,h)=>r(h)).y0(f=>f[0]).y1(f=>f[1])(u.points))},"exit:transition":o=>{o.duration(ut()).attr("opacity",0).remove()}}}),this.layer("line-edges",n,{dataBind:(o,r)=>o.selectAll(".bc-line").data(r,i=>i.name),insert:o=>o.append("path").attr("class","bc-line"),events:{enter:o=>{const r=this.config("xPos"),i=this.config("colors"),s=this.config("curve"),a=this.config("highlightTargets"),l=a.size>0;o.attr("data-series",c=>c.colorIndex).attr("fill","none").attr("stroke",c=>i[c.colorIndex%i.length]).attr("stroke-width",1).attr("opacity",c=>l?a.has(c.name)?1:.3:null).attr("d",c=>bi().curve(s).x((d,f)=>r(f)).y(d=>d[1])(c.points))},"merge:transition":o=>{const r=this.config("xPos"),i=this.config("colors"),s=this.config("curve"),a=this.config("highlightTargets"),l=a.size>0;o.duration(ut()).attr("data-series",c=>c.colorIndex).attr("fill","none").attr("stroke",c=>i[c.colorIndex%i.length]).attr("stroke-width",1).attr("opacity",c=>l?a.has(c.name)?1:.3:null).attr("d",c=>bi().curve(s).x((d,f)=>r(f)).y(d=>d[1])(c.points))},"exit:transition":o=>{o.duration(ut()).attr("opacity",0).remove()}}})}}function nte(t,e,n={},o=!1){var Ft,un,Mt,Nt,tn,Cn,lo,ze,Tt;Gr(o);let r=e,i=[],s=[],a=null,l,c;const u=Mr.for(t);if(o){const Pe=qr(t);c=Pe==null?void 0:Pe.margin,u.detach(),(Pe==null?void 0:Pe.chartType)==="area-stacked"?(i=Array.from(t.querySelectorAll(".bc-frame .bc-area")),s=Array.from(t.querySelectorAll(".bc-frame .bc-line"))):Pe&&(a=$r(t)),l=new Map;for(const Ge of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[at,et]of cr(Ge))l.set(at,et);t.replaceChildren()}const{body:d}=Wr(t,n.frame),f=ym(r.labels,(Ft=n.horizontalAxis)==null?void 0:Ft.range);if(f.length<r.labels.length){const Pe=f.map(at=>r.labels[at]),Ge=(r.series??[]).map(at=>({...at,values:f.map(et=>at.values[et])}));r={labels:Pe,values:f.map(at=>r.values[at]),series:Ge}}const h=r.series??[],g=h.filter(Pe=>!qa(Pe.name,n.seriesOverrides)),b=n.colors??G5,m=g.map(Pe=>Pe.name),v=n.seriesOverrides,y=n.directLabelling===!0||n.directLabelling==="auto"&&n.legend!==!0||!!n.directLabelling&&n.directLabelling!=="auto",x=y?"direct":n.legend!==!1?"legend":"none",_=m.filter(Pe=>ya(Pe,x,v)==="direct"),S=n.legend!==!1&&!y,E=lr(d).width,M=350,C=n.legendPosition??"top",O=E>0&&E<M&&(C==="left"||C==="right")?"top":C,P=n.legendAnchor??"start",R=n.stacked!==!1,$=n.stackPercent===!0||n.stackMode===xl.Percent,A=n.areaSortMode??Jt.None,L=n.areaLines!==!1,B=[...g];if(A!==Jt.None){const Pe=new Map(B.map(Ge=>[Ge.name,Ge.values.reduce((at,et)=>at+et,0)]));B.sort((Ge,at)=>{const et=(Pe.get(Ge.name)??0)-(Pe.get(at.name)??0);return A===Jt.Ascending?et:-et})}const F={labels:r.labels,values:r.values,series:B},z=$?d2(F):u2(F);let V=0;if(R)for(const Pe of z)for(const Ge of Pe)Ge[1]>V&&(V=Ge[1]);else for(const Pe of B)for(const Ge of Pe.values)Ge>V&&(V=Ge);$&&(V=100);const U=[0,V],ie=((un=n.verticalAxis)==null?void 0:un.numberFormat)??($?"|d|%":void 0),ue=ql(U,(Mt=n.verticalAxis)==null?void 0:Mt.range,ie,(Nt=n.verticalAxis)==null?void 0:Nt.scaleType),fe=Ci(E,(tn=n.verticalAxis)==null?void 0:tn.labelPosition,(Cn=n.horizontalAxis)==null?void 0:Cn.labelPosition,(lo=n.verticalAxis)==null?void 0:lo.direction,ue),he=_.length>0?L5(_):0,ce=fe.top!=null,de=Math.max(0,E-(fe.left??50)-(fe.right??20)-he),_e=S?Ga(m,O,de):{width:0,height:0},j=S?_e.height+10:0,te={...fe};if(S&&O==="top"){const Pe=ce?15:0;te.top=j+Pe}S&&O==="bottom"&&(te.bottom=(te.bottom??24)+j),S&&O==="left"&&(te.left=(te.left??50)+_e.width+10),S&&O==="right"&&(te.right=(te.right??20)+_e.width+10),he>0&&(te.right=(te.right??20)+he);const{chartArea:ne,width:me,height:ve,margin:I}=Ur(d,te),W=ki(c,I),X=hm().domain(r.labels).range([0,me]).padding(n.edgePadding?.6:0),ae=X,le=Pe=>X(r.labels[Pe])??0,K=bn().domain([0,V]).nice().range([ve,0]);u.attach(ne,W),u.update({vertical:{scale:K,height:ve,options:{...n.verticalAxis,numberFormat:ie,gridWidth:me,topPadding:I.top}},horizontal:{scale:ae,height:ve,options:{...n.horizontalAxis,width:me}}});const oe=`bc-clip-${Math.random().toString(36).slice(2,8)}`,Z=ne.ownerSVGElement;(we(Z).select("defs").empty()?we(Z).append("defs"):we(Z).select("defs")).append("clipPath").attr("id",oe).append("rect").attr("width",me).attr("height",ve);const ee=we(ne).append("g").attr("clip-path",`url(#${oe})`),ge=ee.node(),pe=Pl(n.interpolation??"monotoneX"),xe=z.map(Pe=>{const Ge=h.findIndex(et=>et.name===Pe.key);let at;if(R)at=Array.from(Pe).map(et=>[K(et[0]),K(et[1])]);else{const et=B.find(nn=>nn.name===Pe.key);at=((et==null?void 0:et.values)??[]).map(nn=>[K(0),K(nn)])}return{name:Pe.key,points:at,colorIndex:Ge>=0?Ge:0}}),be=new Set((n.highlights??[]).map(Pe=>Pe.target)),Oe=be.size>0,Se=n.areaFillOpacity!=null?n.areaFillOpacity:.85,Ae=new tte(we(ge));if(Ae.config({xPos:le,colors:b,curve:pe,areaFillOpacity:Se,highlightTargets:be}),i.length>0||s.length>0){const Pe=(W==null?void 0:W.dx)??0,Ge=(W==null?void 0:W.dy)??0,at=ge.querySelectorAll(":scope > g");at[0]&&jn(at[0],i,Pe,Ge),at[1]&&jn(at[1],s,Pe,Ge)}if(Ae.draw(xe),we(ge).selectAll(".bc-area").each(function(Pe){const Ge=Pe,at=cn(Ge.name,Ge.colorIndex,b,v),et=o?we(this).transition().duration(ut()):we(this);et.attr("fill",at),Oe&&et.attr("opacity",be.has(Ge.name)?Se:.3)}),L||we(ge).selectAll(".bc-line").attr("display","none"),we(ge).selectAll(".bc-line").each(function(Pe){const Ge=Pe,at=cn(Ge.name,Ge.colorIndex,b,v),et=s2(Ge.name,n.interpolation??"monotoneX",v),nn=o?we(this).transition().duration(ut()):we(this);if(nn.attr("stroke",at),Oe&&nn.attr("opacity",be.has(Ge.name)?1:.3),et!==(n.interpolation??"monotoneX")){const Rn=Pl(et),Qn=bi().curve(Rn).x((Un,co)=>le(co)).y(Un=>Un[1]);nn.attr("d",Qn(Ge.points))}}),(ze=n.annotations)!=null&&ze.length){const Pe=r.labels.map((Ge,at)=>{var et;return{label:Ge,value:((et=g[0])==null?void 0:et.values[at])??0}});Am(ne,n.annotations,{scaleX:ae,scaleY:K,data:Pe,width:me,height:ve,backgroundColor:Cr(t),transition:o,priorAnnotations:l})}if(n.tooltips||n.crosshair){const Pe=[];z.forEach(Ge=>{const at=h.findIndex(et=>et.name===Ge.key);Array.from(Ge).forEach((et,nn)=>{const Rn=et[1]-et[0];Pe.push({cx:le(nn),cy:K(et[1]),label:r.labels[nn],value:Math.round(Rn*100)/100,series:Ge.key,color:cn(Ge.key,at,b,v)})})}),Mm(ne,{width:me,height:ve,points:Pe,tooltip:n.tooltips,crosshair:n.crosshair,crosshairDirection:n.crosshairDirection,crosshairStyle:n.crosshairStyle,crosshairColor:n.crosshairColor,numberFormat:(Tt=n.verticalAxis)==null?void 0:Tt.numberFormat})}const je=r.labels.length-1,ot=le(je)+6,ht=[];if(g.forEach((Pe,Ge)=>{var Un;if(ya(Pe.name,x,v)!=="direct")return;const et=z.find(co=>co.key===Pe.name);if(!et)return;const nn=et[je],Rn=K((nn[0]+nn[1])/2),Qn=((Un=v==null?void 0:v.find(co=>co.name===Pe.name))==null?void 0:Un.labelText)||Pe.name;ht.push({name:Pe.name,index:Ge,naturalY:Rn,text:Qn})}),ht.length>0){ht.sort((et,nn)=>et.naturalY-nn.naturalY);const Pe=ht.map(et=>et.naturalY),at=c2(Pe,0,ve,14);ht.forEach((et,nn)=>{we(ne).append("text").attr("class","bc-direct-label").attr("data-series",et.index).attr("x",ot).attr("y",at[nn]).attr("dy","0.35em").attr("font-size","11px").attr("fill",cn(et.name,et.index,b,v)).text(et.text)})}const $t=m.filter(Pe=>ya(Pe,x,v)==="legend");if(S&&$t.length>0){const Pe=$t.map(et=>{const nn=h.findIndex(Rn=>Rn.name===et);return cn(et,nn,b,v)});let Ge=0,at=0;if(O==="top"){const et=ce?15:0;at=-(_e.height+5+et)}else O==="bottom"?at=ve+25:O==="left"?Ge=-(_e.width+10):O==="right"&&(Ge=me+10);za(ne,$t,Pe,at,O,P,me,ve,Ge,[],{left:I.left,right:I.right})}Yr(t,{chartType:"area-stacked",margin:I}),a&&(Ar(ee.node()),Tr(t,a))}const q5=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"];class ote extends ao{initialize(){this.configDefine("x",{defaultValue:Sn()}),this.configDefine("y",{defaultValue:bn()}),this.configDefine("colors",{defaultValue:q5});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar-stacked").data(o,r=>r.label+"\0"+r.seriesName),insert:n=>n.append("rect").attr("class","bc-bar bc-bar-stacked"),events:{enter:n=>{const o=this.config("x"),r=this.config("y"),i=this.config("colors");n.attr("data-series",s=>s.seriesIndex).attr("x",s=>o(s.label)??0).attr("y",s=>r(s.y1)).attr("width",o.bandwidth()).attr("height",s=>r(s.y0)-r(s.y1)).attr("fill",s=>i[s.seriesIndex%i.length])},"merge:transition":n=>{const o=this.config("x"),r=this.config("y"),i=this.config("colors");n.duration(ut()).attr("data-series",s=>s.seriesIndex).attr("x",s=>o(s.label)??0).attr("y",s=>r(s.y1)).attr("width",o.bandwidth()).attr("height",s=>r(s.y0)-r(s.y1)).attr("fill",s=>i[s.seriesIndex%i.length])},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function rte(t,e,n){const o=[];for(const r of t){const i=r.key,s=n.findIndex(a=>a.name===i);for(let a=0;a<r.length;a++){const l=r[a];o.push({label:e[a],seriesName:i,seriesIndex:s,y0:l[0],y1:l[1],value:l[1]-l[0]})}}return o}function ite(t,e,n={},o=!1){var le,K,oe,Z,Y,ee,ge,pe;Gr(o);let r=[],i=null,s,a;const l=Mr.for(t);if(o){const xe=qr(t);a=xe==null?void 0:xe.margin,l.detach(),(xe==null?void 0:xe.chartType)==="column-stacked"?r=Array.from(t.querySelectorAll(".bc-frame .bc-bar-stacked")):xe&&(i=$r(t)),s=new Map;for(const be of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[Oe,Se]of cr(be))s.set(Oe,Se);t.replaceChildren()}const{body:c}=Wr(t,n.frame),u=e.series??[],d=u.filter(xe=>!qa(xe.name,n.seriesOverrides)),f=d.map(xe=>xe.name),h=n.colors??q5,g=n.seriesOverrides,b=n.legend!==!1,m=lr(c).width,v=350,y=n.legendPosition??"top",x=m>0&&m<v&&(y==="left"||y==="right")?"top":y,_=n.legendAnchor??"start",S={labels:e.labels,values:e.values,series:d},E=n.stackMode===xl.Percent,M=E?d2(S):u2(S),C=rte(M,e.labels,u),O=E?100:Rd(C,xe=>xe.y1)??0,R=ql([0,O],(le=n.verticalAxis)==null?void 0:le.range,(K=n.verticalAxis)==null?void 0:K.numberFormat,(oe=n.verticalAxis)==null?void 0:oe.scaleType),$=Ci(m,(Z=n.verticalAxis)==null?void 0:Z.labelPosition,(Y=n.horizontalAxis)==null?void 0:Y.labelPosition,(ee=n.verticalAxis)==null?void 0:ee.direction,R),A=Math.max(0,m-($.left??50)-($.right??20)),L=Hy(e.labels,A,n.horizontalAxis);L!==void 0&&($.bottom=L);const B=$.top!=null,F=Math.max(0,m-($.left??50)-($.right??20)),z=b?Ga(f,x,F):{width:0,height:0},V=b?z.height+10:0,U={...$};if(b&&x==="top"){const xe=B?15:0;U.top=V+xe}b&&x==="bottom"&&(U.bottom=(U.bottom??24)+V),b&&x==="left"&&(U.left=(U.left??50)+z.width+10),b&&x==="right"&&(U.right=(U.right??20)+z.width+10);const{chartArea:ie,width:ue,height:fe,margin:he}=Ur(c,U),ce=ki(a,he);let de=e.labels;if(n.sortMode==="total"){const xe=e.labels.map((be,Oe)=>({label:be,index:Oe,total:d.reduce((Se,Ae)=>Se+(Ae.values[Oe]??0),0)}));xe.sort((be,Oe)=>Oe.total-be.total),de=xe.map(be=>be.label)}const _e=Sn().domain(de).range([0,ue]).padding(jl(n.barGap)),j=bn().domain([0,O]).nice().range([fe,0]);l.attach(ie,ce),l.update({vertical:{scale:j,height:fe,options:{...n.verticalAxis,gridWidth:ue,topPadding:he.top}},horizontal:{scale:_e,height:fe,options:{...n.horizontalAxis,width:ue}}});const te=`bc-clip-${Math.random().toString(36).slice(2,8)}`,ne=ie.ownerSVGElement;(we(ne).select("defs").empty()?we(ne).append("defs"):we(ne).select("defs")).append("clipPath").attr("id",te).append("rect").attr("width",ue).attr("height",fe);const ve=we(ie).append("g").attr("clip-path",`url(#${te})`),I=de===e.labels?C:de.flatMap(xe=>C.filter(be=>be.label===xe)),W=new ote(ve);if(W.config({x:_e,y:j,colors:h}),r.length>0){const xe=ve.node().querySelector("g");jn(xe,r,(ce==null?void 0:ce.dx)??0,(ce==null?void 0:ce.dy)??0)}if(n.tooltips&&W.use(Ha({numberFormat:(ge=n.verticalAxis)==null?void 0:ge.numberFormat})),n.crosshair&&W.use(Xl({width:ue,height:fe,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor})),(pe=n.annotations)!=null&&pe.length){const xe=e.labels.map((be,Oe)=>({label:be,value:d.reduce((Se,Ae)=>Se+(Ae.values[Oe]??0),0)}));W.use(pu(n.annotations,{scaleX:_e,scaleY:j,data:xe,width:ue,height:fe,backgroundColor:Cr(t),transition:o,priorAnnotations:s}))}W.draw(I),Yr(t,{chartType:"column-stacked",margin:he}),i&&(Ar(ve.node()),Tr(t,i)),we(ie).selectAll(".bc-bar-stacked").each(function(xe){const be=xe,Oe=cn(be.seriesName,be.seriesIndex,h,g),Se=_f(be.seriesName,g),Ae=o?we(this).transition().duration(ut()):we(this);Ae.attr("fill",Oe),Se<1&&Ae.attr("fill-opacity",Se)});const X=n.valueLabels??!1,ae=we(ie).append("g").attr("class","bc-value-labels");if(I.forEach(xe=>{if(!yu(xe.seriesName,X,g))return;const be=(_e(xe.label)??0)+_e.bandwidth()/2,Oe=j(xe.y0)-(j(xe.y0)-j(xe.y1))/2;ae.append("text").attr("class","bc-value-label").attr("data-series",xe.seriesIndex).attr("x",be).attr("y",Oe).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size","11px").attr("fill","currentColor").text(E?`${Math.round(xe.value)}%`:String(Math.round(xe.value*100)/100))}),b&&f.length>0){const xe=f.map(Se=>{const Ae=u.findIndex(je=>je.name===Se);return cn(Se,Ae,h,g)});let be=0,Oe=0;if(x==="top"){const Se=B?15:0;Oe=-(z.height+5+Se)}else x==="bottom"?Oe=fe+25:x==="left"?be=-(z.width+10):x==="right"&&(be=ue+10);za(ie,f,xe,Oe,x,_,ue,fe,be,[],{left:he.left,right:he.right})}}const Y5=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],j8=13;class ste extends ao{initialize(){this.configDefine("x",{defaultValue:bn()}),this.configDefine("y",{defaultValue:Sn()}),this.configDefine("colors",{defaultValue:Y5}),this.configDefine("categoryLabelOffset",{defaultValue:0});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar-stacked").data(o,r=>r.label+"\0"+r.seriesName),insert:n=>n.append("rect").attr("class","bc-bar bc-bar-stacked"),events:{enter:n=>{const o=this.config("x"),r=this.config("y"),i=this.config("colors"),s=this.config("categoryLabelOffset");n.attr("data-series",a=>a.seriesIndex).attr("x",a=>o(a.y0)).attr("y",a=>(r(a.label)??0)+s).attr("width",a=>o(a.y1)-o(a.y0)).attr("height",Math.max(0,r.bandwidth()-s)).attr("fill",a=>i[a.seriesIndex%i.length])},"merge:transition":n=>{const o=this.config("x"),r=this.config("y"),i=this.config("colors"),s=this.config("categoryLabelOffset");n.duration(ut()).attr("data-series",a=>a.seriesIndex).attr("x",a=>o(a.y0)).attr("y",a=>(r(a.label)??0)+s).attr("width",a=>o(a.y1)-o(a.y0)).attr("height",Math.max(0,r.bandwidth()-s)).attr("fill",a=>i[a.seriesIndex%i.length])},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function ate(t,e,n){const o=[];for(const r of t){const i=r.key,s=n.findIndex(a=>a.name===i);for(let a=0;a<r.length;a++){const l=r[a];o.push({label:e[a],seriesName:i,seriesIndex:s,y0:l[0],y1:l[1],value:l[1]-l[0]})}}return o}function lte(t,e,n={},o=!1){var Y,ee,ge,pe,xe,be,Oe;Gr(o);let r=[],i=null,s,a;const l=Mr.for(t);if(o){const Se=qr(t);a=Se==null?void 0:Se.margin,l.detach(),(Se==null?void 0:Se.chartType)==="bar-stacked"?r=Array.from(t.querySelectorAll(".bc-frame .bc-bar-stacked")):Se&&(i=$r(t)),s=new Map;for(const Ae of t.querySelectorAll(".bc-frame .bc-annotations, .bc-frame .bc-annotations-range"))for(const[je,ot]of cr(Ae))s.set(je,ot);t.replaceChildren()}const{body:c}=Wr(t,n.frame),u=e.series??[],d=u.filter(Se=>!qa(Se.name,n.seriesOverrides)),f=d.map(Se=>Se.name),h=n.colors??Y5,g=n.seriesOverrides,b=n.legend!==!1,m=lr(c).width,v=350,y=n.legendPosition??"top",x=m>0&&m<v&&(y==="left"||y==="right")?"top":y,_=n.legendAnchor??"start",S={labels:e.labels,values:e.values,series:d},E=n.stackMode===xl.Percent,M=E?d2(S):u2(S),C=ate(M,e.labels,u),O=E?100:Rd(C,Se=>Se.y1)??0,P=n.categoryLabelLine===!0,R=vm(e.labels),$=P?sn.Off:(Y=n.verticalAxis)==null?void 0:Y.labelPosition,A=Ci(m,$,(ee=n.horizontalAxis)==null?void 0:ee.labelPosition,(ge=n.verticalAxis)==null?void 0:ge.direction,R,(pe=n.horizontalAxis)==null?void 0:pe.showAxis),L=A.top!=null,B=Math.max(0,m-(A.left??50)-(A.right??20)),F=b?Ga(f,x,B):{width:0,height:0},z=b?F.height+10:0,V={...A};if(b&&x==="top"){const Se=L?15:0;V.top=z+Se}b&&x==="bottom"&&(V.bottom=(V.bottom??24)+z),b&&x==="left"&&(V.left=(V.left??50)+F.width+10),b&&x==="right"&&(V.right=(V.right??20)+F.width+10);const{chartArea:U,width:ie,height:ue,margin:fe}=Ur(c,V),he=ki(a,fe);let ce=e.labels;if(n.sortMode==="total"){const Se=e.labels.map((Ae,je)=>({label:Ae,index:je,total:d.reduce((ot,ht)=>ot+(ht.values[je]??0),0)}));Se.sort((Ae,je)=>je.total-Ae.total),ce=Se.map(Ae=>Ae.label)}const de=bn().domain([0,O]).nice().range([0,ie]),_e=Sn().domain(ce).range([0,ue]).padding(jl(n.barGap));l.attach(U,he),l.update({horizontal:{scale:de,height:ue,options:{...n.horizontalAxis,width:ie}},vertical:{scale:_e,height:ue,options:{...n.verticalAxis,labelPosition:P?sn.Off:(xe=n.verticalAxis)==null?void 0:xe.labelPosition,topPadding:fe.top}},order:"horizontal-first"});const j=`bc-clip-${Math.random().toString(36).slice(2,8)}`,te=U.ownerSVGElement;(we(te).select("defs").empty()?we(te).append("defs"):we(te).select("defs")).append("clipPath").attr("id",j).append("rect").attr("width",ie).attr("height",ue);const me=we(U).append("g").attr("clip-path",`url(#${j})`),ve=ce===e.labels?C:ce.flatMap(Se=>C.filter(Ae=>Ae.label===Se)),I=P?j8:0,W=new ste(me);if(W.config({x:de,y:_e,colors:h,categoryLabelOffset:I}),r.length>0){const Se=me.node().querySelector("g");jn(Se,r,(he==null?void 0:he.dx)??0,(he==null?void 0:he.dy)??0)}if(n.tooltips&&W.use(Ha({numberFormat:(be=n.verticalAxis)==null?void 0:be.numberFormat})),n.crosshair&&W.use(Xl({width:ie,height:ue,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor,orientation:Yn.Horizontal})),(Oe=n.annotations)!=null&&Oe.length){const Se=e.labels.map((Ae,je)=>({label:Ae,value:d.reduce((ot,ht)=>ot+(ht.values[je]??0),0)}));W.use(pu(n.annotations,{scaleX:_e,scaleY:de,data:Se,width:ie,height:ue,backgroundColor:Cr(t),orientation:Yn.Horizontal,transition:o,priorAnnotations:s}))}if(W.draw(ve),Yr(t,{chartType:"bar-stacked",margin:fe}),i&&(Ar(me.node()),Tr(t,i)),we(U).selectAll(".bc-bar-stacked").each(function(Se){const Ae=Se,je=cn(Ae.seriesName,Ae.seriesIndex,h,g),ot=_f(Ae.seriesName,g),ht=o?we(this).transition().duration(ut()):we(this);ht.attr("fill",je),ot<1&&ht.attr("fill-opacity",ot)}),P){const Se=we(U).append("g").attr("class","bc-category-labels");for(const Ae of ce){const je=_e(Ae)??0;Se.append("text").attr("class","bc-category-label").attr("x",2).attr("y",je+j8/2).attr("text-anchor","start").attr("dominant-baseline","central").attr("font-size","10px").attr("font-weight","600").attr("fill","currentColor").text(Ae)}}const X=n.valueLabels??!1,ae=n.valueLabelPosition??yt.Auto,le=new Set,K=new Map;for(const Se of ce){const Ae=ve.filter(je=>je.label===Se).sort((je,ot)=>je.y1-ot.y1);if(Ae.length>0){const je=Ae[Ae.length-1];le.add(je.label+"\0"+je.seriesName);for(let ot=0;ot<Ae.length-1;ot++){const ht=Ae[ot].label+"\0"+Ae[ot].seriesName;K.set(ht,de(Ae[ot+1].y1)-de(Ae[ot].y1))}}}const oe=new Map,Z=we(U).append("g").attr("class","bc-value-labels");if(ve.forEach(Se=>{if(!yu(Se.seriesName,X,g))return;const Ae=E?`${Math.round(Se.value)}%`:String(Math.round(Se.value*100)/100),je=de(Se.y1)-de(Se.y0),ot=Ae.length*6.5+8,ht=je>=ot,$t=(_e(Se.label)??0)+I+(_e.bandwidth()-I)/2,Ft=cn(Se.seriesName,Se.seriesIndex,h,g),un=le.has(Se.label+"\0"+Se.seriesName),Mt=ae===yt.Outside||ae===yt.Auto&&!ht&&un,Nt=()=>{const tn=de(Se.y0)+je/2;Z.append("text").attr("class","bc-value-label").attr("data-series",Se.seriesIndex).attr("opacity",0).attr("x",tn).attr("y",$t).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size","11px").attr("fill",Bo(Ft)).text(Ae)};if(Mt)if(ae===yt.Inside)Nt();else{const tn=de(Se.y1)+4,Cn=oe.get(Se.label)??0,lo=K.get(Se.label+"\0"+Se.seriesName),ze=tn<Cn,Tt=lo!==void 0&&ot+4>lo;ze||Tt?Nt():(oe.set(Se.label,tn+ot),Z.append("text").attr("class","bc-value-label").attr("data-series",Se.seriesIndex).attr("x",tn).attr("y",$t).attr("text-anchor","start").attr("dominant-baseline","central").attr("font-size","11px").attr("fill","currentColor").text(Ae))}else if(!ht)Nt();else{const tn=de(Se.y0)+je/2;Z.append("text").attr("class","bc-value-label").attr("data-series",Se.seriesIndex).attr("x",tn).attr("y",$t).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size","11px").attr("fill",Bo(Ft)).text(Ae)}}),b&&f.length>0){const Se=f.map(ot=>{const ht=u.findIndex($t=>$t.name===ot);return cn(ot,ht,h,g)});let Ae=0,je=0;if(x==="top"){const ot=L?15:0;je=-(F.height+5+ot)}else x==="bottom"?je=ue+25:x==="left"?Ae=-(F.width+10):x==="right"&&(Ae=ie+10);za(U,f,Se,je,x,_,ie,ue,Ae,[],{left:fe.left,right:fe.right})}}const j5=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],X8=16,lh=20,K8=13;class cte extends ao{initialize(){this.configDefine("y",{defaultValue:Sn()}),this.configDefine("colors",{defaultValue:j5}),this.configDefine("categoryLabelOffset",{defaultValue:0});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar-split").data(o,r=>r.label+"\0"+r.seriesName),insert:n=>n.append("rect").attr("class","bc-bar bc-bar-split"),events:{enter:n=>{const o=this.config("y"),r=this.config("colors"),i=this.config("categoryLabelOffset");n.attr("data-series",s=>s.seriesIndex).attr("x",s=>s.xPos).attr("y",s=>(o(s.label)??0)+i).attr("width",s=>s.barWidth).attr("height",Math.max(0,o.bandwidth()-i)).attr("fill",s=>r[s.seriesIndex%r.length])},"merge:transition":n=>{const o=this.config("y"),r=this.config("colors"),i=this.config("categoryLabelOffset");n.duration(ut()).attr("data-series",s=>s.seriesIndex).attr("x",s=>s.xPos).attr("y",s=>(o(s.label)??0)+i).attr("width",s=>s.barWidth).attr("height",Math.max(0,o.bandwidth()-i)).attr("fill",s=>r[s.seriesIndex%r.length])},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function ute(t,e,n,o){const r=t.length;if(r===0)return[];const i=Math.max(0,(n-(r-1)*X8)/r),s=o?Rd(t.flatMap(a=>a.values))??0:0;return t.map((a,l)=>{const c=o?s:Rd(a.values)??0,u=bn().domain([0,c]).nice().range([0,i]);return{seriesName:a.name,seriesIndex:e.findIndex(d=>d.name===a.name),xOffset:l*(i+X8),panelWidth:i,xScale:u}})}function dte(t,e,n,o){const r=[];for(const i of t){const s=o.find(a=>a.name===i.seriesName);if(s)for(const a of e){const l=n.indexOf(a),c=l>=0?s.values[l]??0:0,u=Math.max(0,i.xScale(c)-i.xScale(0));r.push({label:a,seriesName:i.seriesName,seriesIndex:i.seriesIndex,value:c,xPos:i.xOffset,barWidth:u})}}return r}function fte(t,e,n={},o=!1){var I,W,X,ae,le,K;Gr(o);let r=[],i=null,s;const a=Mr.for(t);if(o){const oe=qr(t);s=oe==null?void 0:oe.margin,a.detach(),(oe==null?void 0:oe.chartType)==="bar-split"?r=Array.from(t.querySelectorAll(".bc-frame .bc-bar-split")):oe&&(i=$r(t)),t.replaceChildren()}const{body:l}=Wr(t,n.frame),c=e.series??[],u=c.filter(oe=>!qa(oe.name,n.seriesOverrides)),d=u.map(oe=>oe.name),f=n.colors??j5,h=n.seriesOverrides,g=n.legend!==!1,b=lr(l).width,m=350,v=n.legendPosition??"top",y=b>0&&b<m&&(v==="left"||v==="right")?"top":v,x=n.legendAnchor??"start",_=n.categoryLabelLine===!0,S=vm(e.labels),E=_?sn.Off:(I=n.verticalAxis)==null?void 0:I.labelPosition,M=Ci(b,E,(W=n.horizontalAxis)==null?void 0:W.labelPosition,(X=n.verticalAxis)==null?void 0:X.direction,S,(ae=n.horizontalAxis)==null?void 0:ae.showAxis);M.top=(M.top??12)+lh;const C=Math.max(0,b-(M.left??50)-(M.right??20)),O=g?Ga(d,y,C):{width:0,height:0},P=g?O.height+10:0,R={...M};g&&y==="top"&&(R.top=P+lh),g&&y==="bottom"&&(R.bottom=(R.bottom??24)+P),g&&y==="left"&&(R.left=(R.left??50)+O.width+10),g&&y==="right"&&(R.right=(R.right??20)+O.width+10);const{chartArea:$,width:A,height:L,margin:B}=Ur(l,R),F=ki(s,B);let z=e.labels;if(n.sortMode==="total"){const oe=e.labels.map((Z,Y)=>({label:Z,total:u.reduce((ee,ge)=>ee+(ge.values[Y]??0),0)}));oe.sort((Z,Y)=>Y.total-Z.total),z=oe.map(Z=>Z.label)}const V=Sn().domain(z).range([0,L]).padding(jl(n.barGap)),U=_?K8:0;a.attach($,F),a.update({vertical:{scale:V,height:L,options:{...n.verticalAxis,labelPosition:_?sn.Off:(le=n.verticalAxis)==null?void 0:le.labelPosition,topPadding:B.top}},order:"horizontal-first"});const ie=n.sharedScale===!0,ue=ute(u,c,A,ie),fe=`bc-clip-${Math.random().toString(36).slice(2,8)}`,he=$.ownerSVGElement;(we(he).select("defs").empty()?we(he).append("defs"):we(he).select("defs")).append("clipPath").attr("id",fe).append("rect").attr("width",A).attr("height",L);const de=we($).append("g").attr("clip-path",`url(#${fe})`),_e=we($).append("g").attr("class","bc-split-headers");for(const oe of ue)_e.append("text").attr("class","bc-split-header").attr("x",oe.xOffset+oe.panelWidth/2).attr("y",-lh/2).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size","11px").attr("font-weight","600").attr("fill","currentColor").text(oe.seriesName);const j=dte(ue,z,e.labels,c),te=new cte(de);if(te.config({y:V,colors:f,categoryLabelOffset:U}),r.length>0){const oe=de.node().querySelector("g");jn(oe,r,(F==null?void 0:F.dx)??0,(F==null?void 0:F.dy)??0)}if(n.tooltips&&te.use(Ha({numberFormat:(K=n.verticalAxis)==null?void 0:K.numberFormat})),n.crosshair&&te.use(Xl({width:A,height:L,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor,orientation:Yn.Horizontal})),te.draw(j),Yr(t,{chartType:"bar-split",margin:B}),i&&(Ar(de.node()),Tr(t,i)),we($).selectAll(".bc-bar-split").each(function(oe){const Z=oe,Y=cn(Z.seriesName,Z.seriesIndex,f,h),ee=_f(Z.seriesName,h),ge=o?we(this).transition().duration(ut()):we(this);ge.attr("fill",Y),ee<1&&ge.attr("fill-opacity",ee)}),_){const oe=we($).append("g").attr("class","bc-category-labels");for(const Z of z){const Y=V(Z)??0;oe.append("text").attr("class","bc-category-label").attr("x",2).attr("y",Y+K8/2).attr("text-anchor","start").attr("dominant-baseline","central").attr("font-size","10px").attr("font-weight","600").attr("fill","currentColor").text(Z)}}const ne=n.valueLabels??!0,me=n.valueLabelPosition??yt.Auto,ve=we($).append("g").attr("class","bc-value-labels");if(j.forEach(oe=>{if(!yu(oe.seriesName,ne,h))return;const Z=ue.find(Ae=>Ae.seriesName===oe.seriesName);if(!Z)return;const Y=cn(oe.seriesName,oe.seriesIndex,f,h),ee=oe.xPos+oe.barWidth,ge=Math.max(0,V.bandwidth()-U),pe=(V(oe.label)??0)+U+ge/2,xe=me===yt.Inside||me===yt.Auto&&oe.barWidth>30;let be,Oe,Se;if(xe)be=ee-4,Oe="end",Se=Bo(Y);else{const Ae=ee+4,je=Z.xOffset+Z.panelWidth;Ae+20>je?(be=oe.xPos-4,Oe="end"):(be=Ae,Oe="start"),Se="currentColor"}ve.append("text").attr("class","bc-value-label").attr("data-series",oe.seriesIndex).attr("x",be).attr("y",pe).attr("text-anchor",Oe).attr("dominant-baseline","central").attr("font-size","11px").attr("fill",Se).text(String(oe.value))}),g&&d.length>0){const oe=d.map(ee=>{const ge=c.findIndex(pe=>pe.name===ee);return cn(ee,ge,f,h)});let Z=0,Y=0;y==="top"?Y=-(O.height+5+lh):y==="bottom"?Y=L+25:y==="left"?Z=-(O.width+10):y==="right"&&(Z=A+10),za($,d,oe,Y,y,x,A,L,Z,[],{left:B.left,right:B.right})}}const N1=["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"],Z8=13;class hte extends ao{initialize(){this.configDefine("x",{defaultValue:bn()}),this.configDefine("y0",{defaultValue:Sn()}),this.configDefine("y1",{defaultValue:Sn()}),this.configDefine("colors",{defaultValue:N1}),this.configDefine("categoryLabelOffset",{defaultValue:0});const e=this.base.append("g");this.layer("bars",e,{dataBind:(n,o)=>n.selectAll(".bc-bar-grouped").data(o,r=>r.label+"\0"+r.seriesName),insert:n=>n.append("rect").attr("class","bc-bar bc-bar-grouped"),events:{enter:n=>{const o=this.config("x"),r=this.config("y0"),i=this.config("y1"),s=this.config("colors"),a=this.config("categoryLabelOffset");n.attr("data-series",l=>l.seriesIndex).attr("x",o(0)).attr("y",l=>(r(l.label)??0)+a+(i(l.seriesName)??0)).attr("width",l=>Math.max(0,o(l.value)-o(0))).attr("height",i.bandwidth()).attr("fill",l=>s[l.seriesIndex%s.length])},"merge:transition":n=>{const o=this.config("x"),r=this.config("y0"),i=this.config("y1"),s=this.config("colors"),a=this.config("categoryLabelOffset");n.duration(ut()).attr("data-series",l=>l.seriesIndex).attr("x",o(0)).attr("y",l=>(r(l.label)??0)+a+(i(l.seriesName)??0)).attr("width",l=>Math.max(0,o(l.value)-o(0))).attr("height",i.bandwidth()).attr("fill",l=>s[l.seriesIndex%s.length])},"exit:transition":n=>{n.duration(ut()).attr("opacity",0).remove()}}})}}function pte(t,e,n={},o=!1){var W,X,ae,le,K,oe;Gr(o);let r=[],i=null,s;const a=Mr.for(t);if(o){const Z=qr(t);s=Z==null?void 0:Z.margin,a.detach(),(Z==null?void 0:Z.chartType)==="bar-grouped"?r=Array.from(t.querySelectorAll(".bc-frame .bc-bar-grouped")):Z&&(i=$r(t)),t.replaceChildren()}const{body:l}=Wr(t,n.frame),c=e.series??[],u=c.filter(Z=>!qa(Z.name,n.seriesOverrides)),d=u.map(Z=>Z.name),f=n.colors??N1,h=n.seriesOverrides,g=n.legend!==!1,b=lr(l).width,m=350,v=n.legendPosition??"top",y=b>0&&b<m&&(v==="left"||v==="right")?"top":v,x=n.legendAnchor??"start",_=n.categoryLabelLine===!0,S=vm(e.labels),E=_?sn.Off:(W=n.verticalAxis)==null?void 0:W.labelPosition,M=Ci(b,E,(X=n.horizontalAxis)==null?void 0:X.labelPosition,(ae=n.verticalAxis)==null?void 0:ae.direction,S,(le=n.horizontalAxis)==null?void 0:le.showAxis),C=Math.max(0,b-(M.left??50)-(M.right??20)),O=g?Ga(d,y,C):{width:0,height:0},P=g?O.height+10:0,R={...M};g&&y==="top"&&(R.top=P),g&&y==="bottom"&&(R.bottom=(R.bottom??24)+P),g&&y==="left"&&(R.left=(R.left??50)+O.width+10),g&&y==="right"&&(R.right=(R.right??20)+O.width+10);const{chartArea:$,width:A,height:L,margin:B}=Ur(l,R),F=ki(s,B);let z=e.labels;if(n.sortMode==="total"){const Z=e.labels.map((Y,ee)=>({label:Y,total:u.reduce((ge,pe)=>ge+(pe.values[ee]??0),0)}));Z.sort((Y,ee)=>ee.total-Y.total),z=Z.map(Y=>Y.label)}const V=Sn().domain(z).range([0,L]).paddingInner(jl(n.barGap)).paddingOuter(.05),U=_?Z8:0,ie=Math.max(0,V.bandwidth()-U),ue=Sn().domain(d).range([0,ie]).padding(.05),fe=Rd(u.flatMap(Z=>Z.values))??0,he=bn().domain([0,fe]).nice().range([0,A]);a.attach($,F),a.update({vertical:{scale:V,height:L,options:{...n.verticalAxis,labelPosition:_?sn.Off:(K=n.verticalAxis)==null?void 0:K.labelPosition,topPadding:B.top}},horizontal:{scale:he,height:L,options:{...n.horizontalAxis,width:A}},order:"horizontal-first"});const ce=`bc-clip-${Math.random().toString(36).slice(2,8)}`,de=$.ownerSVGElement;(we(de).select("defs").empty()?we(de).append("defs"):we(de).select("defs")).append("clipPath").attr("id",ce).append("rect").attr("width",A).attr("height",L);const j=we($).append("g").attr("clip-path",`url(#${ce})`);if(n.barBackground){const Z=(n.colors??N1)[0];j.selectAll(".bc-bar-bg").data(z,Y=>Y).enter().append("rect").attr("class","bc-bar-bg").attr("x",0).attr("y",Y=>(V(Y)??0)+U).attr("width",A).attr("height",V.bandwidth()-U).attr("fill",Z).attr("opacity",.18)}if(n.barSeparators&&z.length>1){const Z=V.step();for(let Y=1;Y<z.length;Y++){const ee=(V(z[Y-1])??0)+V.bandwidth()+(Z-V.bandwidth())/2;j.append("line").attr("class","bc-bar-separator").attr("x1",0).attr("x2",A).attr("y1",ee).attr("y2",ee).attr("stroke","currentColor").attr("opacity",.15)}}const te=[];for(const Z of z){const Y=e.labels.indexOf(Z);for(const ee of u){const ge=c.findIndex(pe=>pe.name===ee.name);te.push({label:Z,seriesName:ee.name,seriesIndex:ge,value:Y>=0?ee.values[Y]??0:0})}}const ne=new hte(j);if(ne.config({x:he,y0:V,y1:ue,colors:f,categoryLabelOffset:U}),r.length>0){const Z=j.node().querySelector("g");jn(Z,r,(F==null?void 0:F.dx)??0,(F==null?void 0:F.dy)??0)}if(n.tooltips&&ne.use(Ha({numberFormat:(oe=n.verticalAxis)==null?void 0:oe.numberFormat})),n.crosshair&&ne.use(Xl({width:A,height:L,direction:n.crosshairDirection,style:n.crosshairStyle,color:n.crosshairColor,orientation:Yn.Horizontal})),ne.draw(te),Yr(t,{chartType:"bar-grouped",margin:B}),i&&(Ar(j.node()),Tr(t,i)),we($).selectAll(".bc-bar-grouped").each(function(Z){const Y=Z,ee=cn(Y.seriesName,Y.seriesIndex,f,h),ge=_f(Y.seriesName,h),pe=o?we(this).transition().duration(ut()):we(this);pe.attr("fill",ee),ge<1&&pe.attr("fill-opacity",ge)}),_){const Z=we($).append("g").attr("class","bc-category-labels");for(const Y of z){const ee=V(Y)??0;Z.append("text").attr("class","bc-category-label").attr("x",2).attr("y",ee+Z8/2).attr("text-anchor","start").attr("dominant-baseline","central").attr("font-size","10px").attr("font-weight","600").attr("fill","currentColor").text(Y)}}const me=n.valueLabels??!0,ve=n.valueLabelPosition??yt.Auto,I=we($).append("g").attr("class","bc-value-labels");if(te.forEach(Z=>{if(!yu(Z.seriesName,me,h))return;const Y=cn(Z.seriesName,Z.seriesIndex,f,h),ee=Math.max(0,he(Z.value)-he(0)),ge=he(0)+ee,pe=(V(Z.label)??0)+U+(ue(Z.seriesName)??0)+ue.bandwidth()/2,xe=ve===yt.Inside||ve===yt.Auto&&ee>30;let be,Oe,Se;xe?(be=ge-4,Oe="end",Se=Bo(Y)):(be=ge+4,Oe="start",Se="currentColor"),I.append("text").attr("class","bc-value-label").attr("data-series",Z.seriesIndex).attr("x",be).attr("y",pe).attr("text-anchor",Oe).attr("dominant-baseline","central").attr("font-size","11px").attr("fill",Se).text(String(Z.value))}),g&&d.length>0){const Z=d.map(ge=>{const pe=c.findIndex(xe=>xe.name===ge);return cn(ge,pe,f,h)});let Y=0,ee=0;y==="top"?ee=-(O.height+5):y==="bottom"?ee=L+25:y==="left"?Y=-(O.width+10):y==="right"&&(Y=A+10),za($,d,Z,ee,y,x,A,L,Y,[],{left:B.left,right:B.right})}}const f2=new Map;function qo(t,e,n){f2.set(t,{renderer:e,options:n})}function mte(t){var e;return(e=f2.get(t))==null?void 0:e.renderer}function Qc(t){var e;return((e=f2.get(t))==null?void 0:e.options)??[]}const Q8=[{value:Hn.Solid,text:"Solid"},{value:Hn.Dashed,text:"Dashed"},{value:Hn.Dotted,text:"Dotted"},{value:Hn.None,text:"None"}],Yo={key:"colors",type:Ze.Colors,label:"Colors"},jo={key:"colorPalette",type:Ze.Select,label:"Color palette",default:"Blueprint",choices:[{value:"",text:"Custom"},...CA().map(t=>({value:t.name,text:t.label}))]},Xo={key:"autoContrast",type:Ze.Boolean,label:"Auto-adjust contrast",default:!1},Ko={key:"allowDarkMode",type:Ze.Boolean,label:"Allow dark mode",default:!0},xu={key:"legend",type:Ze.Boolean,label:"Show legend",default:!0},Xs={key:"legendPosition",type:Ze.Select,label:"Legend position",default:hc.Top,choices:[{value:hc.Top,text:"Top"},{value:hc.Bottom,text:"Bottom"},{value:hc.Left,text:"Left"},{value:hc.Right,text:"Right"}]},Ks={key:"legendAnchor",type:Ze.Select,label:"Legend anchor",default:Cs.Start,choices:[{value:Cs.Start,text:"Start"},{value:Cs.Middle,text:"Middle"},{value:Cs.End,text:"End"}]},Om={key:"directLabelling",type:Ze.Select,label:"Direct labelling",default:$o.Off,choices:[{value:$o.Off,text:"Off"},{value:$o.Auto,text:"Auto"},{value:$o.Outside,text:"Outside"},{value:$o.Inside,text:"Inside"}]},h2={key:"directLabelAnchor",type:Ze.Select,label:"Label anchor",default:Cs.Middle,choices:[{value:Cs.Start,text:"Start"},{value:Cs.Middle,text:"Middle"},{value:Cs.End,text:"End"}]},Bm={key:"valueLabels",type:Ze.Boolean,label:"Value labels",default:!1},Lm={key:"valueLabelPosition",type:Ze.Select,label:"Label position",default:yt.Auto,choices:[{value:yt.Auto,text:"Auto"},{value:yt.Outside,text:"Outside"},{value:yt.Inside,text:"Inside"}]},Zs={key:"tooltips",type:Ze.Boolean,label:"Tooltips",default:!1},X5={key:"crosshair",type:Ze.Boolean,label:"Crosshair",default:!1},K5={key:"crosshairDirection",type:Ze.Select,label:"Crosshair direction",default:Ao.Both,choices:[{value:Ao.Both,text:"Both"},{value:Ao.Vertical,text:"Vertical"},{value:Ao.Horizontal,text:"Horizontal"}]},Z5={key:"crosshairStyle",type:Ze.Select,label:"Crosshair style",default:oi.Dashed,choices:[{value:oi.Solid,text:"Solid"},{value:oi.Dashed,text:"Dashed"},{value:oi.Dotted,text:"Dotted"}]},Q5={key:"crosshairColor",type:Ze.Text,label:"Crosshair color",default:"#999",placeholder:"#999"},J5={key:"lineSymbols",type:Ze.Boolean,label:"Show line symbols",default:!1},e$={key:"lineSymbolShape",type:Ze.Select,label:"Symbol",default:pr.Circle,choices:[{value:pr.Circle,text:"Circle"},{value:pr.Square,text:"Square"},{value:pr.Diamond,text:"Diamond"},{value:pr.Triangle,text:"Triangle Up"},{value:pr.TriangleDown,text:"Triangle Down"},{value:pr.Cross,text:"Cross"},{value:pr.Star,text:"Star"}]},t$={key:"lineSymbolShowOn",type:Ze.Select,label:"Show on",default:gr.FirstLast,choices:[{value:gr.FirstLast,text:"First & Last"},{value:gr.First,text:"First"},{value:gr.Last,text:"Last"},{value:gr.All,text:"All"}]},n$={key:"lineSymbolStyle",type:Ze.Select,label:"Style",default:Vo.Filled,choices:[{value:Vo.Filled,text:"Filled"},{value:Vo.Hollow,text:"Hollow"}]},o$={key:"lineSymbolSize",type:Ze.Text,label:"Size",default:"3.5",placeholder:"3.5"},r$={key:"lineSymbolOpacity",type:Ze.Text,label:"Opacity",default:"1",placeholder:"1"},Sf={key:"sortMode",type:Ze.Select,label:"Sort mode",default:pc.None,choices:[{value:pc.None,text:"None"},{value:pc.Total,text:"By total"},{value:pc.WithinGroups,text:"Within groups"}]},Pm={key:"edgePadding",type:Ze.Boolean,label:"Edge padding",default:!1},Dm={key:"waterfall",type:Ze.Boolean,label:"Waterfall",default:!1},Em={key:"waterfallTotal",type:Ze.Boolean,label:"Waterfall total",default:!1},kf={key:"barBackground",type:Ze.Boolean,label:"Bar background",default:!1},Im={key:"barGap",type:Ze.Text,label:"Bar gap",default:String(Gd),placeholder:String(Gd)},Cf={key:"barSeparators",type:Ze.Boolean,label:"Bar separators",default:!1},Nm={key:"connectedColumns",type:Ze.Boolean,label:"Connected columns",default:!1},Rm={key:"connectionsOpacity",type:Ze.Text,label:"Opacity",default:"0.15",placeholder:"0.15"},Fm={key:"swapLabelValue",type:Ze.Boolean,label:"Swap labels and values",default:!1},i$={key:"stackMode",type:Ze.Select,label:"Stack mode",default:xl.Normal,choices:[{value:xl.Normal,text:"Normal"},{value:xl.Percent,text:"Percentage (100%)"}]},gte={key:"sharedScale",type:Ze.Boolean,label:"Shared scale",default:!1},Kl={key:"categoryLabelLine",type:Ze.Boolean,label:"Labels on separate line",default:!1},s$={key:"displayAsPercentage",type:Ze.Boolean,label:"Display as percentage",default:!1},a$={key:"showTotal",type:Ze.Boolean,label:"Show total",default:!1},l$={key:"showLabels",type:Ze.Boolean,label:"Show labels",default:!0},c$={key:"showValues",type:Ze.Boolean,label:"Show values",default:!0},u$={key:"sliceMax",type:Ze.Text,label:"Max slices",default:"6"},d$={key:"sliceGroupLabel",type:Ze.Text,label:"Group label",default:"Others",placeholder:"Others"},vte={key:"areaFillOpacity",type:Ze.Text,label:"Opacity",default:"0.85",placeholder:"0.85"},bte={key:"stacked",type:Ze.Boolean,label:"Stack areas",default:!0},yte={key:"stackPercent",type:Ze.Boolean,label:"Stack to 100%",default:!1},xte={key:"areaLines",type:Ze.Boolean,label:"Separate areas with lines",default:!0},wte={key:"areaSortMode",type:Ze.Select,label:"Sort areas",default:Jt.None,choices:[{value:Jt.None,text:"Keep order"},{value:Jt.Ascending,text:"Smallest first"},{value:Jt.Descending,text:"Largest first"}]},_te={key:"interpolation",type:Ze.Select,label:"Line interpolation",default:Qr.Linear,choices:[{value:Qr.Linear,text:"Linear"},{value:Qr.MonotoneX,text:"Monotone"},{value:Qr.Step,text:"Step"},{value:Qr.StepBefore,text:"Step (before)"},{value:Qr.StepAfter,text:"Step (after)"},{value:Qr.Basis,text:"Basis"},{value:Qr.Cardinal,text:"Cardinal"},{value:Qr.CatmullRom,text:"Catmull-Rom"}]},J8=[{value:Vd.Linear,text:"Linear"},{value:Vd.Log,text:"Logarithmic"}],e6=[{value:sn.Auto,text:"Auto"},{value:sn.Inside,text:"Inside"},{value:sn.Outside,text:"Outside"},{value:sn.Off,text:"Off"}],Ste=[{value:gd.Auto,text:"Auto"},{value:gd.Horizontal,text:"Horizontal"},{value:gd.Vertical,text:"Vertical"}];function Af(t){return[{key:"showVerticalAxis",type:Ze.Boolean,label:"Show vertical axis",default:t.showVerticalAxis??!0},{key:"verticalAxisDirection",type:Ze.Select,label:"Vertical axis side",default:Jr.Left,choices:[{value:Jr.Left,text:"Left"},{value:Jr.Right,text:"Right"}]},{key:"showVerticalTicks",type:Ze.Boolean,label:"Show vertical ticks",default:t.showVerticalTicks},{key:"verticalLabelPosition",type:Ze.Select,label:"Vertical labels",default:sn.Auto,choices:e6},{key:"verticalGridStyle",type:Ze.Select,label:"Vertical grid style",default:t.verticalGrid,choices:Q8},{key:"verticalNumberFormat",type:Ze.NumberFormat,label:"Vertical number format"},...t.valueAxis==="vertical"?[{key:"verticalScaleType",type:Ze.Select,label:"Vertical scale",default:Vd.Linear,choices:J8},t.valueAxisZeroBaseline?{key:"verticalRangeMin",type:Ze.Text,label:"Vertical min",default:"0",placeholder:"auto"}:{key:"verticalRangeMin",type:Ze.Text,label:"Vertical min",placeholder:"auto"},{key:"verticalRangeMax",type:Ze.Text,label:"Vertical max",placeholder:"auto"}]:[],{key:"showHorizontalAxis",type:Ze.Boolean,label:"Show horizontal axis",default:!0},{key:"showHorizontalTicks",type:Ze.Boolean,label:"Show horizontal ticks",default:t.showHorizontalTicks},{key:"horizontalLabelPosition",type:Ze.Select,label:"Horizontal labels",default:sn.Auto,choices:e6},{key:"horizontalLabelRotation",type:Ze.Select,label:"Horizontal label rotation",default:gd.Horizontal,choices:Ste},{key:"horizontalGridStyle",type:Ze.Select,label:"Horizontal grid style",default:t.horizontalGrid,choices:Q8},{key:"horizontalNumberFormat",type:Ze.NumberFormat,label:"Horizontal number format"},...t.valueAxis==="horizontal"?[{key:"horizontalScaleType",type:Ze.Select,label:"Horizontal scale",default:Vd.Linear,choices:J8},t.valueAxisZeroBaseline?{key:"horizontalRangeMin",type:Ze.Text,label:"Horizontal min",default:"0",placeholder:"auto"}:{key:"horizontalRangeMin",type:Ze.Text,label:"Horizontal min",placeholder:"auto"},{key:"horizontalRangeMax",type:Ze.Text,label:"Horizontal max",placeholder:"auto"}]:[],...t.horizontalRange?[{key:"horizontalRangeMin",type:Ze.Text,label:"Horizontal min",placeholder:"auto"},{key:"horizontalRangeMax",type:Ze.Text,label:"Horizontal max",placeholder:"auto"}]:[]]}const Vm=Af({verticalGrid:Hn.Dashed,horizontalGrid:Hn.None,showVerticalTicks:!1,showHorizontalTicks:!1,showVerticalAxis:!1,valueAxis:"vertical",valueAxisZeroBaseline:!0}),$f=Af({verticalGrid:Hn.None,horizontalGrid:Hn.Dashed,showVerticalTicks:!1,showHorizontalTicks:!1,valueAxis:"horizontal",valueAxisZeroBaseline:!0}),f$=Af({verticalGrid:Hn.Dashed,horizontalGrid:Hn.None,showVerticalTicks:!1,showHorizontalTicks:!1,showVerticalAxis:!1,valueAxis:"vertical",horizontalRange:!0}),kte=Af({verticalGrid:Hn.Dashed,horizontalGrid:Hn.None,showVerticalTicks:!1,showHorizontalTicks:!1,showVerticalAxis:!1,valueAxis:"vertical",horizontalRange:!0,valueAxisZeroBaseline:!0}),zm={..._te,default:Qr.MonotoneX},Cte={...K5,default:Ao.Vertical},Ate={...X5,default:!0},$te={...J5,default:!0},h$={...Sf,default:pc.Total},p2={...Bm,default:!0},Tte={...s$,default:!0},Mte={...u$,default:"5"},Ote={...a$,default:!0},Hm={...Om,default:$o.Auto},Wm={...xu,default:!1},Um=[X5,K5,Z5,Q5],m2=[Ate,Cte,Z5,Q5],Gm=[Bm,Lm,Zs,...Um],g2=[p2,Lm,Zs,...Um],Bte=[J5,e$,t$,n$,o$,r$],Lte=[$te,e$,t$,n$,o$,r$],p$=[Bm,Zs,...m2,...Bte],Pte=[Bm,Zs,...m2,...Lte],Dte=[Tte,a$,l$,c$,Mte,d$],Ete=[s$,Ote,l$,c$,u$,d$];qo(Le.BarVertical,O5,[Yo,jo,Xo,Ko,Fm,kf,Cf,Im,Nm,Rm,Dm,Em,Kl,...Vm,...Gm]);qo(Le.BarHorizontal,B5,[Yo,jo,Xo,Ko,Fm,kf,Cf,Im,Nm,Rm,Dm,Em,Kl,...$f,...g2]);qo(Le.BarMulti,Pee,[Yo,jo,Xo,Ko,h$,Wm,Ks,Xs,Hm,h2,...Vm,...Gm]);qo(Le.Line,zee,[Yo,jo,Xo,Ko,zm,Pm,...f$,...p$]);qo(Le.LineMulti,Gee,[Yo,jo,Xo,Ko,zm,Pm,Sf,Wm,Ks,Xs,Hm,...f$,...Pte]);qo(Le.Donut,Zee,[Yo,jo,Xo,Ko,Wm,Ks,Xs,Hm,Zs,...Ete]);qo(Le.Pie,Qee,[Yo,jo,Xo,Ko,Wm,Ks,Xs,Hm,Zs,...Dte]);qo(Le.Area,ete,[Yo,jo,Xo,Ko,zm,Pm,...kte,...p$]);const Ite=Af({verticalGrid:Hn.Dashed,horizontalGrid:Hn.None,showVerticalTicks:!1,showHorizontalTicks:!1,showVerticalAxis:!1,valueAxis:"vertical",horizontalRange:!0,valueAxisZeroBaseline:!0});qo(Le.AreaStacked,nte,[Yo,jo,Xo,Ko,vte,zm,Pm,wte,bte,yte,xte,xu,Ks,Xs,Om,...Ite,Zs,...m2]);qo(Le.ColumnStacked,ite,[Yo,jo,Xo,Ko,i$,Sf,xu,Ks,Xs,Om,h2,...Vm,...Gm]);qo(Le.BarStacked,lte,[Yo,jo,Xo,Ko,i$,Sf,xu,Ks,Xs,Om,h2,Kl,...$f,...g2]);qo(Le.BarSplit,fte,[Yo,jo,Xo,Ko,gte,Sf,xu,Ks,Xs,Kl,...$f,p2,Lm,Zs,...Um]);qo(Le.BarGrouped,pte,[Yo,jo,Xo,Ko,h$,xu,Ks,Xs,kf,Cf,Kl,...$f,p2,Lm,Zs,...Um]);qo(Le.VerticalBar,O5,[Yo,jo,Xo,Ko,Fm,kf,Cf,Im,Nm,Rm,Dm,Em,Kl,...Vm,...Gm]);qo(Le.HorizontalBar,B5,[Yo,jo,Xo,Ko,Fm,kf,Cf,Im,Nm,Rm,Dm,Em,Kl,...$f,...g2]);function Qs(t){var i,s;const e=t.split(`
|
|
80
|
+
`).map(a=>a.trim()).filter(Boolean),n=[],o=[],r=(i=e[0])==null?void 0:i.match(/^_series\s*=\s*(.+)$/);if(r){const a=r[1].trim(),l=a.includes('","')?a.split(",").map(d=>d.trim().replace(/^"|"$/g,"")):a.replace(/^"|"$/g,"").split(",").map(d=>d.trim()),c=l.map(()=>[]);for(let d=1;d<e.length;d++){const f=e[d].match(/^"([^"]+)"\s*=\s*([^"]+)$/),g=e[d].match(/^"([^"]+)"\s*=\s*"([^"]*)"$/)??f;if(g){n.push(g[1]);const b=g[2].split(",");for(let m=0;m<l.length;m++)c[m].push(Number.parseFloat(((s=b[m])==null?void 0:s.trim())??"")||0)}}const u=l.map((d,f)=>({name:d,values:c[f]}));return{labels:n,values:c[0]??[],series:u}}for(const a of e){const l=a.match(/^"([^"]+)"\s*=\s*(.+)$/);l&&(n.push(l[1]),o.push(Number.parseFloat(l[2])||0))}return{labels:n,values:o}}function Nte(t,e){const n={},o=kA(t.colorPalette);return o?n.colors=o:t.colors&&t.colors.length>0&&(n.colors=t.colors),t.autoContrast&&e&&n.colors&&(n.colors=T5(n.colors,e)),t.allowDarkMode!==void 0&&(n.allowDarkMode=t.allowDarkMode),n}function Rte(t){const e={};return t.legend!==void 0&&(e.legend=t.legend),t.legendPosition!==void 0&&(e.legendPosition=t.legendPosition),t.legendAnchor!==void 0&&(e.legendAnchor=t.legendAnchor),t.directLabelling!==void 0&&(e.directLabelling=t.directLabelling),t.directLabelAnchor!==void 0&&(e.directLabelAnchor=t.directLabelAnchor),e}function Fte(t){if(!(t.showVerticalTicks!==void 0||t.verticalGridStyle!==void 0||t.verticalNumberFormat!==void 0||t.showVerticalAxis!==void 0||t.verticalAxisDirection!==void 0||t.verticalScaleType!==void 0||t.verticalLabelPosition!==void 0||t.verticalRangeMin||t.verticalRangeMax))return{};const n={};t.showVerticalTicks!==void 0&&(n.showTicks=t.showVerticalTicks),t.verticalAxisDirection!==void 0&&(n.direction=t.verticalAxisDirection),t.verticalGridStyle!==void 0&&(n.gridStyle=t.verticalGridStyle),t.verticalNumberFormat!==void 0&&(n.numberFormat=t.verticalNumberFormat),t.showVerticalAxis!==void 0&&(n.showAxis=t.showVerticalAxis),t.verticalScaleType!==void 0&&(n.scaleType=t.verticalScaleType),t.verticalLabelPosition!==void 0&&(n.labelPosition=t.verticalLabelPosition);const o=Ud(t.verticalRangeMin??""),r=Ud(t.verticalRangeMax??"");return(o!==void 0||r!==void 0)&&(n.range={},o!==void 0&&(n.range.min=o),r!==void 0&&(n.range.max=r)),{verticalAxis:n}}function Vte(t){if(!(t.showHorizontalTicks!==void 0||t.horizontalGridStyle!==void 0||t.horizontalNumberFormat!==void 0||t.showHorizontalAxis!==void 0||t.horizontalScaleType!==void 0||t.horizontalLabelPosition!==void 0||t.horizontalLabelRotation!==void 0||t.horizontalRangeMin||t.horizontalRangeMax))return{};const n={};t.showHorizontalTicks!==void 0&&(n.showTicks=t.showHorizontalTicks),t.horizontalGridStyle!==void 0&&(n.gridStyle=t.horizontalGridStyle),t.horizontalNumberFormat!==void 0&&(n.numberFormat=t.horizontalNumberFormat),t.showHorizontalAxis!==void 0&&(n.showAxis=t.showHorizontalAxis),t.horizontalScaleType!==void 0&&(n.scaleType=t.horizontalScaleType),t.horizontalLabelPosition!==void 0&&(n.labelPosition=t.horizontalLabelPosition),t.horizontalLabelRotation!==void 0&&(n.labelRotation=t.horizontalLabelRotation);const o=Ud(t.horizontalRangeMin??""),r=Ud(t.horizontalRangeMax??"");return(o!==void 0||r!==void 0)&&(n.range={},o!==void 0&&(n.range.min=o),r!==void 0&&(n.range.max=r)),{horizontalAxis:n}}function zte(t){return t.lineSymbols?{lineSymbols:{symbol:t.lineSymbolShape??pr.Circle,showOn:t.lineSymbolShowOn??gr.FirstLast,style:t.lineSymbolStyle??Vo.Filled,size:parseFloat(t.lineSymbolSize??"3.5")||3.5,opacity:parseFloat(t.lineSymbolOpacity??"1")||1}}:{}}function m$(t,e){const n={...Nte(t,e),...Rte(t),...Fte(t),...Vte(t),...zte(t)};t.interpolation!==void 0&&(n.interpolation=t.interpolation),t.valueLabels!==void 0&&(n.valueLabels=t.valueLabels),t.valueLabelPosition!==void 0&&(n.valueLabelPosition=t.valueLabelPosition),t.tooltips!==void 0&&(n.tooltips=t.tooltips),t.crosshair!==void 0&&(n.crosshair=t.crosshair),t.crosshairDirection&&(n.crosshairDirection=t.crosshairDirection),t.crosshairStyle&&(n.crosshairStyle=t.crosshairStyle),t.crosshairColor&&(n.crosshairColor=t.crosshairColor),t.displayAsPercentage!==void 0&&(n.displayAsPercentage=t.displayAsPercentage),t.showTotal!==void 0&&(n.showTotal=t.showTotal),t.showLabels!==void 0&&(n.showLabels=t.showLabels),t.showValues!==void 0&&(n.showValues=t.showValues),t.swapLabelValue!==void 0&&(n.swapLabelValue=t.swapLabelValue);const o=parseInt(t.sliceMax??"",10);!isNaN(o)&&o>0&&(n.sliceMax=o),t.sliceGroupLabel!==void 0&&(n.sliceGroupLabel=t.sliceGroupLabel),t.barBackground!==void 0&&(n.barBackground=t.barBackground),t.barSeparators!==void 0&&(n.barSeparators=t.barSeparators);const r=parseFloat(t.barGap??"");isNaN(r)||(n.barGap=Math.max(0,Math.min(100,r))),t.connectedColumns!==void 0&&(n.connectedColumns=t.connectedColumns);const i=parseFloat(t.connectionsOpacity??"");isNaN(i)||(n.connectionsOpacity=Math.max(0,Math.min(1,i))),t.stackMode!==void 0&&(n.stackMode=t.stackMode),t.stacked!==void 0&&(n.stacked=t.stacked),t.stackPercent!==void 0&&(n.stackPercent=t.stackPercent),t.areaSortMode!==void 0&&(n.areaSortMode=t.areaSortMode),t.areaLines!==void 0&&(n.areaLines=t.areaLines);const s=parseFloat(t.areaFillOpacity??"");return isNaN(s)||(n.areaFillOpacity=s),t.edgePadding!==void 0&&(n.edgePadding=t.edgePadding),t.waterfall!==void 0&&(n.waterfall=t.waterfall),t.waterfallTotal!==void 0&&(n.waterfallTotal=t.waterfallTotal),t.categoryLabelLine!==void 0&&(n.categoryLabelLine=t.categoryLabelLine),n}const uv=Object.create(null);function g$(t){if(!uv[t]){const e={};for(const n of Qc(t))n.default!==void 0&&(e[n.key]=n.default);uv[t]=e}return uv[t]}function Xp(t,e){var r;const n=g$(t);return((r=e.colors)==null?void 0:r.length)?{...n,colorPalette:void 0,...e}:{...n,...e}}const Hte={protanopia:"Protanopia (no red)",deuteranopia:"Deuteranopia (no green)",tritanopia:"Tritanopia (no blue)"},v$={protanopia:[.152286,1.052583,-.204868,0,0,.114503,.786281,.099216,0,0,-.003882,-.048116,1.051998,0,0,0,0,0,1,0],deuteranopia:[.367322,.860646,-.227968,0,0,.280085,.672501,.047413,0,0,-.01182,.04294,.968881,0,0,0,0,0,1,0],tritanopia:[1.255528,-.076749,-.178779,0,0,-.078411,.930809,.147602,0,0,.004733,.691367,.3039,0,0,0,0,0,1,0]};function b$(t){return`bc-cvd-${t}`}function Wte(t){const e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"filter");n.setAttribute("id",b$(t)),n.setAttribute("color-interpolation-filters","linearRGB");const o=document.createElementNS(e,"feColorMatrix");return o.setAttribute("type","matrix"),o.setAttribute("values",v$[t].join(" ")),n.appendChild(o),n}function Ute(t){return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function dv(t){return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function Gte(t,e){const[n,o,r]=lt(t).rgb().map(u=>Ute(u/255)),i=v$[e],s=dv(i[0]*n+i[1]*o+i[2]*r),a=dv(i[5]*n+i[6]*o+i[7]*r),l=dv(i[10]*n+i[11]*o+i[12]*r),c=u=>Math.min(255,Math.max(0,Math.round(u*255)));return lt(c(s),c(a),c(l)).hex()}const qte=10;function Yte(t){if(t.length<2)return[];const e=["protanopia","deuteranopia","tritanopia"],n=[];for(const o of e){const r=t.map(s=>Gte(s,o)),i=[];for(let s=0;s<r.length;s++)for(let a=s+1;a<r.length;a++){const l=lt.deltaE(r[s],r[a]);l<qte&&i.push({a:t[s],b:t[a],deltaE:l})}i.length>0&&n.push({type:o,label:Hte[o],pairs:i})}return n}function jte(t){const e={properties:[],data:null,colorizes:[],highlights:[],areaFills:[],annotations:[],series:[],scenes:[],transforms:[]};for(const n of t)switch(n.type){case"property":e.properties.push(n);break;case"data":e.data=n;break;case"colorize":e.colorizes.push(n);break;case"highlight":e.highlights.push(n);break;case"areafill":e.areaFills.push(n);break;case"annotation":e.annotations.push(n);break;case"series":e.series.push(n);break;case"scene":e.scenes.push(n);break;case"transform":e.transforms.push(n);break}return e}function Xte(t){const e={properties:[],data:null,colorizes:[],highlights:[],areaFills:[],annotations:[],annotationVisibility:[],series:[],transforms:[]};for(const n of t)switch(n.type){case"property":e.properties.push(n);break;case"data":e.data=n;break;case"colorize":e.colorizes.push(n);break;case"highlight":e.highlights.push(n);break;case"areafill":e.areaFills.push(n);break;case"annotation":e.annotations.push(n);break;case"annotation-visibility":e.annotationVisibility.push(n);break;case"series":e.series.push(n);break;case"transform":e.transforms.push(n);break}return e}function Kte(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Jc(t,e,n,o){var r=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(r,Jc.prototype),r.expected=e,r.found=n,r.location=o,r.name="SyntaxError",r}Kte(Jc,Error);function fv(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Jc.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var r=this.location.start,i=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(r):r,s=this.location.source+":"+i.line+":"+i.column;if(n){var a=this.location.end,l=fv("",i.line.toString().length," "),c=n[r.line-1],u=r.line===a.line?a.column:c.length+1,d=u-r.column||1;e+=`
|
|
81
|
+
--> `+s+`
|
|
82
|
+
`+l+` |
|
|
83
|
+
`+i.line+" | "+c+`
|
|
84
|
+
`+l+" | "+fv("",r.column-1," ")+fv("",d,"^")}else e+=`
|
|
85
|
+
at `+s}return e};Jc.buildMessage=function(t,e){var n={literal:function(c){return'"'+r(c.text)+'"'},class:function(c){var u=c.parts.map(function(d){return Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d)});return"["+(c.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function r(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+o(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+o(u)})}function i(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+o(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+o(u)})}function s(c){return n[c.type](c)}function a(c){var u=c.map(s),d,f;if(u.sort(),u.length>0){for(d=1,f=1;d<u.length;d++)u[d-1]!==u[d]&&(u[f]=u[d],f++);u.length=f}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+r(c)+'"':"end of input"}return"Expected "+a(t)+" but "+l(e)+" found."};function Zte(t,e){e=e!==void 0?e:{};var n={},o=e.grammarSource,r={Chart:sx},i=sx,s="chart",a="{",l="}",c="data",u="=",d=",",f=" ",h="colorize",g="highlight",b="areafill",m="annotation",v="range",y="note",x="series",_="scene",S="step",E="transform",M="hide_annotation",C="hide_range",O="hide_note",P="show_annotation",R="show_range",$="show_note",A="%",L="-",B=".",F='"',z="\\",V="n",U="t",ie=/^[^\t\n\r{}=]/,ue=/^[a-zA-Z_#]/,fe=/^[a-zA-Z0-9_#\-]/,he=/^[0-9]/,ce=/^[^"\\]/,de=/^[ \t\n\r]/,_e=jt("chart",!1),j=jt("{",!1),te=jt("}",!1),ne=jt("data",!1),me=jt("=",!1),ve=jt(",",!1),I=jt(" ",!1),W=tc([" ",`
|
|
86
|
+
`,"\r","{","}","="],!0,!1),X=jt("colorize",!1),ae=jt("highlight",!1),le=jt("areafill",!1),K=jt("annotation",!1),oe=jt("range",!1),Z=jt("note",!1),Y=jt("series",!1),ee=jt("scene",!1),ge=jt("step",!1),pe=jt("transform",!1),xe=jt("hide_annotation",!1),be=jt("hide_range",!1),Oe=jt("hide_note",!1),Se=jt("show_annotation",!1),Ae=jt("show_range",!1),je=jt("show_note",!1),ot=jt("%",!1),ht=Ef("identifier"),$t=tc([["a","z"],["A","Z"],"_","#"],!1,!1),Ft=tc([["a","z"],["A","Z"],["0","9"],"_","#","-"],!1,!1),un=jt("-",!1),Mt=tc([["0","9"]],!1,!1),Nt=jt(".",!1),tn=Ef("string"),Cn=jt('"',!1),lo=jt("\\",!1),ze=tc(['"',"\\"],!0,!1),Tt=jt("n",!1),Pe=jt("t",!1),Ge=ZO(),at=Ef("whitespace"),et=tc([" "," ",`
|
|
87
|
+
`,"\r"],!1,!1),nn=Ef("optional whitespace"),Rn=function(D,G){const ke=jte(G);return{type:"chart",chartType:D,properties:ke.properties,data:ke.data,colorizes:ke.colorizes,highlights:ke.highlights,areaFills:ke.areaFills,annotations:ke.annotations,series:ke.series,scenes:ke.scenes,transforms:ke.transforms}},Qn=function(D){return D},Un=function(D){return{type:"data",entries:D}},co=function(D,G,ke){return ke},Js=function(D,G,ke){const Me=[G,...ke];return{type:"property",key:D,value:Me[0].value,isPercentage:!1,values:Me.map(qe=>qe.value)}},Su=function(D){return D},ku=function(D,G){return{type:"property",key:D,value:G.value,isPercentage:G.isPercentage}},He=function(D){return D.trim()},rt=function(D,G){return{type:"colorize",target:D,properties:G}},Et=function(D,G){return{type:"colorize",target:D,properties:G}},Ht=function(D){return{type:"highlight",target:D}},Gn=function(D,G,ke){return{type:"areafill",from:D,to:G,properties:ke}},Jn=function(D,G){return{type:"annotation",kind:"point",target:D,properties:G}},Xr=function(D){return{type:"annotation",kind:"range",properties:D}},Ql=function(D){return{type:"annotation",kind:"free",properties:D}},Jl=function(D,G){return{type:"series",name:D,properties:G}},ea=function(D,G){const ke=Xte(G);return{type:"scene",name:D??null,properties:ke.properties,data:ke.data,colorizes:ke.colorizes,highlights:ke.highlights,areaFills:ke.areaFills,annotations:ke.annotations,annotationVisibility:ke.annotationVisibility,series:ke.series,transforms:ke.transforms}},ug=function(D,G){return{type:"transform",transformType:D,properties:G}},OO=function(D){return{type:"annotation-visibility",action:"hide",kind:"point",id:D}},BO=function(D){return{type:"annotation-visibility",action:"hide",kind:"range",id:D}},LO=function(D){return{type:"annotation-visibility",action:"hide",kind:"free",id:D}},PO=function(D){return{type:"annotation-visibility",action:"show",kind:"point",id:D}},DO=function(D){return{type:"annotation-visibility",action:"show",kind:"range",id:D}},EO=function(D){return{type:"annotation-visibility",action:"show",kind:"free",id:D}},IO=function(D){return D},NO=function(D){return D},RO=function(D,G){return{type:"property",key:D,value:G.value,isPercentage:G.isPercentage}},FO=function(D){return{value:D,isPercentage:!0}},VO=function(D){return{value:D,isPercentage:!1}},zO=function(D){return{value:D,isPercentage:!1}},HO=function(D){return{value:D,isPercentage:!1}},WO=function(D){return parseFloat(D)},UO=function(D){return D.join("")},GO=function(D){return D},qO=function(){return'"'},YO=function(){return"\\"},jO=function(){return`
|
|
88
|
+
`},XO=function(){return" "},KO=function(D){return D},q=e.peg$currPos|0,ec=[{line:1,column:1}],Kr=q,Df=e.peg$maxFailExpected||[],Fe=e.peg$silentFails|0,Cu;if(e.startRule){if(!(e.startRule in r))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');i=r[e.startRule]}function jt(D,G){return{type:"literal",text:D,ignoreCase:G}}function tc(D,G,ke){return{type:"class",parts:D,inverted:G,ignoreCase:ke}}function ZO(){return{type:"any"}}function QO(){return{type:"end"}}function Ef(D){return{type:"other",description:D}}function rx(D){var G=ec[D],ke;if(G)return G;if(D>=ec.length)ke=ec.length-1;else for(ke=D;!ec[--ke];);for(G=ec[ke],G={line:G.line,column:G.column};ke<D;)t.charCodeAt(ke)===10?(G.line++,G.column=1):G.column++,ke++;return ec[D]=G,G}function ix(D,G,ke){var Me=rx(D),qe=rx(G),We={source:o,start:{offset:D,line:Me.line,column:Me.column},end:{offset:G,line:qe.line,column:qe.column}};return We}function Xe(D){q<Kr||(q>Kr&&(Kr=q,Df=[]),Df.push(D))}function JO(D,G,ke){return new Jc(Jc.buildMessage(D,G),D,G,ke)}function sx(){var D,G,ke,Me,qe,We,it,xt;if(D=q,dt(),t.substr(q,5)===s?(G=s,q+=5):(G=n,Fe===0&&Xe(_e)),G!==n)if(ke=ho(),ke!==n)if(Me=Nf(),Me!==n)if(dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=ax();it!==n;)We.push(it),it=ax();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?(dt(),D=Rn(Me,We)):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function ax(){var D,G;return D=q,dt(),G=lx(),G===n&&(G=dx(),G===n&&(G=fx(),G===n&&(G=hx(),G===n&&(G=mx(),G===n&&(G=gx(),G===n&&(G=px(),G===n&&(G=vx(),G===n&&(G=tB(),G===n&&(G=bx(),G===n&&(G=If())))))))))),G!==n?(dt(),D=Qn(G)):(q=D,D=n),D}function lx(){var D,G,ke,Me,qe,We;if(D=q,t.substr(q,4)===c?(G=c,q+=4):(G=n,Fe===0&&Xe(ne)),G!==n)if(dt(),t.charCodeAt(q)===123?(ke=a,q++):(ke=n,Fe===0&&Xe(j)),ke!==n){for(dt(),Me=[],qe=ux(),qe===n&&(qe=cx());qe!==n;)Me.push(qe),qe=ux(),qe===n&&(qe=cx());qe=dt(),t.charCodeAt(q)===125?(We=l,q++):(We=n,Fe===0&&Xe(te)),We!==n?D=Un(Me):(q=D,D=n)}else q=D,D=n;else q=D,D=n;return D}function cx(){var D,G,ke,Me,qe,We,it,xt;if(D=q,dt(),G=xx(),G!==n)if(dt(),t.charCodeAt(q)===61?(ke=u,q++):(ke=n,Fe===0&&Xe(me)),ke!==n)if(dt(),Me=Au(),Me!==n){if(qe=[],We=q,t.charCodeAt(q)===44?(it=d,q++):(it=n,Fe===0&&Xe(ve)),it!==n?(dt(),xt=Au(),xt!==n?We=co(G,Me,xt):(q=We,We=n)):(q=We,We=n),We!==n)for(;We!==n;)qe.push(We),We=q,t.charCodeAt(q)===44?(it=d,q++):(it=n,Fe===0&&Xe(ve)),it!==n?(dt(),xt=Au(),xt!==n?We=co(G,Me,xt):(q=We,We=n)):(q=We,We=n);else qe=n;qe!==n?(We=dt(),D=Js(G,Me,qe)):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;return D===n&&(D=q,dt(),G=If(),G!==n?(dt(),D=Su(G)):(q=D,D=n)),D}function ux(){var D,G,ke,Me;return D=q,dt(),G=eB(),G!==n?(t.charCodeAt(q)===9?(ke=f,q++):(ke=n,Fe===0&&Xe(I)),ke!==n?(dt(),Me=Au(),Me!==n?(dt(),D=ku(G,Me)):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function eB(){var D,G,ke,Me;if(D=q,G=q,ke=[],Me=t.charAt(q),ie.test(Me)?q++:(Me=n,Fe===0&&Xe(W)),Me!==n)for(;Me!==n;)ke.push(Me),Me=t.charAt(q),ie.test(Me)?q++:(Me=n,Fe===0&&Xe(W));else ke=n;return ke!==n?G=t.substring(G,q):G=ke,G!==n&&(G=He(G)),D=G,D}function dx(){var D,G,ke,Me,qe,We,it,xt;if(D=q,t.substr(q,8)===h?(G=h,q+=8):(G=n,Fe===0&&Xe(X)),G!==n)if(ke=ho(),ke!==n)if(Me=fo(),Me!==n)if(dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=uo();it!==n;)We.push(it),it=uo();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?D=rt(Me,We):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function fx(){var D,G,ke,Me,qe,We,it,xt;if(D=q,t.substr(q,9)===g?(G=g,q+=9):(G=n,Fe===0&&Xe(ae)),G!==n)if(ke=ho(),ke!==n)if(Me=fo(),Me!==n)if(dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=uo();it!==n;)We.push(it),it=uo();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?D=Et(Me,We):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D===n&&(D=q,t.substr(q,9)===g?(G=g,q+=9):(G=n,Fe===0&&Xe(ae)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=Ht(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n)),D}function hx(){var D,G,ke,Me,qe,We,it,xt,Eo,dg;if(D=q,t.substr(q,8)===b?(G=b,q+=8):(G=n,Fe===0&&Xe(le)),G!==n)if(ke=ho(),ke!==n)if(Me=fo(),Me!==n)if(qe=ho(),qe!==n)if(We=fo(),We!==n)if(dt(),t.charCodeAt(q)===123?(it=a,q++):(it=n,Fe===0&&Xe(j)),it!==n){for(dt(),xt=[],Eo=uo();Eo!==n;)xt.push(Eo),Eo=uo();Eo=dt(),t.charCodeAt(q)===125?(dg=l,q++):(dg=n,Fe===0&&Xe(te)),dg!==n?D=Gn(Me,We,xt):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function px(){var D,G,ke,Me,qe,We,it,xt;if(D=q,t.substr(q,10)===m?(G=m,q+=10):(G=n,Fe===0&&Xe(K)),G!==n)if(ke=ho(),ke!==n)if(Me=fo(),Me!==n)if(dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=uo();it!==n;)We.push(it),it=uo();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?D=Jn(Me,We):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function mx(){var D,G,ke,Me,qe,We;if(D=q,t.substr(q,5)===v?(G=v,q+=5):(G=n,Fe===0&&Xe(oe)),G!==n)if(dt(),t.charCodeAt(q)===123?(ke=a,q++):(ke=n,Fe===0&&Xe(j)),ke!==n){for(dt(),Me=[],qe=uo();qe!==n;)Me.push(qe),qe=uo();qe=dt(),t.charCodeAt(q)===125?(We=l,q++):(We=n,Fe===0&&Xe(te)),We!==n?D=Xr(Me):(q=D,D=n)}else q=D,D=n;else q=D,D=n;return D}function gx(){var D,G,ke,Me,qe,We;if(D=q,t.substr(q,4)===y?(G=y,q+=4):(G=n,Fe===0&&Xe(Z)),G!==n)if(dt(),t.charCodeAt(q)===123?(ke=a,q++):(ke=n,Fe===0&&Xe(j)),ke!==n){for(dt(),Me=[],qe=uo();qe!==n;)Me.push(qe),qe=uo();qe=dt(),t.charCodeAt(q)===125?(We=l,q++):(We=n,Fe===0&&Xe(te)),We!==n?D=Ql(Me):(q=D,D=n)}else q=D,D=n;else q=D,D=n;return D}function vx(){var D,G,ke,Me,qe,We,it,xt;if(D=q,t.substr(q,6)===x?(G=x,q+=6):(G=n,Fe===0&&Xe(Y)),G!==n)if(ke=ho(),ke!==n)if(Me=fo(),Me!==n)if(dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=uo();it!==n;)We.push(it),it=uo();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?D=Jl(Me,We):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function tB(){var D,G,ke,Me,qe,We,it,xt;if(D=q,t.substr(q,5)===_?(G=_,q+=5):(G=n,Fe===0&&Xe(ee)),G===n&&(t.substr(q,4)===S?(G=S,q+=4):(G=n,Fe===0&&Xe(ge))),G!==n)if(ke=ho(),ke!==n)if(Me=fo(),Me===n&&(Me=null),dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=yx();it!==n;)We.push(it),it=yx();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?D=ea(Me,We):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function bx(){var D,G,ke,Me,qe,We,it,xt;if(D=q,t.substr(q,9)===E?(G=E,q+=9):(G=n,Fe===0&&Xe(pe)),G!==n)if(ke=ho(),ke!==n)if(Me=Nf(),Me!==n)if(dt(),t.charCodeAt(q)===123?(qe=a,q++):(qe=n,Fe===0&&Xe(j)),qe!==n){for(dt(),We=[],it=uo();it!==n;)We.push(it),it=uo();it=dt(),t.charCodeAt(q)===125?(xt=l,q++):(xt=n,Fe===0&&Xe(te)),xt!==n?D=ug(Me,We):(q=D,D=n)}else q=D,D=n;else q=D,D=n;else q=D,D=n;else q=D,D=n;return D}function nB(){var D,G,ke,Me;return D=q,t.substr(q,15)===M?(G=M,q+=15):(G=n,Fe===0&&Xe(xe)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=OO(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function oB(){var D,G,ke,Me;return D=q,t.substr(q,10)===C?(G=C,q+=10):(G=n,Fe===0&&Xe(be)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=BO(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function rB(){var D,G,ke,Me;return D=q,t.substr(q,9)===O?(G=O,q+=9):(G=n,Fe===0&&Xe(Oe)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=LO(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function iB(){var D,G,ke,Me;return D=q,t.substr(q,15)===P?(G=P,q+=15):(G=n,Fe===0&&Xe(Se)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=PO(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function sB(){var D,G,ke,Me;return D=q,t.substr(q,10)===R?(G=R,q+=10):(G=n,Fe===0&&Xe(Ae)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=DO(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function aB(){var D,G,ke,Me;return D=q,t.substr(q,9)===$?(G=$,q+=9):(G=n,Fe===0&&Xe(je)),G!==n?(ke=ho(),ke!==n?(Me=fo(),Me!==n?D=EO(Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function yx(){var D,G;return D=q,dt(),G=lx(),G===n&&(G=dx(),G===n&&(G=fx(),G===n&&(G=hx(),G===n&&(G=mx(),G===n&&(G=gx(),G===n&&(G=px(),G===n&&(G=nB(),G===n&&(G=oB(),G===n&&(G=rB(),G===n&&(G=iB(),G===n&&(G=sB(),G===n&&(G=aB(),G===n&&(G=vx(),G===n&&(G=bx(),G===n&&(G=If()))))))))))))))),G!==n?(dt(),D=IO(G)):(q=D,D=n),D}function uo(){var D,G;return D=q,dt(),G=If(),G!==n?(dt(),D=NO(G)):(q=D,D=n),D}function If(){var D,G,ke,Me;return D=q,G=xx(),G!==n?(dt(),t.charCodeAt(q)===61?(ke=u,q++):(ke=n,Fe===0&&Xe(me)),ke!==n?(dt(),Me=Au(),Me!==n?D=RO(G,Me):(q=D,D=n)):(q=D,D=n)):(q=D,D=n),D}function xx(){var D;return D=fo(),D===n&&(D=Nf()),D}function Au(){var D,G,ke;return D=q,G=wx(),G!==n?(t.charCodeAt(q)===37?(ke=A,q++):(ke=n,Fe===0&&Xe(ot)),ke!==n?D=FO(G):(q=D,D=n)):(q=D,D=n),D===n&&(D=q,G=wx(),G!==n&&(G=VO(G)),D=G,D===n&&(D=q,G=fo(),G!==n&&(G=zO(G)),D=G,D===n&&(D=q,G=Nf(),G!==n&&(G=HO(G)),D=G))),D}function Nf(){var D,G,ke,Me,qe;if(Fe++,D=q,G=q,ke=t.charAt(q),ue.test(ke)?q++:(ke=n,Fe===0&&Xe($t)),ke!==n){for(Me=[],qe=t.charAt(q),fe.test(qe)?q++:(qe=n,Fe===0&&Xe(Ft));qe!==n;)Me.push(qe),qe=t.charAt(q),fe.test(qe)?q++:(qe=n,Fe===0&&Xe(Ft));ke=[ke,Me],G=ke}else q=G,G=n;return G!==n?D=t.substring(D,q):D=G,Fe--,D===n&&(G=n,Fe===0&&Xe(ht)),D}function wx(){var D,G,ke,Me,qe,We,it,xt,Eo;if(D=q,G=q,ke=q,t.charCodeAt(q)===45?(Me=L,q++):(Me=n,Fe===0&&Xe(un)),Me===n&&(Me=null),qe=[],We=t.charAt(q),he.test(We)?q++:(We=n,Fe===0&&Xe(Mt)),We!==n)for(;We!==n;)qe.push(We),We=t.charAt(q),he.test(We)?q++:(We=n,Fe===0&&Xe(Mt));else qe=n;if(qe!==n){if(We=q,t.charCodeAt(q)===46?(it=B,q++):(it=n,Fe===0&&Xe(Nt)),it!==n){if(xt=[],Eo=t.charAt(q),he.test(Eo)?q++:(Eo=n,Fe===0&&Xe(Mt)),Eo!==n)for(;Eo!==n;)xt.push(Eo),Eo=t.charAt(q),he.test(Eo)?q++:(Eo=n,Fe===0&&Xe(Mt));else xt=n;xt!==n?(it=[it,xt],We=it):(q=We,We=n)}else q=We,We=n;We===n&&(We=null),Me=[Me,qe,We],ke=Me}else q=ke,ke=n;return ke!==n?G=t.substring(G,q):G=ke,G!==n&&(G=WO(G)),D=G,D}function fo(){var D,G,ke,Me;if(Fe++,D=q,t.charCodeAt(q)===34?(G=F,q++):(G=n,Fe===0&&Xe(Cn)),G!==n){for(ke=[],Me=_x();Me!==n;)ke.push(Me),Me=_x();t.charCodeAt(q)===34?(Me=F,q++):(Me=n,Fe===0&&Xe(Cn)),Me!==n?D=UO(ke):(q=D,D=n)}else q=D,D=n;return Fe--,D===n&&(G=n,Fe===0&&Xe(tn)),D}function _x(){var D,G,ke;return D=q,t.charCodeAt(q)===92?(G=z,q++):(G=n,Fe===0&&Xe(lo)),G!==n?(ke=lB(),ke!==n?D=GO(ke):(q=D,D=n)):(q=D,D=n),D===n&&(D=t.charAt(q),ce.test(D)?q++:(D=n,Fe===0&&Xe(ze))),D}function lB(){var D,G;return D=q,t.charCodeAt(q)===34?(G=F,q++):(G=n,Fe===0&&Xe(Cn)),G!==n&&(G=qO()),D=G,D===n&&(D=q,t.charCodeAt(q)===92?(G=z,q++):(G=n,Fe===0&&Xe(lo)),G!==n&&(G=YO()),D=G,D===n&&(D=q,t.charCodeAt(q)===110?(G=V,q++):(G=n,Fe===0&&Xe(Tt)),G!==n&&(G=jO()),D=G,D===n&&(D=q,t.charCodeAt(q)===116?(G=U,q++):(G=n,Fe===0&&Xe(Pe)),G!==n&&(G=XO()),D=G,D===n&&(D=q,t.length>q?(G=t.charAt(q),q++):(G=n,Fe===0&&Xe(Ge)),G!==n&&(G=KO(G)),D=G)))),D}function ho(){var D,G;if(Fe++,D=[],G=t.charAt(q),de.test(G)?q++:(G=n,Fe===0&&Xe(et)),G!==n)for(;G!==n;)D.push(G),G=t.charAt(q),de.test(G)?q++:(G=n,Fe===0&&Xe(et));else D=n;return Fe--,D===n&&(G=n,Fe===0&&Xe(at)),D}function dt(){var D,G;for(Fe++,D=[],G=t.charAt(q),de.test(G)?q++:(G=n,Fe===0&&Xe(et));G!==n;)D.push(G),G=t.charAt(q),de.test(G)?q++:(G=n,Fe===0&&Xe(et));return Fe--,G=n,Fe===0&&Xe(nn),D}if(Cu=i(),e.peg$library)return{peg$result:Cu,peg$currPos:q,peg$FAILED:n,peg$maxFailExpected:Df,peg$maxFailPos:Kr};if(Cu!==n&&q===t.length)return Cu;throw Cu!==n&&q<t.length&&Xe(QO()),JO(Df,Kr<t.length?t.charAt(Kr):null,Kr<t.length?ix(Kr,Kr+1):ix(Kr,Kr))}function qm(t){try{return Zte(t)}catch(e){if(e instanceof Error&&"location"in e){const n=e.location;throw new SyntaxError(`${e.message} at ${n.start.line}:${n.start.column}`)}throw e}}function es(t){return new Map(t.map(e=>[e.key,e.value]))}function Ym(t,e){const n=es(e),o=Qc(t),r=new Set(o.map(s=>s.key)),i={};for(const s of o){const a=n.get(s.key);a!==void 0&&r.has(s.key)&&(s.type===Ze.Colors?i[s.key]=String(a).split(",").map(l=>l.trim()).filter(Boolean):s.type===Ze.Boolean?i[s.key]=a==="true"||a===!0:i[s.key]=String(a))}return i}function Qte(t){return!(/^-?\d+(\.\d+)?$/.test(t)||/^-?\d+(\.\d+)?%$/.test(t)||/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(t))}function R1(t){return t.entries.map(e=>{if(e.values&&e.values.length>1){if(e.key==="_series")return`_series = ${e.values.map(r=>`"${r}"`).join(",")}`;const o=e.values.join(",");return`"${e.key}" = ${o}`}const n=e.isPercentage?`${e.value}%`:String(e.value);return e.key==="_series"?`_series = "${n}"`:typeof e.value=="string"&&Qte(n)?`"${e.key}" = "${n}"`:`"${e.key}" = ${n}`}).join(`
|
|
89
|
+
`)}function Jte(t,e){const n=es(t.properties),o=n.get("type"),r=o??e;return{name:t.name,chartType:o,properties:n,data:t.data,chartTypeOptions:Ym(r,t.properties),colorizes:t.colorizes,highlights:t.highlights,areaFills:t.areaFills,annotations:t.annotations,annotationVisibility:t.annotationVisibility??[],series:t.series,transforms:t.transforms}}function t6(t,e){const n=t.find(o=>o.key===e);return n?String(n.value):void 0}function n6(t,e){const n=t.find(o=>o.key===e);if(n)return n.isPercentage,n.value}function o6(t){const e=t.find(n=>n.key==="maxWidth");if(e)return e.isPercentage?`${e.value}%`:e.value}const da=t=>t==="true"||t===!0;function Kp(t){return t.map(e=>({target:e.target,color:t6(e.properties,"color")??"#e15759",label:t6(e.properties,"label")}))}function Zp(t){return t.map(e=>({target:e.target}))}function Qp(t){return t.map(e=>{const n=es(e.properties);return{from:e.from,to:e.to,color:n.has("color")?String(n.get("color")):void 0,negativeColor:n.has("negativeColor")?String(n.get("negativeColor")):void 0,opacity:n.has("opacity")?Number(n.get("opacity")):void 0,interpolation:n.has("interpolation")?String(n.get("interpolation")):void 0}})}function Jp(t){return t.map(e=>{const n=es(e.properties),o=e.kind??Lt.Point;if(o===Lt.Range){const a={kind:Lt.Range,start:n.has("start")?isNaN(Number(n.get("start")))?String(n.get("start")):Number(n.get("start")):0,end:n.has("end")?isNaN(Number(n.get("end")))?String(n.get("end")):Number(n.get("end")):0};return n.has("id")&&(a.id=String(n.get("id"))),n.has("orientation")&&(a.orientation=String(n.get("orientation"))),n.has("startAnchor")&&(a.startAnchor=String(n.get("startAnchor"))),n.has("endAnchor")&&(a.endAnchor=String(n.get("endAnchor"))),n.has("bgColor")&&(a.bgColor=String(n.get("bgColor"))),n.has("bgOpacity")&&(a.bgOpacity=Number(n.get("bgOpacity"))),n.has("direction")&&(a.direction=String(n.get("direction"))),n.has("text")&&(a.text=String(n.get("text"))),n.has("textColor")&&(a.textColor=String(n.get("textColor"))),a}if(o===Lt.Free){const a={kind:Lt.Free,text:String(n.get("text")??""),x:n6(e.properties,"x")??0,y:n6(e.properties,"y")??0};n.has("id")&&(a.id=String(n.get("id"))),n.has("textColor")&&(a.textColor=String(n.get("textColor")));const l=o6(e.properties);return l!==void 0&&(a.maxWidth=l),n.has("textOutline")&&(a.textOutline=da(n.get("textOutline"))),a}const r="target"in e?e.target:"",i={kind:Lt.Point,target:r,text:String(n.get("text")??"")};n.has("id")&&(i.id=String(n.get("id"))),n.has("textColor")&&(i.textColor=String(n.get("textColor")));const s=o6(e.properties);return s!==void 0&&(i.maxWidth=s),n.has("textOutline")&&(i.textOutline=da(n.get("textOutline"))),n.has("showLine")&&(i.showLine=da(n.get("showLine"))),n.has("anchorDirection")&&(i.anchorDirection=String(n.get("anchorDirection"))),n.has("textOffsetX")&&(i.textOffsetX=Number(n.get("textOffsetX"))),n.has("textOffsetY")&&(i.textOffsetY=Number(n.get("textOffsetY"))),n.has("lineStyle")&&(i.lineStyle=String(n.get("lineStyle"))),n.has("lineWeight")&&(i.lineWeight=Number(n.get("lineWeight"))),n.has("showArrow")&&(i.showArrow=da(n.get("showArrow"))),n.has("lineTargetDistance")&&(i.lineTargetDistance=Number(n.get("lineTargetDistance"))),n.has("showCircle")&&(i.showCircle=da(n.get("showCircle"))),n.has("circleSize")&&(i.circleSize=Number(n.get("circleSize"))),n.has("circleStyle")&&(i.circleStyle=String(n.get("circleStyle"))),n.has("circleColor")&&(i.circleColor=String(n.get("circleColor"))),i})}function e0(t){return t.map(e=>{const n=es(e.properties),o={name:e.name};return n.has("color")&&(o.color=String(n.get("color"))),n.has("lineWidth")&&(o.lineWidth=Number(n.get("lineWidth"))),n.has("dash")&&(o.dash=String(n.get("dash"))),n.has("interpolation")&&(o.interpolation=String(n.get("interpolation"))),n.has("labelMode")&&(o.labelMode=String(n.get("labelMode"))),n.has("labelText")&&(o.labelText=String(n.get("labelText"))),n.has("valueLabels")&&(o.valueLabels=da(n.get("valueLabels"))),n.has("lineSymbols")&&(o.lineSymbols=da(n.get("lineSymbols"))),n.has("hidden")&&(o.hidden=da(n.get("hidden"))),n.has("symbolShape")&&(o.symbolShape=String(n.get("symbolShape"))),n.has("symbolShowOn")&&(o.symbolShowOn=String(n.get("symbolShowOn"))),n.has("symbolStyle")&&(o.symbolStyle=String(n.get("symbolStyle"))),n.has("symbolSize")&&(o.symbolSize=Number(n.get("symbolSize"))),n.has("symbolOpacity")&&(o.symbolOpacity=Number(n.get("symbolOpacity"))),o})}const ene=`chart bar-vertical {
|
|
90
|
+
title = "E is the most frequent letter in English"
|
|
91
|
+
description = "How often each letter appears in typical English text"
|
|
92
|
+
byline = "Pierre Romera"
|
|
93
|
+
source = "Lewand, Cryptological Mathematics"
|
|
94
|
+
sourceUrl = "https://en.wikipedia.org/wiki/Letter_frequency"
|
|
95
|
+
note = "Based on analysis of 40,000 words from English prose"
|
|
96
|
+
colorPalette = "London"
|
|
97
|
+
sort = descending
|
|
98
|
+
valueLabels = true
|
|
99
|
+
verticalLabelPosition = off
|
|
100
|
+
verticalGridStyle = none
|
|
101
|
+
|
|
102
|
+
highlight "E"
|
|
103
|
+
|
|
104
|
+
data {
|
|
105
|
+
"E" = 12.70
|
|
106
|
+
"T" = 9.06
|
|
107
|
+
"A" = 8.17
|
|
108
|
+
"O" = 7.51
|
|
109
|
+
"I" = 6.97
|
|
110
|
+
"N" = 6.75
|
|
111
|
+
"S" = 6.33
|
|
112
|
+
"H" = 6.09
|
|
113
|
+
"R" = 5.99
|
|
114
|
+
"D" = 4.25
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
`,tne=`chart bar-vertical {
|
|
118
|
+
title = "China emits more CO₂ than the US and India combined"
|
|
119
|
+
description = "Annual emissions in billion tonnes, 2023"
|
|
120
|
+
source = "Global Carbon Project"
|
|
121
|
+
sourceUrl = "https://globalcarbonproject.org"
|
|
122
|
+
verticalLabelPosition = "off"
|
|
123
|
+
verticalGridStyle = "none"
|
|
124
|
+
valueLabels = true
|
|
125
|
+
|
|
126
|
+
data {
|
|
127
|
+
"China" = 11.9
|
|
128
|
+
"United States" = 4.78
|
|
129
|
+
"India" = 2.88
|
|
130
|
+
"Russia" = 1.78
|
|
131
|
+
"Japan" = 1.02
|
|
132
|
+
"Germany" = 0.64
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
highlight "China"
|
|
136
|
+
|
|
137
|
+
annotation "India" {
|
|
138
|
+
text = "Surpassed EU in 2023"
|
|
139
|
+
showLine = true
|
|
140
|
+
anchorDirection = N
|
|
141
|
+
textOffsetX = 66
|
|
142
|
+
textOffsetY = -41
|
|
143
|
+
lineStyle = curve-left
|
|
144
|
+
showArrow = true
|
|
145
|
+
lineTargetDistance = 26
|
|
146
|
+
showCircle = false
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`,nne=`chart bar-horizontal {
|
|
150
|
+
title = "Mandarin has nearly twice as many native speakers as Spanish"
|
|
151
|
+
description = "Number of native speakers worldwide, in millions"
|
|
152
|
+
source = "Ethnologue"
|
|
153
|
+
sourceUrl = "https://ethnologue.com"
|
|
154
|
+
byline = "Pierre Romera"
|
|
155
|
+
sort = descending
|
|
156
|
+
horizontalLabelPosition = off
|
|
157
|
+
horizontalGridStyle = none
|
|
158
|
+
|
|
159
|
+
highlight "Mandarin"
|
|
160
|
+
|
|
161
|
+
data {
|
|
162
|
+
"Mandarin" = 920
|
|
163
|
+
"Spanish" = 475
|
|
164
|
+
"English" = 373
|
|
165
|
+
"Hindi" = 344
|
|
166
|
+
"Bengali" = 234
|
|
167
|
+
"Portuguese" = 232
|
|
168
|
+
"Russian" = 154
|
|
169
|
+
"Japanese" = 125
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`,one=`chart bar-multi {
|
|
173
|
+
title = "Software overtakes hardware as the top revenue driver"
|
|
174
|
+
description = "USD billions"
|
|
175
|
+
byline = "Pierre Romera"
|
|
176
|
+
source = "Company filings"
|
|
177
|
+
note = "Figures are illustrative and do not represent actual company data"
|
|
178
|
+
tooltips = true
|
|
179
|
+
colorPalette = "Egypt"
|
|
180
|
+
|
|
181
|
+
data {
|
|
182
|
+
_series = "Hardware","Software","Services"
|
|
183
|
+
"Q1 2024" = 14.2,9.8,7.4
|
|
184
|
+
"Q2 2024" = 13.8,11.0,8.1
|
|
185
|
+
"Q3 2024" = 15.5,12.1,8.9
|
|
186
|
+
"Q4 2024" = 18.9,13.4,10.2
|
|
187
|
+
"Q1 2025" = 14.8,14.0,9.5
|
|
188
|
+
"Q2 2025" = 16.2,15.5,10.8
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
`,rne=`chart bar-multi {
|
|
192
|
+
title = "USA tops Paris 2024 with 126 medals across all categories"
|
|
193
|
+
description = "2024 Paris Summer Games — top six nations"
|
|
194
|
+
source = "Olympics.com"
|
|
195
|
+
sourceUrl = "https://olympics.com"
|
|
196
|
+
colors = "#eeca3b, #c0c0c0, #cd7f32"
|
|
197
|
+
valueLabels = true
|
|
198
|
+
verticalGridStyle = none
|
|
199
|
+
verticalLabelPosition = off
|
|
200
|
+
sort = descending
|
|
201
|
+
|
|
202
|
+
data {
|
|
203
|
+
_series = "Gold","Silver","Bronze"
|
|
204
|
+
"USA" = 40,44,42
|
|
205
|
+
"China" = 38,32,18
|
|
206
|
+
"Japan" = 27,14,17
|
|
207
|
+
"Great Britain" = 22,21,22
|
|
208
|
+
"Australia" = 17,7,22
|
|
209
|
+
"France" = 16,20,23
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
`,ine=`chart line {
|
|
213
|
+
title = "2024 was the hottest year on record"
|
|
214
|
+
description = "Deviation from the 1951–1980 average, in °C"
|
|
215
|
+
source = "NASA GISS"
|
|
216
|
+
sourceUrl = "https://data.giss.nasa.gov/gistemp/"
|
|
217
|
+
tooltips = true
|
|
218
|
+
crosshair = false
|
|
219
|
+
lineSymbols = true
|
|
220
|
+
|
|
221
|
+
data {
|
|
222
|
+
"1980" = 0.26
|
|
223
|
+
"1985" = 0.12
|
|
224
|
+
"1990" = 0.45
|
|
225
|
+
"1995" = 0.45
|
|
226
|
+
"2000" = 0.42
|
|
227
|
+
"2005" = 0.68
|
|
228
|
+
"2010" = 0.72
|
|
229
|
+
"2015" = 0.9
|
|
230
|
+
"2020" = 1.02
|
|
231
|
+
"2024" = 1.29
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
annotation "2015" {
|
|
235
|
+
id = "2o3cx"
|
|
236
|
+
text = "2015 Paris Agreement to limit global warming to 1.5°C "
|
|
237
|
+
maxWidth = 224
|
|
238
|
+
showLine = true
|
|
239
|
+
lineStyle = curve-right
|
|
240
|
+
showArrow = true
|
|
241
|
+
showCircle = true
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
`,sne=`chart line-multi {
|
|
245
|
+
title = "Detroit's unemployment hit 16% during the Great Recession"
|
|
246
|
+
description = "Percent of labour force, 2000–2014"
|
|
247
|
+
source = "Bureau of Labor Statistics"
|
|
248
|
+
sourceUrl = "https://bls.gov"
|
|
249
|
+
note = "Not seasonally adjusted. Metro area definitions may vary across years."
|
|
250
|
+
colorPalette = "Maya"
|
|
251
|
+
tooltips = true
|
|
252
|
+
|
|
253
|
+
annotation "2009" {
|
|
254
|
+
text = "Great Recession peak"
|
|
255
|
+
dy = -10
|
|
256
|
+
showArrow = true
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
data {
|
|
260
|
+
_series = "New York","Los Angeles","Chicago","Detroit"
|
|
261
|
+
"2000" = 5.0,5.6,4.5,3.8
|
|
262
|
+
"2002" = 7.3,7.5,6.8,7.0
|
|
263
|
+
"2004" = 6.5,6.4,6.5,7.3
|
|
264
|
+
"2006" = 5.0,4.8,5.0,6.8
|
|
265
|
+
"2008" = 6.2,7.5,7.1,9.4
|
|
266
|
+
"2009" = 9.5,12.4,11.2,16.2
|
|
267
|
+
"2010" = 9.4,12.7,10.8,15.8
|
|
268
|
+
"2012" = 8.2,10.6,9.3,10.4
|
|
269
|
+
"2014" = 6.5,8.0,7.1,8.2
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
`,ane=`chart pie {
|
|
273
|
+
title = "Asia is home to nearly 60% of the world's population"
|
|
274
|
+
description = "Estimated share, 2024"
|
|
275
|
+
source = "United Nations"
|
|
276
|
+
sourceUrl = "https://population.un.org"
|
|
277
|
+
colorPalette = "Klimt"
|
|
278
|
+
legendPosition = "right"
|
|
279
|
+
tooltips = true
|
|
280
|
+
|
|
281
|
+
data {
|
|
282
|
+
"Asia" = 59.4
|
|
283
|
+
"Africa" = 18.3
|
|
284
|
+
"Europe" = 9.3
|
|
285
|
+
"Latin America" = 8.2
|
|
286
|
+
"North America" = 4.8
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
`,lne=`chart bar-vertical {
|
|
290
|
+
title = "Brazil produces more coffee than the next three countries combined"
|
|
291
|
+
description = "Million 60-kg bags, 2023/24 crop year"
|
|
292
|
+
source = "International Coffee Organization"
|
|
293
|
+
sourceUrl = "https://ico.org"
|
|
294
|
+
colorPalette = "Harvey"
|
|
295
|
+
verticalLabelPosition = "off"
|
|
296
|
+
verticalGridStyle = "none"
|
|
297
|
+
valueLabels = true
|
|
298
|
+
|
|
299
|
+
data {
|
|
300
|
+
"Brazil" = 66.4
|
|
301
|
+
"Vietnam" = 29
|
|
302
|
+
"Colombia" = 11.4
|
|
303
|
+
"Indonesia" = 9.9
|
|
304
|
+
"Ethiopia" = 8.7
|
|
305
|
+
"Honduras" = 6.3
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
highlight "Brazil"
|
|
309
|
+
|
|
310
|
+
transform sort {
|
|
311
|
+
column = "value"
|
|
312
|
+
direction = descending
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
`,cne=`chart donut {
|
|
316
|
+
title = "Chrome dominates with two-thirds of the desktop browser market"
|
|
317
|
+
description = "Worldwide, January 2025"
|
|
318
|
+
source = "StatCounter"
|
|
319
|
+
sourceUrl = "https://gs.statcounter.com"
|
|
320
|
+
colorPalette = "Heep"
|
|
321
|
+
legendPosition = "right"
|
|
322
|
+
tooltips = true
|
|
323
|
+
displayAsPercentage = true
|
|
324
|
+
|
|
325
|
+
data {
|
|
326
|
+
"Chrome" = 65.7
|
|
327
|
+
"Edge" = 13.1
|
|
328
|
+
"Safari" = 8.9
|
|
329
|
+
"Firefox" = 6.3
|
|
330
|
+
"Opera" = 3.1
|
|
331
|
+
"Others" = 2.9
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
`,une=`chart area {
|
|
335
|
+
title = "Apple stock climbed 36 % through 2024"
|
|
336
|
+
description = "Monthly closing price in USD"
|
|
337
|
+
source = "Yahoo Finance"
|
|
338
|
+
sourceUrl = "https://finance.yahoo.com"
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
data {
|
|
342
|
+
"Jan" = 183
|
|
343
|
+
"Feb" = 182
|
|
344
|
+
"Mar" = 171
|
|
345
|
+
"Apr" = 170
|
|
346
|
+
"May" = 192
|
|
347
|
+
"Jun" = 210
|
|
348
|
+
"Jul" = 222
|
|
349
|
+
"Aug" = 229
|
|
350
|
+
"Sep" = 233
|
|
351
|
+
"Oct" = 225
|
|
352
|
+
"Nov" = 237
|
|
353
|
+
"Dec" = 249
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
`,dne=`chart area-stacked {
|
|
357
|
+
title = "Renewables rose from 18 % to 23 % of global energy since 2000"
|
|
358
|
+
description = "Share of primary energy by source, 2000–2023"
|
|
359
|
+
source = "Our World in Data"
|
|
360
|
+
sourceUrl = "https://ourworldindata.org/energy-mix"
|
|
361
|
+
stackPercent = true
|
|
362
|
+
areaSortMode = descending
|
|
363
|
+
|
|
364
|
+
data {
|
|
365
|
+
_series = "Coal","Oil","Gas","Renewables"
|
|
366
|
+
"2000" = 25,36,21,18
|
|
367
|
+
"2005" = 27,35,22,16
|
|
368
|
+
"2010" = 29,33,23,15
|
|
369
|
+
"2015" = 28,32,24,16
|
|
370
|
+
"2020" = 26,30,25,19
|
|
371
|
+
"2023" = 24,29,24,23
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
`,fne=`chart column-stacked {
|
|
375
|
+
title = "Software revenue grew steadily while hardware spiked in Q4"
|
|
376
|
+
description = "Quarterly revenue in millions, 2024"
|
|
377
|
+
source = "Annual report"
|
|
378
|
+
|
|
379
|
+
data {
|
|
380
|
+
_series = "Hardware","Software","Services"
|
|
381
|
+
"Q1" = 120,85,45
|
|
382
|
+
"Q2" = 135,92,48
|
|
383
|
+
"Q3" = 128,98,52
|
|
384
|
+
"Q4" = 155,105,58
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
`,hne=`chart bar-stacked {
|
|
388
|
+
title = "India's working-age population now surpasses China's"
|
|
389
|
+
description = "Millions of people, 2023"
|
|
390
|
+
source = "UN Population Division"
|
|
391
|
+
sourceUrl = "https://population.un.org"
|
|
392
|
+
horizontalGridStyle = none
|
|
393
|
+
horizontalLabelPosition = off
|
|
394
|
+
|
|
395
|
+
data {
|
|
396
|
+
_series = "0-14","15-64","65+"
|
|
397
|
+
"China" = 249,987,191
|
|
398
|
+
"India" = 365,948,100
|
|
399
|
+
"USA" = 60,215,58
|
|
400
|
+
"Indonesia" = 66,191,18
|
|
401
|
+
"Brazil" = 42,150,22
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
`,pne=`chart area-stacked {
|
|
405
|
+
title = "EU subsidies to new members surged after enlargement"
|
|
406
|
+
description = "Agricultural subsidies to post-socialist EU members, million euros"
|
|
407
|
+
source = "Eurostat"
|
|
408
|
+
sourceUrl = "https://ec.europa.eu/eurostat"
|
|
409
|
+
interpolation = "linear"
|
|
410
|
+
heightMode = "aspect-ratio"
|
|
411
|
+
aspectRatio = "1:1"
|
|
412
|
+
|
|
413
|
+
data {
|
|
414
|
+
_series = "Indirect subsidies","Direct subsidies"
|
|
415
|
+
"2000" = 370,800
|
|
416
|
+
"2001" = 445,896
|
|
417
|
+
"2002" = 567,816
|
|
418
|
+
"2003" = 641,950
|
|
419
|
+
"2004" = 1908,2434
|
|
420
|
+
"2005" = 2234,3509
|
|
421
|
+
"2006" = 2576,4356
|
|
422
|
+
"2007" = 2467,5429
|
|
423
|
+
"2008" = 2672,6655
|
|
424
|
+
"2009" = 2474,7195
|
|
425
|
+
"2010" = 2117,8207
|
|
426
|
+
"2011" = 1863,9230
|
|
427
|
+
"2012" = 1528,9191
|
|
428
|
+
"2013" = 1251,10252
|
|
429
|
+
"2014" = 1132,10987
|
|
430
|
+
"2015" = 1687,10145
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
scene "Indirect subsidies shrank" {
|
|
434
|
+
title = "Indirect subsidies were cut under WTO pressure"
|
|
435
|
+
description = "Subsidies tied to specific crops fell foul of World Trade Organization rules"
|
|
436
|
+
|
|
437
|
+
highlight "Indirect subsidies"
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
scene "Direct subsidies dominate" {
|
|
441
|
+
title = "Direct per-hectare payments now dominate"
|
|
442
|
+
description = "The larger the fields, the more money farmers receive"
|
|
443
|
+
|
|
444
|
+
highlight "Direct subsidies"
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
scene "Bulgaria: subsidies explode" {
|
|
448
|
+
title = "Subsidies to Bulgarian farmers, million euros"
|
|
449
|
+
description = "85% of Bulgarian subsidies are direct payments — the highest share among new members"
|
|
450
|
+
|
|
451
|
+
data {
|
|
452
|
+
_series = "Indirect subsidies","Direct subsidies"
|
|
453
|
+
"2000" = 0,5
|
|
454
|
+
"2001" = 0,33
|
|
455
|
+
"2002" = 0,48
|
|
456
|
+
"2003" = 0,69
|
|
457
|
+
"2004" = 0,67
|
|
458
|
+
"2005" = 0,87
|
|
459
|
+
"2006" = 0,57
|
|
460
|
+
"2007" = 59,250
|
|
461
|
+
"2008" = 75,484
|
|
462
|
+
"2009" = 97,415
|
|
463
|
+
"2010" = 79,466
|
|
464
|
+
"2011" = 94,458
|
|
465
|
+
"2012" = 120,617
|
|
466
|
+
"2013" = 132,852
|
|
467
|
+
"2014" = 143,821
|
|
468
|
+
"2015" = 213,677
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
highlight "Direct subsidies"
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
scene "Bulgarian farms grew" {
|
|
475
|
+
title = "Average farm size in Bulgaria quadrupled"
|
|
476
|
+
description = "Average farm size in hectares"
|
|
477
|
+
type = line
|
|
478
|
+
|
|
479
|
+
data {
|
|
480
|
+
"2005" = 5
|
|
481
|
+
"2007" = 6
|
|
482
|
+
"2010" = 12
|
|
483
|
+
"2013" = 18
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
scene "Production rose" {
|
|
488
|
+
title = "Bulgarian farm production rose from 3 to 4 billion euros"
|
|
489
|
+
description = "Total production of Bulgarian farms, million euros"
|
|
490
|
+
type = area
|
|
491
|
+
|
|
492
|
+
data {
|
|
493
|
+
"2000" = 2933
|
|
494
|
+
"2001" = 3240
|
|
495
|
+
"2002" = 3051
|
|
496
|
+
"2003" = 2816
|
|
497
|
+
"2004" = 3049
|
|
498
|
+
"2005" = 3011
|
|
499
|
+
"2006" = 3111
|
|
500
|
+
"2007" = 3038
|
|
501
|
+
"2008" = 4148
|
|
502
|
+
"2009" = 3437
|
|
503
|
+
"2010" = 3486
|
|
504
|
+
"2011" = 4038
|
|
505
|
+
"2012" = 4161
|
|
506
|
+
"2013" = 4115
|
|
507
|
+
"2014" = 4138
|
|
508
|
+
"2015" = 3915
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
scene "Cash crops replaced vegetables" {
|
|
513
|
+
title = "Cash crops replaced vegetables in Bulgaria"
|
|
514
|
+
description = "Production of Bulgarian farms, million euros"
|
|
515
|
+
type = area-stacked
|
|
516
|
+
|
|
517
|
+
data {
|
|
518
|
+
_series = "Vegetables","Cash crops","Other production"
|
|
519
|
+
"2000" = 464,615,1854
|
|
520
|
+
"2001" = 458,777,2005
|
|
521
|
+
"2002" = 577,850,1624
|
|
522
|
+
"2003" = 539,818,1459
|
|
523
|
+
"2004" = 483,1103,1463
|
|
524
|
+
"2005" = 492,994,1525
|
|
525
|
+
"2006" = 510,1083,1518
|
|
526
|
+
"2007" = 436,936,1666
|
|
527
|
+
"2008" = 541,2045,1563
|
|
528
|
+
"2009" = 243,1553,1641
|
|
529
|
+
"2010" = 184,2173,1128
|
|
530
|
+
"2011" = 120,2853,1065
|
|
531
|
+
"2012" = 117,2900,1144
|
|
532
|
+
"2013" = 139,2802,1174
|
|
533
|
+
"2014" = 143,3082,914
|
|
534
|
+
"2015" = 144,2986,785
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
highlight "Cash crops"
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
scene "Vegetables collapsed" {
|
|
541
|
+
title = "Vegetable production fell by a factor of four"
|
|
542
|
+
description = "A traditional Bulgarian cultivation shrank as subsidies favoured large fields"
|
|
543
|
+
|
|
544
|
+
highlight "Vegetables"
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
scene "Every vegetable declined" {
|
|
548
|
+
title = "Bulgarian vegetable production collapsed across the board"
|
|
549
|
+
description = "Production volume indexed to 2001 = 100"
|
|
550
|
+
type = line-multi
|
|
551
|
+
lineSymbols = false
|
|
552
|
+
|
|
553
|
+
data {
|
|
554
|
+
_series = "Cabbages","Tomatoes","Watermelons","Carrots","Onions","Garlic","Strawberries"
|
|
555
|
+
"2001" = 100,100,100,100,100,100,100
|
|
556
|
+
"2002" = 79,90,124,64,106,95,100
|
|
557
|
+
"2003" = 100,157,177,142,118,98,72
|
|
558
|
+
"2004" = 84,87,83,245,124,138,74
|
|
559
|
+
"2005" = 50,46,62,30,40,93,42
|
|
560
|
+
"2006" = 52,78,113,95,56,80,56
|
|
561
|
+
"2007" = 36,49,64,74,29,30,38
|
|
562
|
+
"2008" = 47,49,66,97,44,29,55
|
|
563
|
+
"2009" = 28,38,74,105,23,39,55
|
|
564
|
+
"2010" = 57,42,51,76,53,57,37
|
|
565
|
+
"2011" = 32,38,56,86,47,43,45
|
|
566
|
+
"2012" = 34,34,46,69,29,43,31
|
|
567
|
+
"2013" = 33,43,53,39,36,40,24
|
|
568
|
+
"2014" = 31,44,28,69,37,8,27
|
|
569
|
+
"2015" = 31,45,50,57,25,18,32
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
scene "Jobs disappeared" {
|
|
574
|
+
title = "Seasonal farm workers vanished while salaried jobs held steady"
|
|
575
|
+
description = "EU agricultural employment, thousands of full-time equivalents"
|
|
576
|
+
type = line-multi
|
|
577
|
+
lineSymbols = false
|
|
578
|
+
|
|
579
|
+
data {
|
|
580
|
+
_series = "Salaried workers","Non-salaried workers"
|
|
581
|
+
"2000" = 2678,12194
|
|
582
|
+
"2001" = 2598,11586
|
|
583
|
+
"2002" = 2658,10795
|
|
584
|
+
"2003" = 2563,10609
|
|
585
|
+
"2004" = 2560,9999
|
|
586
|
+
"2005" = 2501,10047
|
|
587
|
+
"2006" = 2499,9782
|
|
588
|
+
"2007" = 2437,9231
|
|
589
|
+
"2008" = 2416,8971
|
|
590
|
+
"2009" = 2348,8672
|
|
591
|
+
"2010" = 2335,7808
|
|
592
|
+
"2011" = 2322,7551
|
|
593
|
+
"2012" = 2325,7501
|
|
594
|
+
"2013" = 2297,7425
|
|
595
|
+
"2014" = 2366,7183
|
|
596
|
+
"2015" = 2413,6928
|
|
597
|
+
"2016" = 2457,6741
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
highlight "Non-salaried workers"
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
`,mne=`chart bar-split {
|
|
604
|
+
title = "CDU/CSU led German polls at 29 % ahead of the 2021 election"
|
|
605
|
+
description = "How Germany would vote in the September 2021 federal election, according to polling in the previous June"
|
|
606
|
+
source = "FG Wahlen"
|
|
607
|
+
sourceUrl = "https://www.forschungsgruppe.de"
|
|
608
|
+
note = "Margin of error at 10%: +/- 2 percentage points; at 40%: +/- 3 percentage points"
|
|
609
|
+
|
|
610
|
+
data {
|
|
611
|
+
_series = "Poll","High","Low"
|
|
612
|
+
"CDU/CSU" = 29,32,27
|
|
613
|
+
"Greens" = 22,25,20
|
|
614
|
+
"SPD" = 14,16,12
|
|
615
|
+
"AfD" = 10,12,8
|
|
616
|
+
"FDP" = 10,12,8
|
|
617
|
+
"Left" = 7,9,5
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
`,gne=`chart bar-grouped {
|
|
621
|
+
title = "Asia Pacific holds more renewable capacity than all other regions combined"
|
|
622
|
+
description = "Installed capacity in gigawatts (GW)"
|
|
623
|
+
source = "IRENA"
|
|
624
|
+
sourceUrl = "https://www.irena.org"
|
|
625
|
+
|
|
626
|
+
data {
|
|
627
|
+
_series = "Solar","Wind","Hydro"
|
|
628
|
+
"Asia Pacific" = 680,540,840
|
|
629
|
+
"Europe" = 250,300,200
|
|
630
|
+
"North America" = 200,180,190
|
|
631
|
+
"Latin America" = 30,50,200
|
|
632
|
+
"Africa" = 15,10,40
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
`;function r6(t,e){const n=t.properties.find(o=>o.key===e);return n?String(n.value):""}function vne(t){if(!t.data)return"";const e=t.data.entries,n=e.find(i=>i.key==="_series");if(n){const s=["category",...String(n.value).split(",")].join(" "),a=e.filter(l=>l.key!=="_series").map(l=>{const c=String(l.value).split(",");return[l.key,...c].join(" ")});return[s,...a].join(`
|
|
636
|
+
`)}const o=["label","value"].join(" "),r=e.map(i=>[i.key,String(i.value)].join(" "));return[o,...r].join(`
|
|
637
|
+
`)}function bne(t){if(!t.data)return"";const e=t.data.entries,n=e.find(o=>o.key==="_series");if(n){const o=`_series = "${String(n.value)}"`,r=e.filter(i=>i.key!=="_series").map(i=>`"${i.key}" = "${String(i.value)}"`);return[o,...r].join(`
|
|
638
|
+
`)}return e.map(o=>`"${o.key}" = ${String(o.value)}`).join(`
|
|
639
|
+
`)}function eo(t,e){const n=qm(e);return{id:t,title:r6(n,"title"),description:r6(n,"description"),chartType:n.chartType,tsvData:vne(n),serializedData:bne(n),dsl:e}}const i6=[eo("letter-frequency",ene),eo("co2-emissions",tne),eo("coffee-production",lne),eo("spoken-languages",nne),eo("quarterly-revenue",one),eo("medal-count",rne),eo("temperature-anomaly",ine),eo("unemployment-rates",sne),eo("browser-market",cne),eo("world-population",ane),eo("stock-price-area",une),eo("energy-mix-stacked-area",dne),eo("quarterly-stacked-columns",fne),eo("population-stacked-bar",hne),eo("election-polls",mne),eo("renewable-capacity",gne),eo("farm-compass",pne)];function yne(t){const e=i=>{const s=t.get(i);return s==null?void 0:String(s)||void 0},n=t.get("transparentBackground"),o={title:e("title"),description:e("description"),source:e("source"),sourceUrl:e("sourceUrl"),byline:e("byline"),note:e("note"),padding:e("padding"),transparentBackground:n===!0||n==="true"||void 0};return Object.values(o).some(i=>i!==void 0)?o:void 0}function xne(t){const e=es(t.properties),n=t.data?R1(t.data):"",o=Qs(n),r=e.get("sort"),i=r==null?void 0:String(r),s=i===Jt.Ascending||i===Jt.Descending?i:void 0,a=e.get("theme");return{chartType:t.chartType,data:o,properties:t.properties,frame:yne(e),colorizes:Kp(t.colorizes),highlights:Zp(t.highlights),areaFills:Qp(t.areaFills),annotations:Jp(t.annotations),seriesOverrides:e0(t.series),scenes:t.scenes,sort:s,theme:a==null?void 0:String(a)||void 0}}function wne(){return{properties:new Map,chartTypeOptions:{},colorizes:[],highlights:[],areaFills:[],annotations:[],seriesOverrides:[],hiddenAnnotationIds:new Set}}function _ne(t,e,n){const o=wne();for(let r=0;r<=e;r++){const i=t[r],s=es(i.properties),a=s.get("type");a&&(o.chartType=a);const l=o.chartType??n;i.data&&(o.data=i.data);const c=Ym(l,i.properties);o.chartTypeOptions={...o.chartTypeOptions,...c},i.colorizes.length>0?o.colorizes=i.colorizes:i.data&&(o.colorizes=[]),r===e&&(o.highlights=i.highlights),i.areaFills.length>0&&(o.areaFills=i.areaFills),i.annotations.length>0&&(o.annotations=i.annotations);for(const u of i.annotationVisibility)u.action===AC.Hide?o.hiddenAnnotationIds.add(u.id):o.hiddenAnnotationIds.delete(u.id);i.series.length>0&&(o.seriesOverrides=i.series);for(const[u,d]of s)o.properties.set(u,d)}return o}function Sne(t,e){const n=t.options??(t.properties?Xp(t.chartType,Ym(t.chartType,t.properties)):{}),o={chartType:t.chartType,data:t.data,options:n,frame:t.frame,colorizes:t.colorizes??[],highlights:t.highlights??[],areaFills:t.areaFills??[],annotations:t.annotations??[],seriesOverrides:t.seriesOverrides??[],sort:t.sort,sortMode:t.sortMode,theme:t.theme};if(e==null||!t.scenes||e<0||e>=t.scenes.length)return o;const r=_ne(t.scenes,e,t.chartType),i=r.chartType??t.chartType,s=o.data,a=Object.keys(r.chartTypeOptions).length>0?Xp(i,{...n,...r.chartTypeOptions}):n,l=r.colorizes.length>0?Kp(r.colorizes):r.data?[]:o.colorizes,c=e!=null?Zp(r.highlights):o.highlights,u=r.areaFills.length>0?Qp(r.areaFills):o.areaFills,d=r.annotations.length>0?Jp(r.annotations):[],f=[...o.annotations,...d],h=r.hiddenAnnotationIds.size>0?f.filter(b=>!b.id||!r.hiddenAnnotationIds.has(b.id)):f,g=r.seriesOverrides.length>0?e0(r.seriesOverrides):o.seriesOverrides;return{...o,chartType:i,data:s,options:a,colorizes:l,highlights:c,areaFills:u,annotations:h,seriesOverrides:g}}function kne(t,e,n){if(n.ignoreLayout||!e)return{constrained:!1};const o=es(e),r=o.get("heightMode"),i=o.get("aspectRatio"),s=o.get("fixedHeight");let a=!1;if(r==="aspect-ratio"&&i){const l=String(i).split(":").map(Number);l.length===2&&l[0]>0&&l[1]>0&&(t.style.aspectRatio=`${l[0]} / ${l[1]}`,t.style.height="auto",a=!0)}else r==="fixed"&&s&&(t.style.height=`${s}px`,a=!0);return a&&(t.style.display="flex",t.style.flexDirection="column",t.style.overflow="hidden"),{constrained:a}}const v2=new WeakMap;function Cne(t,e,n){if(!n)return null;const o=v2.get(t);return!o||o===e?null:$r(t)}function Ane(t,e,n){if(v2.set(t,e),n){const o=t.querySelector(".bc-frame");o&&Ar(o),Tr(t,n)}}function $ne(t){v2.delete(t)}function Tne(t,e,n){const o=t.querySelector(".bc-frame");o&&(e.theme&&(o.classList.forEach(r=>{r.startsWith("bc-theme-")&&o.classList.remove(r)}),o.classList.add(`bc-theme-${e.theme}`)),n.constrained&&o.classList.add("bc-frame--constrained"))}function b2(t,e,n={}){var f;if(n.transition||(t.replaceChildren(),$ne(t)),e.data.labels.length===0)return;const o=n.stripColors&&e.properties?{...e,properties:e.properties.filter(h=>h.key!=="colors"&&h.key!=="colorPalette")}:e,r=kne(t,o.properties,n),i=Sne(o,n.sceneIndex),s=mte(i.chartType);if(!s)return;const a=Cne(t,i.chartType,!!n.transition);a&&t.replaceChildren();const l=Cr(t),c=m$(i.options,l);let u;if(n.thumbnail)u=null;else{const h=((f=i.frame)==null?void 0:f.padding)??n.padding??"16px";u={...i.frame??{},padding:h}}s(t,i.data,{frame:u,sort:i.sort,sortMode:i.sortMode,...c,colorizes:i.colorizes.length>0?i.colorizes:void 0,highlights:i.highlights.length>0?i.highlights:void 0,areaFills:i.areaFills.length>0?i.areaFills:void 0,annotations:i.annotations.length>0?i.annotations:void 0,seriesOverrides:i.seriesOverrides.length>0?i.seriesOverrides:void 0},!!n.transition);const d=n.theme??i.theme;Tne(t,{theme:d},r),Ane(t,i.chartType,a)}function y$(t,e,n){if(!e){n!=null&&n.transition||t.replaceChildren();return}const o=qm(e),r=xne(o);b2(t,r,n)}const s6="abcdefghijklmnopqrstuvwxyz0123456789";function Mne(){let t="";for(let e=0;e<8;e++)t+=s6[Math.floor(Math.random()*s6.length)];return t}const One=Po("scenes",()=>{const t=Ie([]),e=De(-1),n=De(!1);let o=null;const r=k(()=>e.value<0||e.value>=t.value.length?null:t.value[e.value]);function i(){const v=Mne();return t.value.push({id:v,name:null}),v}function s(v){v<0||v>=t.value.length||(t.value.splice(v,1),e.value>=t.value.length&&(e.value=t.value.length>0?t.value.length-1:-1),t.value.length===0&&(e.value=-1))}function a(v,y){v<0||v>=t.value.length||(t.value[v]={...t.value[v],...y})}function l(v){v!==e.value&&(v===-1||v>=0&&v<t.value.length)&&(e.value=v)}function c(){l(e.value+1)}function u(){l(e.value-1)}function d(v,y){if(v<0||v>=t.value.length||y<0||y>=t.value.length)return;const[x]=t.value.splice(v,1);t.value.splice(y,0,x),e.value===v?e.value=y:v<e.value&&y>=e.value?e.value--:v>e.value&&y<=e.value&&e.value++}function f(){n.value||(n.value=!0,t.value.length!==0&&(e.value=-1,o=setInterval(()=>{e.value<t.value.length-1?e.value++:h()},3e3)))}function h(){n.value=!1,o!==null&&(clearInterval(o),o=null)}function g(){h(),t.value=[],e.value=-1}function b(){return{scenes:t.value.map(v=>({...v})),activeIndex:e.value}}function m(v){h(),t.value=v.scenes.map(y=>({...y})),e.value=v.activeIndex}return{scenes:t,activeIndex:e,playing:n,activeScene:r,add:i,remove:s,update:a,setActive:l,nextScene:c,previousScene:u,reorder:d,startPlayback:f,stopPlayback:h,reset:g,snapshot:b,hydrate:m}});function _n(){const t=One(),{scenes:e,activeIndex:n,playing:o,activeScene:r}=At(t);return{scenes:e,activeIndex:n,playing:o,activeScene:r,add:t.add,remove:t.remove,update:t.update,setActive:t.setActive,nextScene:t.nextScene,previousScene:t.previousScene,reorder:t.reorder,startPlayback:t.startPlayback,stopPlayback:t.stopPlayback,reset:t.reset,snapshot:t.snapshot,hydrate:t.hydrate}}function t0(t,e){if(t===e)return!0;if(t==null||e==null)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,o)=>t0(n,e[o]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(r=>t0(t[r],e[r]))}return!1}function x$(t){return!(t===void 0||Array.isArray(t)&&t.length===0)}function a6(t,e,n,o){for(let r=o-1;r>=0;r--){const i=n[r];if(i&&e in i&&x$(i[e]))return i[e]}return t}function l6(t,e,n,o){for(let r=o-1;r>=0;r--){const i=n[r];if(i!=null&&i.properties&&e in i.properties)return String(i.properties[e])}return t}const Xd={sizing:"max-width",fixedWidth:600,maxWidth:660,heightMode:"auto",fixedHeight:400,aspectRatio:"16:9",padding:16,transparentBackground:!1,showCredit:!0,playerType:"buttons",playerPosition:"left"},c6={chartType:Le.BarVertical,title:"",description:"",byline:"",source:"",sourceUrl:"",note:"",sort:Jt.None,sortMode:"none",data:"",selectedColumn:"",colorizes:[],highlights:[],areaFills:[],annotations:[],seriesOverrides:[],layout:{...Xd}};function tl(t,e){return k({get(){const{activeScene:n,activeIndex:o,scenes:r}=_n(),i=n.value;return i&&e in i&&x$(i[e])?i[e]:o.value>=0?a6(t.value,e,r.value,o.value):t.value},set(n){const{activeIndex:o,activeScene:r,update:i,scenes:s}=_n();if(o.value>=0&&r.value){const a=a6(t.value,e,s.value,o.value);if(t0(n,a)){const l={...r.value};delete l[e],s.value[o.value]=l}else i(o.value,{[e]:n});return}t.value=n}})}function oa(t,e){return k({get(){const{activeScene:n,activeIndex:o,scenes:r}=_n(),i=n.value;return i!=null&&i.properties&&e in i.properties?String(i.properties[e]):o.value>=0?l6(t.value,e,r.value,o.value):t.value},set(n){const{activeIndex:o,activeScene:r,update:i,scenes:s}=_n();if(o.value>=0&&r.value){const a=l6(t.value,e,s.value,o.value);if(n===a){const l={...r.value.properties};delete l[e];const c=Object.keys(l).length>0?l:void 0,u={...r.value,properties:c};c||delete u.properties,s.value[o.value]=u}else{const l=r.value.properties??{};i(o.value,{properties:{...l,[e]:n}})}return}t.value=n}})}const Bne=Po("chartConfig",()=>{const t=ar({...c6}),e=E0(t),n=tl(e.chartType,"chartType"),o=tl(e.data,"data"),r=tl(e.colorizes,"colorizes"),i=tl(e.highlights,"highlights"),s=tl(e.areaFills,"areaFills"),a=tl(e.annotations,"annotations"),l=tl(e.seriesOverrides,"seriesOverrides"),c=oa(e.title,"title"),u=oa(e.description,"description"),d=oa(e.byline,"byline"),f=oa(e.source,"source"),h=oa(e.sourceUrl,"sourceUrl"),g=oa(e.note,"note"),b=oa(e.sort,"sort"),m=oa(e.sortMode,"sortMode");function v(){Object.assign(t,{...c6,colorizes:[],highlights:[],areaFills:[],annotations:[],seriesOverrides:[],layout:{...Xd}})}function y(x){Object.assign(t,{...x,layout:{...Xd,...x.layout}})}return{chartType:n,data:o,colorizes:r,highlights:i,areaFills:s,annotations:a,seriesOverrides:l,title:c,description:u,byline:d,source:f,sourceUrl:h,note:g,sort:b,sortMode:m,layout:e.layout,selectedColumn:e.selectedColumn,_base:Te(e),reset:v,hydrate:y}});function pn(){const t=Bne(),e=At(t);return{chartType:e.chartType,data:e.data,colorizes:e.colorizes,highlights:e.highlights,areaFills:e.areaFills,annotations:e.annotations,seriesOverrides:e.seriesOverrides,title:e.title,description:e.description,byline:e.byline,source:e.source,sourceUrl:e.sourceUrl,note:e.note,sort:e.sort,sortMode:e.sortMode,layout:e.layout,selectedColumn:e.selectedColumn,_base:t._base,reset:t.reset,hydrate:t.hydrate}}function Lne(t){const e=t.split(`
|
|
640
|
+
`)[0]??"",n=(e.match(/\t/g)??[]).length,o=(e.match(/,/g)??[]).length;return n>=o?" ":","}function ch(t,e){if(e===" ")return t.split(" ").map(i=>i.trim());const n=[];let o="",r=!1;for(let i=0;i<t.length;i++){const s=t[i];s==='"'?r&&t[i+1]==='"'?(o+='"',i++):r=!r:s===e&&!r?(n.push(o.trim()),o=""):o+=s}return n.push(o.trim()),n}const Pne=[/^\d{4}-\d{2}-\d{2}$/,/^\d{4}-\d{2}$/,/^\d{4}$/,/^\d{1,2}\/\d{1,2}\/\d{2,4}$/,/^\d{1,2}-\d{1,2}-\d{2,4}$/,/^(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{1,2},?\s+\d{4}$/i,/^\d{4}\/\d{2}\/\d{2}$/,/^\d{4}\/\d{2}$/,/^Q[1-4]\s+\d{4}$/];function Dne(t){if(!t)return!1;for(const e of Pne)if(e.test(t))return/^\d{4}(-\d{2})?$/.test(t)||/^\d{4}\/\d{2}$/.test(t)||/^Q[1-4]\s+\d{4}$/.test(t)?!0:!Number.isNaN(Date.parse(t));return!1}function w$(t){const e=t.match(/^[<>≤≥~]\s*(.+)$/);if(e){const n=e[1].replace(/[,%$€£¥₹]/g,"").trim();if(n.length>0&&!Number.isNaN(Number(n)))return e[1].trim()}return t}function Ene(t){if(!t)return!1;const e=w$(t).replace(/[,%$€£¥₹]/g,"").trim();return e.length>0&&!Number.isNaN(Number(e))}function F1(t,e){return t.map((n,o)=>{const r=e.map(i=>i[o]??"").filter(i=>i.length>0);return r.length===0?"string":r.every(Dne)?"date":r.every(Ene)?"number":"string"})}function _$(t){var s;const e=t.split(`
|
|
641
|
+
`).map(a=>a.trim()).filter(Boolean);if(e.length===0)return{columns:[],rows:[],columnTypes:[]};const n=(s=e[0])==null?void 0:s.match(/^_series\s*=\s*(.+)$/);if(n){const a=n[1].trim(),c=["label",...a.includes('","')?a.split(",").map(f=>f.trim().replace(/^"|"$/g,"")):a.replace(/^"|"$/g,"").split(",").map(f=>f.trim())],u=[];for(let f=1;f<e.length;f++){const h=e[f].match(/^"([^"]+)"\s*=\s*([^"]+)$/),b=e[f].match(/^"([^"]+)"\s*=\s*"([^"]*)"$/)??h;b&&u.push([b[1],...b[2].split(",").map(m=>m.trim())])}const d=F1(c,u);return{columns:c,rows:u,columnTypes:d}}const o=["label","value"],r=[];for(const a of e){const l=a.match(/^"([^"]+)"\s*=\s*(.+)$/);l&&r.push([l[1],l[2].replace(/%$/,"").trim()])}const i=F1(o,r);return{columns:o,rows:r,columnTypes:i}}function u6(t,e,n=" "){const o=s=>n===" "?s:s.includes(n)||s.includes('"')||s.includes(`
|
|
642
|
+
`)?`"${s.replace(/"/g,'""')}"`:s,r=t.map(o).join(n),i=e.map(s=>s.map(o).join(n));return[r,...i].join(`
|
|
643
|
+
`)}function V1(t,e){const n=e??{},o=n.trimWhitespace!==!1,r=t.split(`
|
|
644
|
+
`).filter(u=>u.trim().length>0);if(r.length===0)return{columns:[],rows:[],columnTypes:[]};const i=n.delimiter&&n.delimiter!=="auto"?n.delimiter:Lne(t),s=n.firstRowIsHeader!==!1;let a,l;s?(a=ch(r[0],i),l=r.slice(1).map(u=>ch(u,i))):(a=ch(r[0],i).map((d,f)=>`Column ${f+1}`),l=r.map(d=>ch(d,i))),o&&(a=a.map(u=>u.trim()),l=l.map(u=>u.map(d=>d.trim()))),n.decimalSeparator===","&&(l=l.map(u=>u.map(d=>/^\d+,\d+$/.test(d)?d.replace(",","."):d))),l=l.map(u=>u.map(w$));const c=F1(a,l);return{columns:a,rows:l,columnTypes:c}}var Qe=(t=>(t.Sort="sort",t.Filter="filter",t.HideColumns="hide-columns",t.Transpose="transpose",t.Parse="parse",t.Rename="rename",t.GroupBy="group-by",t.Computed="computed",t))(Qe||{}),bo=(t=>(t.Equals="equals",t.NotEquals="not-equals",t.Contains="contains",t.GreaterThan="greater-than",t.LessThan="less-than",t))(bo||{}),It=(t=>(t.Type="type",t.String="string",t.Numeric="numeric",t.Date="date",t))(It||{});const No=["string","number","date"],Gh=[{id:"to-number",label:"To Number",description:"Strip non-numeric characters and convert to number",category:It.Type,accepts:No,outputType:"number"},{id:"to-string",label:"To String",description:"Keep value as plain text",category:It.Type,accepts:No,outputType:"string"},{id:"to-date",label:"To Date",description:"Parse text into an ISO date",category:It.Type,accepts:No,outputType:"date"},{id:"to-boolean",label:"To Boolean",description:"Map yes/no, true/false, 1/0 to boolean",category:It.Type,accepts:No,outputType:"string"},{id:"parse-json",label:"Parse JSON",description:"Parse JSON string and optionally extract a key",category:It.Type,accepts:["string"],outputType:"string",params:["key"]},{id:"trim",label:"Trim",description:"Remove leading and trailing whitespace",category:It.String,accepts:No,outputType:"string"},{id:"lowercase",label:"Lowercase",description:"Convert all characters to lowercase",category:It.String,accepts:No,outputType:"string"},{id:"uppercase",label:"Uppercase",description:"Convert all characters to uppercase",category:It.String,accepts:No,outputType:"string"},{id:"title-case",label:"Title Case",description:"Capitalize the first letter of each word",category:It.String,accepts:No,outputType:"string"},{id:"slugify",label:"Slugify",description:"Lowercase and replace non-alphanumeric with hyphens",category:It.String,accepts:No,outputType:"string"},{id:"regex-replace",label:"Regex Replace",description:"Find and replace using a regular expression",category:It.String,accepts:No,outputType:"string",params:["pattern","replacement"]},{id:"extract",label:"Extract Substring",description:"Extract a portion of text by character position",category:It.String,accepts:No,outputType:"string",params:["start","end"]},{id:"pad-start",label:"Pad Start",description:"Pad the beginning to a fixed length",category:It.String,accepts:No,outputType:"string",params:["length","char"]},{id:"pad-end",label:"Pad End",description:"Pad the end to a fixed length",category:It.String,accepts:No,outputType:"string",params:["length","char"]},{id:"remove-diacritics",label:"Remove Diacritics",description:"Strip accents and diacritical marks",category:It.String,accepts:No,outputType:"string"},{id:"split",label:"Split into Columns",description:"Split values by a separator into new columns",category:It.String,accepts:No,outputType:"string",params:["separator","limit"]},{id:"round",label:"Round",description:"Round to a number of decimal places",category:It.Numeric,accepts:["number"],outputType:"number",params:["decimals"]},{id:"floor",label:"Floor",description:"Round down to the nearest integer",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"ceil",label:"Ceiling",description:"Round up to the nearest integer",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"abs",label:"Absolute Value",description:"Remove the sign (make positive)",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"clamp",label:"Clamp",description:"Constrain values between a min and max",category:It.Numeric,accepts:["number"],outputType:"number",params:["min","max"]},{id:"log",label:"Logarithm",description:"Natural log — compress wide-range values for charting",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"exp",label:"Exponential",description:"Raise e to the power of each value",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"normalize",label:"Normalize (0–1)",description:"Scale values to 0–1 range for cross-series comparison",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"standardize",label:"Standardize (z-score)",description:"Center around mean, scale by std deviation",category:It.Numeric,accepts:["number"],outputType:"number"},{id:"bin",label:"Bin/Bucket",description:"Group values into fixed-size buckets",category:It.Numeric,accepts:["number"],outputType:"number",params:["size"]},{id:"extract-year",label:"Extract Year",description:"Get the four-digit year as a number",category:It.Date,accepts:["date"],outputType:"number"},{id:"extract-month",label:"Extract Month",description:"Get the month (1–12) as a number",category:It.Date,accepts:["date"],outputType:"number"},{id:"extract-day",label:"Extract Day",description:"Get the day of the month as a number",category:It.Date,accepts:["date"],outputType:"number"},{id:"extract-weekday",label:"Extract Weekday",description:"Get the day name (Monday, Tuesday, …)",category:It.Date,accepts:["date"],outputType:"string"},{id:"extract-hour",label:"Extract Hour",description:"Get the hour (0–23) as a number",category:It.Date,accepts:["date"],outputType:"number"},{id:"shift-date",label:"Shift Date",description:"Add or subtract days, months, or years",category:It.Date,accepts:["date"],outputType:"date",params:["amount","unit"]},{id:"truncate-date",label:"Truncate to Period",description:"Round down to start of week, month, quarter, or year",category:It.Date,accepts:["date"],outputType:"date",params:["period"]},{id:"date-diff",label:"Duration Since",description:"Days between each date and a reference date",category:It.Date,accepts:["date"],outputType:"number",params:["reference"]}],y2=new Map(Gh.map(t=>[t.id,t]));function S$(t,e){const n=y2.get(t);return n?n.accepts.includes(e):!1}function Ine(t){var e;return((e=y2.get(t))==null?void 0:e.outputType)??"string"}function ra(t,e){const n=parseFloat(t);if(Number.isNaN(n))return t;const o=e(n);return Number.isNaN(o)?t:String(o)}function hs(t,e){const n=new Date(t);return Number.isNaN(n.getTime())?t:e(n)}function Nne(t,e,n){switch(e){case"to-number":{const o=Number(t.replace(/[^0-9.\-+eE]/g,""));return Number.isNaN(o)?"":String(o)}case"to-string":return t;case"to-date":return hs(t,o=>o.toISOString());case"to-boolean":{const o=t.toLowerCase().trim();return["true","1","yes","on","y"].includes(o)?"true":["false","0","no","off","n",""].includes(o)?"false":t}case"parse-json":try{const o=JSON.parse(t);return n.key?String(o[n.key]??""):JSON.stringify(o)}catch{return t}default:return t}}function Rne(t,e,n){switch(e){case"trim":return t.trim();case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();case"title-case":return t.replace(/\w\S*/g,o=>o.charAt(0).toUpperCase()+o.slice(1).toLowerCase());case"slugify":return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");case"regex-replace":{if(!n.pattern)return t;try{return t.replace(new RegExp(n.pattern,"g"),n.replacement??"")}catch{return t}}case"extract":return t.slice(Number(n.start)||0,n.end?Number(n.end):void 0);case"pad-start":return t.padStart(Number(n.length)||0,n.char||" ");case"pad-end":return t.padEnd(Number(n.length)||0,n.char||" ");case"remove-diacritics":return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"");default:return t}}function Fne(t,e,n){switch(e){case"round":{const r=10**(Number(n.decimals)||0);return ra(t,i=>Math.round(i*r)/r)}case"floor":return ra(t,Math.floor);case"ceil":return ra(t,Math.ceil);case"abs":return ra(t,Math.abs);case"clamp":{const o=n.min?Number(n.min):-1/0,r=n.max?Number(n.max):1/0;return ra(t,i=>Math.min(Math.max(i,o),r))}case"log":return ra(t,o=>o>0?Math.log(o):NaN);case"exp":return ra(t,Math.exp);case"bin":{const o=Number(n.size)||1;return ra(t,r=>Math.floor(r/o)*o)}default:return t}}function Vne(t,e,n){switch(e){case"extract-year":return hs(t,o=>String(o.getFullYear()));case"extract-month":return hs(t,o=>String(o.getMonth()+1));case"extract-day":return hs(t,o=>String(o.getDate()));case"extract-weekday":return hs(t,o=>o.toLocaleDateString("en",{weekday:"long"}));case"extract-hour":return hs(t,o=>String(o.getHours()));case"shift-date":return hs(t,o=>{const r=Number(n.amount)||0,i=n.unit||"days";return i==="years"?o.setFullYear(o.getFullYear()+r):i==="months"?o.setMonth(o.getMonth()+r):o.setDate(o.getDate()+r),o.toISOString()});case"truncate-date":return hs(t,o=>{const r=n.period||"month";return r==="year"?new Date(o.getFullYear(),0,1).toISOString():r==="quarter"?new Date(o.getFullYear(),Math.floor(o.getMonth()/3)*3,1).toISOString():r==="month"?new Date(o.getFullYear(),o.getMonth(),1).toISOString():(r==="week"&&(o.setDate(o.getDate()-o.getDay()),o.setHours(0,0,0,0)),o.toISOString())});case"date-diff":{const o=new Date(n.reference||new Date().toISOString());return Number.isNaN(o.getTime())?t:hs(t,r=>String(Math.round((r.getTime()-o.getTime())/(1e3*60*60*24))))}default:return t}}function zne(t,e,n){return e.startsWith("to-")||e==="parse-json"?Nne(t,e,n):new Set(["round","floor","ceil","abs","clamp","log","exp","bin"]).has(e)?Fne(t,e,n):e.startsWith("extract-")||e.startsWith("shift-")||e.startsWith("truncate-")||e==="date-diff"?Vne(t,e,n):Rne(t,e,n)}const Hne="";function Wne(t,e){const n=t.rows.map(o=>{const r=[...o];return r[e]=Hne,r});return{columns:[...t.columns],rows:n,columnTypes:[...t.columnTypes]}}function Une(t,e,n){const o=n.separator||",",r=n.limit?Number(n.limit):void 0;let i=0;const s=t.rows.map(d=>{const f=d[e].split(o),h=r?f.slice(0,r):f;return i=Math.max(i,h.length),h}),a=[...t.columns],l=[...t.columnTypes],c=[];for(let d=0;d<i;d++)c.push(`${n.column}_${d+1}`);a.splice(e,1,...c),l.splice(e,1,...Array(i).fill("string"));const u=t.rows.map((d,f)=>{const h=s[f],g=[...d],b=[...h,...Array(i-h.length).fill("")];return g.splice(e,1,...b),g});return{columns:a,rows:u,columnTypes:l}}function Gne(t,e,n){const o=t.rows.map(s=>parseFloat(s[e])).filter(s=>!Number.isNaN(s));if(o.length===0)return t;const r=t.rows.map(s=>[...s]),i=[...t.columnTypes];if(i[e]="number",n==="normalize"){const s=Math.min(...o),l=Math.max(...o)-s;for(const c of r){const u=parseFloat(c[e]);c[e]=Number.isNaN(u)?c[e]:String(l===0?0:(u-s)/l)}}else{const s=o.reduce((c,u)=>c+u,0)/o.length,a=o.reduce((c,u)=>c+(u-s)**2,0)/o.length,l=Math.sqrt(a);for(const c of r){const u=parseFloat(c[e]);c[e]=Number.isNaN(u)?c[e]:String(l===0?0:(u-s)/l)}}return{columns:[...t.columns],rows:r,columnTypes:i}}function qne(t,e){const n=t.columns.indexOf(e.column);if(n<0||!e.column||!e.operation)return t;const o=e.operation,r=t.columnTypes[n];if(!S$(o,r))return Wne(t,n);if(o==="split")return Une(t,n,e);if(o==="normalize"||o==="standardize")return Gne(t,n,o);const i=t.rows.map(a=>[...a]);for(const a of i)a[n]=zne(a[n],o,e);const s=[...t.columnTypes];return s[n]=Ine(o),{columns:[...t.columns],rows:i,columnTypes:s}}function Kd(t){return Number(t.replace(/[,%$€£¥₹]/g,"").trim())||0}function Yne(t,e,n){if(n==="number")return Kd(t)-Kd(e);if(n==="date"){const o=Date.parse(t)||0,r=Date.parse(e)||0;return o-r}return t.localeCompare(e)}function x2(t){return t.columns?t.columns.split(",").map(e=>e.trim()).filter(Boolean):t.column?[t.column]:[]}function jne(t,e){const n=x2(e);if(n.length===0)return t;const o=n.map(a=>t.columns.indexOf(a)).filter(a=>a>=0);if(o.length===0)return t;const r=e.direction===Jt.Descending?-1:1,i=e.operation;if(i&&o.length>1){const a=[...t.rows].sort((l,c)=>{const u=o.map(g=>Kd(l[g]??"")),d=o.map(g=>Kd(c[g]??""));let f,h;return i==="avg"?(f=u.reduce((g,b)=>g+b,0)/u.length,h=d.reduce((g,b)=>g+b,0)/d.length):(f=u.reduce((g,b)=>g+b,0),h=d.reduce((g,b)=>g+b,0)),r*(f-h)});return{...t,rows:a}}const s=[...t.rows].sort((a,l)=>{for(const c of o){const u=t.columnTypes[c]??"string",d=Yne(a[c]??"",l[c]??"",u);if(d!==0)return r*d}return 0});return{...t,rows:s}}function Xne(t,e,n){if(!n&&e!==bo.Equals&&e!==bo.NotEquals)return!0;switch(e){case bo.Equals:return t===n;case bo.NotEquals:return t!==n;case bo.Contains:return t.toLowerCase().includes(n.toLowerCase());case bo.GreaterThan:{const o=Number(t.replace(/[,%$€£¥₹]/g,"").trim()),r=Number(n);return!Number.isNaN(o)&&!Number.isNaN(r)&&o>r}case bo.LessThan:{const o=Number(t.replace(/[,%$€£¥₹]/g,"").trim()),r=Number(n);return!Number.isNaN(o)&&!Number.isNaN(r)&&o<r}default:return!0}}function Kne(t,e){const n=t.columns.indexOf(e.column);if(n<0||!e.column)return t;const o=t.rows.filter(r=>Xne(r[n]??"",e.condition??bo.Equals,e.value??""));return{...t,rows:o}}function Zne(t,e){const n=x2(e);if(n.length===0)return t;const o=t.columns.map((r,i)=>n.includes(r)?-1:i).filter(r=>r>=0);return o.length===t.columns.length?t:{columns:o.map(r=>t.columns[r]),rows:t.rows.map(r=>o.map(i=>r[i])),columnTypes:o.map(r=>t.columnTypes[r])}}function Qne(t){if(t.rows.length===0||t.columns.length===0)return t;const e=["Field",...t.rows.map(r=>r[0]??"")],n=[],o=["string"];for(let r=1;r<t.columns.length;r++){const i=[t.columns[r]];for(let s=0;s<t.rows.length;s++)i.push(t.rows[s][r]??"");n.push(i)}for(let r=0;r<t.rows.length;r++){const i=n.map(s=>s[r+1]??"").filter(s=>s.length>0);i.length>0&&i.every(s=>!Number.isNaN(Number(s.replace(/[,%$€£¥₹]/g,"").trim()))&&s.trim().length>0)?o.push("number"):o.push("string")}return{columns:e,rows:n,columnTypes:o}}function Jne(t,e){const n=t.columns.indexOf(e.column);if(n<0||!e.column||!e.newName)return t;const o=[...t.columns];return o[n]=e.newName,{...t,columns:o}}const k$={sum:t=>t.reduce((e,n)=>e+n,0),avg:t=>t.reduce((e,n)=>e+n,0)/t.length,min:t=>Math.min(...t),max:t=>Math.max(...t)};function eoe(t,e){return t.split(",").map(n=>n.trim()).filter(Boolean).map(n=>{const o=n.lastIndexOf(":");if(o<0)return null;const r=n.slice(0,o),i=n.slice(o+1);if(i!=="count"&&!k$[i])return null;const s=i==="count"?-1:e.indexOf(r);return i!=="count"&&s<0?null:{col:r,fn:i,colIndex:s}}).filter(n=>n!==null)}function toe(t,e,n){if(t==="count")return String(e.length);const o=e.map(r=>Kd(r[n]??""));return String(k$[t](o))}function noe(t,e){const n=x2({columns:e.groupColumns}).map(i=>t.columns.indexOf(i)).filter(i=>i>=0);if(n.length===0||!e.aggregates)return t;const o=eoe(e.aggregates,t.columns);if(o.length===0)return t;const r=new Map;for(const i of t.rows){const s=n.map(c=>i[c]??""),a=s.join("\0"),l=r.get(a);l?l.rows.push(i):r.set(a,{key:s,rows:[i]})}return{columns:[...n.map(i=>t.columns[i]),...o.map(i=>`${i.col}_${i.fn}`)],columnTypes:[...n.map(i=>t.columnTypes[i]),...o.map(()=>"number")],rows:[...r.values()].map(({key:i,rows:s})=>[...i,...o.map(a=>toe(a.fn,s,a.colIndex))])}}const ooe=Po("dataTransforms",()=>{const t=Ie([]);let e=1;function n(h,g={}){const b=String(e++);return t.value.push({id:b,type:h,config:g}),b}function o(h){const g=t.value.findIndex(b=>b.id===h);g>=0&&t.value.splice(g,1)}function r(h,g){const b=t.value.find(m=>m.id===h);b&&(b.config={...g})}function i(h,g){const b=t.value.findIndex(v=>v.id===h);if(b<0||g<0||g>=t.value.length)return;const[m]=t.value.splice(b,1);t.value.splice(g,0,m)}function s(h,g,b,m){let v={columns:[...g],rows:b.map(y=>[...y]),columnTypes:[...m]};for(const y of h)switch(y.type){case Qe.Sort:v=jne(v,y.config);break;case Qe.Filter:v=Kne(v,y.config);break;case Qe.HideColumns:v=Zne(v,y.config);break;case Qe.Transpose:v=Qne(v);break;case Qe.Parse:v=qne(v,y.config);break;case Qe.Rename:v=Jne(v,y.config);break;case Qe.GroupBy:v=noe(v,y.config);break}return v}function a(h,g,b){return s(t.value,h,g,b)}function l(h,g,b,m){const v=t.value.slice(0,h);return s(v,g,b,m)}function c(h,g,b){const{config:m}=h;if(m.column&&!g.includes(m.column))return`Column "${m.column}" not found`;if(h.type===Qe.Parse&&m.column&&m.operation){const v=g.indexOf(m.column);if(v>=0&&!S$(m.operation,b[v])){const y=y2.get(m.operation);return`${(y==null?void 0:y.label)??m.operation} requires ${y==null?void 0:y.accepts.join(" or ")} column, got ${b[v]}`}}return h.type===Qe.Rename?m.column?m.newName?null:"New name is required":"No column selected":h.type===Qe.Filter&&!m.column||h.type===Qe.Sort&&!m.column&&!m.columns?"No column selected":h.type===Qe.GroupBy?m.groupColumns?m.aggregates?null:"No aggregates defined":"No group columns selected":null}function u(){t.value=[],e=1}function d(h){t.value=h.map(g=>({...g,config:{...g.config}})),e=h.reduce((g,b)=>Math.max(g,Number(b.id)||0),0)+1}function f(){return t.value.map(h=>({id:h.id,type:h.type,config:{...h.config}}))}return{steps:t,addStep:n,removeStep:o,updateStep:r,moveStep:i,applyStepList:s,applyTransforms:a,getColumnsAtStep:l,validateStep:c,reset:u,hydrate:d,snapshot:f}});function Or(){const t=ooe(),{steps:e}=At(t);return{steps:e,addStep:t.addStep,removeStep:t.removeStep,updateStep:t.updateStep,moveStep:t.moveStep,applyStepList:t.applyStepList,applyTransforms:t.applyTransforms,getColumnsAtStep:t.getColumnsAtStep,validateStep:t.validateStep,reset:t.reset,hydrate:t.hydrate,snapshot:t.snapshot}}function Ba(t,e){if(e<0||e>=t.length)return null;const n={id:t[e].id,name:t[e].name},o=new Set;for(let r=0;r<=e;r++){const i=t[r];if(i.chartType!==void 0&&(n.chartType=i.chartType),i.data!==void 0&&(n.data=i.data),i.chartTypeOptions!==void 0&&(n.chartTypeOptions=n.chartTypeOptions?{...n.chartTypeOptions,...i.chartTypeOptions}:{...i.chartTypeOptions}),i.colorizes!==void 0&&i.colorizes.length>0?n.colorizes=i.colorizes:i.data!==void 0&&(n.colorizes=[]),r===e&&(n.highlights=i.highlights),i.areaFills!==void 0&&i.areaFills.length>0&&(n.areaFills=i.areaFills),i.annotations!==void 0&&i.annotations.length>0&&(n.annotations=i.annotations),i.annotationVisibility)for(const s of i.annotationVisibility)s.action==="hide"?o.add(s.id):o.delete(s.id);i.seriesOverrides!==void 0&&i.seriesOverrides.length>0&&(n.seriesOverrides=i.seriesOverrides),i.transforms!==void 0&&(n.transforms=i.transforms),i.properties!==void 0&&(n.properties=n.properties?{...n.properties,...i.properties}:{...i.properties})}return o.size>0&&(n.hiddenAnnotationIds=o),n}function C$(t,e){var n;if(e<0||e>=t.length)return-1;for(let o=e;o>=0;o--)if(((n=t[o])==null?void 0:n.data)!==void 0)return o;return-1}function A$(t){var e,n;if((e=t==null?void 0:t.transforms)!=null&&e.length){for(let o=t.transforms.length-1;o>=0;o--)if(t.transforms[o].type===Qe.Sort)return((n=t.transforms[o].config)==null?void 0:n.direction)??Jt.Ascending}}function d6(t){return/^-?\d+(\.\d+)?%?$/.test(t)?t:`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function jm(t,e){if(t.length<=2)return e.map(i=>{const s=i[0]??"",a=i[1]??"";return`"${s}" = ${d6(a)}`}).join(`
|
|
645
|
+
`);const o=`_series = ${t.slice(1).map(i=>`"${i}"`).join(",")}`,r=e.map(i=>{const s=i[0]??"",a=i.slice(1).map(l=>d6(l??"")).join(",");return`"${s}" = ${a}`});return[o,...r].join(`
|
|
646
|
+
`)}const roe=Po("dataTable",()=>{const t=ar({columns:[],rows:[],rawInput:"",columnTypes:[]}),e=De("delimited"),n=De(""),o=De(null),{steps:r,applyTransforms:i,applyStepList:s}=Or(),{activeIndex:a,scenes:l}=_n(),c=k(()=>{var S;if(a.value>=0){const E=Ba(l.value,a.value);if(E!=null&&E.data)return _$(E.data)}let _={columns:t.columns,rows:t.rows,columnTypes:t.columnTypes};if(r.value.length>0&&(_=i(t.columns,t.rows,t.columnTypes)),a.value>=0&&_.columns.length>0){const E=Ba(l.value,a.value);(S=E==null?void 0:E.transforms)!=null&&S.length&&(_=s(E.transforms,_.columns,_.rows,_.columnTypes))}return _}),u=k(()=>c.value.columns),d=k(()=>c.value.rows),f=k(()=>c.value.columnTypes),h=k(()=>r.value.length>0);function g(_,S){t.columns=[..._.columns],t.rows=_.rows.map(E=>[...E]),t.columnTypes=_.columnTypes?[..._.columnTypes]:_.columns.map(()=>"string"),o.value=Date.now(),S!=null&&S.label&&(n.value=S.label)}function b(_,S){_>=0&&_<t.columns.length&&(t.columns[_]=S)}function m(_,S){_>=0&&_<t.columnTypes.length&&(t.columnTypes[_]=S)}function v(){return jm(u.value,d.value)}function y(){t.columns=[],t.rows=[],t.rawInput="",t.columnTypes=[],n.value="",o.value=null}function x(_){t.columns=_.columns,t.rows=_.rows,t.rawInput=_.rawInput,t.columnTypes=_.columnTypes??_.columns.map(()=>"string")}return{...E0(t),sourceFormat:e,sourceLabel:n,loadedAt:o,displayColumns:u,displayRows:d,displayColumnTypes:f,hasTransforms:h,loadParsed:g,renameColumn:b,setColumnType:m,serialize:v,reset:y,hydrate:x}});function Zo(){const t=roe(),{columns:e,rows:n,rawInput:o,columnTypes:r,sourceFormat:i,sourceLabel:s,loadedAt:a,displayColumns:l,displayRows:c,displayColumnTypes:u,hasTransforms:d}=At(t);return{columns:e,rows:n,rawInput:o,columnTypes:r,sourceFormat:i,sourceLabel:s,loadedAt:a,displayColumns:l,displayRows:c,displayColumnTypes:u,hasTransforms:d,loadParsed:t.loadParsed,renameColumn:t.renameColumn,setColumnType:t.setColumnType,serialize:t.serialize,reset:t.reset,hydrate:t.hydrate}}const ioe=Po("chartTypeOptions",()=>{const t=ar({});function e(d){g$(d),t[d]||(t[d]={})}const{chartType:n,_base:o}=pn(),r=k(()=>{var m,v;const d=t[n.value]??{},f=Xp(n.value,d),{activeScene:h,activeIndex:g,scenes:b}=_n();if(g.value>=0){let y={...f};for(let x=0;x<=g.value;x++){const _=(m=b.value[x])==null?void 0:m.chartTypeOptions;_&&(y={...y,..._})}return y}return(v=h.value)!=null&&v.chartTypeOptions?{...f,...h.value.chartTypeOptions}:f}),i=k(()=>{const d=t[o.chartType.value]??{};return Xp(o.chartType.value,d)}),s=k(()=>Qc(n.value)),a=k(()=>s.value.map(d=>d.key));function l(d,f){var m;const{activeIndex:h,activeScene:g,scenes:b}=_n();if(h.value>=0&&g.value){let y=(t[n.value]??{})[d];for(let x=h.value-1;x>=0;x--){const _=(m=b.value[x])==null?void 0:m.chartTypeOptions;if(_&&d in _){y=_[d];break}}if(t0(f,y)){const x={...g.value.chartTypeOptions};delete x[d];const _=Object.keys(x).length>0?x:void 0,S={...g.value};_?S.chartTypeOptions=_:delete S.chartTypeOptions,b.value[h.value]=S}else{const x=g.value.chartTypeOptions??{};b.value[h.value]={...g.value,chartTypeOptions:{...x,[d]:f}}}return}t[n.value]||(t[n.value]={}),t[n.value][d]=f}Ve(n,(d,f)=>{var _;e(d);const{activeIndex:h,activeScene:g,scenes:b}=_n(),m=h.value>=0&&g.value!=null;let v;if(m){let S={...t[f]??{}};for(let E=0;E<=h.value;E++){const M=(_=b.value[E])==null?void 0:_.chartTypeOptions;M&&(S={...S,...M})}v=S}else v=t[f]??{};if(Object.keys(v).length===0)return;const y=Qc(d).map(S=>S.key);if(y.length===0)return;const x=t[d]??{};for(const S of y)if(S in v){if(m){const E=g.value.chartTypeOptions??{};if(!(S in E)&&!(S in x)){const M=v[S],C=Array.isArray(M)?[...M]:M;b.value[h.value]={...g.value,chartTypeOptions:{...E,[S]:C}}}}else if(!(S in x)){const E=v[S],M=t[d];Array.isArray(E)?M[S]=[...E]:M[S]=E}}},{flush:"sync"});function c(){for(const d of Object.keys(t))delete t[d]}function u(d){c();for(const[f,h]of Object.entries(d))t[f]=h}return{currentOptions:r,baseOptions:i,availableOptionKeys:a,optionDefs:s,setOption:l,ensureDefaults:e,reset:c,hydrate:u,store:t}});function kn(){const t=ioe(),{currentOptions:e,baseOptions:n,availableOptionKeys:o,optionDefs:r}=At(t);return{currentOptions:e,baseOptions:n,availableOptionKeys:o,optionDefs:r,setOption:t.setOption,ensureDefaults:t.ensureDefaults,reset:t.reset,hydrate:t.hydrate,store:t.store}}const $$=[{value:"blueprint",label:"Blueprint",description:"The default Blueprint Chart theme"},{value:"blueprint-framed",label:"Blueprint Framed",description:"Adds borders and a tinted footer"}],w2=Po("chartTheme",()=>{const t=De("blueprint");function e(){t.value="blueprint"}return{chartTheme:t,chartThemeOptions:$$,reset:e}});function T$(){const t=w2(),{chartTheme:e}=At(t);return{chartTheme:e,availableThemes:$$,reset:t.reset}}const soe=new Set([Qe.Sort,Qe.Filter,Qe.HideColumns,Qe.Transpose,Qe.Parse,Qe.GroupBy,Qe.Computed,"pivot"]);function Mc(){const t=pn(),e=w2(),n=At(e).chartTheme,{store:o,ensureDefaults:r}=kn(),i=Or(),s=_n();function a(l){var c,u;try{const d=qm(l);s.setActive(-1),t.chartType.value=d.chartType;const f=es(d.properties);t.title.value=String(f.get("title")??""),t.description.value=String(f.get("description")??""),t.byline.value=String(f.get("byline")??""),t.source.value=String(f.get("source")??""),t.sourceUrl.value=String(f.get("sourceUrl")??"");const h=f.get("theme");n.value=h?String(h):"blueprint";const g={},b=f.get("sizing");b&&["responsive","fixed","max-width"].includes(String(b))&&(g.sizing=String(b));const v=f.get("fixedWidth");v!==void 0&&(g.fixedWidth=Number(v));const y=f.get("maxWidth");y!==void 0&&(g.maxWidth=Number(y));const x=f.get("heightMode");x&&["auto","fixed","aspect-ratio"].includes(String(x))&&(g.heightMode=String(x));const S=f.get("fixedHeight");S!==void 0&&(g.fixedHeight=Number(S));const E=f.get("aspectRatio");E!==void 0&&(g.aspectRatio=String(E));const M=f.get("padding");M!==void 0&&(g.padding=Number(M));const C=f.get("transparentBackground");C!==void 0&&(g.transparentBackground=C===!0||C==="true");const O=f.get("showCredit");O!==void 0&&(g.showCredit=O!==!1&&O!=="false");const P=f.get("player");P&&["buttons","progress-bar","dot-stepper","minimal-arrows","none"].includes(String(P))&&(g.playerType=String(P));const $=f.get("playerPosition");$&&["left","center","right"].includes(String($))&&(g.playerPosition=String($)),t.layout.value={...Xd,...g};const L=f.get("sort");L===Jt.Ascending||L===Jt.Descending?t.sort.value=L:t.sort.value=Jt.None;const B=d.data?R1(d.data):"";if(t.data.value=B,B){const F=Zo(),z=_$(B);F.loadParsed(z),F.rawInput.value=B,F.sourceFormat.value="bpc"}if(o[d.chartType]=Ym(d.chartType,d.properties),r(d.chartType),t.colorizes.value=d.colorizes?Kp(d.colorizes):[],t.highlights.value=d.highlights?Zp(d.highlights):[],t.areaFills.value=d.areaFills?Qp(d.areaFills):[],t.annotations.value=d.annotations?Jp(d.annotations):[],t.seriesOverrides.value=d.series?e0(d.series):[],(c=d.transforms)!=null&&c.length){i.reset();for(const F of d.transforms){if(!soe.has(F.transformType))continue;const z=es(F.properties),V={};for(const[U,ie]of z)V[U]=String(ie);if(F.transformType===Qe.Sort&&z.has("direction")){const U=String(z.get("direction"));(U===Jt.Ascending||U===Jt.Descending)&&(t.sort.value=U)}i.addStep(F.transformType,V)}}else i.reset();if((u=d.scenes)!=null&&u.length){const F=d.scenes.map(z=>{const V=Jte(z,d.chartType),U={id:Math.random().toString(36).slice(2,10),name:V.name};V.chartType&&(U.chartType=V.chartType),V.data&&(U.data=R1(V.data)),Object.keys(V.chartTypeOptions).length>0&&(U.chartTypeOptions=V.chartTypeOptions),V.colorizes.length>0&&(U.colorizes=Kp(V.colorizes)),V.highlights.length>0&&(U.highlights=Zp(V.highlights)),V.areaFills.length>0&&(U.areaFills=Qp(V.areaFills)),V.annotations.length>0&&(U.annotations=Jp(V.annotations)),V.series.length>0&&(U.seriesOverrides=e0(V.series)),V.annotationVisibility.length>0&&(U.annotationVisibility=V.annotationVisibility.map(ue=>({action:ue.action,kind:ue.kind,id:ue.id}))),V.transforms.length>0&&(U.transforms=V.transforms.map((ue,fe)=>({id:String(fe),type:ue.transformType,config:Object.fromEntries(ue.properties.map(he=>[he.key,String(he.value)]))})));const ie=Object.fromEntries([...V.properties.entries()].filter(([ue])=>!["type"].includes(ue)));return Object.keys(ie).length>0&&(U.properties=ie),U});s.hydrate({scenes:F,activeIndex:-1})}else s.reset();return{success:!0}}catch(d){return{success:!1,error:d instanceof Error?d.message:String(d)}}}return{applyDsl:a}}function uh(t){if(typeof t=="number")return String(t);const e=String(t);return e.endsWith("%")?String(parseFloat(e)):`"${e}"`}function Vu(t){if(typeof t=="number")return String(t);const e=String(t);return e.endsWith("%")?`"${e}"`:String(parseFloat(e))}function Tf(){const e=pn()._base,n=At(w2()).chartTheme,{baseOptions:o}=kn(),{steps:r}=Or(),{scenes:i}=_n(),s=Zo(),a=De(!1);function l(){let u=`chart ${e.chartType.value} {
|
|
647
|
+
`;e.title.value&&(u+=` title = "${e.title.value}"
|
|
648
|
+
`),e.description.value&&(u+=` description = "${e.description.value}"
|
|
649
|
+
`),e.byline.value&&(u+=` byline = "${e.byline.value}"
|
|
650
|
+
`),e.source.value&&(u+=` source = "${e.source.value}"
|
|
651
|
+
`),e.sourceUrl.value&&(u+=` sourceUrl = "${e.sourceUrl.value}"
|
|
652
|
+
`),n.value&&n.value!=="blueprint"&&(u+=` theme = "${n.value}"
|
|
653
|
+
`);const d=Qc(e.chartType.value),f=d.map(m=>m.key),h=new Map(d.filter(m=>m.default!==void 0).map(m=>[m.key,String(m.default)])),g=o.value;for(const m of f){const v=g[m];v!==void 0&&(a.value&&h.has(m)&&String(v)===h.get(m)||(m==="colors"&&Array.isArray(v)&&v.length>0?u+=` colors = "${v.join(", ")}"
|
|
654
|
+
`:typeof v=="boolean"?u+=` ${m} = ${v}
|
|
655
|
+
`:typeof v=="string"&&v!==""&&(u+=` ${m} = "${v}"
|
|
656
|
+
`)))}const b=Bt(e.layout.value);if(b.sizing!=="max-width"&&(u+=` sizing = "${b.sizing}"
|
|
657
|
+
`),b.sizing==="fixed"&&b.fixedWidth!==600&&(u+=` fixedWidth = ${b.fixedWidth}
|
|
658
|
+
`),b.sizing==="max-width"&&b.maxWidth!==660&&(u+=` maxWidth = ${Vu(b.maxWidth)}
|
|
659
|
+
`),b.heightMode!=="auto"&&(u+=` heightMode = "${b.heightMode}"
|
|
660
|
+
`),b.heightMode==="fixed"&&b.fixedHeight!==400&&(u+=` fixedHeight = ${b.fixedHeight}
|
|
661
|
+
`),b.heightMode==="aspect-ratio"&&b.aspectRatio!=="16:9"&&(u+=` aspectRatio = "${b.aspectRatio}"
|
|
662
|
+
`),b.padding!==16&&(u+=` padding = ${b.padding}
|
|
663
|
+
`),b.transparentBackground&&(u+=` transparentBackground = true
|
|
664
|
+
`),b.showCredit||(u+=` showCredit = false
|
|
665
|
+
`),b.playerType&&b.playerType!=="buttons"&&(u+=` player = "${b.playerType}"
|
|
666
|
+
`),b.playerPosition!=="left"&&(u+=` playerPosition = "${b.playerPosition}"
|
|
667
|
+
`),e.data.value){u+=`
|
|
668
|
+
data {
|
|
669
|
+
`;const m=e.data.value.split(`
|
|
670
|
+
`).map(v=>v.trim()).filter(Boolean);u+=m.map(v=>` ${v}`).join(`
|
|
671
|
+
`),u+=`
|
|
672
|
+
}
|
|
673
|
+
`}for(const m of e.colorizes.value)m.target&&(u+=`
|
|
674
|
+
colorize "${m.target}" {
|
|
675
|
+
`,m.color&&(u+=` color = "${m.color}"
|
|
676
|
+
`),m.label&&(u+=` label = "${m.label}"
|
|
677
|
+
`),u+=` }
|
|
678
|
+
`);for(const m of e.highlights.value)m.target&&(u+=`
|
|
679
|
+
highlight "${m.target}"
|
|
680
|
+
`);for(const m of e.areaFills.value)!m.from||!m.to||(u+=`
|
|
681
|
+
areafill "${m.from}" "${m.to}" {
|
|
682
|
+
`,m.color&&(u+=` color = "${m.color}"
|
|
683
|
+
`),m.negativeColor&&(u+=` negativeColor = "${m.negativeColor}"
|
|
684
|
+
`),m.opacity!==void 0&&(u+=` opacity = ${m.opacity}
|
|
685
|
+
`),m.interpolation&&(u+=` interpolation = "${m.interpolation}"
|
|
686
|
+
`),u+=` }
|
|
687
|
+
`);for(const m of e.annotations.value){const v=m.kind??Lt.Point;if(v===Lt.Point){if(!("target"in m)||!m.target)continue;u+=`
|
|
688
|
+
annotation "${m.target}" {
|
|
689
|
+
`,m.id&&(u+=` id = "${m.id}"
|
|
690
|
+
`),m.text&&(u+=` text = "${m.text}"
|
|
691
|
+
`),m.textColor&&(u+=` textColor = "${m.textColor}"
|
|
692
|
+
`),m.maxWidth!==void 0&&(u+=` maxWidth = ${Vu(m.maxWidth)}
|
|
693
|
+
`),m.textOutline!==void 0&&(u+=` textOutline = ${m.textOutline}
|
|
694
|
+
`),m.showLine!==void 0&&(u+=` showLine = ${m.showLine}
|
|
695
|
+
`),m.anchorDirection&&(u+=` anchorDirection = ${m.anchorDirection}
|
|
696
|
+
`),m.textOffsetX!==void 0&&(u+=` textOffsetX = ${m.textOffsetX}
|
|
697
|
+
`),m.textOffsetY!==void 0&&(u+=` textOffsetY = ${m.textOffsetY}
|
|
698
|
+
`),m.lineStyle&&(u+=` lineStyle = ${m.lineStyle}
|
|
699
|
+
`),m.lineWeight!==void 0&&(u+=` lineWeight = ${m.lineWeight}
|
|
700
|
+
`),m.showArrow!==void 0&&(u+=` showArrow = ${m.showArrow}
|
|
701
|
+
`),m.lineTargetDistance!==void 0&&(u+=` lineTargetDistance = ${m.lineTargetDistance}
|
|
702
|
+
`),m.showCircle!==void 0&&(u+=` showCircle = ${m.showCircle}
|
|
703
|
+
`),m.circleSize!==void 0&&(u+=` circleSize = ${m.circleSize}
|
|
704
|
+
`),m.circleStyle&&(u+=` circleStyle = ${m.circleStyle}
|
|
705
|
+
`),m.circleColor&&(u+=` circleColor = "${m.circleColor}"
|
|
706
|
+
`),u+=` }
|
|
707
|
+
`}else if(v===Lt.Range){const y=m;u+=`
|
|
708
|
+
range {
|
|
709
|
+
`,y.id&&(u+=` id = "${y.id}"
|
|
710
|
+
`),y.start!==void 0&&(u+=` start = ${typeof y.start=="string"?`"${y.start}"`:y.start}
|
|
711
|
+
`),y.end!==void 0&&(u+=` end = ${typeof y.end=="string"?`"${y.end}"`:y.end}
|
|
712
|
+
`),y.orientation&&(u+=` orientation = ${y.orientation}
|
|
713
|
+
`),y.startAnchor&&y.startAnchor!=="center"&&(u+=` startAnchor = ${y.startAnchor}
|
|
714
|
+
`),y.endAnchor&&y.endAnchor!=="center"&&(u+=` endAnchor = ${y.endAnchor}
|
|
715
|
+
`),y.bgColor&&(u+=` bgColor = "${y.bgColor}"
|
|
716
|
+
`),y.bgOpacity!==void 0&&(u+=` bgOpacity = ${y.bgOpacity}
|
|
717
|
+
`),y.direction&&(u+=` direction = ${y.direction}
|
|
718
|
+
`),y.text&&(u+=` text = "${y.text}"
|
|
719
|
+
`),y.textColor&&(u+=` textColor = "${y.textColor}"
|
|
720
|
+
`),u+=` }
|
|
721
|
+
`}else if(v===Lt.Free){const y=m;u+=`
|
|
722
|
+
note {
|
|
723
|
+
`,y.id&&(u+=` id = "${y.id}"
|
|
724
|
+
`),y.text&&(u+=` text = "${y.text}"
|
|
725
|
+
`),y.x!==void 0&&(u+=` x = ${uh(y.x)}
|
|
726
|
+
`),y.y!==void 0&&(u+=` y = ${uh(y.y)}
|
|
727
|
+
`),y.textColor&&(u+=` textColor = "${y.textColor}"
|
|
728
|
+
`),y.maxWidth!==void 0&&(u+=` maxWidth = ${Vu(y.maxWidth)}
|
|
729
|
+
`),y.textOutline!==void 0&&(u+=` textOutline = ${y.textOutline}
|
|
730
|
+
`),u+=` }
|
|
731
|
+
`}}for(const m of r.value){u+=`
|
|
732
|
+
transform ${m.type} {
|
|
733
|
+
`;for(const[v,y]of Object.entries(m.config))y!==void 0&&y!==""&&(u+=` ${v} = "${y}"
|
|
734
|
+
`);u+=` }
|
|
735
|
+
`}if(e.sort.value!==Jt.None){const m=s.displayColumns.value,v=m.length>2?m.slice(1):m.length>1?[m[1]]:[m[0]??""];u+=`
|
|
736
|
+
transform ${Qe.Sort} {
|
|
737
|
+
`,v.length>1?(u+=` columns = "${v.join(",")}"
|
|
738
|
+
`,u+=` operation = sum
|
|
739
|
+
`):u+=` column = "${v[0]}"
|
|
740
|
+
`,u+=` direction = ${e.sort.value}
|
|
741
|
+
`,u+=` }
|
|
742
|
+
`}for(const m of e.seriesOverrides.value)m.name&&(u+=`
|
|
743
|
+
series "${m.name}" {
|
|
744
|
+
`,m.color&&(u+=` color = "${m.color}"
|
|
745
|
+
`),m.lineWidth!==void 0&&(u+=` lineWidth = ${m.lineWidth}
|
|
746
|
+
`),m.dash&&(u+=` dash = "${m.dash}"
|
|
747
|
+
`),m.interpolation&&(u+=` interpolation = "${m.interpolation}"
|
|
748
|
+
`),m.labelMode&&(u+=` labelMode = "${m.labelMode}"
|
|
749
|
+
`),m.labelText&&(u+=` labelText = "${m.labelText}"
|
|
750
|
+
`),m.valueLabels!==void 0&&(u+=` valueLabels = ${m.valueLabels}
|
|
751
|
+
`),m.lineSymbols!==void 0&&(u+=` lineSymbols = ${m.lineSymbols}
|
|
752
|
+
`),m.hidden!==void 0&&(u+=` hidden = ${m.hidden}
|
|
753
|
+
`),m.symbolShape&&(u+=` symbolShape = "${m.symbolShape}"
|
|
754
|
+
`),m.symbolShowOn&&(u+=` symbolShowOn = "${m.symbolShowOn}"
|
|
755
|
+
`),m.symbolStyle&&(u+=` symbolStyle = "${m.symbolStyle}"
|
|
756
|
+
`),m.symbolSize!==void 0&&(u+=` symbolSize = ${m.symbolSize}
|
|
757
|
+
`),m.symbolOpacity!==void 0&&(u+=` symbolOpacity = ${m.symbolOpacity}
|
|
758
|
+
`),u+=` }
|
|
759
|
+
`);for(const m of Bt(i.value)){if(m.name!==null?u+=`
|
|
760
|
+
scene "${m.name}" {
|
|
761
|
+
`:u+=`
|
|
762
|
+
scene {
|
|
763
|
+
`,m.chartType&&(u+=` type = ${m.chartType}
|
|
764
|
+
`),m.properties)for(const[v,y]of Object.entries(m.properties))typeof y=="string"?u+=` ${v} = "${y}"
|
|
765
|
+
`:u+=` ${v} = ${y}
|
|
766
|
+
`;if(m.chartTypeOptions){const v=m.chartType||e.chartType.value,x=Qc(v).map(_=>_.key);for(const _ of x){const S=m.chartTypeOptions[_];S!==void 0&&(_==="colors"&&Array.isArray(S)&&S.length>0?u+=` colors = "${S.join(", ")}"
|
|
767
|
+
`:typeof S=="boolean"?u+=` ${_} = ${S}
|
|
768
|
+
`:typeof S=="string"&&S!==""&&(u+=` ${_} = "${S}"
|
|
769
|
+
`))}}if(m.data){u+=`
|
|
770
|
+
data {
|
|
771
|
+
`;const v=m.data.split(`
|
|
772
|
+
`).map(y=>y.trim()).filter(Boolean);u+=v.map(y=>` ${y}`).join(`
|
|
773
|
+
`),u+=`
|
|
774
|
+
}
|
|
775
|
+
`}if(m.colorizes)for(const v of m.colorizes)v.target&&(u+=`
|
|
776
|
+
colorize "${v.target}" {
|
|
777
|
+
`,v.color&&(u+=` color = "${v.color}"
|
|
778
|
+
`),v.label&&(u+=` label = "${v.label}"
|
|
779
|
+
`),u+=` }
|
|
780
|
+
`);if(m.highlights)for(const v of m.highlights)v.target&&(u+=`
|
|
781
|
+
highlight "${v.target}"
|
|
782
|
+
`);if(m.areaFills)for(const v of m.areaFills)!v.from||!v.to||(u+=`
|
|
783
|
+
areafill "${v.from}" "${v.to}" {
|
|
784
|
+
`,v.color&&(u+=` color = "${v.color}"
|
|
785
|
+
`),u+=` }
|
|
786
|
+
`);if(m.annotations)for(const v of m.annotations){const y=v.kind??Lt.Point;if(y===Lt.Point){if(!("target"in v)||!v.target)continue;u+=`
|
|
787
|
+
annotation "${v.target}" {
|
|
788
|
+
`,v.id&&(u+=` id = "${v.id}"
|
|
789
|
+
`),v.text&&(u+=` text = "${v.text}"
|
|
790
|
+
`),v.textColor&&(u+=` textColor = "${v.textColor}"
|
|
791
|
+
`),v.maxWidth!==void 0&&(u+=` maxWidth = ${Vu(v.maxWidth)}
|
|
792
|
+
`),v.textOutline!==void 0&&(u+=` textOutline = ${v.textOutline}
|
|
793
|
+
`),v.showLine!==void 0&&(u+=` showLine = ${v.showLine}
|
|
794
|
+
`),v.anchorDirection&&(u+=` anchorDirection = ${v.anchorDirection}
|
|
795
|
+
`),v.textOffsetX!==void 0&&(u+=` textOffsetX = ${v.textOffsetX}
|
|
796
|
+
`),v.textOffsetY!==void 0&&(u+=` textOffsetY = ${v.textOffsetY}
|
|
797
|
+
`),v.lineStyle&&(u+=` lineStyle = ${v.lineStyle}
|
|
798
|
+
`),v.lineWeight!==void 0&&(u+=` lineWeight = ${v.lineWeight}
|
|
799
|
+
`),v.showArrow!==void 0&&(u+=` showArrow = ${v.showArrow}
|
|
800
|
+
`),v.lineTargetDistance!==void 0&&(u+=` lineTargetDistance = ${v.lineTargetDistance}
|
|
801
|
+
`),v.showCircle!==void 0&&(u+=` showCircle = ${v.showCircle}
|
|
802
|
+
`),v.circleSize!==void 0&&(u+=` circleSize = ${v.circleSize}
|
|
803
|
+
`),v.circleStyle&&(u+=` circleStyle = ${v.circleStyle}
|
|
804
|
+
`),v.circleColor&&(u+=` circleColor = "${v.circleColor}"
|
|
805
|
+
`),u+=` }
|
|
806
|
+
`}else if(y===Lt.Range){const x=v;u+=`
|
|
807
|
+
range {
|
|
808
|
+
`,x.id&&(u+=` id = "${x.id}"
|
|
809
|
+
`),x.start!==void 0&&(u+=` start = ${typeof x.start=="string"?`"${x.start}"`:x.start}
|
|
810
|
+
`),x.end!==void 0&&(u+=` end = ${typeof x.end=="string"?`"${x.end}"`:x.end}
|
|
811
|
+
`),x.orientation&&(u+=` orientation = ${x.orientation}
|
|
812
|
+
`),x.startAnchor&&x.startAnchor!=="center"&&(u+=` startAnchor = ${x.startAnchor}
|
|
813
|
+
`),x.endAnchor&&x.endAnchor!=="center"&&(u+=` endAnchor = ${x.endAnchor}
|
|
814
|
+
`),x.bgColor&&(u+=` bgColor = "${x.bgColor}"
|
|
815
|
+
`),x.bgOpacity!==void 0&&(u+=` bgOpacity = ${x.bgOpacity}
|
|
816
|
+
`),x.direction&&(u+=` direction = ${x.direction}
|
|
817
|
+
`),x.text&&(u+=` text = "${x.text}"
|
|
818
|
+
`),x.textColor&&(u+=` textColor = "${x.textColor}"
|
|
819
|
+
`),u+=` }
|
|
820
|
+
`}else if(y===Lt.Free){const x=v;u+=`
|
|
821
|
+
note {
|
|
822
|
+
`,x.id&&(u+=` id = "${x.id}"
|
|
823
|
+
`),x.text&&(u+=` text = "${x.text}"
|
|
824
|
+
`),x.x!==void 0&&(u+=` x = ${uh(x.x)}
|
|
825
|
+
`),x.y!==void 0&&(u+=` y = ${uh(x.y)}
|
|
826
|
+
`),x.textColor&&(u+=` textColor = "${x.textColor}"
|
|
827
|
+
`),x.maxWidth!==void 0&&(u+=` maxWidth = ${Vu(x.maxWidth)}
|
|
828
|
+
`),x.textOutline!==void 0&&(u+=` textOutline = ${x.textOutline}
|
|
829
|
+
`),u+=` }
|
|
830
|
+
`}}if(m.annotationVisibility){const v={[Lt.Point]:"annotation",[Lt.Range]:"range",[Lt.Free]:"note"};for(const y of m.annotationVisibility)u+=` ${y.action}_${v[y.kind]} "${y.id}"
|
|
831
|
+
`}if(m.seriesOverrides)for(const v of m.seriesOverrides)v.name&&(u+=`
|
|
832
|
+
series "${v.name}" {
|
|
833
|
+
`,v.color&&(u+=` color = "${v.color}"
|
|
834
|
+
`),u+=` }
|
|
835
|
+
`);if(m.transforms)for(const v of m.transforms){u+=`
|
|
836
|
+
transform ${v.type} {
|
|
837
|
+
`;for(const[y,x]of Object.entries(v.config))x!==void 0&&x!==""&&(u+=` ${y} = "${x}"
|
|
838
|
+
`);u+=` }
|
|
839
|
+
`}u+=` }
|
|
840
|
+
`}return u+=`}
|
|
841
|
+
`,u}const c=De("");return N0(()=>{c.value=l()},{flush:"post"}),{dsl:c,compact:a,generateDsl:l}}function gc(t){return`data:image/svg+xml;base64,${globalThis.btoa(unescape(encodeURIComponent(t)))}`}function M$(){return document.documentElement.getAttribute("data-bs-theme")??"light"}const O$=t=>`blueprint-chart:${t}:thumbnail:${M$()}`,B$=t=>`blueprint-chart:${t}:preview:${M$()}`;function L$(t){for(const e of t.querySelectorAll("*")){if(!(e instanceof SVGElement))continue;const n=globalThis.getComputedStyle(e),o=n.fill;if(o&&o!=="none"){const i=e.getAttribute("fill");(!i||i==="currentColor"||i.startsWith("var("))&&e.setAttribute("fill",o)}const r=n.stroke;if(r&&r!=="none"){const i=e.getAttribute("stroke");(!i||i==="currentColor"||i.startsWith("var("))&&e.setAttribute("stroke",r)}}}function P$(t){const e=t.querySelector("svg");if(!e)return null;const n=e.getAttribute("width"),o=e.getAttribute("height");return n&&o&&!e.getAttribute("viewBox")&&e.setAttribute("viewBox",`0 0 ${n} ${o}`),e.removeAttribute("width"),e.removeAttribute("height"),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),L$(e),e.outerHTML}function aoe(t){const e=t.querySelector(".bc-frame");if(!e)return null;const n=e.querySelector("svg");if(!n)return null;const o=e.getBoundingClientRect(),r=globalThis.getComputedStyle(e).backgroundColor||"#ffffff",i=[],s=".bc-frame-title, .bc-frame-description, .bc-frame-byline, .bc-frame-source, .bc-frame-credit";for(const x of e.querySelectorAll(s)){const _=x.getBoundingClientRect();if(_.width===0)continue;const S=globalThis.getComputedStyle(x);i.push({text:x.textContent??"",x:_.left-o.left,y:_.top-o.top+parseFloat(S.fontSize),fontSize:parseFloat(S.fontSize),fontWeight:S.fontWeight,fontFamily:S.fontFamily,fill:S.color,fontStyle:S.fontStyle!=="normal"?S.fontStyle:void 0})}const a=n.getBoundingClientRect(),l=a.left-o.left,c=a.top-o.top,u=a.width,d=a.height;L$(n);const f=n.cloneNode(!0);f.removeAttribute("width"),f.removeAttribute("height");const g=new XMLSerializer().serializeToString(f),b=Math.ceil(o.width),m=Math.ceil(o.height),v=x=>x.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),y=i.map(x=>`<text x="${x.x}" y="${x.y}" font-size="${x.fontSize}px" font-weight="${x.fontWeight}" font-family="${v(x.fontFamily)}" fill="${x.fill}"${x.fontStyle?` font-style="${x.fontStyle}"`:""}>${v(x.text)}</text>`).join(`
|
|
842
|
+
`);return[`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 ${b} ${m}">`,` <rect width="100%" height="100%" fill="${r}" />`,` ${y}`,` <g transform="translate(${l},${c})">`,` <svg width="${u}" height="${d}"${f.getAttribute("viewBox")?` viewBox="${f.getAttribute("viewBox")}"`:""}>`,g.replace(/^<svg[^>]*>/,"").replace(/<\/svg>$/,"")," </svg>"," </g>","</svg>"].join(`
|
|
843
|
+
`)}function _2(t,e,n,o,r,i){const s=document.createElement("div"),a=n?`height:${n}px;`:"";s.style.cssText=`position:fixed;left:-9999px;top:0;width:${e}px;${a}overflow:hidden;`,s.id=t,i!=null&&i.forceLightTheme&&s.setAttribute("data-bs-theme","light");const l=document.createElement("style");l.textContent=o,document.head.appendChild(l),document.body.appendChild(s);try{return r(s)}finally{document.body.removeChild(s),document.head.removeChild(l)}}function loe(t){const e=t.match(/allowDarkMode\s*=\s*(true|false)/);return e?e[1]==="true":!0}const D$=600,S2=400,E$=[`#__bc_thumb .bc-frame { height:${S2}px; display:flex; flex-direction:column; }`,"#__bc_thumb .bc-frame-header, #__bc_thumb .bc-frame-footer { display:none; }","#__bc_thumb .bc-frame-body { flex:1; min-height:0; }"].join(`
|
|
844
|
+
`);function I$(t){return document.documentElement.getAttribute("data-bs-theme")==="dark"&&!loe(t)}function N$(t){const e=I$(t);return _2("__bc_thumb",D$,S2,E$,n=>(y$(n,t,{thumbnail:!0}),P$(n)),{forceLightTheme:e})}function k2(t,e,n,o,r){return e.labels.length===0?null:_2("__bc_thumb",D$,S2,E$,i=>(b2(i,{chartType:t,data:e,options:n,sort:o,colorizes:r==null?void 0:r.colorizes,seriesOverrides:r==null?void 0:r.seriesOverrides},{thumbnail:!0}),P$(i)))}const coe=600,uoe=500,doe=["#__bc_preview .bc-frame { display:flex; flex-direction:column; }",`#__bc_preview .bc-frame-body { height:${uoe}px; min-height:0; }`].join(`
|
|
845
|
+
`);function R$(t){const e=I$(t);return _2("__bc_preview",coe,null,doe,n=>(y$(n,t,{padding:"12px"}),aoe(n)),{forceLightTheme:e})}function z1(t){return localStorage.getItem(O$(t))}function H1(t,e){localStorage.setItem(O$(t),e)}function F$(t){localStorage.removeItem(`blueprint-chart:${t}:thumbnail:light`),localStorage.removeItem(`blueprint-chart:${t}:thumbnail:dark`),localStorage.removeItem(`blueprint-chart:${t}:thumbnail`)}function foe(t){return localStorage.getItem(B$(t))}function V$(t,e){localStorage.setItem(B$(t),e)}function hoe(t){localStorage.removeItem(`blueprint-chart:${t}:preview:light`),localStorage.removeItem(`blueprint-chart:${t}:preview:dark`),localStorage.removeItem(`blueprint-chart:${t}:preview`)}function z$(t){return t.trimStart().startsWith("{")}function H$(t){if(!z$(t))return N$(t);const e=JSON.parse(t);if(!e.chartConfig)return null;const{chartConfig:n,chartTypeOptions:o}=e,r=Qs(n.data),i=[Le.BarVertical,Le.BarHorizontal,Le.Line,Le.VerticalBar,Le.HorizontalBar];if(r.series&&r.series.length>0&&i.includes(n.chartType)){const a=r.series.find(l=>l.name===n.selectedColumn);a&&(r.values=a.values),delete r.series}const s=(o??{})[n.chartType]??{};return k2(n.chartType,r,s,n.sort)}function poe(t){return z$(t)?H$(t):R$(t)}function moe(){const t=pn(),{currentOptions:e}=kn(),{sessionId:n}=Vs();if(!n.value||!t.data.value)return;const o=Qs(t.data.value),r=[Le.BarVertical,Le.BarHorizontal,Le.Line,Le.VerticalBar,Le.HorizontalBar];if(o.series&&o.series.length>0&&r.includes(t.chartType.value)){const l=o.series.find(c=>c.name===t.selectedColumn.value);l&&(o.values=l.values),delete o.series}const i=k2(t.chartType.value,o,e.value,t.sort.value,{colorizes:t.colorizes.value.length>0?t.colorizes.value:void 0,seriesOverrides:t.seriesOverrides.value.length>0?t.seriesOverrides.value:void 0});i&&H1(n.value,i);const{generateDsl:s}=Tf(),a=s();if(a){const l=R$(a);l&&V$(n.value,l)}}const f6="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function qh(){let t="";for(let e=0;e<11;e++)t+=f6[Math.floor(Math.random()*f6.length)];return t}function hv(t){return`blueprint-chart:${t}`}function dh(t){return`blueprint-chart:${t}:meta`}function h6(t){return t.trimStart().startsWith("{")}const goe=Po("chartSession",()=>{const t=De(""),e=De(null),n=pn(),o=Zo(),r=Or(),i=kn(),s=_n();function a(){if(!t.value)return;const{generateDsl:_}=Tf();localStorage.setItem(hv(t.value),_());const S=new Date().toISOString(),E={savedAt:S};o.sourceFormat.value==="delimited"&&o.rawInput.value&&(E.rawInput=o.rawInput.value,E.sourceLabel=o.sourceLabel.value,E.sourceFormat="delimited"),localStorage.setItem(dh(t.value),JSON.stringify(E)),e.value=S}function l(_){const S=localStorage.getItem(hv(_));if(!S)return!1;try{if(h6(S)){const P=JSON.parse(S);if(P.chartConfig)return c(_,P)}const{applyDsl:E}=Mc();if(!E(S).success)return!1;const C=localStorage.getItem(dh(_));let O;return C&&(O=JSON.parse(C),O.sourceFormat==="delimited"&&O.rawInput&&(o.rawInput.value=O.rawInput,o.sourceFormat.value="delimited",O.sourceLabel&&(o.sourceLabel.value=O.sourceLabel))),t.value=_,e.value=(O==null?void 0:O.savedAt)??null,!0}catch{return!1}}function c(_,S){try{return n.hydrate(S.chartConfig),S.dataTable&&o.hydrate(S.dataTable),t.value=_,!0}catch{return!1}}function u(){n.reset(),o.reset(),r.reset(),i.reset(),s.reset(),t.value=""}function d(){u(),e.value=null}function f(){return t.value=qh(),a(),v(),t.value}function h(){u(),t.value=qh()}function g(_){o.rawInput.value=_.tsvData;const S=V1(_.tsvData);o.loadParsed(S),n.data.value=o.serialize();const{applyDsl:E}=Mc();E(_.dsl)}function b(_){return l(_)}function m(_){if(!_)return null;try{qm(_)}catch{return null}u();const{applyDsl:S}=Mc();return S(_).success?(t.value=qh(),a(),v(),t.value):(u(),null)}function v(){Ve([n.chartType,n.title,n.description,n.byline,n.note,n.source,n.sourceUrl,n.sort,n.data,n.selectedColumn,n.colorizes,n.highlights,n.areaFills,n.annotations,n.seriesOverrides,n.layout,o.columns,o.rows,o.rawInput,o.columnTypes,r.steps,s.scenes,s.activeIndex,()=>i.store],a,{deep:!0,flush:"post"})}function y(){var E;const _=[],S="blueprint-chart:";for(let M=0;M<localStorage.length;M++){const C=localStorage.key(M);if(!C||!C.startsWith(S))continue;const O=C.slice(S.length);if(O.includes(":"))continue;const P=localStorage.getItem(C);if(P)try{if(h6(P)){const ie=JSON.parse(P);if(ie.chartConfig){_.push({id:O,title:ie.chartConfig.title||"",description:ie.chartConfig.description||"",chartType:ie.chartConfig.chartType||"",savedAt:ie.savedAt??null,sceneCount:((E=ie.chartConfig.scenes)==null?void 0:E.length)??0,rowCount:ie.chartConfig.data?ie.chartConfig.data.split(`
|
|
846
|
+
`).filter(ue=>ue.trim()).length-1:0,allowDarkMode:ie.chartConfig.allowDarkMode??!0});continue}}const R=P.match(/title\s*=\s*"([^"]*)"/),$=P.match(/description\s*=\s*"([^"]*)"/),A=P.match(/^chart\s+(\S+)/),L=P.match(/\bscene\s+"/g),B=P.match(/data\s*\{([^}]*)\}/),F=B?B[1].split(`
|
|
847
|
+
`).filter(ie=>ie.trim()&&ie.includes("=")).length:0,z=P.match(/allowDarkMode\s*=\s*(true|false)/),V=localStorage.getItem(dh(O)),U=V?JSON.parse(V).savedAt??null:null;_.push({id:O,title:(R==null?void 0:R[1])??"",description:($==null?void 0:$[1])??"",chartType:(A==null?void 0:A[1])??"",savedAt:U,sceneCount:(L==null?void 0:L.length)??0,rowCount:F,allowDarkMode:z?z[1]==="true":!0})}catch{}}return _.sort((M,C)=>!M.savedAt&&!C.savedAt?0:M.savedAt?C.savedAt?C.savedAt.localeCompare(M.savedAt):-1:1),_}function x(_){localStorage.removeItem(hv(_)),localStorage.removeItem(dh(_)),F$(_)}return{sessionId:t,lastSavedAt:e,save:a,load:l,prepareNew:d,createSession:f,newChart:h,loadSample:g,loadChart:b,createFromDsl:m,startAutoSave:v,listSavedCharts:y,deleteChart:x}});function Vs(){const t=goe(),{sessionId:e,lastSavedAt:n}=At(t);return{sessionId:e,lastSavedAt:n,save:t.save,load:t.load,prepareNew:t.prepareNew,createSession:t.createSession,newChart:t.newChart,loadSample:t.loadSample,loadChart:t.loadChart,createFromDsl:t.createFromDsl,startAutoSave:t.startAutoSave,listSavedCharts:t.listSavedCharts,deleteChart:t.deleteChart}}const W1=260,p6=660,W$=220,voe=W1+W$,U1=.22,wu=Po("panel",()=>{const t=De("docked"),e=De(U1),n=De("docked"),o=De(!1),r=De(!1);function i(){t.value="docked",o.value||(n.value="docked")}function s(){t.value="closed",o.value||(n.value="closed")}function a(){t.value==="closed"&&(t.value="docked",o.value||(n.value="docked"))}function l(){t.value!=="drawer"&&(n.value=t.value),t.value="drawer"}function c(){t.value=n.value}function u(){t.value==="docked"?s():t.value==="closed"&&(t.value="docked",o.value||(n.value="docked"))}function d(m){if(!Number.isFinite(m)||m<=0){e.value=U1;return}e.value=Math.min(1,m)}function f(m){o.value=m,m?t.value!=="drawer"&&(t.value="drawer"):t.value==="drawer"&&(t.value=n.value)}function h(m){o.value!==m&&(o.value=m,m?(t.value!=="drawer"&&(n.value=t.value),t.value="drawer"):t.value=n.value)}function g(m){r.value=m,m&&t.value!=="closed"&&t.value!=="drawer"&&(t.value="closed")}function b(m){r.value!==m&&(r.value=m,!o.value&&(m?(t.value!=="closed"&&t.value!=="drawer"&&(n.value=t.value),t.value="closed"):t.value==="closed"&&(t.value=n.value)))}return{mode:t,dockedWidth:e,lastDesktopMode:n,narrow:o,cramped:r,dock:i,close:s,open:a,openDrawer:l,closeDrawer:c,toggleMode:u,setDockedWidth:d,initBreakpoint:f,syncBreakpoint:h,initCramped:g,syncCramped:b}},{persist:{key:"blueprint-chart:panel:v3",pick:["mode","dockedWidth","lastDesktopMode"]}});function Zl(){const t=wu(),{mode:e,dockedWidth:n,lastDesktopMode:o,narrow:r,cramped:i}=At(t);return{mode:e,dockedWidth:n,lastDesktopMode:o,narrow:r,cramped:i,dock:t.dock,close:t.close,open:t.open,openDrawer:t.openDrawer,closeDrawer:t.closeDrawer,toggleMode:t.toggleMode,setDockedWidth:t.setDockedWidth,initBreakpoint:t.initBreakpoint,syncBreakpoint:t.syncBreakpoint,initCramped:t.initCramped,syncCramped:t.syncCramped}}const boe=Po("dashboardPanel",()=>{const t=De(null);function e(o){if(t.value===o){t.value=null;return}t.value=o;const r=wu();r.mode==="closed"&&r.open()}function n(){t.value=null}return{selectedChartId:t,selectChart:e,reset:n}});function U$(){const t=boe(),{selectedChartId:e}=At(t);return{selectedChartId:e,selectChart:t.selectChart,reset:t.reset}}function G$(){const{listSavedCharts:t,deleteChart:e}=Vs(),{selectedChartId:n}=U$(),{resolvedTheme:o}=vf(),r=Ie([]),i=ar({}),s=ar({}),a=De("date-desc"),l=k(()=>{const b=[...r.value];return a.value==="date-desc"?b.sort((m,v)=>(v.savedAt??"").localeCompare(m.savedAt??"")):a.value==="date-asc"?b.sort((m,v)=>(m.savedAt??"").localeCompare(v.savedAt??"")):a.value==="name-asc"&&b.sort((m,v)=>(m.title||"").localeCompare(v.title||"")),b}),c=k(()=>r.value.find(b=>b.id===n.value)??null);function u(){r.value=t(),d()}function d(){for(const b of r.value){const m=z1(b.id),v=foe(b.id);if(m&&(i[b.id]=gc(m)),v&&(s[b.id]=gc(v)),m&&v)continue;const y=localStorage.getItem(`blueprint-chart:${b.id}`);if(y)try{if(!m){const x=H$(y);x&&(H1(b.id,x),i[b.id]=gc(x))}if(!v){const x=poe(y);x&&(V$(b.id,x),s[b.id]=gc(x))}}catch{}}}function f(b){const m=localStorage.getItem(`blueprint-chart:${b}`);if(!m)return null;const v=qh();localStorage.setItem(`blueprint-chart:${v}`,m);const y=localStorage.getItem(`blueprint-chart:${b}:meta`);y&&localStorage.setItem(`blueprint-chart:${v}:meta`,y);const x=z1(b);return x&&H1(v,x),u(),v}function h(b){n.value=null,e(b),delete i[b],delete s[b],u()}function g(){for(const b of r.value)F$(b.id),hoe(b.id),delete i[b.id],delete s[b.id];d()}return Ve(o,()=>{g()}),{charts:r,sortedCharts:l,selectedChart:c,thumbnails:i,previews:s,sortValue:a,refresh:u,duplicateChart:f,removeChart:h}}const yoe={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function xoe(t,e){return w(),N("svg",yoe,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m219.31 108.68l-80-80a16 16 0 0 0-22.62 0l-80 80A15.87 15.87 0 0 0 32 120v96a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-56h32v56a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8v-96a15.87 15.87 0 0 0-4.69-11.32M208 208h-48v-56a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v56H48v-88l80-80l80 80Z"},null,-1)])])}const woe=Te({name:"ph-house",render:xoe}),_oe={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Soe(t,e){return w(),N("svg",_oe,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M104 40H56a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 64H56V56h48zm96-64h-48a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 64h-48V56h48zm-96 32H56a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16v-48a16 16 0 0 0-16-16m0 64H56v-48h48zm96-64h-48a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h48a16 16 0 0 0 16-16v-48a16 16 0 0 0-16-16m0 64h-48v-48h48z"},null,-1)])])}const q$=Te({name:"ph-squares-four",render:Soe}),koe={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Coe(t,e){return w(),N("svg",koe,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M208.31 75.68A59.78 59.78 0 0 0 202.93 28a8 8 0 0 0-6.93-4a59.75 59.75 0 0 0-48 24h-24a59.75 59.75 0 0 0-48-24a8 8 0 0 0-6.93 4a59.78 59.78 0 0 0-5.38 47.68A58.14 58.14 0 0 0 56 104v8a56.06 56.06 0 0 0 48.44 55.47A39.8 39.8 0 0 0 96 192v8H72a24 24 0 0 1-24-24a40 40 0 0 0-40-40a8 8 0 0 0 0 16a24 24 0 0 1 24 24a40 40 0 0 0 40 40h24v16a8 8 0 0 0 16 0v-40a24 24 0 0 1 48 0v40a8 8 0 0 0 16 0v-40a39.8 39.8 0 0 0-8.44-24.53A56.06 56.06 0 0 0 216 112v-8a58.14 58.14 0 0 0-7.69-28.32M200 112a40 40 0 0 1-40 40h-48a40 40 0 0 1-40-40v-8a41.74 41.74 0 0 1 6.9-22.48a8 8 0 0 0 1.1-7.69a43.8 43.8 0 0 1 .79-33.58a43.88 43.88 0 0 1 32.32 20.06a8 8 0 0 0 6.71 3.69h32.35a8 8 0 0 0 6.74-3.69a43.87 43.87 0 0 1 32.32-20.06a43.8 43.8 0 0 1 .77 33.58a8.09 8.09 0 0 0 1 7.65a41.7 41.7 0 0 1 7 22.52Z"},null,-1)])])}const Aoe=Te({name:"ph-github-logo",render:Coe}),$oe={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Toe(t,e){return w(),N("svg",$oe,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M232 48h-72a40 40 0 0 0-32 16a40 40 0 0 0-32-16H24a8 8 0 0 0-8 8v144a8 8 0 0 0 8 8h72a24 24 0 0 1 24 24a8 8 0 0 0 16 0a24 24 0 0 1 24-24h72a8 8 0 0 0 8-8V56a8 8 0 0 0-8-8M96 192H32V64h64a24 24 0 0 1 24 24v112a39.8 39.8 0 0 0-24-8m128 0h-64a39.8 39.8 0 0 0-24 8V88a24 24 0 0 1 24-24h64Z"},null,-1)])])}const Moe=Te({name:"ph-book-open",render:Toe}),Ooe={class:"layout-sidebar__header"},Boe=se({__name:"LayoutSidebar",setup(t){const e=Wl(),{sortedCharts:n}=G$(),{resolvedTheme:o}=vf(),r=k(()=>n.value.slice(0,5)),i=k(()=>e.path==="/"),s=k(()=>e.path.startsWith("/charts")),a=k(()=>o.value==="dark"?CC:kC);return(l,c)=>(w(),Q(p(AW),{"aria-label":"Workspace navigation"},{header:J(()=>[T("div",Ooe,[H(p(pC),{name:"Blueprint Chart","logo-src":a.value,to:"/"},null,8,["logo-src"]),Ce(l.$slots,"trailing",{},void 0,!0)])]),default:J(()=>[H(p(Wg),{eyebrow:"Workspace"},{default:J(()=>[H(p(Ru),{to:"/",label:"Home",active:i.value},{icon:J(()=>[H(p(woe))]),_:1},8,["active"]),H(p(Ru),{to:"/charts",label:"My Charts",active:s.value,count:p(n).length||void 0},{icon:J(()=>[H(p(q$))]),_:1},8,["active","count"])]),_:1}),r.value.length?(w(),Q(p(Wg),{key:0,eyebrow:"Recent"},{default:J(()=>[(w(!0),N(Re,null,mt(r.value,u=>(w(),Q(p(Ru),{key:u.id,to:`/edit/${u.id}`,label:u.title||"Untitled"},null,8,["to","label"]))),128))]),_:1})):re("",!0),H(p(Wg),{eyebrow:"Resources"},{default:J(()=>[H(p(Ru),{href:"https://docs.blueprintchart.com",label:"Documentation"},{icon:J(()=>[H(p(Moe))]),_:1}),H(p(Ru),{href:"https://github.com/blueprint-chart/blueprint-chart",label:"GitHub"},{icon:J(()=>[H(p(Aoe))]),_:1})]),_:1})]),_:3}))}}),m6=Be(Boe,[["__scopeId","data-v-34084162"]]),Loe={class:"command-palette-modal"},Poe={class:"command-palette-modal__input-row"},Doe={key:0,class:"command-palette-modal__results",role:"listbox","aria-label":"Chart results"},Eoe=["aria-selected","onClick","onMousemove"],Ioe=["src"],Noe={class:"command-palette-modal__meta"},Roe={class:"command-palette-modal__title"},Foe={class:"command-palette-modal__desc"},Voe={key:1,class:"command-palette-modal__empty"},zoe=se({__name:"CommandPaletteModal",props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:["update:open"],setup(t){const e=ft(t,"open"),n=fy(),o=Wl(),{listSavedCharts:r}=Vs(),i=Ie(""),s=Ie(0),a=pt("inputRef"),l=Ie([]),c=k(()=>{const m=i.value.trim().toLowerCase();return m?l.value.filter(v=>{var y,x;return((y=v.title)==null?void 0:y.toLowerCase().includes(m))||((x=v.description)==null?void 0:x.toLowerCase().includes(m))}):l.value.slice(0,5)}),u=k(()=>{const m={};for(const v of l.value){const y=z1(v.id);y&&(m[v.id]=gc(y))}return m});Ve(i,()=>{s.value=0}),Ve(()=>o.path,()=>{e.value&&(e.value=!1)}),Ve(e,m=>{m?l.value=r():(i.value="",s.value=0)},{immediate:!0});function d(){var m;(m=a.value)==null||m.focus()}function f(m){const v=c.value.length-1;if(v<0)return;let y=s.value+m;y<0&&(y=v),y>v&&(y=0),s.value=y}function h(){const m=c.value[s.value];m&&g(m.id)}function g(m){e.value=!1,n.push(`/edit/${m}`)}function b(m){return{"command-palette-modal__result":!0,"command-palette-modal__result--active":m===s.value}}return(m,v)=>(w(),Q(p(jD),{modelValue:e.value,"onUpdate:modelValue":v[4]||(v[4]=y=>e.value=y),size:"lg",centered:"","no-header":"","no-footer":"",autofocus:!1,"body-class":"command-palette-modal__body","no-close-on-esc":"",onShown:d},{default:J(()=>[T("div",Loe,[T("div",Poe,[H(p(Ay),{class:"command-palette-modal__icon"}),H(p(qs),{ref_key:"inputRef",ref:a,modelValue:p(i),"onUpdate:modelValue":v[0]||(v[0]=y=>Ke(i)?i.value=y:null),"aria-label":"Search charts",placeholder:"Search charts…",autofocus:"",onKeydown:[v[1]||(v[1]=nr(gn(y=>e.value=!1,["prevent"]),["escape"])),v[2]||(v[2]=nr(gn(y=>f(1),["prevent"]),["down"])),v[3]||(v[3]=nr(gn(y=>f(-1),["prevent"]),["up"])),nr(gn(h,["prevent"]),["enter"])]},null,8,["modelValue","onKeydown"])]),p(c).length>0?(w(),N("div",Doe,[(w(!0),N(Re,null,mt(p(c),(y,x)=>(w(),N("div",{key:y.id,class:$e(b(x)),role:"option",tabindex:"-1","aria-selected":x===p(s),onClick:_=>g(y.id),onMousemove:_=>s.value=x},[p(u)[y.id]?(w(),N("img",{key:0,src:p(u)[y.id],class:"command-palette-modal__thumb",alt:""},null,8,Ioe)):re("",!0),T("div",Noe,[T("span",Roe,ye(y.title||"Untitled"),1),T("span",Foe,ye(y.description),1)])],42,Eoe))),128))])):p(i).trim()?(w(),N("div",Voe,' No charts match "'+ye(p(i))+'" ',1)):re("",!0)])]),_:1},8,["modelValue"]))}}),g6=Be(zoe,[["__scopeId","data-v-09e7b11e"]]);function Hoe(){const{isNarrow:t}=qi(),e=wu();e.initBreakpoint(t.value),Ve(t,n=>{e.syncBreakpoint(n)})}const Woe={key:0,class:"layout-shell layout-shell--landing"},Uoe={key:1,class:"layout-shell layout-shell--app"},Goe={class:"layout-shell__sidebar"},qoe={class:"layout-shell__topbar"},Yoe={class:"layout-shell__main"},joe=se({__name:"LayoutShell",setup(t){Hoe();const e=Wl(),n=k(()=>e.path==="/"),o=De(!1),r=_C("k"),{isNarrow:i}=qi("xl"),s=Ie(!1);return Ve(()=>e.fullPath,()=>{s.value=!1}),Ve(i,a=>{a||(s.value=!1)}),Bs(document,"keydown",a=>{r.matches(a)&&(a.preventDefault(),o.value=!0)}),(a,l)=>{const c=QD;return n.value?(w(),N("div",Woe,[Ce(a.$slots,"default",{},void 0,!0),H(g6,{open:o.value,"onUpdate:open":l[0]||(l[0]=u=>o.value=u)},null,8,["open"])])):(w(),N("div",Uoe,[T("aside",Goe,[H(m6)]),T("div",qoe,[H(ZG,{"sidebar-open":s.value,onSearchClick:l[1]||(l[1]=u=>o.value=!0),onToggleSidebar:l[2]||(l[2]=u=>s.value=!s.value)},null,8,["sidebar-open"])]),T("main",Yoe,[Ce(a.$slots,"default",{},void 0,!0)]),p(i)?(w(),Q(c,{key:0,id:"layout-sidebar-offcanvas",modelValue:s.value,"onUpdate:modelValue":l[4]||(l[4]=u=>s.value=u),placement:"start","no-header":"","aria-label":"Workspace navigation",class:"layout-shell__sidebar-offcanvas"},{default:J(()=>[H(m6,null,{trailing:J(()=>[H(p(dC),{onClick:l[3]||(l[3]=u=>s.value=!1)})]),_:1})]),_:1},8,["modelValue"])):re("",!0),H(g6,{open:o.value,"onUpdate:open":l[5]||(l[5]=u=>o.value=u)},null,8,["open"])]))}}}),Xoe=Be(joe,[["__scopeId","data-v-e550b95e"]]),Koe=se({__name:"App",setup(t){const e=Wl();return(n,o)=>{const r=z0("router-view"),i=Xoe;return p(e).meta.bare?(w(),Q(r,{key:0})):(w(),Q(i,{key:1},{default:J(()=>[H(r)]),_:1}))}}}),Zoe="modulepreload",Qoe=function(t){return"/"+t},v6={},b6=function(e,n,o){let r=Promise.resolve();if(n&&n.length>0){let s=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=s(n.map(c=>{if(c=Qoe(c),c in v6)return;v6[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Zoe,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return r.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})},Joe=se({__name:"PanelDocked",props:nt({collapsed:{type:Boolean},title:{},initialWidth:{default:U1},showClose:{type:Boolean,default:!0},canvasWidth:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:nt(["close"],["update:modelValue"]),setup(t){const e=t,n=ft(t,"modelValue"),o=De(n.value??e.initialWidth);Ve(n,u=>{u!==void 0&&(o.value=u)});const r=De(!1),{width:i}=JI(),s=k(()=>({"panel-docked--collapsed":e.collapsed,"panel-docked--resizing":r.value})),a=k(()=>e.canvasWidth===void 0||e.canvasWidth<=0?p6:Math.min(p6,e.canvasWidth-W$)),l=k(()=>{const u=o.value*i.value;return Math.max(W1,Math.min(u,a.value))});function c(u){const d=u.clientX,f=o.value*i.value,h=u.currentTarget;h.setPointerCapture(u.pointerId),r.value=!0;function g(m){const v=d-m.clientX,y=f+v,x=Math.min(a.value,Math.max(W1,y)),_=i.value||window.innerWidth;o.value=_>0?x/_:o.value,n.value=o.value}function b(){r.value=!1,h.removeEventListener("pointermove",g),h.removeEventListener("pointerup",b)}h.addEventListener("pointermove",g),h.addEventListener("pointerup",b)}return(u,d)=>(w(),N("div",{class:$e(["panel-docked",p(s)]),style:Pt({width:t.collapsed?void 0:`${p(l)}px`})},[T("div",{class:"panel-docked__resize-handle",onPointerdown:c},null,32),H(p(ZH),{title:t.title},hi({actions:J(()=>[t.showClose?(w(),Q(p(dC),{key:0,onClick:d[0]||(d[0]=f=>u.$emit("close"))})):re("",!0)]),default:J(()=>[Ce(u.$slots,"default",{},void 0,!0)]),_:2},[u.$slots.toolbar?{name:"toolbar",fn:J(()=>[Ce(u.$slots,"toolbar",{},void 0,!0)]),key:"0"}:void 0,u.$slots.footer?{name:"footer",fn:J(()=>[Ce(u.$slots,"footer",{},void 0,!0)]),key:"1"}:void 0]),1032,["title"])],6))}}),ere=Be(Joe,[["__scopeId","data-v-02f78f79"]]),tre={class:"panel-drawer__body"},nre=se({__name:"PanelDrawer",props:nt({title:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue");return(n,o)=>(w(),Q(p(fC),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=r=>e.value=r),title:t.title},{default:J(()=>[Ce(n.$slots,"header",{},void 0,!0),T("div",tre,[Ce(n.$slots,"default",{},void 0,!0)])]),_:3},8,["modelValue","title"]))}}),ore=Be(nre,[["__scopeId","data-v-46314d76"]]);function rre(t){const{width:e}=UI(t),n=wu(),o=k(()=>e.value>0&&e.value<voe);return n.initCramped(o.value),Ve(o,r=>{n.syncCramped(r)}),{canvasWidth:e}}const Xm=se({__name:"PanelShell",props:nt({title:{},containerRef:{default:null},showClose:{type:Boolean,default:!0}},{drawerOpen:{type:Boolean,default:!1},drawerOpenModifiers:{}}),emits:nt(["close"],["update:drawerOpen"]),setup(t,{emit:e}){const n=t,o=e,r=ft(t,"drawerOpen"),i=wu(),{mode:s,dockedWidth:a}=At(i),{close:l}=i,c=k(()=>{var f;return((f=n.containerRef)==null?void 0:f.parentElement)??null}),{canvasWidth:u}=rre(c);function d(){l(),o("close")}return(f,h)=>{const g=ore,b=ere;return p(s)==="drawer"?(w(),Q(g,{key:0,modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=m=>r.value=m),title:t.title},hi({default:J(()=>[Ce(f.$slots,"default")]),_:2},[f.$slots.tabs||f.$slots.header?{name:"header",fn:J(()=>[Ce(f.$slots,"tabs"),Ce(f.$slots,"header")]),key:"0"}:void 0]),1032,["modelValue","title"])):p(s)==="docked"?(w(),Q(b,{key:1,modelValue:p(a),"onUpdate:modelValue":h[1]||(h[1]=m=>Ke(a)?a.value=m:null),collapsed:!1,title:t.title,"show-close":t.showClose,"canvas-width":p(u),onClose:d},hi({default:J(()=>[Ce(f.$slots,"default")]),_:2},[f.$slots.header?{name:"toolbar",fn:J(()=>[Ce(f.$slots,"header")]),key:"0"}:void 0,f.$slots.footer?{name:"footer",fn:J(()=>[Ce(f.$slots,"footer")]),key:"1"}:void 0]),1032,["modelValue","title","show-close","canvas-width"])):re("",!0)}}}),ire={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function sre(t,e){return w(),N("svg",ire,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M88 24v-8a8 8 0 0 1 16 0v8a8 8 0 0 1-16 0m-72 80h8a8 8 0 0 0 0-16h-8a8 8 0 0 0 0 16m108.42-64.84a8 8 0 0 0 10.74-3.58l8-16a8 8 0 0 0-14.31-7.16l-8 16a8 8 0 0 0 3.57 10.74m-96 81.69l-16 8a8 8 0 0 0 7.16 14.31l16-8a8 8 0 1 0-7.16-14.31M219.31 184a16 16 0 0 1 0 22.63l-12.68 12.68a16 16 0 0 1-22.63 0L132.7 168L115 214.09c0 .1-.08.21-.13.32a15.83 15.83 0 0 1-14.6 9.59h-.79a15.83 15.83 0 0 1-14.41-11L32.8 52.92A16 16 0 0 1 52.92 32.8L213 85.07a16 16 0 0 1 1.41 29.8l-.32.13L168 132.69ZM208 195.31L156.69 144a16 16 0 0 1 4.93-26l.32-.14l45.95-17.64L48 48l52.2 159.86l17.65-46c0-.11.08-.22.13-.33a16 16 0 0 1 11.69-9.34a16.7 16.7 0 0 1 3-.28a16 16 0 0 1 11.3 4.69l51.34 51.4Z"},null,-1)])])}const Y$=Te({name:"ph-cursor-click",render:sre}),are={class:"dashboard-empty-state"},lre=se({__name:"DashboardEmptyState",setup(t){return(e,n)=>(w(),N("div",are,[H(p(Y$),{class:"dashboard-empty-state__icon"}),n[0]||(n[0]=T("p",{class:"dashboard-empty-state__text"}," Select a chart to see its details ",-1))]))}}),cre=Be(lre,[["__scopeId","data-v-f6c24334"]]),ure={class:"dashboard-action-row__label"},dre={key:0,class:"dashboard-action-row__description"},fre=se({__name:"DashboardActionRow",props:{icon:{},label:{},description:{},danger:{type:Boolean}},emits:["click"],setup(t){const e=t,n=k(()=>({"dashboard-action-row--danger":e.danger}));return(o,r)=>(w(),N("button",{class:$e(["dashboard-action-row",p(n)]),onClick:r[0]||(r[0]=i=>o.$emit("click"))},[(w(),Q(Gt(t.icon),{class:"dashboard-action-row__icon"})),T("div",null,[T("div",ure,ye(t.label),1),t.description?(w(),N("div",dre,ye(t.description),1)):re("",!0)])],2))}}),hre=Be(fre,[["__scopeId","data-v-0f47d7d3"]]),pre={class:"dashboard-detail-actions"},mre={class:"dashboard-detail-actions__list"},gre=se({__name:"DashboardDetailActions",emits:["duplicate","delete"],setup(t){return(e,n)=>{const o=hre;return w(),N("div",pre,[n[2]||(n[2]=T("div",{class:"dashboard-detail-actions__title"}," Actions ",-1)),T("div",mre,[H(o,{icon:p(V4),label:"Duplicate",description:"Create a copy to edit",onClick:n[0]||(n[0]=r=>e.$emit("duplicate"))},null,8,["icon"]),H(o,{icon:p(gC),label:"Delete chart",description:"This cannot be undone",danger:"",onClick:n[1]||(n[1]=r=>e.$emit("delete"))},null,8,["icon"])])])}}}),vre=Be(gre,[["__scopeId","data-v-de396b53"]]),bre={class:"dashboard-meta-chip"},yre={class:"dashboard-meta-chip__label"},xre={class:"dashboard-meta-chip__value"},wre=se({__name:"DashboardMetaChip",props:{label:{},value:{}},setup(t){return(e,n)=>(w(),N("div",bre,[T("div",yre,ye(t.label),1),T("div",xre,ye(t.value),1)]))}}),_re=Be(wre,[["__scopeId","data-v-a1903aff"]]),Sre={class:"dashboard-detail-meta"},kre={class:"dashboard-detail-meta__grid"},Cre=se({__name:"DashboardDetailMeta",props:{chartType:{},savedAt:{},sceneCount:{},rowCount:{}},setup(t){const e=t,n=k(()=>lC(e.chartType)),o=k(()=>{if(!e.savedAt)return"—";const r=new Date(e.savedAt);return Number.isNaN(r.getTime())?e.savedAt:r.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})});return(r,i)=>{const s=_re;return w(),N("div",Sre,[i[0]||(i[0]=T("div",{class:"dashboard-detail-meta__title"}," Details ",-1)),T("div",kre,[H(s,{label:"Chart type",value:p(n)},null,8,["value"]),H(s,{label:"Last edited",value:p(o)},null,8,["value"]),H(s,{label:"Scenes",value:String(t.sceneCount)},null,8,["value"]),H(s,{label:"Data rows",value:String(t.rowCount)},null,8,["value"])])])}}}),Are=Be(Cre,[["__scopeId","data-v-533a4b72"]]),$re=["data-bs-theme"],Tre=["src"],Mre=se({__name:"DashboardDetailPreview",props:{src:{},forceLightTheme:{type:Boolean}},setup(t){return(e,n)=>t.src?(w(),N("div",{key:0,class:"dashboard-detail-preview","data-bs-theme":t.forceLightTheme?"light":void 0},[T("img",{src:t.src,alt:"",class:"dashboard-detail-preview__img"},null,8,Tre)],8,$re)):re("",!0)}}),Ore=Be(Mre,[["__scopeId","data-v-ddbd95be"]]),Bre={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Lre(t,e){return w(),N("svg",Bre,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m227.31 73.37l-44.68-44.69a16 16 0 0 0-22.63 0L36.69 152A15.86 15.86 0 0 0 32 163.31V208a16 16 0 0 0 16 16h44.69a15.86 15.86 0 0 0 11.31-4.69L227.31 96a16 16 0 0 0 0-22.63M92.69 208H48v-44.69l88-88L180.69 120ZM192 108.68L147.31 64l24-24L216 84.68Z"},null,-1)])])}const C2=Te({name:"ph-pencil-simple",render:Lre}),Pre={class:"dashboard-detail-content"},Dre={key:0,class:"dashboard-detail-content__subtitle"},Ere=se({__name:"DashboardDetailContent",props:{title:{},subtitle:{},previewSrc:{},forceLightTheme:{type:Boolean},chartType:{},savedAt:{},sceneCount:{},rowCount:{}},emits:["edit","duplicate","delete"],setup(t){return(e,n)=>{const o=Ore,r=Are,i=vre;return w(),N("div",Pre,[t.subtitle?(w(),N("div",Dre,ye(t.subtitle),1)):re("",!0),H(p(Kn),{"icon-left":p(C2),label:"Edit chart",variant:"primary",block:"",onClick:n[0]||(n[0]=s=>e.$emit("edit"))},null,8,["icon-left"]),H(o,{src:t.previewSrc,"force-light-theme":t.forceLightTheme},null,8,["src","force-light-theme"]),H(r,{"chart-type":t.chartType,"saved-at":t.savedAt,"scene-count":t.sceneCount,"row-count":t.rowCount},null,8,["chart-type","saved-at","scene-count","row-count"]),H(i,{onDuplicate:n[1]||(n[1]=s=>e.$emit("duplicate")),onDelete:n[2]||(n[2]=s=>e.$emit("delete"))})])}}}),Ire=Be(Ere,[["__scopeId","data-v-3d8b1e29"]]),Nre=se({__name:"DashboardChartCard",props:{chart:{},thumbSrc:{},selected:{type:Boolean},layout:{}},emits:["select","edit"],setup(t){const{resolvedTheme:e}=vf();return(n,o)=>(w(),Q(p(uU),{title:t.chart.title||"Untitled",subtitle:t.chart.description,"thumb-src":t.thumbSrc,selected:t.selected,layout:t.layout,"force-light-thumb":!t.chart.allowDarkMode,"serif-title":!0,onClick:o[1]||(o[1]=r=>n.$emit("select",t.chart.id))},{actions:J(()=>[H(p(Kn),{"icon-left":p(C2),label:"Edit","hide-label":"",square:"",variant:"primary",size:"sm",class:"dashboard-chart-card__edit-btn",onClick:o[0]||(o[0]=r=>n.$emit("edit",t.chart.id))},null,8,["icon-left"])]),footer:J(()=>[H(p(nH),{"chart-type":t.chart.chartType,theme:p(e)},null,8,["chart-type","theme"]),t.chart.savedAt?(w(),Q(p(Rz),{key:0,value:t.chart.savedAt},null,8,["value"])):re("",!0)]),_:1},8,["title","subtitle","thumb-src","selected","layout","force-light-thumb"]))}}),Rre=se({__name:"DashboardNewCard",props:{layout:{default:"grid"}},emits:["click"],setup(t){const e=t,n=k(()=>({"dashboard-new-card--row":e.layout==="row"}));return(o,r)=>(w(),N("div",{class:$e(["dashboard-new-card",p(n)]),role:"button",tabindex:"0",onClick:r[0]||(r[0]=i=>o.$emit("click")),onKeydown:[r[1]||(r[1]=nr(i=>o.$emit("click"),["enter"])),r[2]||(r[2]=nr(gn(i=>o.$emit("click"),["prevent"]),["space"]))]},[H(p(xy),{class:"dashboard-new-card__icon"}),r[3]||(r[3]=T("span",{class:"dashboard-new-card__label"},"New Chart",-1))],34))}}),Fre=Be(Rre,[["__scopeId","data-v-ef746b42"]]),Vre=se({__name:"DashboardGallery",props:{charts:{},thumbnails:{},selectedId:{},layout:{}},emits:["select","edit","new"],setup(t){return(e,n)=>{const o=Fre,r=Nre;return w(),Q(p(fU),{layout:t.layout},{default:J(()=>[H(o,{layout:t.layout,onClick:n[0]||(n[0]=i=>e.$emit("new"))},null,8,["layout"]),(w(!0),N(Re,null,mt(t.charts,i=>(w(),Q(r,{key:i.id,chart:i,"thumb-src":t.thumbnails[i.id],selected:t.selectedId===i.id,layout:t.layout,onSelect:n[1]||(n[1]=s=>e.$emit("select",s)),onEdit:n[2]||(n[2]=s=>e.$emit("edit",s))},null,8,["chart","thumb-src","selected","layout"]))),128)),t.charts.length===0?(w(),Q(p(NH),{key:0,message:"No saved charts yet. Create a new chart to get started."})):re("",!0)]),_:1},8,["layout"])}}}),zre={},Hre={class:"layout-page-header"},Wre={class:"layout-page-header__start"},Ure={class:"layout-page-header__center"},Gre={class:"layout-page-header__end"};function qre(t,e){return w(),N("div",Hre,[T("div",Wre,[Ce(t.$slots,"start",{},void 0,!0)]),T("div",Ure,[Ce(t.$slots,"center",{},void 0,!0)]),T("div",Gre,[Ce(t.$slots,"end",{},void 0,!0)])])}const j$=Be(zre,[["render",qre],["__scopeId","data-v-c99b9b81"]]),Yre={key:0,class:"layout-breadcrumb","aria-label":"Breadcrumb"},jre=["aria-current"],Xre={key:2,class:"layout-breadcrumb__crumb-sep","aria-hidden":"true"},Kre=se({__name:"LayoutBreadcrumb",setup(t){const e=Wl(),n=pn(),o=k(()=>{const r=e.path;if(r.startsWith("/edit/")){const i=n._base.title.value||"Untitled";return[{label:"My Charts",to:"/charts"},{label:i}]}return r.startsWith("/charts")?[{label:"My Charts"}]:r==="/new"?[{label:"My Charts",to:"/charts"},{label:"New chart"}]:[]});return(r,i)=>{const s=z0("router-link");return o.value.length?(w(),N("nav",Yre,[(w(!0),N(Re,null,mt(o.value,(a,l)=>(w(),N(Re,{key:l},[a.to?(w(),Q(s,{key:0,to:a.to,class:"layout-breadcrumb__crumb"},{default:J(()=>[Ue(ye(a.label),1)]),_:2},1032,["to"])):(w(),N("span",{key:1,class:"layout-breadcrumb__crumb layout-breadcrumb__crumb--active","aria-current":l===o.value.length-1?"page":void 0},ye(a.label),9,jre)),l<o.value.length-1?(w(),N("span",Xre,"/")):re("",!0)],64))),128))])):re("",!0)}}}),X$=Be(Kre,[["__scopeId","data-v-73a5f2ae"]]),Zre={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Qre(t,e){return w(),N("svg",Zre,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M208 136H48a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16v-40a16 16 0 0 0-16-16m0 56H48v-40h160zm0-144H48a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16m0 56H48V64h160z"},null,-1)])])}const Jre=Te({name:"ph-rows",render:Qre}),eie={class:"dashboard-toolbar__count"},tie=se({__name:"DashboardToolbar",props:{chartCount:{},sortValue:{},layout:{}},emits:["update:sortValue","update:layout","new"],setup(t){const e=t,n=[{value:"date-desc",label:"Last edited"},{value:"date-asc",label:"Oldest first"},{value:"name-asc",label:"Name A–Z"}],o=k(()=>[{key:"grid",text:"Grid",icon:q$,active:e.layout==="grid"},{key:"row",text:"List",icon:Jre,active:e.layout==="row"}]);return(r,i)=>(w(),Q(j$,{class:"dashboard-toolbar"},{start:J(()=>[H(X$),T("span",eie,ye(t.chartCount)+" "+ye(t.chartCount===1?"chart":"charts"),1)]),end:J(()=>[H(p(hC),{items:p(o),"aria-label":"View layout",onSelect:i[0]||(i[0]=s=>r.$emit("update:layout",s))},null,8,["items"]),H(p(En),{"model-value":t.sortValue,options:n,"onUpdate:modelValue":i[1]||(i[1]=s=>r.$emit("update:sortValue",s))},null,8,["model-value"]),H(p(Kn),{"icon-left":p(xy),label:"New chart",variant:"primary",onClick:i[2]||(i[2]=s=>r.$emit("new"))},null,8,["icon-left"])]),_:1}))}}),nie=Be(tie,[["__scopeId","data-v-de771377"]]),oie={class:"dashboard-page-wrapper d-flex flex-column flex-grow-1"},rie=se({__name:"DashboardPage",setup(t){const e=fy(),{isNarrow:n}=qi(),{selectedChartId:o,selectChart:r}=U$(),{mode:i}=At(wu()),{sortedCharts:s,selectedChart:a,thumbnails:l,previews:c,sortValue:u,refresh:d,duplicateChart:f,removeChart:h}=G$(),g=pt("galleryRef"),b=De("grid"),m=k(()=>({"dashboard-page":!0,"dashboard-page--narrow":n.value})),v=k(()=>a.value?a.value.title||"Untitled":"Chart details");function y(){o.value=null}const x=k({get:()=>o.value!==null,set:C=>{C||(o.value=null)}});function _(){o.value&&e.push(`/edit/${o.value}`)}function S(){if(o.value){const C=f(o.value);C&&e.push(`/edit/${C}`)}}function E(){o.value&&h(o.value)}function M(C){C.key==="Escape"&&(o.value=null)}return hn(()=>{d(),document.addEventListener("keydown",M)}),Us(()=>{document.removeEventListener("keydown",M)}),(C,O)=>{const P=nie,R=Vre,$=Ire,A=cre,L=Xm;return w(),N("div",oie,[H(P,{"chart-count":p(s).length,"sort-value":p(u),layout:p(b),"onUpdate:sortValue":O[0]||(O[0]=B=>u.value=B),"onUpdate:layout":O[1]||(O[1]=B=>b.value=B),onNew:O[2]||(O[2]=B=>p(e).push("/new"))},null,8,["chart-count","sort-value","layout"]),T("div",{class:$e(p(m))},[T("div",{ref_key:"galleryRef",ref:g,class:"dashboard-page__gallery"},[H(R,{charts:p(s),thumbnails:p(l),"selected-id":p(o),layout:p(b),onSelect:p(r),onEdit:O[3]||(O[3]=B=>p(e).push(`/edit/${B}`)),onNew:O[4]||(O[4]=B=>p(e).push("/new"))},null,8,["charts","thumbnails","selected-id","layout","onSelect"])],512),H(L,{"drawer-open":p(x),"onUpdate:drawerOpen":O[5]||(O[5]=B=>Ke(x)?x.value=B:null),title:p(v),"container-ref":p(g),"show-close":!1,onClose:y},{default:J(()=>[p(a)?(w(),Q($,{key:0,title:p(a).title||"Untitled",subtitle:p(a).description,"preview-src":p(o)?p(c)[p(o)]:void 0,"force-light-theme":p(a)?!p(a).allowDarkMode:!1,"chart-type":p(a).chartType,"saved-at":p(a).savedAt??void 0,"scene-count":p(a).sceneCount,"row-count":p(a).rowCount,onEdit:_,onDuplicate:S,onDelete:E},null,8,["title","subtitle","preview-src","force-light-theme","chart-type","saved-at","scene-count","row-count"])):p(i)==="docked"?(w(),Q(A,{key:1})):re("",!0)]),_:1},8,["drawer-open","title","container-ref"])],2)])}}}),iie=Be(rie,[["__scopeId","data-v-fe7a5a93"]]),sie={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function aie(t,e){return w(),N("svg",sie,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16M40 56h40v144H40Zm176 144H96V56h120z"},null,-1)])])}const K$=Te({name:"ph-sidebar-simple",render:aie}),A2=se({__name:"PanelIconRail",props:{activeTab:{},items:{}},emits:["select","toggle-mode"],setup(t,{emit:e}){const n=e,{mode:o,open:r}=Zl();function i(a){o.value==="closed"&&r(),n("select",a)}const s=k(()=>o.value==="closed"?"Open panel":"Close panel");return(a,l)=>(w(),Q(p(yW),{"model-value":t.activeTab,items:t.items,"onUpdate:modelValue":i},{footer:J(()=>[H(p(Kn),{"icon-left":p(K$),label:p(s),"hide-label":"",square:"",variant:"link",size:"sm",onClick:l[0]||(l[0]=c=>a.$emit("toggle-mode"))},null,8,["icon-left","label"])]),_:1},8,["model-value","items"]))}}),lie=Po("exportPanel",()=>{const t=De("embed"),e=De("png"),n=De(2),o=De(!1),r=De(!1),i=De(!0),s=De(!1),a=De("embed");function l(f){t.value=f}function c(f){e.value=f}function u(f){a.value=f}function d(){t.value="embed",e.value="png",n.value=2,o.value=!1,r.value=!1,i.value=!0,s.value=!1,a.value="embed"}return{exportTab:t,selectedFormat:e,pngScale:n,svgInlineFonts:o,svgMinify:r,bpcIncludeData:i,bpcCompact:s,lastNarrowExportTab:a,setExportTab:l,setSelectedFormat:c,setLastNarrowExportTab:u,reset:d}});function Km(){const t=lie(),{exportTab:e,selectedFormat:n,pngScale:o,svgInlineFonts:r,svgMinify:i,bpcIncludeData:s,bpcCompact:a,lastNarrowExportTab:l}=At(t);return{exportTab:e,selectedFormat:n,pngScale:o,svgInlineFonts:r,svgMinify:i,bpcIncludeData:s,bpcCompact:a,lastNarrowExportTab:l,setExportTab:t.setExportTab,setSelectedFormat:t.setSelectedFormat,setLastNarrowExportTab:t.setLastNarrowExportTab,reset:t.reset}}const cie={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function uie(t,e){return w(),N("svg",cie,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M69.12 94.15L28.5 128l40.62 33.85a8 8 0 1 1-10.24 12.29l-48-40a8 8 0 0 1 0-12.29l48-40a8 8 0 0 1 10.24 12.3m176 27.7l-48-40a8 8 0 1 0-10.24 12.3L227.5 128l-40.62 33.85a8 8 0 1 0 10.24 12.29l48-40a8 8 0 0 0 0-12.29m-82.39-89.37a8 8 0 0 0-10.25 4.79l-64 176a8 8 0 0 0 4.79 10.26A8.1 8.1 0 0 0 96 224a8 8 0 0 0 7.52-5.27l64-176a8 8 0 0 0-4.79-10.25"},null,-1)])])}const die=Te({name:"ph-code",render:uie}),fie={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function hie(t,e){return w(),N("svg",fie,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 144v64a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-64a8 8 0 0 1 16 0v56h160v-56a8 8 0 0 1 16 0m-101.66 5.66a8 8 0 0 0 11.32 0l40-40a8 8 0 0 0-11.32-11.32L136 124.69V32a8 8 0 0 0-16 0v92.69L93.66 98.34a8 8 0 0 0-11.32 11.32Z"},null,-1)])])}const Z$=Te({name:"ph-download-simple",render:hie});function Q$(){return{sections:[{key:"embed",label:"Embed",icon:die},{key:"download",label:"Download",icon:Z$}]}}const pie=se({__name:"ExportIconRail",setup(t){const{mode:e,toggleMode:n}=Zl(),o=Km(),{exportTab:r}=At(o),{setExportTab:i}=o,{sections:s}=Q$(),a=k(()=>s.map(c=>({value:c.key,icon:c.icon,tooltip:c.tooltip??c.label})));function l(c){i(c),e.value==="closed"&&n()}return(c,u)=>{const d=A2;return w(),Q(d,{"active-tab":p(r),items:p(a),onSelect:l,onToggleMode:p(n)},null,8,["active-tab","items","onToggleMode"])}}}),Mi=[{label:"Data",key:"data"},{label:"Visualize",key:"edit"},{label:"Export",key:"export"}];function mie(t){return t.endsWith("/export")?"export":t.endsWith("/visualize")?"edit":(t.endsWith("/data"),"data")}function gie(t,e){return e==="edit"?`/edit/${t}/visualize`:`/edit/${t}/${e}`}const pv=Ie(null);function $2(){const t=Wl(),e=fy(),n=k(()=>{const h=mie((t==null?void 0:t.path)??"/new");return Mi.find(g=>g.key===h)??Mi[0]}),o=k({get:()=>Mi.indexOf(n.value),set:h=>{u(h)}}),r=k(()=>o.value===0),i=k(()=>o.value===Mi.length-1);function s(){var g;const h=(g=t==null?void 0:t.params)==null?void 0:g.id;return h||(pv.value?pv.value():null)}function a(h){const g=s();g&&e&&e.replace(gie(g,h))}function l(){const h=o.value;h<Mi.length-1&&a(Mi[h+1].key)}function c(){const h=o.value;h>0&&a(Mi[h-1].key)}function u(h){h>=0&&h<Mi.length&&a(Mi[h].key)}function d(){}function f(h){pv.value=h}return{currentIndex:o,steps:Mi,currentStep:n,isFirst:r,isLast:i,next:l,back:c,goTo:u,reset:d,registerCreateSession:f}}const vie={class:"panel-stepper-footer"},bie=se({__name:"PanelStepperFooter",setup(t){const{steps:e,currentIndex:n,isFirst:o,isLast:r,next:i,back:s}=$2(),a=k(()=>{var c;return((c=e[n.value-1])==null?void 0:c.label)??"Previous"}),l=k(()=>{var c;return((c=e[n.value+1])==null?void 0:c.label)??"Next"});return(c,u)=>(w(),N("div",vie,[p(o)?re("",!0):(w(),Q(p(Kn),{key:0,"icon-left":p(vC),"icon-left-size":"1em",label:p(a),variant:"outline-secondary",size:"sm",onClick:p(s)},null,8,["icon-left","label","onClick"])),p(r)?re("",!0):(w(),Q(p(Kn),{key:1,"icon-right":p(bC),"icon-right-size":"1em",label:p(l),variant:"primary",size:"sm",class:"ms-auto",onClick:p(i)},null,8,["icon-right","label","onClick"]))]))}}),T2=Be(bie,[["__scopeId","data-v-52b4dceb"]]),yie={class:"format-card__header"},xie={class:"format-card__header__text"},wie={class:"format-card__header__text__label"},_ie={class:"format-card__header__text__desc"},Sie={key:0,class:"format-card__options"},kie=se({__name:"ExportDownloadFormatCard",props:{selected:{type:Boolean},icon:{},label:{},description:{},iconBg:{},iconColor:{}},emits:["select","download"],setup(t){return(e,n)=>(w(),N("div",{class:$e(["format-card",{"format-card--selected":t.selected}]),onClick:n[1]||(n[1]=o=>e.$emit("select"))},[T("div",yie,[T("span",{class:"format-card__header__icon",style:Pt({background:t.iconBg,color:t.iconColor})},[(w(),Q(Gt(t.icon)))],4),T("div",xie,[T("div",wie,ye(t.label),1),T("div",_ie,ye(t.description),1)]),H(p(Kn),{"icon-left":p(Z$),label:"Download","hide-label":"",variant:"primary",size:"sm",square:"",onClick:n[0]||(n[0]=gn(o=>e.$emit("download"),["stop"]))},null,8,["icon-left"])]),t.selected&&e.$slots.default?(w(),N("div",Sie,[Ce(e.$slots,"default",{},void 0,!0)])):re("",!0)],2))}}),Cie=Be(kie,[["__scopeId","data-v-f26129ef"]]);function Mf(t,e){const n=URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=e,o.click(),URL.revokeObjectURL(n)}function Aie(t,e="chart.svg"){const o=new XMLSerializer().serializeToString(t),r=new Blob([o],{type:"image/svg+xml;charset=utf-8"});Mf(r,e)}function $ie(t,e,n,o="chart.png"){const i=new XMLSerializer().serializeToString(t),s=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),a=URL.createObjectURL(s);return new Promise((l,c)=>{const u=new Image;u.onload=()=>{const d=document.createElement("canvas");d.width=e,d.height=n;const f=d.getContext("2d");if(!f){URL.revokeObjectURL(a),c(new Error("Could not get canvas context"));return}f.drawImage(u,0,0,e,n),d.toBlob(h=>{if(URL.revokeObjectURL(a),!h){c(new Error("Could not create PNG blob"));return}Mf(h,o),l()},"image/png")},u.onerror=()=>{URL.revokeObjectURL(a),c(new Error("Failed to load SVG image"))},u.src=a})}function J$(t,e){const n=globalThis.getComputedStyle(t),o=e;if(o.style)for(let s=0;s<n.length;s++){const a=n[s];o.style.setProperty(a,n.getPropertyValue(a))}const r=t.children,i=e.children;for(let s=0;s<r.length;s++)i[s]&&J$(r[s],i[s])}function Tie(t){const e=globalThis.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function Mie(t,e=2,n="chart.png",o,r){const{width:i,height:s}=t.getBoundingClientRect(),a=r??{top:0,right:0,bottom:0,left:0},l=i+a.left+a.right,c=s+a.top+a.bottom,u=Math.ceil(l*e),d=Math.ceil(c*e),f=t.cloneNode(!0);J$(t,f),f.querySelectorAll("[data-scene-player]").forEach(S=>S.remove()),f.style.setProperty("pointer-events","auto"),f.style.setProperty("transition","none"),f.style.setProperty("animation","none");const g=new XMLSerializer().serializeToString(f),b=a.left,m=a.top,v=o?`<rect width="${l}" height="${c}" fill="${o}" />`:"",y=[`<svg xmlns="http://www.w3.org/2000/svg" width="${u}" height="${d}">`,`<g transform="scale(${e})">`,v,`<foreignObject x="${b}" y="${m}" width="${i}" height="${s}">`,g,"</foreignObject>","</g>","</svg>"].join(""),x=new Blob([y],{type:"image/svg+xml;charset=utf-8"}),_=URL.createObjectURL(x);return new Promise((S,E)=>{const M=new Image;M.onload=()=>{const C=document.createElement("canvas");C.width=u,C.height=d;const O=C.getContext("2d");if(!O){URL.revokeObjectURL(_),E(new Error("Could not get canvas context"));return}O.drawImage(M,0,0,u,d),C.toBlob(P=>{if(URL.revokeObjectURL(_),!P){E(new Error("Could not create PNG blob"));return}Mf(P,n),S()},"image/png")},M.onerror=()=>{URL.revokeObjectURL(_),E(new Error("Failed to render frame as image"))},M.src=_})}function mv(t){const e=globalThis.getComputedStyle(t);return{fontSize:parseFloat(e.fontSize),fontWeight:e.fontWeight,fontFamily:e.fontFamily,fill:e.color,fontStyle:e.fontStyle}}function eT(t){let e=t;for(;e;){const n=globalThis.getComputedStyle(e).backgroundColor;if(n&&n!=="transparent"&&n!=="rgba(0, 0, 0, 0)")return n;e=e.parentElement}return"#ffffff"}function Oie(t,e="chart.svg"){const n=t.querySelector("svg");if(!n)return;const o=t.getBoundingClientRect(),r=eT(t),i=new XMLSerializer,s=[],a=t.querySelectorAll(".bc-frame-title, .bc-frame-description");for(const M of a){const C=M.getBoundingClientRect(),O=mv(M);s.push({text:M.textContent??"",x:C.left-o.left,y:C.top-o.top+O.fontSize,...O})}const l=t.querySelector(".bc-frame-note");if(l&&l.textContent&&l.style.display!=="none"){const M=l.getBoundingClientRect(),C=mv(l);s.push({text:l.textContent,x:M.left-o.left,y:M.top-o.top+C.fontSize,...C})}const c=t.querySelectorAll(".bc-frame-byline, .bc-frame-source, .bc-frame-credit");for(const M of c){const C=M.getBoundingClientRect();if(C.width===0)continue;const O=mv(M);s.push({text:M.textContent??"",x:C.left-o.left,y:C.top-o.top+O.fontSize,...O})}const u=n.getBoundingClientRect(),d=u.left-o.left,f=u.top-o.top,h=u.width,g=u.height,b=n.cloneNode(!0);b.removeAttribute("width"),b.removeAttribute("height");const m=i.serializeToString(b),v=Math.ceil(o.width),y=Math.ceil(o.height),x=M=>M.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),_=s.map(M=>`<text x="${M.x}" y="${M.y}" font-size="${M.fontSize}px" font-weight="${M.fontWeight}" font-family="${x(M.fontFamily)}" fill="${M.fill}"${M.fontStyle&&M.fontStyle!=="normal"?` font-style="${M.fontStyle}"`:""}>${x(M.text)}</text>`).join(`
|
|
848
|
+
`),S=[`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${v}" height="${y}" viewBox="0 0 ${v} ${y}">`,` <rect width="100%" height="100%" fill="${r}" />`,` ${_}`,` <g transform="translate(${d},${f})">`,` <svg width="${h}" height="${g}"${b.getAttribute("viewBox")?` viewBox="${b.getAttribute("viewBox")}"`:""}>`,m.replace(/^<svg[^>]*>/,"").replace(/<\/svg>$/,"")," </svg>"," </g>","</svg>"].join(`
|
|
849
|
+
`),E=new Blob([S],{type:"image/svg+xml;charset=utf-8"});Mf(E,e)}const Bie={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Lie(t,e){return w(),N("svg",Bie,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m0 16v102.75l-26.07-26.06a16 16 0 0 0-22.63 0l-20 20l-44-44a16 16 0 0 0-22.62 0L40 149.37V56ZM40 172l52-52l80 80H40Zm176 28h-21.37l-36-36l20-20L216 181.38zm-72-100a12 12 0 1 1 12 12a12 12 0 0 1-12-12"},null,-1)])])}const Pie=Te({name:"ph-image",render:Lie}),Die={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Eie(t,e){return w(),N("svg",Die,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M181.66 146.34a8 8 0 0 1 0 11.32l-24 24a8 8 0 0 1-11.32-11.32L164.69 152l-18.35-18.34a8 8 0 0 1 11.32-11.32Zm-72-24a8 8 0 0 0-11.32 0l-24 24a8 8 0 0 0 0 11.32l24 24a8 8 0 0 0 11.32-11.32L91.31 152l18.35-18.34a8 8 0 0 0 0-11.32M216 88v128a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V40a16 16 0 0 1 16-16h96a8 8 0 0 1 5.66 2.34l56 56A8 8 0 0 1 216 88m-56-8h28.69L160 51.31Zm40 136V96h-48a8 8 0 0 1-8-8V40H56v176z"},null,-1)])])}const Iie=Te({name:"ph-file-code",render:Eie}),Nie={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Rie(t,e){return w(),N("svg",Nie,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v176a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V88a8 8 0 0 0-2.34-5.66M160 51.31L188.69 80H160ZM200 216H56V40h88v48a8 8 0 0 0 8 8h48zm-32-80a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8m0 32a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8"},null,-1)])])}const tT=Te({name:"ph-file-text",render:Rie}),Fie={class:"export-download-panel"},Vie=se({__name:"ExportDownloadPanel",emits:["download-png","download-svg"],setup(t,{emit:e}){const n=Km(),{selectedFormat:o,pngScale:r,svgInlineFonts:i,svgMinify:s,bpcCompact:a}=At(n),{setSelectedFormat:l}=n,{dsl:c}=Tf(),u=e;function d(){u("download-png",r.value)}function f(){u("download-svg")}function h(){Mf(new globalThis.Blob([c.value],{type:"text/plain"}),"chart.bpc")}return(g,b)=>{const m=Cie,v=Os;return w(),N("div",Fie,[H(m,{selected:p(o)==="png",icon:p(Pie),label:"PNG",description:"Raster image, best for presentations","icon-bg":"var(--bs-info-bg-subtle)","icon-color":"var(--bs-info-text-emphasis)",onSelect:b[1]||(b[1]=y=>p(l)("png")),onDownload:d},{default:J(()=>[H(p(yr),{id:"png-scale","model-value":p(r),label:"Scale",min:1,max:4,step:1,"onUpdate:modelValue":b[0]||(b[0]=y=>r.value=y)},null,8,["model-value"])]),_:1},8,["selected","icon"]),H(m,{selected:p(o)==="svg",icon:p(Iie),label:"SVG",description:"Vector image, best for print and web","icon-bg":"var(--bs-success-bg-subtle)","icon-color":"var(--bs-success-text-emphasis)",onSelect:b[4]||(b[4]=y=>p(l)("svg")),onDownload:f},{default:J(()=>[H(v,{modelValue:p(i),"onUpdate:modelValue":b[2]||(b[2]=y=>Ke(i)?i.value=y:null),switch:""},{default:J(()=>[...b[7]||(b[7]=[Ue(" Inline fonts ",-1)])]),_:1},8,["modelValue"]),H(v,{modelValue:p(s),"onUpdate:modelValue":b[3]||(b[3]=y=>Ke(s)?s.value=y:null),switch:""},{default:J(()=>[...b[8]||(b[8]=[Ue(" Minify ",-1)])]),_:1},8,["modelValue"])]),_:1},8,["selected","icon"]),H(m,{selected:p(o)==="bpc",icon:p(tT),label:"BPC",description:"Blueprint Chart DSL file","icon-bg":"var(--bs-warning-bg-subtle)","icon-color":"var(--bs-warning-text-emphasis)",onSelect:b[6]||(b[6]=y=>p(l)("bpc")),onDownload:h},{default:J(()=>[H(v,{modelValue:p(a),"onUpdate:modelValue":b[5]||(b[5]=y=>Ke(a)?a.value=y:null),switch:""},{default:J(()=>[...b[9]||(b[9]=[Ue(" Compact ",-1)])]),_:1},8,["modelValue"])]),_:1},8,["selected","icon"])])}}}),zie=Be(Vie,[["__scopeId","data-v-f6670dcb"]]),Hie={class:"export-embed-panel"},Wie={class:"export-embed-panel__code-block"},Uie={class:"export-embed-panel__code-block__header"},Gie={class:"export-embed-panel__code-block__pre"},qie=["href"],Yie=se({__name:"ExportEmbedPanel",setup(t){const{dsl:e,generateDsl:n}=Tf(),{layout:o}=pn();function r(a){const l=new TextEncoder().encode(a);let c="";for(const u of l)c+=String.fromCharCode(u);return globalThis.btoa(c)}const i=k(()=>{const a=r(e.value||n());return`${window.location.origin}${window.location.pathname}#/render?bpc64=${encodeURIComponent(a)}`}),s=k(()=>{const a=Bt(o.value),l=a.heightMode==="fixed"?a.fixedHeight:400,c=[];return a.sizing==="responsive"?c.push(`width="100%" height="${l}"`):a.sizing==="max-width"?c.push(`style="width:100%;max-width:${a.maxWidth}px" height="${l}"`):c.push(`width="${a.fixedWidth}" height="${l}"`),`<iframe src="${i.value}" ${c.join(" ")} frameborder="0"></iframe>`});return(a,l)=>(w(),N("div",Hie,[T("div",Wie,[T("div",Uie,[l[0]||(l[0]=T("span",{class:"export-embed-panel__code-block__label"},"Embed code",-1)),H(p(u_),{text:p(s),label:"Copy",variant:"outline-secondary",size:"sm"},null,8,["text"])]),T("pre",Gie,[T("code",null,ye(p(s)),1)])]),l[1]||(l[1]=T("div",{class:"export-embed-panel__info"}," Paste this iframe into your HTML page. The chart renders automatically. ",-1)),H(p(u_),{text:p(s),label:"Copy embed code",variant:"primary",size:"sm"},null,8,["text"]),T("a",{href:p(i),target:"_blank",rel:"noopener",class:"export-embed-panel__link"}," Preview in new tab ",8,qie)]))}}),jie=Be(Yie,[["__scopeId","data-v-030ab97a"]]),Xie=["onClick"],Kie=se({__name:"PanelTabBar",props:nt({tabs:{},sticky:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=ft(t,"modelValue"),n=pt("tabsRef");let o=null;function r(){wn(()=>{o!=null&&o.scrollIntoView&&n.value&&o.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})}return Ve(()=>o,r),(i,s)=>(w(),N("div",{ref_key:"tabsRef",ref:n,class:$e(["panel-tab-bar",{"panel-tab-bar--sticky":t.sticky}])},[(w(!0),N(Re,null,mt(t.tabs,a=>(w(),N("button",{key:a.key,ref_for:!0,ref:l=>{a.key===e.value&&(Ke(o)?o.value=l:o=l)},class:$e(["panel-tab-bar__tab",{"panel-tab-bar__tab--active":e.value===a.key}]),onClick:l=>e.value=a.key},[a.icon?(w(),Q(Gt(a.icon),{key:0,class:"panel-tab-bar__tab__icon","aria-hidden":"true"})):re("",!0),Ue(" "+ye(a.label),1)],10,Xie))),128))],2))}}),M2=Be(Kie,[["__scopeId","data-v-1a1009cc"]]),Zie=se({__name:"CanvasModePickerOptionSwatch",props:{mode:{}},setup(t){return(e,n)=>(w(),N("span",{class:$e(["canvas-mode-swatch",`canvas-mode-swatch--${t.mode}`])},null,2))}}),nT=Be(Zie,[["__scopeId","data-v-81dabc6c"]]),Qie=Po("editorPanel",()=>{const t=De("type"),e=De("preview"),n=De("blueprint"),o=De(!0),r=De(null),i=De("upload"),s=De(""),a=De(!1),l=De(-1),c=De("type"),u=De("column");function d(C){t.value=C}function f(C){r.value=C,d("annotate")}function h(C){e.value=C}function g(C){n.value=C}function b(C){i.value=C,C==="structure"&&v("column")}function m(C){s.value=C}function v(C){s.value=C,a.value=!0}function y(){a.value=!1,s.value=""}function x(){a.value=!a.value}function _(C){if(l.value===C){l.value=-1;return}l.value=C,v("column")}function S(C){c.value=C}function E(C){u.value=C}function M(){t.value="type",e.value="preview",n.value="blueprint",o.value=!0,r.value=null,i.value="upload",s.value="",a.value=!1,l.value=-1,c.value="type",u.value="column"}return{activeTab:t,viewMode:e,canvasMode:n,showDimensions:o,pendingAnnotationIndex:r,dataView:i,dataPanelTab:s,dataPanelOpen:a,selectedColumnIndex:l,lastNarrowEditTab:c,lastNarrowDataTab:u,selectTab:d,selectAnnotation:f,setViewMode:h,setCanvasMode:g,setDataView:b,setDataPanelTab:m,openDataPanel:v,closeDataPanel:y,toggleDataPanel:x,selectColumn:_,setLastNarrowEditTab:S,setLastNarrowDataTab:E,reset:M}});function dr(){const t=Qie(),{activeTab:e,viewMode:n,canvasMode:o,showDimensions:r,pendingAnnotationIndex:i,dataView:s,dataPanelTab:a,dataPanelOpen:l,selectedColumnIndex:c,lastNarrowEditTab:u,lastNarrowDataTab:d}=At(t);return{activeTab:e,viewMode:n,canvasMode:o,showDimensions:r,pendingAnnotationIndex:i,dataView:s,dataPanelTab:a,dataPanelOpen:l,selectedColumnIndex:c,lastNarrowEditTab:u,lastNarrowDataTab:d,selectTab:t.selectTab,selectAnnotation:t.selectAnnotation,setViewMode:t.setViewMode,setCanvasMode:t.setCanvasMode,setDataView:t.setDataView,setDataPanelTab:t.setDataPanelTab,openDataPanel:t.openDataPanel,closeDataPanel:t.closeDataPanel,toggleDataPanel:t.toggleDataPanel,selectColumn:t.selectColumn,setLastNarrowEditTab:t.setLastNarrowEditTab,setLastNarrowDataTab:t.setLastNarrowDataTab,reset:t.reset}}const Jie={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function ese(t,e){return w(),N("svg",Jie,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m235.32 73.37l-52.69-52.68a16 16 0 0 0-22.63 0L20.68 160a16 16 0 0 0 0 22.63l52.69 52.68a16 16 0 0 0 22.63 0L235.32 96a16 16 0 0 0 0-22.63M84.68 224L32 171.31l32-32l26.34 26.35a8 8 0 0 0 11.32-11.32L75.31 128L96 107.31l26.34 26.35a8 8 0 0 0 11.32-11.32L107.31 96L128 75.31l26.34 26.35a8 8 0 0 0 11.32-11.32L139.31 64l32-32L224 84.69Z"},null,-1)])])}const tse=Te({name:"ph-ruler",render:ese}),nse=se({__name:"CanvasDimensionsToggle",setup(t){const{showDimensions:e}=At(dr());return(n,o)=>(w(),N("button",{class:$e(["canvas-dimensions-toggle",{"canvas-dimensions-toggle--active":p(e)}]),title:"Show dimensions",onClick:o[0]||(o[0]=r=>e.value=!p(e))},[H(p(tse))],2))}}),ose=Be(nse,[["__scopeId","data-v-0920c699"]]),rse=["title"],ise={class:"canvas-mode-picker-option__label"},sse=se({__name:"CanvasModePickerOption",props:{mode:{},label:{},active:{type:Boolean}},emits:["select"],setup(t){return(e,n)=>{const o=nT;return w(),N("button",{class:$e(["canvas-mode-picker-option",{"canvas-mode-picker-option--active":t.active}]),title:t.label,onClick:n[0]||(n[0]=r=>e.$emit("select"))},[H(o,{mode:t.mode},null,8,["mode"]),T("span",ise,ye(t.label),1)],10,rse)}}}),ase=Be(sse,[["__scopeId","data-v-b7a042b3"]]),lse={class:"canvas-mode-picker__extra"},cse={key:1,class:"canvas-mode-picker__trigger",title:"Canvas mode"},use=se({__name:"CanvasModePicker",setup(t){const e=dr(),{canvasMode:n}=At(e),{setCanvasMode:o}=e,r=De(!1),i=[{value:"blueprint",label:"Blueprint"},{value:"auto",label:"Auto"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}];function s(a){o(a),r.value=!1}return(a,l)=>{const c=ase,u=ose,d=nT;return w(),N("div",{class:"canvas-mode-picker",onMouseenter:l[0]||(l[0]=f=>r.value=!0),onMouseleave:l[1]||(l[1]=f=>r.value=!1)},[p(r)?(w(),N(Re,{key:0},[(w(),N(Re,null,mt(i,f=>H(c,{key:f.value,mode:f.value,label:f.label,active:p(n)===f.value,onSelect:h=>s(f.value)},null,8,["mode","label","active","onSelect"])),64)),l[3]||(l[3]=T("div",{class:"canvas-mode-picker__divider"},null,-1)),T("div",lse,[H(u),l[2]||(l[2]=T("span",{class:"canvas-mode-picker__extra__label"},"Dims",-1))])],64)):(w(),N("button",cse,[H(d,{mode:p(n)},null,8,["mode"])]))],32)}}}),oT=Be(use,[["__scopeId","data-v-beb08053"]]),dse={transform:"translate(0.5, 0.5)"},fse={class:"canvas-dimensions__line"},hse=["x1","y1","x2","y2"],pse=["x1","y1","x2","y2"],mse=["x1","y1","x2","y2"],gse=["x","y"],vse={class:"canvas-dimensions__line"},bse=["x1","y1","x2","y2"],yse=["x1","y1","x2","y2"],xse=["x1","y1","x2","y2"],wse=["x","y"],_se={class:"canvas-dimensions__line canvas-dimensions__line--padding"},Sse=["x1","y1","x2","y2"],kse=["x1","y1","x2","y2"],Cse=["x1","y1","x2","y2"],Ase=["x","y"],$se=["x1","y1","x2","y2"],Tse=["x1","y1","x2","y2"],Mse=["x1","y1","x2","y2"],Ose=["x","y"],Bse={class:"canvas-dimensions__line canvas-dimensions__line--padding"},Lse=["x1","y1","x2","y2"],Pse=["x1","y1","x2","y2"],Dse=["x1","y1","x2","y2"],Ese=["x","y"],Ise=["x1","y1","x2","y2"],Nse=["x1","y1","x2","y2"],Rse=["x1","y1","x2","y2"],Fse=["x","y"],y6=20,on=3,fh=4,x6=20,Vse=se({__name:"CanvasDimensions",props:{cardRef:{},canvasRef:{},layout:{}},setup(t){const e=t,n=Ie(null);function o(){const v=e.cardRef;if(!v){n.value=null;return}n.value={left:v.offsetLeft,top:v.offsetTop,width:v.offsetWidth,height:v.offsetHeight}}Qi(()=>e.canvasRef,o),Qi(()=>e.cardRef,o);const r=k(()=>({position:"absolute",inset:"0",width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"})),i=k(()=>{const v=n.value;return{x1:v.left,x2:v.left+v.width,y:v.top+v.height+y6}}),s=k(()=>{const v=n.value;return{x:v.left-y6,y1:v.top,y2:v.top+v.height}}),a=k(()=>{const v=i.value,y=e.layout.padding;return y>0&&!c.value?{x1:v.x1+y+fh,x2:v.x2-y-fh}:{x1:v.x1,x2:v.x2}}),l=k(()=>{const v=s.value,y=e.layout.padding;return y>0&&!u.value?{y1:v.y1+y+fh,y2:v.y2-y-fh}:{y1:v.y1,y2:v.y2}}),c=k(()=>e.layout.sizing!=="responsive"),u=k(()=>e.layout.heightMode!=="auto"),d=k(()=>e.layout.padding>0),f=k(()=>`${e.layout.padding}px`),h=k(()=>i.value.y+x6),g=k(()=>s.value.x-x6),b=k(()=>{const v=e.layout;return v.sizing==="fixed"?`${v.fixedWidth}px`:v.sizing==="max-width"?`max ${v.maxWidth}px`:"auto"}),m=k(()=>{const v=e.layout;return v.heightMode==="fixed"?`${v.fixedHeight}px`:v.heightMode==="aspect-ratio"?v.aspectRatio:"auto"});return(v,y)=>p(n)?(w(),N("svg",{key:0,class:"canvas-dimensions",style:Pt(p(r))},[T("g",dse,[T("g",fse,[T("line",{x1:p(a).x1,y1:p(i).y,x2:p(a).x2,y2:p(i).y},null,8,hse),T("line",{x1:p(a).x1,y1:p(i).y-on,x2:p(a).x1,y2:p(i).y+on},null,8,pse),T("line",{x1:p(a).x2,y1:p(i).y-on,x2:p(a).x2,y2:p(i).y+on},null,8,mse),T("text",{x:(p(i).x1+p(i).x2)/2,y:p(i).y+on+12,"text-anchor":"middle"},ye(p(b)),9,gse)]),T("g",vse,[T("line",{x1:p(s).x,y1:p(l).y1,x2:p(s).x,y2:p(l).y2},null,8,bse),T("line",{x1:p(s).x-on,y1:p(l).y1,x2:p(s).x+on,y2:p(l).y1},null,8,yse),T("line",{x1:p(s).x-on,y1:p(l).y2,x2:p(s).x+on,y2:p(l).y2},null,8,xse),T("text",{x:p(s).x-5,y:(p(s).y1+p(s).y2)/2,"text-anchor":"end","dominant-baseline":"central"},ye(p(m)),9,wse)]),p(d)?(w(),N(Re,{key:0},[T("g",_se,[T("line",{x1:p(i).x1,y1:p(c)?p(h):p(i).y,x2:p(i).x1+t.layout.padding,y2:p(c)?p(h):p(i).y},null,8,Sse),T("line",{x1:p(i).x1,y1:(p(c)?p(h):p(i).y)-on,x2:p(i).x1,y2:(p(c)?p(h):p(i).y)+on},null,8,kse),T("line",{x1:p(i).x1+t.layout.padding,y1:(p(c)?p(h):p(i).y)-on,x2:p(i).x1+t.layout.padding,y2:(p(c)?p(h):p(i).y)+on},null,8,Cse),T("text",{x:p(i).x1+t.layout.padding/2,y:(p(c)?p(h):p(i).y)+on+12,"text-anchor":"middle"},ye(p(f)),9,Ase),T("line",{x1:p(i).x2-t.layout.padding,y1:p(c)?p(h):p(i).y,x2:p(i).x2,y2:p(c)?p(h):p(i).y},null,8,$se),T("line",{x1:p(i).x2-t.layout.padding,y1:(p(c)?p(h):p(i).y)-on,x2:p(i).x2-t.layout.padding,y2:(p(c)?p(h):p(i).y)+on},null,8,Tse),T("line",{x1:p(i).x2,y1:(p(c)?p(h):p(i).y)-on,x2:p(i).x2,y2:(p(c)?p(h):p(i).y)+on},null,8,Mse),T("text",{x:p(i).x2-t.layout.padding/2,y:(p(c)?p(h):p(i).y)+on+12,"text-anchor":"middle"},ye(p(f)),9,Ose)]),T("g",Bse,[T("line",{x1:p(u)?p(g):p(s).x,y1:p(s).y1,x2:p(u)?p(g):p(s).x,y2:p(s).y1+t.layout.padding},null,8,Lse),T("line",{x1:(p(u)?p(g):p(s).x)-on,y1:p(s).y1,x2:(p(u)?p(g):p(s).x)+on,y2:p(s).y1},null,8,Pse),T("line",{x1:(p(u)?p(g):p(s).x)-on,y1:p(s).y1+t.layout.padding,x2:(p(u)?p(g):p(s).x)+on,y2:p(s).y1+t.layout.padding},null,8,Dse),T("text",{x:(p(u)?p(g):p(s).x)-on-4,y:p(s).y1+t.layout.padding/2,"text-anchor":"end","dominant-baseline":"central"},ye(p(f)),9,Ese),T("line",{x1:p(u)?p(g):p(s).x,y1:p(s).y2-t.layout.padding,x2:p(u)?p(g):p(s).x,y2:p(s).y2},null,8,Ise),T("line",{x1:(p(u)?p(g):p(s).x)-on,y1:p(s).y2-t.layout.padding,x2:(p(u)?p(g):p(s).x)+on,y2:p(s).y2-t.layout.padding},null,8,Nse),T("line",{x1:(p(u)?p(g):p(s).x)-on,y1:p(s).y2,x2:(p(u)?p(g):p(s).x)+on,y2:p(s).y2},null,8,Rse),T("text",{x:(p(u)?p(g):p(s).x)-on-4,y:p(s).y2-t.layout.padding/2,"text-anchor":"end","dominant-baseline":"central"},ye(p(f)),9,Fse)])],64)):re("",!0)])],4)):re("",!0)}}),rT=Be(Vse,[["__scopeId","data-v-394e6d5d"]]);function zse(t){const e=t.split(":");if(e.length!==2)return;const n=Number(e[0]),o=Number(e[1]);return n&&o?n/o:void 0}function O2(t,e){const n=k(()=>t.value.heightMode==="fixed"||t.value.heightMode==="aspect-ratio"),o=k(()=>({[`${e}--fixed`]:t.value.sizing==="fixed",[`${e}--max-width`]:t.value.sizing==="max-width",[`${e}--transparent`]:t.value.transparentBackground,[`${e}--constrained-height`]:n.value})),r=k(()=>{const i=t.value,s={};if(i.sizing==="fixed"?s.width=`${i.fixedWidth}px`:i.sizing==="max-width"&&(s.maxWidth=`${i.maxWidth}px`,s.width="100%"),i.heightMode==="fixed")s.height=`${i.fixedHeight}px`;else if(i.heightMode==="aspect-ratio"){const a=zse(i.aspectRatio);a&&(s.aspectRatio=String(a))}return s});return{cardClass:o,cardStyle:r,hasConstrainedHeight:n}}function Hse(t,e){t.replaceChildren();const n=document.createElement("div");n.className="text-center text-muted p-5",n.textContent=e,t.appendChild(n)}const Wse=150;function B2(t){const e=pn(),{currentOptions:n}=kn(),{scenes:o,activeIndex:r,activeScene:i}=_n(),{columns:s,rows:a,columnTypes:l}=Zo(),{applyStepList:c}=Or(),{theme:u}=vf(),{chartTheme:d}=T$(),f=Symbol("unset");let h=f,g=!1;function b(){if(!(!t.value||g)){g=!0;try{m()}finally{g=!1}}}function m(){var ce;if(!t.value)return;const _=i.value,S=Ba(o.value,r.value),E=(S==null?void 0:S.chartType)??e.chartType.value;let M;if((S==null?void 0:S.data)!==void 0)M=S.data;else if((ce=S==null?void 0:S.transforms)!=null&&ce.length&&s.value.length>0){const de=c(S.transforms,s.value,a.value,l.value);M=jm(de.columns,de.rows)}else M=e.data.value;const C=Qs(M),O=[Le.BarVertical,Le.BarHorizontal,Le.Line,Le.VerticalBar,Le.HorizontalBar];if(C.series&&C.series.length>0&&O.includes(E)){const de=C.series.find(_e=>_e.name===e.selectedColumn.value);de&&(C.values=de.values),delete C.series}if(C.labels.length===0){Hse(t.value,"No data to preview");return}const P=n.value.allowDarkMode??!0,R=t.value.parentElement;R&&(!P&&u.value!=="light"?R.setAttribute("data-bs-theme","light"):R.removeAttribute("data-bs-theme"));const $=h!==f&&_!==h,A=S!=null&&S.chartTypeOptions?{...n.value,...S.chartTypeOptions}:n.value,L=(S==null?void 0:S.colorizes)??e.colorizes.value,B=S?S.highlights??[]:e._base.highlights.value,F=(S==null?void 0:S.areaFills)??e.areaFills.value,z=e._base.annotations.value,V=(S==null?void 0:S.annotations)??[],U=[...z,...V],ie=S!=null&&S.hiddenAnnotationIds?U.filter(de=>!de.id||!S.hiddenAnnotationIds.has(de.id)):U,ue=(S==null?void 0:S.seriesOverrides)??e.seriesOverrides.value,fe=S==null?void 0:S.properties,he={title:(fe==null?void 0:fe.title)??(e.title.value||void 0),description:(fe==null?void 0:fe.description)??(e.description.value||void 0),byline:e.byline.value||void 0,note:e.note.value||void 0,source:(fe==null?void 0:fe.source)??(e.source.value||void 0),sourceUrl:(fe==null?void 0:fe.sourceUrl)??(e.sourceUrl.value||void 0),showCredit:e.layout.value.showCredit,padding:`${e.layout.value.padding}px`,transparentBackground:e.layout.value.transparentBackground||void 0};b2(t.value,{chartType:E,data:C,options:A,frame:he,colorizes:L,highlights:B,areaFills:F,annotations:ie,seriesOverrides:ue,sort:A$(S)??e.sort.value,sortMode:e.sortMode.value!=="none"?e.sortMode.value:void 0,theme:d.value},{transition:$,ignoreLayout:!0}),h=_}Qi(t,II(b,Wse));const y=k(()=>JSON.stringify(e.layout.value)),x=k(()=>JSON.stringify(n.value));return Ve([t,e.chartType,e.title,e.data,e.sort,e.sortMode,e.description,e.byline,e.note,e.source,e.sourceUrl,e.selectedColumn,e.colorizes,e.highlights,e.areaFills,e.annotations,e.seriesOverrides,y,x,o,i,u,d],b,{immediate:!0,flush:"post"}),{config:e}}function Use(t,e){function n(){var s;return((s=t.value)==null?void 0:s.querySelector("svg"))??null}function o(){var s;return((s=t.value)==null?void 0:s.querySelector(".bc-frame"))??null}function r(){const s=(e==null?void 0:e.value)??o();if(s){Oie(s);return}const a=n();a&&Aie(a)}async function i(s=2){const a=o();if(a){const d=e!=null&&e.value?eT(e.value):void 0,f=e!=null&&e.value?Tie(e.value):void 0;await Mie(a,s,"chart.png",d,f);return}const l=n();if(!l)return;const{width:c,height:u}=l.getBoundingClientRect();await $ie(l,c*s,u*s)}return{downloadSvg:r,downloadPng:i}}const Gse=se({__name:"ExportPanel",setup(t){const e=dr(),{canvasMode:n,showDimensions:o}=At(e),{setViewMode:r}=e,{mode:i}=Zl();r("preview");const s=Km(),{exportTab:a}=At(s),{setExportTab:l,setLastNarrowExportTab:c}=s,{isNarrow:u}=qi();Ve(i,B=>{B==="drawer"&&a.value&&(c(a.value),l(""))},{immediate:!0});const{layout:d}=pn(),{cardClass:f,cardStyle:h}=O2(d,"export-panel__canvas__card"),g=pt("canvasRef"),b=pt("cardRef"),m=pt("previewRef");B2(m);const{downloadSvg:v,downloadPng:y}=Use(m,b),x=De(0),_=De(0);let S=0;function E(){globalThis.cancelAnimationFrame(S),S=globalThis.requestAnimationFrame(()=>{const B=b.value;if(B){const F=B.offsetLeft,z=B.offsetTop;(F!==x.value||z!==_.value)&&(x.value=F,_.value=z)}})}Qi(g,E),Qi(b,E);const M=k(()=>({"--grid-offset-x":`${x.value}px`,"--grid-offset-y":`${_.value}px`})),{lastNarrowExportTab:C}=At(s),O=k({get:()=>!!a.value,set:B=>{l(B?C.value:"")}});function P(B){c(B),l(B)}const{sections:R}=Q$(),$={embed:"Embed",download:"Download"},A=k(()=>$[a.value]??"Export"),L=k(()=>({[`export-panel__canvas--${n.value}`]:n.value!=="blueprint"}));return(B,F)=>{const z=rT,V=oT,U=M2,ie=jie,ue=zie,fe=T2,he=Xm,ce=pie;return w(),N("div",{class:$e(["export-panel",{"export-panel--narrow":p(u)}])},[T("div",{ref_key:"canvasRef",ref:g,class:$e(["export-panel__canvas",p(L)]),style:Pt(p(M))},[T("div",{ref_key:"cardRef",ref:b,class:$e(["export-panel__canvas__card",p(f)]),style:Pt(p(h))},[T("div",{ref_key:"previewRef",ref:m,class:"export-panel__canvas__preview w-100 h-100"},null,512)],6),p(o)?(w(),Q(z,{key:0,"card-ref":p(b),"canvas-ref":p(g),layout:p(d)},null,8,["card-ref","canvas-ref","layout"])):re("",!0),H(V)],6),H(he,{"drawer-open":p(O),"onUpdate:drawerOpen":F[0]||(F[0]=de=>Ke(O)?O.value=de:null),title:p(A),"container-ref":p(g)},hi({default:J(()=>[p(a)==="embed"?(w(),Q(ie,{key:0})):p(a)==="download"?(w(),Q(ue,{key:1,onDownloadPng:p(y),onDownloadSvg:p(v)},null,8,["onDownloadPng","onDownloadSvg"])):re("",!0)]),_:2},[p(i)==="drawer"?{name:"tabs",fn:J(()=>[H(U,{tabs:p(R),"model-value":p(a),sticky:"","onUpdate:modelValue":P},null,8,["tabs","model-value"])]),key:"0"}:void 0,p(i)!=="drawer"?{name:"footer",fn:J(()=>[H(fe)]),key:"1"}:void 0]),1032,["drawer-open","title","container-ref"]),p(u)?re("",!0):(w(),Q(ce,{key:0}))],2)}}}),qse=Be(Gse,[["__scopeId","data-v-6f293e9b"]]),Yse={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function jse(t,e){return w(),N("svg",Yse,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M87.24 52.59a8 8 0 0 0-14.48 0l-64 136a8 8 0 1 0 14.48 6.81L39.9 160h80.2l16.66 35.4a8 8 0 1 0 14.48-6.81ZM47.43 144L80 74.79L112.57 144ZM200 96c-12.76 0-22.73 3.47-29.63 10.32a8 8 0 0 0 11.26 11.36c3.8-3.77 10-5.68 18.37-5.68c13.23 0 24 9 24 20v3.22a42.76 42.76 0 0 0-24-7.22c-22.06 0-40 16.15-40 36s17.94 36 40 36a42.73 42.73 0 0 0 24-7.25a8 8 0 0 0 16-.75v-60c0-19.85-17.94-36-40-36m0 88c-13.23 0-24-9-24-20s10.77-20 24-20s24 9 24 20s-10.77 20-24 20"},null,-1)])])}const iT=Te({name:"ph-text-aa",render:jse}),Xse={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Kse(t,e){return w(),N("svg",Xse,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M200.77 53.89A103.27 103.27 0 0 0 128 24h-1.07A104 104 0 0 0 24 128c0 43 26.58 79.06 69.36 94.17A32 32 0 0 0 136 192a16 16 0 0 1 16-16h46.21a31.81 31.81 0 0 0 31.2-24.88a104.4 104.4 0 0 0 2.59-24a103.28 103.28 0 0 0-31.23-73.23m13 93.71a15.89 15.89 0 0 1-15.56 12.4H152a32 32 0 0 0-32 32a16 16 0 0 1-21.31 15.07C62.49 194.3 40 164 40 128a88 88 0 0 1 87.09-88h.9a88.35 88.35 0 0 1 88 87.25a89 89 0 0 1-2.18 20.35ZM140 76a12 12 0 1 1-12-12a12 12 0 0 1 12 12m-44 24a12 12 0 1 1-12-12a12 12 0 0 1 12 12m0 56a12 12 0 1 1-12-12a12 12 0 0 1 12 12m88-56a12 12 0 1 1-12-12a12 12 0 0 1 12 12"},null,-1)])])}const sT=Te({name:"ph-palette",render:Kse}),Zse={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Qse(t,e){return w(),N("svg",Zse,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M220.27 158.54a8 8 0 0 0-7.7-.46a20 20 0 1 1 0-36.16a8 8 0 0 0 11.43-7.23V72a16 16 0 0 0-16-16h-36.22a35 35 0 0 0 .22-4a36.1 36.1 0 0 0-11.36-26.24a36 36 0 0 0-60.55 23.62a36.6 36.6 0 0 0 .14 6.62H64a16 16 0 0 0-16 16v32.22a35 35 0 0 0-4-.22a36.12 36.12 0 0 0-26.24 11.36a35.7 35.7 0 0 0-9.69 27a36.08 36.08 0 0 0 33.31 33.6a35.7 35.7 0 0 0 6.62-.14V208a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16v-42.69a8 8 0 0 0-3.73-6.77M208 208H64v-42.69a8 8 0 0 0-11.43-7.23a20 20 0 1 1 0-36.16A8 8 0 0 0 64 114.69V72h46.69a8 8 0 0 0 7.23-11.43a20 20 0 1 1 36.16 0A8 8 0 0 0 161.31 72H208v32.23a35.7 35.7 0 0 0-6.62-.14A36 36 0 0 0 204 176a35 35 0 0 0 4-.22Z"},null,-1)])])}const Jse=Te({name:"ph-puzzle-piece",render:Qse}),eae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function tae(t,e){return w(),N("svg",eae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M222.16 177.25a8 8 0 0 1-1 11.25c-17.36 14.39-32.86 19.5-47 19.5c-18.58 0-34.82-8.82-49.93-17c-25.35-13.76-47.24-25.64-79.07.74a8 8 0 1 1-10.22-12.31c40.17-33.28 70.32-16.92 96.93-2.48c25.35 13.75 47.24 25.63 79.07-.74a8 8 0 0 1 11.22 1.04m-11.27-57c-31.83 26.38-53.72 14.5-79.07.74c-26.61-14.43-56.76-30.79-96.93 2.49a8 8 0 0 0 10.22 12.31c31.83-26.38 53.72-14.5 79.07-.74c15.11 8.19 31.35 17 49.93 17c14.14 0 29.64-5.11 47-19.5a8 8 0 1 0-10.22-12.31ZM45.11 79.8c31.83-26.37 53.72-14.49 79.07-.74c15.11 8.2 31.35 17 49.93 17c14.14 0 29.64-5.12 47-19.5a8 8 0 1 0-10.22-12.31c-31.83 26.38-53.72 14.5-79.07.74c-26.61-14.41-56.76-30.77-96.93 2.51a8 8 0 1 0 10.22 12.3"},null,-1)])])}const nae=Te({name:"ph-waves",render:tae}),oae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function rae(t,e){return w(),N("svg",oae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m229.66 197.66l-32 32a8 8 0 0 1-11.32-11.32L204.69 200H80a8 8 0 0 1-8-8V59.31L53.66 77.66a8 8 0 0 1-11.32-11.32l32-32a8 8 0 0 1 11.32 0l32 32a8 8 0 0 1-11.32 11.32L88 59.31V184h116.69l-18.35-18.34a8 8 0 0 1 11.32-11.32l32 32a8 8 0 0 1 0 11.32"},null,-1)])])}const iae=Te({name:"ph-vector-two",render:rae}),sae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function aae(t,e){return w(),N("svg",sae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m235.32 81.37l-60.69-60.68a16 16 0 0 0-22.63 0l-53.63 53.8c-10.66-3.34-35-7.37-60.4 13.14a16 16 0 0 0-1.29 23.78L85 159.71l-42.66 42.63a8 8 0 0 0 11.32 11.32L96.29 171l48.29 48.29A16 16 0 0 0 155.9 224h1.13a15.93 15.93 0 0 0 11.64-6.33c19.64-26.1 17.75-47.32 13.19-60L235.33 104a16 16 0 0 0-.01-22.63M224 92.69l-57.27 57.46a8 8 0 0 0-1.49 9.22c9.46 18.93-1.8 38.59-9.34 48.62L48 100.08c12.08-9.74 23.64-12.31 32.48-12.31A40.1 40.1 0 0 1 96.81 91a8 8 0 0 0 9.25-1.51L163.32 32L224 92.68Z"},null,-1)])])}const lae=Te({name:"ph-push-pin",render:aae}),cae=["showVerticalAxis","verticalAxisDirection","showVerticalTicks","verticalLabelPosition","verticalGridStyle","verticalNumberFormat","verticalScaleType","verticalRangeMin","verticalRangeMax","showHorizontalAxis","showHorizontalTicks","horizontalLabelPosition","horizontalGridStyle","horizontalNumberFormat","horizontalScaleType","horizontalRangeMin","horizontalRangeMax"];function aT(){const{chartType:t}=pn(),{availableOptionKeys:e}=kn(),{scenes:n}=_n(),o=k(()=>e.value.some(s=>cae.includes(s))),r=k(()=>e.value.includes("tooltips")||e.value.includes("crosshair")||n.value.length>=1);return{sections:k(()=>{const s=[{key:"type",label:"Type",icon:ks,tooltip:"Chart Type"},{key:"text",label:"Text",icon:iT},{key:"style",label:"Style",icon:sT}];return["line-multi","bar-multi","bar-split"].includes(t.value)&&s.push({key:"series",label:"Series",icon:nae}),o.value&&s.push({key:"axes",label:"Axes",icon:iae}),s.push({key:"layout",label:"Layout",icon:Jse}),s.push({key:"annotate",label:"Annotate",icon:lae}),r.value&&s.push({key:"interactions",label:"Interactions",icon:Y$}),s})}}const uae=se({__name:"ChartEditIconRail",setup(t){const e=dr(),{activeTab:n}=At(e),{selectTab:o}=e,{toggleMode:r}=Zl(),{sections:i}=aT(),s=k(()=>i.value.map(a=>({value:a.key,icon:a.icon,tooltip:a.tooltip??a.label})));return(a,l)=>{const c=A2;return w(),Q(c,{"active-tab":p(n),items:p(s),onSelect:p(o),onToggleMode:p(r)},null,8,["active-tab","items","onSelect","onToggleMode"])}}}),dae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function fae(t,e){return w(),N("svg",dae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M90.34 61.66a8 8 0 0 1 0-11.32l32-32a8 8 0 0 1 11.32 0l32 32a8 8 0 0 1-11.32 11.32L136 43.31V96a8 8 0 0 1-16 0V43.31l-18.34 18.35a8 8 0 0 1-11.32 0m64 132.68L136 212.69V160a8 8 0 0 0-16 0v52.69l-18.34-18.35a8 8 0 0 0-11.32 11.32l32 32a8 8 0 0 0 11.32 0l32-32a8 8 0 0 0-11.32-11.32m83.32-72l-32-32a8 8 0 0 0-11.32 11.32L212.69 120H160a8 8 0 0 0 0 16h52.69l-18.35 18.34a8 8 0 0 0 11.32 11.32l32-32a8 8 0 0 0 0-11.32M43.31 136H96a8 8 0 0 0 0-16H43.31l18.35-18.34a8 8 0 0 0-11.32-11.32l-32 32a8 8 0 0 0 0 11.32l32 32a8 8 0 0 0 11.32-11.32Z"},null,-1)])])}const hae=Te({name:"ph-arrows-out-cardinal",render:fae}),pae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function mae(t,e){return w(),N("svg",pae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M165.66 194.34a8 8 0 0 1 0 11.32l-32 32a8 8 0 0 1-11.32 0l-32-32a8 8 0 0 1 11.32-11.32L120 212.69V43.31l-18.34 18.35a8 8 0 0 1-11.32-11.32l32-32a8 8 0 0 1 11.32 0l32 32a8 8 0 0 1-11.32 11.32L136 43.31v169.38l18.34-18.35a8 8 0 0 1 11.32 0"},null,-1)])])}const lT=Te({name:"ph-arrows-vertical",render:mae}),gae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function vae(t,e){return w(),N("svg",gae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m237.66 133.66l-32 32a8 8 0 0 1-11.32-11.32L212.69 136H43.31l18.35 18.34a8 8 0 0 1-11.32 11.32l-32-32a8 8 0 0 1 0-11.32l32-32a8 8 0 0 1 11.32 11.32L43.31 120h169.38l-18.35-18.34a8 8 0 0 1 11.32-11.32l32 32a8 8 0 0 1 0 11.32"},null,-1)])])}const cT=Te({name:"ph-arrows-horizontal",render:vae}),bae={viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"};function yae(t,e){return w(),N("svg",bae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M2 9.75A.75.75 0 0 1 2.75 9h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 9.75"},null,-1)])])}const L2=Te({name:"fluent-line-horizontal-1-20-filled",render:yae}),xae={viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"};function wae(t,e){return w(),N("svg",xae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M2 9.75A.75.75 0 0 1 2.75 9h2.5a.75.75 0 0 1 0 1.5h-2.5A.75.75 0 0 1 2 9.75m6 0A.75.75 0 0 1 8.75 9h2.5a.75.75 0 0 1 0 1.5h-2.5A.75.75 0 0 1 8 9.75m6 0a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75"},null,-1)])])}const uT=Te({name:"fluent-line-horizontal-1-dashes-20-filled",render:wae}),_ae={viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"};function Sae(t,e){return w(),N("svg",_ae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M3.5 11a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3M8 11a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m4.5 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m6-1.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0"},null,-1)])])}const dT=Te({name:"fluent-line-horizontal-1-dot-20-filled",render:Sae}),kae={class:"d-flex flex-column gap-3"},Cae=se({__name:"EditorInteractionSection",setup(t){const{currentOptions:e,availableOptionKeys:n,setOption:o}=kn(),{layout:r}=pn(),{scenes:i}=_n(),s=k(()=>n.value.includes("tooltips")),a=k(()=>n.value.includes("crosshair")),l=k(()=>i.value.length>=1),c=[{value:"both",text:"Both",icon:hae},{value:"vertical",text:"Vertical",icon:lT},{value:"horizontal",text:"Horizontal",icon:cT}],u=[{value:"solid",text:"Solid",icon:L2},{value:"dashed",text:"Dashed",icon:uT},{value:"dotted",text:"Dotted",icon:dT}],d=k({get:()=>r.value.playerType,set:b=>{r.value.playerType=b}}),f=k({get:()=>r.value.playerPosition,set:b=>{r.value.playerPosition=b}}),h=[{value:"buttons",label:"Buttons"},{value:"progress-bar",label:"Progress Bar"},{value:"dot-stepper",label:"Dot Stepper"},{value:"minimal-arrows",label:"Minimal Arrows"},{value:"none",label:"None"}],g=[{value:"left",text:"Left"},{value:"center",text:"Center"},{value:"right",text:"Right"}];return(b,m)=>(w(),N("div",kae,[p(s)?(w(),Q(p(Qt),{key:0,"model-value":p(e).tooltips??!1,label:"Tooltips","onUpdate:modelValue":m[0]||(m[0]=v=>p(o)("tooltips",v))},null,8,["model-value"])):re("",!0),p(a)?(w(),Q(p(Qt),{key:1,"model-value":p(e).crosshair??!1,label:"Crosshair","onUpdate:modelValue":m[1]||(m[1]=v=>p(o)("crosshair",v))},null,8,["model-value"])):re("",!0),p(a)&&p(e).crosshair?(w(),N(Re,{key:2},[H(p($n),{label:"Direction","model-value":p(e).crosshairDirection??"both",options:c,block:"","onUpdate:modelValue":m[2]||(m[2]=v=>p(o)("crosshairDirection",v))},null,8,["model-value"]),H(p($n),{label:"Line style","model-value":p(e).crosshairStyle??"dashed",options:u,block:"","onUpdate:modelValue":m[3]||(m[3]=v=>p(o)("crosshairStyle",v))},null,8,["model-value"]),H(p(Aa),{id:"opt-crosshair-color",label:"Color","model-value":p(e).crosshairColor??"#999999","onUpdate:modelValue":m[4]||(m[4]=v=>p(o)("crosshairColor",v))},null,8,["model-value"])],64)):re("",!0),p(l)?(w(),N(Re,{key:3},[H(p(En),{id:"layout-player-type",modelValue:p(d),"onUpdate:modelValue":m[5]||(m[5]=v=>Ke(d)?d.value=v:null),label:"Scene player",options:h,block:""},null,8,["modelValue"]),p(d)==="buttons"||p(d)==="dot-stepper"||p(d)==="minimal-arrows"?(w(),Q(p($n),{key:0,modelValue:p(f),"onUpdate:modelValue":m[6]||(m[6]=v=>Ke(f)?f.value=v:null),label:"Player position",options:g,block:""},null,8,["modelValue"])):re("",!0)],64)):re("",!0)]))}}),Aae={},$ae={class:"d-flex flex-column gap-3"};function Tae(t,e){const n=Cae;return w(),N("div",$ae,[H(n)])}const Mae=Be(Aae,[["render",Tae]]),Oae={class:"border rounded overflow-hidden bg-body-tertiary"},Bae={class:"d-flex align-items-center justify-content-between px-2 py-1 border-bottom"},Lae={class:"fw-medium"},Pae={class:"p-2 d-flex flex-column gap-2"},Dae={class:"d-flex align-items-center gap-2"},Eae={class:"text-nowrap",style:{width:"3em"}},Iae=se({__name:"EditorAreaFillItem",props:nt({id:{},seriesNames:{}},{fill:{required:!0},fillModifiers:{}}),emits:nt(["remove"],["update:fill"]),setup(t){const e=t,n=ft(t,"fill"),o=k(()=>e.seriesNames.map(s=>({value:s,text:s}))),r=[{value:"linear",text:"Linear"},{value:"monotoneX",text:"Monotone"},{value:"step",text:"Step"},{value:"basis",text:"Basis"},{value:"cardinal",text:"Cardinal"},{value:"catmullRom",text:"Catmull-Rom"}];function i(s,a){const l={...n.value};a===void 0?delete l[s]:l[s]=a,n.value=l}return(s,a)=>{const l=Uo,c=Ra,u=On,d=qs,f=Os;return w(),N("div",Oae,[T("div",Bae,[T("small",Lae,ye(n.value.from)+" – "+ye(n.value.to),1),H(l,{variant:"link",size:"sm",class:"text-danger p-0",onClick:a[0]||(a[0]=h=>s.$emit("remove"))},{default:J(()=>[...a[8]||(a[8]=[T("span",{"aria-hidden":"true"},"×",-1)])]),_:1})]),T("div",Pae,[H(u,{label:"From","label-for":`af-from-${t.id}`},{default:J(()=>[H(c,{id:`af-from-${t.id}`,"model-value":n.value.from,options:p(o),"onUpdate:modelValue":a[1]||(a[1]=h=>i("from",h))},null,8,["id","model-value","options"])]),_:1},8,["label-for"]),H(u,{label:"To","label-for":`af-to-${t.id}`},{default:J(()=>[H(c,{id:`af-to-${t.id}`,"model-value":n.value.to,options:p(o),"onUpdate:modelValue":a[2]||(a[2]=h=>i("to",h))},null,8,["id","model-value","options"])]),_:1},8,["label-for"]),H(u,{label:"Color","label-for":`af-color-${t.id}`},{default:J(()=>[H(d,{id:`af-color-${t.id}`,type:"color","model-value":n.value.color??"#cccccc","onUpdate:modelValue":a[3]||(a[3]=h=>i("color",h))},null,8,["id","model-value"])]),_:1},8,["label-for"]),H(u,null,{default:J(()=>[H(f,{"model-value":!!n.value.negativeColor,switch:"","onUpdate:modelValue":a[4]||(a[4]=h=>i("negativeColor",h?"#f28e2b":void 0))},{default:J(()=>[...a[9]||(a[9]=[Ue(" Use different color for negative differences ",-1)])]),_:1},8,["model-value"])]),_:1}),n.value.negativeColor?(w(),Q(u,{key:0,label:"Negative color","label-for":`af-neg-color-${t.id}`},{default:J(()=>[H(d,{id:`af-neg-color-${t.id}`,type:"color","model-value":n.value.negativeColor,"onUpdate:modelValue":a[5]||(a[5]=h=>i("negativeColor",h))},null,8,["id","model-value"])]),_:1},8,["label-for"])):re("",!0),H(u,{label:"Opacity","label-for":`af-opacity-${t.id}`},{default:J(()=>[T("div",Dae,[H(d,{id:`af-opacity-${t.id}`,type:"range","model-value":String(n.value.opacity??30),min:"0",max:"100",class:"flex-grow-1","onUpdate:modelValue":a[6]||(a[6]=h=>i("opacity",Number(h)))},null,8,["id","model-value"]),T("small",Eae,ye(n.value.opacity??30)+"%",1)])]),_:1},8,["label-for"]),H(u,{label:"Interpolation","label-for":`af-interp-${t.id}`},{default:J(()=>[H(c,{id:`af-interp-${t.id}`,"model-value":n.value.interpolation??"linear",options:r,"onUpdate:modelValue":a[7]||(a[7]=h=>i("interpolation",h))},null,8,["id","model-value"])]),_:1},8,["label-for"])])])}}}),Nae={class:"d-flex flex-column gap-2"},Rae=se({__name:"EditorAreaFills",props:nt({seriesNames:{},seriesOverrides:{},globalInterpolation:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=ft(t,"modelValue"),o=k(()=>n.value);function r(a,l){const c=[...o.value];c[a]=l,n.value=c}function i(){const a=e.seriesNames[0]??"",l=e.seriesNames[1]??e.seriesNames[0]??"",c=s2(a,e.globalInterpolation,e.seriesOverrides);n.value=[...o.value,{from:a,to:l,color:"#cccccc",opacity:30,interpolation:c}]}function s(a){const l=[...o.value];l.splice(a,1),n.value=l}return(a,l)=>{const c=Iae;return w(),N(Re,null,[T("div",Nae,[(w(!0),N(Re,null,mt(p(o),(u,d)=>(w(),Q(c,{id:d,key:d,fill:u,"series-names":t.seriesNames,"onUpdate:fill":f=>r(d,f),onRemove:f=>s(d)},null,8,["id","fill","series-names","onUpdate:fill","onRemove"]))),128))]),H(p(yl),{label:"Add",onClick:i})],64)}}}),Fae={class:"d-flex flex-column gap-3"},Vae=se({__name:"EditorHighlightSection",setup(t){const{chartType:e,data:n,highlights:o}=pn(),r=k(()=>Qs(n.value)),i=k(()=>[Le.LineMulti,Le.AreaStacked].includes(e.value)),s=k(()=>{var u;return i.value?((u=r.value.series)==null?void 0:u.map(d=>d.name))??[]:r.value.labels}),a=De(o.value.length>0),l=k({get(){return o.value.map(u=>u.target)},set(u){o.value=u.map(d=>({target:d}))}});function c(u){a.value=u,u||(o.value=[])}return(u,d)=>(w(),N("div",Fae,[H(p(Qt),{"model-value":p(a),label:"Highlight specific items","onUpdate:modelValue":c},null,8,["model-value"]),p(a)?(w(),Q(p($y),{key:0,selected:p(l),"onUpdate:selected":d[0]||(d[0]=f=>Ke(l)?l.value=f:null),items:p(s)},null,8,["selected","items"])):re("",!0)]))}}),zae=Po("previewContainer",()=>({containerRef:Ie(null)}));function fT(){const t=zae();return At(t)}const Hae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Wae(t,e){return w(),N("svg",Hae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M174 47.75a254.2 254.2 0 0 0-41.45-38.3a8 8 0 0 0-9.18 0A254.2 254.2 0 0 0 82 47.75C54.51 79.32 40 112.6 40 144a88 88 0 0 0 176 0c0-31.4-14.51-64.68-42-96.25M200 144a71 71 0 0 1-.46 8H136v-16h63.64q.36 4 .36 8m-16.61-56H136V72h36.89a176 176 0 0 1 10.5 16M136 200h37.19A71.67 71.67 0 0 1 136 215.54Zm0-16v-16h59.87a72 72 0 0 1-8 16Zm0-64v-16h55.39a117 117 0 0 1 5.45 16Zm23.89-64H136V32.6A257 257 0 0 1 159.89 56M56 144c0-50 42.26-92.71 64-111.4v182.94A72.08 72.08 0 0 1 56 144"},null,-1)])])}const Uae=Te({name:"ph-drop-half",render:Wae}),Gae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function qae(t,e){return w(),N("svg",Gae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M201.54 54.46A104 104 0 0 0 54.46 201.54A104 104 0 0 0 201.54 54.46M96 210v-58h64v58a88.33 88.33 0 0 1-64 0m48-74h-32v-35.06l32-16Zm46.22 54.22A88 88 0 0 1 176 201.77V152a16 16 0 0 0-16-16V72a8 8 0 0 0-11.58-7.16l-48 24A8 8 0 0 0 96 96v40a16 16 0 0 0-16 16v49.77a88 88 0 1 1 110.22-11.55"},null,-1)])])}const Yae=Te({name:"ph-highlighter-circle",render:qae}),jae={class:"d-flex flex-column gap-2"},Xae={class:"d-flex gap-2"},Kae=se({__name:"EditorAnnotationFree",props:nt({chartWidth:{},chartHeight:{}},{annotation:{required:!0},annotationModifiers:{}}),emits:["update:annotation"],setup(t){const e=ft(t,"annotation");function n(s){return typeof s=="number"?`${s}%`:String(s)}function o(s){return s==null?"150px":typeof s=="number"?`${s}px`:String(s)}function r(s,a){const l={...e.value};a===void 0?delete l[s]:l[s]=a,e.value=l}const i=Ie(null);return hn(()=>{var a;const s=(a=i.value)==null?void 0:a.$el;s&&(s.focus(),s.select())}),(s,a)=>{const l=cy,c=On;return w(),N("div",jae,[H(c,{label:"Text"},{default:J(()=>[H(l,{ref_key:"textRef",ref:i,"model-value":e.value.text,placeholder:"Annotation text",rows:"2","onUpdate:modelValue":a[0]||(a[0]=u=>r("text",u))},null,8,["model-value"])]),_:1}),T("div",Xae,[H(p(Ih),{id:"ann-free-x","model-value":n(e.value.x),label:"X position",min:"-50",max:String(t.chartWidth??600),step:"0.1",units:["%","px"],"no-slider":"","center-relative":"",class:"flex-fill","onUpdate:modelValue":a[1]||(a[1]=u=>r("x",u))},null,8,["model-value","max"]),H(p(Ih),{id:"ann-free-y","model-value":n(e.value.y),label:"Y position",min:"-50",max:String(t.chartHeight??400),step:"0.1",units:["%","px"],"no-slider":"","center-relative":"",class:"flex-fill","onUpdate:modelValue":a[2]||(a[2]=u=>r("y",u))},null,8,["model-value","max"])]),H(p(Aa),{id:"ann-free-text-color","model-value":e.value.textColor??"#000000",label:"Text color","onUpdate:modelValue":a[3]||(a[3]=u=>r("textColor",u))},null,8,["model-value"]),H(p(Qt),{"model-value":e.value.textOutline??!0,label:"Text outline","onUpdate:modelValue":a[4]||(a[4]=u=>r("textOutline",u))},null,8,["model-value"]),H(p(Ih),{id:"ann-free-max-width","model-value":o(e.value.maxWidth),label:"Max width",min:"0",max:String(t.chartWidth??600),units:["px","%"],"onUpdate:modelValue":a[5]||(a[5]=u=>r("maxWidth",u))},null,8,["model-value","max"])])}}}),Zae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Qae(t,e){return w(),N("svg",Zae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M48 40v176a8 8 0 0 1-16 0V40a8 8 0 0 1 16 0m16 64V64a16 16 0 0 1 16-16h96a16 16 0 0 1 16 16v40a16 16 0 0 1-16 16H80a16 16 0 0 1-16-16m16 0h96V64H80Zm152 48v40a16 16 0 0 1-16 16H80a16 16 0 0 1-16-16v-40a16 16 0 0 1 16-16h136a16 16 0 0 1 16 16m-16 40v-40H80v40z"},null,-1)])])}const Zd=Te({name:"ph-align-left",render:Qae}),Jae={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function ele(t,e){return w(),N("svg",Jae,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M208 136h-72v-16h48a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16h-48V32a8 8 0 0 0-16 0v16H72a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h48v16H48a16 16 0 0 0-16 16v40a16 16 0 0 0 16 16h72v16a8 8 0 0 0 16 0v-16h72a16 16 0 0 0 16-16v-40a16 16 0 0 0-16-16M72 64h112v40H72Zm136 128H48v-40h160z"},null,-1)])])}const n0=Te({name:"ph-align-center-horizontal",render:ele}),tle={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function nle(t,e){return w(),N("svg",tle,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 40v176a8 8 0 0 1-16 0V40a8 8 0 0 1 16 0m-32 24v40a16 16 0 0 1-16 16H80a16 16 0 0 1-16-16V64a16 16 0 0 1 16-16h96a16 16 0 0 1 16 16m-16 0H80v40h96Zm16 88v40a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16v-40a16 16 0 0 1 16-16h136a16 16 0 0 1 16 16m-16 0H40v40h136Z"},null,-1)])])}const Qd=Te({name:"ph-align-right",render:nle}),ole={class:"d-flex flex-column gap-2"},rle={class:"d-flex gap-2"},ile={key:0,class:"d-flex gap-2"},sle=se({__name:"EditorAnnotationRange",props:nt({labels:{}},{annotation:{required:!0},annotationModifiers:{}}),emits:["update:annotation"],setup(t){const e=t,n=ft(t,"annotation"),o=[{value:"vertical",text:"Vertical"},{value:"horizontal",text:"Horizontal"}],r=k(()=>(n.value.orientation??"vertical")==="vertical"&&e.labels.length>0),i=k(()=>e.labels.map(l=>({value:l,text:l})));function s(l,c){const u={...n.value};c===void 0?delete u[l]:u[l]=c,n.value=u}const a=Ie(null);return hn(()=>{var c;const l=(c=a.value)==null?void 0:c.$el;l&&(l.focus(),l.select())}),(l,c)=>{const u=qs,d=On,f=Ra;return w(),N("div",ole,[H(d,{label:"Text"},{default:J(()=>[H(u,{ref_key:"textRef",ref:a,"model-value":n.value.text??"",placeholder:"Optional label","onUpdate:modelValue":c[0]||(c[0]=h=>s("text",h||void 0))},null,8,["model-value"])]),_:1}),H(d,{label:"Orientation"},{default:J(()=>[H(f,{"model-value":n.value.orientation??"vertical",options:o,"onUpdate:modelValue":c[1]||(c[1]=h=>s("orientation",h))},null,8,["model-value"])]),_:1}),T("div",rle,[H(d,{label:"Start",class:"flex-fill"},{default:J(()=>[p(r)?(w(),Q(f,{key:0,"model-value":String(n.value.start),options:p(i),"onUpdate:modelValue":c[2]||(c[2]=h=>s("start",h))},null,8,["model-value","options"])):(w(),Q(u,{key:1,"model-value":String(n.value.start),"onUpdate:modelValue":c[3]||(c[3]=h=>s("start",isNaN(Number(h))?h:Number(h)))},null,8,["model-value"]))]),_:1}),H(d,{label:"End",class:"flex-fill"},{default:J(()=>[p(r)?(w(),Q(f,{key:0,"model-value":String(n.value.end),options:p(i),"onUpdate:modelValue":c[4]||(c[4]=h=>s("end",h))},null,8,["model-value","options"])):(w(),Q(u,{key:1,"model-value":String(n.value.end),"onUpdate:modelValue":c[5]||(c[5]=h=>s("end",isNaN(Number(h))?h:Number(h)))},null,8,["model-value"]))]),_:1})]),p(r)?(w(),N("div",ile,[H(p(En),{id:`ann-range-start-anchor-${l.$.uid}`,"model-value":n.value.startAnchor??"center",label:"Start anchor","light-label":"",block:"",class:"flex-fill","onUpdate:modelValue":c[6]||(c[6]=h=>s("startAnchor",h))},{default:J(()=>[H(p(ic),{value:"start",label:"Start"},{icon:J(()=>[H(p(Zd))]),_:1}),H(p(ic),{value:"center",label:"Center"},{icon:J(()=>[H(p(n0))]),_:1}),H(p(ic),{value:"end",label:"End"},{icon:J(()=>[H(p(Qd))]),_:1})]),_:1},8,["id","model-value"]),H(p(En),{id:`ann-range-end-anchor-${l.$.uid}`,"model-value":n.value.endAnchor??"center",label:"End anchor","light-label":"",block:"",class:"flex-fill","onUpdate:modelValue":c[7]||(c[7]=h=>s("endAnchor",h))},{default:J(()=>[H(p(ic),{value:"start",label:"Start"},{icon:J(()=>[H(p(Zd))]),_:1}),H(p(ic),{value:"center",label:"Center"},{icon:J(()=>[H(p(n0))]),_:1}),H(p(ic),{value:"end",label:"End"},{icon:J(()=>[H(p(Qd))]),_:1})]),_:1},8,["id","model-value"])])):re("",!0),H(p(Aa),{id:"ann-range-bg-color","model-value":n.value.bgColor??"#cccccc",label:"Background color","onUpdate:modelValue":c[8]||(c[8]=h=>s("bgColor",h))},null,8,["model-value"]),H(p(yr),{id:"ann-range-bg-opacity","model-value":String(n.value.bgOpacity??20),label:"Background opacity",min:"0",max:"100",suffix:"%","onUpdate:modelValue":c[9]||(c[9]=h=>s("bgOpacity",Number(h)))},null,8,["model-value"]),n.value.text?(w(),N(Re,{key:1},[H(p(Aa),{id:"ann-range-text-color","model-value":n.value.textColor??"#000000",label:"Text color","onUpdate:modelValue":c[10]||(c[10]=h=>s("textColor",h))},null,8,["model-value"]),H(p(X4),{"model-value":n.value.direction??"center",label:"Direction","onUpdate:modelValue":c[11]||(c[11]=h=>s("direction",h))},null,8,["model-value"])],64)):re("",!0)])}}}),ale={viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"};function lle(t,e){return w(),N("svg",ale,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M6 15.25c0 .414.336.75.75.75h4.5c1.586 0 2.696-.621 3.53-1.588C15.6 13.46 16 12.216 16 11s-.3-2.46-1.12-3.412C14.046 6.621 12.836 6 11.25 6H6.56l2.22-2.22a.75.75 0 0 0-1.06-1.06l-3.5 3.5a.75.75 0 0 0 .02 1.08l3.5 3.25a.75.75 0 0 0 1.02-1.1L6.66 7.5h4.59c1.164 0 1.86.441 2.4 1.068c.554.642.85 1.523.85 2.432s-.296 1.79-.85 2.432c-.54.627-1.236 1.068-2.4 1.068h-4.5a.75.75 0 0 0-.75.75"},null,-1)])])}const cle=Te({name:"fluent-arrow-hook-up-left-20-filled",render:lle}),ule={viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"};function dle(t,e){return w(),N("svg",ule,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M9 6c.06 0-.06-.002 0 0c.023-.002.227 0 .25 0h4.393l-2.268-2.268a.75.75 0 1 1 1.061-1.06l3.353 3.352a.75.75 0 0 1 .212.639a.75.75 0 0 1-.215.443l-3.247 3.248a.75.75 0 1 1-1.06-1.061L13.27 7.5H9a3.5 3.5 0 1 0 0 7h4.25a.75.75 0 0 1 0 1.5H9A5 5 0 0 1 9 6"},null,-1)])])}const fle=Te({name:"fluent-arrow-hook-up-right-20-filled",render:dle}),hle={viewBox:"0 0 20 20",width:"1.2em",height:"1.2em"};function ple(t,e){return w(),N("svg",hle,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M16.78 10.72a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V7A1.5 1.5 0 0 0 10 5.5H3.75a.75.75 0 0 1 0-1.5H10a3 3 0 0 1 3 3v6.44l2.72-2.72a.75.75 0 0 1 1.06 0"},null,-1)])])}const mle=Te({name:"fluent-arrow-turn-right-down-20-filled",render:ple}),gle={class:"d-flex flex-column gap-2"},vle={class:"d-flex flex-column gap-2 mt-2"},ble={class:"d-flex flex-column gap-2 mt-2"},yle=se({__name:"EditorAnnotationPoint",props:nt({labels:{},chartWidth:{}},{annotation:{required:!0},annotationModifiers:{}}),emits:["update:annotation"],setup(t){const e=t,n=ft(t,"annotation"),o=k(()=>e.labels.map(l=>({value:l,text:l}))),r=[{value:"solid",text:"Solid"},{value:"dotted",text:"Dotted"},{value:"dashed",text:"Dashed"}];function i(l){return l==null?"150px":typeof l=="number"?`${l}px`:String(l)}function s(l,c){const u={...n.value};c===void 0?delete u[l]:u[l]=c,n.value=u}const a=Ie(null);return hn(()=>{var c;const l=(c=a.value)==null?void 0:c.$el;l&&(l.focus(),l.select())}),(l,c)=>{const u=cy,d=On,f=Ra,h=qs,g=Os;return w(),N("div",gle,[H(d,{label:"Text"},{default:J(()=>[H(u,{ref_key:"textRef",ref:a,"model-value":n.value.text,placeholder:"Annotation text",rows:"2","onUpdate:modelValue":c[0]||(c[0]=b=>s("text",b))},null,8,["model-value"])]),_:1}),H(d,{label:"Target"},{default:J(()=>[H(f,{"model-value":n.value.target,options:p(o),"onUpdate:modelValue":c[1]||(c[1]=b=>s("target",b))},null,8,["model-value","options"])]),_:1}),H(p(Aa),{id:"ann-point-text-color","model-value":n.value.textColor??"#000000",label:"Text color","onUpdate:modelValue":c[2]||(c[2]=b=>s("textColor",b))},null,8,["model-value"]),H(p(Qt),{"model-value":n.value.textOutline??!0,label:"Text outline","onUpdate:modelValue":c[3]||(c[3]=b=>s("textOutline",b))},null,8,["model-value"]),H(p(Ih),{id:"ann-point-max-width","model-value":i(n.value.maxWidth),label:"Max width",min:"0",max:String(t.chartWidth??600),units:["px","%"],"onUpdate:modelValue":c[4]||(c[4]=b=>s("maxWidth",b))},null,8,["model-value","max"]),H(p(Qt),{"model-value":n.value.showLine??!0,label:"Show line","onUpdate:modelValue":c[10]||(c[10]=b=>s("showLine",b))},hi({_:2},[n.value.showLine?{name:"section",fn:J(()=>[T("div",vle,[H(p($n),{"model-value":n.value.lineStyle??"direct",label:"Line style",block:"","onUpdate:modelValue":c[5]||(c[5]=b=>s("lineStyle",b))},{default:J(()=>[H(p(jf),{value:"direct",text:"Direct","icon-left":p(L2)},null,8,["icon-left"]),H(p(jf),{value:"curve-left",text:"Curve left","icon-left":p(cle)},null,8,["icon-left"]),H(p(jf),{value:"curve-right",text:"Curve right","icon-left":p(fle)},null,8,["icon-left"]),H(p(jf),{value:"elbow",text:"Elbow","icon-left":p(mle)},null,8,["icon-left"])]),_:1},8,["model-value"]),H(d,{label:"Line weight"},{default:J(()=>[H(h,{"model-value":String(n.value.lineWeight??1),type:"number",min:"1",max:"10","onUpdate:modelValue":c[6]||(c[6]=b=>s("lineWeight",Number(b)))},null,8,["model-value"])]),_:1}),H(p(X4),{"model-value":n.value.anchorDirection??"N",label:"Anchor position","onUpdate:modelValue":c[7]||(c[7]=b=>s("anchorDirection",b))},null,8,["model-value"]),H(d,null,{default:J(()=>[H(g,{"model-value":n.value.showArrow??!0,switch:"","onUpdate:modelValue":c[8]||(c[8]=b=>s("showArrow",b))},{default:J(()=>[...c[14]||(c[14]=[Ue(" Show arrow ",-1)])]),_:1},8,["model-value"])]),_:1}),H(d,{label:"Line target distance"},{default:J(()=>[H(h,{"model-value":String(n.value.lineTargetDistance??0),type:"number","onUpdate:modelValue":c[9]||(c[9]=b=>s("lineTargetDistance",Number(b)))},null,8,["model-value"])]),_:1})])]),key:"0"}:void 0]),1032,["model-value"]),H(p(Qt),{"model-value":n.value.showCircle??!1,label:"Show circle","onUpdate:modelValue":c[13]||(c[13]=b=>s("showCircle",b))},hi({_:2},[n.value.showCircle?{name:"section",fn:J(()=>[T("div",ble,[H(d,{label:"Circle size"},{default:J(()=>[H(h,{"model-value":String(n.value.circleSize??4),type:"number",min:"1","onUpdate:modelValue":c[11]||(c[11]=b=>s("circleSize",Number(b)))},null,8,["model-value"])]),_:1}),H(d,{label:"Circle style"},{default:J(()=>[H(f,{"model-value":n.value.circleStyle??"solid",options:r,"onUpdate:modelValue":c[12]||(c[12]=b=>s("circleStyle",b))},null,8,["model-value"])]),_:1})])]),key:"0"}:void 0]),1032,["model-value"])])}}}),xle={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function wle(t,e){return w(),N("svg",xle,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M247.31 124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57 61.26 162.88 48 128 48S61.43 61.26 36.34 86.35C17.51 105.18 9 124 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208s66.57-13.26 91.66-38.34c18.83-18.83 27.3-37.61 27.65-38.4a8 8 0 0 0 0-6.5M128 192c-30.78 0-57.67-11.19-79.93-33.25A133.5 133.5 0 0 1 25 128a133.3 133.3 0 0 1 23.07-30.75C70.33 75.19 97.22 64 128 64s57.67 11.19 79.93 33.25A133.5 133.5 0 0 1 231.05 128c-7.21 13.46-38.62 64-103.05 64m0-112a48 48 0 1 0 48 48a48.05 48.05 0 0 0-48-48m0 80a32 32 0 1 1 32-32a32 32 0 0 1-32 32"},null,-1)])])}const hT=Te({name:"ph-eye",render:wle}),_le={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Sle(t,e){return w(),N("svg",_le,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M53.92 34.62a8 8 0 1 0-11.84 10.76l19.24 21.17C25 88.84 9.38 123.2 8.69 124.76a8 8 0 0 0 0 6.5c.35.79 8.82 19.57 27.65 38.4C61.43 194.74 93.12 208 128 208a127.1 127.1 0 0 0 52.07-10.83l22 24.21a8 8 0 1 0 11.84-10.76Zm47.33 75.84l41.67 45.85a32 32 0 0 1-41.67-45.85M128 192c-30.78 0-57.67-11.19-79.93-33.25A133.2 133.2 0 0 1 25 128c4.69-8.79 19.66-33.39 47.35-49.38l18 19.75a48 48 0 0 0 63.66 70l14.73 16.2A112 112 0 0 1 128 192m6-95.43a8 8 0 0 1 3-15.72a48.16 48.16 0 0 1 38.77 42.64a8 8 0 0 1-7.22 8.71a6 6 0 0 1-.75 0a8 8 0 0 1-8-7.26A32.09 32.09 0 0 0 134 96.57m113.28 34.69c-.42.94-10.55 23.37-33.36 43.8a8 8 0 1 1-10.67-11.92a132.8 132.8 0 0 0 27.8-35.14a133.2 133.2 0 0 0-23.12-30.77C185.67 75.19 158.78 64 128 64a118.4 118.4 0 0 0-19.36 1.57A8 8 0 1 1 106 49.79A134 134 0 0 1 128 48c34.88 0 66.57 13.26 91.66 38.35c18.83 18.83 27.3 37.62 27.65 38.41a8 8 0 0 1 0 6.5Z"},null,-1)])])}const Jd=Te({name:"ph-eye-slash",render:Sle}),kle={class:"badge bg-secondary-subtle text-secondary-emphasis"},Cle=se({__name:"EditorAnnotationHeader",props:{kindLabel:{},summary:{},collapsed:{type:Boolean},hidden:{type:Boolean},canToggleVisibility:{type:Boolean}},emits:["duplicate","remove","toggleCollapse","toggleVisibility"],setup(t){return(e,n)=>(w(),Q(p(mC),{label:t.summary,class:$e({"opacity-50":t.hidden}),onClick:n[3]||(n[3]=o=>e.$emit("toggleCollapse"))},{leading:J(()=>[T("span",kle,ye(t.kindLabel),1)]),actions:J(()=>[t.canToggleVisibility?(w(),Q(p(Uo),{key:0,variant:"link",size:"sm",class:"annotation-header__btn text-body-secondary",title:t.hidden?"Show in scene":"Hide in scene",onClick:n[0]||(n[0]=gn(o=>e.$emit("toggleVisibility"),["stop"]))},{default:J(()=>[H(p(mf),{name:t.hidden?p(Jd):p(hT)},null,8,["name"])]),_:1},8,["title"])):re("",!0),H(p(tU),{onDuplicate:n[1]||(n[1]=o=>e.$emit("duplicate")),onRemove:n[2]||(n[2]=o=>e.$emit("remove"))})]),_:1},8,["label","class"]))}}),Ale=Be(Cle,[["__scopeId","data-v-acf3aff5"]]),$le={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Tle(t,e){return w(),N("svg",$le,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M128 64a40 40 0 1 0 40 40a40 40 0 0 0-40-40m0 64a24 24 0 1 1 24-24a24 24 0 0 1-24 24m0-112a88.1 88.1 0 0 0-88 88c0 31.4 14.51 64.68 42 96.25a254.2 254.2 0 0 0 41.45 38.3a8 8 0 0 0 9.18 0a254.2 254.2 0 0 0 41.37-38.3c27.45-31.57 42-64.85 42-96.25a88.1 88.1 0 0 0-88-88m0 206c-16.53-13-72-60.75-72-118a72 72 0 0 1 144 0c0 57.23-55.47 105-72 118"},null,-1)])])}const Mle=Te({name:"ph-map-pin",render:Tle}),Ole={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Ble(t,e){return w(),N("svg",Ole,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M136 40v176a8 8 0 0 1-16 0V40a8 8 0 0 1 16 0m-40 80H35.31l18.35-18.34a8 8 0 0 0-11.32-11.32l-32 32a8 8 0 0 0 0 11.32l32 32a8 8 0 0 0 11.32-11.32L35.31 136H96a8 8 0 0 0 0-16m149.66 2.34l-32-32a8 8 0 0 0-11.32 11.32L220.69 120H160a8 8 0 0 0 0 16h60.69l-18.35 18.34a8 8 0 0 0 11.32 11.32l32-32a8 8 0 0 0 0-11.32"},null,-1)])])}const Lle=Te({name:"ph-arrows-out-line-horizontal",render:Ble}),Ple={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Dle(t,e){return w(),N("svg",Ple,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M88 96a8 8 0 0 1 8-8h64a8 8 0 0 1 0 16H96a8 8 0 0 1-8-8m8 40h64a8 8 0 0 0 0-16H96a8 8 0 0 0 0 16m32 16H96a8 8 0 0 0 0 16h32a8 8 0 0 0 0-16m96-104v108.69a15.86 15.86 0 0 1-4.69 11.31L168 219.31a15.86 15.86 0 0 1-11.31 4.69H48a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16M48 208h104v-48a8 8 0 0 1 8-8h48V48H48Zm120-40v28.7l28.69-28.7Z"},null,-1)])])}const Ele=Te({name:"ph-note",render:Dle}),Ile={class:"d-flex flex-column gap-4"},Nle={class:"d-flex flex-column gap-2"},Rle={class:"d-flex flex-column gap-2"},Fle={class:"d-flex flex-column gap-2"},w6="abcdefghijklmnopqrstuvwxyz0123456789",Vle=se({__name:"EditorAnnotations",props:nt({labels:{},chartType:{},chartWidth:{},chartHeight:{},hiddenAnnotationIds:{},canToggleVisibility:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:nt(["toggle-visibility"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,r=n,i=ft(t,"modelValue"),s=k(()=>i.value);function a(){let C="";for(let O=0;O<5;O++)C+=w6[Math.floor(Math.random()*w6.length)];return C}const l=k(()=>o.chartType===Le.Pie||o.chartType===Le.Donut),c=Ie(null);function u(C){c.value=c.value===C?null:C}e({openIndex:c});const d=k(()=>s.value.map((C,O)=>({ann:C,index:O})).filter(({ann:C})=>C.kind===Lt.Point)),f=k(()=>s.value.map((C,O)=>({ann:C,index:O})).filter(({ann:C})=>C.kind===Lt.Range)),h=k(()=>s.value.map((C,O)=>({ann:C,index:O})).filter(({ann:C})=>C.kind===Lt.Free));function g(C){var O;return!!C.id&&!!((O=o.hiddenAnnotationIds)!=null&&O.has(C.id))}function b(C){C.id&&r("toggle-visibility",C.id,C.kind)}function m(C){return C.kind===Lt.Point?"Point":C.kind===Lt.Range?"Range":"Note"}function v(C){return C.kind===Lt.Point?C.text||C.target||"Empty":C.kind===Lt.Range?C.text||`${C.start} - ${C.end}`:C.text||"Empty"}function y(C,O){const P=s.value.map(R=>({...R}));P[C]=O,i.value=P}function x(){const C={kind:Lt.Point,id:a(),target:o.labels[0]??"",text:"Enter an annotation",showLine:!0,showArrow:!0},O=[...s.value,C];i.value=O,c.value=O.length-1}function _(){const C=o.labels.length>0,O={kind:Lt.Range,id:a(),start:C?o.labels[0]:0,end:C?o.labels[o.labels.length-1]:100},P=[...s.value,O];i.value=P,c.value=P.length-1}function S(){const C={kind:Lt.Free,id:a(),text:"Enter an annotation",x:0,y:0},O=[...s.value,C];i.value=O,c.value=O.length-1}function E(C){const O=[...s.value];O.splice(C+1,0,{...O[C],id:a()}),i.value=O}function M(C){const O=[...s.value];O.splice(C,1),i.value=O,c.value===C?c.value=null:c.value!==null&&c.value>C&&c.value--}return(C,O)=>{const P=Ale,R=yle,$=sle,A=Kae;return w(),N("div",Ile,[p(l)?re("",!0):(w(),Q(p(Wo),{key:0,title:"Points",icon:p(Mle)},{default:J(()=>[T("div",Nle,[(w(!0),N(Re,null,mt(p(d),({ann:L,index:B})=>(w(),Q(p(md),{key:B},{header:J(()=>[H(P,{"kind-label":m(L),summary:v(L),collapsed:p(c)!==B,hidden:g(L),"can-toggle-visibility":t.canToggleVisibility,onDuplicate:F=>E(B),onRemove:F=>M(B),onToggleCollapse:F=>u(B),onToggleVisibility:F=>b(L)},null,8,["kind-label","summary","collapsed","hidden","can-toggle-visibility","onDuplicate","onRemove","onToggleCollapse","onToggleVisibility"])]),default:J(()=>[p(c)===B?(w(),Q(R,{key:0,annotation:L,labels:t.labels,"chart-width":t.chartWidth,"onUpdate:annotation":F=>y(B,F)},null,8,["annotation","labels","chart-width","onUpdate:annotation"])):re("",!0)]),_:2},1024))),128))]),H(p(yl),{label:"Add",onClick:x})]),_:1},8,["icon"])),p(l)?re("",!0):(w(),Q(p(Wo),{key:1,title:"Ranges",icon:p(Lle)},{default:J(()=>[T("div",Rle,[(w(!0),N(Re,null,mt(p(f),({ann:L,index:B})=>(w(),Q(p(md),{key:B},{header:J(()=>[H(P,{"kind-label":m(L),summary:v(L),collapsed:p(c)!==B,hidden:g(L),"can-toggle-visibility":t.canToggleVisibility,onDuplicate:F=>E(B),onRemove:F=>M(B),onToggleCollapse:F=>u(B),onToggleVisibility:F=>b(L)},null,8,["kind-label","summary","collapsed","hidden","can-toggle-visibility","onDuplicate","onRemove","onToggleCollapse","onToggleVisibility"])]),default:J(()=>[p(c)===B?(w(),Q($,{key:0,annotation:L,labels:t.labels,"onUpdate:annotation":F=>y(B,F)},null,8,["annotation","labels","onUpdate:annotation"])):re("",!0)]),_:2},1024))),128))]),H(p(yl),{label:"Add",onClick:_})]),_:1},8,["icon"])),H(p(Wo),{title:"Notes",icon:p(Ele)},{default:J(()=>[T("div",Fle,[(w(!0),N(Re,null,mt(p(h),({ann:L,index:B})=>(w(),Q(p(md),{key:B},{header:J(()=>[H(P,{"kind-label":m(L),summary:v(L),collapsed:p(c)!==B,hidden:g(L),"can-toggle-visibility":t.canToggleVisibility,onDuplicate:F=>E(B),onRemove:F=>M(B),onToggleCollapse:F=>u(B),onToggleVisibility:F=>b(L)},null,8,["kind-label","summary","collapsed","hidden","can-toggle-visibility","onDuplicate","onRemove","onToggleCollapse","onToggleVisibility"])]),default:J(()=>[p(c)===B?(w(),Q(A,{key:0,annotation:L,"chart-width":t.chartWidth,"chart-height":t.chartHeight,"onUpdate:annotation":F=>y(B,F)},null,8,["annotation","chart-width","chart-height","onUpdate:annotation"])):re("",!0)]),_:2},1024))),128))]),H(p(yl),{label:"Add",onClick:S})]),_:1},8,["icon"])])}}});function zle(t,e,n,o){let r=null,i=null;function s(){r!=null&&r.parentNode&&r.parentNode.removeChild(r),r=null,i&&(i(),i=null)}function a(){s();const l=t.value,c=n.value;if(!l||c===null)return;const u=e.value[c];if(!u||u.kind==="range")return;const d=l.querySelector("svg");if(!d)return;const f=u.id,h=f?d.querySelector(`g[data-annotation-id="${f}"]`):d.querySelector(`g[data-annotation-index="${c}"]`);if(!h)return;const g=h.querySelector(".bc-annotation-text");if(!g)return;const b=h.querySelector(".bc-annotation-circle"),m=h.querySelector(".bc-annotation-line");let v=null,y=null,x=0;if(b&&(v=parseFloat(b.getAttribute("cx")||"0"),y=parseFloat(b.getAttribute("cy")||"0"),x=parseFloat(b.getAttribute("r")||"0")),v===null&&m){const I=(m.getAttribute("d")||"").split(/[MLA]\s*/).filter(Boolean);if(I.length>=2){const W=I[I.length-1].trim().split(/[\s,]+/);W.length>=2&&(v=parseFloat(W[W.length-2]),y=parseFloat(W[W.length-1]))}}const _=v!==null&&y!==null,S=(u&&"lineStyle"in u?u.lineStyle:"direct")||"direct",E=x>0?x+((u&&"lineTargetDistance"in u?u.lineTargetDistance:5)||5):0,M=parseFloat(g.getAttribute("x")||"0"),C=parseFloat(g.getAttribute("y")||"0"),O=g.getBBox(),R=(g.getAttribute("transform")||"").match(/translate\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)/),$=R?parseFloat(R[1]):0,A=R?parseFloat(R[2]):0,L={x:O.x+$,y:O.y+A,width:O.width,height:O.height},B=4,F=u?u.maxWidth:void 0;let z=L.width;if(F!=null){const ve=parseFloat(d.getAttribute("width")||"0");if(typeof F=="number"&&F>0)z=F;else if(typeof F=="string")if(F.endsWith("%")&&ve>0)z=parseFloat(F)/100*ve;else{const I=parseFloat(F);I>0&&(z=I)}}const V=g.getAttribute("text-anchor")||"middle";let U;V==="middle"?U=M-z/2:V==="end"?U=M-z:U=M,r=document.createElementNS("http://www.w3.org/2000/svg","rect"),r.setAttribute("x",String(U-B)),r.setAttribute("y",String(L.y-B)),r.setAttribute("width",String(z+B*2)),r.setAttribute("height",String(L.height+B*2)),r.setAttribute("fill","rgba(255,245,157,0.4)"),r.setAttribute("rx","3"),r.style.cursor="grab",r.style.pointerEvents="all",h.appendChild(r);let ie=!1,ue=0,fe=0,he=0,ce=0,de=0;function _e(){return d.getScreenCTM()}function j(){const ve=_e();if(!ve)return;const I=(ce-ue)/ve.a,W=(de-fe)/ve.d,X=M+I,ae=C+W;g.setAttribute("x",String(X)),g.setAttribute("y",String(ae));const le=g.querySelectorAll("tspan");for(const ee of le)ee.setAttribute("x",String(X));const K=g.getBBox(),oe={x:K.x+$,y:K.y+A,width:K.width,height:K.height};let Z;const Y=g.getAttribute("text-anchor")||"middle";if(Y==="middle"?Z=X-z/2:Y==="end"?Z=X-z:Z=X,r.setAttribute("x",String(Z-B)),r.setAttribute("y",String(oe.y-B)),r.setAttribute("width",String(z+B*2)),r.setAttribute("height",String(oe.height+B*2)),m&&_){const ee=bboxEdgeToward(oe,v,y),ge=E>0?shortenToward({x:v,y},ee,E):{x:v,y},pe=oe.x+oe.width/2,xe=Math.abs(ee.x-pe)<1;m.setAttribute("d",buildPathD(ee,ge,S,xe))}he=0}function te(ve){ve.preventDefault(),ve.stopPropagation(),ie=!0,ue=ve.clientX,fe=ve.clientY,ce=ve.clientX,de=ve.clientY,r.style.cursor="grabbing",r.setPointerCapture(ve.pointerId)}function ne(ve){ie&&(ve.preventDefault(),ce=ve.clientX,de=ve.clientY,he||(he=requestAnimationFrame(j)))}function me(ve){if(!ie)return;ie=!1,r.style.cursor="grab",he&&(cancelAnimationFrame(he),he=0);const I=_e();if(!I)return;const W=(ve.clientX-ue)/I.a,X=(ve.clientY-fe)/I.d;if(Math.abs(W)<1&&Math.abs(X)<1){g.setAttribute("x",String(M)),g.setAttribute("y",String(C));const K=g.querySelectorAll("tspan");for(const oe of K)oe.setAttribute("x",String(M));return}const ae=e.value[c];if(!ae)return;const le={...ae};if(ae.kind==="free"){const K=h.closest(".bc-annotations"),oe=parseFloat((K==null?void 0:K.getAttribute("data-ctx-width"))||"")||parseFloat(d.getAttribute("width")||"600"),Z=parseFloat((K==null?void 0:K.getAttribute("data-ctx-height"))||"")||parseFloat(d.getAttribute("height")||"400"),Y=ae.x,ee=ae.y;if(typeof Y=="number")le.x=+(Y+W/oe*100).toFixed(1);else{const ge=String(Y);ge.endsWith("px")?le.x=`${Math.round(parseFloat(ge)+W)}px`:le.x=+((parseFloat(ge)||0)+W/oe*100).toFixed(1)}if(typeof ee=="number")le.y=+(ee+X/Z*100).toFixed(1);else{const ge=String(ee);ge.endsWith("px")?le.y=`${Math.round(parseFloat(ge)+X)}px`:le.y=+((parseFloat(ge)||0)+X/Z*100).toFixed(1)}}else if(ae.kind==="point"){const K=le.textOffsetX??-42,oe=le.textOffsetY??-42;le.textOffsetX=Math.round(K+W),le.textOffsetY=Math.round(oe+X)}o(c,le)}r.addEventListener("pointerdown",te),r.addEventListener("pointermove",ne),r.addEventListener("pointerup",me),i=()=>{he&&cancelAnimationFrame(he),r==null||r.removeEventListener("pointerdown",te),r==null||r.removeEventListener("pointermove",ne),r==null||r.removeEventListener("pointerup",me)}}Ve(n,()=>{requestAnimationFrame(a)}),Ve(e,()=>{n.value!==null&&requestAnimationFrame(a)},{deep:!0}),wa(s)}const Hle={class:"d-flex flex-column gap-4"},Wle=se({__name:"EditorAnnotateTab",setup(t){const e=pn(),{chartType:n,data:o,areaFills:r,seriesOverrides:i}=e,{currentOptions:s}=kn(),a=k(()=>s.value.interpolation??"linear"),{pendingAnnotationIndex:l}=At(dr()),{scenes:c,activeIndex:u,activeScene:d,update:f}=_n(),h=k(()=>u.value>=0),g=[Le.BarVertical,Le.BarHorizontal,Le.LineMulti,Le.AreaStacked],b=k(()=>g.includes(n.value)),m=k({get(){const B=e._base.annotations.value;if(u.value>=0){const F=Ba(c.value,u.value),z=(F==null?void 0:F.annotations)??[];return[...B,...z]}return B},set(B){if(u.value>=0&&d.value){const F=new Set(e._base.annotations.value.map(U=>U.id).filter(Boolean)),z=B.filter(U=>U.id&&F.has(U.id)),V=B.filter(U=>!U.id||!F.has(U.id));e._base.annotations.value=z,f(u.value,{annotations:V.length>0?V:void 0});return}e._base.annotations.value=B}}),v=k(()=>{if(u.value<0)return;const B=Ba(c.value,u.value);return B==null?void 0:B.hiddenAnnotationIds});function y(B,F){var ie;if(u.value<0)return;const z=d.value;if(!z)return;const V=z.annotationVisibility??[];((ie=v.value)==null?void 0:ie.has(B))?V.find(fe=>fe.id===B&&fe.action==="hide")?f(u.value,{annotationVisibility:V.filter(fe=>!(fe.id===B&&fe.action==="hide"))}):f(u.value,{annotationVisibility:[...V,{action:"show",kind:F,id:B}]}):V.find(fe=>fe.id===B&&fe.action==="show")?f(u.value,{annotationVisibility:V.filter(fe=>!(fe.id===B&&fe.action==="show"))}):f(u.value,{annotationVisibility:[...V,{action:"hide",kind:F,id:B}]})}const x=k(()=>n.value===Le.LineMulti),_=k(()=>Qs(o.value)),S=k(()=>_.value.labels),E=k(()=>{var B;return((B=_.value.series)==null?void 0:B.map(F=>F.name))??[]}),M=Ie(null),C=k(()=>{var B;return((B=M.value)==null?void 0:B.openIndex)??null}),{containerRef:O}=fT(),P=De(600),R=De(400);function $(){var F;const B=(F=O.value)==null?void 0:F.querySelector("svg");B&&(P.value=parseFloat(B.getAttribute("width")||"600")||600,R.value=parseFloat(B.getAttribute("height")||"400")||400)}let A;hn(()=>{$(),A=new ResizeObserver($),O.value&&A.observe(O.value)}),Ns(()=>A==null?void 0:A.disconnect());function L(B,F){const z=m.value.map(V=>({...V}));z[B]=F,m.value=z}return zle(O,m,C,L),Ve(l,async B=>{if(B!==null&&(await wn(),M.value)){const F=typeof B=="string"?m.value.findIndex(z=>z.id===B):B;if(F<0){l.value=null;return}M.value.openIndex=M.value.openIndex===F?null:F,l.value=null}},{immediate:!0}),(B,F)=>{const z=Vae,V=Rae;return w(),N("div",Hle,[p(b)?(w(),Q(p(Wo),{key:0,title:"Highlight",icon:p(Yae)},{default:J(()=>[H(z)]),_:1},8,["icon"])):re("",!0),H(Vle,{ref_key:"annotationsRef",ref:M,modelValue:p(m),"onUpdate:modelValue":F[0]||(F[0]=U=>Ke(m)?m.value=U:null),labels:p(S),"chart-type":p(n),"chart-width":p(P),"chart-height":p(R),"hidden-annotation-ids":p(v),"can-toggle-visibility":p(h),onToggleVisibility:y},null,8,["modelValue","labels","chart-type","chart-width","chart-height","hidden-annotation-ids","can-toggle-visibility"]),p(x)?(w(),Q(p(Wo),{key:1,title:"Area Fills",icon:p(Uae)},{default:J(()=>[H(V,{modelValue:p(r),"onUpdate:modelValue":F[1]||(F[1]=U=>Ke(r)?r.value=U:null),"series-names":p(E),"series-overrides":p(i),"global-interpolation":p(a)},null,8,["modelValue","series-names","series-overrides","global-interpolation"])]),_:1},8,["icon"])):re("",!0)])}}}),Ule={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Gle(t,e){return w(),N("svg",Ule,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M243.31 136L144 36.69A15.86 15.86 0 0 0 132.69 32H40a8 8 0 0 0-8 8v92.69A15.86 15.86 0 0 0 36.69 144L136 243.31a16 16 0 0 0 22.63 0l84.68-84.68a16 16 0 0 0 0-22.63m-96 96L48 132.69V48h84.69L232 147.31ZM96 84a12 12 0 1 1-12-12a12 12 0 0 1 12 12"},null,-1)])])}const qle=Te({name:"ph-tag",render:Gle}),Yle={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function jle(t,e){return w(),N("svg",Yle,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M48 64a8 8 0 0 1 8-8h16V40a8 8 0 0 1 16 0v16h16a8 8 0 0 1 0 16H88v16a8 8 0 0 1-16 0V72H56a8 8 0 0 1-8-8m136 128h-8v-8a8 8 0 0 0-16 0v8h-8a8 8 0 0 0 0 16h8v8a8 8 0 0 0 16 0v-8h8a8 8 0 0 0 0-16m56-48h-16v-16a8 8 0 0 0-16 0v16h-16a8 8 0 0 0 0 16h16v16a8 8 0 0 0 16 0v-16h16a8 8 0 0 0 0-16m-20.69-64L80 219.31a16 16 0 0 1-22.62 0l-20.7-20.68a16 16 0 0 1 0-22.63L176 36.69a16 16 0 0 1 22.63 0l20.68 20.68a16 16 0 0 1 0 22.63m-54.63 32L144 91.31l-96 96L68.68 208ZM208 68.69L187.31 48l-32 32L176 100.69Z"},null,-1)])])}const G1=Te({name:"ph-magic-wand",render:jle}),Xle={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Kle(t,e){return w(),N("svg",Xle,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M205.66 138.34a8 8 0 0 1-11.32 11.32L136 91.31V224a8 8 0 0 1-16 0V91.31l-58.34 58.35a8 8 0 0 1-11.32-11.32l72-72a8 8 0 0 1 11.32 0ZM216 32H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16"},null,-1)])])}const Zle=Te({name:"ph-arrow-line-up",render:Kle}),Qle={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Jle(t,e){return w(),N("svg",Qle,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M50.34 117.66a8 8 0 0 1 11.32-11.32L120 164.69V32a8 8 0 0 1 16 0v132.69l58.34-58.35a8 8 0 0 1 11.32 11.32l-72 72a8 8 0 0 1-11.32 0ZM216 208H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16"},null,-1)])])}const ece=Te({name:"ph-arrow-line-down",render:Jle}),tce={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function nce(t,e){return w(),N("svg",tce,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M232 128a8 8 0 0 1-8 8H91.31l58.35 58.34a8 8 0 0 1-11.32 11.32l-72-72a8 8 0 0 1 0-11.32l72-72a8 8 0 0 1 11.32 11.32L91.31 120H224a8 8 0 0 1 8 8M40 32a8 8 0 0 0-8 8v176a8 8 0 0 0 16 0V40a8 8 0 0 0-8-8"},null,-1)])])}const oce=Te({name:"ph-arrow-line-left",render:nce}),rce={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function ice(t,e){return w(),N("svg",rce,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M189.66 122.34a8 8 0 0 1 0 11.32l-72 72a8 8 0 0 1-11.32-11.32L164.69 136H32a8 8 0 0 1 0-16h132.69l-58.35-58.34a8 8 0 0 1 11.32-11.32ZM216 32a8 8 0 0 0-8 8v176a8 8 0 0 0 16 0V40a8 8 0 0 0-8-8"},null,-1)])])}const sce=Te({name:"ph-arrow-line-right",render:ice}),ace={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function lce(t,e){return w(),N("svg",ace,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M128 136v64a8 8 0 0 1-16 0v-44.68l-66.34 66.34a8 8 0 0 1-11.32-11.32L100.68 144H56a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8m80-104H80a16 16 0 0 0-16 16v48a8 8 0 0 0 16 0V48h128v128h-48a8 8 0 0 0 0 16h48a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16"},null,-1)])])}const q1=Te({name:"ph-arrow-square-in",render:lce}),cce={class:"d-flex flex-column gap-3"},uce=se({__name:"EditorLegendSection",setup(t){const{currentOptions:e,availableOptionKeys:n,setOption:o}=kn(),r=k(()=>n.value.includes("legend")),i=k(()=>n.value.includes("legendPosition")),s=k(()=>n.value.includes("legendAnchor")),a=k(()=>n.value.includes("directLabelling")),l=k(()=>a.value),c=k(()=>n.value.includes("directLabelAnchor")),u=k(()=>e.value.directLabelling?"direct":e.value.legend===!1?"none":"legend"),d=k(()=>{const v=[{value:"legend",text:"Legend",icon:SC},{value:"none",text:"None",icon:Jd}];return a.value&&v.splice(1,0,{value:"direct",text:"Direct labelling",icon:qle}),v});function f(v){v==="legend"?(o("legend",!0),o("directLabelling","")):v==="direct"?(o("legend",!1),o("directLabelling","auto")):(o("legend",!1),o("directLabelling",""))}const h=[{value:"auto",text:"Auto",icon:G1},{value:"outside",text:"Outside",icon:$p},{value:"inside",text:"Inside",icon:q1}],g=[{value:"start",text:"Start",icon:Zd},{value:"middle",text:"Middle",icon:n0},{value:"end",text:"End",icon:Qd}],b=[{value:"top",text:"Top",icon:Zle},{value:"bottom",text:"Bottom",icon:ece},{value:"left",text:"Left",icon:oce},{value:"right",text:"Right",icon:sce}],m=[{value:"start",text:"Start",icon:Zd},{value:"middle",text:"Middle",icon:n0},{value:"end",text:"End",icon:Qd}];return(v,y)=>(w(),N("div",cce,[p(r)?(w(),Q(p($n),{key:0,label:"Labels","model-value":p(u),options:p(d),block:"","onUpdate:modelValue":f},null,8,["model-value","options"])):re("",!0),p(l)&&p(u)==="direct"?(w(),Q(p($n),{key:1,label:"Direct label style","model-value":p(e).directLabelling||"auto",options:h,block:"","onUpdate:modelValue":y[0]||(y[0]=x=>p(o)("directLabelling",x))},null,8,["model-value"])):re("",!0),p(c)&&p(u)==="direct"&&p(e).directLabelling==="inside"?(w(),Q(p($n),{key:2,label:"Label anchor","model-value":p(e).directLabelAnchor||"middle",options:g,block:"","onUpdate:modelValue":y[1]||(y[1]=x=>p(o)("directLabelAnchor",x))},null,8,["model-value"])):re("",!0),p(i)&&p(u)==="legend"?(w(),Q(p($n),{key:3,label:"Legend position","model-value":p(e).legendPosition??"top",options:b,block:"","onUpdate:modelValue":y[2]||(y[2]=x=>p(o)("legendPosition",x))},null,8,["model-value"])):re("",!0),p(s)&&p(u)==="legend"?(w(),Q(p($n),{key:4,label:"Legend anchor","model-value":p(e).legendAnchor??"start",options:m,block:"","onUpdate:modelValue":y[3]||(y[3]=x=>p(o)("legendAnchor",x))},null,8,["model-value"])):re("",!0)]))}}),dce={class:"d-flex flex-column gap-3"},fce={class:"pt-2"},hce={class:"pt-2"},pce={class:"pt-2"},mce={class:"pt-2"},gce=se({__name:"EditorLayoutSection",setup(t){const{layout:e}=pn(),n=k({get:()=>e.value.sizing,set:g=>{e.value.sizing=g}}),o=k({get:()=>e.value.heightMode,set:g=>{e.value.heightMode=g}}),r=k({get:()=>String(e.value.fixedWidth),set:g=>{e.value.fixedWidth=Number(g)||600}}),i=k({get:()=>String(e.value.fixedHeight),set:g=>{e.value.fixedHeight=Number(g)||400}}),s=k({get:()=>String(e.value.padding),set:g=>{e.value.padding=Number(g)||0}}),a=k({get:()=>e.value.aspectRatio,set:g=>{e.value.aspectRatio=g}}),l=k({get:()=>e.value.transparentBackground,set:g=>{e.value.transparentBackground=g}}),c=k({get:()=>e.value.showCredit,set:g=>{e.value.showCredit=g}}),u=k({get:()=>String(e.value.maxWidth),set:g=>{e.value.maxWidth=Number(g)||660}}),d=[{value:"responsive",text:"Responsive"},{value:"max-width",text:"Max width"},{value:"fixed",text:"Fixed"}],f=[{value:"auto",text:"Auto"},{value:"fixed",text:"Fixed"},{value:"aspect-ratio",text:"Aspect ratio"}],h=[{value:"16:9",label:"16:9"},{value:"4:3",label:"4:3"},{value:"3:2",label:"3:2"},{value:"1:1",label:"1:1"},{value:"2:3",label:"2:3"},{value:"9:16",label:"9:16"}];return(g,b)=>(w(),N("div",dce,[H(p($n),{modelValue:p(n),"onUpdate:modelValue":b[2]||(b[2]=m=>Ke(n)?n.value=m:null),label:"Width",options:d,block:""},{"section:fixed":J(()=>[T("div",fce,[H(p(yr),{id:"layout-fixed-width",modelValue:p(r),"onUpdate:modelValue":b[0]||(b[0]=m=>Ke(r)?r.value=m:null),label:"",min:"200",max:"1200",suffix:"px"},null,8,["modelValue"])])]),"section:max-width":J(()=>[T("div",hce,[H(p(yr),{id:"layout-max-width",modelValue:p(u),"onUpdate:modelValue":b[1]||(b[1]=m=>Ke(u)?u.value=m:null),label:"",min:"200",max:"1200",suffix:"px"},null,8,["modelValue"])])]),_:1},8,["modelValue"]),H(p($n),{modelValue:p(o),"onUpdate:modelValue":b[5]||(b[5]=m=>Ke(o)?o.value=m:null),label:"Height",options:f,block:""},{"section:fixed":J(()=>[T("div",pce,[H(p(yr),{id:"layout-fixed-height",modelValue:p(i),"onUpdate:modelValue":b[3]||(b[3]=m=>Ke(i)?i.value=m:null),label:"",min:"100",max:"800",suffix:"px"},null,8,["modelValue"])])]),"section:aspect-ratio":J(()=>[T("div",mce,[H(p(En),{id:"layout-aspect-ratio",modelValue:p(a),"onUpdate:modelValue":b[4]||(b[4]=m=>Ke(a)?a.value=m:null),options:h,block:""},null,8,["modelValue"])])]),_:1},8,["modelValue"]),H(p(yr),{id:"layout-padding",modelValue:p(s),"onUpdate:modelValue":b[6]||(b[6]=m=>Ke(s)?s.value=m:null),label:"Padding",min:"0",max:"80",suffix:"px"},null,8,["modelValue"]),H(p(Qt),{modelValue:p(l),"onUpdate:modelValue":b[7]||(b[7]=m=>Ke(l)?l.value=m:null),label:"Transparent background"},null,8,["modelValue"]),H(p(Qt),{modelValue:p(c),"onUpdate:modelValue":b[8]||(b[8]=m=>Ke(c)?c.value=m:null),label:"Show credit (recommended)"},null,8,["modelValue"])]))}}),vce={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function bce(t,e){return w(),N("svg",vce,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M80 64a8 8 0 0 1 8-8h128a8 8 0 0 1 0 16H88a8 8 0 0 1-8-8m136 56H88a8 8 0 0 0 0 16h128a8 8 0 0 0 0-16m0 64H88a8 8 0 0 0 0 16h128a8 8 0 0 0 0-16M44 52a12 12 0 1 0 12 12a12 12 0 0 0-12-12m0 64a12 12 0 1 0 12 12a12 12 0 0 0-12-12m0 64a12 12 0 1 0 12 12a12 12 0 0 0-12-12"},null,-1)])])}const yce=Te({name:"ph-list-bullets",render:bce}),xce={class:"d-flex flex-column gap-4"},wce=se({__name:"EditorLayoutTab",setup(t){const{availableOptionKeys:e}=kn(),n=k(()=>e.value.includes("legend"));return(o,r)=>{const i=gce,s=uce;return w(),N("div",xce,[H(i),p(n)?(w(),Q(p(Wo),{key:0,title:"Legend",icon:p(yce)},{default:J(()=>[H(s)]),_:1},8,["icon"])):re("",!0)])}}}),_ce={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Sce(t,e){return w(),N("svg",_ce,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M239.24 131.4c-22 46.8-41.4 68.6-61.2 68.6c-25.1 0-40.73-33.32-57.28-68.6C107.7 103.56 92.9 72 78 72c-16.4 0-36.31 37.21-46.72 59.4a8 8 0 0 1-14.48-6.8C38.71 77.8 58.16 56 78 56c25.1 0 40.73 33.32 57.28 68.6C148.3 152.44 163.1 184 178 184c16.4 0 36.31-37.21 46.72-59.4a8 8 0 0 1 14.48 6.8Z"},null,-1)])])}const kce=Te({name:"ph-wave-sine",render:Sce}),Cce={key:0,class:"d-flex flex-column gap-4"},Ace={class:"d-flex flex-column gap-2"},$ce={key:1,class:"text-muted small"},Tce=se({__name:"EditorAxisOptions",setup(t){const e=k(()=>l.value.includes("valueLabels")),n=k(()=>l.value.includes("swapLabelValue")),o=[{value:"auto",text:"Auto",icon:G1},{value:"outside",text:"Outside",icon:$p},{value:"inside",text:"Inside",icon:q1}],r=new Set(["showVerticalAxis","verticalAxisDirection","showVerticalTicks","verticalLabelPosition","verticalGridStyle","verticalNumberFormat","verticalScaleType","verticalRangeMin","verticalRangeMax"]),i=new Set(["showHorizontalAxis","showHorizontalTicks","horizontalLabelPosition","horizontalGridStyle","horizontalNumberFormat","horizontalScaleType","horizontalRangeMin","horizontalRangeMax"]),{currentOptions:s,optionDefs:a,availableOptionKeys:l,setOption:c}=kn();function u(A,L){c(A,L)}const{displayColumnTypes:d}=Zo(),f=k(()=>d.value[0]??"string"),h=k(()=>d.value[1]??"number"),g=k(()=>a.value.some(A=>A.key==="verticalScaleType"));function b(A){return A.replace(/^(Show\s+)?(vertical|horizontal)\s+/i,(L,B)=>B??"").replace(/^./,L=>L.toUpperCase())}function m(A){return(A?!g.value:g.value)?h.value:f.value}function v(A,L){if(A.type!=="numberFormat")return A;const B=m(L);return B==="date"?{...A,type:"dateFormat",label:A.label.replace(/number\s+format/i,"Date format")}:B==="string"?{...A,type:"__hidden"}:A}const y=k(()=>a.value.filter(A=>r.has(A.key)).map(A=>v({...A,label:b(A.label)},!1)).filter(A=>A.type!=="__hidden")),x=k(()=>a.value.filter(A=>i.has(A.key)).map(A=>v({...A,label:b(A.label)},!0)).filter(A=>A.type!=="__hidden")),_={solid:L2,dashed:uT,dotted:dT,none:Jd},S={auto:G1,inside:q1,outside:$p,off:Jd},E={left:Zd,right:Qd},M={linear:Xu,log:kce},C={verticalGridStyle:_,horizontalGridStyle:_,verticalLabelPosition:S,horizontalLabelPosition:S,verticalAxisDirection:E,verticalScaleType:M,horizontalScaleType:M},O=(A,{emit:L})=>{const{def:B,value:F}=A;if(B.type==="boolean")return Rt(Qt,{label:B.label,modelValue:F??B.default??!1,"onUpdate:modelValue":z=>L("update",z)});if(B.type==="select"&&B.choices){const z=C[B.key],V=B.choices.map(U=>({value:U.value,text:U.text,...z!=null&&z[U.value]?{icon:z[U.value]}:{}}));return Rt($n,{label:B.label,options:V,block:!0,modelValue:F??B.default??"","onUpdate:modelValue":U=>L("update",U)})}return B.type==="text"?Rt(sm,{label:B.label,id:`opt-${B.key}`,placeholder:B.placeholder??"",modelValue:F??"","onUpdate:modelValue":z=>L("update",z)}):B.type==="numberFormat"?Rt(qF,{label:B.label,id:`opt-${B.key}`,modelValue:F??"","onUpdate:modelValue":z=>L("update",z)}):B.type==="dateFormat"?Rt(Ez,{label:B.label,id:`opt-${B.key}`,modelValue:F??"","onUpdate:modelValue":z=>L("update",z)}):null};O.props=["def","value"],O.emits=["update"];function P(A){return A.endsWith("RangeMin")}function R(A){return A.endsWith("RangeMax")}const $=(A,{emit:L})=>{const B=[],{defs:F,currentOptions:z}=A;let V=0;for(;V<F.length;){const U=F[V];if(P(U.key)&&V+1<F.length&&R(F[V+1].key)){const ie=F[V+1];B.push(Rt("div",{class:"d-flex gap-2",key:U.key},[Rt("div",{class:"flex-fill",style:"min-width:0"},[Rt(O,{def:U,value:z[U.key],onUpdate:ue=>L("update",U.key,ue)})]),Rt("div",{class:"flex-fill",style:"min-width:0"},[Rt(O,{def:ie,value:z[ie.key],onUpdate:ue=>L("update",ie.key,ue)})])])),V+=2}else B.push(Rt(O,{key:U.key,def:U,value:z[U.key],onUpdate:ie=>L("update",U.key,ie)})),V++}return Rt("div",{class:"d-flex flex-column gap-2"},B)};return $.props=["defs","currentOptions"],$.emits=["update"],(A,L)=>p(e)||p(y).length>0||p(x).length>0?(w(),N("div",Cce,[p(e)?(w(),Q(p(Wo),{key:0,title:"Value Labels",icon:p(iT)},{default:J(()=>[T("div",Ace,[H(p(Qt),{"model-value":p(s).valueLabels??!1,label:"Show value labels","onUpdate:modelValue":L[0]||(L[0]=B=>u("valueLabels",B))},null,8,["model-value"]),p(s).valueLabels?(w(),Q(p($n),{key:0,label:"Position","model-value":p(s).valueLabelPosition??"auto",options:o,block:"","onUpdate:modelValue":L[1]||(L[1]=B=>u("valueLabelPosition",B))},null,8,["model-value"])):re("",!0),p(s).valueLabels&&p(n)?(w(),Q(p(Qt),{key:1,"model-value":p(s).swapLabelValue??!1,label:"Swap labels and values","onUpdate:modelValue":L[2]||(L[2]=B=>u("swapLabelValue",B))},null,8,["model-value"])):re("",!0)])]),_:1},8,["icon"])):re("",!0),p(y).length>0?(w(),Q(p(Wo),{key:1,title:"Vertical Axis",icon:p(lT)},{default:J(()=>[H($,{defs:p(y),"current-options":p(s),onUpdate:u},null,8,["defs","current-options"])]),_:1},8,["icon"])):re("",!0),p(x).length>0?(w(),Q(p(Wo),{key:2,title:"Horizontal Axis",icon:p(cT)},{default:J(()=>[H($,{defs:p(x),"current-options":p(s),onUpdate:u},null,8,["defs","current-options"])]),_:1},8,["icon"])):re("",!0)])):(w(),N("p",$ce," No axis options for this chart type. "))}}),Mce={class:"d-flex flex-column gap-3"},pT=se({__name:"EditorSymbolOptions",props:{shape:{},showOn:{},style:{},size:{},opacity:{},idPrefix:{default:"symbol"}},emits:["update:shape","update:showOn","update:style","update:size","update:opacity"],setup(t){const e=[{value:"circle",text:"Circle"},{value:"square",text:"Square"},{value:"diamond",text:"Diamond"},{value:"triangle",text:"Triangle Up"},{value:"triangleDown",text:"Triangle Down"},{value:"cross",text:"Cross"},{value:"star",text:"Star"}],n=[{value:"firstLast",text:"First & Last"},{value:"first",text:"First"},{value:"last",text:"Last"},{value:"all",text:"All"}],o=[{value:"filled",text:"Filled"},{value:"hollow",text:"Hollow"}];return(r,i)=>{const s=Ra,a=On;return w(),N("div",Mce,[H(a,{label:"Symbol","label-for":`${t.idPrefix}-shape`},{default:J(()=>[H(s,{id:`${t.idPrefix}-shape`,"model-value":t.shape,options:e,"onUpdate:modelValue":i[0]||(i[0]=l=>r.$emit("update:shape",l))},null,8,["id","model-value"])]),_:1},8,["label-for"]),H(p($n),{label:"Show on","model-value":t.showOn,options:n,"onUpdate:modelValue":i[1]||(i[1]=l=>r.$emit("update:showOn",l))},null,8,["model-value"]),H(p($n),{label:"Style","model-value":t.style,options:o,"onUpdate:modelValue":i[2]||(i[2]=l=>r.$emit("update:style",l))},null,8,["model-value"]),H(p(yr),{id:`${t.idPrefix}-size`,label:"Size","model-value":t.size,min:"0.5",max:"10",step:"0.5","onUpdate:modelValue":i[3]||(i[3]=l=>r.$emit("update:size",l))},null,8,["id","model-value"]),H(p(yr),{id:`${t.idPrefix}-opacity`,label:"Opacity","model-value":t.opacity,min:"0",max:"1",step:"0.1","onUpdate:modelValue":i[4]||(i[4]=l=>r.$emit("update:opacity",l))},null,8,["id","model-value"])])}}}),Oce={class:"d-flex flex-column gap-3"},Bce={class:"d-flex gap-2 justify-content-end"},Lce=se({__name:"EditorSeriesOptions",props:{selected:{},overrides:{},colors:{},chartType:{}},emits:["update:overrides"],setup(t,{emit:e}){const n=t,o=e;function r($){return n.overrides.find(A=>A.name===$)}function i(){return n.selected.length>0?r(n.selected[0]):void 0}const s=k(()=>n.chartType==="bar-multi"),a=k(()=>n.chartType==="line-multi"),l=k(()=>{var $;return(($=i())==null?void 0:$.color)??"#4e79a7"}),c=k(()=>{var $;return String((($=i())==null?void 0:$.opacity)??1)}),u=k(()=>{var $;return String((($=i())==null?void 0:$.lineWidth)??2)}),d=k(()=>{var $;return(($=i())==null?void 0:$.dash)??"solid"}),f=k(()=>{var $;return(($=i())==null?void 0:$.interpolation)??"global"}),h=k(()=>{var $;return(($=i())==null?void 0:$.labelMode)??"global"}),g=k(()=>{var $;return(($=i())==null?void 0:$.valueLabels)??!1}),b=k(()=>{var $;return(($=i())==null?void 0:$.lineSymbols)??!1}),m=k(()=>{var $;return(($=i())==null?void 0:$.symbolShape)??"circle"}),v=k(()=>{var $;return(($=i())==null?void 0:$.symbolShowOn)??"firstLast"}),y=k(()=>{var $;return(($=i())==null?void 0:$.symbolStyle)??"filled"}),x=k(()=>{var $;return String((($=i())==null?void 0:$.symbolSize)??3.5)}),_=k(()=>{var $;return String((($=i())==null?void 0:$.symbolOpacity)??1)});function S($,A){const L=n.overrides.map(B=>({...B}));for(const B of n.selected){let F=L.find(z=>z.name===B);F||(F={name:B},L.push(F)),F[$]=A}o("update:overrides",L)}function E(){if(n.selected.length<2)return;const $=r(n.selected[0]);if(!$)return;const A=n.overrides.map(L=>({...L}));for(let L=1;L<n.selected.length;L++){const B=n.selected[L];let F=A.find(z=>z.name===B);F||(F={name:B},A.push(F)),Object.assign(F,{...$,name:B})}o("update:overrides",A)}function M(){const $=new Set(n.selected),A=n.overrides.filter(L=>!$.has(L.name));o("update:overrides",A)}const C=[{value:"1",text:"1"},{value:"2",text:"2"},{value:"3",text:"3"},{value:"4",text:"4"},{value:"5",text:"5"}],O=[{value:"solid",text:"Solid"},{value:"dotted",text:"Dotted"},{value:"dashed",text:"Dashed"},{value:"dash-dot",text:"Dash-dot"}],P=[{value:"global",text:"Global"},{value:"linear",text:"Linear"},{value:"monotoneX",text:"Monotone"},{value:"step",text:"Step"},{value:"stepBefore",text:"Step (before)"},{value:"stepAfter",text:"Step (after)"},{value:"basis",text:"Basis"},{value:"cardinal",text:"Cardinal"},{value:"catmullRom",text:"Catmull-Rom"}],R=[{value:"global",text:"Global"},{value:"legend",text:"Legend"},{value:"direct",text:"Direct"},{value:"none",text:"None"}];return($,A)=>{const L=Ra,B=On,F=pT,z=Uo;return w(),N("div",Oce,[H(p(Aa),{id:"series-color",label:"Color","model-value":p(l),"onUpdate:modelValue":A[0]||(A[0]=V=>S("color",V))},null,8,["model-value"]),H(p($n),{label:"Label mode","model-value":p(h),options:R,block:"","onUpdate:modelValue":A[1]||(A[1]=V=>S("labelMode",V))},null,8,["model-value"]),H(p(Qt),{"model-value":p(g),label:"Value labels","onUpdate:modelValue":A[2]||(A[2]=V=>S("valueLabels",V))},null,8,["model-value"]),p(s)?(w(),Q(p(yr),{key:0,id:"series-opacity",label:"Opacity","model-value":p(c),min:"0",max:"1",step:"0.1","onUpdate:modelValue":A[3]||(A[3]=V=>S("opacity",Number(V)))},null,8,["model-value"])):re("",!0),p(a)?(w(),N(Re,{key:1},[H(p($n),{label:"Line width","model-value":p(u),options:C,"onUpdate:modelValue":A[4]||(A[4]=V=>S("lineWidth",Number(V)))},null,8,["model-value"]),H(p($n),{label:"Dash style","model-value":p(d),options:O,"onUpdate:modelValue":A[5]||(A[5]=V=>S("dash",V))},null,8,["model-value"]),H(B,{label:"Interpolation","label-for":"series-interpolation"},{default:J(()=>[H(L,{id:"series-interpolation","model-value":p(f),options:P,"onUpdate:modelValue":A[6]||(A[6]=V=>S("interpolation",V))},null,8,["model-value"])]),_:1}),H(p(Qt),{"model-value":p(b),label:"Line symbols","onUpdate:modelValue":A[7]||(A[7]=V=>S("lineSymbols",V))},null,8,["model-value"]),p(b)?(w(),Q(F,{key:0,"id-prefix":"series-symbol",shape:p(m),"show-on":p(v),style:Pt(p(y)),size:p(x),opacity:p(_),"onUpdate:shape":A[8]||(A[8]=V=>S("symbolShape",V)),"onUpdate:showOn":A[9]||(A[9]=V=>S("symbolShowOn",V)),"onUpdate:style":A[10]||(A[10]=V=>S("symbolStyle",V)),"onUpdate:size":A[11]||(A[11]=V=>S("symbolSize",Number(V))),"onUpdate:opacity":A[12]||(A[12]=V=>S("symbolOpacity",Number(V)))},null,8,["shape","show-on","style","size","opacity"])):re("",!0)],64)):re("",!0),T("div",Bce,[t.selected.length>1?(w(),Q(z,{key:0,variant:"outline-secondary",size:"sm",onClick:E},{default:J(()=>[...A[13]||(A[13]=[Ue(" Copy from first ",-1)])]),_:1})):re("",!0),H(z,{variant:"outline-danger",size:"sm",onClick:M},{default:J(()=>[...A[14]||(A[14]=[Ue(" Reset to default ",-1)])]),_:1})])])}}}),Pce=se({__name:"EditorSeriesList",props:{seriesNames:{},selected:{},colors:{},overrides:{}},emits:["update:selected","toggleVisibility"],setup(t){const e=t;function n(r,i){return cn(r,i,e.colors,e.overrides)}function o(r){return qa(r,e.overrides)}return(r,i)=>{const s=Os;return w(),Q(p($y),{items:t.seriesNames,selected:t.selected,"onUpdate:selected":i[1]||(i[1]=a=>r.$emit("update:selected",a))},{"item-leading":J(({item:a,index:l})=>[H(p(im),{color:n(a,l)},null,8,["color"])]),"item-actions":J(({item:a})=>[H(s,{"model-value":!o(a),switch:"",size:"sm",onClick:i[0]||(i[0]=gn(()=>{},["stop"])),"onUpdate:modelValue":l=>r.$emit("toggleVisibility",a,!l)},null,8,["model-value","onUpdate:modelValue"])]),_:1},8,["items","selected"])}}}),Dce={class:"d-flex flex-column gap-3"},Ece=se({__name:"EditorSeriesPanel",setup(t){const{chartType:e,data:n,seriesOverrides:o}=pn(),{currentOptions:r}=kn(),i=Ie([]),s=k(()=>{var u;return((u=Qs(n.value).series)==null?void 0:u.map(d=>d.name))??[]}),a=k(()=>m$(r.value).colors??["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7"]);function l(c,u){const d=o.value.map(h=>({...h}));let f=d.find(h=>h.name===c);f||(f={name:c},d.push(f)),f.hidden=u,o.value=d}return(c,u)=>{const d=Pce,f=Lce;return w(),N("div",Dce,[u[2]||(u[2]=T("h6",{class:"fw-bold mb-0"}," Series ",-1)),H(d,{"series-names":p(s),selected:p(i),colors:p(a),overrides:p(o),"onUpdate:selected":u[0]||(u[0]=h=>i.value=h),onToggleVisibility:l},null,8,["series-names","selected","colors","overrides"]),p(i).length>0?(w(),Q(p(md),{key:0,label:"Editing "+p(i).length+" "+(p(i).length===1?"series: "+p(i)[0]:"series")},{default:J(()=>[H(f,{selected:p(i),overrides:p(o),colors:p(a),"chart-type":p(e),"onUpdate:overrides":u[1]||(u[1]=h=>o.value=h)},null,8,["selected","overrides","colors","chart-type"])]),_:1},8,["label"])):re("",!0)])}}}),Ice={class:"d-flex flex-column gap-3"},Nce={class:"bc-area-stack-options"},Rce=se({__name:"EditorAreaSection",setup(t){const{currentOptions:e,setOption:n}=kn(),o=[{value:"linear",text:"Linear"},{value:"monotoneX",text:"Monotone"},{value:"step",text:"Step"},{value:"stepBefore",text:"Step (before)"},{value:"stepAfter",text:"Step (after)"},{value:"basis",text:"Basis"},{value:"cardinal",text:"Cardinal"},{value:"catmullRom",text:"Catmull-Rom"}],r=[{value:"none",text:"Keep order"},{value:"ascending",text:"Smallest first"},{value:"descending",text:"Largest first"}];return(i,s)=>{const a=Ra,l=On,c=oD,u=Os;return w(),N("div",Ice,[H(p(yr),{id:"opt-area-opacity","model-value":String(p(e).areaFillOpacity??"0.85"),label:"Opacity",min:"0",max:"1",step:"0.05","onUpdate:modelValue":s[0]||(s[0]=d=>p(n)("areaFillOpacity",d))},null,8,["model-value"]),H(l,{label:"Interpolation","label-for":"opt-area-interpolation"},{default:J(()=>[H(a,{id:"opt-area-interpolation","model-value":p(e).interpolation??"monotoneX",options:o,"onUpdate:modelValue":s[1]||(s[1]=d=>p(n)("interpolation",String(d)))},null,8,["model-value"])]),_:1}),H(l,{label:"Sort areas"},{default:J(()=>[H(c,{"model-value":p(e).areaSortMode??"none",options:r,stacked:"","onUpdate:modelValue":s[2]||(s[2]=d=>p(n)("areaSortMode",String(d)))},null,8,["model-value"])]),_:1}),H(p(Qt),{"model-value":p(e).stacked!==!1,label:"Stack areas","onUpdate:modelValue":s[5]||(s[5]=d=>p(n)("stacked",d))},{section:J(()=>[T("div",Nce,[H(u,{"model-value":p(e).stackPercent??!1,"onUpdate:modelValue":s[3]||(s[3]=d=>p(n)("stackPercent",d))},{default:J(()=>[...s[6]||(s[6]=[Ue(" Stack to 100% ",-1)])]),_:1},8,["model-value"]),H(u,{"model-value":p(e).areaLines!==!1,"onUpdate:modelValue":s[4]||(s[4]=d=>p(n)("areaLines",d))},{default:J(()=>[...s[7]||(s[7]=[Ue(" Separate areas with lines ",-1)])]),_:1},8,["model-value"])])]),_:1},8,["model-value"])])}}}),Fce=Be(Rce,[["__scopeId","data-v-3bf56010"]]),Vce={class:"d-flex flex-column gap-3"},zce=se({__name:"EditorSliceSection",setup(t){const{currentOptions:e,availableOptionKeys:n,setOption:o}=kn();function r(i){return n.value.includes(i)}return(i,s)=>{const a=qs,l=On;return w(),N("div",Vce,[r("displayAsPercentage")?(w(),Q(p(Qt),{key:0,"model-value":p(e).displayAsPercentage??!1,label:"Display as percentage","onUpdate:modelValue":s[0]||(s[0]=c=>p(o)("displayAsPercentage",c))},null,8,["model-value"])):re("",!0),r("showTotal")?(w(),Q(p(Qt),{key:1,"model-value":p(e).showTotal??!1,label:"Show total","onUpdate:modelValue":s[1]||(s[1]=c=>p(o)("showTotal",c))},null,8,["model-value"])):re("",!0),r("showLabels")?(w(),Q(p(Qt),{key:2,"model-value":p(e).showLabels??!0,label:"Show labels","onUpdate:modelValue":s[2]||(s[2]=c=>p(o)("showLabels",c))},null,8,["model-value"])):re("",!0),r("showValues")?(w(),Q(p(Qt),{key:3,"model-value":p(e).showValues??!0,label:"Show values","onUpdate:modelValue":s[3]||(s[3]=c=>p(o)("showValues",c))},null,8,["model-value"])):re("",!0),r("sliceMax")?(w(),Q(p(yr),{key:4,id:"opt-sliceMax",label:"Max slices","model-value":p(e).sliceMax??"6",min:"2",max:"20","onUpdate:modelValue":s[4]||(s[4]=c=>p(o)("sliceMax",String(c)))},null,8,["model-value"])):re("",!0),r("sliceGroupLabel")?(w(),Q(l,{key:5,label:"Group label","label-for":"opt-sliceGroupLabel"},{default:J(()=>[H(a,{id:"opt-sliceGroupLabel","model-value":p(e).sliceGroupLabel??"Others",placeholder:"Others","onUpdate:modelValue":s[5]||(s[5]=c=>p(o)("sliceGroupLabel",c))},null,8,["model-value"])]),_:1})):re("",!0)])}}}),Hce={class:"d-flex flex-column gap-3"},_6=.15,Wce=se({__name:"EditorBarStyleSection",setup(t){const{currentOptions:e,availableOptionKeys:n,setOption:o}=kn(),r=k(()=>n.value.includes("barBackground")),i=k(()=>n.value.includes("barSeparators")),s=k(()=>n.value.includes("barGap")),a=k(()=>n.value.includes("connectedColumns")),l=k(()=>n.value.includes("waterfall")),c=k(()=>n.value.includes("waterfallTotal")),u=k(()=>n.value.includes("categoryLabelLine"));function d(y){return Math.max(0,Math.min(100,y))}const f=k(()=>{const y=parseFloat(e.value.barGap??""),x=isNaN(y)?Gd:y;return String(d(x))});function h(y){const x=parseFloat(y),_=isNaN(x)?Gd:x;o("barGap",String(d(_)))}function g(y){const x=parseFloat(y??""),_=isNaN(x)?_6:x,S=Math.max(0,Math.min(1,_));return String(Math.round(S*100))}function b(y){const x=parseFloat(y);if(isNaN(x))return String(_6);const _=Math.max(0,Math.min(100,x));return String(_/100)}const m=k(()=>g(e.value.connectionsOpacity));function v(y){o("connectionsOpacity",b(y))}return(y,x)=>(w(),N("div",Hce,[p(r)?(w(),Q(p(Qt),{key:0,"model-value":p(e).barBackground??!1,label:"Bar background","onUpdate:modelValue":x[0]||(x[0]=_=>p(o)("barBackground",_))},null,8,["model-value"])):re("",!0),p(i)?(w(),Q(p(Qt),{key:1,"model-value":p(e).barSeparators??!1,label:"Bar separators","onUpdate:modelValue":x[1]||(x[1]=_=>p(o)("barSeparators",_))},null,8,["model-value"])):re("",!0),p(s)?(w(),Q(p(yr),{key:2,id:"opt-bar-gap","model-value":p(f),label:"Bar gap",min:"0",max:"100",step:"1",suffix:"%","onUpdate:modelValue":h},null,8,["model-value"])):re("",!0),p(a)?(w(),Q(p(Qt),{key:3,"model-value":p(e).connectedColumns??!1,label:"Connected columns","onUpdate:modelValue":x[2]||(x[2]=_=>p(o)("connectedColumns",_))},null,8,["model-value"])):re("",!0),p(a)&&p(e).connectedColumns?(w(),Q(p(yr),{key:4,id:"opt-connections-opacity","model-value":p(m),label:"Opacity",min:"0",max:"100",step:"1",suffix:"%","onUpdate:modelValue":v},null,8,["model-value"])):re("",!0),p(l)?(w(),Q(p(Qt),{key:5,"model-value":p(e).waterfall??!1,label:"Waterfall","onUpdate:modelValue":x[3]||(x[3]=_=>p(o)("waterfall",_))},null,8,["model-value"])):re("",!0),p(c)&&p(e).waterfall?(w(),Q(p(Qt),{key:6,"model-value":p(e).waterfallTotal??!1,label:"Waterfall total","onUpdate:modelValue":x[4]||(x[4]=_=>p(o)("waterfallTotal",_))},null,8,["model-value"])):re("",!0),p(u)?(w(),Q(p(Qt),{key:7,"model-value":p(e).categoryLabelLine??!1,label:"Labels on separate line","onUpdate:modelValue":x[5]||(x[5]=_=>p(o)("categoryLabelLine",_))},null,8,["model-value"])):re("",!0)]))}}),Uce={class:"d-flex flex-column gap-3"},Gce=se({__name:"EditorLineSymbols",setup(t){const{currentOptions:e,setOption:n}=kn();return(o,r)=>{const i=pT;return w(),N("div",Uce,[H(p(Qt),{"model-value":p(e).lineSymbols??!1,label:"Show line symbols","onUpdate:modelValue":r[0]||(r[0]=s=>p(n)("lineSymbols",s))},null,8,["model-value"]),p(e).lineSymbols?(w(),Q(i,{key:0,"id-prefix":"opt-line-symbol",shape:p(e).lineSymbolShape??"circle","show-on":p(e).lineSymbolShowOn??"firstLast",style:Pt(p(e).lineSymbolStyle??"filled"),size:p(e).lineSymbolSize??"3.5",opacity:p(e).lineSymbolOpacity??"1","onUpdate:shape":r[1]||(r[1]=s=>p(n)("lineSymbolShape",s)),"onUpdate:showOn":r[2]||(r[2]=s=>p(n)("lineSymbolShowOn",s)),"onUpdate:style":r[3]||(r[3]=s=>p(n)("lineSymbolStyle",s)),"onUpdate:size":r[4]||(r[4]=s=>p(n)("lineSymbolSize",s)),"onUpdate:opacity":r[5]||(r[5]=s=>p(n)("lineSymbolOpacity",s))},null,8,["shape","show-on","style","size","opacity"])):re("",!0)])}}}),qce={class:"d-flex flex-column gap-3"},Yce=se({__name:"EditorLineSection",setup(t){const{currentOptions:e,availableOptionKeys:n,setOption:o}=kn(),r=k(()=>n.value.includes("interpolation")),i=k(()=>n.value.includes("edgePadding")),s=k(()=>n.value.includes("lineSymbols")),a=[{value:"linear",text:"Linear"},{value:"monotoneX",text:"Monotone"},{value:"step",text:"Step"},{value:"stepBefore",text:"Step (before)"},{value:"stepAfter",text:"Step (after)"},{value:"basis",text:"Basis"},{value:"cardinal",text:"Cardinal"},{value:"catmullRom",text:"Catmull-Rom"}];return(l,c)=>{const u=Ra,d=On,f=Gce;return w(),N("div",qce,[p(r)?(w(),Q(d,{key:0,label:"Line interpolation","label-for":"opt-interpolation"},{default:J(()=>[H(u,{id:"opt-interpolation","model-value":p(e).interpolation??"linear",options:a,"onUpdate:modelValue":c[0]||(c[0]=h=>p(o)("interpolation",h))},null,8,["model-value"])]),_:1})):re("",!0),p(i)?(w(),Q(p(Qt),{key:1,"model-value":p(e).edgePadding??!1,label:"Edge padding","onUpdate:modelValue":c[1]||(c[1]=h=>p(o)("edgePadding",h))},null,8,["model-value"])):re("",!0),p(s)?(w(),Q(f,{key:2})):re("",!0)])}}}),jce={class:"d-flex flex-column gap-3"},Xce=se({__name:"EditorBarAppearance",props:{labels:{},colorizes:{},baseColor:{}},emits:["update:colorizes","update:baseColor"],setup(t,{emit:e}){const n=t,o=e,r=Ie([]),i=De(n.colorizes.length>0),s=k(()=>{const h=new Map;for(const g of n.colorizes)h.set(g.target,g.color);return h});function a(h){return s.value.get(h)??n.baseColor}const l=k(()=>r.value.length===0?n.baseColor:s.value.get(r.value[0])??n.baseColor);function c(h,g,b){b.ctrlKey||b.metaKey?r.value.indexOf(h)>=0?r.value=r.value.filter(v=>v!==h):r.value=[...r.value,h]:r.value.length===1&&r.value[0]===h?r.value=[]:r.value=[h]}function u(h){const g=new Map(n.colorizes.map(b=>[b.target,b]));for(const b of r.value)g.set(b,{target:b,color:h,label:""});o("update:colorizes",[...g.values()])}function d(){o("update:colorizes",[]),r.value=[]}function f(h){i.value=h,h||(o("update:colorizes",[]),r.value=[])}return(h,g)=>(w(),N("div",jce,[H(p(Aa),{id:"bar-base-color",label:"Base color","model-value":t.baseColor,"onUpdate:modelValue":g[0]||(g[0]=b=>h.$emit("update:baseColor",b))},null,8,["model-value"]),H(p(Qt),{"model-value":p(i),label:"Customize colors","onUpdate:modelValue":f},null,8,["model-value"]),p(i)?(w(),N(Re,{key:0},[H(p($y),{items:t.labels,selected:p(r),"on-item-click":c,"onUpdate:selected":g[1]||(g[1]=b=>r.value=b)},{"item-leading":J(({item:b})=>[H(p(im),{color:a(b)},null,8,["color"])]),_:1},8,["items","selected"]),p(r).length>0?(w(),Q(p(md),{key:0,label:"Editing "+p(r).length+" "+(p(r).length===1?"label":"labels")},{default:J(()=>[H(p(Aa),{id:"bar-highlight-color",label:"Color for selected","model-value":p(l),"onUpdate:modelValue":u},null,8,["model-value"]),t.colorizes.length>0?(w(),Q(p(Uo),{key:0,variant:"outline-danger",size:"sm",onClick:d},{default:J(()=>[...g[2]||(g[2]=[Ue(" Reset all changes ",-1)])]),_:1})):re("",!0)]),_:1},8,["label"])):re("",!0)],64)):re("",!0)]))}}),Kce=Po("cvdMode",()=>({cvdMode:De("")}));function mT(){const t=Kce(),{cvdMode:e}=At(t);return{cvdMode:e}}const Zce="#ffffff",Qce="#1a1a1a",Jce={protanopia:"Protan",deuteranopia:"Deutan",tritanopia:"Tritan"};function S6(t,e,n){const r=(n?T5(t,e):t).map(s=>bee(s,e)),i=Math.min(...r);return{level:yee(i),ratio:`${i.toFixed(1)}:1`}}function eue(t,e,n){const o=k(()=>{const s=bt(t);return s.length===0?null:S6(s,Zce,bt(e))}),r=k(()=>{const s=bt(t);return s.length===0||!bt(n)?null:S6(s,Qce,bt(e))}),i=k(()=>{const s=bt(t);if(s.length===0)return null;const a=s.length>=2?Yte(s):[];return a.length===0?{safe:!0,issues:[]}:{safe:!1,issues:a.map(l=>({type:l.type,shortLabel:Jce[l.type],tooltip:`${l.label}: ${l.pairs.length} color ${l.pairs.length===1?"pair":"pairs"} may be hard to distinguish.`}))}});return{lightContrastInfo:o,darkContrastInfo:r,cvdInfo:i}}const tue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="5.30" y="9.00" width="11.22" height="25.00" fill="#2563A0" rx="0.5"/><rect x="17.77" y="14.00" width="11.22" height="20.00" fill="#D4A63A" rx="0.5"/><rect x="30.23" y="4.00" width="11.22" height="30.00" fill="#C94044" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},nue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="5.30" y="9.00" width="11.22" height="25.00" fill="#4767a2" rx="0.5"/><rect x="17.77" y="14.00" width="11.22" height="20.00" fill="#baa62a" rx="0.5"/><rect x="30.23" y="4.00" width="11.22" height="30.00" fill="#655e43" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},oue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="5.30" y="9.00" width="11.22" height="25.00" fill="#345b9f" rx="0.5"/><rect x="17.77" y="14.00" width="11.22" height="20.00" fill="#c5b23f" rx="0.5"/><rect x="30.23" y="4.00" width="11.22" height="30.00" fill="#887c40" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},rue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="5.30" y="9.00" width="11.22" height="25.00" fill="#00717a" rx="0.5"/><rect x="17.77" y="14.00" width="11.22" height="20.00" fill="#e69790" rx="0.5"/><rect x="30.23" y="4.00" width="11.22" height="30.00" fill="#dc1a43" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},iue={class:"d-flex flex-column gap-3"},sue={key:4,class:"d-flex align-items-center gap-2"},aue={key:5,class:"d-flex align-items-center gap-2"},lue={key:6,class:"d-flex align-items-center gap-2"},cue=se({__name:"EditorColorSection",setup(t){const{chartType:e,data:n,colorizes:o}=pn(),{currentOptions:r,availableOptionKeys:i,setOption:s}=kn(),{cvdMode:a}=At(mT()),l=k(()=>[Le.BarVertical,Le.BarHorizontal,Le.VerticalBar,Le.HorizontalBar].includes(e.value)),c=k(()=>i.value.includes("colors")),u=k(()=>i.value.includes("colorPalette")),d=k(()=>Qs(n.value)),f=k(()=>d.value.labels),h=k(()=>{const O=r.value.colorPalette;return O?kA(O)??[]:r.value.colors??[]}),g=k(()=>h.value[0]??"#4e79a7");function b(O){r.value.colorPalette&&s("colorPalette",""),s("colors",[O])}const m=k(()=>{if(l.value){const O=o.value.map(R=>R.color),P=g.value;return O.length>0?[P,...O]:[P]}return h.value}),{lightContrastInfo:v,darkContrastInfo:y,cvdInfo:x}=eue(m,()=>!!r.value.autoContrast,()=>r.value.allowDarkMode??!0),_=pt("cvdSafeBadgeRef"),S=pt("cvdBadgeRefs");function E(O){var R;const P=((R=x.value)==null?void 0:R.issues.findIndex($=>$.type===O))??-1;return P>=0?S.value[P]:void 0}const M=[{value:"",text:"None",description:"Normal color vision",visual:Te(tue)},{value:"protanopia",text:"Protanopia",description:"No red cones (1% of males)",visual:Te(nue)},{value:"deuteranopia",text:"Deuteranopia",description:"No green cones (1% of males)",visual:Te(oue)},{value:"tritanopia",text:"Tritanopia",description:"No blue cones (very rare)",visual:Te(rue)}],C=[{value:"",label:"Custom",colors:[]},...CA().map(O=>({value:O.name,label:O.label,colors:[...O.colors]}))];return(O,P)=>{const R=Xce;return w(),N("div",iue,[p(l)?(w(),Q(R,{key:0,labels:p(f),colorizes:p(o),"base-color":p(g),"onUpdate:colorizes":P[0]||(P[0]=$=>o.value=$),"onUpdate:baseColor":b},null,8,["labels","colorizes","base-color"])):(w(),N(Re,{key:1},[p(u)?(w(),Q(p(vF),{key:0,id:"opt-palette",label:"Color palette","model-value":p(r).colorPalette??"",palettes:C,"onUpdate:modelValue":P[1]||(P[1]=$=>p(s)("colorPalette",$))},null,8,["model-value"])):re("",!0),p(c)&&!p(r).colorPalette?(w(),Q(p(HR),{key:1,id:"opt-colors",label:"Colors","model-value":p(r).colors??[],"onUpdate:modelValue":P[2]||(P[2]=$=>p(s)("colors",$))},null,8,["model-value"])):re("",!0)],64)),p(u)||p(c)?(w(),Q(p(Qt),{key:2,id:"opt-allow-dark-mode",label:"Allow dark mode","model-value":p(r).allowDarkMode??!0,"onUpdate:modelValue":P[3]||(P[3]=$=>p(s)("allowDarkMode",$))},null,8,["model-value"])):re("",!0),p(u)||p(c)?(w(),Q(p(Qt),{key:3,id:"opt-auto-contrast",label:"Auto-adjust contrast","model-value":p(r).autoContrast??!1,"onUpdate:modelValue":P[4]||(P[4]=$=>p(s)("autoContrast",$))},null,8,["model-value"])):re("",!0),p(v)?(w(),N("div",sue,[P[6]||(P[6]=T("span",{class:"form-label mb-0"},"Light contrast",-1)),H(p(N_),{level:p(v).level,ratio:p(v).ratio},null,8,["level","ratio"])])):re("",!0),p(y)?(w(),N("div",aue,[P[7]||(P[7]=T("span",{class:"form-label mb-0"},"Dark contrast",-1)),H(p(N_),{level:p(y).level,ratio:p(y).ratio},null,8,["level","ratio"])])):re("",!0),p(x)?(w(),N("div",lue,[P[9]||(P[9]=T("span",{class:"form-label mb-0"},"Colorblind",-1)),p(x).safe?(w(),N("span",{key:0,ref_key:"cvdSafeBadgeRef",ref:_,class:"editor-color-section__cvd-badge editor-color-section__cvd-badge--safe"},[H(p(gy)),P[8]||(P[8]=Ue(" Safe ",-1)),H(p(p1),{class:"editor-color-section__cvd-badge__info"}),H(p(Dd),{"teleport-to":"body",target:p(_),title:"All colors remain distinguishable under protanopia, deuteranopia, and tritanopia simulations.",placement:"top"},null,8,["target"])],512)):(w(!0),N(Re,{key:1},mt(p(x).issues,$=>(w(),N("span",{key:$.type,ref_for:!0,ref_key:"cvdBadgeRefs",ref:S,class:"editor-color-section__cvd-badge editor-color-section__cvd-badge--warn"},[H(p(hT)),Ue(" "+ye($.shortLabel)+" ",1),H(p(p1),{class:"editor-color-section__cvd-badge__info"}),H(p(Dd),{"teleport-to":"body",target:()=>E($.type),title:$.tooltip,placement:"top"},null,8,["target","title"])]))),128))])):re("",!0),H(p($n),{modelValue:p(a),"onUpdate:modelValue":P[5]||(P[5]=$=>Ke(a)?a.value=$:null),label:"Colorblind simulation",options:M,block:""},null,8,["modelValue"])])}}}),uue=Be(cue,[["__scopeId","data-v-bbe9fd0a"]]),due=se({__name:"EditorThemeSection",setup(t){const{chartTheme:e,availableThemes:n}=T$();return(o,r)=>(w(),Q(p(En),{modelValue:p(e),"onUpdate:modelValue":r[0]||(r[0]=i=>Ke(e)?e.value=i:null),label:"Chart Theme",options:p(n),block:""},null,8,["modelValue","options"]))}}),fue={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function hue(t,e){return w(),N("svg",fue,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M238.64 33.36a32 32 0 0 0-45.26 0a32 32 0 0 0 0 45.26c.29.29.6.57.9.85l-26.63 49.46a32.2 32.2 0 0 0-23.9 3.5l-20.18-20.18a32 32 0 0 0-50.2-38.89a32 32 0 0 0 0 45.26c.29.29.59.57.89.85l-26.63 49.47a32 32 0 0 0-30.27 8.44a32 32 0 1 0 45.26 0c-.29-.29-.6-.57-.9-.85l26.63-49.46A32.4 32.4 0 0 0 96 128a32 32 0 0 0 16.25-4.41l20.18 20.18a32 32 0 1 0 50.2-6.38c-.29-.29-.59-.57-.89-.85l26.63-49.46A32.3 32.3 0 0 0 216 88a32 32 0 0 0 22.63-54.62ZM51.3 211.33a16 16 0 0 1-22.63-22.64a16 16 0 1 1 22.63 22.64m33.38-104a16 16 0 0 1 0-22.63a16 16 0 1 1 0 22.63m86.64 64a16 16 0 0 1-22.63-22.63a16 16 0 0 1 22.63 22.63m56-104a16 16 0 1 1-22.62-22.66a16 16 0 0 1 22.63 22.64Z"},null,-1)])])}const pue=Te({name:"ph-line-segments",render:hue}),mue={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function gue(t,e){return w(),N("svg",mue,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M232 32a8 8 0 0 0-8-8c-44.08 0-89.31 49.71-114.43 82.63A60 60 0 0 0 32 164c0 30.88-19.54 44.73-20.47 45.37A8 8 0 0 0 16 224h76a60 60 0 0 0 57.37-77.57C182.3 121.31 232 76.08 232 32M92 208H34.63C41.38 198.41 48 183.92 48 164a44 44 0 1 1 44 44m32.42-94.45q5.14-6.66 10.09-12.55A76.2 76.2 0 0 1 155 121.49q-5.9 4.94-12.55 10.09a60.5 60.5 0 0 0-18.03-18.03m42.7-2.68a92.6 92.6 0 0 0-22-22c31.78-34.53 55.75-45 69.9-47.91c-2.85 14.16-13.37 38.13-47.9 69.91"},null,-1)])])}const vue=Te({name:"ph-paint-brush",render:gue}),bue={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function yue(t,e){return w(),N("svg",bue,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M232 208a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V48a8 8 0 0 1 16 0v94.37L90.73 98a8 8 0 0 1 10.07-.38l58.81 44.11L218.73 90a8 8 0 1 1 10.54 12l-64 56a8 8 0 0 1-10.07.38l-58.81-44.09L40 163.63V200h184a8 8 0 0 1 8 8"},null,-1)])])}const xue=Te({name:"ph-chart-line",render:yue}),wue={class:"d-flex flex-column gap-4"},_ue=se({__name:"EditorAppearanceTab",setup(t){const{chartType:e}=pn(),{availableOptionKeys:n}=kn(),o=k(()=>e.value.includes("horizontal")||e.value===Le.BarStacked||e.value===Le.BarSplit||e.value===Le.BarGrouped?ju:ks),r=k(()=>n.value.includes("stacked")),i=k(()=>n.value.includes("interpolation")||n.value.includes("lineSymbols")),s=k(()=>!r.value&&i.value),a=k(()=>n.value.includes("barBackground")||n.value.includes("barSeparators")||n.value.includes("barGap")||n.value.includes("connectedColumns")||n.value.includes("categoryLabelLine")),l=k(()=>n.value.includes("displayAsPercentage"));return(c,u)=>{const d=due,f=uue,h=Yce,g=Wce,b=zce,m=Fce;return w(),N("div",wue,[H(p(Wo),{title:"Theme",icon:p(vue)},{default:J(()=>[H(d)]),_:1},8,["icon"]),H(p(Wo),{title:"Colors",icon:p(sT)},{default:J(()=>[H(f)]),_:1},8,["icon"]),p(s)?(w(),Q(p(Wo),{key:0,title:"Line Style",icon:p(pue)},{default:J(()=>[H(h)]),_:1},8,["icon"])):re("",!0),p(a)?(w(),Q(p(Wo),{key:1,title:"Bar Style",icon:p(o)},{default:J(()=>[H(g)]),_:1},8,["icon"])):re("",!0),p(l)?(w(),Q(p(Wo),{key:2,title:"Slices",icon:p(cC)},{default:J(()=>[H(b)]),_:1},8,["icon"])):re("",!0),p(r)?(w(),Q(p(Wo),{key:3,title:"Areas",icon:p(xue)},{default:J(()=>[H(m)]),_:1},8,["icon"])):re("",!0)])}}}),Sue={class:"d-flex flex-column gap-3"},kue=se({__name:"EditorPropertyForm",setup(t){const{title:e,description:n,byline:o,note:r,source:i,sourceUrl:s}=pn();return(a,l)=>{const c=qs,u=On,d=cy;return w(),N("div",Sue,[H(u,{label:"Title","label-for":"prop-title"},{default:J(()=>[H(c,{id:"prop-title",modelValue:p(e),"onUpdate:modelValue":l[0]||(l[0]=f=>Ke(e)?e.value=f:null),placeholder:"Chart title"},null,8,["modelValue"])]),_:1}),H(u,{label:"Description","label-for":"prop-description"},{default:J(()=>[H(d,{id:"prop-description",modelValue:p(n),"onUpdate:modelValue":l[1]||(l[1]=f=>Ke(n)?n.value=f:null),placeholder:"Short description",rows:"2","max-rows":"5"},null,8,["modelValue"])]),_:1}),H(u,{label:"Byline","label-for":"prop-byline"},{default:J(()=>[H(c,{id:"prop-byline",modelValue:p(o),"onUpdate:modelValue":l[2]||(l[2]=f=>Ke(o)?o.value=f:null),placeholder:"Author or byline"},null,8,["modelValue"])]),_:1}),H(u,{label:"Note","label-for":"prop-note"},{default:J(()=>[H(d,{id:"prop-note",modelValue:p(r),"onUpdate:modelValue":l[3]||(l[3]=f=>Ke(r)?r.value=f:null),placeholder:"Additional note or caveat",rows:"2","max-rows":"4"},null,8,["modelValue"])]),_:1}),H(u,{label:"Source","label-for":"prop-source"},{default:J(()=>[H(c,{id:"prop-source",modelValue:p(i),"onUpdate:modelValue":l[4]||(l[4]=f=>Ke(i)?i.value=f:null),placeholder:"Data source"},null,8,["modelValue"])]),_:1}),H(u,{label:"Source URL","label-for":"prop-source-url"},{default:J(()=>[H(c,{id:"prop-source-url",modelValue:p(s),"onUpdate:modelValue":l[5]||(l[5]=f=>Ke(s)?s.value=f:null),type:"url",placeholder:"https://..."},null,8,["modelValue"])]),_:1})])}}}),gT={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="3.466666666666666" y="20.666666666666668" width="11.733333333333334" height="13.333333333333332" fill="#2563A0" rx="0.5"/><rect x="18.13333333333333" y="4" width="11.733333333333334" height="30" fill="#2563A0" rx="0.5"/><rect x="32.8" y="14" width="11.733333333333334" height="20" fill="#2563A0" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},vT={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2.8" width="26.727272727272727" height="6.4" fill="#2563A0" rx="0.5"/><rect x="2" y="10.8" width="42" height="6.4" fill="#2563A0" rx="0.5"/><rect x="2" y="18.8" width="17.181818181818183" height="6.4" fill="#2563A0" rx="0.5"/><rect x="2" y="26.8" width="34.36363636363637" height="6.4" fill="#2563A0" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},bT={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="3.65" y="17.64" width="5.61" height="16.36" fill="#2563A0" rx="0.5"/><rect x="9.88" y="23.09" width="5.61" height="10.91" fill="#D4A63A" rx="0.5"/><rect x="16.12" y="13.55" width="5.61" height="20.45" fill="#C94044" rx="0.5"/><rect x="25.65" y="9.45" width="5.61" height="24.55" fill="#2563A0" rx="0.5"/><rect x="31.88" y="4.00" width="5.61" height="30.00" fill="#D4A63A" rx="0.5"/><rect x="38.12" y="20.36" width="5.61" height="13.64" fill="#C94044" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},yT={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><polyline points="2.00,32.00 10.80,21.50 19.60,26.75 28.40,11.00 37.20,16.25 46.00,4.00" fill="none" stroke="#2563A0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',style:"width:100%;height:100%"})}},xT={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><polyline points="2.00,32.00 13.00,20.00 24.00,26.00 35.00,8.00 46.00,14.00" fill="none" stroke="#2563A0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><polyline points="2.00,12.00 13.00,18.00 24.00,4.00 35.00,22.00 46.00,8.00" fill="none" stroke="#D4A63A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><polyline points="2.00,24.00 13.00,16.00 24.00,20.00 35.00,10.00 46.00,4.00" fill="none" stroke="#C94044" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',style:"width:100%;height:100%"})}},Cue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><path d="M 2.00,22.67 L 13.00,10.22 L 24.00,16.44 L 35.00,4.00 L 46.00,13.33 L 46.00,34 L 2.00,34 Z" fill="#2563A0" opacity="0.3"/><polyline points="2.00,22.67 13.00,10.22 24.00,16.44 35.00,4.00 46.00,13.33" fill="none" stroke="#2563A0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',style:"width:100%;height:100%"})}},Aue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><path d="M 2.00,16.92 L 13.00,8.31 L 24.00,12.62 L 35.00,4.00 L 46.00,12.62 L 46.00,23.38 L 35.00,16.92 L 24.00,21.23 L 13.00,19.08 L 2.00,23.38 Z" fill="#D4A63A" opacity="0.7"/><path d="M 2.00,23.38 L 13.00,19.08 L 24.00,21.23 L 35.00,16.92 L 46.00,23.38 L 46.00,34 L 35.00,34 L 24.00,34 L 13.00,34 L 2.00,34 Z" fill="#2563A0" opacity="0.7"/></svg>',style:"width:100%;height:100%"})}},$ue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="3.10" y="24.77" width="8.80" height="9.23" fill="#2563A0" rx="0.5"/><rect x="3.10" y="17.85" width="8.80" height="6.92" fill="#D4A63A" rx="0.5"/><rect x="14.10" y="20.15" width="8.80" height="13.85" fill="#2563A0" rx="0.5"/><rect x="14.10" y="8.62" width="8.80" height="11.54" fill="#D4A63A" rx="0.5"/><rect x="25.10" y="22.46" width="8.80" height="11.54" fill="#2563A0" rx="0.5"/><rect x="25.10" y="13.23" width="8.80" height="9.23" fill="#D4A63A" rx="0.5"/><rect x="36.10" y="17.85" width="8.80" height="16.15" fill="#2563A0" rx="0.5"/><rect x="36.10" y="4.00" width="8.80" height="13.85" fill="#D4A63A" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},Tue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="2.00" y="2.80" width="12.92" height="6.40" fill="#2563A0" rx="0.5"/><rect x="14.92" y="2.80" width="9.69" height="6.40" fill="#D4A63A" rx="0.5"/><rect x="2.00" y="10.80" width="19.38" height="6.40" fill="#2563A0" rx="0.5"/><rect x="21.38" y="10.80" width="16.15" height="6.40" fill="#D4A63A" rx="0.5"/><rect x="2.00" y="18.80" width="16.15" height="6.40" fill="#2563A0" rx="0.5"/><rect x="18.15" y="18.80" width="12.92" height="6.40" fill="#D4A63A" rx="0.5"/><rect x="2.00" y="26.80" width="22.62" height="6.40" fill="#2563A0" rx="0.5"/><rect x="24.62" y="26.80" width="19.38" height="6.40" fill="#D4A63A" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},Mue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="2.00" y="2.80" width="12.08" height="6.40" fill="#6878E8" rx="0.5"/><rect x="2.00" y="10.80" width="9.17" height="6.40" fill="#6878E8" rx="0.5"/><rect x="2.00" y="18.80" width="5.83" height="6.40" fill="#6878E8" rx="0.5"/><rect x="2.00" y="26.80" width="4.17" height="6.40" fill="#6878E8" rx="0.5"/><rect x="17.33" y="2.80" width="13.33" height="6.40" fill="#E07B38" rx="0.5"/><rect x="17.33" y="10.80" width="10.42" height="6.40" fill="#E07B38" rx="0.5"/><rect x="17.33" y="18.80" width="6.67" height="6.40" fill="#E07B38" rx="0.5"/><rect x="17.33" y="26.80" width="5.00" height="6.40" fill="#E07B38" rx="0.5"/><rect x="32.67" y="2.80" width="11.25" height="6.40" fill="#B83B5E" rx="0.5"/><rect x="32.67" y="10.80" width="8.33" height="6.40" fill="#B83B5E" rx="0.5"/><rect x="32.67" y="18.80" width="5.00" height="6.40" fill="#B83B5E" rx="0.5"/><rect x="32.67" y="26.80" width="3.33" height="6.40" fill="#B83B5E" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},Oue={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 48 36" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2.60" width="38.06" height="2.04" fill="#6878E8" rx="0.5"/><rect x="2" y="4.87" width="28.88" height="2.04" fill="#E07B38" rx="0.5"/><rect x="2" y="7.13" width="18.38" height="2.04" fill="#B83B5E" rx="0.5"/><rect x="2" y="10.60" width="42.00" height="2.04" fill="#6878E8" rx="0.5"/><rect x="2" y="12.87" width="32.81" height="2.04" fill="#E07B38" rx="0.5"/><rect x="2" y="15.13" width="21.00" height="2.04" fill="#B83B5E" rx="0.5"/><rect x="2" y="18.60" width="35.44" height="2.04" fill="#6878E8" rx="0.5"/><rect x="2" y="20.87" width="26.25" height="2.04" fill="#E07B38" rx="0.5"/><rect x="2" y="23.13" width="15.75" height="2.04" fill="#B83B5E" rx="0.5"/><rect x="2" y="26.60" width="15.75" height="2.04" fill="#6878E8" rx="0.5"/><rect x="2" y="28.87" width="10.50" height="2.04" fill="#E07B38" rx="0.5"/><rect x="2" y="31.13" width="6.56" height="2.04" fill="#B83B5E" rx="0.5"/></svg>',style:"width:100%;height:100%"})}},wT={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M 20.000 2.000 A 18 18 0 0 1 34.562 30.580 L 28.737 26.348 A 10.799999999999999 10.799999999999999 0 0 0 20.000 9.200 Z" fill="#2563A0"/><path d="M 34.562 30.580 A 18 18 0 0 1 9.420 34.562 L 13.652 28.737 A 10.799999999999999 10.799999999999999 0 0 0 28.737 26.348 Z" fill="#D4A63A"/><path d="M 9.420 34.562 A 18 18 0 0 1 3.713 12.336 L 10.228 15.402 A 10.799999999999999 10.799999999999999 0 0 0 13.652 28.737 Z" fill="#C94044"/><path d="M 3.713 12.336 A 18 18 0 0 1 20.000 2.000 L 20.000 9.200 A 10.799999999999999 10.799999999999999 0 0 0 10.228 15.402 Z" fill="#2D8659"/></svg>',style:"width:100%;height:100%"})}},_T={render(){return Rt("div",{innerHTML:'<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M 20 20 L 20.000 2.000 A 18 18 0 0 1 34.562 30.580 Z" fill="#2563A0"/><path d="M 20 20 L 34.562 30.580 A 18 18 0 0 1 9.420 34.562 Z" fill="#D4A63A"/><path d="M 20 20 L 9.420 34.562 A 18 18 0 0 1 3.713 12.336 Z" fill="#C94044"/><path d="M 20 20 L 3.713 12.336 A 18 18 0 0 1 20.000 2.000 Z" fill="#2D8659"/></svg>',style:"width:100%;height:100%"})}},Bue=se({__name:"EditorChartTypePicker",setup(t){const{chartType:e,selectedColumn:n}=pn(),{currentOptions:o,availableOptionKeys:r,setOption:i}=kn(),s=Zo(),a=k(()=>r.value.includes("stackMode")),l=[{value:"normal",text:"Normal"},{value:"percent",text:"Percentage (100%)"}],c=[{value:Le.BarVertical,label:"Columns",description:"Compare values across categories",visual:Te(gT)},{value:Le.BarHorizontal,label:"Bars",description:"Compare values with long labels",visual:Te(vT)},{value:Le.BarMulti,label:"Grouped Columns",description:"Compare multiple series side by side",visual:Te(bT)},{value:Le.ColumnStacked,label:"Stacked Columns",description:"Compare stacked totals",visual:Te($ue)},{value:Le.BarStacked,label:"Stacked Bars",description:"Compare stacked totals horizontally",visual:Te(Tue)},{value:Le.BarSplit,label:"Split Bars",description:"Compare multiple metrics in separate bar panels",visual:Te(Mue)},{value:Le.BarGrouped,label:"Grouped Bars",description:"Compare multiple series side by side horizontally",visual:Te(Oue)},{value:Le.Line,label:"Line",description:"Show trends over time",visual:Te(yT)},{value:Le.LineMulti,label:"Lines",description:"Compare trends across series",visual:Te(xT)},{value:Le.Area,label:"Area",description:"Show magnitude over time",visual:Te(Cue)},{value:Le.AreaStacked,label:"Areas",description:"Compare and stack multiple area series",visual:Te(Aue)},{value:Le.Donut,label:"Donut",description:"Show proportions with a center space",visual:Te(wT)},{value:Le.Pie,label:"Pie",description:"Show parts of a whole",visual:Te(_T)}],u=[Le.BarVertical,Le.BarHorizontal,Le.Line,Le.Area,Le.VerticalBar,Le.HorizontalBar],d=k(()=>u.includes(e.value)&&s.columns.value.length>2),f=k(()=>s.columns.value.slice(1).map(h=>({value:h,text:h})));return Ve([e,()=>s.columns.value],()=>{d.value&&!n.value&&s.columns.value.length>2&&(n.value=s.columns.value[1])},{immediate:!0}),(h,g)=>{const b=On,m=Ra;return w(),N(Re,null,[H(b,{label:"Chart type","label-for":"chart-type-select"},{default:J(()=>[H(p(En),{id:"chart-type-select",modelValue:p(e),"onUpdate:modelValue":g[0]||(g[0]=v=>Ke(e)?e.value=v:null),block:"",options:c},null,8,["modelValue"])]),_:1}),p(d)?(w(),Q(b,{key:0,label:"Data column","label-for":"column-select",class:"mt-3"},{default:J(()=>[H(m,{id:"column-select",modelValue:p(n),"onUpdate:modelValue":g[1]||(g[1]=v=>Ke(n)?n.value=v:null),options:p(f)},null,8,["modelValue","options"])]),_:1})):re("",!0),p(a)?(w(),Q(b,{key:1,label:"Stack mode","label-for":"opt-stack-mode",class:"mt-3"},{default:J(()=>[H(m,{id:"opt-stack-mode","model-value":p(o).stackMode??"normal",options:l,"onUpdate:modelValue":g[2]||(g[2]=v=>p(i)("stackMode",v))},null,8,["model-value"])]),_:1})):re("",!0)],64)}}}),Lue=100,Pue=Po("chartHistory",()=>{const t=new Map,e=De(!1),n=De(!1);let o="",r=!1,i=!1;function s(d){let f=t.get(d);return f||(f={undoStack:[],redoStack:[],currentState:""},t.set(d,f)),f}function a(d,f){const h={config:{chartType:d.chartType,title:d.title,description:d.description,byline:d.byline,note:d.note,source:d.source,sourceUrl:d.sourceUrl,sort:d.sort,data:d.data,selectedColumn:d.selectedColumn,colorizes:JSON.parse(JSON.stringify(d.colorizes)),highlights:JSON.parse(JSON.stringify(d.highlights)),areaFills:JSON.parse(JSON.stringify(d.areaFills)),annotations:JSON.parse(JSON.stringify(d.annotations)),seriesOverrides:JSON.parse(JSON.stringify(d.seriesOverrides??[])),layout:JSON.parse(JSON.stringify(d.layout??Xd))},typeOptions:JSON.parse(JSON.stringify(f))};return JSON.stringify(h)}function l(){const d=t.get(o);e.value=d?d.undoStack.length>0:!1,n.value=d?d.redoStack.length>0:!1}function c(d){const f=s(o);d!==f.currentState&&(f.undoStack.push(f.currentState),f.undoStack.length>Lue&&f.undoStack.shift(),f.redoStack.length=0,f.currentState=d,l())}function u(){const d=pn(),{store:f,hydrate:h}=kn(),{sessionId:g}=Vs();function b(){return a({chartType:d.chartType.value,title:d.title.value,description:d.description.value,byline:d.byline.value,note:d.note.value,source:d.source.value,sourceUrl:d.sourceUrl.value,sort:d.sort.value,data:d.data.value,selectedColumn:d.selectedColumn.value,colorizes:d.colorizes.value,highlights:d.highlights.value,areaFills:d.areaFills.value,annotations:d.annotations.value,seriesOverrides:d.seriesOverrides.value,layout:d.layout.value},f)}i||(i=!0,M0(!0).run(()=>{Ve(g,_=>{if(r=!0,o=_,_){const S=s(_);S.currentState||(S.currentState=b())}l(),wn(()=>{r=!1})},{immediate:!0,flush:"sync"}),Ve([d.chartType,d.title,d.description,d.byline,d.note,d.source,d.sourceUrl,d.sort,d.data,d.selectedColumn,d.colorizes,d.highlights,d.areaFills,d.annotations,d.layout,()=>JSON.stringify(f)],()=>{r||!o||c(b())},{deep:!0})}));function m(x){r=!0;const _=JSON.parse(x);d.hydrate(_.config),h(_.typeOptions),wn(()=>{r=!1})}function v(){const x=t.get(o);!x||x.undoStack.length===0||(x.redoStack.push(x.currentState),x.currentState=x.undoStack.pop(),l(),m(x.currentState))}function y(){const x=t.get(o);!x||x.redoStack.length===0||(x.undoStack.push(x.currentState),x.currentState=x.redoStack.pop(),l(),m(x.currentState))}return{undo:v,redo:y}}return{canUndo:k(()=>e.value),canRedo:k(()=>n.value),init:u}});function Due(){const t=Pue(),{canUndo:e,canRedo:n}=At(t),{undo:o,redo:r}=t.init();return{canUndo:e,canRedo:n,undo:o,redo:r}}const Eue={class:"chart-edit-toolbar"},Iue=se({__name:"ChartEditToolbar",setup(t){const e=dr(),{viewMode:n}=At(e),{setViewMode:o}=e,{canUndo:r,canRedo:i,undo:s,redo:a}=Due(),l=k({get:()=>n.value,set:u=>o(u)}),c=[{value:"preview",text:"Preview"},{value:"dsl",text:"DSL"}];return(u,d)=>(w(),N("div",Eue,[H(p(PH),{disabled:!p(r),onClick:p(s)},null,8,["disabled","onClick"]),H(p(MH),{disabled:!p(i),onClick:p(a)},null,8,["disabled","onClick"]),H(p(lW),{modelValue:p(l),"onUpdate:modelValue":d[0]||(d[0]=f=>Ke(l)?l.value=f:null),options:c,size:"sm"},null,8,["modelValue"])]))}}),Nue=Be(Iue,[["__scopeId","data-v-de044834"]]);let Y1=[],ST=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?ST:Y1).push(n=n+t[e])})();function Rue(t){if(t<768)return!1;for(let e=0,n=Y1.length;;){let o=e+n>>1;if(t<Y1[o])n=o;else if(t>=ST[o])e=o+1;else return!0;if(e==n)return!1}}function k6(t){return t>=127462&&t<=127487}const C6=8205;function Fue(t,e,n=!0,o=!0){return(n?kT:Vue)(t,e,o)}function kT(t,e,n){if(e==t.length)return e;e&&CT(t.charCodeAt(e))&&AT(t.charCodeAt(e-1))&&e--;let o=gv(t,e);for(e+=A6(o);e<t.length;){let r=gv(t,e);if(o==C6||r==C6||n&&Rue(r))e+=A6(r),o=r;else if(k6(r)){let i=0,s=e-2;for(;s>=0&&k6(gv(t,s));)i++,s-=2;if(i%2==0)break;e+=2}else break}return e}function Vue(t,e,n){for(;e>0;){let o=kT(t,e-2,n);if(o<e)return o;e--}return 0}function gv(t,e){let n=t.charCodeAt(e);if(!AT(n)||e+1==t.length)return n;let o=t.charCodeAt(e+1);return CT(o)?(n-55296<<10)+(o-56320)+65536:n}function CT(t){return t>=56320&&t<57344}function AT(t){return t>=55296&&t<56320}function A6(t){return t<65536?1:2}class Ut{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,o){[e,n]=eu(this,e,n);let r=[];return this.decompose(0,e,r,2),o.length&&o.decompose(0,o.length,r,3),this.decompose(n,this.length,r,1),Ni.from(r,this.length-(n-e)+o.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=eu(this,e,n);let o=[];return this.decompose(e,n,o,0),Ni.from(o,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),o=this.length-this.scanIdentical(e,-1),r=new yd(this),i=new yd(e);for(let s=n,a=n;;){if(r.next(s),i.next(s),s=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=o)return!0}}iter(e=1){return new yd(this,e)}iterRange(e,n=this.length){return new $T(this,e,n)}iterLines(e,n){let o;if(e==null)o=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;o=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new TT(o)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ut.empty:e.length<=32?new An(e):Ni.from(An.split(e,[]))}}class An extends Ut{constructor(e,n=zue(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,o,r){for(let i=0;;i++){let s=this.text[i],a=r+s.length;if((n?o:a)>=e)return new Hue(r,a,o,s);r=a+1,o++}}decompose(e,n,o,r){let i=e<=0&&n>=this.length?this:new An($6(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let s=o.pop(),a=Yh(i.text,s.text.slice(),0,i.length);if(a.length<=32)o.push(new An(a,s.length+i.length));else{let l=a.length>>1;o.push(new An(a.slice(0,l)),new An(a.slice(l)))}}else o.push(i)}replace(e,n,o){if(!(o instanceof An))return super.replace(e,n,o);[e,n]=eu(this,e,n);let r=Yh(this.text,Yh(o.text,$6(this.text,0,e)),n),i=this.length+o.length-(n-e);return r.length<=32?new An(r,i):Ni.from(An.split(r,[]),i)}sliceString(e,n=this.length,o=`
|
|
850
|
+
`){[e,n]=eu(this,e,n);let r="";for(let i=0,s=0;i<=n&&s<this.text.length;s++){let a=this.text[s],l=i+a.length;i>e&&s&&(r+=o),e<l&&n>i&&(r+=a.slice(Math.max(0,e-i),n-i)),i=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let o=[],r=-1;for(let i of e)o.push(i),r+=i.length+1,o.length==32&&(n.push(new An(o,r)),o=[],r=-1);return r>-1&&n.push(new An(o,r)),n}}class Ni extends Ut{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let o of e)this.lines+=o.lines}lineInner(e,n,o,r){for(let i=0;;i++){let s=this.children[i],a=r+s.length,l=o+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,o,r);r=a+1,o=l+1}}decompose(e,n,o,r){for(let i=0,s=0;s<=n&&i<this.children.length;i++){let a=this.children[i],l=s+a.length;if(e<=l&&n>=s){let c=r&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!c?o.push(a):a.decompose(e-s,n-s,o,c)}s=l+1}}replace(e,n,o){if([e,n]=eu(this,e,n),o.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let s=this.children[r],a=i+s.length;if(e>=i&&n<=a){let l=s.replace(e-i,n-i,o),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let u=this.children.slice();return u[r]=l,new Ni(u,this.length-(n-e)+o.length)}return super.replace(i,a,l)}i=a+1}return super.replace(e,n,o)}sliceString(e,n=this.length,o=`
|
|
851
|
+
`){[e,n]=eu(this,e,n);let r="";for(let i=0,s=0;i<this.children.length&&s<=n;i++){let a=this.children[i],l=s+a.length;s>e&&i&&(r+=o),e<l&&n>s&&(r+=a.sliceString(e-s,n-s,o)),s=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ni))return 0;let o=0,[r,i,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,i+=n){if(r==s||i==a)return o;let l=this.children[r],c=e.children[i];if(l!=c)return o+l.scanIdentical(c,n);o+=l.length+1}}static from(e,n=e.reduce((o,r)=>o+r.length+1,-1)){let o=0;for(let h of e)o+=h.lines;if(o<32){let h=[];for(let g of e)g.flatten(h);return new An(h,n)}let r=Math.max(32,o>>5),i=r<<1,s=r>>1,a=[],l=0,c=-1,u=[];function d(h){let g;if(h.lines>i&&h instanceof Ni)for(let b of h.children)d(b);else h.lines>s&&(l>s||!l)?(f(),a.push(h)):h instanceof An&&l&&(g=u[u.length-1])instanceof An&&h.lines+g.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new An(g.text.concat(h.text),g.length+1+h.length)):(l+h.lines>r&&f(),l+=h.lines,c+=h.length+1,u.push(h))}function f(){l!=0&&(a.push(u.length==1?u[0]:Ni.from(u,c)),c=-1,l=u.length=0)}for(let h of e)d(h);return f(),a.length==1?a[0]:new Ni(a,n)}}Ut.empty=new An([""],0);function zue(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Yh(t,e,n=0,o=1e9){for(let r=0,i=0,s=!0;i<t.length&&r<=o;i++){let a=t[i],l=r+a.length;l>=n&&(l>o&&(a=a.slice(0,o-r)),r<n&&(a=a.slice(n-r)),s?(e[e.length-1]+=a,s=!1):e.push(a)),r=l+1}return e}function $6(t,e,n){return Yh(t,[""],e,n)}class yd{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof An?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let o=this.nodes.length-1,r=this.nodes[o],i=this.offsets[o],s=i>>1,a=r instanceof An?r.text.length:r.children.length;if(s==(n>0?a:0)){if(o==0)return this.done=!0,this.value="",this;n>0&&this.offsets[o-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(n>0?0:1)){if(this.offsets[o]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
852
|
+
`,this;e--}else if(r instanceof An){let l=r.text[s+(n<0?-1:0)];if(this.offsets[o]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[o]+=n):(n<0&&this.offsets[o]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof An?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class $T{constructor(e,n,o){this.value="",this.done=!1,this.cursor=new yd(e,n>o?-1:1),this.pos=n>o?e.length:0,this.from=Math.min(n,o),this.to=Math.max(n,o)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let o=n<0?this.pos-this.from:this.to-this.pos;e>o&&(e=o),o-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=o?r:n<0?r.slice(r.length-o):r.slice(0,o),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class TT{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:o,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):o?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ut.prototype[Symbol.iterator]=function(){return this.iter()},yd.prototype[Symbol.iterator]=$T.prototype[Symbol.iterator]=TT.prototype[Symbol.iterator]=function(){return this});class Hue{constructor(e,n,o,r){this.from=e,this.to=n,this.number=o,this.text=r}get length(){return this.to-this.from}}function eu(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Oo(t,e,n=!0,o=!0){return Fue(t,e,n,o)}function Wue(t){return t>=56320&&t<57344}function Uue(t){return t>=55296&&t<56320}function Gue(t,e){let n=t.charCodeAt(e);if(!Uue(n)||e+1==t.length)return n;let o=t.charCodeAt(e+1);return Wue(o)?(n-55296<<10)+(o-56320)+65536:n}function que(t){return t<65536?1:2}const j1=/\r\n?|\n/;var vr=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(vr||(vr={}));class Ki{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let o=this.sections[n+1];e+=o<0?this.sections[n]:o}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,o=0,r=0;n<this.sections.length;){let i=this.sections[n++],s=this.sections[n++];s<0?(e(o,r,i),r+=i):r+=s,o+=i}}iterChangedRanges(e,n=!1){X1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let o=this.sections[n++],r=this.sections[n++];r<0?e.push(o,r):e.push(r,o)}return new Ki(e)}composeDesc(e){return this.empty?e:e.empty?this:MT(this,e)}mapDesc(e,n=!1){return e.empty?this:K1(this,e,n)}mapPos(e,n=-1,o=vr.Simple){let r=0,i=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],l=this.sections[s++],c=r+a;if(l<0){if(c>e)return i+(e-r);i+=a}else{if(o!=vr.Simple&&c>=e&&(o==vr.TrackDel&&r<e&&c>e||o==vr.TrackBefore&&r<e||o==vr.TrackAfter&&c>e))return null;if(c>e||c==e&&n<0&&!a)return e==r||n<0?i:i+l;i+=l}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,n=e){for(let o=0,r=0;o<this.sections.length&&r<=n;){let i=this.sections[o++],s=this.sections[o++],a=r+i;if(s>=0&&r<=n&&a>=e)return r<e&&a>n?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let o=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+o+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ki(e)}static create(e){return new Ki(e)}}class zn extends Ki{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return X1(this,(n,o,r,i,s)=>e=e.replace(r,r+(o-n),s),!1),e}mapDesc(e,n=!1){return K1(this,e,n,!0)}invert(e){let n=this.sections.slice(),o=[];for(let r=0,i=0;r<n.length;r+=2){let s=n[r],a=n[r+1];if(a>=0){n[r]=a,n[r+1]=s;let l=r>>1;for(;o.length<l;)o.push(Ut.empty);o.push(s?e.slice(i,i+s):Ut.empty)}i+=s}return new zn(n,o)}compose(e){return this.empty?e:e.empty?this:MT(this,e,!0)}map(e,n=!1){return e.empty?this:K1(this,e,n,!0)}iterChanges(e,n=!1){X1(this,e,n)}get desc(){return Ki.create(this.sections)}filter(e){let n=[],o=[],r=[],i=new ef(this);e:for(let s=0,a=0;;){let l=s==e.length?1e9:e[s++];for(;a<l||a==l&&i.len==0;){if(i.done)break e;let u=Math.min(i.len,l-a);yo(r,u,-1);let d=i.ins==-1?-1:i.off==0?i.ins:0;yo(n,u,d),d>0&&ga(o,n,i.text),i.forward(u),a+=u}let c=e[s++];for(;a<c;){if(i.done)break e;let u=Math.min(i.len,c-a);yo(n,u,-1),yo(r,u,i.ins==-1?-1:i.off==0?i.ins:0),i.forward(u),a+=u}}return{changes:new zn(n,o),filtered:Ki.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let o=this.sections[n],r=this.sections[n+1];r<0?e.push(o):r==0?e.push([o]):e.push([o].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,o){let r=[],i=[],s=0,a=null;function l(u=!1){if(!u&&!r.length)return;s<n&&yo(r,n-s,-1);let d=new zn(r,i);a=a?a.compose(d.map(a)):d,r=[],i=[],s=0}function c(u){if(Array.isArray(u))for(let d of u)c(d);else if(u instanceof zn){if(u.length!=n)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${n})`);l(),a=a?a.compose(u.map(a)):u}else{let{from:d,to:f=d,insert:h}=u;if(d>f||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let g=h?typeof h=="string"?Ut.of(h.split(o||j1)):h:Ut.empty,b=g.length;if(d==f&&b==0)return;d<s&&l(),d>s&&yo(r,d-s,-1),yo(r,f-d,b),ga(i,r,g),s=f}}return c(e),l(!a),a}static empty(e){return new zn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],o=[];for(let r=0;r<e.length;r++){let i=e[r];if(typeof i=="number")n.push(i,-1);else{if(!Array.isArray(i)||typeof i[0]!="number"||i.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)n.push(i[0],0);else{for(;o.length<r;)o.push(Ut.empty);o[r]=Ut.of(i.slice(1)),n.push(i[0],o[r].length)}}}return new zn(n,o)}static createSet(e,n){return new zn(e,n)}}function yo(t,e,n,o=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:o?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function ga(t,e,n){if(n.length==0)return;let o=e.length-2>>1;if(o<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<o;)t.push(Ut.empty);t.push(n)}}function X1(t,e,n){let o=t.inserted;for(let r=0,i=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)r+=a,i+=a;else{let c=r,u=i,d=Ut.empty;for(;c+=a,u+=l,l&&o&&(d=d.append(o[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(r,c,i,u,d),r=c,i=u}}}function K1(t,e,n,o=!1){let r=[],i=o?[]:null,s=new ef(t),a=new ef(e);for(let l=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);yo(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let c=a.len;for(yo(r,a.ins,-1);c;){let u=Math.min(s.len,c);s.ins>=0&&l<s.i&&s.len<=u&&(yo(r,0,s.ins),i&&ga(i,r,s.text),l=s.i),s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;for(;u;)if(a.ins==-1){let d=Math.min(u,a.len);c+=d,u-=d,a.forward(d)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;yo(r,c,l<s.i?s.ins:0),i&&l<s.i&&ga(i,r,s.text),l=s.i,s.forward(s.len-u)}else{if(s.done&&a.done)return i?zn.createSet(r,i):Ki.create(r);throw new Error("Mismatched change set lengths")}}}function MT(t,e,n=!1){let o=[],r=n?[]:null,i=new ef(t),s=new ef(e);for(let a=!1;;){if(i.done&&s.done)return r?zn.createSet(o,r):Ki.create(o);if(i.ins==0)yo(o,i.len,0,a),i.next();else if(s.len==0&&!s.done)yo(o,0,s.ins,a),r&&ga(r,o,s.text),s.next();else{if(i.done||s.done)throw new Error("Mismatched change set lengths");{let l=Math.min(i.len2,s.len),c=o.length;if(i.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;yo(o,l,u,a),r&&u&&ga(r,o,s.text)}else s.ins==-1?(yo(o,i.off?0:i.len,l,a),r&&ga(r,o,i.textBit(l))):(yo(o,i.off?0:i.len,s.off?0:s.ins,a),r&&!s.off&&ga(r,o,s.text));a=(i.ins>l||s.ins>=0&&s.len>l)&&(a||o.length>c),i.forward2(l),s.forward(l)}}}}class ef{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ut.empty:e[n]}textBit(e){let{inserted:n}=this.set,o=this.i-2>>1;return o>=n.length&&!e?Ut.empty:n[o].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ml{constructor(e,n,o){this.from=e,this.to=n,this.flags=o}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let o,r;return this.empty?o=r=e.mapPos(this.from,n):(o=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),o==this.from&&r==this.to?this:new ml(o,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Ne.range(e,n);let o=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Ne.range(this.anchor,o)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ne.range(e.anchor,e.head)}static create(e,n,o){return new ml(e,n,o)}}class Ne{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Ne.create(this.ranges.map(o=>o.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let o=0;o<this.ranges.length;o++)if(!this.ranges[o].eq(e.ranges[o],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Ne([this.main],0)}addRange(e,n=!0){return Ne.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let o=this.ranges.slice();return o[n]=e,Ne.create(o,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ne(e.ranges.map(n=>ml.fromJSON(n)),e.main)}static single(e,n=e){return new Ne([Ne.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let o=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=o:i.from<o)return Ne.normalized(e.slice(),n);o=i.to}return new Ne(e,n)}static cursor(e,n=0,o,r){return ml.create(e,e,(n==0?0:n<0?8:16)|(o==null?7:Math.min(6,o))|(r??16777215)<<6)}static range(e,n,o,r){let i=(o??16777215)<<6|(r==null?7:Math.min(6,r));return n<e?ml.create(n,e,48|i):ml.create(e,n,(n>e?8:0)|i)}static normalized(e,n=0){let o=e[n];e.sort((r,i)=>r.from-i.from),n=e.indexOf(o);for(let r=1;r<e.length;r++){let i=e[r],s=e[r-1];if(i.empty?i.from<=s.to:i.from<s.to){let a=s.from,l=Math.max(i.to,s.to);r<=n&&n--,e.splice(--r,2,i.anchor>i.head?Ne.range(l,a):Ne.range(a,l))}}return new Ne(e,n)}}function OT(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let P2=0;class gt{constructor(e,n,o,r,i){this.combine=e,this.compareInput=n,this.compare=o,this.isStatic=r,this.id=P2++,this.default=e([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(e={}){return new gt(e.combine||(n=>n),e.compareInput||((n,o)=>n===o),e.compare||(e.combine?(n,o)=>n===o:D2),!!e.static,e.enables)}of(e){return new jh([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new jh(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new jh(e,this,2,n)}from(e,n){return n||(n=o=>o),this.compute([e],o=>n(o.field(e)))}}function D2(t,e){return t==e||t.length==e.length&&t.every((n,o)=>n===e[o])}class jh{constructor(e,n,o,r){this.dependencies=e,this.facet=n,this.type=o,this.value=r,this.id=P2++}dynamicSlot(e){var n;let o=this.value,r=this.facet.compareInput,i=this.id,s=e[i]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:(((n=e[d.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[d.id]);return{create(d){return d.values[s]=o(d),1},update(d,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||Z1(d,u)){let h=o(d);if(a?!T6(h,d.values[s],r):!r(h,d.values[s]))return d.values[s]=h,1}return 0},reconfigure:(d,f)=>{let h,g=f.config.address[i];if(g!=null){let b=r0(f,g);if(this.dependencies.every(m=>m instanceof gt?f.facet(m)===d.facet(m):m instanceof Ya?f.field(m,!1)==d.field(m,!1):!0)||(a?T6(h=o(d),b,r):r(h=o(d),b)))return d.values[s]=b,0}else h=o(d);return d.values[s]=h,1}}}}function T6(t,e,n){if(t.length!=e.length)return!1;for(let o=0;o<t.length;o++)if(!n(t[o],e[o]))return!1;return!0}function Z1(t,e){let n=!1;for(let o of e)xd(t,o)&1&&(n=!0);return n}function Yue(t,e,n){let o=n.map(l=>t[l.id]),r=n.map(l=>l.type),i=o.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let c=[];for(let u=0;u<o.length;u++){let d=r0(l,o[u]);if(r[u]==2)for(let f of d)c.push(f);else c.push(d)}return e.combine(c)}return{create(l){for(let c of o)xd(l,c);return l.values[s]=a(l),1},update(l,c){if(!Z1(l,i))return 0;let u=a(l);return e.compare(u,l.values[s])?0:(l.values[s]=u,1)},reconfigure(l,c){let u=Z1(l,o),d=c.config.facets[e.id],f=c.facet(e);if(d&&!u&&D2(n,d))return l.values[s]=f,0;let h=a(l);return e.compare(h,f)?(l.values[s]=f,0):(l.values[s]=h,1)}}}const hh=gt.define({static:!0});class Ya{constructor(e,n,o,r,i){this.id=e,this.createF=n,this.updateF=o,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let n=new Ya(P2++,e.create,e.update,e.compare||((o,r)=>o===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(hh).find(o=>o.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:o=>(o.values[n]=this.create(o),1),update:(o,r)=>{let i=o.values[n],s=this.updateF(i,r);return this.compareF(i,s)?0:(o.values[n]=s,1)},reconfigure:(o,r)=>{let i=o.facet(hh),s=r.facet(hh),a;return(a=i.find(l=>l.field==this))&&a!=s.find(l=>l.field==this)?(o.values[n]=a.create(o),1):r.config.address[this.id]!=null?(o.values[n]=r.field(this),0):(o.values[n]=this.create(o),1)}}}init(e){return[this,hh.of({field:this,create:e})]}get extension(){return this}}const fl={lowest:4,low:3,default:2,high:1,highest:0};function zu(t){return e=>new BT(e,t)}const E2={highest:zu(fl.highest),high:zu(fl.high),default:zu(fl.default),low:zu(fl.low),lowest:zu(fl.lowest)};class BT{constructor(e,n){this.inner=e,this.prec=n}}class Zm{of(e){return new Q1(this,e)}reconfigure(e){return Zm.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Q1{constructor(e,n){this.compartment=e,this.inner=n}}class o0{constructor(e,n,o,r,i,s){for(this.base=e,this.compartments=n,this.dynamicSlots=o,this.address=r,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<o.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,o){let r=[],i=Object.create(null),s=new Map;for(let f of jue(e,n,s))f instanceof Ya?r.push(f):(i[f.facet.id]||(i[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],c=[];for(let f of r)a[f.id]=c.length<<1,c.push(h=>f.slot(h));let u=o==null?void 0:o.config.facets;for(let f in i){let h=i[f],g=h[0].facet,b=u&&u[f]||[];if(h.every(m=>m.type==0))if(a[g.id]=l.length<<1|1,D2(b,h))l.push(o.facet(g));else{let m=g.combine(h.map(v=>v.value));l.push(o&&g.compare(m,o.facet(g))?o.facet(g):m)}else{for(let m of h)m.type==0?(a[m.id]=l.length<<1|1,l.push(m.value)):(a[m.id]=c.length<<1,c.push(v=>m.dynamicSlot(v)));a[g.id]=c.length<<1,c.push(m=>Yue(m,g,h))}}let d=c.map(f=>f(a));return new o0(e,s,d,a,l,i)}}function jue(t,e,n){let o=[[],[],[],[],[]],r=new Map;function i(s,a){let l=r.get(s);if(l!=null){if(l<=a)return;let c=o[l].indexOf(s);c>-1&&o[l].splice(c,1),s instanceof Q1&&n.delete(s.compartment)}if(r.set(s,a),Array.isArray(s))for(let c of s)i(c,a);else if(s instanceof Q1){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(s.compartment)||s.inner;n.set(s.compartment,c),i(c,a)}else if(s instanceof BT)i(s.inner,s.prec);else if(s instanceof Ya)o[a].push(s),s.provides&&i(s.provides,a);else if(s instanceof jh)o[a].push(s),s.facet.extensions&&i(s.facet.extensions,fl.default);else{let c=s.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(c,a)}}return i(t,fl.default),o.reduce((s,a)=>s.concat(a))}function xd(t,e){if(e&1)return 2;let n=e>>1,o=t.status[n];if(o==4)throw new Error("Cyclic dependency between fields and/or facets");if(o&2)return o;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function r0(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const LT=gt.define(),J1=gt.define({combine:t=>t.some(e=>e),static:!0}),PT=gt.define({combine:t=>t.length?t[0]:void 0,static:!0}),DT=gt.define(),ET=gt.define(),IT=gt.define(),NT=gt.define({combine:t=>t.length?t[0]:!1});class ja{constructor(e,n){this.type=e,this.value=n}static define(){return new Xue}}class Xue{of(e){return new ja(this,e)}}class Kue{constructor(e){this.map=e}of(e){return new Tn(this,e)}}class Tn{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Tn(this.type,n)}is(e){return this.type==e}static define(e={}){return new Kue(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let o=[];for(let r of e){let i=r.map(n);i&&o.push(i)}return o}}Tn.reconfigure=Tn.define();Tn.appendConfig=Tn.define();class Wn{constructor(e,n,o,r,i,s){this.startState=e,this.changes=n,this.selection=o,this.effects=r,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,o&&OT(o,n.newLength),i.some(a=>a.type==Wn.time)||(this.annotations=i.concat(Wn.time.of(Date.now())))}static create(e,n,o,r,i,s){return new Wn(e,n,o,r,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Wn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Wn.time=ja.define();Wn.userEvent=ja.define();Wn.addToHistory=ja.define();Wn.remote=ja.define();function Zue(t,e){let n=[];for(let o=0,r=0;;){let i,s;if(o<t.length&&(r==e.length||e[r]>=t[o]))i=t[o++],s=t[o++];else if(r<e.length)i=e[r++],s=e[r++];else return n;!n.length||n[n.length-1]<i?n.push(i,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function RT(t,e,n){var o;let r,i,s;return n?(r=e.changes,i=zn.empty(e.changes.length),s=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),i=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(r)),{changes:s,selection:e.selection?e.selection.map(i):(o=t.selection)===null||o===void 0?void 0:o.map(r),effects:Tn.mapEffects(t.effects,r).concat(Tn.mapEffects(e.effects,i)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function eb(t,e,n){let o=e.selection,r=Oc(e.annotations);return e.userEvent&&(r=r.concat(Wn.userEvent.of(e.userEvent))),{changes:e.changes instanceof zn?e.changes:zn.of(e.changes||[],n,t.facet(PT)),selection:o&&(o instanceof Ne?o:Ne.single(o.anchor,o.head)),effects:Oc(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function FT(t,e,n){let o=eb(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let i=1;i<e.length;i++){e[i].filter===!1&&(n=!1);let s=!!e[i].sequential;o=RT(o,eb(t,e[i],s?o.changes.newLength:t.doc.length),s)}let r=Wn.create(t,o.changes,o.selection,o.effects,o.annotations,o.scrollIntoView);return Jue(n?Que(r):r)}function Que(t){let e=t.startState,n=!0;for(let r of e.facet(DT)){let i=r(t);if(i===!1){n=!1;break}Array.isArray(i)&&(n=n===!0?i:Zue(n,i))}if(n!==!0){let r,i;if(n===!1)i=t.changes.invertedDesc,r=zn.empty(e.doc.length);else{let s=t.changes.filter(n);r=s.changes,i=s.filtered.mapDesc(s.changes).invertedDesc}t=Wn.create(e,r,t.selection&&t.selection.map(i),Tn.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let o=e.facet(ET);for(let r=o.length-1;r>=0;r--){let i=o[r](t);i instanceof Wn?t=i:Array.isArray(i)&&i.length==1&&i[0]instanceof Wn?t=i[0]:t=FT(e,Oc(i),!1)}return t}function Jue(t){let e=t.startState,n=e.facet(IT),o=t;for(let r=n.length-1;r>=0;r--){let i=n[r](t);i&&Object.keys(i).length&&(o=RT(o,eb(e,i,t.changes.newLength),!0))}return o==t?t:Wn.create(e,t.changes,t.selection,o.effects,o.annotations,o.scrollIntoView)}const ede=[];function Oc(t){return t==null?ede:Array.isArray(t)?t:[t]}var $s=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})($s||($s={}));const tde=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let tb;try{tb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function nde(t){if(tb)return tb.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||tde.test(n)))return!0}return!1}function ode(t){return e=>{if(!/\S/.test(e))return $s.Space;if(nde(e))return $s.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return $s.Word;return $s.Other}}class Zt{constructor(e,n,o,r,i,s){this.config=e,this.doc=n,this.selection=o,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)xd(this,a<<1);this.computeSlot=null}field(e,n=!0){let o=this.config.address[e.id];if(o==null){if(n)throw new RangeError("Field is not present in this state");return}return xd(this,o),r0(this,o)}update(...e){return FT(this,e,!0)}applyTransaction(e){let n=this.config,{base:o,compartments:r}=n;for(let a of e.effects)a.is(Zm.reconfigure)?(n&&(r=new Map,n.compartments.forEach((l,c)=>r.set(c,l)),n=null),r.set(a.value.compartment,a.value.extension)):a.is(Tn.reconfigure)?(n=null,o=a.value):a.is(Tn.appendConfig)&&(n=null,o=Oc(o).concat(a.value));let i;n?i=e.startState.values.slice():(n=o0.resolve(o,r,this),i=new Zt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let s=e.startState.facet(J1)?e.newSelection:e.newSelection.asSingle();new Zt(n,e.newDoc,s,i,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Ne.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,o=e(n.ranges[0]),r=this.changes(o.changes),i=[o.range],s=Oc(o.effects);for(let a=1;a<n.ranges.length;a++){let l=e(n.ranges[a]),c=this.changes(l.changes),u=c.map(r);for(let f=0;f<a;f++)i[f]=i[f].map(u);let d=r.mapDesc(c,!0);i.push(l.range.map(d)),r=r.compose(u),s=Tn.mapEffects(s,u).concat(Tn.mapEffects(Oc(l.effects),d))}return{changes:r,selection:Ne.create(i,n.mainIndex),effects:s}}changes(e=[]){return e instanceof zn?e:zn.of(e,this.doc.length,this.facet(Zt.lineSeparator))}toText(e){return Ut.of(e.split(this.facet(Zt.lineSeparator)||j1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(xd(this,n),r0(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let o in e){let r=e[o];r instanceof Ya&&this.config.address[r.id]!=null&&(n[o]=r.spec.toJSON(this.field(e[o]),this))}return n}static fromJSON(e,n={},o){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(o){for(let i in o)if(Object.prototype.hasOwnProperty.call(e,i)){let s=o[i],a=e[i];r.push(s.init(l=>s.spec.fromJSON(a,l)))}}return Zt.create({doc:e.doc,selection:Ne.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=o0.resolve(e.extensions||[],new Map),o=e.doc instanceof Ut?e.doc:Ut.of((e.doc||"").split(n.staticFacet(Zt.lineSeparator)||j1)),r=e.selection?e.selection instanceof Ne?e.selection:Ne.single(e.selection.anchor,e.selection.head):Ne.single(0);return OT(r,o.length),n.staticFacet(J1)||(r=r.asSingle()),new Zt(n,o,r,n.dynamicSlots.map(()=>null),(i,s)=>s.create(i),null)}get tabSize(){return this.facet(Zt.tabSize)}get lineBreak(){return this.facet(Zt.lineSeparator)||`
|
|
853
|
+
`}get readOnly(){return this.facet(NT)}phrase(e,...n){for(let o of this.facet(Zt.phrases))if(Object.prototype.hasOwnProperty.call(o,e)){e=o[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(o,r)=>{if(r=="$")return"$";let i=+(r||1);return!i||i>n.length?o:n[i-1]})),e}languageDataAt(e,n,o=-1){let r=[];for(let i of this.facet(LT))for(let s of i(this,n,o))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return ode(n.length?n[0]:"")}wordAt(e){let{text:n,from:o,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),s=e-o,a=e-o;for(;s>0;){let l=Oo(n,s,!1);if(i(n.slice(l,s))!=$s.Word)break;s=l}for(;a<r;){let l=Oo(n,a);if(i(n.slice(a,l))!=$s.Word)break;a=l}return s==a?null:Ne.range(s+o,a+o)}}Zt.allowMultipleSelections=J1;Zt.tabSize=gt.define({combine:t=>t.length?t[0]:4});Zt.lineSeparator=PT;Zt.readOnly=NT;Zt.phrases=gt.define({compare(t,e){let n=Object.keys(t),o=Object.keys(e);return n.length==o.length&&n.every(r=>t[r]==e[r])}});Zt.languageData=LT;Zt.changeFilter=DT;Zt.transactionFilter=ET;Zt.transactionExtender=IT;Zm.reconfigure=Tn.define();function rde(t,e,n={}){let o={};for(let r of t)for(let i of Object.keys(r)){let s=r[i],a=o[i];if(a===void 0)o[i]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,i))o[i]=n[i](a,s);else throw new Error("Config merge conflict for field "+i)}for(let r in e)o[r]===void 0&&(o[r]=e[r]);return o}class Dl{eq(e){return this==e}range(e,n=e){return nb.create(e,n,this)}}Dl.prototype.startSide=Dl.prototype.endSide=0;Dl.prototype.point=!1;Dl.prototype.mapMode=vr.TrackDel;function I2(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let nb=class VT{constructor(e,n,o){this.from=e,this.to=n,this.value=o}static create(e,n,o){return new VT(e,n,o)}};function ob(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class N2{constructor(e,n,o,r){this.from=e,this.to=n,this.value=o,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,o,r=0){let i=o?this.to:this.from;for(let s=r,a=i.length;;){if(s==a)return s;let l=s+a>>1,c=i[l]-e||(o?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}between(e,n,o,r){for(let i=this.findIndex(n,-1e9,!0),s=this.findIndex(o,1e9,!1,i);i<s;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(e,n){let o=[],r=[],i=[],s=-1,a=-1;for(let l=0;l<this.value.length;l++){let c=this.value[l],u=this.from[l]+e,d=this.to[l]+e,f,h;if(u==d){let g=n.mapPos(u,c.startSide,c.mapMode);if(g==null||(f=h=g,c.startSide!=c.endSide&&(h=n.mapPos(u,c.endSide),h<f)))continue}else if(f=n.mapPos(u,c.startSide),h=n.mapPos(d,c.endSide),f>h||f==h&&c.startSide>0&&c.endSide<=0)continue;(h-f||c.endSide-c.startSide)<0||(s<0&&(s=f),c.point&&(a=Math.max(a,h-f)),o.push(c),r.push(f-s),i.push(h-s))}return{mapped:o.length?new N2(r,i,o,a):null,pos:s}}}class rn{constructor(e,n,o,r){this.chunkPos=e,this.chunk=n,this.nextLayer=o,this.maxPoint=r}static create(e,n,o,r){return new rn(e,n,o,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:o=!1,filterFrom:r=0,filterTo:i=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(o&&(n=n.slice().sort(ob)),this.isEmpty)return n.length?rn.of(n):this;let a=new zT(this,null,-1).goto(0),l=0,c=[],u=new tf;for(;a.value||l<n.length;)if(l<n.length&&(a.from-n[l].from||a.startSide-n[l].value.startSide)>=0){let d=n[l++];u.addInner(d.from,d.to,d.value)||c.push(d)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==n.length||this.chunkEnd(a.chunkIndex)<n[l].from)&&(!s||r>this.chunkEnd(a.chunkIndex)||i<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||r>a.to||i<a.from||s(a.from,a.to,a.value))&&(u.addInner(a.from,a.to,a.value)||c.push(nb.create(a.from,a.to,a.value))),a.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?rn.empty:this.nextLayer.update({add:c,filter:s,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],o=[],r=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],l=this.chunk[s],c=e.touchesRange(a,a+l.length);if(c===!1)r=Math.max(r,l.maxPoint),n.push(l),o.push(e.mapPos(a));else if(c===!0){let{mapped:u,pos:d}=l.map(a,e);u&&(r=Math.max(r,u.maxPoint),n.push(u),o.push(d))}}let i=this.nextLayer.map(e);return n.length==0?i:new rn(o,n,i||rn.empty,r)}between(e,n,o){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],s=this.chunk[r];if(n>=i&&e<=i+s.length&&s.between(i,e-i,n-i,o)===!1)return}this.nextLayer.between(e,n,o)}}iter(e=0){return nf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return nf.from(e).goto(n)}static compare(e,n,o,r,i=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=i),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=i),l=M6(s,a,o),c=new Hu(s,l,i),u=new Hu(a,l,i);o.iterGaps((d,f,h)=>O6(c,d,u,f,h,r)),o.empty&&o.length==0&&O6(c,0,u,0,0,r)}static eq(e,n,o=0,r){r==null&&(r=999999999);let i=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),s=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(i.length!=s.length)return!1;if(!i.length)return!0;let a=M6(i,s),l=new Hu(i,a,0).goto(o),c=new Hu(s,a,0).goto(o);for(;;){if(l.to!=c.to||!rb(l.active,c.active)||l.point&&(!c.point||!I2(l.point,c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}static spans(e,n,o,r,i=-1){let s=new Hu(e,null,i).goto(n),a=n,l=s.openStart;for(;;){let c=Math.min(s.to,o);if(s.point){let u=s.activeForPoint(s.to),d=s.pointFrom<n?u.length+1:s.point.startSide<0?u.length:Math.min(u.length,l);r.point(a,c,s.point,u,d,s.pointRank),l=Math.min(s.openEnd(c),u.length)}else c>a&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>o)return l+(s.point&&s.to>o?1:0);a=s.to,s.next()}}static of(e,n=!1){let o=new tf;for(let r of e instanceof nb?[e]:n?ide(e):e)o.add(r.from,r.to,r.value);return o.finish()}static join(e){if(!e.length)return rn.empty;let n=e[e.length-1];for(let o=e.length-2;o>=0;o--)for(let r=e[o];r!=rn.empty;r=r.nextLayer)n=new rn(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}rn.empty=new rn([],[],null,-1);function ide(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let o=t[n];if(ob(e,o)>0)return t.slice().sort(ob);e=o}return t}rn.empty.nextLayer=rn.empty;class tf{finishChunk(e){this.chunks.push(new N2(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,o){this.addInner(e,n,o)||(this.nextLayer||(this.nextLayer=new tf)).add(e,n,o)}addInner(e,n,o){let r=e-this.lastTo||o.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||o.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=o,this.lastFrom=e,this.lastTo=n,this.value.push(o),o.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let o=n.value.length-1;return this.last=n.value[o],this.lastFrom=n.from[o]+e,this.lastTo=n.to[o]+e,!0}finish(){return this.finishInner(rn.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=rn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function M6(t,e,n){let o=new Map;for(let i of t)for(let s=0;s<i.chunk.length;s++)i.chunk[s].maxPoint<=0&&o.set(i.chunk[s],i.chunkPos[s]);let r=new Set;for(let i of e)for(let s=0;s<i.chunk.length;s++){let a=o.get(i.chunk[s]);a!=null&&(n?n.mapPos(a):a)==i.chunkPos[s]&&!(n!=null&&n.touchesRange(a,a+i.chunk[s].length))&&r.add(i.chunk[s])}return r}class zT{constructor(e,n,o,r=0){this.layer=e,this.skip=n,this.minPoint=o,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,o){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,o=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!o||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],o=e+n.from[this.rangeIndex];if(this.from=o,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class nf{constructor(e){this.heap=e}static from(e,n=null,o=-1){let r=[];for(let i=0;i<e.length;i++)for(let s=e[i];!s.isEmpty;s=s.nextLayer)s.maxPoint>=o&&r.push(new zT(s,n,o,i));return r.length==1?r[0]:new nf(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let o of this.heap)o.goto(e,n);for(let o=this.heap.length>>1;o>=0;o--)vv(this.heap,o);return this.next(),this}forward(e,n){for(let o of this.heap)o.forward(e,n);for(let o=this.heap.length>>1;o>=0;o--)vv(this.heap,o);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),vv(this.heap,0)}}}function vv(t,e){for(let n=t[e];;){let o=(e<<1)+1;if(o>=t.length)break;let r=t[o];if(o+1<t.length&&r.compare(t[o+1])>=0&&(r=t[o+1],o++),n.compare(r)<0)break;t[o]=n,t[e]=r,e=o}}class Hu{constructor(e,n,o){this.minPoint=o,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=nf.from(e,n,o)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ph(this.active,e),ph(this.activeTo,e),ph(this.activeRank,e),this.minActive=B6(this.active,this.activeTo)}addActive(e){let n=0,{value:o,to:r,rank:i}=this.cursor;for(;n<this.activeRank.length&&(i-this.activeRank[n]||r-this.activeTo[n])>0;)n++;mh(this.active,n,o),mh(this.activeTo,n,r),mh(this.activeRank,n,i),e&&mh(e,n,this.cursor.from),this.minActive=B6(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let o=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),o&&ph(o,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(o),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=i,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=i.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(o){this.openStart=0;for(let r=o.length-1;r>=0&&o[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let o=this.active.length-1;o>=0&&!(this.activeRank[o]<this.pointRank);o--)(this.activeTo[o]>e||this.activeTo[o]==e&&this.active[o].endSide>=this.point.endSide)&&n.push(this.active[o]);return n.reverse()}openEnd(e){let n=0;for(let o=this.activeTo.length-1;o>=0&&this.activeTo[o]>e;o--)n++;return n}}function O6(t,e,n,o,r,i){t.goto(e),n.goto(o);let s=o+r,a=o,l=o-e,c=!!i.boundChange;for(let u=!1;;){let d=t.to+l-n.to,f=d||t.endSide-n.endSide,h=f<0?t.to+l:n.to,g=Math.min(h,s);if(t.point||n.point?(t.point&&n.point&&I2(t.point,n.point)&&rb(t.activeForPoint(t.to),n.activeForPoint(n.to))||i.comparePoint(a,g,t.point,n.point),u=!1):(u&&i.boundChange(a),g>a&&!rb(t.active,n.active)&&i.compareRange(a,g,t.active,n.active),c&&g<s&&(d||t.openEnd(h)!=n.openEnd(h))&&(u=!0)),h>s)break;a=h,f<=0&&t.next(),f>=0&&n.next()}}function rb(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!I2(t[n],e[n]))return!1;return!0}function ph(t,e){for(let n=e,o=t.length-1;n<o;n++)t[n]=t[n+1];t.pop()}function mh(t,e,n){for(let o=t.length-1;o>=e;o--)t[o+1]=t[o];t[e]=n}function B6(t,e){let n=-1,o=1e9;for(let r=0;r<e.length;r++)(e[r]-o||t[r].endSide-t[n].endSide)<0&&(n=r,o=e[r]);return n}function Qm(t,e,n=t.length){let o=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(o+=e-o%e,r++):(o++,r=Oo(t,r));return o}function sde(t,e,n,o){for(let r=0,i=0;;){if(i>=e)return r;if(r==t.length)break;i+=t.charCodeAt(r)==9?n-i%n:1,r=Oo(t,r)}return t.length}const ib="ͼ",L6=typeof Symbol>"u"?"__"+ib:Symbol.for(ib),sb=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),P6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class La{constructor(e,n){this.rules=[];let{finish:o}=n||{};function r(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function i(s,a,l,c){let u=[],d=/^@(\w+)\b/.exec(s[0]),f=d&&d[1]=="keyframes";if(d&&a==null)return l.push(s[0]+";");for(let h in a){let g=a[h];if(/&/.test(h))i(h.split(/,\s*/).map(b=>s.map(m=>b.replace(/&/,m))).reduce((b,m)=>b.concat(m)),g,l);else if(g&&typeof g=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");i(r(h),g,u,f)}else g!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+g+";")}(u.length||f)&&l.push((o&&!d&&!c?s.map(o):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in e)i(r(s),e[s],this.rules)}getRules(){return this.rules.join(`
|
|
854
|
+
`)}static newName(){let e=P6[L6]||1;return P6[L6]=e+1,ib+e.toString(36)}static mount(e,n,o){let r=e[sb],i=o&&o.nonce;r?i&&r.setNonce(i):r=new ade(e,i),r.mount(Array.isArray(n)?n:[n],e)}}let D6=new Map;class ade{constructor(e,n){let o=e.ownerDocument||e,r=o.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let i=D6.get(o);if(i)return e[sb]=i;this.sheet=new r.CSSStyleSheet,D6.set(o,this)}else this.styleTag=o.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[sb]=this}mount(e,n){let o=this.sheet,r=0,i=0;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<i&&l>-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,a),o)for(let c=0;c<a.rules.length;c++)o.insertRule(a.rules[c],r++)}else{for(;i<l;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(o)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
|
|
855
|
+
`;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Pa={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},of={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},lde=typeof navigator<"u"&&/Mac/.test(navigator.platform),cde=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var oo=0;oo<10;oo++)Pa[48+oo]=Pa[96+oo]=String(oo);for(var oo=1;oo<=24;oo++)Pa[oo+111]="F"+oo;for(var oo=65;oo<=90;oo++)Pa[oo]=String.fromCharCode(oo+32),of[oo]=String.fromCharCode(oo);for(var bv in Pa)of.hasOwnProperty(bv)||(of[bv]=Pa[bv]);function ude(t){var e=lde&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||cde&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?of:Pa)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}let zo=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},ab=typeof document<"u"?document:{documentElement:{style:{}}};const lb=/Edge\/(\d+)/.exec(zo.userAgent),HT=/MSIE \d/.test(zo.userAgent),cb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zo.userAgent),Jm=!!(HT||cb||lb),E6=!Jm&&/gecko\/(\d+)/i.test(zo.userAgent),yv=!Jm&&/Chrome\/(\d+)/.exec(zo.userAgent),dde="webkitFontSmoothing"in ab.documentElement.style,ub=!Jm&&/Apple Computer/.test(zo.vendor),I6=ub&&(/Mobile\/\w+/.test(zo.userAgent)||zo.maxTouchPoints>2);var tt={mac:I6||/Mac/.test(zo.platform),windows:/Win/.test(zo.platform),linux:/Linux|X11/.test(zo.platform),ie:Jm,ie_version:HT?ab.documentMode||6:cb?+cb[1]:lb?+lb[1]:0,gecko:E6,gecko_version:E6?+(/Firefox\/(\d+)/.exec(zo.userAgent)||[0,0])[1]:0,chrome:!!yv,chrome_version:yv?+yv[1]:0,ios:I6,android:/Android\b/.test(zo.userAgent),webkit_version:dde?+(/\bAppleWebKit\/(\d+)/.exec(zo.userAgent)||[0,0])[1]:0,safari:ub,safari_version:ub?+(/\bVersion\/(\d+(\.\d+)?)/.exec(zo.userAgent)||[0,0])[1]:0,tabSize:ab.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function R2(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const i0=Object.create(null);function F2(t,e,n){if(t==e)return!0;t||(t=i0),e||(e=i0);let o=Object.keys(t),r=Object.keys(e);if(o.length-0!=r.length-0)return!1;for(let i of o)if(i!=n&&(r.indexOf(i)==-1||t[i]!==e[i]))return!1;return!0}function fde(t,e){for(let n=t.attributes.length-1;n>=0;n--){let o=t.attributes[n].name;e[o]==null&&t.removeAttribute(o)}for(let n in e){let o=e[n];n=="style"?t.style.cssText=o:t.getAttribute(n)!=o&&t.setAttribute(n,o)}}function N6(t,e,n){let o=!1;if(e)for(let r in e)n&&r in n||(o=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(o=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return o}function hde(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let o=t.attributes[n];e[o.name]=o.value}return e}class eg{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,o){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Rr=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(Rr||(Rr={}));class Xn extends Dl{constructor(e,n,o,r){super(),this.startSide=e,this.endSide=n,this.widget=o,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Of(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),o=!!e.block;return n+=o&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new El(e,n,n,o,e.widget||null,!1)}static replace(e){let n=!!e.block,o,r;if(e.isBlockGap)o=-5e8,r=4e8;else{let{start:i,end:s}=WT(e,n);o=(i?n?-3e8:-1:5e8)-1,r=(s?n?2e8:1:-6e8)+1}return new El(e,o,r,n,e.widget||null,!0)}static line(e){return new Bf(e)}static set(e,n=!1){return rn.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Xn.none=rn.empty;class Of extends Xn{constructor(e){let{start:n,end:o}=WT(e);super(n?-1:5e8,o?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?R2(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||i0}eq(e){return this==e||e instanceof Of&&this.tagName==e.tagName&&F2(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Of.prototype.point=!1;class Bf extends Xn{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Bf&&this.spec.class==e.spec.class&&F2(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Bf.prototype.mapMode=vr.TrackBefore;Bf.prototype.point=!0;class El extends Xn{constructor(e,n,o,r,i,s){super(n,o,i,e),this.block=r,this.isReplace=s,this.mapMode=r?n<=0?vr.TrackBefore:vr.TrackAfter:vr.TrackDel}get type(){return this.startSide!=this.endSide?Rr.WidgetRange:this.startSide<=0?Rr.WidgetBefore:Rr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof El&&pde(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}El.prototype.point=!0;function WT(t,e=!1){let{inclusiveStart:n,inclusiveEnd:o}=t;return n==null&&(n=t.inclusive),o==null&&(o=t.inclusive),{start:n??e,end:o??e}}function pde(t,e){return t==e||!!(t&&e&&t.compare(e))}function Bc(t,e,n,o=0){let r=n.length-1;r>=0&&n[r]+o>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class rf extends Dl{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof rf&&this.tagName==e.tagName&&F2(this.attributes,e.attributes)}static create(e){return new rf(e.tagName,e.attributes||i0)}static set(e,n=!1){return rn.of(e,n)}}rf.prototype.startSide=rf.prototype.endSide=-1;function sf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function db(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function wd(t,e){if(!e.anchorNode)return!1;try{return db(t,e.anchorNode)}catch{return!1}}function Xh(t){return t.nodeType==3?af(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function _d(t,e,n,o){return n?R6(t,e,n,o,-1)||R6(t,e,n,o,1):!1}function Da(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function s0(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function R6(t,e,n,o,r){for(;;){if(t==n&&e==o)return!0;if(e==(r<0?0:zs(t))){if(t.nodeName=="DIV")return!1;let i=t.parentNode;if(!i||i.nodeType!=1)return!1;e=Da(t)+(r<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?zs(t):0}else return!1}}function zs(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function a0(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function mde(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function UT(t,e){let n=e.width/t.offsetWidth,o=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.height-t.offsetHeight)<1)&&(o=1),{scaleX:n,scaleY:o}}function gde(t,e,n,o,r,i,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,d=!1;u&&!d;)if(u.nodeType==1){let f,h=u==l.body,g=1,b=1;if(h)f=mde(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let y=u.getBoundingClientRect();({scaleX:g,scaleY:b}=UT(u,y)),f={left:y.left,right:y.left+u.clientWidth*g,top:y.top,bottom:y.top+u.clientHeight*b}}let m=0,v=0;if(r=="nearest")e.top<f.top?(v=e.top-(f.top+s),n>0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+s)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+s,n<0&&e.top-v<f.top&&(v=e.top-(f.top+s)));else{let y=e.bottom-e.top,x=f.bottom-f.top;v=(r=="center"&&y<=x?e.top+y/2-x/2:r=="start"||r=="center"&&n<0?e.top-s:e.bottom-x+s)-f.top}if(o=="nearest"?e.left<f.left?(m=e.left-(f.left+i),n>0&&e.right>f.right+m&&(m=e.right-f.right+i)):e.right>f.right&&(m=e.right-f.right+i,n<0&&e.left<f.left+m&&(m=e.left-(f.left+i))):m=(o=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:o=="start"==a?e.left-i:e.right-(f.right-f.left)+i)-f.left,m||v)if(h)c.scrollBy(m,v);else{let y=0,x=0;if(v){let _=u.scrollTop;u.scrollTop+=v/b,x=(u.scrollTop-_)*b}if(m){let _=u.scrollLeft;u.scrollLeft+=m/g,y=(u.scrollLeft-_)*g}e={left:e.left-y,top:e.top-x,right:e.right-y,bottom:e.bottom-x},y&&Math.abs(y-m)<1&&(o="nearest"),x&&Math.abs(x-v)<1&&(r="nearest")}if(h)break;(e.top<f.top||e.bottom>f.bottom||e.left<f.left||e.right>f.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function vde(t){let e=t.ownerDocument,n,o;for(let r=t.parentNode;r&&!(r==e.body||n&&o);)if(r.nodeType==1)!o&&r.scrollHeight>r.clientHeight&&(o=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:o}}class bde{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:o}=e;this.set(n,Math.min(e.anchorOffset,n?zs(n):0),o,Math.min(e.focusOffset,o?zs(o):0))}set(e,n,o,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=o,this.focusOffset=r}}let cl=null;tt.safari&&tt.safari_version>=26&&(cl=!1);function GT(t){if(t.setActive)return t.setActive();if(cl)return t.focus(cl);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(cl==null?{get preventScroll(){return cl={preventScroll:!0},!0}}:void 0),!cl){cl=!1;for(let n=0;n<e.length;){let o=e[n++],r=e[n++],i=e[n++];o.scrollTop!=r&&(o.scrollTop=r),o.scrollLeft!=i&&(o.scrollLeft=i)}}}let F6;function af(t,e,n=e){let o=F6||(F6=document.createRange());return o.setEnd(t,n),o.setStart(t,e),o}function Lc(t,e,n,o){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};o&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=o);let i=new KeyboardEvent("keydown",r);i.synthetic=!0,t.dispatchEvent(i);let s=new KeyboardEvent("keyup",r);return s.synthetic=!0,t.dispatchEvent(s),i.defaultPrevented||s.defaultPrevented}function yde(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function xde(t,e){let n=e.focusNode,o=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=o)return!1;for(o=Math.min(o,zs(n));;)if(o){if(n.nodeType!=1)return!1;let r=n.childNodes[o-1];r.contentEditable=="false"?o--:(n=r,o=zs(n))}else{if(n==t)return!0;o=Da(n),n=n.parentNode}}function qT(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function YT(t,e){for(let n=t,o=e;;){if(n.nodeType==3&&o>0)return{node:n,offset:o};if(n.nodeType==1&&o>0){if(n.contentEditable=="false")return null;n=n.childNodes[o-1],o=zs(n)}else if(n.parentNode&&!s0(n))o=Da(n),n=n.parentNode;else return null}}function jT(t,e){for(let n=t,o=e;;){if(n.nodeType==3&&o<n.nodeValue.length)return{node:n,offset:o};if(n.nodeType==1&&o<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[o],o=0}else if(n.parentNode&&!s0(n))o=Da(n)+1,n=n.parentNode;else return null}}class ri{constructor(e,n,o=!0){this.node=e,this.offset=n,this.precise=o}static before(e,n){return new ri(e.parentNode,Da(e),n)}static after(e,n){return new ri(e.parentNode,Da(e)+1,n)}}var Dn=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Dn||(Dn={}));const Il=Dn.LTR,V2=Dn.RTL;function XT(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const wde=XT("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),_de=XT("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),fb=Object.create(null),Oi=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);fb[e]=n,fb[n]=-e}function KT(t){return t<=247?wde[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?_de[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const Sde=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Vi{get dir(){return this.level%2?V2:Il}constructor(e,n,o){this.from=e,this.to=n,this.level=o}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,o,r){let i=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==o)return s;(i<0||(r!=0?r<0?a.from<n:a.to>n:e[i].level>a.level))&&(i=s)}}if(i<0)throw new RangeError("Index out of range");return i}}function ZT(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let o=t[n],r=e[n];if(o.from!=r.from||o.to!=r.to||o.direction!=r.direction||!ZT(o.inner,r.inner))return!1}return!0}const ln=[];function kde(t,e,n,o,r){for(let i=0;i<=o.length;i++){let s=i?o[i-1].to:e,a=i<o.length?o[i].from:n,l=i?256:r;for(let c=s,u=l,d=l;c<a;c++){let f=KT(t.charCodeAt(c));f==512?f=u:f==8&&d==4&&(f=16),ln[c]=f==4?2:f,f&7&&(d=f),u=f}for(let c=s,u=l,d=l;c<a;c++){let f=ln[c];if(f==128)c<a-1&&u==ln[c+1]&&u&24?f=ln[c]=u:ln[c]=256;else if(f==64){let h=c+1;for(;h<a&&ln[h]==64;)h++;let g=c&&u==8||h<n&&ln[h]==8?d==1?1:8:256;for(let b=c;b<h;b++)ln[b]=g;c=h-1}else f==8&&d==1&&(ln[c]=1);u=f,f&7&&(d=f)}}}function Cde(t,e,n,o,r){let i=r==1?2:1;for(let s=0,a=0,l=0;s<=o.length;s++){let c=s?o[s-1].to:e,u=s<o.length?o[s].from:n;for(let d=c,f,h,g;d<u;d++)if(h=fb[f=t.charCodeAt(d)])if(h<0){for(let b=a-3;b>=0;b-=3)if(Oi[b+1]==-h){let m=Oi[b+2],v=m&2?r:m&4?m&1?i:r:0;v&&(ln[d]=ln[Oi[b]]=v),a=b;break}}else{if(Oi.length==189)break;Oi[a++]=d,Oi[a++]=f,Oi[a++]=l}else if((g=ln[d])==2||g==1){let b=g==r;l=b?0:1;for(let m=a-3;m>=0;m-=3){let v=Oi[m+2];if(v&2)break;if(b)Oi[m+2]|=2;else{if(v&4)break;Oi[m+2]|=4}}}}}function Ade(t,e,n,o){for(let r=0,i=o;r<=n.length;r++){let s=r?n[r-1].to:t,a=r<n.length?n[r].from:e;for(let l=s;l<a;){let c=ln[l];if(c==256){let u=l+1;for(;;)if(u==a){if(r==n.length)break;u=n[r++].to,a=r<n.length?n[r].from:e}else if(ln[u]==256)u++;else break;let d=i==1,f=(u<e?ln[u]:o)==1,h=d==f?d?1:2:o;for(let g=u,b=r,m=b?n[b-1].to:t;g>l;)g==m&&(g=n[--b].from,m=b?n[b-1].to:t),ln[--g]=h;l=u}else i=c,l++}}}function hb(t,e,n,o,r,i,s){let a=o%2?2:1;if(o%2==r%2)for(let l=e,c=0;l<n;){let u=!0,d=!1;if(c==i.length||l<i[c].from){let b=ln[l];b!=a&&(u=!1,d=b==16)}let f=!u&&a==1?[]:null,h=u?o:o+1,g=l;e:for(;;)if(c<i.length&&g==i[c].from){if(d)break e;let b=i[c];if(!u)for(let m=b.to,v=c+1;;){if(m==n)break e;if(v<i.length&&i[v].from==m)m=i[v++].to;else{if(ln[m]==a)break e;break}}if(c++,f)f.push(b);else{b.from>l&&s.push(new Vi(l,b.from,h));let m=b.direction==Il!=!(h%2);pb(t,m?o+1:o,r,b.inner,b.from,b.to,s),l=b.to}g=b.to}else{if(g==n||(u?ln[g]!=a:ln[g]==a))break;g++}f?hb(t,l,g,o+1,r,f,s):l<g&&s.push(new Vi(l,g,h)),l=g}else for(let l=n,c=i.length;l>e;){let u=!0,d=!1;if(!c||l>i[c-1].to){let b=ln[l-1];b!=a&&(u=!1,d=b==16)}let f=!u&&a==1?[]:null,h=u?o:o+1,g=l;e:for(;;)if(c&&g==i[c-1].to){if(d)break e;let b=i[--c];if(!u)for(let m=b.from,v=c;;){if(m==e)break e;if(v&&i[v-1].to==m)m=i[--v].from;else{if(ln[m-1]==a)break e;break}}if(f)f.push(b);else{b.to<l&&s.push(new Vi(b.to,l,h));let m=b.direction==Il!=!(h%2);pb(t,m?o+1:o,r,b.inner,b.from,b.to,s),l=b.from}g=b.from}else{if(g==e||(u?ln[g-1]!=a:ln[g-1]==a))break;g--}f?hb(t,g,l,o+1,r,f,s):g<l&&s.push(new Vi(g,l,h)),l=g}}function pb(t,e,n,o,r,i,s){let a=e%2?2:1;kde(t,r,i,o,a),Cde(t,r,i,o,a),Ade(r,i,o,a),hb(t,r,i,e,n,o,s)}function $de(t,e,n){if(!t)return[new Vi(0,0,e==V2?1:0)];if(e==Il&&!n.length&&!Sde.test(t))return QT(t.length);if(n.length)for(;t.length>ln.length;)ln[ln.length]=256;let o=[],r=e==Il?0:1;return pb(t,r,r,n,0,t.length,o),o}function QT(t){return[new Vi(0,t,0)]}let JT="";function Tde(t,e,n,o,r){var i;let s=o.head-t.from,a=Vi.find(e,s,(i=o.bidiLevel)!==null&&i!==void 0?i:-1,o.assoc),l=e[a],c=l.side(r,n);if(s==c){let f=a+=r?1:-1;if(f<0||f>=e.length)return null;l=e[a=f],s=l.side(!r,n),c=l.side(r,n)}let u=Oo(t.text,s,l.forward(r,n));(u<l.from||u>l.to)&&(u=c),JT=t.text.slice(Math.min(s,u),Math.max(s,u));let d=a==(r?e.length-1:0)?null:e[a+(r?1:-1)];return d&&u==c&&d.level+(r?0:1)<l.level?Ne.cursor(d.side(!r,n)+t.from,d.forward(r,n)?1:-1,d.level):Ne.cursor(u+t.from,l.forward(r,n)?-1:1,l.level)}function Mde(t,e,n){for(let o=e;o<n;o++){let r=KT(t.charCodeAt(o));if(r==1)return Il;if(r==2||r==4)return V2}return Il}const eM=gt.define(),tM=gt.define(),nM=gt.define(),oM=gt.define(),mb=gt.define(),rM=gt.define(),iM=gt.define(),z2=gt.define(),H2=gt.define(),sM=gt.define({combine:t=>t.some(e=>e)}),Ode=gt.define({combine:t=>t.some(e=>e)}),aM=gt.define();class Pc{constructor(e,n="nearest",o="nearest",r=5,i=5,s=!1){this.range=e,this.y=n,this.x=o,this.yMargin=r,this.xMargin=i,this.isSnapshot=s}map(e){return e.empty?this:new Pc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Pc(Ne.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const gh=Tn.define({map:(t,e)=>t.map(e)}),lM=Tn.define();function zi(t,e,n){let o=t.facet(oM);o.length?o[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Ss=gt.define({combine:t=>t.length?t[0]:!0});let Bde=0;const vc=gt.define({combine(t){return t.filter((e,n)=>{for(let o=0;o<n;o++)if(t[o].plugin==e.plugin)return!1;return!0})}});class Nl{constructor(e,n,o,r,i){this.id=e,this.create=n,this.domEventHandlers=o,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(vc.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(vc.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:o,eventObservers:r,provide:i,decorations:s}=n||{};return new Nl(Bde++,e,o,r,a=>{let l=[];return s&&l.push(tg.of(c=>{let u=c.plugin(a);return u?s(u):Xn.none})),i&&l.push(i(a)),l})}static fromClass(e,n){return Nl.define((o,r)=>new e(o,r),n)}}class xv{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(o){if(zi(n.state,o,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){zi(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(o){zi(e.state,o,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const cM=gt.define(),W2=gt.define(),tg=gt.define(),uM=gt.define(),U2=gt.define(),Lf=gt.define(),dM=gt.define();function V6(t,e){let n=t.state.facet(dM);if(!n.length)return n;let o=n.map(i=>i instanceof Function?i(t):i),r=[];return rn.spans(o,e.from,e.to,{point(){},span(i,s,a,l){let c=i-e.from,u=s-e.from,d=r;for(let f=a.length-1;f>=0;f--,l--){let h=a[f].spec.bidiIsolate,g;if(h==null&&(h=Mde(e.text,c,u)),l>0&&d.length&&(g=d[d.length-1]).to==c&&g.direction==h)g.to=u,d=g.inner;else{let b={from:c,to:u,direction:h,inner:[]};d.push(b),d=b.inner}}}}),r}const fM=gt.define();function hM(t){let e=0,n=0,o=0,r=0;for(let i of t.state.facet(fM)){let s=i(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(o=Math.max(o,s.top)),s.bottom!=null&&(r=Math.max(r,s.bottom)))}return{left:e,right:n,top:o,bottom:r}}const ed=gt.define();class Dr{constructor(e,n,o,r){this.fromA=e,this.toA=n,this.fromB=o,this.toB=r}join(e){return new Dr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,o=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>o.toA)){if(r.toA<o.fromA)break;o=o.join(r),e.splice(n-1,1)}}return e.splice(n,0,o),e}static extendWithRanges(e,n){if(n.length==0)return e;let o=[];for(let r=0,i=0,s=0;;){let a=r<e.length?e[r].fromB:1e9,l=i<n.length?n[i]:1e9,c=Math.min(a,l);if(c==1e9)break;let u=c+s,d=c,f=u;for(;;)if(i<n.length&&n[i]<=d){let h=n[i+1];i+=2,d=Math.max(d,h);for(let g=r;g<e.length&&e[g].fromB<=d;g++)s=e[g].toA-e[g].toB;f=Math.max(f,h+s)}else if(r<e.length&&e[r].fromB<=d){let h=e[r++];d=Math.max(d,h.toB),f=Math.max(f,h.toA),s=h.toA-h.toB}else break;o.push(new Dr(u,f,c,d))}return o}}class l0{constructor(e,n,o){this.view=e,this.state=n,this.transactions=o,this.flags=0,this.startState=e.state,this.changes=zn.empty(this.startState.doc.length);for(let i of o)this.changes=this.changes.compose(i.changes);let r=[];this.changes.iterChangedRanges((i,s,a,l)=>r.push(new Dr(i,s,a,l))),this.changedRanges=r}static create(e,n,o){return new l0(e,n,o)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const Lde=[];class In{constructor(e,n,o=0){this.dom=e,this.length=n,this.flags=o,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Lde}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&fde(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let o=n;for(let r of this.children){if(r==e)return o;o+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let o=Da(this.dom),r=this.length?e>0:n>0;return new ri(this.parent.dom,o+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof og)return e;return null}static get(e){return e.cmTile}}class ng extends In{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,o=null,r,i=(e==null?void 0:e.node)==n?e:null,s=0;for(let a of this.children){if(a.sync(e),s+=a.length+a.breakAfter,r=o?o.nextSibling:n.firstChild,i&&r!=a.dom&&(i.written=!0),a.dom.parentNode==n)for(;r&&r!=a.dom;)r=z6(r);else n.insertBefore(a.dom,r);o=a.dom}for(r=o?o.nextSibling:n.firstChild,i&&r&&(i.written=!0);r;)r=z6(r);this.length=s}}function z6(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class og extends ng{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=In.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],o=this,r=0,i=0;;)if(r==o.children.length){if(!n.length)return;o=o.parent,o.breakAfter&&i++,r=n.pop()}else{let s=o.children[r++];if(s instanceof Ps)n.push(r),o=s,r=0;else{let a=i+s.length,l=e(s,i);if(l!==void 0)return l;i=a+s.breakAfter}}}resolveBlock(e,n){let o,r=-1,i,s=-1;if(this.blockTiles((a,l)=>{let c=l+a.length;if(e>=l&&e<=c){if(a.isWidget()&&n>=-1&&n<=1){if(a.flags&32)return!0;a.flags&16&&(o=void 0)}(l<e||e==c&&(n<-1?a.length:a.covers(1)))&&(!o||!a.isWidget()&&o.isWidget())&&(o=a,r=e-l),(c>e||e==l&&(n>1?a.length:a.covers(-1)))&&(!i||!a.isWidget()&&i.isWidget())&&(i=a,s=e-l)}}),!o&&!i)throw new Error("No tile at position "+e);return o&&n<0||!i?{tile:o,offset:r}:{tile:i,offset:s}}}class Ps extends ng{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let o=new Ps(n||document.createElement(e.tagName),e);return n||(o.flags|=4),o}}class tu extends ng{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,o){let r=new tu(n||document.createElement("div"),e);return(!n||!o)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,n,o){let r=null,i=-1,s=null,a=-1;function l(u,d){for(let f=0,h=0;f<u.children.length&&h<=d;f++){let g=u.children[f],b=h+g.length;b>=d&&(g.isComposite()?l(g,d-h):(!s||s.isHidden&&(n>0||o&&Dde(s,g)))&&(b>d||g.flags&32)?(s=g,a=d-h):(h<d||g.flags&16&&!g.isHidden)&&(r=g,i=d-h)),h=b}}l(this,e);let c=(n<0?r:s)||r||s;return c?{tile:c,offset:c==r?i:a}:null}coordsIn(e,n){let o=this.resolveInline(e,n,!0);return o?o.tile.coordsIn(Math.max(0,o.offset),n):Pde(this)}domIn(e,n){let o=this.resolveInline(e,n);if(o){let{tile:r,offset:i}=o;if(this.dom.contains(r.dom))return r.isText()?new ri(r.dom,Math.min(r.dom.nodeValue.length,i)):r.domPosFor(i,r.flags&16?1:r.flags&32?-1:n);let s=o.tile.parent,a=!1;for(let l of s.children){if(a)return new ri(l.dom,0);l==o.tile&&(a=!0)}}return new ri(this.dom,0)}}function Pde(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Xh(e);return n[n.length-1]||null}function Dde(t,e){let n=t.coordsIn(0,1),o=e.coordsIn(0,1);return n&&o&&o.top<n.bottom}class tr extends ng{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let o=new tr(n||document.createElement(e.tagName),e);return n||(o.flags|=4),o}}class gl extends In{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let o=this.dom.nodeValue.length;e>o&&(e=o);let r=e,i=e,s=0;e==0&&n<0||e==o&&n>=0?tt.chrome||tt.gecko||(e?(r--,s=1):i<o&&(i++,s=-1)):n<0?r--:i<o&&i++;let a=af(this.dom,r,i).getClientRects();if(!a.length)return null;let l=a[(s?s<0:n>=0)?0:a.length-1];return tt.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,c=>c.width)||l),s?a0(l,s<0):l||null}static of(e,n){let o=new gl(n||document.createTextNode(e),e);return n||(o.flags|=2),o}}class Rl extends In{constructor(e,n,o,r){super(e,n,r),this.widget=o}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,o){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;if(o)return a0(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let i=this.dom.getClientRects(),s=null;if(!i.length)return null;let a=this.flags&16?!0:this.flags&32?!1:e>0;for(let l=a?i.length-1:0;s=i[l],!(e>0?l==0:l==i.length-1||s.top<s.bottom);l+=a?-1:1);return a0(s,!a)}}get overrideDOMText(){if(!this.length)return Ut.empty;let{root:e}=this;if(!e)return Ut.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,o,r,i){return i||(i=e.toDOM(n),e.editable||(i.contentEditable="false")),new Rl(i,o,e,r)}}class c0 extends In{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return Ut.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class Ede{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,o){let{tile:r,index:i,beforeBreak:s,parents:a}=this;for(;e||n>0;)if(r.isComposite())if(s){if(!e)break;o&&o.break(),e--,s=!1}else if(i==r.children.length){if(!e&&!a.length)break;o&&o.leave(r),s=!!r.breakAfter,{tile:r,index:i}=a.pop(),i++}else{let l=r.children[i],c=l.breakAfter;(n>0?l.length<=e:l.length<e)&&(!o||o.skip(l,0,l.length)!==!1||!l.isComposite)?(s=!!c,i++,e-=l.length):(a.push({tile:r,index:i}),r=l,i=0,o&&l.isComposite()&&o.enter(l))}else if(i==r.length)s=!!r.breakAfter,{tile:r,index:i}=a.pop(),i++;else if(e){let l=Math.min(e,r.length-i);o&&o.skip(r,i,i+l),e-=l,i+=l}else break;return this.tile=r,this.index=i,this.beforeBreak=s,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class Ide{constructor(e,n,o,r){this.from=e,this.to=n,this.wrapper=o,this.rank=r}}class Nde{constructor(e,n,o){this.cache=e,this.root=n,this.blockWrappers=o,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,o,r){var i;this.flushBuffer();let s=this.ensureMarks(n,o),a=s.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let l=s.children[s.children.length-1]=new gl(a.dom,a.text+e);l.parent=s}else s.append(r||gl.of(e,(i=this.cache.find(gl))===null||i===void 0?void 0:i.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let o=this.curLine;o.dom!=n.line.dom&&(o.setDOM(this.cache.reused.has(n.line)?wv(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let r=o;for(let a=n.marks.length-1;a>=0;a--){let l=n.marks[a],c=r.lastChild;if(c instanceof tr&&c.mark.eq(l.mark))c.dom!=l.dom&&c.setDOM(wv(l.dom)),r=c;else{if(this.cache.reused.get(l)){let d=In.get(l.dom);d&&d.setDOM(wv(l.dom))}let u=tr.of(l.mark,l.dom);r.append(u),r=u}this.cache.reused.set(l,2)}let i=In.get(e.text);i&&this.cache.reused.set(i,2);let s=new gl(e.text,e.text.nodeValue);s.flags|=8,r.append(s)}addInlineWidget(e,n,o){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(n,o);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,o){this.flushBuffer(),this.ensureMarks(n,o).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var o;e||(e=pM);let r=tu.start(e,n||((o=this.cache.find(tu))===null||o===void 0?void 0:o.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var o;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let s=e[i],a;if(n>0&&(a=r.lastChild)&&a instanceof tr&&a.mark.eq(s))r=a,n--;else{let l=tr.of(s,(o=this.cache.find(tr,c=>c.mark.eq(s)))===null||o===void 0?void 0:o.dom);r.append(l),r=l,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!H6(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(tt.ios&&H6(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(_v,0,32)||new Rl(_v.toDOM(),0,_v,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new Ide(e.from,e.to,e.value,e.rank),o=this.wrappers.length;for(;o>0&&(this.wrappers[o-1].rank-n.rank||this.wrappers[o-1].to-n.to)<0;)o--;this.wrappers.splice(o,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let o of this.wrappers){let r=n.lastChild;if(o.from<this.pos&&r instanceof Ps&&r.wrapper.eq(o.wrapper))n=r;else{let i=Ps.of(o.wrapper,(e=this.cache.find(Ps,s=>s.wrapper.eq(o.wrapper)))===null||e===void 0?void 0:e.dom);n.append(i),n=i}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),o=this.cache.find(c0,void 0,1);return o&&(o.flags=n),o||new c0(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class Rde{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:i,done:s}=this.cursor.next(this.skipCount);if(this.skipCount=0,s)throw new Error("Ran out of text content when drawing inline views");this.text=r;let a=this.textOff=Math.min(e,r.length);return i?null:r.slice(0,a)}let n=Math.min(this.text.length,this.textOff+e),o=this.text.slice(this.textOff,n);return this.textOff=n,o}}const u0=[Rl,tu,gl,tr,c0,Ps,og];for(let t=0;t<u0.length;t++)u0[t].bucket=t;class Fde{constructor(e){this.view=e,this.buckets=u0.map(()=>[]),this.index=u0.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,o=this.buckets[n];o.length<6?o.push(e):o[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,o=2){let r=e.bucket,i=this.buckets[r],s=this.index[r];for(let a=i.length-1;a>=0;a--){let l=(a+s)%i.length,c=i[l];if((!n||n(c))&&!this.reused.has(c))return i.splice(l,1),l<s&&this.index[r]--,this.reused.set(c,o),c}return null}findWidget(e,n,o){let r=this.buckets[0];if(r.length)for(let i=0,s=0;;i++){if(i==r.length){if(s)return null;s=1,i=0}let a=r[i];if(!this.reused.has(a)&&(s==0?a.widget.compare(e):a.widget.constructor==e.constructor&&e.updateDOM(a.dom,this.view)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,a.widget==e&&a.length==n&&(a.flags&497)==o?(this.reused.set(a,1),a):(this.reused.set(a,2),new Rl(a.dom,n,e,a.flags&-498|o))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class Vde{constructor(e,n,o,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new Fde(e),this.text=new Rde(e.state.doc),this.builder=new Nde(this.cache,new og(e,e.contentDOM),rn.iter(o)),this.cache.reused.set(n,2),this.old=new Ede(n),this.reuseWalker={skip:(s,a,l)=>{if(this.cache.add(s),s.isComposite())return!1},enter:s=>this.cache.add(s),leave:()=>{},break:()=>{}}}run(e,n){let o=n&&this.getCompositionContext(n.text);for(let r=0,i=0,s=0;;){let a=s<e.length?e[s++]:null,l=a?a.fromA:this.old.root.length;if(l>r){let c=l-r;this.preserve(c,!s,!a),r=l,i+=c}if(!a)break;n&&a.fromA<=n.range.fromA&&a.toA>=n.range.toA?(this.forward(a.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(i,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,o),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,a.toA),this.emit(n.range.toB,a.toB)):(this.forward(a.fromA,a.toA),this.emit(i,a.toB)),i=a.toB,r=a.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,o){let r=Wde(this.old),i=this.openMarks;this.old.advance(e,o?1:-1,{skip:(s,a,l)=>{if(s.isWidget())if(this.openWidget)this.builder.continueWidget(l-a);else{let c=l>0||a<s.length?Rl.of(s.widget,this.view,l-a,s.flags&496,this.cache.maybeReuse(s)):this.cache.reuse(s);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,r,i),i=r.length)}else if(s.isText())this.builder.ensureLine(null),!a&&l==s.length?this.builder.addText(s.text,r,i,this.cache.reuse(s)):(this.cache.add(s),this.builder.addText(s.text.slice(a,l),r,i)),i=r.length;else if(s.isLine())s.flags&=-2,this.cache.reused.set(s,1),this.builder.addLine(s);else if(s instanceof c0)this.cache.add(s);else if(s instanceof tr)this.builder.ensureLine(null),this.builder.addMark(s,r,i),this.cache.reused.set(s,1),i=r.length;else return!1;this.openWidget=!1},enter:s=>{s.isLine()?this.builder.addLineStart(s.attrs,this.cache.maybeReuse(s)):(this.cache.add(s),s instanceof tr&&r.unshift(s.mark)),this.openWidget=!1},leave:s=>{s.isLine()?r.length&&(r.length=i=0):s instanceof tr&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let o=null,r=this.builder,i=0,s=rn.spans(this.decorations,e,n,{point:(a,l,c,u,d,f)=>{if(c instanceof El){if(this.disallowBlockEffectsFor[f]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(l>this.view.state.doc.lineAt(a).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=u.length,d>u.length)r.continueWidget(l-a);else{let h=c.widget||(c.block?nu.block:nu.inline),g=zde(c),b=this.cache.findWidget(h,l-a,g)||Rl.of(h,this.view,l-a,g);c.block?(c.startSide>0&&r.addLineStartIfNotCovered(o),r.addBlockWidget(b)):(r.ensureLine(o),r.addInlineWidget(b,u,d))}o=null}else o=Hde(o,c);l>a&&this.text.skip(l-a)},span:(a,l,c,u)=>{for(let d=a;d<l;){let f=this.text.next(Math.min(512,l-d));f==null?(r.addLineStartIfNotCovered(o),r.addBreak(),d++):(r.ensureLine(o),r.addText(f,c,d==a?u:c.length),d+=f.length),o=null}}});r.addLineStartIfNotCovered(o),this.openWidget=s>i,this.openMarks=s}forward(e,n,o=1){n-e<=10?this.old.advance(n-e,o,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,o,this.reuseWalker))}getCompositionContext(e){let n=[],o=null;for(let r=e.parentNode;;r=r.parentNode){let i=In.get(r);if(r==this.view.contentDOM)break;i instanceof tr?n.push(i):i!=null&&i.isLine()?o=i:i instanceof Ps||(r.nodeName=="DIV"&&!o&&r!=this.view.contentDOM?o=new tu(r,pM):o||n.push(tr.of(new Of({tagName:r.nodeName.toLowerCase(),attributes:hde(r)}),r)))}return{line:o,marks:n}}}function H6(t,e){let n=o=>{for(let r of o.children)if((e?r.isText():r.length)||n(r))return!0;return!1};return n(t)}function zde(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const pM={class:"cm-line"};function Hde(t,e){let n=e.spec.attributes,o=e.spec.class;return!n&&!o||(t||(t={class:"cm-line"}),n&&R2(n,t),o&&(t.class+=" "+o)),t}function Wde(t){let e=[];for(let n=t.parents.length;n>1;n--){let o=n==t.parents.length?t.tile:t.parents[n].tile;o instanceof tr&&e.push(o.mark)}return e}function wv(t){let e=In.get(t);return e&&e.setDOM(t.cloneNode()),t}class nu extends eg{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}nu.inline=new nu("span");nu.block=new nu("div");const _v=new class extends eg{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class W6{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Xn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new og(e,e.contentDOM),this.updateInner([new Dr(0,0,0,e.state.doc.length)],null)}update(e){var n;let o=e.changedRanges;this.minWidth>0&&o.length&&(o.every(({fromA:u,toA:d})=>d<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!Qde(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let i=r>-1?Gde(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:d}=this.hasComposition;o=new Dr(u,d,e.changes.mapPos(u,-1),e.changes.mapPos(d,1)).addToSet(o.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(tt.ie||tt.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.blockWrappers;this.updateDeco();let l=jde(s,this.decorations,e.changes);l.length&&(o=Dr.extendWithRanges(o,l));let c=Kde(a,this.blockWrappers,e.changes);return c.length&&(o=Dr.extendWithRanges(o,c)),i&&!o.some(u=>u.fromA<=i.range.fromA&&u.toA>=i.range.toA)&&(o=i.range.addToSet(o.slice())),this.tile.flags&2&&o.length==0?!1:(this.updateInner(o,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:o}=this.view;o.ignore(()=>{if(n||e.length){let s=this.tile,a=new Vde(this.view,s,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=a.run(e,n),gb(s,a.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let i=tt.chrome||tt.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(i),i&&(i.written||o.selectionRange.focusNode!=i.node||!this.tile.dom.contains(i.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let i of this.tile.children)i.isWidget()&&i.widget instanceof Sv&&r.push(i.dom);o.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let o of n.effects)o.is(lM)&&(this.editContextFormatting=o.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:o}=this.tile,r=this.view.root.activeElement,i=r==o,s=!i&&!(this.view.state.facet(Ss)||o.tabIndex>-1)&&wd(o,this.view.observer.selectionRange)&&!(r&&o.contains(r));if(!(i||n||s))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,u;if(l.empty?u=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(u=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),tt.gecko&&l.empty&&!this.hasComposition&&Ude(c)){let f=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(f,c.node.childNodes[c.offset]||null)),c=u=new ri(f,0),a=!0}let d=this.view.observer.selectionRange;(a||!d.focusNode||(!_d(c.node,c.offset,d.anchorNode,d.anchorOffset)||!_d(u.node,u.offset,d.focusNode,d.focusOffset))&&!this.suppressWidgetCursorChange(d,l))&&(this.view.observer.ignore(()=>{tt.android&&tt.chrome&&o.contains(d.focusNode)&&Zde(d.focusNode,o)&&(o.blur(),o.focus({preventScroll:!0}));let f=sf(this.view.root);if(f)if(l.empty){if(tt.gecko){let h=qde(c.node,c.offset);if(h&&h!=3){let g=(h==1?YT:jT)(c.node,c.offset);g&&(c=new ri(g.node,g.offset))}}f.collapse(c.node,c.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(c.node,c.offset);try{f.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([c,u]=[u,c]),h.setEnd(u.node,u.offset),h.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(h)}s&&this.view.root.activeElement==o&&(o.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new ri(d.anchorNode,d.anchorOffset),this.impreciseHead=u.precise?null:new ri(d.focusNode,d.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&_d(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,o=sf(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!o||!n.empty||!n.assoc||!o.modify)return;let s=this.lineAt(n.head,n.assoc);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc,n.assoc);o.collapse(u.node,u.offset),o.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&o.collapse(r,i)}posFromDOM(e,n){let o=this.tile.nearest(e);if(!o)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=o.posAtStart;if(o.isComposite()){let i;if(e==o.dom)i=o.dom.childNodes[n];else{let s=zs(e)==0?0:n==0?-1:1;for(;;){let a=e.parentNode;if(a==o.dom)break;s==0&&a.firstChild!=a.lastChild&&(e==a.firstChild?s=-1:s=1),e=a}s<0?i=e:i=e.nextSibling}if(i==o.dom.firstChild)return r;for(;i&&!In.get(i);)i=i.nextSibling;if(!i)return r+o.length;for(let s=0,a=r;;s++){let l=o.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}else return o.isText()?e==o.dom?r+n:r+(n?o.length:0):r}domAtPos(e,n){let{tile:o,offset:r}=this.tile.resolveBlock(e,n);return o.isWidget()?o.domPosFor(e,n):o.domIn(r,n)}inlineDOMNearPos(e,n){let o,r=-1,i=!1,s,a=-1,l=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(i=!0)}else{let d=u+c.length;if(u<=e&&(o=c,r=e-u,i=d<e),d>=e&&!s&&(s=c,a=e-u,l=u>e),u>e&&s)return!0}}),!o&&!s?this.domAtPos(e,n):(i&&s?o=null:l&&o&&(s=null),o&&n<0||!s?o.domIn(r,n):s.domIn(a,n))}coordsAt(e,n){let{tile:o,offset:r}=this.tile.resolveBlock(e,n);return o.isWidget()?o.widget instanceof Sv?null:o.coordsInWidget(r,n,!0):o.coordsIn(r,n)}lineAt(e,n){let{tile:o}=this.tile.resolveBlock(e,n);return o.isLine()?o:null}coordsForChar(e){let{tile:n,offset:o}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function r(i,s){if(i.isComposite())for(let a of i.children){if(a.length>=s){let l=r(a,s);if(l)return l}if(s-=a.length,s<0)break}else if(i.isText()&&s<i.length){let a=Oo(i.text,s);if(a==s)return null;let l=af(i.dom,s,a).getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(c==l.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return r(n,o)}measureVisibleLineHeights(e){let n=[],{from:o,to:r}=e,i=this.view.contentDOM.clientWidth,s=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Dn.LTR,c=0,u=(d,f,h)=>{for(let g=0;g<d.children.length&&!(f>r);g++){let b=d.children[g],m=f+b.length,v=b.dom.getBoundingClientRect(),{height:y}=v;if(h&&!g&&(c+=v.top-h.top),b instanceof Ps)m>o&&u(b,f,v);else if(f>=o&&(c>0&&n.push(-c),n.push(y+c),c=0,s)){let x=b.dom.lastChild,_=x?Xh(x):[];if(_.length){let S=_[_.length-1],E=l?S.right-v.left:v.right-S.left;E>a&&(a=E,this.minWidth=i,this.minWidthFrom=f,this.minWidthTo=m)}}h&&g==d.children.length-1&&(c+=h.bottom-v.bottom),f=m+b.breakAfter}};return u(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?Dn.RTL:Dn.LTR}measureTextSize(){let e=this.tile.blockTiles(s=>{if(s.isLine()&&s.children.length&&s.length<=20){let a=0,l;for(let c of s.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=Xh(c.dom);if(u.length!=1)return;a+=u[0].width,l=u[0].height}if(a)return{lineHeight:s.dom.getBoundingClientRect().height,charWidth:a/s.length,textHeight:l}}});if(e)return e;let n=document.createElement("div"),o,r,i;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let s=Xh(n.firstChild)[0];o=n.getBoundingClientRect().height,r=s&&s.width?s.width/27:7,i=s&&s.height?s.height:o,n.remove()}),{lineHeight:o,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let o=0,r=0;;r++){let i=r==n.viewports.length?null:n.viewports[r],s=i?i.from-1:this.view.state.doc.length;if(s>o){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(o).top)/this.view.scaleY;e.push(Xn.replace({widget:new Sv(a),block:!0,inclusive:!0,isBlockGap:!0}).range(o,s))}if(!i)break;o=i.to+1}return Xn.set(e)}updateDeco(){let e=1,n=this.view.state.facet(tg).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),o=!1,r=this.view.state.facet(U2).map((i,s)=>{let a=typeof i=="function";return a&&(o=!0),a?i(this.view):i});for(r.length&&(this.dynamicDecorationMap[e++]=o,n.push(rn.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(uM).map(i=>typeof i=="function"?i(this.view):i)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(aM))try{if(c(this.view,e.range,e))return!0}catch(u){zi(this.view.state,u,"scroll handler")}let{range:n}=e,o=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),r;if(!o)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(o={left:Math.min(o.left,r.left),top:Math.min(o.top,r.top),right:Math.max(o.right,r.right),bottom:Math.max(o.bottom,r.bottom)});let i=hM(this.view),s={left:o.left-i.left,top:o.top-i.top,right:o.right+i.right,bottom:o.bottom+i.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;if(gde(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==Dn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(o.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||o.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let c=this.view.docView.lineAt(n.head,1);c&&c.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=o=>o.isWidget()||o.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){gb(this.tile)}}function gb(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let o of t.children)gb(o,e)}}function Ude(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function mM(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let o=YT(n.focusNode,n.focusOffset),r=jT(n.focusNode,n.focusOffset),i=o||r;if(r&&o&&r.node!=o.node){let a=In.get(r.node);if(!a||a.isText()&&a.text!=r.node.nodeValue)i=r;else if(t.docView.lastCompositionAfterCursor){let l=In.get(o.node);!l||l.isText()&&l.text!=o.node.nodeValue||(i=r)}}if(t.docView.lastCompositionAfterCursor=i!=o,!i)return null;let s=e-i.offset;return{from:s,to:s+i.node.nodeValue.length,node:i.node}}function Gde(t,e,n){let o=mM(t,n);if(!o)return null;let{node:r,from:i,to:s}=o,a=r.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(o.from,o.to)!=a)return null;let l=e.invertedDesc;return{range:new Dr(l.mapPos(i),l.mapPos(s),i,s),text:r}}function qde(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let Yde=class{constructor(){this.changes=[]}compareRange(e,n){Bc(e,n,this.changes)}comparePoint(e,n){Bc(e,n,this.changes)}boundChange(e){Bc(e,e,this.changes)}};function jde(t,e,n){let o=new Yde;return rn.compare(t,e,n,o),o.changes}class Xde{constructor(){this.changes=[]}compareRange(e,n){Bc(e,n,this.changes)}comparePoint(){}boundChange(e){Bc(e,e,this.changes)}}function Kde(t,e,n){let o=new Xde;return rn.compare(t,e,n,o),o.changes}function Zde(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function Qde(t,e){let n=!1;return e&&t.iterChangedRanges((o,r)=>{o<e.to&&r>e.from&&(n=!0)}),n}class Sv extends eg{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function Jde(t,e,n=1){let o=t.charCategorizer(e),r=t.doc.lineAt(e),i=e-r.from;if(r.length==0)return Ne.cursor(e);i==0?n=1:i==r.length&&(n=-1);let s=i,a=i;n<0?s=Oo(r.text,i,!1):a=Oo(r.text,i);let l=o(r.text.slice(s,a));for(;s>0;){let c=Oo(r.text,s,!1);if(o(r.text.slice(c,s))!=l)break;s=c}for(;a<r.length;){let c=Oo(r.text,a);if(o(r.text.slice(a,c))!=l)break;a=c}return Ne.range(s+r.from,a+r.from)}function efe(t,e,n,o,r){let i=Math.round((o-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((r-n.top-(t.defaultLineHeight-a)*.5)/a);i+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+sde(s,i,t.state.tabSize)}function tfe(t,e,n){let o=t.lineBlockAt(e);if(Array.isArray(o.type)){let r;for(let i of o.type){if(i.from>e)break;if(!(i.to<e)){if(i.from<e&&i.to>e)return i;(!r||i.type==Rr.Text&&(r.type!=i.type||(n<0?i.from<e:i.to>e)))&&(r=i)}}return r||o}return o}function nfe(t,e,n,o){let r=tfe(t,e.head,e.assoc||-1),i=!o||r.type!=Rr.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(i){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:n==(a==Dn.LTR)?s.right-1:s.left+1,y:(i.top+i.bottom)/2});if(l!=null)return Ne.cursor(l,n?-1:1)}return Ne.cursor(n?r.to:r.from,n?-1:1)}function U6(t,e,n,o){let r=t.state.doc.lineAt(e.head),i=t.bidiSpans(r),s=t.textDirectionAt(r.from);for(let a=e,l=null;;){let c=Tde(r,i,s,a,n),u=JT;if(!c){if(r.number==(n?t.state.doc.lines:1))return a;u=`
|
|
856
|
+
`,r=t.state.doc.line(r.number+(n?1:-1)),i=t.bidiSpans(r),c=t.visualLineSide(r,!n)}if(l){if(!l(u))return a}else{if(!o)return c;l=o(u)}a=c}}function ofe(t,e,n){let o=t.state.charCategorizer(e),r=o(n);return i=>{let s=o(i);return r==$s.Space&&(r=s),r==s}}function rfe(t,e,n,o){let r=e.head,i=n?1:-1;if(r==(n?t.state.doc.length:0))return Ne.cursor(r,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(r,(e.empty?e.assoc:0)||(n?1:-1)),u=t.documentTop;if(c)s==null&&(s=c.left-l.left),a=i<0?c.top:c.bottom;else{let g=t.viewState.lineBlockAt(r);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(r-g.from))),a=(i<0?g.top:g.bottom)+u}let d=l.left+s,f=o??t.viewState.heightOracle.textHeight>>1,h=vb(t,{x:d,y:a+f*i},!1,i);return Ne.cursor(h.pos,h.assoc,void 0,s)}function Sd(t,e,n){for(;;){let o=0;for(let r of t)r.between(e-1,e+1,(i,s,a)=>{if(e>i&&e<s){let l=o||n||(e-i<s-e?-1:1);e=l<0?i:s,o=l}});if(!o)return e}}function gM(t,e){let n=null;for(let o=0;o<e.ranges.length;o++){let r=e.ranges[o],i=null;if(r.empty){let s=Sd(t,r.from,0);s!=r.from&&(i=Ne.cursor(s,-1))}else{let s=Sd(t,r.from,-1),a=Sd(t,r.to,1);(s!=r.from||a!=r.to)&&(i=Ne.range(r.from==r.anchor?s:a,r.from==r.head?s:a))}i&&(n||(n=e.ranges.slice()),n[o]=i)}return n?Ne.create(n,e.mainIndex):e}function kv(t,e,n){let o=Sd(t.state.facet(Lf).map(r=>r(t)),n.from,e.head>n.from?-1:1);return o==n.from?n:Ne.cursor(o,o<n.from?1:-1)}class Ri{constructor(e,n){this.pos=e,this.assoc=n}}function vb(t,e,n,o){let r=t.contentDOM.getBoundingClientRect(),i=r.top+t.viewState.paddingTop,{x:s,y:a}=e,l=a-i,c;for(;;){if(l<0)return new Ri(0,1);if(l>t.viewState.docHeight)return new Ri(t.state.doc.length,-1);if(c=t.elementAtHeight(l),o==null)break;if(c.type==Rr.Text){if(o<0?c.to<t.viewport.from:c.from>t.viewport.to)break;let f=t.docView.coordsAt(o<0?c.from:c.to,o>0?-1:1);if(f&&(o<0?f.top<=l+i:f.bottom>=l+i))break}let d=t.viewState.heightOracle.textHeight/2;l=o>0?c.bottom+d:c.top-d}if(t.viewport.from>=c.to||t.viewport.to<=c.from){if(n)return null;if(c.type==Rr.Text){let d=efe(t,r,c,s,a);return new Ri(d,d==c.from?1:-1)}}if(c.type!=Rr.Text)return l<(c.top+c.bottom)/2?new Ri(c.from,1):new Ri(c.to,-1);let u=t.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=t.docView.lineAt(c.from,-2)),new ife(t,s,a,t.textDirectionAt(c.from)).scanTile(u,c.from)}class ife{constructor(e,n,o,r){this.view=e,this.x=n,this.y=o,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:o,spans:r}=this.bidiSpansAt(e);return r[Vi.find(r,e-o.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:o,spans:r}=this.bidiSpansAt(e);return r[Vi.find(r,e-o.from,-1,n)].dir}bidiIn(e,n){let{spans:o,line:r}=this.bidiSpansAt(e);return o.length>1||o.length&&(o[0].level!=this.baseDir||o[0].to+r.from<n)}scan(e,n){let o=0,r=e.length-1,i=new Set,s=this.bidiIn(e[0],e[r]),a,l,c=-1,u=1e9,d;e:for(;o<r;){let h=r-o,g=o+r>>1;t:if(i.has(g)){let m=o+Math.floor(Math.random()*h);for(let v=0;v<h;v++){if(!i.has(m)){g=m;break t}m++,m==r&&(m=o)}break e}i.add(g);let b=n(g);if(b)for(let m=0;m<b.length;m++){let v=b[m],y=0;if(v.bottom<this.y)(!a||a.bottom<v.bottom)&&(a=v),y=1;else if(v.top>this.y)(!l||l.top>v.top)&&(l=v),y=-1;else{let x=v.left>this.x?this.x-v.left:v.right<this.x?this.x-v.right:0,_=Math.abs(x);_<u&&(c=g,u=_,d=v),x&&(y=x<0==(this.baseDir==Dn.LTR)?-1:1)}y==-1&&(!s||this.baseDirAt(e[g],1))?r=g:y==1&&(!s||this.baseDirAt(e[g+1],-1))&&(o=g+1)}}if(!d){let h=a&&(!l||this.y-a.bottom<l.top-this.y)?a:l;return this.y=(h.top+h.bottom)/2,this.scan(e,n)}let f=(s?this.dirAt(e[c],1):this.baseDir)==Dn.LTR;return{i:c,after:this.x>(d.left+d.right)/2==f}}scanText(e,n){let o=[];for(let i=0;i<e.length;i=Oo(e.text,i))o.push(n+i);o.push(n+e.length);let r=this.scan(o,i=>{let s=o[i]-n,a=o[i+1]-n;return af(e.dom,s,a).getClientRects()});return r.after?new Ri(o[r.i+1],-1):new Ri(o[r.i],1)}scanTile(e,n){if(!e.length)return new Ri(n,1);if(e.children.length==1){let a=e.children[0];if(a.isText())return this.scanText(a,n);if(a.isComposite())return this.scanTile(a,n)}let o=[n];for(let a=0,l=n;a<e.children.length;a++)o.push(l+=e.children[a].length);let r=this.scan(o,a=>{let l=e.children[a];return l.flags&48?null:(l.dom.nodeType==1?l.dom:af(l.dom,0,l.length)).getClientRects()}),i=e.children[r.i],s=o[r.i];return i.isText()?this.scanText(i,s):i.isComposite()?this.scanTile(i,s):r.after?new Ri(o[r.i+1],-1):new Ri(s,1)}}const td="";class sfe{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(Zt.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=td}readRange(e,n){if(!e)return this;let o=e.parentNode;for(let r=e;;){this.findPointBefore(o,r);let i=this.text.length;this.readNode(r);let s=In.get(r),a=r.nextSibling;if(a==n){s!=null&&s.breakAfter&&!a&&o!=this.view.contentDOM&&this.lineBreak();break}let l=In.get(a);(s&&l?s.breakAfter:(s?s.breakAfter:s0(r))||s0(a)&&(r.nodeName!="BR"||s!=null&&s.isWidget())&&this.text.length>i)&&!lfe(a,n)&&this.lineBreak(),r=a}return this.findPointBefore(o,n),this}readTextNode(e){let n=e.nodeValue;for(let o of this.points)o.node==e&&(o.pos=this.text.length+Math.min(o.offset,n.length));for(let o=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,s=1,a;if(this.lineSeparator?(i=n.indexOf(this.lineSeparator,o),s=this.lineSeparator.length):(a=r.exec(n))&&(i=a.index,s=a[0].length),this.append(n.slice(o,i<0?n.length:i)),i<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);o=i+s}}readNode(e){let n=In.get(e),o=n&&n.overrideDOMText;if(o!=null){this.findPointInside(e,o.length);for(let r=o.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let o of this.points)o.node==e&&e.childNodes[o.offset]==n&&(o.pos=this.text.length)}findPointInside(e,n){for(let o of this.points)(e.nodeType==3?o.node==e:e.contains(o.node))&&(o.pos=this.text.length+(afe(e,o.node,o.offset)?n:0))}}function afe(t,e,n){for(;;){if(!e||n<zs(e))return!1;if(e==t)return!0;n=Da(e)+1,e=e.parentNode}}function lfe(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let o=In.get(t);if(!(o!=null&&o.isWidget()))return!1;o&&(n||(n=[])).push(o)}if(n)for(let o of n){let r=o.overrideDOMText;if(r!=null&&r.length)return!1}return!0}class G6{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class cfe{constructor(e,n,o,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:i,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=vM(e.docView.tile,n,o,0))){let a=i||s?[]:dfe(e),l=new sfe(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=ffe(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=i&&i.node==a.focusNode&&i.offset==a.focusOffset||!db(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!db(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((tt.ios||tt.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.to<e.state.doc.length)){let d=Math.min(l,c),f=Math.max(l,c),h=u.from-d,g=u.to-f;(h==0||h==1||d==0)&&(g==0||g==-1||f==e.state.doc.length)&&(l=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(Ne.range(c,l)):this.newSel=Ne.single(c,l)}}}function vM(t,e,n,o){if(t.isComposite()){let r=-1,i=-1,s=-1,a=-1;for(let l=0,c=o,u=o;l<t.children.length;l++){let d=t.children[l],f=c+d.length;if(c<e&&f>n)return vM(d,e,n,c);if(f>=e&&r==-1&&(r=l,i=c),c>n&&d.dom.parentNode==t.dom){s=l,a=u;break}u=f,c=f+d.breakAfter}return{from:i,to:a<0?o+t.length:a,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:s<t.children.length&&s>=0?t.children[s].dom:null}}else return t.isText()?{from:o,to:o+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function bM(t,e){let n,{newSel:o}=e,r=t.state.selection.main,i=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=r.from,c=null;(i===8||tt.android&&e.text.length<a-s)&&(l=r.to,c="end");let u=yM(t.state.doc.sliceString(s,a,td),e.text,l-s,c);u&&(tt.chrome&&i==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==td+td&&u.toB--,n={from:s+u.from,to:s+u.toA,insert:Ut.of(e.text.slice(u.from,u.toB).split(td))})}else o&&(!t.hasFocus&&t.state.facet(Ss)||d0(o,r))&&(o=null);if(!n&&!o)return!1;if(!n&&e.typeOver&&!r.empty&&o&&o.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:(tt.mac||tt.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(o&&n.insert.length==2&&(o=Ne.single(o.main.anchor-1,o.main.head-1)),n={from:n.from,to:n.to,insert:Ut.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:t.state.doc.lineAt(r.from).to<r.to&&t.docView.lineHasWidget(r.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:r.from,to:r.to,insert:t.state.toText(t.inputState.insertingText)}:tt.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==`
|
|
857
|
+
`&&t.lineWrapping&&(o&&(o=Ne.single(o.main.anchor-1,o.main.head-1)),n={from:r.from,to:r.to,insert:Ut.of([" "])}),n)return G2(t,n,o,i);if(o&&!d0(o,r)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin,a=="select.pointer"&&(o=gM(t.state.facet(Lf).map(l=>l(t)),o))),t.dispatch({selection:o,scrollIntoView:s,userEvent:a}),!0}else return!1}function G2(t,e,n,o=-1){if(tt.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(tt.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Lc(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||o==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&Lc(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&Lc(t.contentDOM,"Delete",46)))return!0;let i=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,a=()=>s||(s=ufe(t,e,n));return t.state.facet(rM).some(l=>l(t,e.from,e.to,i,a))||t.dispatch(a()),!0}function ufe(t,e,n){let o,r=t.state,i=r.selection.main,s=-1;if(e.from==e.to&&e.from<i.from||e.from>i.to){let l=e.from<i.from?-1:1,c=l<0?i.from:i.to,u=Sd(r.facet(Lf).map(d=>d(t)),c,l);e.from==u&&(s=u)}if(s>-1)o={changes:e,selection:Ne.cursor(e.from+e.insert.length,-1)};else if(e.from>=i.from&&e.to<=i.to&&e.to-e.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=i.from<e.from?r.sliceDoc(i.from,e.from):"",c=i.to>e.to?r.sliceDoc(e.to,i.to):"";o=r.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=r.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=i.to+10&&e.to>=i.to-10){let u=t.state.sliceDoc(e.from,e.to),d,f=n&&mM(t,n.main.head);if(f){let g=e.insert.length-(e.to-e.from);d={from:f.from,to:f.to-g}}else d=t.state.doc.lineAt(i.head);let h=i.to-e.to;o=r.changeByRange(g=>{if(g.from==i.from&&g.to==i.to)return{changes:l,range:c||g.map(l)};let b=g.to-h,m=b-u.length;if(t.state.sliceDoc(m,b)!=u||b>=d.from&&m<=d.to)return{range:g};let v=r.changes({from:m,to:b,insert:e.insert}),y=g.to-i.to;return{changes:v,range:c?Ne.range(Math.max(0,c.anchor+y),Math.max(0,c.head+y)):g.map(v)}})}else o={changes:l,selection:c&&r.selection.replaceRange(c)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),r.update(o,{userEvent:a,scrollIntoView:!0})}function yM(t,e,n,o){let r=Math.min(t.length,e.length),i=0;for(;i<r&&t.charCodeAt(i)==e.charCodeAt(i);)i++;if(i==r&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(o=="end"){let l=Math.max(0,i-Math.min(s,a));n-=s+l-i}if(s<i&&t.length<e.length){let l=n<=i&&n>=s?i-n:0;i-=l,a=i+(a-s),s=i}else if(a<i){let l=n<=i&&n>=a?i-n:0;i-=l,s=i+(s-a),a=i}return{from:i,toA:s,toB:a}}function dfe(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:o,focusNode:r,focusOffset:i}=t.observer.selectionRange;return n&&(e.push(new G6(n,o)),(r!=n||i!=o)&&e.push(new G6(r,i))),e}function ffe(t,e){if(t.length==0)return null;let n=t[0].pos,o=t.length==2?t[1].pos:n;return n>-1&&o>-1?Ne.single(n+e,o+e):null}function d0(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class hfe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,tt.safari&&e.contentDOM.addEventListener("input",()=>null),tt.gecko&&Tfe(e.contentDOM.ownerDocument)}handleEvent(e){!wfe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let o=this.handlers[e];if(o){for(let r of o.observers)r(this.view,n);for(let r of o.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=pfe(e),o=this.handlers,r=this.view.contentDOM;for(let i in n)if(i!="scroll"){let s=!n[i].handlers.length,a=o[i];a&&s!=!a.handlers.length&&(r.removeEventListener(i,this.handleEvent),a=null),a||r.addEventListener(i,this.handleEvent,{passive:s})}for(let i in o)i!="scroll"&&!n[i]&&r.removeEventListener(i,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&wM.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),tt.android&&tt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return tt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=xM.find(o=>o.keyCode==e.keyCode))&&!e.ctrlKey||mfe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Lc(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:tt.safari&&!tt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function q6(t,e){return(n,o)=>{try{return e.call(t,o,n)}catch(r){zi(n.state,r)}}}function pfe(t){let e=Object.create(null);function n(o){return e[o]||(e[o]={observers:[],handlers:[]})}for(let o of t){let r=o.spec,i=r&&r.plugin.domEventHandlers,s=r&&r.plugin.domEventObservers;if(i)for(let a in i){let l=i[a];l&&n(a).handlers.push(q6(o.value,l))}if(s)for(let a in s){let l=s[a];l&&n(a).observers.push(q6(o.value,l))}}for(let o in _i)n(o).handlers.push(_i[o]);for(let o in Hr)n(o).observers.push(Hr[o]);return e}const xM=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],mfe="dthko",wM=[16,17,18,20,91,92,224,225],vh=6;function bh(t){return Math.max(0,t)*.7+8}function gfe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class vfe{constructor(e,n,o,r){this.view=e,this.startEvent=n,this.style=o,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=vde(e.contentDOM),this.atoms=e.state.facet(Lf).map(s=>s(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Zt.allowMultipleSelections)&&bfe(e,n),this.dragging=xfe(e,n)&&kM(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&gfe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,o=0,r=0,i=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=hM(this.view);e.clientX-l.left<=r+vh?n=-bh(r-e.clientX):e.clientX+l.right>=s-vh&&(n=bh(e.clientX-s)),e.clientY-l.top<=i+vh?o=-bh(i-e.clientY):e.clientY+l.bottom>=a-vh&&(o=bh(e.clientY-a)),this.setScrollSpeed(n,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,o=gM(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!o.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:o,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function bfe(t,e){let n=t.state.facet(eM);return n.length?n[0](e):tt.mac?e.metaKey:e.ctrlKey}function yfe(t,e){let n=t.state.facet(tM);return n.length?n[0](e):tt.mac?!e.altKey:!e.ctrlKey}function xfe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let o=sf(t.root);if(!o||o.rangeCount==0)return!0;let r=o.getRangeAt(0).getClientRects();for(let i=0;i<r.length;i++){let s=r[i];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function wfe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,o;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(o=In.get(n))&&o.isWidget()&&!o.isHidden&&o.widget.ignoreEvent(e))return!1;return!0}const _i=Object.create(null),Hr=Object.create(null),_M=tt.ie&&tt.ie_version<15||tt.ios&&tt.webkit_version<604;function _fe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),SM(t,n.value)},50)}function rg(t,e,n){for(let o of t.facet(e))n=o(n,t);return n}function SM(t,e){e=rg(t.state,z2,e);let{state:n}=t,o,r=1,i=n.toText(e),s=i.lines==n.selection.ranges.length;if(bb!=null&&n.selection.ranges.every(l=>l.empty)&&bb==i.toString()){let l=-1;o=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let d=n.toText((s?i.line(r++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:d},range:Ne.cursor(c.from+d.length)}})}else s?o=n.changeByRange(l=>{let c=i.line(r++);return{changes:{from:l.from,to:l.to,insert:c.text},range:Ne.cursor(l.from+c.length)}}):o=n.replaceSelection(i);t.dispatch(o,{userEvent:"input.paste",scrollIntoView:!0})}Hr.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};_i.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Hr.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Hr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};_i.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let o of t.state.facet(nM))if(n=o(t,e),n)break;if(!n&&e.button==0&&(n=kfe(t,e)),n){let o=!t.hasFocus;t.inputState.startMouseSelection(new vfe(t,e,n,o)),o&&t.observer.ignore(()=>{GT(t.contentDOM);let i=t.root.activeElement;i&&!i.contains(t.contentDOM)&&i.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function Y6(t,e,n,o){if(o==1)return Ne.cursor(e,n);if(o==2)return Jde(t.state,e,n);{let r=t.docView.lineAt(e,n),i=t.state.doc.lineAt(r?r.posAtEnd:e),s=r?r.posAtStart:i.from,a=r?r.posAtEnd:i.to;return a<t.state.doc.length&&a==i.to&&a++,Ne.range(s,a)}}const Sfe=tt.ie&&tt.ie_version<=11;let j6=null,X6=0,K6=0;function kM(t){if(!Sfe)return t.detail;let e=j6,n=K6;return j6=t,K6=Date.now(),X6=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(X6+1)%3:1}function kfe(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),o=kM(e),r=t.state.selection;return{update(i){i.docChanged&&(n.pos=i.changes.mapPos(n.pos),r=r.map(i.changes))},get(i,s,a){let l=t.posAndSideAtCoords({x:i.clientX,y:i.clientY},!1),c,u=Y6(t,l.pos,l.assoc,o);if(n.pos!=l.pos&&!s){let d=Y6(t,n.pos,n.assoc,o),f=Math.min(d.from,u.from),h=Math.max(d.to,u.to);u=f<u.from?Ne.range(f,h):Ne.range(h,f)}return s?r.replaceRange(r.main.extend(u.from,u.to)):a&&o==1&&r.ranges.length>1&&(c=Cfe(r,l.pos))?c:a?r.addRange(u):Ne.create([u])}}}function Cfe(t,e){for(let n=0;n<t.ranges.length;n++){let{from:o,to:r}=t.ranges[n];if(o<=e&&r>=e)return Ne.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}_i.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.tile.nearest(e.target);if(r&&r.isWidget()){let i=r.posAtStart,s=i+r.length;(i>=n.to||s<=n.from)&&(n=Ne.range(i,s))}}let{inputState:o}=t;return o.mouseSelection&&(o.mouseSelection.dragging=!0),o.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",rg(t.state,H2,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_i.dragend=t=>(t.inputState.draggedContent=null,!1);function Z6(t,e,n,o){if(n=rg(t.state,z2,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:i}=t.inputState,s=o&&i&&yfe(t,e)?{from:i.from,to:i.to}:null,a={from:r,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}_i.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let o=Array(n.length),r=0,i=()=>{++r==n.length&&Z6(t,e,o.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=i,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(o[s]=a.result),i()},a.readAsText(n[s])}return!0}else{let o=e.dataTransfer.getData("Text");if(o)return Z6(t,e,o,!0),!0}return!1};_i.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=_M?null:e.clipboardData;return n?(SM(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(_fe(t),!1)};function Afe(t,e){let n=t.dom.parentNode;if(!n)return;let o=n.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.value=e,o.focus(),o.selectionEnd=e.length,o.selectionStart=0,setTimeout(()=>{o.remove(),t.focus()},50)}function $fe(t){let e=[],n=[],o=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:i}of t.selection.ranges){let s=t.doc.lineAt(i);s.number>r&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),r=s.number}o=!0}return{text:rg(t,H2,e.join(t.lineBreak)),ranges:n,linewise:o}}let bb=null;_i.copy=_i.cut=(t,e)=>{if(!wd(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:o,linewise:r}=$fe(t.state);if(!n&&!r)return!1;bb=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"});let i=_M?null:e.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(Afe(t,n),!1)};const CM=ja.define();function AM(t,e){let n=[];for(let o of t.facet(iM)){let r=o(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:CM.of(!0)}):null}function $M(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=AM(t.state,e);n?t.dispatch(n):t.update([])}},10)}Hr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),$M(t)};Hr.blur=t=>{t.observer.clearSelectionRange(),$M(t)};Hr.compositionstart=Hr.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Hr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,tt.chrome&&tt.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Hr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};_i.beforeinput=(t,e)=>{var n,o;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let i=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=e.getTargetRanges();if(i&&s.length){let a=s[0],l=t.posAtDOM(a.startContainer,a.startOffset),c=t.posAtDOM(a.endContainer,a.endOffset);return G2(t,{from:l,to:c,insert:t.state.toText(i)},null),!0}}let r;if(tt.chrome&&tt.android&&(r=xM.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let i=((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return tt.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),tt.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Hr.compositionend(t,e),20),!1};const Q6=new Set;function Tfe(t){Q6.has(t)||(Q6.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const J6=["pre-wrap","normal","pre-line","break-spaces"];let ou=!1;function eS(){ou=!1}class Mfe{constructor(e){this.lineWrapping=e,this.doc=Ut.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let o=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(o+=Math.max(0,Math.ceil((n-e-o*this.lineLength*.5)/this.lineLength))),this.lineHeight*o}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return J6.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let o=0;o<e.length;o++){let r=e[o];r<0?o++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,o,r,i,s){let a=J6.indexOf(e)>-1,l=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=a||Math.abs(o-this.charWidth)>.1;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=o,this.textHeight=r,this.lineLength=i,l){this.heightSamples={};for(let c=0;c<s.length;c++){let u=s[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return l}}class Ofe{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class ti{constructor(e,n,o,r,i){this.from=e,this.length=n,this.top=o,this.height=r,this._content=i}get type(){return typeof this._content=="number"?Rr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof El?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ti(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var fn=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(fn||(fn={}));const Kh=.001;class Go{constructor(e,n,o=2){this.length=e,this.height=n,this.flags=o}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Kh&&(ou=!0),this.height=e)}replace(e,n,o){return Go.of(o)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,o,r){let i=this,s=o.doc;for(let a=r.length-1;a>=0;a--){let{fromA:l,toA:c,fromB:u,toB:d}=r[a],f=i.lineAt(l,fn.ByPosNoHeight,o.setDoc(n),0,0),h=f.to>=c?f:i.lineAt(c,fn.ByPosNoHeight,o,0,0);for(d+=h.to-c,c=h.to;a>0&&f.from<=r[a-1].toA;)l=r[a-1].fromA,u=r[a-1].fromB,a--,l<f.from&&(f=i.lineAt(l,fn.ByPosNoHeight,o,0,0));u+=f.from-l,l=f.from;let g=q2.build(o.setDoc(s),e,u,d);i=f0(i,i.replace(l,c,g))}return i.updateHeight(o,0)}static empty(){return new mr(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,o=e.length,r=0,i=0;for(;;)if(n==o)if(r>i*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),o+=1+a.break,r-=a.size}else if(i>r*2){let a=e[o];a.break?e.splice(o,1,a.left,null,a.right):e.splice(o,1,a.left,a.right),o+=2+a.break,i-=a.size}else break;else if(r<i){let a=e[n++];a&&(r+=a.size)}else{let a=e[--o];a&&(i+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,o++),new Lfe(Go.of(e.slice(0,n)),s,Go.of(e.slice(o)))}}function f0(t,e){return t==e?t:(t.constructor!=e.constructor&&(ou=!0),e)}Go.prototype.size=1;const Bfe=Xn.replace({});class TM extends Go{constructor(e,n,o){super(e,n),this.deco=o,this.spaceAbove=0}mainBlock(e,n){return new ti(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,o,r){return this.spaceAbove&&e<o+this.spaceAbove?new ti(r,0,o,this.spaceAbove,Bfe):this.mainBlock(o,r)}lineAt(e,n,o,r,i){let s=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,o,r,i).join(s):s}forEachLine(e,n,o,r,i,s){e<=i+this.length&&n>=i&&s(this.lineAt(0,fn.ByPos,o,r,i))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,o=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class mr extends TM{constructor(e,n,o){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=o}mainBlock(e,n){return new ti(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,o){let r=o[0];return o.length==1&&(r instanceof mr||r instanceof to&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof to?r=new mr(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):Go.of(o)}updateHeight(e,n=0,o=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(o||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class to extends Go{constructor(e){super(e,0)}heightMetrics(e,n){let o=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,i=r-o+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*i);s=l/i,this.length>i+1&&(a=(this.height-l)/(this.length-i-1))}else s=this.height/i;return{firstLine:o,lastLine:r,perLine:s,perChar:a}}blockAt(e,n,o,r){let{firstLine:i,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,r);if(n.lineWrapping){let c=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-o)/this.height))*this.length)),u=n.doc.lineAt(c),d=a+u.length*l,f=Math.max(o,e-d/2);return new ti(u.from,u.length,f,d,0)}else{let c=Math.max(0,Math.min(s-i,Math.floor((e-o)/a))),{from:u,length:d}=n.doc.line(i+c);return new ti(u,d,o+a*c,a,0)}}lineAt(e,n,o,r,i){if(n==fn.ByHeight)return this.blockAt(e,o,r,i);if(n==fn.ByPosNoHeight){let{from:h,to:g}=o.doc.lineAt(e);return new ti(h,g-h,0,0,0)}let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(o,i),c=o.doc.lineAt(e),u=a+c.length*l,d=c.number-s,f=r+a*d+l*(c.from-i-d);return new ti(c.from,c.length,Math.max(r,Math.min(f,r+this.height-u)),u,0)}forEachLine(e,n,o,r,i,s){e=Math.max(e,i),n=Math.min(n,i+this.length);let{firstLine:a,perLine:l,perChar:c}=this.heightMetrics(o,i);for(let u=e,d=r;u<=n;){let f=o.doc.lineAt(u);if(u==e){let g=f.number-a;d+=l*g+c*(e-i-g)}let h=l+c*f.length;s(new ti(f.from,f.length,d,h,0)),d+=h,u=f.to+1}}replace(e,n,o){let r=this.length-n;if(r>0){let i=o[o.length-1];i instanceof to?o[o.length-1]=new to(i.length+r):o.push(null,new to(r-1))}if(e>0){let i=o[0];i instanceof to?o[0]=new to(e+i.length):o.unshift(new to(e-1),null)}return Go.of(o)}decomposeLeft(e,n){n.push(new to(e-1),null)}decomposeRight(e,n){n.push(null,new to(this.length-e-1))}updateHeight(e,n=0,o=!1,r){let i=n+this.length;if(r&&r.from<=n+this.length&&r.more){let s=[],a=Math.max(n,r.from),l=-1;for(r.from>n&&s.push(new to(r.from-n-1).updateHeight(e,n));a<=i&&r.more;){let u=e.doc.lineAt(a).length;s.length&&s.push(null);let d=r.heights[r.index++],f=0;d<0&&(f=-d,d=r.heights[r.index++]),l==-1?l=d:Math.abs(d-l)>=Kh&&(l=-2);let h=new mr(u,d,f);h.outdated=!1,s.push(h),a+=u+1}a<=i&&s.push(null,new to(i-a).updateHeight(e,a));let c=Go.of(s);return(l<0||Math.abs(c.height-this.height)>=Kh||Math.abs(l-this.heightMetrics(e,n).perLine)>=Kh)&&(ou=!0),f0(this,c)}else(o||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Lfe extends Go{constructor(e,n,o){super(e.length+n+o.length,e.height+o.height,n|(e.outdated||o.outdated?2:0)),this.left=e,this.right=o,this.size=e.size+o.size}get break(){return this.flags&1}blockAt(e,n,o,r){let i=o+this.left.height;return e<i?this.left.blockAt(e,n,o,r):this.right.blockAt(e,n,i,r+this.left.length+this.break)}lineAt(e,n,o,r,i){let s=r+this.left.height,a=i+this.left.length+this.break,l=n==fn.ByHeight?e<s:e<a,c=l?this.left.lineAt(e,n,o,r,i):this.right.lineAt(e,n,o,s,a);if(this.break||(l?c.to<a:c.from>a))return c;let u=n==fn.ByPosNoHeight?fn.ByPosNoHeight:fn.ByPos;return l?c.join(this.right.lineAt(a,u,o,s,a)):this.left.lineAt(a,u,o,r,i).join(c)}forEachLine(e,n,o,r,i,s){let a=r+this.left.height,l=i+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,n,o,r,i,s),n>=l&&this.right.forEachLine(e,n,o,a,l,s);else{let c=this.lineAt(l,fn.ByPos,o,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,o,r,i,s),c.to>=e&&c.from<=n&&s(c),n>c.to&&this.right.forEachLine(c.to+1,n,o,a,l,s)}}replace(e,n,o){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,o),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,o));let i=[];e>0&&this.decomposeLeft(e,i);let s=i.length;for(let a of o)i.push(a);if(e>0&&tS(i,s-1),n<this.length){let a=i.length;this.decomposeRight(n,i),tS(i,a)}return Go.of(i)}decomposeLeft(e,n){let o=this.left.length;if(e<=o)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(o++,e>=o&&n.push(null)),e>o&&this.right.decomposeLeft(e-o,n)}decomposeRight(e,n){let o=this.left.length,r=o+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<o&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Go.of(this.break?[e,null,n]:[e,n]):(this.left=f0(this.left,e),this.right=f0(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,o=!1,r){let{left:i,right:s}=this,a=n+i.length+this.break,l=null;return r&&r.from<=n+i.length&&r.more?l=i=i.updateHeight(e,n,o,r):i.updateHeight(e,n,o),r&&r.from<=a+s.length&&r.more?l=s=s.updateHeight(e,a,o,r):s.updateHeight(e,a,o),l?this.balanced(i,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function tS(t,e){let n,o;t[e]==null&&(n=t[e-1])instanceof to&&(o=t[e+1])instanceof to&&t.splice(e-1,3,new to(n.length+1+o.length))}const Pfe=5;class q2{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let o=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof mr?r.length+=o-this.pos:(o>this.pos||!this.isCovered)&&this.nodes.push(new mr(o-this.pos,-1,0)),this.writtenTo=o,n>o&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,o){if(e<n||o.heightRelevant){let r=o.widget?o.widget.estimatedHeight:0,i=o.widget?o.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let s=n-e;o.block?this.addBlock(new TM(s,r,o)):(s||i||r>=Pfe)&&this.addLineDeco(r,i,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new mr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let o=new to(n-e);return this.oracle.doc.lineAt(e).to==n&&(o.flags|=4),o}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof mr)return e;let n=new mr(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,o){let r=this.ensureLine();r.length+=o,r.collapsed+=o,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+o}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof mr)&&!this.isCovered?this.nodes.push(new mr(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let o=e;for(let r of this.nodes)r instanceof mr&&r.updateHeight(this.oracle,o),o+=r?r.length:1;return this.nodes}static build(e,n,o,r){let i=new q2(o,e);return rn.spans(n,o,r,i,0),i.finish(o)}}function Dfe(t,e,n){let o=new Efe;return rn.compare(t,e,n,o,0),o.changes}class Efe{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,o,r){(e<n||o&&o.heightRelevant||r&&r.heightRelevant)&&Bc(e,n,this.changes,5)}}function Ife(t,e){let n=t.getBoundingClientRect(),o=t.ownerDocument,r=o.defaultView||window,i=Math.max(0,n.left),s=Math.min(r.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let c=t.parentNode;c&&c!=o.body;)if(c.nodeType==1){let u=c,d=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&d.overflow!="visible"){let f=u.getBoundingClientRect();i=Math.max(i,f.left),s=Math.min(s,f.right),a=Math.max(a,f.top),l=Math.min(c==t.parentNode?r.innerHeight:l,f.bottom)}c=d.position=="absolute"||d.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:i-n.left,right:Math.max(i,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Nfe(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function Rfe(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Cv{constructor(e,n,o,r){this.from=e,this.to=n,this.size=o,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let o=0;o<e.length;o++){let r=e[o],i=n[o];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,n){return Xn.replace({widget:new Ffe(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class Ffe extends eg{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class nS{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=oS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Dn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(W2).some(o=>typeof o!="function"&&o.class=="cm-lineWrapping");this.heightOracle=new Mfe(n),this.stateDeco=rS(e),this.heightMap=Go.empty().applyChanges(this.stateDeco,Ut.empty,this.heightOracle.setDoc(e.doc),[new Dr(0,0,0,e.doc.length)]);for(let o=0;o<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());o++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Xn.set(this.lineGaps.map(o=>o.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let o=0;o<=1;o++){let r=o?n.head:n.anchor;if(!e.some(({from:i,to:s})=>r>=i&&r<=s)){let{from:i,to:s}=this.lineBlockAt(r);e.push(new yh(i,s))}}return this.viewports=e.sort((o,r)=>o.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?oS:new Y2(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(nd(e,this.scaler))})}update(e,n=null){this.state=e.state;let o=this.stateDeco;this.stateDeco=rS(this.state);let r=e.changedRanges,i=Dr.extendWithRanges(r,Dfe(o,this.stateDeco,e?e.changes:zn.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);eS(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=s||ou)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=s);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<l.from||n.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Ode)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,o=window.getComputedStyle(n),r=this.heightOracle,i=o.whiteSpace;this.defaultTextDirection=o.direction=="rtl"?Dn.RTL:Dn.LTR;let s=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent==="refresh",a=n.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:_,scaleY:S}=UT(n,a);(_>.005&&Math.abs(this.scaleX-_)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=_,this.scaleY=S,c|=16,s=l=!0)}let d=(parseInt(o.paddingTop)||0)*this.scaleY,f=(parseInt(o.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=qT(e.scrollDOM);let g=(this.printing?Rfe:Ife)(n,this.paddingTop),b=g.top-this.pixelViewport.top,m=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!Nfe(e.dom))return 0;let y=a.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let _=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(_)&&(s=!0),s||r.lineWrapping&&Math.abs(y-this.contentDOMWidth)>r.charWidth){let{lineHeight:S,charWidth:E,textHeight:M}=e.docView.measureTextSize();s=S>0&&r.refresh(i,S,E,M,Math.max(5,y/E),_),s&&(e.docView.minWidth=0,c|=16)}b>0&&m>0?u=Math.max(b,m):b<0&&m<0&&(u=Math.min(b,m)),eS();for(let S of this.viewports){let E=S.from==this.viewport.from?_:e.docView.measureVisibleLineHeights(S);this.heightMap=(s?Go.empty().applyChanges(this.stateDeco,Ut.empty,this.heightOracle,[new Dr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new Ofe(S.from,E))}ou&&(c|=2)}let x=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return x&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let o=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new yh(r.lineAt(s-o*1e3,fn.ByHeight,i,0,0).from,r.lineAt(a+(1-o)*1e3,fn.ByHeight,i,0,0).to);if(n){let{head:c}=n.range;if(c<l.from||c>l.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=r.lineAt(c,fn.ByPos,i,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c<l.from?f=d.top:f=d.bottom-u,l=new yh(r.lineAt(f-1e3/2,fn.ByHeight,i,0,0).from,r.lineAt(f+u+1e3/2,fn.ByHeight,i,0,0).to)}}return l}mapViewport(e,n){let o=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new yh(this.heightMap.lineAt(o,fn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,fn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},o=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,fn.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(n,fn.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||r<=s-Math.max(10,Math.min(-o,250)))&&(n==this.state.doc.length||i>=a+Math.max(10,Math.min(o,250)))&&r>s-2*1e3&&i<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let o=[];for(let r of e)n.touchesRange(r.from,r.to)||o.push(new Cv(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return o}ensureLineGaps(e,n){let o=this.heightOracle.lineWrapping,r=o?1e4:2e3,i=r>>1,s=r<<1;if(this.defaultTextDirection!=Dn.LTR&&!o)return[];let a=[],l=(u,d,f,h)=>{if(d-u<i)return;let g=this.state.selection.main,b=[g.from];g.empty||b.push(g.to);for(let v of b)if(v>u&&v<d){l(u,v-10,f,h),l(v+10,d,f,h);return}let m=zfe(e,v=>v.from>=f.from&&v.to<=f.to&&Math.abs(v.from-u)<i&&Math.abs(v.to-d)<i&&!b.some(y=>v.from<y&&v.to>y));if(!m){if(d<f.to&&n&&o&&n.visibleRanges.some(x=>x.from<=d&&x.to>=d)){let x=n.moveToLineBoundary(Ne.cursor(d),!1,!0).head;x>u&&(d=x)}let v=this.gapSize(f,u,d,h),y=o||v<2e6?v:2e6;m=new Cv(u,d,v,y)}a.push(m)},c=u=>{if(u.length<s||u.type!=Rr.Text)return;let d=Vfe(u.from,u.to,this.stateDeco);if(d.total<s)return;let f=this.scrollTarget?this.scrollTarget.range.head:null,h,g;if(o){let b=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,m,v;if(f!=null){let y=wh(d,f),x=((this.visibleBottom-this.visibleTop)/2+b)/u.height;m=y-x,v=y+x}else m=(this.visibleTop-u.top-b)/u.height,v=(this.visibleBottom-u.top+b)/u.height;h=xh(d,m),g=xh(d,v)}else{let b=d.total*this.heightOracle.charWidth,m=r*this.heightOracle.charWidth,v=0;if(b>2e6)for(let E of e)E.from>=u.from&&E.from<u.to&&E.size!=E.displaySize&&E.from*this.heightOracle.charWidth+v<this.pixelViewport.left&&(v=E.size-E.displaySize);let y=this.pixelViewport.left+v,x=this.pixelViewport.right+v,_,S;if(f!=null){let E=wh(d,f),M=((x-y)/2+m)/b;_=E-M,S=E+M}else _=(y-m)/b,S=(x+m)/b;h=xh(d,_),g=xh(d,S)}h>u.from&&l(u.from,h,u,d),g<u.to&&l(g,u.to,u,d)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return a}gapSize(e,n,o,r){let i=wh(r,o)-wh(r,n);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){Cv.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Xn.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let o=[];rn.spans(n,this.viewport.from,this.viewport.to,{span(i,s){o.push({from:i,to:s})},point(){}},20);let r=0;if(o.length!=this.visibleRanges.length)r=12;else for(let i=0;i<o.length&&!(r&8);i++){let s=this.visibleRanges[i],a=o[i];(s.from!=a.from||s.to!=a.to)&&(r|=4,e&&e.mapPos(s.from,-1)==a.from&&e.mapPos(s.to,1)==a.to||(r|=8))}return this.visibleRanges=o,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||nd(this.heightMap.lineAt(e,fn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||nd(this.heightMap.lineAt(this.scaler.fromDOM(e),fn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return nd(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class yh{constructor(e,n){this.from=e,this.to=n}}function Vfe(t,e,n){let o=[],r=t,i=0;return rn.spans(n,t,e,{span(){},point(s,a){s>r&&(o.push({from:r,to:s}),i+=s-r),r=a}},20),r<e&&(o.push({from:r,to:e}),i+=e-r),{total:i,ranges:o}}function xh({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let o=Math.floor(t*n);for(let r=0;;r++){let{from:i,to:s}=e[r],a=s-i;if(o<=a)return i+o;o-=a}}function wh(t,e){let n=0;for(let{from:o,to:r}of t.ranges){if(e<=r){n+=e-o;break}n+=r-o}return n/t.total}function zfe(t,e){for(let n of t)if(e(n))return n}const oS={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function rS(t){let e=t.facet(tg).filter(o=>typeof o!="function"),n=t.facet(U2).filter(o=>typeof o!="function");return n.length&&e.push(rn.join(n)),e}class Y2{constructor(e,n,o){let r=0,i=0,s=0;this.viewports=o.map(({from:a,to:l})=>{let c=n.lineAt(a,fn.ByPos,e,0,0).top,u=n.lineAt(l,fn.ByPos,e,0,0).bottom;return r+=u-c,{from:a,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let a of this.viewports)a.domTop=s+(a.top-i)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),i=a.bottom}toDOM(e){for(let n=0,o=0,r=0;;n++){let i=n<this.viewports.length?this.viewports[n]:null;if(!i||e<i.top)return r+(e-o)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);o=i.bottom,r=i.domBottom}}fromDOM(e){for(let n=0,o=0,r=0;;n++){let i=n<this.viewports.length?this.viewports[n]:null;if(!i||e<i.domTop)return o+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);o=i.bottom,r=i.domBottom}}eq(e){return e instanceof Y2?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,o)=>n.from==e.viewports[o].from&&n.to==e.viewports[o].to):!1}}function nd(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),o=e.toDOM(t.bottom);return new ti(t.from,t.length,n,o-n,Array.isArray(t._content)?t._content.map(r=>nd(r,e)):t._content)}const _h=gt.define({combine:t=>t.join(" ")}),yb=gt.define({combine:t=>t.indexOf(!0)>-1}),xb=La.newName(),MM=La.newName(),OM=La.newName(),BM={"&light":"."+MM,"&dark":"."+OM};function wb(t,e,n){return new La(e,{finish(o){return/&/.test(o)?o.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+o}})}const Hfe=wb("."+xb,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},BM),Wfe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Av=tt.ie&&tt.ie_version<=11;class Ufe{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new bde,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let o of n)this.queue.push(o);(tt.ie&&tt.ie_version<=11||tt.ios&&e.composing)&&n.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&tt.android&&e.constructor.EDIT_CONTEXT!==!1&&!(tt.chrome&&tt.chrome_version<126)&&(this.editContext=new qfe(e),e.state.facet(Ss)&&(e.contentDOM.editContext=this.editContext.editContext)),Av&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,o)=>n!=e[o]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:o}=this,r=this.selectionRange;if(o.state.facet(Ss)?o.root.activeElement!=this.dom:!wd(this.dom,r))return;let i=r.anchorNode&&o.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(tt.ie&&tt.ie_version<=11||tt.android&&tt.chrome)&&!o.state.selection.main.empty&&r.focusNode&&_d(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=sf(e.root);if(!n)return!1;let o=tt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Gfe(this.view,n)||n;if(!o||this.selectionRange.eq(o))return!1;let r=wd(this.dom,o);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&xde(this.dom,o)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(o),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let o=this.dom;o;)if(o.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==o?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);for(let o of this.scrollTargets=n)o.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Wfe),Av&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Av&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var o;if(!this.delayedAndroidKey){let r=()=>{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&Lc(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((o=this.delayedAndroidKey)===null||o===void 0)&&o.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,o=-1,r=!1;for(let i of e){let s=this.readMutation(i);s&&(s.typeOver&&(r=!0),n==-1?{from:n,to:o}=s:(n=Math.min(s.from,n),o=Math.max(s.to,o)))}return{from:n,to:o,typeOver:r}}readChange(){let{from:e,to:n,typeOver:o}=this.processRecords(),r=this.selectionChanged&&wd(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new cfe(this.view,e,n,o);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let o=this.view.state,r=bM(this.view,n);return this.view.state==o&&(n.domChanged||n.newSel&&!d0(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let o=iS(n,e.previousSibling||e.target.previousSibling,-1),r=iS(n,e.nextSibling||e.target.nextSibling,1);return{from:o?n.posAfter(o):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ss)!=e.state.facet(Ss)&&(e.view.contentDOM.editContext=e.state.facet(Ss)?this.editContext.editContext:null))}destroy(){var e,n,o;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(o=this.resizeScroll)===null||o===void 0||o.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function iS(t,e,n){for(;e;){let o=In.get(e);if(o&&o.parent==t)return o;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function sS(t,e){let n=e.startContainer,o=e.startOffset,r=e.endContainer,i=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor,1);return _d(s.node,s.offset,r,i)&&([n,o,r,i]=[r,i,n,o]),{anchorNode:n,anchorOffset:o,focusNode:r,focusOffset:i}}function Gfe(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return sS(t,r)}let n=null;function o(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",o,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",o,!0),n?sS(t,n):null}class qfe{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=o=>{let r=e.state.selection.main,{anchor:i,head:s}=r,a=this.toEditorPos(o.updateRangeStart),l=this.toEditorPos(o.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:o.updateRangeStart,editorBase:a,drifted:!1});let c=l-a>o.text.length;a==this.from&&i<this.from?a=i:l==this.to&&i>this.to&&(l=i);let u=yM(e.state.sliceDoc(a,l),o.text,(c?r.from:r.to)-a,c?"end":null);if(!u){let f=Ne.single(this.toEditorPos(o.selectionStart),this.toEditorPos(o.selectionEnd));d0(f,r)||e.dispatch({selection:f,userEvent:"select"});return}let d={from:u.from+a,to:u.toA+a,insert:Ut.of(o.text.slice(u.from,u.toB).split(`
|
|
858
|
+
`))};if((tt.mac||tt.android)&&d.from==s-1&&/^\. ?$/.test(o.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(d={from:a,to:l,insert:Ut.of([o.text.replace("."," ")])}),this.pendingContextChange=d,!e.state.readOnly){let f=this.to-this.from+(d.to-d.from+d.insert.length);G2(e,d,Ne.single(this.toEditorPos(o.selectionStart,f),this.toEditorPos(o.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),d.from<d.to&&!d.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,o.updateRangeStart-1),Math.min(n.text.length,o.updateRangeStart+1)))&&this.handlers.compositionend(o)},this.handlers.characterboundsupdate=o=>{let r=[],i=null;for(let s=this.toEditorPos(o.rangeStart),a=this.toEditorPos(o.rangeEnd);s<a;s++){let l=e.coordsForChar(s);i=l&&new DOMRect(l.left,l.top,l.right-l.left,l.bottom-l.top)||i||new DOMRect,r.push(i)}n.updateCharacterBounds(o.rangeStart,r)},this.handlers.textformatupdate=o=>{let r=[];for(let i of o.getTextFormats()){let s=i.underlineStyle,a=i.underlineThickness;if(!/none/i.test(s)&&!/none/i.test(a)){let l=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);if(l<c){let u=`text-decoration: underline ${/^[a-z]/.test(s)?s+" ":s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${/thin/i.test(a)?1:2}px`;r.push(Xn.mark({attributes:{style:u}}).range(l,c))}}}e.dispatch({effects:lM.of(Xn.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:o}=this.composing;this.composing=null,o&&this.reset(e.state)}};for(let o in this.handlers)n.addEventListener(o,this.handlers[o]);this.measureReq={read:o=>{this.editContext.updateControlBounds(o.contentDOM.getBoundingClientRect());let r=sf(o.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,o=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,s,a,l,c)=>{if(o)return;let u=c.length-(s-i);if(r&&s>=r.to)if(r.from==i&&r.to==s&&r.insert.eq(c)){r=this.pendingContextChange=null,n+=u,this.to+=u;return}else r=null,this.revertPending(e.state);if(i+=n,s+=n,s<=this.from)this.from+=u,this.to+=u;else if(i<this.to){if(i<this.from||s>this.to||this.to-this.from+c.length>3e4){o=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(s),c.toString()),this.to+=u}n+=u}),r&&!o&&this.revertPending(e.state),!o}update(e){let n=this.pendingContextChange,o=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(o.from,o.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,o=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=o||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(o,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let o=this.composing;return o&&o.drifted?o.editorBase+(e-o.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class _t{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:o}=e;this.dispatchTransactions=e.dispatchTransactions||o&&(r=>r.forEach(i=>o(i,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||yde(e.parent)||document,this.viewState=new nS(e.state||Zt.create(e)),e.scrollTo&&e.scrollTo.is(gh)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(vc).map(r=>new xv(r));for(let r of this.plugins)r.update(this);this.observer=new Ufe(this),this.inputState=new hfe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new W6(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Wn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,o=!1,r,i=this.state;for(let f of e){if(f.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=f.state}if(this.destroyed){this.viewState.state=i;return}let s=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(CM))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=AM(i,s),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(u=null)):this.observer.clear(),i.facet(Zt.phrases)!=this.state.facet(Zt.phrases))return this.setState(i);r=l0.create(this,i,e),r.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new Pc(h.empty?h:Ne.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(gh)&&(d=h.value.clip(this.state))}this.viewState.update(r,d),this.bidiCache=h0.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(ed)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(_h)!=r.state.facet(_h)&&(this.viewState.mustMeasureContent=!0),(n||o||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let f of this.state.facet(mb))try{f(r)}catch(h){zi(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!bM(this,u)&&c.force&&Lc(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let o of this.plugins)o.destroy(this);this.viewState=new nS(e),this.plugins=e.facet(vc).map(o=>new xv(o)),this.pluginMap.clear();for(let o of this.plugins)o.update(this);this.docView.destroy(),this.docView=new W6(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(vc),o=e.state.facet(vc);if(n!=o){let r=[];for(let i of o){let s=n.indexOf(i);if(s<0)r.push(new xv(i));else{let a=this.plugins[s];a.mustUpdate=e,r.push(a)}}for(let i of this.plugins)i.mustUpdate!=e&&i.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=o&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(o){zi(this.state,o,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,o=this.scrollDOM,r=o.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(qT(o))i=-1,s=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(r);i=h.from,s=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(g){return zi(this.state,g),aS}}),d=l0.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h<c.length;h++)if(u[h]!=aS)try{let g=c[h];g.write&&g.write(u[h],this)}catch(g){zi(this.state,g)}if(f&&this.docView.updateSelection(!0),!d.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let g=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-s;if(g>1||g<-1){r=r+g,o.scrollTop=r/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(mb))a(n)}get themeClasses(){return xb+" "+(this.state.facet(yb)?OM:MM)+" "+this.state.facet(_h)}updateAttrs(){let e=lS(this,cM,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ss)?"true":"false",class:"cm-content",style:`${tt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),lS(this,W2,n);let o=this.observer.ignore(()=>{let r=N6(this.contentDOM,this.contentAttrs,n),i=N6(this.dom,this.editorAttrs,e);return r||i});return this.editorAttrs=e,this.contentAttrs=n,o}showAnnouncements(e){let n=!0;for(let o of e)for(let r of o.effects)if(r.is(_t.announce)){n&&(this.announceDOM.textContent=""),n=!1;let i=this.announceDOM.appendChild(document.createElement("div"));i.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(ed);let e=this.state.facet(_t.cspNonce);La.mount(this.root,this.styleModules.concat(Hfe).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(o=>o.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,o){return kv(this,e,U6(this,e,n,o))}moveByGroup(e,n){return kv(this,e,U6(this,e,n,o=>ofe(this,e.head,o)))}visualLineSide(e,n){let o=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=o[n?o.length-1:0];return Ne.cursor(i.side(n,r)+e.from,i.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,o=!0){return nfe(this,e,n,o)}moveVertically(e,n,o){return kv(this,e,rfe(this,e,n,o))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let o=vb(this,e,n);return o&&o.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),vb(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let o=this.docView.coordsAt(e,n);if(!o||o.left==o.right)return o;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r),s=i[Vi.find(i,e-r.from,-1,n)];return a0(o,s.dir==Dn.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(sM)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Yfe)return QT(e.length);let n=this.textDirectionAt(e.from),o;for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n&&(i.fresh||ZT(i.isolates,o=V6(this,e))))return i.order;o||(o=V6(this,e));let r=$de(e.text,n,o);return this.bidiCache.push(new h0(e.from,e.to,n,o,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||tt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{GT(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return gh.of(new Pc(typeof e=="number"?Ne.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,o=this.viewState.scrollAnchorAt(e);return gh.of(new Pc(Ne.cursor(o.from),"start","start",o.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Nl.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Nl.define(()=>({}),{eventObservers:e})}static theme(e,n){let o=La.newName(),r=[_h.of(o),ed.of(wb(`.${o}`,e))];return n&&n.dark&&r.push(yb.of(!0)),r}static baseTheme(e){return E2.lowest(ed.of(wb("."+xb,e,BM)))}static findFromDOM(e){var n;let o=e.querySelector(".cm-content"),r=o&&In.get(o)||In.get(e);return((n=r==null?void 0:r.root)===null||n===void 0?void 0:n.view)||null}}_t.styleModule=ed;_t.inputHandler=rM;_t.clipboardInputFilter=z2;_t.clipboardOutputFilter=H2;_t.scrollHandler=aM;_t.focusChangeEffect=iM;_t.perLineTextDirection=sM;_t.exceptionSink=oM;_t.updateListener=mb;_t.editable=Ss;_t.mouseSelectionStyle=nM;_t.dragMovesSelection=tM;_t.clickAddsSelectionRange=eM;_t.decorations=tg;_t.blockWrappers=uM;_t.outerDecorations=U2;_t.atomicRanges=Lf;_t.bidiIsolatedRanges=dM;_t.scrollMargins=fM;_t.darkTheme=yb;_t.cspNonce=gt.define({combine:t=>t.length?t[0]:""});_t.contentAttributes=W2;_t.editorAttributes=cM;_t.lineWrapping=_t.contentAttributes.of({class:"cm-lineWrapping"});_t.announce=Tn.define();const Yfe=4096,aS={};class h0{constructor(e,n,o,r,i,s){this.from=e,this.to=n,this.dir=o,this.isolates=r,this.fresh=i,this.order=s}static update(e,n){if(n.empty&&!e.some(i=>i.fresh))return e;let o=[],r=e.length?e[e.length-1].dir:Dn.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let s=e[i];s.dir==r&&!n.touchesRange(s.from,s.to)&&o.push(new h0(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return o}}function lS(t,e,n){for(let o=t.state.facet(e),r=o.length-1;r>=0;r--){let i=o[r],s=typeof i=="function"?i(t):i;s&&R2(s,n)}return n}const jfe=tt.mac?"mac":tt.windows?"win":tt.linux?"linux":"key";function Xfe(t,e){const n=t.split(/-(?!$)/);let o=n[n.length-1];o=="Space"&&(o=" ");let r,i,s,a;for(let l=0;l<n.length-1;++l){const c=n[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))s=!0;else if(/^mod$/i.test(c))e=="mac"?a=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(o="Alt-"+o),i&&(o="Ctrl-"+o),a&&(o="Meta-"+o),s&&(o="Shift-"+o),o}function Sh(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const Kfe=E2.default(_t.domEventHandlers({keydown(t,e){return ehe(Zfe(e.state),t,e,"editor")}})),LM=gt.define({enables:Kfe}),cS=new WeakMap;function Zfe(t){let e=t.facet(LM),n=cS.get(e);return n||cS.set(e,n=Jfe(e.reduce((o,r)=>o.concat(r),[]))),n}let fa=null;const Qfe=4e3;function Jfe(t,e=jfe){let n=Object.create(null),o=Object.create(null),r=(s,a)=>{let l=o[s];if(l==null)o[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},i=(s,a,l,c,u)=>{var d,f;let h=n[s]||(n[s]=Object.create(null)),g=a.split(/ (?!$)/).map(v=>Xfe(v,e));for(let v=1;v<g.length;v++){let y=g.slice(0,v).join(" ");r(y,!0),h[y]||(h[y]={preventDefault:!0,stopPropagation:!1,run:[x=>{let _=fa={view:x,prefix:y,scope:s};return setTimeout(()=>{fa==_&&(fa=null)},Qfe),!0}]})}let b=g.join(" ");r(b,!1);let m=h[b]||(h[b]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&m.run.push(l),c&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=s;for(let f in u)u[f].run.push(h=>d(h,_b))}let l=s[e]||s.key;if(l)for(let c of a)i(c,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&i(c,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}let _b=null;function ehe(t,e,n,o){_b=e;let r=ude(e),i=Gue(r,0),s=que(i)==r.length&&r!=" ",a="",l=!1,c=!1,u=!1;fa&&fa.view==n&&fa.scope==o&&(a=fa.prefix+" ",wM.indexOf(e.keyCode)<0&&(c=!0,fa=null));let d=new Set,f=m=>{if(m){for(let v of m.run)if(!d.has(v)&&(d.add(v),v(n)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),c=!0)}return!1},h=t[o],g,b;return h&&(f(h[a+Sh(r,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(tt.windows&&e.ctrlKey&&e.altKey)&&!(tt.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(g=Pa[e.keyCode])&&g!=r?(f(h[a+Sh(g,e,!0)])||e.shiftKey&&(b=of[e.keyCode])!=r&&b!=g&&f(h[a+Sh(b,e,!1)]))&&(l=!0):s&&e.shiftKey&&f(h[a+Sh(r,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),_b=null,l}class ru extends Dl{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ru.prototype.elementClass="";ru.prototype.toDOM=void 0;ru.prototype.mapMode=vr.TrackBefore;ru.prototype.startSide=ru.prototype.endSide=-1;ru.prototype.point=!0;const PM=1024;let the=0;class $v{constructor(e,n){this.from=e,this.to=n}}class Dt{constructor(e={}){this.id=the++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ur.match(e)),n=>{let o=e(n);return o===void 0?null:[this,o]}}}Dt.closedBy=new Dt({deserialize:t=>t.split(" ")});Dt.openedBy=new Dt({deserialize:t=>t.split(" ")});Dt.group=new Dt({deserialize:t=>t.split(" ")});Dt.isolate=new Dt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Dt.contextHash=new Dt({perNode:!0});Dt.lookAhead=new Dt({perNode:!0});Dt.mounted=new Dt({perNode:!0});class kd{constructor(e,n,o,r=!1){this.tree=e,this.overlay=n,this.parser=o,this.bracketed=r}static get(e){return e&&e.props&&e.props[Dt.mounted.id]}}const nhe=Object.create(null);class ur{constructor(e,n,o,r=0){this.name=e,this.props=n,this.id=o,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):nhe,o=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ur(e.name||"",n,e.id,o);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(r)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Dt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let o in e)for(let r of o.split(" "))n[r]=e[o];return o=>{for(let r=o.prop(Dt.group),i=-1;i<(r?r.length:0);i++){let s=n[i<0?o.name:r[i]];if(s)return s}}}}ur.none=new ur("",Object.create(null),0,8);class j2{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let o of this.types){let r=null;for(let i of e){let s=i(o);if(s){r||(r=Object.assign({},o.props));let a=s[1],l=s[0];l.combine&&l.id in r&&(a=l.combine(r[l.id],a)),r[l.id]=a}}n.push(r?new ur(o.name,r,o.id,o.flags):o)}return new j2(n)}}const kh=new WeakMap,uS=new WeakMap;var xn;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(xn||(xn={}));class Mn{constructor(e,n,o,r,i){if(this.type=e,this.children=n,this.positions=o,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[s,a]of i)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=kd.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let o of this.children){let r=o.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new kb(this.topNode,e)}cursorAt(e,n=0,o=0){let r=kh.get(this)||this.topNode,i=new kb(r);return i.moveTo(e,n),kh.set(this,i._tree),i}get topNode(){return new Fr(this,0,0,null)}resolve(e,n=0){let o=lf(kh.get(this)||this.topNode,e,n,!1);return kh.set(this,o),o}resolveInner(e,n=0){let o=lf(uS.get(this)||this.topNode,e,n,!0);return uS.set(this,o),o}resolveStack(e,n=0){return ihe(this,e,n)}iterate(e){let{enter:n,leave:o,from:r=0,to:i=this.length}=e,s=e.mode||0,a=(s&xn.IncludeAnonymous)>0;for(let l=this.cursor(s|xn.IncludeAnonymous);;){let c=!1;if(l.from<=i&&l.to>=r&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&o&&(a||!l.type.isAnonymous)&&o(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Z2(ur.none,this.children,this.positions,0,this.children.length,0,this.length,(n,o,r)=>new Mn(this.type,n,o,r,this.propValues),e.makeTree||((n,o,r)=>new Mn(ur.none,n,o,r)))}static build(e){return she(e)}}Mn.empty=new Mn(ur.none,[],[],0);class X2{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new X2(this.buffer,this.index)}}class Ea{constructor(e,n,o){this.buffer=e,this.length=n,this.set=o}get type(){return ur.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],o=this.buffer[e+3],r=this.set.types[n],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,o==e)return i;let s=[];for(;e<o;)s.push(this.childString(e)),e=this.buffer[e+3];return i+"("+s.join(",")+")"}findChild(e,n,o,r,i){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(DM(i,r,s[l+1],s[l+2])&&(a=l,o>0));l=s[l+3]);return a}slice(e,n,o){let r=this.buffer,i=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){i[l++]=r[a++],i[l++]=r[a++]-o;let c=i[l++]=r[a++]-o;i[l++]=r[a++]-e,s=Math.max(s,c)}return new Ea(i,s,this.set)}}function DM(t,e,n,o){switch(t){case-2:return n<e;case-1:return o>=e&&n<e;case 0:return n<e&&o>e;case 1:return n<=e&&o>e;case 2:return o>e;case 4:return!0}}function lf(t,e,n,o){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!o&&t instanceof Fr&&t.index<0?null:t.parent;if(!s)return t;t=s}let i=o?0:xn.IgnoreOverlays;if(o)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Fr&&s.index<0&&((r=a.enter(e,n,i))===null||r===void 0?void 0:r.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,i);if(!s)return t;t=s}}class EM{cursor(e=0){return new kb(this,e)}getChild(e,n=null,o=null){let r=dS(this,e,n,o);return r.length?r[0]:null}getChildren(e,n=null,o=null){return dS(this,e,n,o)}resolve(e,n=0){return lf(this,e,n,!1)}resolveInner(e,n=0){return lf(this,e,n,!0)}matchContext(e){return Sb(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),o=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(o=n,n=r.prevSibling):n=r}return o}get node(){return this}get next(){return this.parent}}class Fr extends EM{constructor(e,n,o,r){super(),this._tree=e,this.from=n,this.index=o,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,o,r,i=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],d=l[e]+s.from,f;if(!(!(i&xn.EnterBracketed&&u instanceof Mn&&(f=kd.get(u))&&!f.overlay&&f.bracketed&&o>=d&&o<=d+u.length)&&!DM(r,o,d,d+u.length))){if(u instanceof Ea){if(i&xn.ExcludeBuffers)continue;let h=u.findChild(0,u.buffer.length,n,o-d,r);if(h>-1)return new va(new ohe(s,u,e,d),null,h)}else if(i&xn.IncludeAnonymous||!u.type.isAnonymous||K2(u)){let h;if(!(i&xn.IgnoreMounts)&&(h=kd.get(u))&&!h.overlay)return new Fr(h.tree,d,e,s);let g=new Fr(u,d,e,s);return i&xn.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?u.children.length-1:0,n,o,r,i)}}}if(i&xn.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,o=0){let r;if(!(o&xn.IgnoreOverlays)&&(r=kd.get(this._tree))&&r.overlay){let i=e-this.from,s=o&xn.EnterBracketed&&r.bracketed;for(let{from:a,to:l}of r.overlay)if((n>0||s?a<=i:a<i)&&(n<0||s?l>=i:l>i))return new Fr(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,o)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function dS(t,e,n,o){let r=t.cursor(),i=[];if(!r.firstChild())return i;if(n!=null){for(let s=!1;!s;)if(s=r.type.is(n),!r.nextSibling())return i}for(;;){if(o!=null&&r.type.is(o))return i;if(r.type.is(e)&&i.push(r.node),!r.nextSibling())return o==null?i:[]}}function Sb(t,e,n=e.length-1){for(let o=t;n>=0;o=o.parent){if(!o)return!1;if(!o.type.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}class ohe{constructor(e,n,o,r){this.parent=e,this.buffer=n,this.index=o,this.start=r}}class va extends EM{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,o){super(),this.context=e,this._parent=n,this.index=o,this.type=e.buffer.set.types[e.buffer.buffer[o]]}child(e,n,o){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,o);return i<0?null:new va(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,o=0){if(o&xn.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return i<0?null:new va(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new va(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new va(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:o}=this.context,r=this.index+4,i=o.buffer[this.index+3];if(i>r){let s=o.buffer[this.index+1];e.push(o.slice(r,i,s)),n.push(0)}return new Mn(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function IM(t){if(!t.length)return null;let e=0,n=t[0];for(let i=1;i<t.length;i++){let s=t[i];(s.from>n.from||s.to<n.to)&&(n=s,e=i)}let o=n instanceof Fr&&n.index<0?null:n.parent,r=t.slice();return o?r[e]=o:r.splice(e,1),new rhe(r,n)}class rhe{constructor(e,n){this.heads=e,this.node=n}get next(){return IM(this.heads)}}function ihe(t,e,n){let o=t.resolveInner(e,n),r=null;for(let i=o instanceof Fr?o:o.context.parent;i;i=i.parent)if(i.index<0){let s=i.parent;(r||(r=[o])).push(s.resolve(e,n)),i=s}else{let s=kd.get(i.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Fr(s.tree,s.overlay[0].from+i.from,-1,i);(r||(r=[o])).push(lf(a,e,n,!1))}}return r?IM(r):o}class kb{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~xn.EnterBracketed,e instanceof Fr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let o=e._parent;o;o=o._parent)this.stack.unshift(o.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:o,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=o+r.buffer[e+1],this.to=o+r.buffer[e+2],!0}yield(e){return e?e instanceof Fr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,o){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,o,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,o);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,o=this.mode){return this.buffer?o&xn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,o))}parent(){if(!this.buffer)return this.yieldNode(this.mode&xn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&xn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,o=this.stack.length-1;if(e<0){let r=o<0?0:this.stack[o]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(o<0?n.buffer.length:n.buffer[this.stack[o]+3]))return this.yieldBuf(r)}return o<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,o,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let i=0;i<this.index;i++)if(r.buffer.buffer[i+3]<this.index)return!1;({index:n,parent:o}=r)}else({index:n,_parent:o}=this._tree);for(;o;{index:n,_parent:o}=o)if(n>-1)for(let i=n+e,s=e<0?-1:o._tree.children.length;i!=s;i+=e){let a=o._tree.children[i];if(this.mode&xn.IncludeAnonymous||a instanceof Ea||!a.type.isAnonymous||K2(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,o=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;n=s,o=i+1;break e}r=this.stack[--i]}for(let r=o;r<this.stack.length;r++)n=new va(this.buffer,n,this.stack[r]);return this.bufferNode=new va(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let o=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){o++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!o)return;if(this.nextSibling())break;this.parent(),o--,r=!0}}}matchContext(e){if(!this.buffer)return Sb(this.node.parent,e);let{buffer:n}=this.buffer,{types:o}=n.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Sb(this._tree,e,r);let s=o[n.buffer[this.stack[i]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function K2(t){return t.children.some(e=>e instanceof Ea||!e.type.isAnonymous||K2(e))}function she(t){var e;let{buffer:n,nodeSet:o,maxBufferLength:r=PM,reused:i=[],minRepeatType:s=o.types.length}=t,a=Array.isArray(n)?new X2(n,n.length):n,l=o.types,c=0,u=0;function d(S,E,M,C,O,P){let{id:R,start:$,end:A,size:L}=a,B=u,F=c;if(L<0)if(a.next(),L==-1){let ue=i[R];M.push(ue),C.push($-S);return}else if(L==-3){c=R;return}else if(L==-4){u=R;return}else throw new RangeError(`Unrecognized record size: ${L}`);let z=l[R],V,U,ie=$-S;if(A-$<=r&&(U=m(a.pos-E,O))){let ue=new Uint16Array(U.size-U.skip),fe=a.pos-U.size,he=ue.length;for(;a.pos>fe;)he=v(U.start,ue,he);V=new Ea(ue,A-U.start,o),ie=U.start-S}else{let ue=a.pos-L;a.next();let fe=[],he=[],ce=R>=s?R:-1,de=0,_e=A;for(;a.pos>ue;)ce>=0&&a.id==ce&&a.size>=0?(a.end<=_e-r&&(g(fe,he,$,de,a.end,_e,ce,B,F),de=fe.length,_e=a.end),a.next()):P>2500?f($,ue,fe,he):d($,ue,fe,he,ce,P+1);if(ce>=0&&de>0&&de<fe.length&&g(fe,he,$,de,$,_e,ce,B,F),fe.reverse(),he.reverse(),ce>-1&&de>0){let j=h(z,F);V=Z2(z,fe,he,0,fe.length,0,A-$,j,j)}else V=b(z,fe,he,A-$,B-A,F)}M.push(V),C.push(ie)}function f(S,E,M,C){let O=[],P=0,R=-1;for(;a.pos>E;){let{id:$,start:A,end:L,size:B}=a;if(B>4)a.next();else{if(R>-1&&A<R)break;R<0&&(R=L-r),O.push($,A,L),P++,a.next()}}if(P){let $=new Uint16Array(P*4),A=O[O.length-2];for(let L=O.length-3,B=0;L>=0;L-=3)$[B++]=O[L],$[B++]=O[L+1]-A,$[B++]=O[L+2]-A,$[B++]=B;M.push(new Ea($,O[2]-A,o)),C.push(A-S)}}function h(S,E){return(M,C,O)=>{let P=0,R=M.length-1,$,A;if(R>=0&&($=M[R])instanceof Mn){if(!R&&$.type==S&&$.length==O)return $;(A=$.prop(Dt.lookAhead))&&(P=C[R]+$.length+A)}return b(S,M,C,O,P,E)}}function g(S,E,M,C,O,P,R,$,A){let L=[],B=[];for(;S.length>C;)L.push(S.pop()),B.push(E.pop()+M-O);S.push(b(o.types[R],L,B,P-O,$-P,A)),E.push(O-M)}function b(S,E,M,C,O,P,R){if(P){let $=[Dt.contextHash,P];R=R?[$].concat(R):[$]}if(O>25){let $=[Dt.lookAhead,O];R=R?[$].concat(R):[$]}return new Mn(S,E,M,C,R)}function m(S,E){let M=a.fork(),C=0,O=0,P=0,R=M.end-r,$={size:0,start:0,skip:0};e:for(let A=M.pos-S;M.pos>A;){let L=M.size;if(M.id==E&&L>=0){$.size=C,$.start=O,$.skip=P,P+=4,C+=4,M.next();continue}let B=M.pos-L;if(L<0||B<A||M.start<R)break;let F=M.id>=s?4:0,z=M.start;for(M.next();M.pos>B;){if(M.size<0)if(M.size==-3||M.size==-4)F+=4;else break e;else M.id>=s&&(F+=4);M.next()}O=z,C+=L,P+=F}return(E<0||C==S)&&($.size=C,$.start=O,$.skip=P),$.size>4?$:void 0}function v(S,E,M){let{id:C,start:O,end:P,size:R}=a;if(a.next(),R>=0&&C<s){let $=M;if(R>4){let A=a.pos-(R-4);for(;a.pos>A;)M=v(S,E,M)}E[--M]=$,E[--M]=P-S,E[--M]=O-S,E[--M]=C}else R==-3?c=C:R==-4&&(u=C);return M}let y=[],x=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,y,x,-1,0);let _=(e=t.length)!==null&&e!==void 0?e:y.length?x[0]+y[0].length:0;return new Mn(l[t.topID],y.reverse(),x.reverse(),_)}const fS=new WeakMap;function Zh(t,e){if(!t.isAnonymous||e instanceof Ea||e.type!=t)return 1;let n=fS.get(e);if(n==null){n=1;for(let o of e.children){if(o.type!=t||!(o instanceof Mn)){n=1;break}n+=Zh(t,o)}fS.set(e,n)}return n}function Z2(t,e,n,o,r,i,s,a,l){let c=0;for(let g=o;g<r;g++)c+=Zh(t,e[g]);let u=Math.ceil(c*1.5/8),d=[],f=[];function h(g,b,m,v,y){for(let x=m;x<v;){let _=x,S=b[x],E=Zh(t,g[x]);for(x++;x<v;x++){let M=Zh(t,g[x]);if(E+M>=u)break;E+=M}if(x==_+1){if(E>u){let M=g[_];h(M.children,M.positions,0,M.children.length,b[_]+y);continue}d.push(g[_])}else{let M=b[x-1]+g[x-1].length-S;d.push(Z2(t,g,b,_,x,S,M,null,l))}f.push(S+y-i)}}return h(e,n,o,r,0),(a||l)(d,f,s)}class Sl{constructor(e,n,o,r,i=!1,s=!1){this.from=e,this.to=n,this.tree=o,this.offset=r,this.open=(i?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],o=!1){let r=[new Sl(0,e.length,e,0,!1,o)];for(let i of n)i.to>e.length&&r.push(i);return r}static applyChanges(e,n,o=128){if(!n.length)return e;let r=[],i=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,d=u?u.fromA:1e9;if(d-l>=o)for(;s&&s.from<d;){let f=s;if(l>=f.from||d<=f.to||c){let h=Math.max(f.from,l)-c,g=Math.min(f.to,d)-c;f=h>=g?null:new Sl(h,g,f.tree,f.offset+c,a>0,!!u)}if(f&&r.push(f),s.to>d)break;s=i<e.length?e[i++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return r}}class NM{startParse(e,n,o){return typeof e=="string"&&(e=new ahe(e)),o=o?o.length?o.map(r=>new $v(r.from,r.to)):[new $v(0,0)]:[new $v(0,e.length)],this.createParse(e,n||[],o)}parse(e,n,o){let r=this.startParse(e,n,o);for(;;){let i=r.advance();if(i)return i}}}class ahe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Dt({perNode:!0});let lhe=0;class Lr{constructor(e,n,o,r){this.name=e,this.set=n,this.base=o,this.modified=r,this.id=lhe++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let o=typeof e=="string"?e:"?";if(e instanceof Lr&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new Lr(o,[],null,[]);if(r.set.push(r),n)for(let i of n.set)r.set.push(i);return r}static defineModifier(e){let n=new p0(e);return o=>o.modified.indexOf(n)>-1?o:p0.get(o.base||o,o.modified.concat(n).sort((r,i)=>r.id-i.id))}}let che=0;class p0{constructor(e){this.name=e,this.instances=[],this.id=che++}static get(e,n){if(!n.length)return e;let o=n[0].instances.find(a=>a.base==e&&uhe(n,a.modified));if(o)return o;let r=[],i=new Lr(e.name,r,e,n);for(let a of n)a.instances.push(i);let s=dhe(n);for(let a of e.set)if(!a.modified.length)for(let l of s)r.push(p0.get(a,l));return i}}function uhe(t,e){return t.length==e.length&&t.every((n,o)=>n==e[o])}function dhe(t){let e=[[]];for(let n=0;n<t.length;n++)for(let o=0,r=e.length;o<r;o++)e.push(e[o].concat(t[n]));return e.sort((n,o)=>o.length-n.length)}function RM(t){let e=Object.create(null);for(let n in t){let o=t[n];Array.isArray(o)||(o=[o]);for(let r of n.split(" "))if(r){let i=[],s=2,a=r;for(let d=0;;){if(a=="..."&&d>0&&d+3==r.length){s=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+r);if(i.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==r.length)break;let h=r[d++];if(d==r.length&&h=="!"){s=0;break}if(h!="/")throw new RangeError("Invalid path: "+r);a=r.slice(d)}let l=i.length-1,c=i[l];if(!c)throw new RangeError("Invalid path: "+r);let u=new cf(o,s,l>0?i.slice(0,l):null);e[c]=u.sort(e[c])}}return FM.add(e)}const FM=new Dt({combine(t,e){let n,o,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let i=new cf(r.tags,r.mode,r.context);n?n.next=i:o=i,n=i}return o}});class cf{constructor(e,n,o,r){this.tags=e,this.mode=n,this.context=o,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}cf.empty=new cf([],2,null);function VM(t,e){let n=Object.create(null);for(let i of t)if(!Array.isArray(i.tag))n[i.tag.id]=i.class;else for(let s of i.tag)n[s.id]=i.class;let{scope:o,all:r=null}=e||{};return{style:i=>{let s=r;for(let a of i)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:o}}function fhe(t,e){let n=null;for(let o of t){let r=o.style(e);r&&(n=n?n+" "+r:r)}return n}function zM(t,e,n,o=0,r=t.length){let i=new hhe(o,Array.isArray(e)?e:[e],n);i.highlightRange(t.cursor(),o,r,"",i.highlighters),i.flush(r)}class hhe{constructor(e,n,o){this.at=e,this.highlighters=n,this.span=o,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,o,r,i){let{type:s,from:a,to:l}=e;if(a>=o||l<=n)return;s.isTop&&(i=this.highlighters.filter(h=>!h.scope||h.scope(s)));let c=r,u=phe(e)||cf.empty,d=fhe(i,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(r+=(r?" ":"")+d)),this.startSpan(Math.max(n,a),c),u.opaque)return;let f=e.tree&&e.tree.prop(Dt.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+a,1),g=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),b=e.firstChild();for(let m=0,v=a;;m++){let y=m<f.overlay.length?f.overlay[m]:null,x=y?y.from+a:l,_=Math.max(n,v),S=Math.min(o,x);if(_<S&&b)for(;e.from<S&&(this.highlightRange(e,_,S,r,i),this.startSpan(Math.min(S,e.to),c),!(e.to>=x||!e.nextSibling())););if(!y||x>o)break;v=y.to+a,v>n&&(this.highlightRange(h.cursor(),Math.max(n,y.from+a),Math.min(o,v),"",g),this.startSpan(Math.min(o,v),c))}b&&e.parent()}else if(e.firstChild()){f&&(r="");do if(!(e.to<=n)){if(e.from>=o)break;this.highlightRange(e,n,o,r,i),this.startSpan(Math.min(o,e.to),c)}while(e.nextSibling());e.parent()}}}function phe(t){let e=t.type.prop(FM);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ye=Lr.define,Ch=Ye(),ca=Ye(),hS=Ye(ca),pS=Ye(ca),ua=Ye(),Ah=Ye(ua),Tv=Ye(ua),Pi=Ye(),nl=Ye(Pi),Bi=Ye(),Li=Ye(),Cb=Ye(),Wu=Ye(Cb),$h=Ye(),st={comment:Ch,lineComment:Ye(Ch),blockComment:Ye(Ch),docComment:Ye(Ch),name:ca,variableName:Ye(ca),typeName:hS,tagName:Ye(hS),propertyName:pS,attributeName:Ye(pS),className:Ye(ca),labelName:Ye(ca),namespace:Ye(ca),macroName:Ye(ca),literal:ua,string:Ah,docString:Ye(Ah),character:Ye(Ah),attributeValue:Ye(Ah),number:Tv,integer:Ye(Tv),float:Ye(Tv),bool:Ye(ua),regexp:Ye(ua),escape:Ye(ua),color:Ye(ua),url:Ye(ua),keyword:Bi,self:Ye(Bi),null:Ye(Bi),atom:Ye(Bi),unit:Ye(Bi),modifier:Ye(Bi),operatorKeyword:Ye(Bi),controlKeyword:Ye(Bi),definitionKeyword:Ye(Bi),moduleKeyword:Ye(Bi),operator:Li,derefOperator:Ye(Li),arithmeticOperator:Ye(Li),logicOperator:Ye(Li),bitwiseOperator:Ye(Li),compareOperator:Ye(Li),updateOperator:Ye(Li),definitionOperator:Ye(Li),typeOperator:Ye(Li),controlOperator:Ye(Li),punctuation:Cb,separator:Ye(Cb),bracket:Wu,angleBracket:Ye(Wu),squareBracket:Ye(Wu),paren:Ye(Wu),brace:Ye(Wu),content:Pi,heading:nl,heading1:Ye(nl),heading2:Ye(nl),heading3:Ye(nl),heading4:Ye(nl),heading5:Ye(nl),heading6:Ye(nl),contentSeparator:Ye(Pi),list:Ye(Pi),quote:Ye(Pi),emphasis:Ye(Pi),strong:Ye(Pi),link:Ye(Pi),monospace:Ye(Pi),strikethrough:Ye(Pi),inserted:Ye(),deleted:Ye(),changed:Ye(),invalid:Ye(),meta:$h,documentMeta:Ye($h),annotation:Ye($h),processingInstruction:Ye($h),definition:Lr.defineModifier("definition"),constant:Lr.defineModifier("constant"),function:Lr.defineModifier("function"),standard:Lr.defineModifier("standard"),local:Lr.defineModifier("local"),special:Lr.defineModifier("special")};for(let t in st){let e=st[t];e instanceof Lr&&(e.name=t)}const HM=VM([{tag:st.link,class:"tok-link"},{tag:st.heading,class:"tok-heading"},{tag:st.emphasis,class:"tok-emphasis"},{tag:st.strong,class:"tok-strong"},{tag:st.keyword,class:"tok-keyword"},{tag:st.atom,class:"tok-atom"},{tag:st.bool,class:"tok-bool"},{tag:st.url,class:"tok-url"},{tag:st.labelName,class:"tok-labelName"},{tag:st.inserted,class:"tok-inserted"},{tag:st.deleted,class:"tok-deleted"},{tag:st.literal,class:"tok-literal"},{tag:st.string,class:"tok-string"},{tag:st.number,class:"tok-number"},{tag:[st.regexp,st.escape,st.special(st.string)],class:"tok-string2"},{tag:st.variableName,class:"tok-variableName"},{tag:st.local(st.variableName),class:"tok-variableName tok-local"},{tag:st.definition(st.variableName),class:"tok-variableName tok-definition"},{tag:st.special(st.variableName),class:"tok-variableName2"},{tag:st.definition(st.propertyName),class:"tok-propertyName tok-definition"},{tag:st.typeName,class:"tok-typeName"},{tag:st.namespace,class:"tok-namespace"},{tag:st.className,class:"tok-className"},{tag:st.macroName,class:"tok-macroName"},{tag:st.propertyName,class:"tok-propertyName"},{tag:st.operator,class:"tok-operator"},{tag:st.comment,class:"tok-comment"},{tag:st.meta,class:"tok-meta"},{tag:st.invalid,class:"tok-invalid"},{tag:st.punctuation,class:"tok-punctuation"}]);var Mv;const bc=new Dt;function mhe(t){return gt.define({combine:t?e=>e.concat(t):void 0})}const ghe=new Dt;class ii{constructor(e,n,o=[],r=""){this.data=e,this.name=r,Zt.prototype.hasOwnProperty("tree")||Object.defineProperty(Zt.prototype,"tree",{get(){return ts(this)}}),this.parser=n,this.extension=[su.of(this),Zt.languageData.of((i,s,a)=>{let l=mS(i,s,a),c=l.type.prop(bc);if(!c)return[];let u=i.facet(c),d=l.type.prop(ghe);if(d){let f=l.resolve(s-l.from,a);for(let h of d)if(h.test(f,i)){let g=i.facet(h.facet);return h.type=="replace"?g:g.concat(u)}}return u})].concat(o)}isActiveAt(e,n,o=-1){return mS(e,n,o).type.prop(bc)==this.data}findRegions(e){let n=e.facet(su);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let o=[],r=(i,s)=>{if(i.prop(bc)==this.data){o.push({from:s,to:s+i.length});return}let a=i.prop(Dt.mounted);if(a){if(a.tree.prop(bc)==this.data){if(a.overlay)for(let l of a.overlay)o.push({from:l.from+s,to:l.to+s});else o.push({from:s,to:s+i.length});return}else if(a.overlay){let l=o.length;if(r(a.tree,a.overlay[0].from+s),o.length>l)return}}for(let l=0;l<i.children.length;l++){let c=i.children[l];c instanceof Mn&&r(c,i.positions[l]+s)}};return r(ts(e),0),o}get allowsNesting(){return!0}}ii.setState=Tn.define();function mS(t,e,n){let o=t.facet(su),r=ts(t).topNode;if(!o||o.allowsNesting)for(let i=r;i;i=i.enter(e,n,xn.ExcludeBuffers|xn.EnterBracketed))i.type.isTop&&(r=i);return r}class m0 extends ii{constructor(e,n,o){super(e,n,[],o),this.parser=n}static define(e){let n=mhe(e.languageData);return new m0(n,e.parser.configure({props:[bc.add(o=>o.isTop?n:void 0)]}),e.name)}configure(e,n){return new m0(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ts(t){let e=t.field(ii.state,!1);return e?e.tree:Mn.empty}class vhe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let o=this.cursorPos-this.string.length;return e<o||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-o,n-o)}}let Uu=null;class g0{constructor(e,n,o=[],r,i,s,a,l){this.parser=e,this.state=n,this.fragments=o,this.tree=r,this.treeLen=i,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,o){return new g0(e,n,[],Mn.empty,0,o,[],null)}startParse(){return this.parser.startParse(new vhe(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Mn.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var o;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(Sl.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(o=this.parse.stoppedAt)!==null&&o!==void 0?o:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Sl.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Uu;Uu=this;try{return e()}finally{Uu=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=gS(e,n.from,n.to);return e}changes(e,n){let{fragments:o,tree:r,treeLen:i,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,d,f)=>l.push({fromA:c,toA:u,fromB:d,toB:f})),o=Sl.applyChanges(o,l),r=Mn.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),d=e.mapPos(c.to,-1);u<d&&a.push({from:u,to:d})}}}return new g0(this.parser,n,o,r,i,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let o=0;o<this.skipped.length;o++){let{from:r,to:i}=this.skipped[o];r<e.to&&i>e.from&&(this.fragments=gS(this.fragments,r,i),this.skipped.splice(o--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends NM{createParse(n,o,r){let i=r[0].from,s=r[r.length-1].to;return{parsedPos:i,advance(){let l=Uu;if(l){for(let c of r)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new Mn(ur.none,[],[],s-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Uu}}function gS(t,e,n){return Sl.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class iu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),o=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,o)||n.takeTree(),new iu(n)}static init(e){let n=Math.min(3e3,e.doc.length),o=g0.create(e.facet(su).parser,e,{from:0,to:n});return o.work(20,n)||o.takeTree(),new iu(o)}}ii.state=Ya.define({create:iu.init,update(t,e){for(let n of e.effects)if(n.is(ii.setState))return n.value;return e.startState.facet(su)!=e.state.facet(su)?iu.init(e.state):t.apply(e)}});let WM=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(WM=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Ov=typeof navigator<"u"&&(!((Mv=navigator.scheduling)===null||Mv===void 0)&&Mv.isInputPending)?()=>navigator.scheduling.isInputPending():null,bhe=Nl.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(ii.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(ii.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=WM(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:o,viewport:{to:r}}=this.view,i=o.field(ii.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!Ov?Math.max(25,e.timeRemaining()-5):1e9),a=i.context.treeLen<r&&o.doc.length>r+1e3,l=i.context.work(()=>Ov&&Ov()||Date.now()>s,r+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:ii.setState.of(new iu(i.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>zi(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),su=gt.define({combine(t){return t.length?t[0]:null},enables:t=>[ii.state,bhe,_t.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class yhe{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const xhe=gt.define(),Q2=gt.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function v0(t){let e=t.facet(Q2);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function b0(t,e){let n="",o=t.tabSize,r=t.facet(Q2)[0];if(r==" "){for(;e>=o;)n+=" ",e-=o;r=" "}for(let i=0;i<e;i++)n+=r;return n}function UM(t,e){t instanceof Zt&&(t=new ig(t));for(let o of t.state.facet(xhe)){let r=o(t,e);if(r!==void 0)return r}let n=ts(t.state);return n.length>=e?_he(t,n,e):null}class ig{constructor(e,n={}){this.state=e,this.options=n,this.unit=v0(e)}lineAt(e,n=1){let o=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=o.from&&r<=o.to?i&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:o.text.slice(r-o.from),from:r}:{text:o.text.slice(0,r-o.from),from:o.from}:o}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:o,from:r}=this.lineAt(e,n);return o.slice(e-r,Math.min(o.length,e+100-r))}column(e,n=1){let{text:o,from:r}=this.lineAt(e,n),i=this.countColumn(o,e-r),s=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return s>-1&&(i+=s-this.countColumn(o,o.search(/\S|$/))),i}countColumn(e,n=e.length){return Qm(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:o,from:r}=this.lineAt(e,n),i=this.options.overrideIndentation;if(i){let s=i(r);if(s>-1)return s}return this.countColumn(o,o.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const whe=new Dt;function _he(t,e,n){let o=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=o.node){let i=[];for(let s=r;s&&!(s.from<o.node.from||s.to>o.node.to||s.from==o.node.from&&s.type==o.node.type);s=s.parent)i.push(s);for(let s=i.length-1;s>=0;s--)o={node:i[s],next:o}}return GM(o,t,n)}function GM(t,e,n){for(let o=t;o;o=o.next){let r=khe(o.node);if(r)return r(J2.create(e,n,o))}return 0}function She(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function khe(t){let e=t.type.prop(whe);if(e)return e;let n=t.firstChild,o;if(n&&(o=n.type.prop(Dt.closedBy))){let r=t.lastChild,i=r&&o.indexOf(r.name)>-1;return s=>The(s,!0,1,void 0,i&&!She(s)?r.from:void 0)}return t.parent==null?Che:null}function Che(){return 0}class J2 extends ig{constructor(e,n,o){super(e.state,e.options),this.base=e,this.pos=n,this.context=o}get node(){return this.context.node}static create(e,n,o){return new J2(e,n,o)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let o=e.resolve(n.from);for(;o.parent&&o.parent.from==o.from;)o=o.parent;if(Ahe(o,e))break;n=this.state.doc.lineAt(o.from)}return this.lineIndent(n.from)}continue(){return GM(this.context.next,this.base,this.pos)}}function Ahe(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function $he(t){let e=t.node,n=e.childAfter(e.from),o=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,i=t.state.doc.lineAt(n.from),s=r==null||r<=i.from?i.to:Math.min(i.to,r);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==o)return null;if(!l.type.isSkipped){if(l.from>=s)return null;let c=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function The(t,e,n,o,r){let i=t.textAfter,s=i.match(/^\s*/)[0].length,a=o&&i.slice(s,s+o.length)==o||r==t.pos+s,l=$he(t);return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}class ex{constructor(e,n){this.specs=e;let o;function r(a){let l=La.newName();return(o||(o=Object.create(null)))["."+l]=a,l}const i=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,s=n.scope;this.scope=s instanceof ii?a=>a.prop(bc)==s.data:s?a=>a==s:void 0,this.style=VM(e.map(a=>({tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))})),{all:i}).style,this.module=o?new La(o):null,this.themeType=n.themeType}static define(e,n){return new ex(e,n||{})}}const Ab=gt.define(),Mhe=gt.define({combine(t){return t.length?[t[0]]:null}});function Bv(t){let e=t.facet(Ab);return e.length?e:t.facet(Mhe)}function Ohe(t,e){let n=[Lhe],o;return t instanceof ex&&(t.module&&n.push(_t.styleModule.of(t.module)),o=t.themeType),o?n.push(Ab.computeN([_t.darkTheme],r=>r.facet(_t.darkTheme)==(o=="dark")?[t]:[])):n.push(Ab.of(t)),n}class Bhe{constructor(e){this.markCache=Object.create(null),this.tree=ts(e.state),this.decorations=this.buildDeco(e,Bv(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=ts(e.state),o=Bv(e.state),r=o!=Bv(e.startState),{viewport:i}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length<i.to&&!r&&n.type==this.tree.type&&s>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,o),this.decoratedTo=i.to)}buildDeco(e,n){if(!n||!this.tree.length)return Xn.none;let o=new tf;for(let{from:r,to:i}of e.visibleRanges)zM(this.tree,n,(s,a,l)=>{o.add(s,a,this.markCache[l]||(this.markCache[l]=Xn.mark({class:l})))},r,i);return o.finish()}}const Lhe=E2.high(Nl.fromClass(Bhe,{decorations:t=>t.decorations})),Phe=1e4,Dhe="()[]{}",Ehe=new Dt;function $b(t,e,n){let o=t.prop(e<0?Dt.openedBy:Dt.closedBy);if(o)return o;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function Tb(t){let e=t.type.prop(Ehe);return e?e(t.node):t}function yc(t,e,n,o={}){let r=o.maxScanDistance||Phe,i=o.brackets||Dhe,s=ts(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let c=$b(l.type,n,i);if(c&&l.from<l.to){let u=Tb(l);if(u&&(n>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return Ihe(t,e,n,l,u,c,i)}}return Nhe(t,e,n,s,a.type,r,i)}function Ihe(t,e,n,o,r,i,s){let a=o.parent,l={from:r.from,to:r.to},c=0,u=a==null?void 0:a.cursor();if(u&&(n<0?u.childBefore(o.from):u.childAfter(o.to)))do if(n<0?u.to<=o.from:u.from>=o.to){if(c==0&&i.indexOf(u.type.name)>-1&&u.from<u.to){let d=Tb(u);return{start:l,end:d?{from:d.from,to:d.to}:void 0,matched:!0}}else if($b(u.type,n,s))c++;else if($b(u.type,-n,s)){if(c==0){let d=Tb(u);return{start:l,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function Nhe(t,e,n,o,r,i,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!u.next().done&&f<=i;){let h=u.value;n<0&&(f+=h.length);let g=e+f*n;for(let b=n>0?0:h.length-1,m=n>0?h.length:-1;b!=m;b+=n){let v=s.indexOf(h[b]);if(!(v<0||o.resolveInner(g+b,1).type!=r))if(v%2==0==n>0)d++;else{if(d==1)return{start:c,end:{from:g+b,to:g+b+1},matched:v>>1==l>>1};d--}}n>0&&(f+=h.length)}return u.done?{start:c,matched:!1}:null}const Rhe=Object.create(null),vS=[ur.none],bS=[],yS=Object.create(null),Fhe=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Fhe[t]=Vhe(Rhe,e);function Lv(t,e){bS.indexOf(t)>-1||(bS.push(t),console.warn(e))}function Vhe(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let c of a.split(".")){let u=t[c]||st[c];u?typeof u=="function"?l.length?l=l.map(u):Lv(c,`Modifier ${c} used at start of tag`):l.length?Lv(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:Lv(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let o=e.replace(/ /g,"_"),r=o+" "+n.map(a=>a.id),i=yS[r];if(i)return i.id;let s=yS[r]=ur.define({id:vS.length,name:o,props:[RM({[o]:n})]});return vS.push(s),s.id}Dn.RTL,Dn.LTR;const zhe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),o=nx(t.state,n.from);return o.line?Hhe(t):o.block?Uhe(t):!1};function tx(t,e){return({state:n,dispatch:o})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(o(n.update(r)),!0):!1}}const Hhe=tx(Yhe,0),Whe=tx(qM,0),Uhe=tx((t,e)=>qM(t,e,qhe(e)),0);function nx(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Gu=50;function Ghe(t,{open:e,close:n},o,r){let i=t.sliceDoc(o-Gu,o),s=t.sliceDoc(r,r+Gu),a=/\s*$/.exec(i)[0].length,l=/^\s*/.exec(s)[0].length,c=i.length-a;if(i.slice(c-e.length,c)==e&&s.slice(l,l+n.length)==n)return{open:{pos:o-a,margin:a&&1},close:{pos:r+l,margin:l&&1}};let u,d;r-o<=2*Gu?u=d=t.sliceDoc(o,r):(u=t.sliceDoc(o,o+Gu),d=t.sliceDoc(r-Gu,r));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,g=d.length-h-n.length;return u.slice(f,f+e.length)==e&&d.slice(g,g+n.length)==n?{open:{pos:o+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:r-h-n.length,margin:/\s/.test(d.charAt(g-1))?1:0}}:null}function qhe(t){let e=[];for(let n of t.selection.ranges){let o=t.doc.lineAt(n.from),r=n.to<=o.to?o:t.doc.lineAt(n.to);r.from>o.from&&r.from==n.to&&(r=n.to==o.to+1?o:t.doc.lineAt(n.to-1));let i=e.length-1;i>=0&&e[i].to>o.from?e[i].to=r.to:e.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:r.to})}return e}function qM(t,e,n=e.selection.ranges){let o=n.map(i=>nx(e,i.from).block);if(!o.every(i=>i))return null;let r=n.map((i,s)=>Ghe(e,o[s],i.from,i.to));if(t!=2&&!r.every(i=>i))return{changes:e.changes(n.map((i,s)=>r[s]?[]:[{from:i.from,insert:o[s].open+" "},{from:i.to,insert:" "+o[s].close}]))};if(t!=1&&r.some(i=>i)){let i=[];for(let s=0,a;s<r.length;s++)if(a=r[s]){let l=o[s],{open:c,close:u}=a;i.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:i}}return null}function Yhe(t,e,n=e.selection.ranges){let o=[],r=-1;e:for(let{from:i,to:s}of n){let a=o.length,l=1e9,c;for(let u=i;u<=s;){let d=e.doc.lineAt(u);if(c==null&&(c=nx(e,d.from).line,!c))continue e;if(d.from>r&&(i==s||s>d.from)){r=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,g=d.text.slice(f,f+c.length)==c?f:-1;f<d.text.length&&f<l&&(l=f),o.push({line:d,comment:g,token:c,indent:f,empty:h,single:!1})}u=d.to+1}if(l<1e9)for(let u=a;u<o.length;u++)o[u].indent<o[u].line.text.length&&(o[u].indent=l);o.length==a+1&&(o[a].single=!0)}if(t!=2&&o.some(i=>i.comment<0&&(!i.empty||i.single))){let i=[];for(let{line:a,token:l,indent:c,empty:u,single:d}of o)(d||!u)&&i.push({from:a.from+c,insert:l+" "});let s=e.changes(i);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&o.some(i=>i.comment>=0)){let i=[];for(let{line:s,comment:a,token:l}of o)if(a>=0){let c=s.from+a,u=c+l.length;s.text[u-s.from]==" "&&u++,i.push({from:c,to:u})}return{changes:i}}return null}const Mb=ja.define(),jhe=ja.define(),Xhe=gt.define(),YM=gt.define({combine(t){return rde(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(o,r)=>e(o,r)||n(o,r)})}}),jM=Ya.define({create(){return Hi.empty},update(t,e){let n=e.state.facet(YM),o=e.annotation(Mb);if(o){let l=ir.fromTransaction(e,o.selection),c=o.side,u=c==0?t.undone:t.done;return l?u=y0(u,u.length,n.minDepth,l):u=ZM(u,e.startState.selection),new Hi(c==0?o.rest:u,c==0?u:o.rest)}let r=e.annotation(jhe);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Wn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let i=ir.fromTransaction(e),s=e.annotation(Wn.time),a=e.annotation(Wn.userEvent);return i?t=t.addChanges(i,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Hi(t.done.map(ir.fromJSON),t.undone.map(ir.fromJSON))}});function Khe(t={}){return[jM,YM.of(t),_t.domEventHandlers({beforeinput(e,n){let o=e.inputType=="historyUndo"?XM:e.inputType=="historyRedo"?Ob:null;return o?(e.preventDefault(),o(n)):!1}})]}function sg(t,e){return function({state:n,dispatch:o}){if(!e&&n.readOnly)return!1;let r=n.field(jM,!1);if(!r)return!1;let i=r.pop(t,n,e);return i?(o(i),!0):!1}}const XM=sg(0,!1),Ob=sg(1,!1),Zhe=sg(0,!0),Qhe=sg(1,!0);class ir{constructor(e,n,o,r,i){this.changes=e,this.effects=n,this.mapped=o,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new ir(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,o;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(o=this.startSelection)===null||o===void 0?void 0:o.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new ir(e.changes&&zn.fromJSON(e.changes),[],e.mapped&&Ki.fromJSON(e.mapped),e.startSelection&&Ne.fromJSON(e.startSelection),e.selectionsAfter.map(Ne.fromJSON))}static fromTransaction(e,n){let o=Er;for(let r of e.startState.facet(Xhe)){let i=r(e);i.length&&(o=o.concat(i))}return!o.length&&e.changes.empty?null:new ir(e.changes.invert(e.startState.doc),o,void 0,n||e.startState.selection,Er)}static selection(e){return new ir(void 0,Er,void 0,void 0,e)}}function y0(t,e,n,o){let r=e+1>n+20?e-n-1:0,i=t.slice(r,e);return i.push(o),i}function Jhe(t,e){let n=[],o=!1;return t.iterChangedRanges((r,i)=>n.push(r,i)),e.iterChangedRanges((r,i,s,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];a>=c&&s<=u&&(o=!0)}}),o}function epe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,o)=>n.empty!=e.ranges[o].empty).length===0}function KM(t,e){return t.length?e.length?t.concat(e):t:e}const Er=[],tpe=200;function ZM(t,e){if(t.length){let n=t[t.length-1],o=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-tpe));return o.length&&o[o.length-1].eq(e)?t:(o.push(e),y0(t,t.length-1,1e9,n.setSelAfter(o)))}else return[ir.selection([e])]}function npe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Pv(t,e){if(!t.length)return t;let n=t.length,o=Er;for(;n;){let r=ope(t[n-1],e,o);if(r.changes&&!r.changes.empty||r.effects.length){let i=t.slice(0,n);return i[n-1]=r,i}else e=r.mapped,n--,o=r.selectionsAfter}return o.length?[ir.selection(o)]:Er}function ope(t,e,n){let o=KM(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Er,n);if(!t.changes)return ir.selection(o);let r=t.changes.map(e),i=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(i):i;return new ir(r,Tn.mapEffects(t.effects,e),s,t.startSelection.map(i),o)}const rpe=/^(input\.type|delete)($|\.)/;class Hi{constructor(e,n,o=0,r=void 0){this.done=e,this.undone=n,this.prevTime=o,this.prevUserEvent=r}isolate(){return this.prevTime?new Hi(this.done,this.undone):this}addChanges(e,n,o,r,i){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!o||rpe.test(o))&&(!a.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,Jhe(a.changes,e.changes))||o=="input.type.compose")?s=y0(s,s.length-1,r.minDepth,new ir(e.changes.compose(a.changes),KM(Tn.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Er)):s=y0(s,s.length,r.minDepth,e),new Hi(s,Er,n,o)}addSelection(e,n,o,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:Er;return i.length>0&&n-this.prevTime<r&&o==this.prevUserEvent&&o&&/^select($|\.)/.test(o)&&epe(i[i.length-1],e)?this:new Hi(ZM(this.done,e),this.undone,n,o)}addMapping(e){return new Hi(Pv(this.done,e),Pv(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,o){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],s=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):n.selection);if(o&&i.selectionsAfter.length)return n.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Mb.of({side:e,rest:npe(r),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let a=r.length==1?Er:r.slice(0,r.length-1);return i.mapped&&(a=Pv(a,i.mapped)),n.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Mb.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Hi.empty=new Hi(Er,Er);const ipe=[{key:"Mod-z",run:XM,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Ob,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Ob,preventDefault:!0},{key:"Mod-u",run:Zhe,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Qhe,preventDefault:!0}];function _u(t,e){return Ne.create(t.ranges.map(e),t.mainIndex)}function Ai(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function $i({state:t,dispatch:e},n){let o=_u(t.selection,n);return o.eq(t.selection,!0)?!1:(e(Ai(t,o)),!0)}function ag(t,e){return Ne.cursor(e?t.to:t.from)}function QM(t,e){return $i(t,n=>n.empty?t.moveByChar(n,e):ag(n,e))}function Do(t){return t.textDirectionAt(t.state.selection.main.head)==Dn.LTR}const JM=t=>QM(t,!Do(t)),eO=t=>QM(t,Do(t));function tO(t,e){return $i(t,n=>n.empty?t.moveByGroup(n,e):ag(n,e))}const spe=t=>tO(t,!Do(t)),ape=t=>tO(t,Do(t));function lpe(t,e,n){if(e.type.prop(n))return!0;let o=e.to-e.from;return o&&(o>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function lg(t,e,n){let o=ts(t).resolveInner(e.head),r=n?Dt.closedBy:Dt.openedBy;for(let l=e.head;;){let c=n?o.childAfter(l):o.childBefore(l);if(!c)break;lpe(t,c,r)?o=c:l=n?c.to:c.from}let i=o.type.prop(r),s,a;return i&&(s=n?yc(t,o.from,1):yc(t,o.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?o.to:o.from,Ne.cursor(a,n?-1:1)}const cpe=t=>$i(t,e=>lg(t.state,e,!Do(t))),upe=t=>$i(t,e=>lg(t.state,e,Do(t)));function nO(t,e){return $i(t,n=>{if(!n.empty)return ag(n,e);let o=t.moveVertically(n,e);return o.head!=n.head?o:t.moveToLineBoundary(n,e)})}const oO=t=>nO(t,!1),rO=t=>nO(t,!0);function iO(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,o=0,r;if(e){for(let i of t.state.facet(_t.scrollMargins)){let s=i(t);s!=null&&s.top&&(n=Math.max(s==null?void 0:s.top,n)),s!=null&&s.bottom&&(o=Math.max(s==null?void 0:s.bottom,o))}r=t.scrollDOM.clientHeight-n-o}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:o,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function sO(t,e){let n=iO(t),{state:o}=t,r=_u(o.selection,s=>s.empty?t.moveVertically(s,e,n.height):ag(s,e));if(r.eq(o.selection))return!1;let i;if(n.selfScroll){let s=t.coordsAtPos(o.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;s&&s.top>l&&s.bottom<c&&(i=_t.scrollIntoView(r.main.head,{y:"start",yMargin:s.top-l}))}return t.dispatch(Ai(o,r),{effects:i}),!0}const xS=t=>sO(t,!1),Bb=t=>sO(t,!0);function Xa(t,e,n){let o=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?o.to:o.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==o.from&&o.length){let i=/^\s*/.exec(t.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;i&&e.head!=o.from+i&&(r=Ne.cursor(o.from+i))}return r}const dpe=t=>$i(t,e=>Xa(t,e,!0)),fpe=t=>$i(t,e=>Xa(t,e,!1)),hpe=t=>$i(t,e=>Xa(t,e,!Do(t))),ppe=t=>$i(t,e=>Xa(t,e,Do(t))),mpe=t=>$i(t,e=>Ne.cursor(t.lineBlockAt(e.head).from,1)),gpe=t=>$i(t,e=>Ne.cursor(t.lineBlockAt(e.head).to,-1));function vpe(t,e,n){let o=!1,r=_u(t.selection,i=>{let s=yc(t,i.head,-1)||yc(t,i.head,1)||i.head>0&&yc(t,i.head-1,1)||i.head<t.doc.length&&yc(t,i.head+1,-1);if(!s||!s.end)return i;o=!0;let a=s.start.from==i.head?s.end.to:s.end.from;return Ne.cursor(a)});return o?(e(Ai(t,r)),!0):!1}const bpe=({state:t,dispatch:e})=>vpe(t,e);function jr(t,e){let n=_u(t.state.selection,o=>{let r=e(o);return Ne.range(o.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Ai(t.state,n)),!0)}function aO(t,e){return jr(t,n=>t.moveByChar(n,e))}const lO=t=>aO(t,!Do(t)),cO=t=>aO(t,Do(t));function uO(t,e){return jr(t,n=>t.moveByGroup(n,e))}const ype=t=>uO(t,!Do(t)),xpe=t=>uO(t,Do(t)),wpe=t=>jr(t,e=>lg(t.state,e,!Do(t))),_pe=t=>jr(t,e=>lg(t.state,e,Do(t)));function dO(t,e){return jr(t,n=>t.moveVertically(n,e))}const fO=t=>dO(t,!1),hO=t=>dO(t,!0);function pO(t,e){return jr(t,n=>t.moveVertically(n,e,iO(t).height))}const wS=t=>pO(t,!1),_S=t=>pO(t,!0),Spe=t=>jr(t,e=>Xa(t,e,!0)),kpe=t=>jr(t,e=>Xa(t,e,!1)),Cpe=t=>jr(t,e=>Xa(t,e,!Do(t))),Ape=t=>jr(t,e=>Xa(t,e,Do(t))),$pe=t=>jr(t,e=>Ne.cursor(t.lineBlockAt(e.head).from)),Tpe=t=>jr(t,e=>Ne.cursor(t.lineBlockAt(e.head).to)),SS=({state:t,dispatch:e})=>(e(Ai(t,{anchor:0})),!0),kS=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.doc.length})),!0),CS=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:0})),!0),AS=({state:t,dispatch:e})=>(e(Ai(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Mpe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Ope=({state:t,dispatch:e})=>{let n=cg(t).map(({from:o,to:r})=>Ne.range(o,Math.min(r+1,t.doc.length)));return e(t.update({selection:Ne.create(n),userEvent:"select"})),!0},Bpe=({state:t,dispatch:e})=>{let n=_u(t.selection,o=>{let r=ts(t),i=r.resolveStack(o.from,1);if(o.empty){let s=r.resolveStack(o.from,-1);s.node.from>=i.node.from&&s.node.to<=i.node.to&&(i=s)}for(let s=i;s;s=s.next){let{node:a}=s;if((a.from<o.from&&a.to>=o.to||a.to>o.to&&a.from<=o.from)&&s.next)return Ne.range(a.to,a.from)}return o});return n.eq(t.selection)?!1:(e(Ai(t,n)),!0)};function mO(t,e){let{state:n}=t,o=n.selection,r=n.selection.ranges.slice();for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head);if(e?s.to<t.state.doc.length:s.from>0)for(let a=i;;){let l=t.moveVertically(a,e);if(l.head<s.from||l.head>s.to){r.some(c=>c.head==l.head)||r.push(l);break}else{if(l.head==a.head)break;a=l}}}return r.length==o.ranges.length?!1:(t.dispatch(Ai(n,Ne.create(r,r.length-1))),!0)}const Lpe=t=>mO(t,!1),Ppe=t=>mO(t,!0),Dpe=({state:t,dispatch:e})=>{let n=t.selection,o=null;return n.ranges.length>1?o=Ne.create([n.main]):n.main.empty||(o=Ne.create([Ne.cursor(n.main.head)])),o?(e(Ai(t,o)),!0):!1};function Pf(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:o}=t,r=o.changeByRange(i=>{let{from:s,to:a}=i;if(s==a){let l=e(i);l<s?(n="delete.backward",l=Th(t,l,!1)):l>s&&(n="delete.forward",l=Th(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=Th(t,s,!1),a=Th(t,a,!0);return s==a?{range:i}:{changes:{from:s,to:a},range:Ne.cursor(s,s<i.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(o.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?_t.announce.of(o.phrase("Selection deleted")):void 0})),!0)}function Th(t,e,n){if(t instanceof _t)for(let o of t.state.facet(_t.atomicRanges).map(r=>r(t)))o.between(e,e,(r,i)=>{r<e&&i>e&&(e=n?i:r)});return e}const gO=(t,e,n)=>Pf(t,o=>{let r=o.from,{state:i}=t,s=i.doc.lineAt(r),a,l;if(n&&!e&&r>s.from&&r<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,r-s.from))){if(a[a.length-1]==" ")return r-1;let c=Qm(a,i.tabSize),u=c%v0(i)||v0(i);for(let d=0;d<u&&a[a.length-1-d]==" ";d++)r--;l=r}else l=Oo(s.text,r-s.from,e,e)+s.from,l==r&&s.number!=(e?i.doc.lines:1)?l+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(s.text.slice(l-s.from,r-s.from))&&(l=Oo(s.text,l-s.from,!1,!1)+s.from);return l}),Lb=t=>gO(t,!1,!0),vO=t=>gO(t,!0,!1),bO=(t,e)=>Pf(t,n=>{let o=n.head,{state:r}=t,i=r.doc.lineAt(o),s=r.charCategorizer(o);for(let a=null;;){if(o==(e?i.to:i.from)){o==n.head&&i.number!=(e?r.doc.lines:1)&&(o+=e?1:-1);break}let l=Oo(i.text,o-i.from,e)+i.from,c=i.text.slice(Math.min(o,l)-i.from,Math.max(o,l)-i.from),u=s(c);if(a!=null&&u!=a)break;(c!=" "||o!=n.head)&&(a=u),o=l}return o}),yO=t=>bO(t,!1),Epe=t=>bO(t,!0),Ipe=t=>Pf(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Npe=t=>Pf(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Rpe=t=>Pf(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Fpe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(o=>({changes:{from:o.from,to:o.to,insert:Ut.of(["",""])},range:Ne.cursor(o.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Vpe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(o=>{if(!o.empty||o.from==0||o.from==t.doc.length)return{range:o};let r=o.from,i=t.doc.lineAt(r),s=r==i.from?r-1:Oo(i.text,r-i.from,!1)+i.from,a=r==i.to?r+1:Oo(i.text,r-i.from,!0)+i.from;return{changes:{from:s,to:a,insert:t.doc.slice(r,a).append(t.doc.slice(s,r))},range:Ne.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function cg(t){let e=[],n=-1;for(let o of t.selection.ranges){let r=t.doc.lineAt(o.from),i=t.doc.lineAt(o.to);if(!o.empty&&o.to==i.from&&(i=t.doc.lineAt(o.to-1)),n>=r.number){let s=e[e.length-1];s.to=i.to,s.ranges.push(o)}else e.push({from:r.from,to:i.to,ranges:[o]});n=i.number+1}return e}function xO(t,e,n){if(t.readOnly)return!1;let o=[],r=[];for(let i of cg(t)){if(n?i.to==t.doc.length:i.from==0)continue;let s=t.doc.lineAt(n?i.to+1:i.from-1),a=s.length+1;if(n){o.push({from:i.to,to:s.to},{from:i.from,insert:s.text+t.lineBreak});for(let l of i.ranges)r.push(Ne.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{o.push({from:s.from,to:i.from},{from:i.to,insert:t.lineBreak+s.text});for(let l of i.ranges)r.push(Ne.range(l.anchor-a,l.head-a))}}return o.length?(e(t.update({changes:o,scrollIntoView:!0,selection:Ne.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const zpe=({state:t,dispatch:e})=>xO(t,e,!1),Hpe=({state:t,dispatch:e})=>xO(t,e,!0);function wO(t,e,n){if(t.readOnly)return!1;let o=[];for(let i of cg(t))n?o.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):o.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});let r=t.changes(o);return e(t.update({changes:r,selection:t.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Wpe=({state:t,dispatch:e})=>wO(t,e,!1),Upe=({state:t,dispatch:e})=>wO(t,e,!0),Gpe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(cg(e).map(({from:r,to:i})=>(r>0?r--:i<e.doc.length&&i++,{from:r,to:i}))),o=_u(e.selection,r=>{let i;if(t.lineWrapping){let s=t.lineBlockAt(r.head),a=t.coordsAtPos(r.head,r.assoc||1);a&&(i=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,i)}).map(n);return t.dispatch({changes:n,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0};function qpe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=ts(t).resolveInner(e),o=n.childBefore(e),r=n.childAfter(e),i;return o&&r&&o.to<=e&&r.from>=e&&(i=o.type.prop(Dt.closedBy))&&i.indexOf(r.name)>-1&&t.doc.lineAt(o.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(o.to,r.from))?{from:o.to,to:r.from}:null}const $S=_O(!1),Ype=_O(!0);function _O(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let o=e.changeByRange(r=>{let{from:i,to:s}=r,a=e.doc.lineAt(i),l=!t&&i==s&&qpe(e,i);t&&(i=s=(s<=a.to?a:e.doc.lineAt(s)).to);let c=new ig(e,{simulateBreak:i,simulateDoubleBreak:!!l}),u=UM(c,i);for(u==null&&(u=Qm(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;l?{from:i,to:s}=l:i>a.from&&i<a.from+100&&!/\S/.test(a.text.slice(0,i))&&(i=a.from);let d=["",b0(e,u)];return l&&d.push(b0(e,c.lineIndent(a.from,-1))),{changes:{from:i,to:s,insert:Ut.of(d)},range:Ne.cursor(i+1+d[1].length)}});return n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function ox(t,e){let n=-1;return t.changeByRange(o=>{let r=[];for(let s=o.from;s<=o.to;){let a=t.doc.lineAt(s);a.number>n&&(o.empty||o.to>a.from)&&(e(a,r,o),n=a.number),s=a.to+1}let i=t.changes(r);return{changes:r,range:Ne.range(i.mapPos(o.anchor,1),i.mapPos(o.head,1))}})}const jpe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),o=new ig(t,{overrideIndentation:i=>{let s=n[i];return s??-1}}),r=ox(t,(i,s,a)=>{let l=UM(o,i.from);if(l==null)return;/\S/.test(i.text)||(l=0);let c=/^\s*/.exec(i.text)[0],u=b0(t,l);(c!=u||a.from<i.from+c.length)&&(n[i.from]=l,s.push({from:i.from,to:i.from+c.length,insert:u}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},Xpe=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(ox(t,(n,o)=>{o.push({from:n.from,insert:t.facet(Q2)})}),{userEvent:"input.indent"})),!0),Kpe=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(ox(t,(n,o)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let i=Qm(r,t.tabSize),s=0,a=b0(t,Math.max(0,i-v0(t)));for(;s<r.length&&s<a.length&&r.charCodeAt(s)==a.charCodeAt(s);)s++;o.push({from:n.from+s,to:n.from+r.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),Zpe=t=>(t.setTabFocusMode(),!0),Qpe=[{key:"Ctrl-b",run:JM,shift:lO,preventDefault:!0},{key:"Ctrl-f",run:eO,shift:cO},{key:"Ctrl-p",run:oO,shift:fO},{key:"Ctrl-n",run:rO,shift:hO},{key:"Ctrl-a",run:mpe,shift:$pe},{key:"Ctrl-e",run:gpe,shift:Tpe},{key:"Ctrl-d",run:vO},{key:"Ctrl-h",run:Lb},{key:"Ctrl-k",run:Ipe},{key:"Ctrl-Alt-h",run:yO},{key:"Ctrl-o",run:Fpe},{key:"Ctrl-t",run:Vpe},{key:"Ctrl-v",run:Bb}],Jpe=[{key:"ArrowLeft",run:JM,shift:lO,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:spe,shift:ype,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:hpe,shift:Cpe,preventDefault:!0},{key:"ArrowRight",run:eO,shift:cO,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:ape,shift:xpe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:ppe,shift:Ape,preventDefault:!0},{key:"ArrowUp",run:oO,shift:fO,preventDefault:!0},{mac:"Cmd-ArrowUp",run:SS,shift:CS},{mac:"Ctrl-ArrowUp",run:xS,shift:wS},{key:"ArrowDown",run:rO,shift:hO,preventDefault:!0},{mac:"Cmd-ArrowDown",run:kS,shift:AS},{mac:"Ctrl-ArrowDown",run:Bb,shift:_S},{key:"PageUp",run:xS,shift:wS},{key:"PageDown",run:Bb,shift:_S},{key:"Home",run:fpe,shift:kpe,preventDefault:!0},{key:"Mod-Home",run:SS,shift:CS},{key:"End",run:dpe,shift:Spe,preventDefault:!0},{key:"Mod-End",run:kS,shift:AS},{key:"Enter",run:$S,shift:$S},{key:"Mod-a",run:Mpe},{key:"Backspace",run:Lb,shift:Lb,preventDefault:!0},{key:"Delete",run:vO,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:yO,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:Epe,preventDefault:!0},{mac:"Mod-Backspace",run:Npe,preventDefault:!0},{mac:"Mod-Delete",run:Rpe,preventDefault:!0}].concat(Qpe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),e0e=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cpe,shift:wpe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:upe,shift:_pe},{key:"Alt-ArrowUp",run:zpe},{key:"Shift-Alt-ArrowUp",run:Wpe},{key:"Alt-ArrowDown",run:Hpe},{key:"Shift-Alt-ArrowDown",run:Upe},{key:"Mod-Alt-ArrowUp",run:Lpe},{key:"Mod-Alt-ArrowDown",run:Ppe},{key:"Escape",run:Dpe},{key:"Mod-Enter",run:Ype},{key:"Alt-l",mac:"Ctrl-l",run:Ope},{key:"Mod-i",run:Bpe,preventDefault:!0},{key:"Mod-[",run:Kpe},{key:"Mod-]",run:Xpe},{key:"Mod-Alt-\\",run:jpe},{key:"Shift-Mod-k",run:Gpe},{key:"Shift-Mod-\\",run:bpe},{key:"Mod-/",run:zhe},{key:"Alt-A",run:Whe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Zpe}].concat(Jpe);var TS={};class x0{constructor(e,n,o,r,i,s,a,l,c,u=0,d){this.p=e,this.stack=n,this.state=o,this.reducePos=r,this.pos=i,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,o=0){let r=e.parser.context;return new x0(e,[],n,o,o,0,[],0,r?new MS(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let o=e>>19,r=e&65535,{parser:i}=this.p,s=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=i.dynamicPrecedence(r);if(a&&(this.score+=a),o==0){this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(r,this.reducePos);return}let l=this.stack.length-(o-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let d=l?this.stack[l-1]:0,f=this.bufferBase+this.buffer.length-d;if(r<i.minRepeatTerm||e&131072){let h=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,c,h,f+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=i.getGoto(h,r,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(r,c)}storeNode(e,n,o,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==o)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=o;return}}}if(!i||this.pos==o)this.buffer.push(e,n,o,r);else{let s=this.buffer.length;if(s>0&&(this.buffer[s-4]!=0||this.buffer[s-1]<0)){let a=!1;for(let l=s;l>0&&this.buffer[l-2]>o;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>o;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=o,this.buffer[s+3]=r}}shift(e,n,o,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let i=e,{parser:s}=this.p;this.pos=r;let a=s.stateFlag(i,1);!a&&(r>o||n<=s.maxNode)&&(this.reducePos=r),this.pushState(i,a?o:Math.min(o,this.reducePos)),this.shiftContext(n,o),n<=s.maxNode&&this.buffer.push(n,o,r,4)}else this.pos=r,this.shiftContext(n,o),n<=this.p.parser.maxNode&&this.buffer.push(n,o,r,4)}apply(e,n,o,r){e&65536?this.reduce(e):this.shift(e,n,o,r)}useNode(e,n){let o=this.p.reused.length-1;(o<0||this.p.reused[o]!=e)&&(this.p.reused.push(e),o++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(o,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let o=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new x0(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,o,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let o=e<=this.p.parser.maxNode;o&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,o?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new t0e(this);;){let o=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(o==0)return!1;if((o&65536)==0)return!0;n.reduce(o)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let i=0,s;i<n.length;i+=2)(s=n[i+1])!=this.state&&this.p.parser.hasAction(s,e)&&r.push(n[i],s);if(this.stack.length<120)for(let i=0;r.length<8&&i<n.length;i+=2){let s=n[i+1];r.some((a,l)=>l&1&&a==s)||r.push(n[i],s)}n=r}let o=[];for(let r=0;r<n.length&&o.length<4;r+=2){let i=n[r+1];if(i==this.state)continue;let s=this.split();s.pushState(i,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[r],this.pos),s.reducePos=this.pos,s.score-=200,o.push(s)}return o}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let o=n>>19,r=n&65535,i=this.stack.length-o*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],o=(r,i)=>{if(!n.includes(r))return n.push(r),e.allActions(r,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-i;if(a>1){let l=s&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=o(s,i+1);if(a!=null)return a}})};return o(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new MS(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class MS{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class t0e{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,o=e>>19;o==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(o-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class w0{constructor(e,n,o){this.stack=e,this.pos=n,this.index=o,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new w0(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new w0(this.stack,this.pos,this.index)}}function Mh(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let o=0,r=0;o<t.length;){let i=0;for(;;){let s=t.charCodeAt(o++),a=!1;if(s==126){i=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),i+=l,a)break;i*=46}n?n[r++]=i:n=new e(i)}return n}class Qh{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const OS=new Qh;class n0e{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=OS,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let o=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<o.from;){if(!r)return null;let s=this.ranges[--r];i-=o.from-s.to,o=s}for(;n<0?i>o.to:i>=o.to;){if(r==this.ranges.length-1)return null;let s=this.ranges[++r];i+=s.from-o.to,o=s}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,o,r;if(n>=0&&n<this.chunk.length)o=this.pos+e,r=this.chunk.charCodeAt(n);else{let i=this.resolveOffset(e,1);if(i==null)return-1;if(o=i,o>=this.chunk2Pos&&o<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(o-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=o;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=o),o+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-o)),r=this.chunk2.charCodeAt(0)}}return o>=this.token.lookAhead&&(this.token.lookAhead=o+1),r}acceptToken(e,n=0){let o=n?this.resolveOffset(n,-1):this.pos;if(o==null||o<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=o}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=OS,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let o="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(o+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return o}}class Dc{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:o}=n.p;o0e(this.data,e,n,this.id,o.data,o.tokenPrecTable)}}Dc.prototype.contextual=Dc.prototype.fallback=Dc.prototype.extend=!1;Dc.prototype.fallback=Dc.prototype.extend=!1;function o0e(t,e,n,o,r,i){let s=0,a=1<<o,{dialect:l}=n.p.parser;e:for(;(a&t[s])!=0;){let c=t[s+1];for(let h=s+3;h<c;h+=2)if((t[h+1]&a)>0){let g=t[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||r0e(g,e.token.value,r,i))){e.acceptToken(g);break}}let u=e.next,d=0,f=t[s+2];if(e.next<0&&f>d&&t[c+f*3-3]==65535){s=t[c+f*3-1];continue e}for(;d<f;){let h=d+f>>1,g=c+h+(h<<1),b=t[g],m=t[g+1]||65536;if(u<b)f=h;else if(u>=m)d=h+1;else{s=t[g+2],e.advance();continue e}}break}}function BS(t,e,n){for(let o=e,r;(r=t[o])!=65535;o++)if(r==n)return o-e;return-1}function r0e(t,e,n,o){let r=BS(n,o,e);return r<0||BS(n,o,t)<r}const fr=typeof process<"u"&&TS&&/\bparse\b/.test(TS.LOG);let Dv=null;function LS(t,e,n){let o=t.cursor(xn.IncludeAnonymous);for(o.moveTo(e);;)if(!(n<0?o.childBefore(e):o.childAfter(e)))for(;;){if((n<0?o.to<e:o.from>e)&&!o.type.isError)return n<0?Math.max(0,Math.min(o.to-1,e-25)):Math.min(t.length,Math.max(o.from+1,e+25));if(n<0?o.prevSibling():o.nextSibling())break;if(!o.parent())return n<0?0:t.length}}class i0e{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?LS(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?LS(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let o=this.trees[n],r=this.index[n];if(r==o.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=o.children[r],s=this.start[n]+o.positions[r];if(s>e)return this.nextStart=s,null;if(i instanceof Mn){if(s==e){if(s<this.safeFrom)return null;let a=s+i.length;if(a<=this.safeTo){let l=i.prop(Dt.lookAhead);if(!l||a+l<this.fragment.to)return i}}this.index[n]++,s+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+i.length}}}class s0e{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(o=>new Qh)}getActions(e){let n=0,o=null,{parser:r}=e.p,{tokenizers:i}=r,s=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<i.length;c++){if((1<<c&s)==0)continue;let u=i[c],d=this.tokens[c];if(!(o&&!u.fallback)&&((u.contextual||d.start!=e.pos||d.mask!=s||d.context!=a)&&(this.updateCachedToken(d,u,e),d.mask=s,d.context=a),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!u.extend&&(o=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!o&&e.pos==this.stream.end&&(o=new Qh,o.value=e.p.parser.eofTerm,o.start=o.end=e.pos,n=this.addActions(e,o.value,o.end,n)),this.mainToken=o,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Qh,{pos:o,p:r}=e;return n.start=o,n.end=Math.min(o+1,r.stream.end),n.value=o==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,o){let r=this.stream.clipPos(o.pos);if(n.token(this.stream.reset(r,e),o),e.value>-1){let{parser:i}=o.p;for(let s=0;s<i.specialized.length;s++)if(i.specialized[s]==e.value){let a=i.specializers[s](this.stream.read(e.start,e.end),o);if(a>=0&&o.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,o,r){for(let i=0;i<r;i+=3)if(this.actions[i]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=o,r}addActions(e,n,o,r){let{state:i}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let c=s.stateSlot(i,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=ys(a,c+2);else{r==0&&a[c+1]==2&&(r=this.putAction(ys(a,c+2),n,o,r));break}a[c]==n&&(r=this.putAction(ys(a,c+1),n,o,r))}return r}}class a0e{constructor(e,n,o,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new n0e(n,r),this.tokens=new s0e(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[x0.start(this,e.top[0],i)],this.fragments=o.length&&this.stream.end-i>e.bufferLength*4?new i0e(o,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,o=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)o.push(a);else{if(this.advanceStack(a,o,e))continue;{r||(r=[],i=[]),r.push(a);let l=this.tokens.getMainToken(a);i.push(l.value,l.end)}}break}}if(!o.length){let s=r&&c0e(r);if(s)return fr&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw fr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let s=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,o);if(s)return fr&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(o.length>s)for(o.sort((a,l)=>l.score-a.score);o.length>s;)o.pop();o.some(a=>a.reducePos>n)&&this.recovering--}else if(o.length>1){e:for(let s=0;s<o.length-1;s++){let a=o[s];for(let l=s+1;l<o.length;l++){let c=o[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)o.splice(l--,1);else{o.splice(s--,1);continue e}}}o.length>12&&(o.sort((s,a)=>a.score-s.score),o.splice(12,o.length-12))}this.minStackPos=o[0].pos;for(let s=1;s<o.length;s++)o[s].pos<this.minStackPos&&(this.minStackPos=o[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,o){let r=e.pos,{parser:i}=this,s=fr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let d=this.fragments.nodeAt(r);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?i.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!c||(d.prop(Dt.contextHash)||0)==u))return e.useNode(d,f),fr&&console.log(s+this.stackID(e)+` (via reuse of ${i.getName(d.type.id)})`),!0;if(!(d instanceof Mn)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof Mn&&d.positions[0]==0)d=h;else break}}let a=i.stateSlot(e.state,4);if(a>0)return e.reduce(a),fr&&console.log(s+this.stackID(e)+` (via always-reduce ${i.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],d=l[c++],f=l[c++],h=c==l.length||!o,g=h?e:e.split(),b=this.tokens.mainToken;if(g.apply(u,d,b?b.start:g.pos,f),fr&&console.log(s+this.stackID(g)+` (via ${(u&65536)==0?"shift":`reduce of ${i.getName(u&65535)}`} for ${i.getName(d)} @ ${r}${g==e?"":", split"})`),h)return!0;g.pos>r?n.push(g):o.push(g)}return!1}advanceFully(e,n){let o=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>o)return PS(e,n),!0}}runRecovery(e,n,o){let r=null,i=!1;for(let s=0;s<e.length;s++){let a=e[s],l=n[s<<1],c=n[(s<<1)+1],u=fr?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),fr&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,o))))continue;let d=a.split(),f=u;for(let h=0;h<10&&d.forceReduce()&&(fr&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,o));h++)fr&&(f=this.stackID(d)+" -> ");for(let h of a.recoverByInsert(l))fr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,o);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),fr&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),PS(a,o)):(!r||r.score<d.score)&&(r=d)}return r}stackToTree(e){return e.close(),Mn.build({buffer:w0.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Dv||(Dv=new WeakMap)).get(e);return n||Dv.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function PS(t,e){for(let n=0;n<e.length;n++){let o=e[n];if(o.pos==t.pos&&o.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class l0e{constructor(e,n,o){this.source=e,this.flags=n,this.disabled=o}allows(e){return!this.disabled||this.disabled[e]==0}}class _0 extends NM{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let o=Object.keys(e.topRules).map(a=>e.topRules[a][1]),r=[];for(let a=0;a<n.length;a++)r.push([]);function i(a,l,c){r[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Dt[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)i(u,l,a[c++]);else{let d=a[c+-u];for(let f=-u;f>0;f--)i(a[c++],l,d);c++}}}this.nodeSet=new j2(n.map((a,l)=>ur.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:r[l],top:o.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=PM;let s=Mh(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(DS),this.states=Mh(e.states,Uint32Array),this.data=Mh(e.stateData),this.goto=Mh(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Dc(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,o){let r=new a0e(this,e,n,o);for(let i of this.wrappers)r=i(r,e,n,o);return r}getGoto(e,n,o=!1){let r=this.goto;if(n>=r[0])return-1;for(let i=r[n+1];;){let s=r[i++],a=s&1,l=r[i++];if(a&&o)return l;for(let c=i+(s>>1);i<c;i++)if(r[i]==e)return l;if(a)return-1}}hasAction(e,n){let o=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),s;;i+=3){if((s=o[i])==65535)if(o[i+1]==1)s=o[i=ys(o,i+2)];else{if(o[i+1]==2)return ys(o,i+2);break}if(s==n||s==0)return ys(o,i+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,o=>o==n?!0:null)}allActions(e,n){let o=this.stateSlot(e,4),r=o?n(o):void 0;for(let i=this.stateSlot(e,1);r==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ys(this.data,i+2);else break;r=n(ys(this.data,i+1))}return r}nextStates(e){let n=[];for(let o=this.stateSlot(e,1);;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=ys(this.data,o+2);else break;if((this.data[o+2]&1)==0){let r=this.data[o+1];n.some((i,s)=>s&1&&i==r)||n.push(this.data[o],r)}}return n}configure(e){let n=Object.assign(Object.create(_0.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let o=this.topRules[e.top];if(!o)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=o}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(o=>{let r=e.tokenizers.find(i=>i.from==o);return r?r.to:o})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((o,r)=>{let i=e.specializers.find(a=>a.from==o.external);if(!i)return o;let s=Object.assign(Object.assign({},o),{external:i.to});return n.specializers[r]=DS(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),o=n.map(()=>!1);if(e)for(let i of e.split(" ")){let s=n.indexOf(i);s>=0&&(o[s]=!0)}let r=null;for(let i=0;i<n.length;i++)if(!o[i])for(let s=this.dialects[n[i]],a;(a=this.data[s++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[a]=1;return new l0e(e,o,r)}static deserialize(e){return new _0(e)}}function ys(t,e){return t[e]|t[e+1]<<16}function c0e(t){let e=null;for(let n of t){let o=n.p.stoppedAt;(n.pos==n.p.stream.end||o!=null&&n.pos>o)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function DS(t){if(t.external){let e=t.extend?1:0;return(n,o)=>t.external(n,o)<<1|e}return t.get}const u0e={__proto__:null,chart:10,data:16,colorize:38,highlight:40,areafill:44,range:48,note:52,annotation:56,series:60,scene:64,step:66,transform:72},d0e=_0.deserialize({version:14,states:",`OYQPOOQOQPOOO_QPO'#C_OdQPO,58yO!dQPO1G.eOOQO'#Cf'#CfO!kQPO'#CmOOQO'#Cb'#CbOOQO'#DR'#DRO!pQPO7+$PO!wQPO'#CcO!|QPO'#CnO#RQPO'#CqO#WQPO'#CsO#]QPO'#CuO#bQPO'#CwO#gQPO'#CyO#lQPO'#DPO#qQPO'#C{OOQO7+$P7+$PO#yQPO,59XOOQO-E7P-E7POOQO<<Gk<<GkO$XQPO,58}O$dQPO,59YO$iQPO,59]O$nQPO,59_O$yQPO,59aO%UQPO,59cO%ZQPO,59eO%`QPO,59kO&YQPO,59gO&aQPO,59gOOQO'#Cj'#CjOOQO1G.s1G.sO&fQPO'#CmOOQO'#Ce'#CeOOQO'#DS'#DSO&kQPO1G.iOOQO1G.i1G.iO&vQPO1G.tO'RQPO1G.wOOQO'#DU'#DUO'WQPO1G.yOOQO1G.y1G.yO'cQPO1G.{OOQO1G.{1G.{O'nQPO1G.}O'yQPO1G/PO(UQPO1G/VOOQO'#DO'#DOOOQO'#DV'#DVO(aQPO1G/ROOQO1G/R1G/RO(aQPO1G/RO#yQPO,59XOOQO-E7Q-E7QOOQO7+$T7+$TO(hQPO7+$`OOQO7+$`7+$`O(sQPO7+$cOOQO-E7S-E7SOOQO7+$e7+$eOOQO7+$g7+$gO)OQPO7+$iOOQO7+$i7+$iO)ZQPO7+$kOOQO7+$k7+$kO)fQPO7+$qOOQO7+$q7+$qOOQO-E7T-E7TOOQO7+$m7+$mO)qQPO7+$mO)xQPO1G.sOOQO1G.k1G.kOOQO<<Gz<<GzO*WQPO<<G}OOQO<<G}<<G}OOQO<<HT<<HTOOQO<<HV<<HVOOQO<<H]<<H]OOQO<<HX<<HXO#yQPO'#DTO*cQPO,59TOOQOAN=iAN=iOOQO,59o,59oOOQO-E7R-E7R",stateData:"*w~O|OSPOS~OTQO~OSRO~O}SO~OSTOWYOZTOcZOdZOf[Oh]Oj^Ol_On`OpbOqbOtaO~O!PcO~PiO[dO~O!PfO~PiO}gO~OZhO~OZiO~O}jO~O}kO~OZlO~OZmO~OSnO~OZpO}oO~OSqOZqO_qO`qO~OSTOZTO!PwO~O}xO~OZyO~OSTOZTO!P|O~OSTOZTO!P!OO~O}!PO~O}!QO~O}!RO~OSTOWYOZTOcZOdZOf[Oh]Oj^Ol_On`OtaO~O!P!VO~P%eO}!WO~O[!XO~OSTOZTO!P!ZO~OSTOZTO!P!]O~O}!^O~OSTOZTO!P!`O~OSTOZTO!P!aO~OSTOZTO!P!cO~OSTOZTO!P!eO~OSTOZTO!P!gO~O!P!iO~P%eOSTOZTO!P!mO~OSTOZTO!P!oO~OSTOZTO!P!pO~OSTOZTO!P!qO~OSTOZTO!P!rO~O!P!sO~P%eO!O!tOSaiZai!Pai~OSTOZTO!P!vO~O!O!tOS]aZ]a!P]a~O_`PSP~",goto:"%`zPPP{PP!O!SP!^!bPP!|#PPP#Y!SPP!SP!SP!SP!SP!SP#xPP#|!SP$S$Y$`$f%URPOTWSXSVSXX!So!U!W!jTugvxUSXjkox{}!P!Q!R!U!W![!^!b!d!f!j!nTsgvR!l!XQrdQ!k!XR!w!tSVSXStgvlzjkx{}!P!Q!R![!^!b!d!f!nX!So!U!W!jTVSXX!To!U!W!jQXSReXQvgR!YvQ!u!kR!x!uQ{jQ}kQ![x^!_{}![!b!d!f!nQ!b!PQ!d!QQ!f!RR!n!^Q!UoS!h!U!jR!j!W",nodeNames:"⚠ LineComment Chart ChartDecl Identifier chart ChartMember DataBlock data DataEntry PropertyKey String Equals ValueList PropertyValue Percentage Number Property Colorize colorize highlight AreaFill areafill RangeAnnotation range NoteAnnotation note Annotation annotation Series series Scene scene step SceneMember Transform transform",maxTerm:47,skippedNodes:[0,1],repeatNodeCount:5,tokenData:"']~RfX^!gpq!grs#[st$u|}%^}!O%c!P!Q&_!Q![%i!_!`&|!c!}$u#R#S$u#T#o$u#o#p'R#q#r'W#y#z!g$f$g!g#BY#BZ!g$IS$I_!g$I|$JO!g$JT$JU!g$KV$KW!g&FU&FV!g~!lY|~X^!gpq!g#y#z!g$f$g!g#BY#BZ!g$IS$I_!g$I|$JO!g$JT$JU!g$KV$KW!g&FU&FV!g~#_VOr#[rs#ts#O#[#O#P#y#P;'S#[;'S;=`$o<%lO#[~#yOZ~~#|ZOr#[rs#[s#O#[#O#P#[#P#b#[#b#c#[#c#h#[#h#i#[#i;'S#[;'S;=`$o<%lO#[~$rP;=`<%l#[~$zUS~st$u}!O$u!Q![$u!c!}$u#R#S$u#T#o$u~%cO!O~~%fP!Q![%i~%nR`~uv%w!O!P%|!Q![%i~%|O_~~&PP!Q![&S~&XQ`~uv%w!Q![&S~&bP!P!Q&e~&jSP~OY&eZ;'S&e;'S;=`&v<%lO&e~&yP;=`<%l&e~'RO[~~'WO}~~']O!P~",tokenizers:[0],topRules:{Chart:[0,2]},specialized:[{term:4,get:t=>u0e[t]||-1}],tokenPrec:447}),SO=d0e.configure({props:[RM({chart:st.keyword,data:st.keyword,colorize:st.keyword,highlight:st.keyword,areafill:st.keyword,annotation:st.keyword,range:st.keyword,note:st.keyword,series:st.keyword,scene:st.keyword,step:st.keyword,transform:st.keyword,Identifier:st.variableName,String:st.string,Number:st.number,Percentage:st.number,Equals:st.operator,LineComment:st.lineComment,"{ }":st.brace})]}),f0e=m0.define({parser:SO,languageData:{commentTokens:{line:"//"}}}),h0e=Ohe(HM);function p0e(){return new yhe(f0e)}function Ev(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function i1e(t){const e=SO.parse(t);let n=0,o="";return zM(e,HM,(r,i,s)=>{r>n&&(o+=Ev(t.slice(n,r))),o+=`<span class="${s}">${Ev(t.slice(r,i))}</span>`,n=i}),n<t.length&&(o+=Ev(t.slice(n))),o}const m0e={class:"d-flex flex-column h-100"},g0e={key:0,class:"text-danger small mt-1"},v0e=se({__name:"ChartEditDsl",setup(t){const{dsl:e}=Tf(),{applyDsl:n}=Mc(),o=pt("editorEl"),r=Ie();let i,s=!1;function a(l){if(!l.docChanged||s)return;const c=l.state.doc.toString(),u=n(c);u.success?r.value=void 0:r.value=u.error}return hn(()=>{const l=Zt.create({doc:e.value,extensions:[LM.of([...e0e,...ipe]),Khe(),p0e(),h0e,_t.updateListener.of(a),_t.theme({"&":{height:"100%",backgroundColor:"var(--bc-tile-bg-elevated)"},".cm-scroller":{overflow:"auto"},".cm-content":{fontFamily:"var(--bs-font-monospace)"},".cm-gutters":{backgroundColor:"var(--bc-tile-bg-elevated)",color:"var(--bs-secondary-color)",borderRight:"1px solid var(--bs-border-color)"}})]});i=new _t({state:l,parent:o.value})}),Ve(e,l=>{!i||i.state.doc.toString()===l||(s=!0,i.dispatch({changes:{from:0,to:i.state.doc.length,insert:l}}),s=!1)}),Us(()=>{i==null||i.destroy(),i=void 0}),(l,c)=>(w(),N("div",m0e,[T("div",{ref_key:"editorEl",ref:o,class:"flex-grow-1 overflow-auto"},null,512),p(r)?(w(),N("div",g0e,ye(p(r)),1)):re("",!0)]))}}),b0e={key:1,class:"position-absolute",width:"0",height:"0","aria-hidden":"true"},y0e=se({__name:"PreviewChart",setup(t){const e=pt("containerRef");B2(e);const{containerRef:n}=fT();Ve(e,P=>{n.value=P},{immediate:!0});const{selectAnnotation:o}=dr();function r(P){var B;const $=P.target.closest("g[data-annotation-index]");if(!$)return;P.preventDefault(),(B=window.getSelection())==null||B.removeAllRanges();const A=$.getAttribute("data-annotation-id");if(A){o(A);return}const L=parseInt($.getAttribute("data-annotation-index")||"",10);isNaN(L)||o(L)}hn(()=>{var P;(P=e.value)==null||P.addEventListener("dblclick",r)}),Ns(()=>{var P;(P=e.value)==null||P.removeEventListener("dblclick",r)});const{cvdMode:i}=At(mT()),s=pt("cvdDefsRef");Ve([i,s],([P,R])=>{if(R){for(;R.firstChild;)R.removeChild(R.firstChild);P&&R.appendChild(Wte(P))}},{immediate:!0});const a=k(()=>{if(i.value)return{filter:`url(#${b$(i.value)})`}}),{layout:l}=pn(),{scenes:c,activeIndex:u,playing:d,setActive:f,nextScene:h,previousScene:g,startPlayback:b,stopPlayback:m}=_n(),v=Ie(null),y={buttons:m1,"progress-bar":yC,"dot-stepper":xC,"minimal-arrows":wC},x=k(()=>y[l.value.playerType]),_=k(()=>c.value.length+1),S=k(()=>u.value+2),E=k(()=>c.value.length>=1&&l.value.playerType!=="none");function M(P){f(P-2)}let C=null;function O(){const P=e.value;return P?P.querySelector(".bc-frame-footer"):null}return Ve(e,P=>{if(C&&(C.disconnect(),C=null),!P){v.value=null;return}v.value=O(),C=new MutationObserver(()=>{v.value=O()}),C.observe(P,{childList:!0,subtree:!0})},{immediate:!0}),Ns(()=>{C&&(C.disconnect(),C=null)}),(P,R)=>(w(),N(Re,null,[T("div",{ref_key:"containerRef",ref:e,class:"w-100 h-100",style:Pt(p(a))},null,4),p(v)&&p(E)?(w(),Q(Hb,{key:0,to:p(v)},[(w(),Q(Gt(p(x)),{total:p(_),current:p(S),playing:p(d),position:p(l).playerPosition,"onUpdate:current":M,onPrevious:p(g),onNext:p(h),onPlay:p(b),onPause:p(m)},null,40,["total","current","playing","position","onPrevious","onNext","onPlay","onPause"]))],8,["to"])):re("",!0),p(i)?(w(),N("svg",b0e,[T("defs",{ref_key:"cvdDefsRef",ref:s},null,512)])):re("",!0)],64))}}),x0e=se({__name:"ChartEditPanel",setup(t){const e=dr(),{viewMode:n,activeTab:o,canvasMode:r,showDimensions:i}=At(e),{selectTab:s,setLastNarrowEditTab:a}=e,{mode:l}=Zl(),{isNarrow:c}=qi(),{layout:u}=pn(),{cardClass:d,cardStyle:f}=O2(u,"chart-edit-panel__canvas__card"),{sections:h}=aT(),g=k({get:()=>!!o.value,set:R=>{R||s("")}});Ve(l,R=>{R==="drawer"&&o.value&&(a(o.value),s(""))},{immediate:!0});function b(R){a(R),s(R)}const m=k(()=>h.value.map(R=>({key:R.key,label:R.label,icon:R.icon}))),v=k(()=>({"chart-edit-panel--narrow":c.value})),y=k(()=>({[`chart-edit-panel__canvas--${r.value}`]:r.value!=="blueprint","chart-edit-panel__canvas--dsl":n.value!=="preview"})),x={type:"Chart Type",text:"Text",style:"Style",layout:"Layout",series:"Series",axes:"Axes",annotate:"Annotate",interactions:"Interactions"},_=k(()=>x[o.value]??"Panel"),S=pt("canvasRef"),E=pt("cardRef"),M=De(0),C=De(0);function O(){const R=E.value;R&&(M.value=R.offsetLeft,C.value=R.offsetTop)}Qi(S,O),Qi(E,O);const P=k(()=>({"--grid-offset-x":`${M.value}px`,"--grid-offset-y":`${C.value}px`}));return(R,$)=>{const A=y0e,L=v0e,B=rT,F=oT,z=M2,V=Nue,U=Bue,ie=kue,ue=_ue,fe=Ece,he=Tce,ce=wce,de=Wle,_e=Mae,j=T2,te=Xm,ne=uae;return w(),N("div",{class:$e(["chart-edit-panel",p(v)])},[T("div",{ref_key:"canvasRef",ref:S,class:$e(["chart-edit-panel__canvas",p(y)]),style:Pt(p(P))},[p(n)==="preview"?(w(),N("div",{key:0,ref_key:"cardRef",ref:E,class:$e(["chart-edit-panel__canvas__card",p(d)]),style:Pt(p(f))},[H(A)],6)):(w(),Q(L,{key:1,class:"chart-edit-panel__canvas__dsl"})),p(n)==="preview"&&p(i)?(w(),Q(B,{key:2,"card-ref":p(E),"canvas-ref":p(S),layout:p(u)},null,8,["card-ref","canvas-ref","layout"])):re("",!0),p(n)==="preview"?(w(),Q(F,{key:3})):re("",!0)],6),H(te,{"drawer-open":p(g),"onUpdate:drawerOpen":$[0]||($[0]=me=>Ke(g)?g.value=me:null),title:p(_),"container-ref":p(S),onClose:$[1]||($[1]=me=>p(s)(""))},hi({default:J(()=>[p(o)==="type"?(w(),Q(U,{key:0})):p(o)==="text"?(w(),Q(ie,{key:1})):p(o)==="style"?(w(),Q(ue,{key:2})):p(o)==="series"?(w(),Q(fe,{key:3})):p(o)==="axes"?(w(),Q(he,{key:4})):p(o)==="layout"?(w(),Q(ce,{key:5})):p(o)==="annotate"?(w(),Q(de,{key:6})):p(o)==="interactions"?(w(),Q(_e,{key:7})):re("",!0)]),_:2},[p(l)==="drawer"?{name:"tabs",fn:J(()=>[H(z,{tabs:p(m),"model-value":p(o),sticky:"","onUpdate:modelValue":b},null,8,["tabs","model-value"])]),key:"0"}:void 0,p(l)!=="drawer"?{name:"header",fn:J(()=>[H(V)]),key:"1"}:void 0,p(l)!=="drawer"?{name:"footer",fn:J(()=>[H(j)]),key:"2"}:void 0]),1032,["drawer-open","title","container-ref"]),p(c)?re("",!0):(w(),Q(ne,{key:0}))],2)}}}),w0e=Be(x0e,[["__scopeId","data-v-70b3f6b1"]]),_0e={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function S0e(t,e){return w(),N("svg",_0e,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M104 32H64a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176H64V48h40Zm88-176h-40a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h40a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176h-40V48h40Z"},null,-1)])])}const k0e=Te({name:"ph-columns",render:S0e}),C0e={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function A0e(t,e){return w(),N("svg",C0e,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"m245.66 74.34l-32-32a8 8 0 0 0-11.32 11.32L220.69 72H208c-49.33 0-61.05 28.12-71.38 52.92c-9.38 22.51-16.92 40.59-49.48 42.84a40 40 0 1 0 .1 16c43.26-2.65 54.34-29.15 64.14-52.69C161.41 107 169.33 88 208 88h12.69l-18.35 18.34a8 8 0 0 0 11.32 11.32l32-32a8 8 0 0 0 0-11.32M48 200a24 24 0 1 1 24-24a24 24 0 0 1-24 24"},null,-1)])])}const $0e=Te({name:"ph-flow-arrow",render:A0e}),T0e={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function M0e(t,e){return w(),N("svg",T0e,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M176 232a8 8 0 0 1-8 8H88a8 8 0 0 1 0-16h80a8 8 0 0 1 8 8m40-128a87.55 87.55 0 0 1-33.64 69.21A16.24 16.24 0 0 0 176 186v6a16 16 0 0 1-16 16H96a16 16 0 0 1-16-16v-6a16 16 0 0 0-6.23-12.66A87.59 87.59 0 0 1 40 104.49C39.74 56.83 78.26 17.14 125.88 16A88 88 0 0 1 216 104m-16 0a72 72 0 0 0-73.74-72c-39 .92-70.47 33.39-70.26 72.39a71.65 71.65 0 0 0 27.64 56.3A32 32 0 0 1 96 186v6h64v-6a32.15 32.15 0 0 1 12.47-25.35A71.65 71.65 0 0 0 200 104m-16.11-9.34a57.6 57.6 0 0 0-46.56-46.55a8 8 0 0 0-2.66 15.78c16.57 2.79 30.63 16.85 33.44 33.45A8 8 0 0 0 176 104a9 9 0 0 0 1.35-.11a8 8 0 0 0 6.54-9.23"},null,-1)])])}const O0e=Te({name:"ph-lightbulb",render:M0e});function kO(){return{sections:[{key:"column",label:"Columns",icon:k0e},{key:"transforms",label:"Transforms",icon:$0e},{key:"parsing",label:"Parsing",icon:tT},{key:"reco",label:"Recommendations",icon:O0e}]}}const B0e=se({__name:"DataSideIconRail",props:{disabledTabs:{default:()=>[]}},setup(t){const e=t,n=dr(),{dataPanelTab:o}=At(n),{openDataPanel:r}=n,{mode:i,toggleMode:s}=Zl(),{sections:a}=kO(),l=k(()=>a.filter(d=>!e.disabledTabs.includes(d.key)).map(d=>({value:d.key,icon:d.icon,tooltip:d.tooltip??d.label})));function c(d){r(d)}function u(){i.value==="closed"&&r(o.value||"column"),s()}return(d,f)=>{const h=A2;return w(),Q(h,{"active-tab":p(o),items:p(l),onSelect:c,onToggleMode:u},null,8,["active-tab","items"])}}}),L0e={class:"reco-card__preview"},P0e={class:"reco-card__body"},D0e={class:"reco-card__body__title"},E0e={class:"reco-card__body__reason"},I0e=se({__name:"DataRecommendationCard",props:{chartType:{},label:{},fitness:{},reason:{}},emits:["select"],setup(t){const e={[Le.BarVertical]:Te(gT),[Le.BarHorizontal]:Te(vT),[Le.BarMulti]:Te(bT),[Le.Line]:Te(yT),[Le.LineMulti]:Te(xT),[Le.Donut]:Te(wT),[Le.Pie]:Te(_T)},n=t,o=k(()=>e[n.chartType]),r=k(()=>n.fitness==="best"?"reco-card__body__title__badge--best":n.fitness==="good"?"reco-card__body__title__badge--good":"reco-card__body__title__badge--alt"),i=k(()=>n.fitness==="best"?"Best match":n.fitness==="good"?"Good fit":"Alternative");return(s,a)=>(w(),N("button",{class:$e(["reco-card",{"reco-card--best":t.fitness==="best"}]),onClick:a[0]||(a[0]=l=>s.$emit("select",t.chartType))},[T("div",L0e,[p(o)?(w(),Q(Gt(p(o)),{key:0,class:"reco-card__preview__thumb-svg"})):re("",!0)]),T("div",P0e,[T("div",D0e,[Ue(ye(t.label)+" ",1),T("span",{class:$e(["reco-card__body__title__badge",p(r)])},ye(p(i)),3)]),T("div",E0e,ye(t.reason),1)])],2))}}),N0e=Be(I0e,[["__scopeId","data-v-0e22d5d1"]]),R0e={[Le.BarVertical]:"Vertical Bar Chart",[Le.BarHorizontal]:"Horizontal Bar Chart",[Le.BarMulti]:"Grouped Bar Chart",[Le.Line]:"Line Chart",[Le.LineMulti]:"Multi-Line Chart",[Le.Pie]:"Pie Chart",[Le.Donut]:"Donut Chart"};function F0e(){const{displayRows:t,displayColumnTypes:e}=Zo(),n=k(()=>{const r=e.value,i=r.filter(c=>c==="string").length,s=r.filter(c=>c==="number").length,a=r.filter(c=>c==="date").length,l=[];return i>0&&l.push(`${i} categorical`),a>0&&l.push(`${a} date`),s>0&&l.push(`${s} numeric`),l.length>0?`${l.join(" + ")} column${r.length!==1?"s":""}`:"No data"});return{recommendations:k(()=>{const r=e.value;if(r.length===0)return[];const i=r.filter(d=>d==="string").length,s=r.filter(d=>d==="number").length,a=r.filter(d=>d==="date").length,l=t.value.length,c=[];function u(d,f,h){c.push({chartType:d,label:R0e[d]??d,fitness:f,reason:h})}return a===1&&s>=1?s===1?(u(Le.Line,"best","1 date + 1 numeric column — ideal for trend"),u(Le.BarVertical,"alternative","Can also show as bars")):(u(Le.LineMulti,"best",`1 date + ${s} numeric columns — compare trends`),u(Le.BarMulti,"alternative","Can also show as grouped bars")):i===1&&s===1?(u(Le.BarVertical,"best","1 categorical + 1 numeric — classic bar chart"),u(Le.BarHorizontal,"good","Horizontal bars work well for long labels"),l<=8&&(u(Le.Donut,"good",`${l} items — suitable for part-of-whole`),u(Le.Pie,"alternative","Pie chart for part-of-whole"))):i===1&&s>1?(u(Le.BarMulti,"best",`1 categorical + ${s} numeric columns — compare groups`),u(Le.LineMulti,"good","Can also show as multi-line chart")):s>=1&&(i>=1||a>=1)&&u(Le.BarVertical,"good","Default bar chart recommendation"),c}),dataSummary:n}}const V0e={class:"data-recommendations"},z0e={class:"data-recommendations__summary"},H0e={key:0,class:"text-muted text-center py-3"},W0e=se({__name:"DataRecommendations",setup(t){const{recommendations:e,dataSummary:n}=F0e(),o=pn();function r(i){o.chartType.value=i}return(i,s)=>{const a=N0e;return w(),N("div",V0e,[T("p",z0e," Based on your data: "+ye(p(n)),1),p(e).length===0?(w(),N("div",H0e," Load data to see recommendations ")):re("",!0),(w(!0),N(Re,null,mt(p(e),l=>(w(),Q(a,{key:l.chartType,"chart-type":l.chartType,label:l.label,fitness:l.fitness,reason:l.reason,onSelect:r},null,8,["chart-type","label","fitness","reason"]))),128))])}}}),U0e=Be(W0e,[["__scopeId","data-v-47bbaf64"]]),ES={firstRowIsHeader:!0,delimiter:"auto",decimalSeparator:".",treatEmptyAsNull:!0,trimWhitespace:!0},G0e=Po("parseOptions",()=>{const t=ar({...ES});function e(o,r){t[o]=r}function n(){Object.assign(t,{...ES})}return{...E0(t),setOption:e,reset:n}});function CO(){const t=G0e(),{firstRowIsHeader:e,delimiter:n,decimalSeparator:o,treatEmptyAsNull:r,trimWhitespace:i}=At(t);return{firstRowIsHeader:e,delimiter:n,decimalSeparator:o,treatEmptyAsNull:r,trimWhitespace:i,setOption:t.setOption,reset:t.reset}}const q0e={class:"data-parse-settings"},Y0e={class:"data-parse-settings__field"},j0e={class:"data-parse-settings__field"},X0e=se({__name:"DataParseSettings",setup(t){const e=CO(),{firstRowIsHeader:n,delimiter:o,decimalSeparator:r,treatEmptyAsNull:i,trimWhitespace:s}=At(e),{setOption:a}=e,{sourceFormat:l}=Zo(),c=k(()=>l.value!=="delimited"),u=k({get:()=>n.value,set:v=>a("firstRowIsHeader",v)}),d=k({get:()=>o.value,set:v=>a("delimiter",v)}),f=k({get:()=>r.value,set:v=>a("decimalSeparator",v)}),h=k({get:()=>i.value,set:v=>a("treatEmptyAsNull",v)}),g=k({get:()=>s.value,set:v=>a("trimWhitespace",v)}),b=[{value:"auto",label:"Auto-detect"},{value:",",label:"Comma (,)"},{value:" ",label:"Tab"},{value:";",label:"Semicolon (;)"},{value:"|",label:"Pipe (|)"}],m=[{value:".",label:"Period (.)"},{value:",",label:"Comma (,)"}];return(v,y)=>(w(),N("div",q0e,[H(p(Os),{modelValue:p(u),"onUpdate:modelValue":y[0]||(y[0]=x=>Ke(u)?u.value=x:null),switch:""},{default:J(()=>[...y[5]||(y[5]=[Ue(" First row is header ",-1)])]),_:1},8,["modelValue"]),T("div",Y0e,[y[6]||(y[6]=T("div",{class:"data-parse-settings__field__label"}," Delimiter ",-1)),H(p(En),{modelValue:p(d),"onUpdate:modelValue":y[1]||(y[1]=x=>Ke(d)?d.value=x:null),label:"",options:b,disabled:p(c),block:""},null,8,["modelValue","disabled"])]),T("div",j0e,[y[7]||(y[7]=T("div",{class:"data-parse-settings__field__label"}," Decimal Separator ",-1)),H(p(En),{modelValue:p(f),"onUpdate:modelValue":y[2]||(y[2]=x=>Ke(f)?f.value=x:null),label:"",options:m,block:""},null,8,["modelValue"])]),H(p(Os),{modelValue:p(h),"onUpdate:modelValue":y[3]||(y[3]=x=>Ke(h)?h.value=x:null),switch:""},{default:J(()=>[...y[8]||(y[8]=[Ue(" Treat empty as null ",-1)])]),_:1},8,["modelValue"]),H(p(Os),{modelValue:p(g),"onUpdate:modelValue":y[4]||(y[4]=x=>Ke(g)?g.value=x:null),switch:""},{default:J(()=>[...y[9]||(y[9]=[Ue(" Trim whitespace ",-1)])]),_:1},8,["modelValue"])]))}}),K0e=Be(X0e,[["__scopeId","data-v-872473d2"]]),Z0e={class:"output-block"},Q0e={class:"output-block__meta"},J0e=se({__name:"DataTransformOutputBlock",props:{columns:{},rows:{}},setup(t){return(e,n)=>(w(),N("div",Z0e,[n[0]||(n[0]=T("span",{class:"output-block__icon"},[T("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"14",height:"14"},[T("path",{d:"M20 6L9 17l-5-5"})])],-1)),n[1]||(n[1]=T("span",null,"Output",-1)),T("span",Q0e,ye(t.columns)+" cols · "+ye(t.rows)+" rows",1)]))}}),eme=Be(J0e,[["__scopeId","data-v-b1080d62"]]),tme={class:"add-wrap"},nme={key:0,class:"add-wrap__dropdown"},ome=["disabled","onClick"],rme={class:"add-wrap__dropdown__item__text"},ime={class:"add-wrap__dropdown__item__text__name"},sme={class:"add-wrap__dropdown__item__text__desc"},ame=se({__name:"DataTransformAddButton",emits:["add"],setup(t,{emit:e}){const n=e,o=De(!1),r=[{value:Qe.Sort,label:"Sort",desc:"Reorder rows by column values",disabled:!1},{value:Qe.Filter,label:"Filter",desc:"Keep or exclude rows by condition",disabled:!1},{value:Qe.HideColumns,label:"Hide Columns",desc:"Remove columns from output",disabled:!1},{value:Qe.Transpose,label:"Transpose",desc:"Swap rows and columns",disabled:!1},{value:Qe.Parse,label:"Parse",desc:"Transform column values",disabled:!1},{value:Qe.Rename,label:"Rename Column",desc:"Change a column name",disabled:!1},{value:Qe.GroupBy,label:"Group By",desc:"Aggregate rows by column values",disabled:!1},{value:Qe.Computed,label:"Computed Column",desc:"Derive new column (coming soon)",disabled:!0}];function i(l){return{[Qe.Sort]:"add-wrap__dropdown__item__icon--sort",[Qe.Filter]:"add-wrap__dropdown__item__icon--filter",[Qe.HideColumns]:"add-wrap__dropdown__item__icon--hide-columns",[Qe.Transpose]:"add-wrap__dropdown__item__icon--transpose",[Qe.Parse]:"add-wrap__dropdown__item__icon--parse",[Qe.Rename]:"add-wrap__dropdown__item__icon--rename",[Qe.GroupBy]:"add-wrap__dropdown__item__icon--group",[Qe.Computed]:"add-wrap__dropdown__item__icon--computed"}[l]??""}function s(l){return{[Qe.Sort]:"S",[Qe.Filter]:"F",[Qe.HideColumns]:"H",[Qe.Transpose]:"T",[Qe.Parse]:"P",[Qe.Rename]:"R",[Qe.GroupBy]:"G",[Qe.Computed]:"C"}[l]??"?"}function a(l){n("add",l),o.value=!1}return(l,c)=>(w(),N("div",tme,[H(p(yl),{label:"Add",onClick:c[0]||(c[0]=u=>o.value=!p(o))}),p(o)?(w(),N("div",nme,[(w(),N(Re,null,mt(r,u=>T("button",{key:u.value,class:"add-wrap__dropdown__item",disabled:u.disabled,onClick:d=>a(u.value)},[T("span",{class:$e(["add-wrap__dropdown__item__icon",i(u.value)])},ye(s(u.value)),3),T("div",rme,[T("div",ime,ye(u.label),1),T("div",sme,ye(u.desc),1)])],8,ome)),64))])):re("",!0)]))}}),lme=Be(ame,[["__scopeId","data-v-ac055819"]]),cme={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function ume(t,e){return w(),N("svg",cme,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M128 128a8 8 0 0 1-8 8H48a8 8 0 0 1 0-16h72a8 8 0 0 1 8 8M48 72h136a8 8 0 0 0 0-16H48a8 8 0 0 0 0 16m56 112H48a8 8 0 0 0 0 16h56a8 8 0 0 0 0-16m125.66-21.66a8 8 0 0 0-11.32 0L192 188.69V112a8 8 0 0 0-16 0v76.69l-26.34-26.35a8 8 0 0 0-11.32 11.32l40 40a8 8 0 0 0 11.32 0l40-40a8 8 0 0 0 0-11.32"},null,-1)])])}const dme=Te({name:"ph-sort-ascending",render:ume}),fme={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function hme(t,e){return w(),N("svg",fme,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M230.6 49.53A15.81 15.81 0 0 0 216 40H40a16 16 0 0 0-11.81 26.76l.08.09L96 139.17V216a16 16 0 0 0 24.87 13.32l32-21.34a16 16 0 0 0 7.13-13.32v-55.49l67.74-72.32l.08-.09a15.8 15.8 0 0 0 2.78-17.23m-84.42 81.05A8 8 0 0 0 144 136v58.66L112 216v-80a8 8 0 0 0-2.16-5.47L40 56h176Z"},null,-1)])])}const pme=Te({name:"ph-funnel",render:hme}),mme={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function gme(t,e){return w(),N("svg",mme,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 48v48a8 8 0 0 1-8 8h-48a8 8 0 0 1 0-16h28.69l-14.63-14.63a79.56 79.56 0 0 0-56.13-23.43h-.45a79.52 79.52 0 0 0-55.89 22.77a8 8 0 0 1-11.18-11.44a96 96 0 0 1 135 .79L208 76.69V48a8 8 0 0 1 16 0m-37.59 135.29a80 80 0 0 1-112.47-.66L59.31 168H88a8 8 0 0 0 0-16H40a8 8 0 0 0-8 8v48a8 8 0 0 0 16 0v-28.69l14.63 14.63A95.43 95.43 0 0 0 130 222.06h.53a95.36 95.36 0 0 0 67.07-27.33a8 8 0 0 0-11.18-11.44Z"},null,-1)])])}const AO=Te({name:"ph-arrows-clockwise",render:gme}),vme={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function bme(t,e){return w(),N("svg",vme,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M226.76 69a8 8 0 0 0-12.84-2.88l-40.3 37.19l-17.23-3.7l-3.7-17.23l37.19-40.3A8 8 0 0 0 187 29.24A72 72 0 0 0 88 96a72.3 72.3 0 0 0 6 28.94L33.79 177c-.15.12-.29.26-.43.39a32 32 0 0 0 45.26 45.26c.13-.13.27-.28.39-.42L131.06 162A72 72 0 0 0 232 96a71.6 71.6 0 0 0-5.24-27M160 152a56.14 56.14 0 0 1-27.07-7a8 8 0 0 0-9.92 1.77l-55.9 64.74a16 16 0 0 1-22.62-22.62L109.18 133a8 8 0 0 0 1.77-9.93a56 56 0 0 1 58.36-82.31l-31.2 33.81a8 8 0 0 0-1.94 7.1l5.66 26.33a8 8 0 0 0 6.14 6.14l26.35 5.66a8 8 0 0 0 7.1-1.94l33.81-31.2A56.06 56.06 0 0 1 160 152"},null,-1)])])}const yme=Te({name:"ph-wrench",render:bme}),xme={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function wme(t,e){return w(),N("svg",xme,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M230.91 172a8 8 0 0 1-2.91 10.91l-96 56a8 8 0 0 1-8.06 0l-96-56A8 8 0 0 1 36 169.09l92 53.65l92-53.65a8 8 0 0 1 10.91 2.91M220 121.09l-92 53.65l-92-53.65a8 8 0 0 0-8 13.82l96 56a8 8 0 0 0 8.06 0l96-56a8 8 0 1 0-8.06-13.82M24 80a8 8 0 0 1 4-6.91l96-56a8 8 0 0 1 8.06 0l96 56a8 8 0 0 1 0 13.82l-96 56a8 8 0 0 1-8.06 0l-96-56A8 8 0 0 1 24 80m23.88 0L128 126.74L208.12 80L128 33.26Z"},null,-1)])])}const _me=Te({name:"ph-stack",render:wme}),Sme={[Qe.Sort]:{iconClass:"step-card__body__icon--sort",iconComponent:dme,fallback:"S",label:"Sort"},[Qe.Filter]:{iconClass:"step-card__body__icon--filter",iconComponent:pme,fallback:"F",label:"Filter"},[Qe.HideColumns]:{iconClass:"step-card__body__icon--hide-columns",iconComponent:Jd,fallback:"H",label:"Hide Columns"},[Qe.Transpose]:{iconClass:"step-card__body__icon--transpose",iconComponent:AO,fallback:"T",label:"Transpose"},[Qe.Parse]:{iconClass:"step-card__body__icon--parse",iconComponent:yme,fallback:"P",label:"Parse"},[Qe.Rename]:{iconClass:"step-card__body__icon--rename",iconComponent:C2,fallback:"R",label:"Rename"},[Qe.GroupBy]:{iconClass:"step-card__body__icon--group",iconComponent:_me,fallback:"G",label:"Group By"},[Qe.Computed]:{iconClass:"step-card__body__icon--computed",fallback:"C",label:"Computed"}},kme={class:"step-card__number"},Cme={class:"step-card__body"},Ame={key:1},$me={class:"step-card__body__text"},Tme={class:"step-card__body__text__name"},Mme={class:"step-card__actions"},Ome=se({__name:"DataTransformStepCard",props:{step:{},index:{},active:{type:Boolean},error:{}},emits:["select","delete"],setup(t){const e=t,n=k(()=>Sme[e.step.type]),o=k(()=>n.value.iconClass),r=k(()=>n.value.iconComponent??null),i=k(()=>n.value.fallback),s=k(()=>n.value.label),a=k(()=>{const{step:l}=e;if(l.type===Qe.Sort&&l.config.column)return`${l.config.column} ${l.config.direction??Jt.Ascending}`;if(l.type===Qe.Filter&&l.config.column)return`${l.config.column} ${l.config.condition??bo.Equals} ${l.config.value??""}`;if(l.type===Qe.HideColumns){const c=l.config.columns?l.config.columns.split(",").map(u=>u.trim()).filter(Boolean):[];return c.length>0?`Hiding ${c.join(", ")}`:"Configure..."}if(l.type===Qe.Transpose)return"Swap rows ↔ columns";if(l.type===Qe.Parse&&l.config.column&&l.config.operation)return`${l.config.column} → ${l.config.operation}`;if(l.type===Qe.Rename&&l.config.column&&l.config.newName)return`${l.config.column} → ${l.config.newName}`;if(l.type===Qe.GroupBy&&l.config.groupColumns&&l.config.aggregates){const c=l.config.groupColumns.split(",").map(d=>d.trim()).filter(Boolean).join(", "),u=l.config.aggregates.split(",").map(d=>{const f=d.lastIndexOf(":");return f<0?d.trim():`${d.slice(f+1).trim()}(${d.slice(0,f).trim()})`}).join(", ");return`Group by ${c} — ${u}`}return"Configure..."});return(l,c)=>(w(),N("div",{class:$e(["step-card",{"step-card--active":t.active,"step-card--error":t.error}]),onClick:c[2]||(c[2]=u=>l.$emit("select"))},[T("div",kme,ye(t.index+1),1),T("div",Cme,[T("span",{class:$e(["step-card__body__icon",p(o)])},[p(r)?(w(),Q(Gt(p(r)),{key:0})):(w(),N("span",Ame,ye(p(i)),1))],2),T("div",$me,[T("div",Tme,ye(p(s)),1),T("div",{class:$e(["step-card__body__text__desc",{"step-card__body__text__desc--error":t.error}])},ye(t.error||p(a)),3)])]),T("div",Mme,[T("button",{class:"step-card__actions__btn","aria-label":"Remove step",onClick:c[0]||(c[0]=gn(u=>l.$emit("delete"),["stop"]))},[...c[3]||(c[3]=[T("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[T("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})],-1)])])]),t.active&&l.$slots.default?(w(),N("div",{key:0,class:"step-card__config",onClick:c[1]||(c[1]=gn(()=>{},["stop"]))},[Ce(l.$slots,"default",{},void 0,!0)])):re("",!0)],2))}}),Bme=Be(Ome,[["__scopeId","data-v-4ba65e45"]]),Lme={class:"group-by-step"},Pme={class:"group-by-step__field"},Dme={class:"group-by-step__field__columns"},Eme=["checked","onChange"],Ime={key:0,class:"group-by-step__field"},Nme={class:"group-by-step__field__agg-list"},Rme={class:"group-by-step__field__agg-list__row"},Fme={class:"group-by-step__field__agg-list__row__check"},Vme=["checked"],zme={class:"group-by-step__field__agg-list__row__check"},Hme=["checked","onChange"],Wme=["value","onChange"],Ume=se({__name:"DataTransformStepGroupBy",props:{step:{},columns:{},columnTypes:{}},setup(t){const e=t,{updateStep:n}=Or(),o=k(()=>e.step.config.groupColumns?e.step.config.groupColumns.split(",").map(b=>b.trim()).filter(Boolean):[]),r=k(()=>e.columns.filter(b=>!o.value.includes(b))),i=k(()=>e.step.config.aggregates?e.step.config.aggregates.split(",").map(b=>b.trim()).filter(Boolean).map(b=>{const m=b.lastIndexOf(":");return m<0?null:{col:b.slice(0,m),fn:b.slice(m+1)}}).filter(b=>b!==null):[]),s=k(()=>i.value.some(b=>b.fn==="count"));function a(b){return i.value.some(m=>m.col===b&&m.fn!=="count")}function l(b){const m=i.value.find(v=>v.col===b&&v.fn!=="count");return(m==null?void 0:m.fn)??"sum"}function c(b){return b.map(m=>`${m.col}:${m.fn}`).join(",")}function u(b,m){const v={...e.step.config};b.length>0?v.groupColumns=b.join(","):delete v.groupColumns,m.length>0?v.aggregates=c(m):delete v.aggregates,n(e.step.id,v)}function d(b){const m=[...o.value],v=m.indexOf(b);v>=0?m.splice(v,1):m.push(b);const y=i.value.filter(x=>x.fn==="count"||!m.includes(x.col));u(m,y)}function f(){const b=[...i.value],m=b.findIndex(v=>v.fn==="count");m>=0?b.splice(m,1):b.push({col:"rows",fn:"count"}),u(o.value,b)}function h(b){const m=[...i.value],v=m.findIndex(y=>y.col===b&&y.fn!=="count");v>=0?m.splice(v,1):m.push({col:b,fn:"sum"}),u(o.value,m)}function g(b,m){const v=i.value.map(y=>y.col===b&&y.fn!=="count"?{...y,fn:m}:y);u(o.value,v)}return(b,m)=>(w(),N("div",Lme,[T("div",Pme,[m[0]||(m[0]=T("label",{class:"group-by-step__field__label"},"Group by",-1)),T("div",Dme,[(w(!0),N(Re,null,mt(t.columns,v=>(w(),N("label",{key:v,class:"group-by-step__field__columns__column"},[T("input",{type:"checkbox",checked:p(o).includes(v),onChange:y=>d(v)},null,40,Eme),Ue(" "+ye(v),1)]))),128))])]),p(r).length>0||p(o).length>0?(w(),N("div",Ime,[m[4]||(m[4]=T("label",{class:"group-by-step__field__label"},"Aggregates",-1)),T("div",Nme,[T("div",Rme,[T("label",Fme,[T("input",{type:"checkbox",checked:p(s),onChange:f},null,40,Vme),m[1]||(m[1]=Ue(" Row count ",-1))]),m[2]||(m[2]=T("span",{class:"group-by-step__field__agg-list__row__fn-label"},"count",-1))]),(w(!0),N(Re,null,mt(p(r),v=>(w(),N("div",{key:v,class:"group-by-step__field__agg-list__row"},[T("label",zme,[T("input",{type:"checkbox",checked:a(v),onChange:y=>h(v)},null,40,Hme),Ue(" "+ye(v),1)]),a(v)?(w(),N("select",{key:0,class:"group-by-step__field__agg-list__row__fn",value:l(v),onChange:y=>g(v,y.target.value)},[...m[3]||(m[3]=[T("option",{value:"sum"}," Sum ",-1),T("option",{value:"avg"}," Average ",-1),T("option",{value:"min"}," Min ",-1),T("option",{value:"max"}," Max ",-1)])],40,Wme)):re("",!0)]))),128))])])):re("",!0)]))}}),Gme=Be(Ume,[["__scopeId","data-v-c53de076"]]),qme={class:"data-transform-step-rename"},Yme=se({__name:"DataTransformStepRename",props:{step:{},columns:{}},setup(t){const e=t,{updateStep:n}=Or(),o=k(()=>e.columns.map(i=>({value:i,label:i})));function r(i,s){n(e.step.id,{...e.step.config,[i]:s})}return(i,s)=>(w(),N("div",qme,[H(p(En),{"model-value":t.step.config.column??"",label:"Column",placeholder:"Select a column",options:p(o),block:"","onUpdate:modelValue":s[0]||(s[0]=a=>r("column",a))},null,8,["model-value","options"]),H(p(sm),{id:"rename-new-name","model-value":t.step.config.newName??"",label:"New Name",placeholder:"Enter new column name","onUpdate:modelValue":s[1]||(s[1]=a=>r("newName",a))},null,8,["model-value"])]))}}),jme=Be(Yme,[["__scopeId","data-v-5f4cb34e"]]),Xme={class:"data-transform-step-parse"},Kme=se({__name:"DataTransformStepParse",props:{step:{},columns:{}},setup(t){var b;const e=t,{updateStep:n}=Or(),o=k(()=>e.columns.map(m=>({value:m,label:m}))),r=[{value:"type",label:"Type Conversions"},{value:"string",label:"String"},{value:"numeric",label:"Numeric"},{value:"date",label:"Date/Time"}],i=k(()=>Gh.find(m=>m.id===e.step.config.operation)),s=De(((b=i.value)==null?void 0:b.category)??"type");Ve(()=>e.step.config.operation,m=>{if(m){const v=Gh.find(y=>y.id===m);v&&(s.value=v.category)}});const a=k(()=>Gh.filter(m=>m.category===s.value).map(m=>({value:m.id,label:m.label,description:m.description}))),l=k(()=>{var m;return((m=i.value)==null?void 0:m.params)??[]}),c={decimals:"Decimal places",pattern:"Regex pattern",replacement:"Replacement",start:"Start index",end:"End index",length:"Length",char:"Pad character",separator:"Separator",limit:"Limit",min:"Minimum",max:"Maximum",size:"Bucket size",key:"JSON key",amount:"Amount",unit:"Unit",period:"Period",reference:"Reference date"},u={decimals:"0",pattern:"\\d+",replacement:"",start:"0",end:"",length:"10",char:" ",separator:",",limit:"",min:"0",max:"100",size:"10",key:"",amount:"1",unit:"days",period:"month",reference:"YYYY-MM-DD"};function d(m){return c[m]??m}function f(m){return u[m]??""}function h(m){s.value=m;const v={...e.step.config};delete v.operation,n(e.step.id,v)}function g(m,v){n(e.step.id,{...e.step.config,[m]:v})}return(m,v)=>(w(),N("div",Xme,[H(p(En),{"model-value":t.step.config.column??"",label:"Column",placeholder:"Select a column",options:p(o),block:"","onUpdate:modelValue":v[0]||(v[0]=y=>g("column",y))},null,8,["model-value","options"]),H(p(En),{"model-value":p(s),label:"Category",options:r,block:"","onUpdate:modelValue":h},null,8,["model-value"]),H(p(En),{"model-value":t.step.config.operation??"",label:"Operation",placeholder:"Select an operation",options:p(a),block:"","onUpdate:modelValue":v[1]||(v[1]=y=>g("operation",y))},null,8,["model-value","options"]),p(l).length>0?(w(!0),N(Re,{key:0},mt(p(l),y=>(w(),Q(p(sm),{id:`parse-${y}`,key:y,"model-value":t.step.config[y]??"",label:d(y),placeholder:f(y),"onUpdate:modelValue":x=>g(y,x)},null,8,["id","model-value","label","placeholder","onUpdate:modelValue"]))),128)):re("",!0)]))}}),Zme=Be(Kme,[["__scopeId","data-v-37e3f025"]]),Qme={class:"data-transform-step-hide-columns"},Jme={class:"data-transform-step-hide-columns__field"},ege={class:"data-transform-step-hide-columns__field__columns"},tge=["checked","onChange"],nge=se({__name:"DataTransformStepHideColumns",props:{step:{},columns:{}},setup(t){const e=t,{updateStep:n}=Or(),o=k(()=>e.step.config.columns?e.step.config.columns.split(",").map(i=>i.trim()).filter(Boolean):e.step.config.column?[e.step.config.column]:[]);function r(i){const s=[...o.value],a=s.indexOf(i);a>=0?s.splice(a,1):s.push(i);const l={...e.step.config};delete l.column,s.length===0?delete l.columns:l.columns=s.join(","),n(e.step.id,l)}return(i,s)=>(w(),N("div",Qme,[T("div",Jme,[s[0]||(s[0]=T("label",{class:"data-transform-step-hide-columns__field__label"},"Hide columns",-1)),T("div",ege,[(w(!0),N(Re,null,mt(t.columns,a=>(w(),N("label",{key:a,class:"data-transform-step-hide-columns__field__columns__column"},[T("input",{type:"checkbox",checked:p(o).includes(a),onChange:l=>r(a)},null,40,tge),Ue(" "+ye(a),1)]))),128))])])]))}}),oge=Be(nge,[["__scopeId","data-v-a74ff0f2"]]),rge={class:"data-transform-step-filter"},ige=se({__name:"DataTransformStepFilter",props:{step:{},columns:{}},setup(t){const e=t,{updateStep:n}=Or(),o=k(()=>e.columns.map(s=>({value:s,label:s}))),r=[{value:bo.Equals,label:"Equals"},{value:bo.NotEquals,label:"Not equals"},{value:bo.Contains,label:"Contains"},{value:bo.GreaterThan,label:"Greater than"},{value:bo.LessThan,label:"Less than"}];function i(s,a){n(e.step.id,{...e.step.config,[s]:a})}return(s,a)=>(w(),N("div",rge,[H(p(En),{"model-value":t.step.config.column??"",label:"Column",placeholder:"Select a column",options:p(o),block:"","onUpdate:modelValue":a[0]||(a[0]=l=>i("column",l))},null,8,["model-value","options"]),H(p(En),{"model-value":t.step.config.condition??p(bo).Equals,label:"Condition",options:r,block:"","onUpdate:modelValue":a[1]||(a[1]=l=>i("condition",l))},null,8,["model-value"]),H(p(sm),{id:"filter-value","model-value":t.step.config.value??"",label:"Value",placeholder:"Filter value","onUpdate:modelValue":a[2]||(a[2]=l=>i("value",l))},null,8,["model-value"])]))}}),sge=Be(ige,[["__scopeId","data-v-65704d71"]]),age={class:"data-transform-step-sort"},lge={class:"data-transform-step-sort__field"},cge={class:"data-transform-step-sort__field__columns"},uge=["checked","onChange"],dge=se({__name:"DataTransformStepSort",props:{step:{},columns:{},columnTypes:{}},setup(t){const e=t,{updateStep:n}=Or(),o=k(()=>e.step.config.columns?e.step.config.columns.split(",").map(c=>c.trim()).filter(Boolean):e.step.config.column?[e.step.config.column]:[]),r=k(()=>o.value.every(c=>{const u=e.columns.indexOf(c);return u>=0&&e.columnTypes[u]==="number"}));function i(c){const u=[...o.value],d=u.indexOf(c);d>=0?u.splice(d,1):u.push(c);const f={...e.step.config};delete f.column,u.length===0?delete f.columns:f.columns=u.join(",");const h=u.every(g=>{const b=e.columns.indexOf(g);return b>=0&&e.columnTypes[b]==="number"});(u.length<=1||!h)&&delete f.operation,n(e.step.id,f)}const s=[{value:"",text:"None"},{value:"sum",text:"Sum"},{value:"avg",text:"Avg"}],a=[{value:Jt.Ascending,text:"Ascending"},{value:Jt.Descending,text:"Descending"}];function l(c,u){n(e.step.id,{...e.step.config,[c]:u})}return(c,u)=>(w(),N("div",age,[T("div",lge,[u[2]||(u[2]=T("label",{class:"data-transform-step-sort__field__label"},"Sort by",-1)),T("div",cge,[(w(!0),N(Re,null,mt(t.columns,d=>(w(),N("label",{key:d,class:"data-transform-step-sort__field__columns__column"},[T("input",{type:"checkbox",checked:p(o).includes(d),onChange:f=>i(d)},null,40,uge),Ue(" "+ye(d),1)]))),128))])]),p(o).length>1&&p(r)?(w(),Q(p($n),{key:0,"model-value":t.step.config.operation??"",label:"Operation",options:s,block:"","onUpdate:modelValue":u[0]||(u[0]=d=>l("operation",d))},null,8,["model-value"])):re("",!0),H(p($n),{"model-value":t.step.config.direction??p(Jt).Ascending,label:"Direction",options:a,block:"","onUpdate:modelValue":u[1]||(u[1]=d=>l("direction",d))},null,8,["model-value"])]))}}),fge=Be(dge,[["__scopeId","data-v-73ae8834"]]),hge={},pge={class:"pipeline-connector"};function mge(t,e){return w(),N("div",pge)}const gge=Be(hge,[["render",mge],["__scopeId","data-v-a3406500"]]),vge={class:"source-block"},bge={class:"source-block__meta"},yge=se({__name:"DataTransformSourceBlock",props:{columns:{},rows:{},label:{default:"Raw Data"}},setup(t){return(e,n)=>(w(),N("div",vge,[n[0]||(n[0]=T("span",{class:"source-block__icon"},[T("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"14",height:"14"},[T("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),T("path",{d:"M3 9h18M9 21V9"})])],-1)),T("span",null,ye(t.label),1),T("span",bge,ye(t.columns)+" cols · "+ye(t.rows)+" rows",1)]))}}),xge=Be(yge,[["__scopeId","data-v-6b491dca"]]),wge={class:"pipeline","data-testid":"transform-pipeline"},_ge={key:6,class:"pipeline__config-info"},Sge={key:7,class:"text-muted text-center py-3"},kge=se({__name:"DataTransformPipeline",setup(t){const{columns:e,rows:n,columnTypes:o}=Zo(),{steps:r,addStep:i,removeStep:s,applyTransforms:a,getColumnsAtStep:l,validateStep:c}=Or(),{activeScene:u,activeIndex:d,scenes:f}=_n(),h=k(()=>{if(!u.value)return"Raw Data";if(d.value<=0)return"Data from Scene 1";const R=f.value[d.value-1];return`Data from ${(R==null?void 0:R.name)||`Scene ${d.value}`}`}),g=De(""),b=Ie(new Set),m=k(()=>r.value.findIndex(R=>R.id===g.value)),v=k(()=>m.value<0?{columns:[],columnTypes:[]}:l(m.value,e.value,n.value,o.value)),y=k(()=>v.value.columns),x=k(()=>v.value.columnTypes),_=k(()=>{const R={};for(let $=0;$<r.value.length;$++){const A=r.value[$];if(b.value.has(A.id)){R[A.id]=null;continue}const L=l($,e.value,n.value,o.value);R[A.id]=c(A,L.columns,L.columnTypes)}return R}),S=k(()=>a(e.value,n.value,o.value)),E=k(()=>S.value.columns.length),M=k(()=>S.value.rows.length);function C(R){const $=g.value;$&&$!==R&&b.value.delete($),g.value=R}function O(R){const $=i(R);b.value.add($),C($)}function P(R){b.value.delete(R),s(R),g.value===R&&(g.value=r.value.length>0?r.value[r.value.length-1].id:"")}return(R,$)=>{const A=xge,L=gge,B=fge,F=sge,z=oge,V=Zme,U=jme,ie=Gme,ue=Bme,fe=lme,he=eme;return w(),N("div",wge,[H(A,{columns:p(e).length,rows:p(n).length,label:p(h)},null,8,["columns","rows","label"]),(w(!0),N(Re,null,mt(p(r),(ce,de)=>(w(),N(Re,{key:ce.id},[H(L),H(ue,{step:ce,index:de,active:p(g)===ce.id,error:p(_)[ce.id],onSelect:_e=>C(ce.id),onDelete:_e=>P(ce.id)},{default:J(()=>[ce.type===p(Qe).Sort?(w(),Q(B,{key:0,step:ce,columns:p(y),"column-types":p(x)},null,8,["step","columns","column-types"])):ce.type===p(Qe).Filter?(w(),Q(F,{key:1,step:ce,columns:p(y)},null,8,["step","columns"])):ce.type===p(Qe).HideColumns?(w(),Q(z,{key:2,step:ce,columns:p(y)},null,8,["step","columns"])):ce.type===p(Qe).Parse?(w(),Q(V,{key:3,step:ce,columns:p(y)},null,8,["step","columns"])):ce.type===p(Qe).Rename?(w(),Q(U,{key:4,step:ce,columns:p(y)},null,8,["step","columns"])):ce.type===p(Qe).GroupBy?(w(),Q(ie,{key:5,step:ce,columns:p(y),"column-types":p(x)},null,8,["step","columns","column-types"])):ce.type===p(Qe).Transpose?(w(),N("div",_ge," Transpose swaps rows and columns. The first column values become headers and column headers become the first column. ")):(w(),N("div",Sge," Coming soon "))]),_:2},1032,["step","index","active","error","onSelect","onDelete"])],64))),128)),H(L),H(fe,{onAdd:O}),H(L),H(he,{columns:p(E),rows:p(M)},null,8,["columns","rows"])])}}}),Cge=Be(kge,[["__scopeId","data-v-b653c7ed"]]),Age=[0,.30103,.17609,.12494,.09691,.07918,.06695,.05799,.05115,.04576],$O=10,$ge=.1;function Tge(t){const e=parseFloat(t);if(!Number.isFinite(e)||e===0)return null;const o=Math.abs(e).toExponential(),r=parseInt(o[0],10);return r>=1&&r<=9?r:null}function Mge(t,e,n){if(t==="number")return!0;let o=0;for(const r of e){const i=r[n];if(i!=null&&i!==""){const s=parseFloat(i);Number.isFinite(s)&&o++}}return o>=$O}function TO(t,e,n){const o=[];let r=!1;for(let i=0;i<t.length;i++){if(!Mge(n[i],e,i))continue;const s=new Array(10).fill(0);let a=0;for(const c of e){const u=Tge(c[i]);u!==null&&(s[u]++,a++)}if(a<$O)continue;r=!0;let l=!1;for(let c=1;c<=9;c++){const u=s[c]/a;if(Math.abs(u-Age[c])>$ge){l=!0;break}}l&&o.push(t[i])}return{pass:o.length===0,suspicious:o,eligible:r}}const Oge={class:"data-column-settings"},Bge={class:"data-column-settings__field"},Lge={class:"data-column-settings__section"},Pge={class:"data-column-settings__section__detections"},Dge={class:"data-column-settings__section__detections__item data-column-settings__section__detections__item--success"},Ege={class:"data-column-settings__section__detections__item data-column-settings__section__detections__item--info"},Ige={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Nge={key:0,d:"M20 6L9 17l-5-5"},Rge={key:1,d:"M12 9v4M12 17h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"},Fge={key:1,class:"data-column-settings__picker"},Vge=se({__name:"DataColumnSettings",setup(t){const e=dr(),{selectedColumnIndex:n}=At(e),{selectColumn:o}=e,{columns:r,rows:i,columnTypes:s,setColumnType:a}=Zo(),l=De("string"),c=[{value:"string",label:"String"},{value:"number",label:"Number"},{value:"date",label:"Date"}];Ve(n,v=>{v>=0&&v<r.value.length&&(l.value=s.value[v]??"string")},{immediate:!0});function u(v){a(n.value,v)}const d=k(()=>r.value.map((v,y)=>({value:String(y),label:v})));function f(v){o(parseInt(v,10))}const h=k(()=>{const v=n.value;if(v<0)return{unique:0,total:0};const y=i.value.map(_=>_[v]??"").filter(_=>_.length>0);return{unique:new Set(y).size,total:y.length}}),g=k(()=>{const{unique:v,total:y}=h.value;return v===y?`${v} unique values — no duplicates`:`${y-v} duplicates found`}),b=k(()=>{const v=s.value[n.value];return v==="number"?"Numeric measure detected":v==="date"?"Date axis detected":"Categorical dimension detected"}),m=k(()=>{const v=n.value;if(v<0)return null;const y=r.value[v],x=TO([y],i.value.map(_=>[_[v]]),[s.value[v]]);return x.eligible?{pass:x.pass,label:x.pass?"Follows Benford's law":"Doesn't follow Benford's law"}:null});return(v,y)=>(w(),N("div",Oge,[p(n)>=0&&p(n)<p(r).length?(w(),N(Re,{key:0},[T("div",Bge,[y[1]||(y[1]=T("div",{class:"data-column-settings__field__label"}," Type ",-1)),H(p(En),{modelValue:p(l),"onUpdate:modelValue":[y[0]||(y[0]=x=>Ke(l)?l.value=x:null),u],label:"",options:c,block:""},null,8,["modelValue"])]),y[5]||(y[5]=T("hr",{class:"data-column-settings__divider"},null,-1)),T("div",Lge,[y[4]||(y[4]=T("div",{class:"data-column-settings__section__title"}," Detections ",-1)),T("div",Pge,[T("span",Dge,[y[2]||(y[2]=T("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[T("path",{d:"M20 6L9 17l-5-5"})],-1)),Ue(" "+ye(p(g)),1)]),T("span",Ege,[y[3]||(y[3]=T("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[T("circle",{cx:"12",cy:"12",r:"10"}),T("path",{d:"M12 16v-4M12 8h.01"})],-1)),Ue(" "+ye(p(b)),1)]),p(m)?(w(),N("span",{key:0,class:$e(["data-column-settings__section__detections__item",p(m).pass?"data-column-settings__section__detections__item--success":"data-column-settings__section__detections__item--warn"])},[(w(),N("svg",Ige,[p(m).pass?(w(),N("path",Nge)):(w(),N("path",Rge))])),Ue(" "+ye(p(m).label),1)],2)):re("",!0)])])],64)):(w(),N("div",Fge,[y[6]||(y[6]=T("div",{class:"data-column-settings__picker__label"}," Column ",-1)),H(p(En),{"model-value":"",label:"",options:p(d),block:"",placeholder:"Select a column…","onUpdate:modelValue":f},null,8,["options"])]))]))}}),zge=Be(Vge,[["__scopeId","data-v-fadb97cc"]]),Hge={key:0,class:"data-check-empty"},Wge={key:1,class:"data-check-table"},Uge={class:"data-check-table__col-header__name"},Gge={class:"data-check-table__col-header__type"},qge=se({__name:"DataCheckTable",setup(t){const e=dr(),{selectedColumnIndex:n}=At(e),{selectColumn:o}=e,{displayColumns:r,displayRows:i,displayColumnTypes:s}=Zo(),a=k(()=>i.value.length===0);return(l,c)=>p(a)?(w(),N("div",Hge,[H(p(Ay),{class:"data-check-empty__icon"}),c[0]||(c[0]=T("p",null,"No rows match your filters",-1))])):(w(),N("div",Wge,[H(p(eE),{hover:"",bordered:""},{default:J(()=>[H(p(sE),null,{default:J(()=>[H(p(Hw),null,{default:J(()=>[H(p(zw),{class:"data-check-table__row-num"},{default:J(()=>[...c[1]||(c[1]=[Ue(" # ",-1)])]),_:1}),(w(!0),N(Re,null,mt(p(r),(u,d)=>(w(),Q(p(zw),{key:d,class:$e(["data-check-table__col-header",{"data-check-table__col--selected":d===p(n)}]),onClick:f=>p(o)(d)},{default:J(()=>[T("div",Uge,ye(u),1),T("div",Gge,ye(p(s)[d]??"string"),1)]),_:2},1032,["class","onClick"]))),128))]),_:1})]),_:1}),H(p(tE),null,{default:J(()=>[(w(!0),N(Re,null,mt(p(i),(u,d)=>(w(),Q(p(Hw),{key:d},{default:J(()=>[H(p(Vw),{class:"data-check-table__row-num"},{default:J(()=>[Ue(ye(d+1),1)]),_:2},1024),(w(!0),N(Re,null,mt(u,(f,h)=>(w(),Q(p(Vw),{key:h,class:$e({"data-check-table__col--selected":h===p(n),"data-check-table__cell--numeric":p(s)[h]==="number"})},{default:J(()=>[Ue(ye(f),1)]),_:2},1032,["class"]))),128))]),_:2},1024))),128))]),_:1})]),_:1})]))}}),Yge=Be(qge,[["__scopeId","data-v-670500db"]]),jge={class:"data-insight-badges"},Xge={class:"data-insight-badge data-insight-badge--shape"},Kge={class:"data-insight-badge__icon"},Zge={class:"data-insight-badge__icon"},Qge=se({__name:"DataInsightBadges",props:{columns:{},rows:{},columnTypes:{}},setup(t){const e=t,n=pt("benfordBadgeRef"),o=k(()=>{let d=0;for(const f of e.rows)for(let h=0;h<e.columns.length;h++){const g=f[h];(g==null||g==="")&&d++}return d}),r=k(()=>o.value===0?"✓":"⚠"),i=k(()=>o.value===0?"No missing values":`${o.value} missing value${o.value===1?"":"s"}`),s=k(()=>o.value===0?"data-insight-badge--quality-ok":"data-insight-badge--quality-warn"),a=k(()=>{const d=TO(e.columns,e.rows,e.columnTypes);return d.eligible?d:null}),l=k(()=>{var d;return(d=a.value)!=null&&d.pass?"✓":"⚠"}),c=k(()=>{var d;return(d=a.value)!=null&&d.pass?"data-insight-badge--benford-ok":"data-insight-badge--benford-warn"}),u=k(()=>a.value?a.value.pass?"All numeric columns follow Benford's Law — the expected distribution of leading digits in real-world data.":`Column(s) ${a.value.suspicious.join(", ")} don't follow Benford's Law — the expected distribution of leading digits. This may indicate fabricated or anomalous data.`:"");return(d,f)=>(w(),N("div",jge,[T("span",Xge,ye(t.columns.length)+" cols · "+ye(t.rows.length)+" rows ",1),T("span",{class:$e(["data-insight-badge",p(s)])},[T("span",Kge,ye(p(r)),1),Ue(" "+ye(p(i)),1)],2),p(a)?(w(),N("span",{key:0,ref_key:"benfordBadgeRef",ref:n,class:$e(["data-insight-badge",p(c)])},[T("span",Zge,ye(p(l)),1),f[0]||(f[0]=Ue(" Benford's law ",-1)),H(p(Dd),{"teleport-to":"body",target:p(n),title:p(u),placement:"top"},null,8,["target","title"])],2)):re("",!0)]))}}),Jge=Be(Qge,[["__scopeId","data-v-d0fa5a33"]]),eve={class:"data-structure-panel__main__pills-bar"},tve={key:0,class:"data-structure-panel__main__scene-banner"},nve=se({__name:"DataStructurePanel",setup(t){const{columns:e,rows:n,columnTypes:o}=Zo(),r=dr(),{dataPanelOpen:i,dataPanelTab:s}=At(r),{openDataPanel:a,closeDataPanel:l,setDataView:c,setLastNarrowDataTab:u}=r,{mode:d}=Zl(),{activeScene:f,activeIndex:h,scenes:g}=_n(),b=k(()=>f.value!==null);Ve(d,L=>{L==="drawer"&&s.value&&(u(s.value),l())},{immediate:!0});const m=k(()=>C$(g.value,h.value)),v=k(()=>{const L=m.value;if(L===h.value)return"Custom data on this scene.";if(L>=0){const B=g.value[L];return`Data inherited from ${(B==null?void 0:B.name)||`Scene ${L+1}`}.`}return"Scene override active."}),y=k(()=>{const L=m.value;return L===h.value?"This scene uses its own data, independent of the base dataset.":L>=0?"Replace data to set different data for this scene.":"The table below shows the base data. Replace data to set custom data for this scene."});function x(){c("upload")}function _(L){u(L),a(L)}const{isNarrow:S}=qi(),E=pt("mainRef"),{sections:M}=kO(),C=k(()=>b.value?["parsing"]:[]),O=k(()=>b.value?M.filter(L=>L.key!=="parsing"):M),P=k({get:()=>!!s.value,set:L=>{L||l()}}),R={column:"Column Settings",transforms:"Transforms",parsing:"Parsing",reco:"Recommendations"},$=k(()=>R[s.value]??"Panel"),A=k(()=>({"data-structure-panel--narrow":S.value}));return(L,B)=>{const F=Jge,z=Yge,V=M2,U=zge,ie=Cge,ue=K0e,fe=U0e,he=T2,ce=Xm,de=B0e;return w(),N("div",{class:$e(["data-structure-panel",p(A)])},[T("div",{ref_key:"mainRef",ref:E,class:"data-structure-panel__main"},[T("div",eve,[p(b)?(w(),N("div",tve,[T("strong",null,ye(p(v)),1),Ue(" "+ye(p(y)),1)])):(w(),Q(F,{key:1,columns:p(e),rows:p(n),"column-types":p(o)},null,8,["columns","rows","column-types"])),H(p(Kn),{"icon-left":p(AO),label:"Replace data",variant:"outline-primary",size:"sm",onClick:x},null,8,["icon-left"])]),H(z)],512),p(i)?(w(),Q(ce,{key:0,"drawer-open":p(P),"onUpdate:drawerOpen":B[0]||(B[0]=_e=>Ke(P)?P.value=_e:null),title:p($),"container-ref":p(E),onClose:p(l)},hi({default:J(()=>[p(s)==="column"?(w(),Q(U,{key:0})):p(s)==="transforms"?(w(),Q(ie,{key:1})):p(s)==="parsing"?(w(),Q(ue,{key:2})):p(s)==="reco"?(w(),Q(fe,{key:3})):re("",!0)]),_:2},[p(d)==="drawer"?{name:"tabs",fn:J(()=>[H(V,{tabs:p(O),"model-value":p(s),sticky:"","onUpdate:modelValue":_},null,8,["tabs","model-value"])]),key:"0"}:void 0,p(d)!=="drawer"?{name:"footer",fn:J(()=>[H(he)]),key:"1"}:void 0]),1032,["drawer-open","title","container-ref","onClose"])):re("",!0),p(S)?re("",!0):(w(),Q(de,{key:1,"disabled-tabs":p(C)},null,8,["disabled-tabs"]))],2)}}}),ove=Be(nve,[["__scopeId","data-v-f811e1e6"]]),rve={class:"samples-grid"},ive=["onClick","onKeydown"],sve={class:"sample-card__thumb"},ave=["src","alt"],lve={class:"sample-card__info"},cve={class:"sample-card__info__name"},uve={class:"sample-card__info__meta"},dve=se({__name:"DataUploadSamples",emits:["select"],setup(t){const e={[Le.BarVertical]:"Columns",[Le.BarHorizontal]:"Bars",[Le.BarMulti]:"Grouped Columns",[Le.Line]:"Line",[Le.LineMulti]:"Lines",[Le.Donut]:"Donut",[Le.Pie]:"Pie",[Le.Area]:"Area",[Le.AreaStacked]:"Stacked Area",[Le.ColumnStacked]:"Stacked Columns",[Le.BarStacked]:"Stacked Bars",[Le.BarSplit]:"Split Bars",[Le.BarGrouped]:"Grouped Bars"};function n(i){const s=i.split(`
|
|
859
|
+
`).filter(a=>a.trim().length>0);return Math.max(0,s.length-1)}const o=ar(new Map),r=k(()=>i6.map(i=>({...i,typeLabel:e[i.chartType]??i.chartType,rowCount:n(i.tsvData),thumbSrc:o.get(i.id)})));return hn(()=>{for(const i of i6)if(i.dsl){const s=N$(i.dsl);s&&o.set(i.id,gc(s))}}),(i,s)=>(w(),N("div",rve,[(w(!0),N(Re,null,mt(p(r),a=>(w(),N("div",{key:a.id,class:"sample-card",role:"button",tabindex:"0",onClick:l=>i.$emit("select",a),onKeydown:nr(l=>i.$emit("select",a),["enter"])},[T("div",sve,[a.thumbSrc?(w(),N("img",{key:0,class:"sample-card__thumb__img",src:a.thumbSrc,alt:a.title},null,8,ave)):re("",!0)]),T("div",lve,[T("div",cve,ye(a.title),1),T("div",uve,[Ue(ye(a.typeLabel)+" ",1),s[0]||(s[0]=T("span",{class:"sample-card__info__meta__sep"},"·",-1)),Ue(" "+ye(a.rowCount)+" rows ",1)])])],40,ive))),128))]))}}),fve=Be(dve,[["__scopeId","data-v-23920b61"]]),hve=se({__name:"DataUploadFileDrop",emits:["loaded","bpc","dragState"],setup(t,{emit:e}){const n=e,o=Ie(null),r=De(!1);function i(f){r.value=f,n("dragState",f)}function s(){i(!0)}function a(){i(!1)}function l(f){return f.name.toLowerCase().endsWith(".bpc")}function c(f){const h=new globalThis.FileReader;h.onload=()=>{typeof h.result=="string"&&n(l(f)?"bpc":"loaded",h.result,f.name)},h.readAsText(f)}function u(f){var g;i(!1);const h=(g=f.dataTransfer)==null?void 0:g.files[0];h&&c(h)}function d(f){var b;const h=f.target,g=(b=h.files)==null?void 0:b[0];g&&c(g),h.value=""}return(f,h)=>(w(),N("div",{class:$e(["file-drop",{"file-drop--active":p(r)}]),onDragover:gn(s,["prevent"]),onDragleave:gn(a,["prevent"]),onDrop:gn(u,["prevent"]),onClick:h[1]||(h[1]=g=>{var b;return(b=p(o))==null?void 0:b.click()})},[h[2]||(h[2]=H9('<div class="file-drop__icon" data-v-f6ebbbc1><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" data-v-f6ebbbc1><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" data-v-f6ebbbc1></path></svg></div><div class="file-drop__title" data-v-f6ebbbc1> Drag & drop your file here </div><div class="file-drop__or" data-v-f6ebbbc1> or </div>',3)),T("button",{class:"file-drop__btn",onClick:h[0]||(h[0]=gn(g=>{var b;return(b=p(o))==null?void 0:b.click()},["stop"]))}," Browse files "),h[3]||(h[3]=T("div",{class:"file-drop__formats"},[T("span",{class:"file-drop__formats__tag"},".csv"),T("span",{class:"file-drop__formats__tag"},".tsv"),T("span",{class:"file-drop__formats__tag"},".bpc")],-1)),T("input",{ref_key:"fileInput",ref:o,type:"file",accept:".csv,.tsv,.txt,.bpc",class:"file-drop__input",onChange:d},null,544)],34))}}),pve=Be(hve,[["__scopeId","data-v-f6ebbbc1"]]),mve={class:"upload-card"},gve={class:"input-card__tabs"},vve=["onClick"],bve={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},yve={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},xve={key:2,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},wve={key:1,class:"upload-card__paste"},_ve={class:"upload-card__paste__wrap"},Sve={key:0,class:"upload-card__paste__wrap__placeholder"},kve={class:"upload-card__paste__footer"},Cve=["disabled"],Ave=se({__name:"DataUploadCard",emits:["loaded","bpc","sample","cancel"],setup(t){const{rawInput:e,sourceFormat:n,columns:o,rows:r,displayColumns:i,displayRows:s}=Zo(),{activeIndex:a,scenes:l}=_n();function c(){if(a.value<0)return!1;const v=Ba(l.value,a.value);return!!(v!=null&&v.data)}function u(){return c()?u6(i.value,s.value):(n==null?void 0:n.value)==="bpc"&&o.value.length>0?u6(o.value,r.value):e.value}const d=De("paste"),f=De(u()),h=pt("pasteArea"),g=De(!1);function b(v){var x;const y=(x=v.clipboardData)==null?void 0:x.getData("text/plain");y&&(v.preventDefault(),f.value=y,wn(()=>{h.value&&h.value.focus()}))}const m=[{value:"file",text:"File"},{value:"paste",text:"Paste"},{value:"samples",text:"Samples"}];return(v,y)=>{const x=pve,_=fve;return w(),N("div",mve,[y[12]||(y[12]=T("h2",{class:"upload-card__title"}," Add your data ",-1)),y[13]||(y[13]=T("p",{class:"upload-card__subtitle"}," Drop a file, paste from a spreadsheet, or pick a sample dataset ",-1)),p(o).length>0?(w(),N("button",{key:0,class:"upload-card__back",onClick:y[0]||(y[0]=S=>v.$emit("cancel"))}," ← Back to table ")):re("",!0),T("div",{class:$e(["input-card",{"input-card--drag-over":p(g)}])},[T("div",gve,[(w(),N(Re,null,mt(m,S=>T("button",{key:S.value,class:$e(["input-card__tabs__tab",{"input-card__tabs__tab--active":p(d)===S.value}]),onClick:E=>d.value=S.value},[S.value==="file"?(w(),N("svg",bve,[...y[7]||(y[7]=[T("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"},null,-1)])])):S.value==="paste"?(w(),N("svg",yve,[...y[8]||(y[8]=[T("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1"},null,-1),T("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"},null,-1)])])):(w(),N("svg",xve,[...y[9]||(y[9]=[T("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"},null,-1),T("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"},null,-1)])])),Ue(" "+ye(S.text),1)],10,vve)),64))]),p(d)==="file"?(w(),Q(x,{key:0,onLoaded:y[1]||(y[1]=(S,E)=>v.$emit("loaded",S,E)),onBpc:y[2]||(y[2]=(S,E)=>v.$emit("bpc",S,E)),onDragState:y[3]||(y[3]=S=>g.value=S)})):p(d)==="paste"?(w(),N("div",wve,[T("div",_ve,[p(f)?re("",!0):(w(),N("div",Sve,[...y[10]||(y[10]=[Ue(" category Gold Silver Bronze",-1),T("br",null,null,-1),Ue(" USA 40 44 42",-1),T("br",null,null,-1),Ue(" China 38 32 19 ",-1)])])),sr(T("textarea",{ref_key:"pasteArea",ref:h,"onUpdate:modelValue":y[4]||(y[4]=S=>Ke(f)?f.value=S:null),class:"upload-card__paste__wrap__area",spellcheck:"false",onPaste:b},null,544),[[up,p(f)]])]),T("div",kve,[y[11]||(y[11]=T("div",{class:"upload-card__paste__footer__hint"},[T("span",{class:"upload-card__paste__footer__hint__kbd"},"⌘"),T("span",{class:"upload-card__paste__footer__hint__kbd"},"V"),Ue(" paste from spreadsheet ")],-1)),T("button",{class:"upload-card__paste__footer__btn",disabled:!p(f).trim(),onClick:y[5]||(y[5]=S=>v.$emit("loaded",p(f),"Pasted"))}," Load data ",8,Cve)])])):p(d)==="samples"?(w(),Q(_,{key:2,onSelect:y[6]||(y[6]=S=>v.$emit("sample",S))})):re("",!0)],2)])}}}),$ve=Be(Ave,[["__scopeId","data-v-b501779f"]]),Tve=se({__name:"DataPanel",setup(t){const e=dr(),{dataView:n}=At(e),{setDataView:o}=e,r=Zo(),{applyDsl:i}=Mc(),{loadSample:s}=Vs(),{next:a}=$2(),l=At(CO()),{activeScene:c,activeIndex:u,update:d}=_n(),f=k(()=>c.value!==null);hn(()=>{r.columns.value.length>0?o("structure"):o("upload")});function h(){if(!r.rawInput.value||r.sourceFormat.value!=="delimited")return;const v=V1(r.rawInput.value,{firstRowIsHeader:l.firstRowIsHeader.value,delimiter:l.delimiter.value,decimalSeparator:l.decimalSeparator.value,trimWhitespace:l.trimWhitespace.value});r.loadParsed(v)}function g(v,y){if(f.value&&u.value>=0){const x=V1(v,{firstRowIsHeader:l.firstRowIsHeader.value,delimiter:l.delimiter.value,decimalSeparator:l.decimalSeparator.value,trimWhitespace:l.trimWhitespace.value}),_=jm(x.columns,x.rows);d(u.value,{data:_}),o("structure");return}r.rawInput.value=v,r.sourceFormat.value="delimited",r.sourceLabel.value=y||"Pasted",h(),o("structure")}function b(v,y){i(v),r.sourceLabel.value=y||"Blueprint file",a()}function m(v){if(f.value&&u.value>=0){d(u.value,{data:v.serializedData}),o("structure");return}s(v),a()}return Ve([()=>l.firstRowIsHeader.value,()=>l.delimiter.value,()=>l.decimalSeparator.value,()=>l.trimWhitespace.value],()=>{r.rawInput.value&&n.value==="structure"&&h()}),(v,y)=>{const x=$ve,_=ove;return w(),N("div",{class:$e(["data-panel",{"data-panel--structure":p(n)==="structure"}])},[p(n)==="upload"?(w(),Q(x,{key:0,onLoaded:g,onBpc:b,onSample:m,onCancel:y[0]||(y[0]=S=>p(o)("structure"))})):(w(),Q(_,{key:1}))],2)}}}),Mve=Be(Tve,[["__scopeId","data-v-4fa651c7"]]),Ove=["aria-label","aria-disabled","disabled"],Bve={class:"panel-open-button__label"},Lve=se({__name:"PanelOpenButton",props:{label:{},icon:{default:()=>K$},disabled:{type:Boolean,default:!1}},emits:["open"],setup(t,{emit:e}){const n=e;function o(){n("open")}return(r,i)=>(w(),N("button",{class:"panel-open-button",type:"button","aria-label":t.label,"aria-disabled":t.disabled?"true":void 0,disabled:t.disabled,onClick:o},[(w(),Q(Gt(t.icon),{class:"panel-open-button__icon","aria-hidden":"true"})),T("span",Bve,ye(t.label),1)],8,Ove))}}),Pve=Be(Lve,[["__scopeId","data-v-218f5209"]]),Dve={class:"layout-narrow-dock",role:"toolbar","aria-label":"Wizard controls"},Eve={class:"layout-narrow-dock__timeline"},Ive={class:"layout-narrow-dock__action"},Nve=se({__name:"LayoutNarrowDock",props:{showTimeline:{type:Boolean},scenes:{},activeIndex:{},playing:{type:Boolean},panelLabel:{},panelIcon:{default:void 0},panelDisabled:{type:Boolean,default:!1},scenesSheetOpen:{type:Boolean,default:!1}},emits:["update:activeIndex","play","pause","expand-timeline","open-panel"],setup(t,{emit:e}){const n=e;function o(r){n("update:activeIndex",r)}return(r,i)=>(w(),N("div",Dve,[T("div",Eve,[t.showTimeline?(w(),Q(p(qU),{key:0,scenes:t.scenes,"active-index":t.activeIndex,playing:t.playing,expanded:t.scenesSheetOpen,"onUpdate:activeIndex":o,onPlay:i[0]||(i[0]=s=>n("play")),onPause:i[1]||(i[1]=s=>n("pause")),onExpand:i[2]||(i[2]=s=>n("expand-timeline"))},null,8,["scenes","active-index","playing","expanded"])):re("",!0)]),T("div",Ive,[H(Pve,{label:t.panelLabel,icon:t.panelIcon,disabled:t.panelDisabled,onOpen:i[3]||(i[3]=s=>n("open-panel"))},null,8,["label","icon","disabled"])])]))}}),Rve=Be(Nve,[["__scopeId","data-v-cc656101"]]),Fve={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Vve(t,e){return w(),N("svg",Fve,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M224 48H32a8 8 0 0 0-8 8v136a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a8 8 0 0 0-8-8M40 112h40v32H40Zm56 0h120v32H96Zm120-48v32H40V64ZM40 160h40v32H40Zm176 32H96v-32h120z"},null,-1)])])}const IS=Te({name:"ph-table",render:Vve}),zve={viewBox:"0 0 256 256",width:"1.2em",height:"1.2em"};function Hve(t,e){return w(),N("svg",zve,[...e[0]||(e[0]=[T("path",{fill:"currentColor",d:"M216 112v96a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16v-96a16 16 0 0 1 16-16h24a8 8 0 0 1 0 16H56v96h144v-96h-24a8 8 0 0 1 0-16h24a16 16 0 0 1 16 16M93.66 69.66L120 43.31V136a8 8 0 0 0 16 0V43.31l26.34 26.35a8 8 0 0 0 11.32-11.32l-40-40a8 8 0 0 0-11.32 0l-40 40a8 8 0 0 0 11.32 11.32"},null,-1)])])}const NS=Te({name:"ph-export",render:Hve}),Wve={class:"layout-scene-timeline"},Uve=se({__name:"LayoutSceneTimeline",setup(t){return(e,n)=>(w(),N("div",Wve,[Ce(e.$slots,"default",{},void 0,!0)]))}}),Gve=Be(Uve,[["__scopeId","data-v-0ba61bc0"]]),qve={class:"wizard-shell"},Yve=["title","aria-label"],jve={class:"wizard-shell__main"},Xve={class:"wizard-shell__content"},Kve=se({__name:"WizardShell",setup(t){const{currentStep:e,currentIndex:n,steps:o,registerCreateSession:r}=$2(),i=Zo(),s=pn(),{sessionId:a,createSession:l,lastSavedAt:c}=Vs(),u=_n(),{scenes:d,activeIndex:f,activeScene:h,playing:g,startPlayback:b,stopPlayback:m}=u,v=k(()=>h.value!==null),{baseOptions:y}=kn(),x=Or(),_=Ie([]),S=k(()=>c.value?new Date(c.value):""),E=ZI(S),M=k(()=>S.value?`saved ${E.value}`:null),{isNarrow:C}=qi("lg"),{isNarrow:O}=qi("md"),{isNarrow:P}=qi(),R=dr(),$=Km(),A=Ie(!1),L=k(()=>{switch(e.value.key){case"data":return"Data panel";case"edit":return"Edit panel";case"export":return"Export panel";default:return"Open panel"}}),B=k(()=>{switch(e.value.key){case"data":return IS;case"edit":return ks;case"export":return NS;default:return ks}}),F=k(()=>e.value.key==="data"&&i.rows.value.length===0);function z(){if(!F.value)if(e.value.key==="data"){let K=R.lastNarrowDataTab.value;v.value&&K==="parsing"&&(K="column"),R.openDataPanel(K)}else e.value.key==="edit"?R.selectTab(R.lastNarrowEditTab.value):e.value.key==="export"&&$.setExportTab($.lastNarrowExportTab.value)}function V(){A.value=!0}function U(K){W(K),A.value=!1}const ie={data:IS,edit:ks,export:NS},ue=o.map(K=>({label:K.label,key:K.key,icon:ie[K.key]})),fe=k(()=>i.rows.value.length>0?[]:[1,2]);function he(){u.add(),u.setActive(d.value.length-1)}const ce=Ie({}),de=[Le.BarVertical,Le.BarHorizontal,Le.Line,Le.VerticalBar,Le.HorizontalBar];function _e(K){var Z,Y,ee;const oe=Qs(K.dataStr);if((Z=oe.series)!=null&&Z.length&&de.includes(K.chartType)){const ge=oe.series.find(pe=>pe.name===s._base.selectedColumn.value);ge&&(oe.values=ge.values),delete oe.series}return k2(K.chartType,oe,K.typeOpts,K.sort,{colorizes:(Y=K.colorizes)!=null&&Y.length?K.colorizes:void 0,seriesOverrides:(ee=K.seriesOverrides)!=null&&ee.length?K.seriesOverrides:void 0})}function j(K,oe){var Z;if((K==null?void 0:K.data)!==void 0)return K.data;if((Z=K==null?void 0:K.transforms)!=null&&Z.length&&i.columns.value.length>0){const Y=x.applyStepList(K.transforms,i.columns.value,i.rows.value,i.columnTypes.value);return jm(Y.columns,Y.rows)}return oe}function te(){const K=s._base,oe={};oe[0]=_e({chartType:K.chartType.value,dataStr:K.data.value,typeOpts:y.value,sort:K.sort.value,colorizes:K.colorizes.value,seriesOverrides:K.seriesOverrides.value});for(let Z=0;Z<d.value.length;Z++){const Y=Ba(d.value,Z);oe[Z+1]=_e({chartType:(Y==null?void 0:Y.chartType)??K.chartType.value,dataStr:j(Y,K.data.value),typeOpts:Y!=null&&Y.chartTypeOptions?{...y.value,...Y.chartTypeOptions}:y.value,sort:A$(Y)??K.sort.value,colorizes:(Y==null?void 0:Y.colorizes)??K.colorizes.value,seriesOverrides:(Y==null?void 0:Y.seriesOverrides)??K.seriesOverrides.value})}ce.value=oe}const ne=EI(te,300);Ve([()=>d.value,s._base.chartType,s._base.data,s._base.sort,s._base.colorizes,s._base.seriesOverrides,s._base.selectedColumn,y,e],()=>{e.value.key==="edit"&&ne()},{deep:!0});function me(K){var ee;const oe=s._base.title.value;if(K<0)return oe||" ";const Z=Ba(d.value,K),Y=(ee=Z==null?void 0:Z.properties)==null?void 0:ee.title;return Y!==void 0?Y||" ":oe||" "}const ve=k(()=>{const K={name:me(-1),index:0,removable:!1,thumbnail:ce.value[0]??null,hint:"base scene"},oe=d.value.map((Z,Y)=>{const ee=Y+1,ge=C$(d.value,Y);let pe;return ge===Y?pe="custom data":ge<0?pe="inherits base":pe=`inherits ${me(ge)||`Scene ${ge+1}`}`,{name:me(Y),index:ee,removable:!0,thumbnail:ce.value[ee]??null,hint:pe}});return[K,...oe]}),I=k(()=>f.value+1);function W(K){u.setActive(K-1)}function X(K){K<=0||u.remove(K-1)}const ae=k(()=>{const K=e.value.key;return K==="export"?!1:K==="edit"?!0:d.value.length>=1});Ve(f,(K,oe)=>{var Z,Y;e.value.key==="data"&&(oe===-1&&K>=0?(_.value=x.snapshot(),x.hydrate(((Z=d.value[K])==null?void 0:Z.transforms)??[])):oe>=0&&K===-1?(u.update(oe,{transforms:x.snapshot()}),x.hydrate(_.value)):oe>=0&&K>=0&&(u.update(oe,{transforms:x.snapshot()}),x.hydrate(((Y=d.value[K])==null?void 0:Y.transforms)??[])))}),hn(()=>{e.value.key==="edit"&&s._base.data.value&&te()});function le(){f.value>=0&&(u.update(f.value,{transforms:x.snapshot()}),x.hydrate(_.value),u.setActive(-1)),s._base.data.value=i.serialize();const K=s._base.chartType.value,oe=K.includes("multi")||K.includes("stacked")||K===Le.BarSplit||K===Le.BarGrouped;if(i.columns.value.length>2&&!oe){const Z=i.columnTypes.value[0]==="date";s._base.chartType.value=Z?Le.LineMulti:Le.BarMulti}}return r(()=>(le(),l())),Ve(()=>e.value.key,(K,oe)=>{oe==="data"&&K==="edit"&&a.value&&le()}),JE(()=>{moe()}),(K,oe)=>{const Z=Mve,Y=w0e,ee=qse;return w(),N("div",qve,[H(j$,{class:"wizard-shell__header"},{start:J(()=>[H(X$),p(M)&&p(C)?(w(),N("span",{key:0,class:"wizard-shell__saved-dot",role:"status","aria-live":"polite",title:p(M),"aria-label":p(M)},null,8,Yve)):re("",!0)]),center:J(()=>[H(p(aW),{"current-step":p(n),"onUpdate:currentStep":oe[0]||(oe[0]=ge=>Ke(n)?n.value=ge:null),steps:p(ue),"disabled-steps":p(fe),layout:p(O)?"stacked":"inline"},null,8,["current-step","steps","disabled-steps","layout"])]),end:J(()=>[p(M)&&!p(C)?(w(),Q(p(ay),{key:0,variant:"success",pill:"",class:"wizard-shell__saved",role:"status","aria-live":"polite"},{default:J(()=>[oe[2]||(oe[2]=T("span",{class:"wizard-shell__saved__dot"},null,-1)),Ue(" "+ye(p(M)),1)]),_:1})):re("",!0)]),_:1}),T("div",jve,[T("div",Xve,[p(e).key==="data"?(w(),Q(Z,{key:0})):p(e).key==="edit"?(w(),Q(Y,{key:1})):p(e).key==="export"?(w(),Q(ee,{key:2})):re("",!0)]),p(P)?(w(),Q(Rve,{key:0,"show-timeline":p(ae),scenes:p(ve),"active-index":p(I),playing:p(g),"panel-label":p(L),"panel-icon":p(B),"panel-disabled":p(F),"scenes-sheet-open":p(A),"onUpdate:activeIndex":W,onPlay:p(b),onPause:p(m),onExpandTimeline:V,onOpenPanel:z},null,8,["show-timeline","scenes","active-index","playing","panel-label","panel-icon","panel-disabled","scenes-sheet-open","onPlay","onPause"])):p(ae)?(w(),Q(Gve,{key:1},{default:J(()=>[H(p(RU),{scenes:p(ve),"active-index":p(I),playing:p(g),"onUpdate:activeIndex":W,onAdd:he,onRemove:X,onPlay:p(b),onPause:p(m)},null,8,["scenes","active-index","playing","onPlay","onPause"])]),_:1})):re("",!0),p(P)?(w(),Q(p(fC),{key:2,modelValue:p(A),"onUpdate:modelValue":oe[1]||(oe[1]=ge=>Ke(A)?A.value=ge:null),title:"Scenes"},{default:J(()=>[H(p(iG),{scenes:p(ve),"active-index":p(I),playing:p(g),"onUpdate:activeIndex":U,onAdd:he,onRemove:X,onPlay:p(b),onPause:p(m)},null,8,["scenes","active-index","playing","onPlay","onPause"])]),_:1},8,["modelValue"])):re("",!0)])])}}}),Oh=Be(Kve,[["__scopeId","data-v-58139d04"]]),Zve={class:"render-page"},Qve=se({__name:"RenderPage",setup(t){const e=Wl(),n=pt("containerRef"),{applyDsl:o}=Mc();B2(n);const{layout:r}=pn(),{cardClass:i,cardStyle:s}=O2(r,"render-page__card"),{scenes:a,activeIndex:l,playing:c,setActive:u,nextScene:d,previousScene:f,startPlayback:h,stopPlayback:g}=_n(),b={buttons:m1,"progress-bar":yC,"dot-stepper":xC,"minimal-arrows":wC},m=k(()=>b[r.value.playerType]||m1),v=k(()=>a.value.length+1),y=k(()=>l.value+2),x=k(()=>a.value.length>=1);function _(C){u(C-2)}const S=Ie(null);function E(){var C;return((C=n.value)==null?void 0:C.querySelector(".bc-frame-footer"))??null}let M=null;return Ve(n,C=>{if(M&&(M.disconnect(),M=null),!C){S.value=null;return}S.value=E(),M=new MutationObserver(()=>{S.value=E()}),M.observe(C,{childList:!0,subtree:!0})},{immediate:!0}),Ns(()=>{M&&(M.disconnect(),M=null)}),hn(()=>{const C=e.query.bpc64;if(C)try{const O=globalThis.atob(C),P=Uint8Array.from(O,$=>$.charCodeAt(0)),R=new TextDecoder().decode(P);o(R)}catch{}}),(C,O)=>(w(),N("div",Zve,[T("div",{ref_key:"containerRef",ref:n,class:$e(["render-page__card",p(i)]),style:Pt(p(s))},null,6),p(S)&&p(x)?(w(),Q(Hb,{key:0,to:p(S)},[(w(),Q(Gt(p(m)),{total:p(v),current:p(y),playing:p(c),position:p(r).playerPosition,"onUpdate:current":_,onPrevious:p(f),onNext:p(d),onPlay:p(h),onPause:p(g)},null,40,["total","current","playing","position","onPrevious","onNext","onPlay","onPause"]))],8,["to"])):re("",!0)]))}}),Jve=Be(Qve,[["__scopeId","data-v-76a513dd"]]);function Iv(t){const{sessionId:e,loadChart:n,startAutoSave:o}=Vs();if(e.value===t.params.id)return;if(!n(t.params.id))return"/charts";o()}function e1e(t){if(!t)return null;try{const e=t.replace(/-/g,"+").replace(/_/g,"/"),n=e.length%4===0?"":"=".repeat(4-e.length%4),o=atob(e+n),r=new Uint8Array(o.length);for(let i=0;i<o.length;i++)r[i]=o.charCodeAt(i);return new TextDecoder().decode(r)}catch{return null}}const t1e=$I({history:iI(),scrollBehavior(t,e,n){return n||(t.hash?{el:t.hash,behavior:"smooth"}:{top:0})},routes:[{path:"/",component:()=>b6(()=>import("./LandingPage-DSzan2c-.js"),__vite__mapDeps([0,1]))},{path:"/charts",component:iie},{path:"/new",component:Oh,beforeEnter:()=>{const{prepareNew:t}=Vs();t()}},{path:"/edit/:id",redirect:t=>`/edit/${t.params.id}/visualize`},{path:"/copy/:base64",component:()=>b6(()=>import("./CopyRedirect-CtcHi_O0.js"),[]),meta:{bare:!0},beforeEnter:t=>{const e=e1e(String(t.params.base64??""));if(!e)return"/";const{createFromDsl:n}=Vs(),o=n(e);if(!o)return"/";t.meta.copyTarget=`/edit/${o}/visualize`}},{path:"/edit/:id/data",component:Oh,beforeEnter:Iv},{path:"/edit/:id/visualize",component:Oh,beforeEnter:Iv},{path:"/edit/:id/export",component:Oh,beforeEnter:Iv},{path:"/render",component:Jve,meta:{bare:!0}}]}),MO=BL();MO.use(zL);TL(Koe).use(MO).use(t1e).use(yE()).mount("#app");export{Hb as $,mf as A,Kn as B,II as C,y$ as D,pt as E,Vt as F,i6 as G,ay as H,Aoe as I,xy as J,Re as K,mt as L,ye as M,mW as N,Te as O,$e as P,ece as Q,iT as R,sT as S,yme as T,C2 as U,AO as V,De as W,i1e as X,Ns as Y,die as Z,Be as _,T as a,m1 as a0,Wl as a1,fy as a2,re as b,N as c,se as d,my as e,Q as f,p as g,H as h,Ue as i,_C as j,k,z0 as l,CC as m,kC as n,w as o,GG as p,HG as q,Ce as r,FG as s,Ve as t,vf as u,Qi as v,J as w,qm as x,Ie as y,Ke as z};
|