aiex-cli 0.0.1 → 0.0.2-beta.1
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/README.md +19 -2
- package/dist/cli.mjs +840 -35
- package/dist/{doctor-collector-CykRm0fC.mjs → doctor-collector-Cbqgwx__.mjs} +31 -4
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-Cm8fAfaG.js +205 -0
- package/dist/web/assets/{DataBrowser-CwcTG80-.js → DataBrowser-DQwOvooY.js} +3 -3
- package/dist/web/assets/ExtractRunner-CzfLlCCf.js +1 -0
- package/dist/web/assets/{ExtractionViewer-CsdK1kKK.js → ExtractionViewer-D7tghmR-.js} +1 -1
- package/dist/web/assets/{JsonSchemaEditor-D477lV5a.js → JsonSchemaEditor-DXhYW-Un.js} +3 -3
- package/dist/web/assets/{api-client-D2Y_-4JM.js → api-client-CIC2X8_4.js} +1 -1
- package/dist/web/assets/baseinput-B7PU5-38.js +2 -0
- package/dist/web/assets/checkbox-CCQwMfLd.js +142 -0
- package/dist/web/assets/{cssMode-CPThwItX.js → cssMode-CCz1uj8b.js} +1 -1
- package/dist/web/assets/dialog-8xaIXBKO.js +108 -0
- package/dist/web/assets/{editor.main-BnOkwRFv.js → editor.main-DOue-nGf.js} +2 -2
- package/dist/web/assets/{freemarker2-DWDTYVJR.js → freemarker2-C87H7V8i.js} +1 -1
- package/dist/web/assets/{handlebars-D4DzjGQ7.js → handlebars-TLnoktZW.js} +1 -1
- package/dist/web/assets/{html-DnzhKSoD.js → html-Rewbtgcp.js} +1 -1
- package/dist/web/assets/{htmlMode-CR7UKfEH.js → htmlMode-Cr9y3YUi.js} +1 -1
- package/dist/web/assets/index-BEorm4a5.css +2 -0
- package/dist/web/assets/{index-DVDVw-GK.js → index-CWy8KajQ.js} +38 -38
- package/dist/web/assets/{javascript-D2srszZ8.js → javascript-BO8DPECx.js} +1 -1
- package/dist/web/assets/{jsonMode-B4jaPYEr.js → jsonMode-B78m_Y1l.js} +1 -1
- package/dist/web/assets/{liquid-CIT2Wl_l.js → liquid-CDp_8YUE.js} +1 -1
- package/dist/web/assets/{mdx-CWLaEOFy.js → mdx-CeR1GULE.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DDv5ldfS.js → monaco.contribution-tCitzj1_.js} +2 -2
- package/dist/web/assets/{python-6CGfpCNq.js → python-DWmB1hQ6.js} +1 -1
- package/dist/web/assets/{razor-DEMMh3TD.js → razor-BVk762Lq.js} +1 -1
- package/dist/web/assets/runtime-dom.esm-bundler-DZwuSnld.js +1 -0
- package/dist/web/assets/select-DKPPF403.js +438 -0
- package/dist/web/assets/{tsMode-Cm1NtjPs.js → tsMode-Gjs5D1gt.js} +1 -1
- package/dist/web/assets/{typescript-BM9aPEFg.js → typescript-Cw6YtwrM.js} +1 -1
- package/dist/web/assets/utils-CZhxh2Ya.js +2 -0
- package/dist/web/assets/{xml-CoSbvcg5.js → xml-guZq0YZJ.js} +1 -1
- package/dist/web/assets/{yaml-56GOgy8k.js → yaml-B9TbU-LX.js} +1 -1
- package/dist/web/index.html +9 -8
- package/package.json +2 -1
- package/dist/web/assets/AISettings-CI6Lgx0p.js +0 -339
- package/dist/web/assets/dialog-CUkPLPNP.js +0 -109
- package/dist/web/assets/index-C9N8oWt4.css +0 -2
- package/dist/web/assets/runtime-dom.esm-bundler-ei_N7Xjw.js +0 -1
- package/dist/web/assets/select-BGex2SPs.js +0 -439
- /package/dist/web/assets/{abap-Bgec7Keq.js → abap-C3UM4cME.js} +0 -0
- /package/dist/web/assets/{apex-VBlPwEoQ.js → apex-BQBZvQmN.js} +0 -0
- /package/dist/web/assets/{azcli-DKqrEFBx.js → azcli-Dn9Awrok.js} +0 -0
- /package/dist/web/assets/{bat-DdgQWy_0.js → bat-JgEezSDo.js} +0 -0
- /package/dist/web/assets/{bicep-CRMM43EB.js → bicep-vcQeC7wE.js} +0 -0
- /package/dist/web/assets/{cameligo-UatALtML.js → cameligo-C0cr0T3L.js} +0 -0
- /package/dist/web/assets/{clojure-D8JU08RA.js → clojure-Brc1-rbW.js} +0 -0
- /package/dist/web/assets/{coffee-C56wu358.js → coffee-BiZYU83a.js} +0 -0
- /package/dist/web/assets/{cpp-CyZLvhJG.js → cpp-ikWHCInz.js} +0 -0
- /package/dist/web/assets/{csharp-BJl3ixva.js → csharp-BRWs_LfH.js} +0 -0
- /package/dist/web/assets/{csp-CxEKxmO-.js → csp-CcAumoJw.js} +0 -0
- /package/dist/web/assets/{css-B0t_muXd.js → css-BZm6paiA.js} +0 -0
- /package/dist/web/assets/{cypher-D1hqiMFD.js → cypher-CDQMONdb.js} +0 -0
- /package/dist/web/assets/{dart-Bz550Pyv.js → dart-Ci4SZdF1.js} +0 -0
- /package/dist/web/assets/{dist-9yHVMqQ0.js → dist-B5Yem2Jn.js} +0 -0
- /package/dist/web/assets/{dockerfile-CIXgVAuA.js → dockerfile-BV0tAr-M.js} +0 -0
- /package/dist/web/assets/{ecl-D9qbvZoA.js → ecl-CP7nM2KN.js} +0 -0
- /package/dist/web/assets/{editor.api-C8BHpRhn.js → editor.api-BU_q4v8i.js} +0 -0
- /package/dist/web/assets/{elixir-b2M38fAy.js → elixir-GcA6wFiI.js} +0 -0
- /package/dist/web/assets/{flow9-Dq1UYMkt.js → flow9-CIb9youF.js} +0 -0
- /package/dist/web/assets/{fsharp-BaeLhgfq.js → fsharp-BVaBE4co.js} +0 -0
- /package/dist/web/assets/{go-Bd-NFKIC.js → go-Bbqf306x.js} +0 -0
- /package/dist/web/assets/{graphql-DZVerJfy.js → graphql-DJPrC4l-.js} +0 -0
- /package/dist/web/assets/{hcl-CAVzrZfH.js → hcl-QyfWVWpM.js} +0 -0
- /package/dist/web/assets/{ini-CyXdX58t.js → ini-CgstZeS8.js} +0 -0
- /package/dist/web/assets/{java-B5pNgvhy.js → java-D4AG88ZY.js} +0 -0
- /package/dist/web/assets/{julia-XRhmV3AN.js → julia-CN8U9648.js} +0 -0
- /package/dist/web/assets/{kotlin-DOd3J5vr.js → kotlin-gNNgpJhY.js} +0 -0
- /package/dist/web/assets/{less-veZSnyw6.js → less-C3SY2L8t.js} +0 -0
- /package/dist/web/assets/{lexon-QWGkuK0H.js → lexon-CznnqzUX.js} +0 -0
- /package/dist/web/assets/{lua-CYGpjuO5.js → lua-f3xyJgy5.js} +0 -0
- /package/dist/web/assets/{m3-yNnrZkdc.js → m3-Cl7J89p-.js} +0 -0
- /package/dist/web/assets/{markdown-BCSWEPSX.js → markdown-Bv2fnzzT.js} +0 -0
- /package/dist/web/assets/{mips-OpYmcC30.js → mips-D6rXUTWa.js} +0 -0
- /package/dist/web/assets/{msdax-2oxoTO9Z.js → msdax-Bb1N2x5J.js} +0 -0
- /package/dist/web/assets/{mysql-5KlC-K_9.js → mysql-DXSr6oD7.js} +0 -0
- /package/dist/web/assets/{object-utils-I4gWdSnS.js → object-utils-Cm2M3fPO.js} +0 -0
- /package/dist/web/assets/{objective-c-CcDCgtLx.js → objective-c-CEJiVkDa.js} +0 -0
- /package/dist/web/assets/{pascal-BZGsbaEV.js → pascal-BtkMEIba.js} +0 -0
- /package/dist/web/assets/{pascaligo-DtD5qU3G.js → pascaligo-C7FAwqk7.js} +0 -0
- /package/dist/web/assets/{perl-C1jNNS3E.js → perl-D9kqkBbN.js} +0 -0
- /package/dist/web/assets/{pgsql-CT0fhiZa.js → pgsql-BjGTBL1W.js} +0 -0
- /package/dist/web/assets/{php-D6DrXoPM.js → php-BN0c0noA.js} +0 -0
- /package/dist/web/assets/{pla-b3-HN2pF.js → pla-B94QTqOt.js} +0 -0
- /package/dist/web/assets/{postiats-Bin2ApVS.js → postiats-DH91dqBs.js} +0 -0
- /package/dist/web/assets/{powerquery-7ASnn-ZG.js → powerquery-D7P0oUen.js} +0 -0
- /package/dist/web/assets/{powershell-t4p7sU1H.js → powershell-CCVHmJax.js} +0 -0
- /package/dist/web/assets/{preload-helper-Dd-HcVz_.js → preload-helper-DgFuoWHe.js} +0 -0
- /package/dist/web/assets/{protobuf-BUGeWa_j.js → protobuf-BIP7pixC.js} +0 -0
- /package/dist/web/assets/{pug-BuKcgC9s.js → pug-DcbLK7HH.js} +0 -0
- /package/dist/web/assets/{qsharp-DxLLX8mo.js → qsharp-B-VY_WOG.js} +0 -0
- /package/dist/web/assets/{r-DMlFgn7A.js → r-DwRtsJsj.js} +0 -0
- /package/dist/web/assets/{redis-cXItkC5u.js → redis-CaW0tkwu.js} +0 -0
- /package/dist/web/assets/{redshift-BZVbW7HE.js → redshift-3tS8G0ME.js} +0 -0
- /package/dist/web/assets/{restructuredtext-BzjxwS8h.js → restructuredtext-_TNyGyK0.js} +0 -0
- /package/dist/web/assets/{ruby-C5nyLV4l.js → ruby-A-MwVfO4.js} +0 -0
- /package/dist/web/assets/{rust-BcmMsHdf.js → rust-oemlUIvG.js} +0 -0
- /package/dist/web/assets/{sb-Dnb1iy6B.js → sb-BDZuaI3W.js} +0 -0
- /package/dist/web/assets/{scala-anMIFYpA.js → scala-Bfo2loK4.js} +0 -0
- /package/dist/web/assets/{scheme-BItQTe08.js → scheme-N2eo7rjB.js} +0 -0
- /package/dist/web/assets/{scss-BOv51BJ5.js → scss-vjjSCTgN.js} +0 -0
- /package/dist/web/assets/{shell-BsRYRTNN.js → shell-Bfb9Yq6w.js} +0 -0
- /package/dist/web/assets/{solidity-BtuLgGDx.js → solidity-C9RbukzG.js} +0 -0
- /package/dist/web/assets/{sophia-B0Vkc5MF.js → sophia-DWV_MWOg.js} +0 -0
- /package/dist/web/assets/{sparql-B7lvkZQM.js → sparql-iMXILWhh.js} +0 -0
- /package/dist/web/assets/{sql-DvP5MpA3.js → sql-CJDj31JM.js} +0 -0
- /package/dist/web/assets/{st-GVUeyB3U.js → st-BG9AQ1OO.js} +0 -0
- /package/dist/web/assets/{swift-DSPIoCjm.js → swift-B579DvHm.js} +0 -0
- /package/dist/web/assets/{systemverilog-Icj2-k23.js → systemverilog-BNgaF3ZX.js} +0 -0
- /package/dist/web/assets/{tcl-Cd8KQcm-.js → tcl-grdtJiUA.js} +0 -0
- /package/dist/web/assets/{twig-CBHmt8z3.js → twig-JAsFXBZw.js} +0 -0
- /package/dist/web/assets/{typespec-Ckc037mq.js → typespec-D3hIQXEU.js} +0 -0
- /package/dist/web/assets/{vb-B97GW9Wb.js → vb-H38jRcEz.js} +0 -0
- /package/dist/web/assets/{wgsl-DIKmb3YH.js → wgsl-BC5Grc5r.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,B as t,F as n,Ft as r,H as i,It as a,K as o,L as s,Lt as c,M as l,N as ee,Pt as u,S as d,U as f,X as p,_ as m,d as h,et as g,g as _,h as v,ht as y,lt as b,m as x,nt as S,tt as C,v as w,w as T,x as E}from"./button-Cdgr9Igy.js";var D=1,O=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:D++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(t instanceof Function?t():t),a=r!==void 0,o,s=i.then(async t=>{if(o=[`resolve`,t],e(t))a=!1,this.create({id:r,type:`default`,message:t});else if(A(t)&&!t.ok){a=!1;let i=typeof n.error==`function`?await n.error(`HTTP error! status: ${t.status}`):n.error,o=typeof n.description==`function`?await n.description(`HTTP error! status: ${t.status}`):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}else if(t instanceof Error){a=!1;let i=typeof n.error==`function`?await n.error(t):n.error,o=typeof n.description==`function`?await n.description(t):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}else if(n.success!==void 0){a=!1;let i=typeof n.success==`function`?await n.success(t):n.success,o=typeof n.description==`function`?await n.description(t):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`success`,description:o,...s})}}).catch(async t=>{if(o=[`reject`,t],n.error!==void 0){a=!1;let i=typeof n.error==`function`?await n.error(t):n.error,o=typeof n.description==`function`?await n.description(t):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:c}:Object.assign(r,{unwrap:c})};custom=(e,t)=>{let n=t?.id||D++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function k(e,t){let n=t?.id||D++;return O.create({message:e,id:n,type:`default`,...t}),n}var A=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,j=Object.assign(k,{success:O.success,info:O.info,warning:O.warning,error:O.error,custom:O.custom,message:O.message,promise:O.promise,dismiss:O.dismiss,loading:O.loading},{getHistory:()=>O.toasts,getToasts:()=>O.getActiveToasts()});function M(e){return e.label!==void 0}var N=3,P=`24px`,F=`16px`,te=4e3,ne=356,I=14,re=45,ie=200;function ae(){let e=b(!1);return C(()=>{let t=()=>{e.value=document.hidden};return document.addEventListener(`visibilitychange`,t),()=>window.removeEventListener(`visibilitychange`,t)}),{isDocumentHidden:e}}function L(...e){return e.filter(Boolean).join(` `)}function oe(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function se(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?F:P;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ce=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],le=[`aria-label`,`data-disabled`,`data-close-button-position`],ue=T({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(e,{emit:i}){let d=e,p=i,S=b(null),T=b(null),D=b(!1),O=b(!1),k=b(!1),A=b(!1),j=b(!1),N=b(0),P=b(0),F=b(d.toast.duration||d.duration||te),ne=b(null),I=b(null),se=x(()=>d.index===0),ue=x(()=>d.index+1<=d.visibleToasts),R=x(()=>d.toast.type),z=x(()=>d.toast.dismissible!==!1),de=x(()=>d.toast.class||``),fe=x(()=>d.descriptionClass||``),pe=x(()=>{let e=d.toast.position||d.position,t=d.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===d.toast.id);return t>=0?t:0}),me=x(()=>{let e=d.toast.position||d.position;return d.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=pe.value?e:e+t.height,0)}),B=x(()=>pe.value*d.gap+me.value||0),he=x(()=>d.toast.closeButton??d.closeButton),ge=x(()=>d.toast.duration||d.duration||te),_e=b(0),ve=b(0),V=b(null),ye=x(()=>d.position.split(`-`)),be=x(()=>ye.value[0]),xe=x(()=>ye.value[1]),Se=x(()=>typeof d.toast.title!=`string`),Ce=x(()=>typeof d.toast.description!=`string`),{isDocumentHidden:we}=ae(),H=x(()=>R.value&&R.value===`loading`);s(()=>{D.value=!0,F.value=ge.value}),C(async()=>{if(!D.value||!I.value)return;await ee();let e=I.value,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,P.value=n,p(`update:height`,{toastId:d.toast.id,height:n,position:d.toast.position||d.position})});function U(){O.value=!0,N.value=B.value,setTimeout(()=>{p(`removeToast`,d.toast)},ie)}function Te(){if(H.value||!z.value)return{};U(),d.toast.onDismiss?.(d.toast)}function Ee(e){e.button!==2&&(H.value||!z.value||(ne.value=new Date,N.value=B.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(k.value=!0,V.value={x:e.clientX,y:e.clientY})))}function De(){if(A.value||!z.value)return;V.value=null;let e=Number(I.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),n=new Date().getTime()-(ne.value?.getTime()||0),r=S.value===`x`?e:t,i=Math.abs(r)/n;if(Math.abs(r)>=re||i>.11){N.value=B.value,d.toast.onDismiss?.(d.toast),S.value===`x`?T.value=e>0?`right`:`left`:T.value=t>0?`down`:`up`,U(),A.value=!0;return}else I.value?.style.setProperty(`--swipe-amount-x`,`0px`),I.value?.style.setProperty(`--swipe-amount-y`,`0px`);j.value=!1,k.value=!1,S.value=null}function Oe(e){if(!V.value||!z.value||(window?.getSelection()?.toString()?.length??!1))return;let t=e.clientY-V.value.y,n=e.clientX-V.value.x,r=d.swipeDirections??oe(d.position);!S.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(S.value=Math.abs(n)>Math.abs(t)?`x`:`y`);let i={x:0,y:0},a=e=>1/(1.5+Math.abs(e)/20);if(S.value===`y`){if(r.includes(`top`)||r.includes(`bottom`))if(r.includes(`top`)&&t<0||r.includes(`bottom`)&&t>0)i.y=t;else{let e=t*a(t);i.y=Math.abs(e)<Math.abs(t)?e:t}}else if(S.value===`x`&&(r.includes(`left`)||r.includes(`right`)))if(r.includes(`left`)&&n<0||r.includes(`right`)&&n>0)i.x=n;else{let e=n*a(n);i.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(i.x)>0||Math.abs(i.y)>0)&&(j.value=!0),I.value?.style.setProperty(`--swipe-amount-x`,`${i.x}px`),I.value?.style.setProperty(`--swipe-amount-y`,`${i.y}px`)}s(()=>{if(D.value=!0,!I.value)return;let e=I.value.getBoundingClientRect().height;P.value=e,p(`update:heights`,[{toastId:d.toast.id,height:e,position:d.toast.position},...d.heights])}),n(()=>{I.value&&p(`removeToast`,d.toast)}),C(e=>{if(d.toast.promise&&R.value===`loading`||d.toast.duration===1/0||d.toast.type===`loading`)return;let t;d.expanded||d.interacting||we.value?(()=>{if(ve.value<_e.value){let e=new Date().getTime()-_e.value;F.value-=e}ve.value=new Date().getTime()})():F.value!==1/0&&(_e.value=new Date().getTime(),t=setTimeout(()=>{d.toast.onAutoClose?.(d.toast),U()},F.value)),e(()=>{clearTimeout(t)})}),g(()=>d.toast.delete,e=>{e!==void 0&&e&&(U(),d.toast.onDismiss?.(d.toast))},{deep:!0});function ke(){k.value=!1,S.value=null,V.value=null}return(e,n)=>(t(),w(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:I,class:u(y(L)(d.class,de.value,e.classes?.toast,e.toast.classes?.toast,e.classes?.[R.value],e.toast?.classes?.[R.value])),"data-sonner-toast":``,"data-rich-colors":e.toast.richColors??e.defaultRichColors,"data-styled":!(e.toast.component||e.toast?.unstyled||e.unstyled),"data-mounted":D.value,"data-promise":!!e.toast.promise,"data-swiped":j.value,"data-removed":O.value,"data-visible":ue.value,"data-y-position":be.value,"data-x-position":xe.value,"data-index":e.index,"data-front":se.value,"data-swiping":k.value,"data-dismissible":z.value,"data-type":R.value,"data-invert":e.toast.invert||e.invert,"data-swipe-out":A.value,"data-swipe-direction":T.value,"data-expanded":!!(e.expanded||e.expandByDefault&&D.value),"data-testid":e.toast.testId,style:a({"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${O.value?N.value:B.value}px`,"--initial-height":e.expandByDefault?`auto`:`${P.value}px`,...e.style,...d.toast.style}),onDragend:ke,onPointerdown:Ee,onPointerup:De,onPointermove:Oe},[he.value&&!e.toast.component&&R.value!==`loading`?(t(),w(`button`,{key:0,"aria-label":e.closeButtonAriaLabel||`Close toast`,"data-disabled":H.value,"data-close-button":`true`,"data-close-button-position":e.closeButtonPosition,class:u(y(L)(e.classes?.closeButton,e.toast?.classes?.closeButton)),onClick:Te},[e.icons?.close?(t(),_(o(e.icons?.close),{key:0})):f(e.$slots,`close-icon`,{key:1})],10,le)):m(`v-if`,!0),e.toast.component?(t(),_(o(e.toast.component),l({key:1},e.toast.componentProps,{onCloseToast:Te,isPaused:e.$props.expanded||e.$props.interacting||y(we)}),null,16,[`isPaused`])):(t(),w(h,{key:2},[R.value!==`default`||e.toast.icon||e.toast.promise?(t(),w(`div`,{key:0,"data-icon":``,class:u(y(L)(e.classes?.icon,e.toast?.classes?.icon))},[e.toast.icon?(t(),_(o(e.toast.icon),{key:0})):(t(),w(h,{key:1},[R.value===`loading`?f(e.$slots,`loading-icon`,{key:0}):R.value===`success`?f(e.$slots,`success-icon`,{key:1}):R.value===`error`?f(e.$slots,`error-icon`,{key:2}):R.value===`warning`?f(e.$slots,`warning-icon`,{key:3}):R.value===`info`?f(e.$slots,`info-icon`,{key:4}):m(`v-if`,!0)],64))],2)):m(`v-if`,!0),v(`div`,{"data-content":``,class:u(y(L)(e.classes?.content,e.toast?.classes?.content))},[v(`div`,{"data-title":``,class:u(y(L)(e.classes?.title,e.toast.classes?.title))},[Se.value?(t(),_(o(e.toast.title),r(l({key:0},e.toast.componentProps)),null,16)):(t(),w(h,{key:1},[E(c(e.toast.title),1)],64))],2),e.toast.description?(t(),w(`div`,{key:0,"data-description":``,class:u(y(L)(e.descriptionClass,fe.value,e.classes?.description,e.toast.classes?.description))},[Ce.value?(t(),_(o(e.toast.description),r(l({key:0},e.toast.componentProps)),null,16)):(t(),w(h,{key:1},[E(c(e.toast.description),1)],64))],2)):m(`v-if`,!0)],2),e.toast.cancel?(t(),w(`button`,{key:1,style:a(e.toast.cancelButtonStyle||e.cancelButtonStyle),class:u(y(L)(e.classes?.cancelButton,e.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:n[0]||=t=>{y(M)(e.toast.cancel)&&z.value&&(e.toast.cancel.onClick?.(t),U())}},c(y(M)(e.toast.cancel)?e.toast.cancel?.label:e.toast.cancel),7)):m(`v-if`,!0),e.toast.action?(t(),w(`button`,{key:2,style:a(e.toast.actionButtonStyle||e.actionButtonStyle),class:u(y(L)(e.classes?.actionButton,e.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:n[1]||=t=>{y(M)(e.toast.action)&&(e.toast.action.onClick?.(t),!t.defaultPrevented&&U())}},c(y(M)(e.toast.action)?e.toast.action?.label:e.toast.action),7)):m(`v-if`,!0)],64))],46,ce))}}),R=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},z={},de={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function fe(e,n){return t(),w(`svg`,de,n[0]||=[v(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),v(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var pe=R(z,[[`render`,fe]]),me=[`data-visible`],B={class:`sonner-spinner`},he=T({__name:`Loader`,props:{visible:{type:Boolean}},setup(e){let n=Array(12).fill(0);return(e,r)=>(t(),w(`div`,{class:`sonner-loading-wrapper`,"data-visible":e.visible},[v(`div`,B,[(t(!0),w(h,null,i(y(n),e=>(t(),w(`div`,{key:`spinner-bar-${e}`,class:`sonner-loading-bar`}))),128))])],8,me))}}),ge={},_e={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function ve(e,n){return t(),w(`svg`,_e,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var V=R(ge,[[`render`,ve]]),ye={},be={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function xe(e,n){return t(),w(`svg`,be,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var Se=R(ye,[[`render`,xe]]),Ce={},we={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function H(e,n){return t(),w(`svg`,we,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var U=R(Ce,[[`render`,H]]),Te={},Ee={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function De(e,n){return t(),w(`svg`,Ee,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var Oe=R(Te,[[`render`,De]]),ke=[`aria-label`],Ae=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`],je=typeof window<`u`&&typeof document<`u`;function Me(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}var Ne=T({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{id:{},invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},closeButtonPosition:{default:`top-left`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:I},visibleToasts:{default:N},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:P},mobileOffset:{default:F},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(e){let n=e,r=p(),o=b([]),s=x(()=>n.id?o.value.filter(e=>e.toasterId===n.id):o.value.filter(e=>!e.toasterId));function c(e,t){return s.value.filter(n=>!n.position&&t===0||n.position===e)}let g=x(()=>{let e=s.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([n.position].concat(e))):[n.position]}),T=x(()=>{let e={};return g.value.forEach(t=>{e[t]=o.value.filter(e=>e.position===t)}),e}),E=b([]),D=b({}),k=b(!1);C(()=>{g.value.forEach(e=>{e in D.value||(D.value[e]=!1)})});let A=b(n.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:n.theme),j=b(null),M=b(null),N=b(!1),P=n.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function F(e){o.value.find(t=>t.id===e.id)?.delete||O.dismiss(e.id),o.value=o.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{o.value.find(t=>t.id===e.id)||(E.value=E.value.filter(t=>t.toastId!==e.id))},ie+50)}function te(e){N.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(N.value=!1,M.value&&=(M.value.focus({preventScroll:!0}),null))}function I(e){e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N.value||(N.value=!0,M.value=e.relatedTarget)}function re(e){e.target&&e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||(k.value=!0)}C(e=>{e(O.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}ee(()=>{let t=o.value.findIndex(t=>t.id===e.id);t===-1?o.value=[e,...o.value]:o.value=[...o.value.slice(0,t),{...o.value[t],...e},...o.value.slice(t+1)]})}))}),C(e=>{if(typeof window>`u`)return;if(n.theme!==`system`){A.value=n.theme;return}let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=e=>{A.value=e?`dark`:`light`};r(t.matches);let i=e=>{r(e.matches)};try{t.addEventListener(`change`,i)}catch{t.addListener(i)}e(()=>{try{t.removeEventListener(`change`,i)}catch{t.removeListener(i)}})}),C(()=>{j.value&&M.value&&(M.value.focus({preventScroll:!0}),M.value=null,N.value=!1)}),C(()=>{o.value.length<=1&&Object.keys(D.value).forEach(e=>{D.value[e]=!1})}),C(e=>{function t(e){let t=n.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(j.value)?j.value[0]:j.value;t&&(g.value.forEach(e=>{D.value[e]=!0}),r?.focus());let i=document.activeElement===j.value||r?.contains(document.activeElement);e.code===`Escape`&&i&&g.value.forEach(e=>{D.value[e]=!1})}je&&(document.addEventListener(`keydown`,t),e(()=>{document.removeEventListener(`keydown`,t)}))});function ae(e){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);D.value[n]=!0}function L(e){if(!k.value){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);D.value[n]=!1}}function oe(){Object.keys(D.value).forEach(e=>{D.value[e]=!1})}function ce(){k.value=!1}function le(e){E.value=e}function R(e){let t=E.value.findIndex(t=>t.toastId===e.toastId);if(t!==-1)E.value[t]=e;else{let t=E.value.findIndex(t=>t.position===e.position);t===-1?E.value.unshift(e):E.value.splice(t,0,e)}}return(e,o)=>(t(),w(h,null,[m(` Remove item from normal navigation flow, only available via hotkey `),v(`section`,{"aria-label":`${e.containerAriaLabel} ${y(P)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(t(!0),w(h,null,i(g.value,(o,s)=>(t(),w(`ol`,l({key:o,ref_for:!0,ref_key:`listRef`,ref:j,"data-sonner-toaster":``,"data-sonner-theme":A.value,class:n.class,dir:e.dir===`auto`?Me():e.dir,tabIndex:-1,"data-theme":e.theme,"data-rich-colors":e.richColors,"data-y-position":o.split(`-`)[0],"data-x-position":o.split(`-`)[1],style:{"--front-toast-height":`${E.value[0]?.height||0}px`,"--width":`${y(ne)}px`,"--gap":`${e.gap}px`,...e.style,...y(r).style,...y(se)(e.offset,e.mobileOffset)}},{ref_for:!0},e.$attrs,{onBlur:te,onFocus:I,onMouseenter:ae,onMousemove:ae,onMouseleave:L,onDragend:oe,onPointerdown:re,onPointerup:ce}),[(t(!0),w(h,null,i(c(o,s),(r,i)=>(t(),_(ue,{key:r.id,heights:E.value,icons:e.icons,index:i,toast:r,defaultRichColors:e.richColors,duration:e.toastOptions?.duration??e.duration,class:u(e.toastOptions?.class??``),descriptionClass:e.toastOptions?.descriptionClass,invert:e.invert,visibleToasts:e.visibleToasts,closeButton:e.toastOptions?.closeButton??e.closeButton,interacting:k.value,position:o,closeButtonPosition:e.toastOptions?.closeButtonPosition??e.closeButtonPosition,style:a(e.toastOptions?.style),unstyled:e.toastOptions?.unstyled,classes:e.toastOptions?.classes,cancelButtonStyle:e.toastOptions?.cancelButtonStyle,actionButtonStyle:e.toastOptions?.actionButtonStyle,"close-button-aria-label":e.toastOptions?.closeButtonAriaLabel,toasts:T.value[o],expandByDefault:e.expand,gap:e.gap,expanded:D.value[o]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":le,"onUpdate:height":R,onRemoveToast:F},{"close-icon":S(()=>[f(e.$slots,`close-icon`,{},()=>[d(pe)])]),"loading-icon":S(()=>[f(e.$slots,`loading-icon`,{},()=>[d(he,{visible:r.type===`loading`},null,8,[`visible`])])]),"success-icon":S(()=>[f(e.$slots,`success-icon`,{},()=>[d(V)])]),"error-icon":S(()=>[f(e.$slots,`error-icon`,{},()=>[d(Oe)])]),"warning-icon":S(()=>[f(e.$slots,`warning-icon`,{},()=>[d(U)])]),"info-icon":S(()=>[f(e.$slots,`info-icon`,{},()=>[d(Se)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`closeButtonPosition`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,Ae))),128))],8,ke)],2112))}}),W=class extends Error{name=`KyError`;get isKyError(){return!0}},Pe=class extends W{name=`HTTPError`;response;request;options;data;constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=n}},Fe=class extends W{name=`NetworkError`;request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},Ie=class extends Error{name=`NonError`;value;constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),this.value=e}},G=class extends W{name=`ForceRetryError`;customDelay;code;customRequest;constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new Ie(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},Le=class extends Error{name=`SchemaValidationError`;issues;constructor(e){super(`Response schema validation failed`),this.issues=e}},K=class extends W{name=`TimeoutError`;request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},Re=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),ze=typeof globalThis.AbortController==`function`,Be=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,Ve=typeof globalThis.ReadableStream==`function`,He=typeof globalThis.FormData==`function`,Ue=[`get`,`post`,`put`,`patch`,`head`,`delete`],We={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},Ge=2147483647,Ke=Symbol(`stop`),qe=class{options;constructor(e){this.options=e}},Je=e=>new qe(e),Ye={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Xe={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Ze=new TextEncoder,Qe=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=40,t+=Ze.encode(`Content-Disposition: form-data; name="${n}"`).byteLength,t+=typeof r==`string`?Ze.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof e==`string`?Ze.encode(e).byteLength:e instanceof URLSearchParams?Ze.encode(e.toString()).byteLength:0},$e=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},et=(e,t)=>{if(!e.body)return e;let n={status:e.status,statusText:e.statusText,headers:e.headers};if(e.status===204)return new Response(null,n);let r=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response($e(e.body,r,t),n)},tt=(e,t,n)=>{if(!e.body)return e;let r=Qe(n??e.body);return new Request(e,{duplex:`half`,body:$e(e.body,r,t)})},q=e=>typeof e==`object`&&!!e,nt=Symbol(`replaceOption`),rt=e=>q(e)&&e[nt]===!0?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},it=(...e)=>{for(let t of e)if((!q(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return dt({},...e)},at=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n},ot=e=>{if(!q(e)||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},J=e=>{if(e instanceof URLSearchParams){let t=new URLSearchParams(e),n=e[X];return n&&(t[X]=new Set(n)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:ot(e)?{...e}:e},st=e=>Object.fromEntries(Object.entries(e).filter(e=>e[1]!==void 0)),ct=(e,t)=>ot(e)&&ot(t)?st({...e,...t}):at(e,t);function Y(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:dt(e[n]??[],t[n]??[])}var lt=(e={},t={})=>({init:Y(e,t,`init`),beforeRequest:Y(e,t,`beforeRequest`),beforeRetry:Y(e,t,`beforeRetry`),beforeError:Y(e,t,`beforeError`),afterResponse:Y(e,t,`afterResponse`)}),X=Symbol(`deletedParameters`),ut=(e,t)=>{let n=new URLSearchParams,r=new Set;for(let i of[e,t])if(i!==void 0)if(i instanceof URLSearchParams){for(let[e,t]of i.entries())n.append(e,t),r.delete(e);let e=i[X];if(e)for(let t of e)n.delete(t),r.add(t)}else if(Array.isArray(i))for(let e of i){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1])),r.delete(String(e[0]))}else if(q(i))for(let[e,t]of Object.entries(i))t===void 0?(n.delete(e),r.add(e)):(n.append(e,String(t)),r.delete(e));else{let e=new URLSearchParams(i);for(let[t,i]of e.entries())n.append(t,i),r.delete(t)}return r.size>0&&(n[X]=r),n},dt=(...e)=>{let t={},n={},r={},i,a=[];for(let o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(q(o)){for(let[e,n]of Object.entries(o)){if(e===`signal`&&n instanceof globalThis.AbortSignal){a.push(n);continue}let r=rt(n),{isReplace:o}=r;if(n=r.value,e===`context`){if(n!=null&&(!q(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");t={...t,context:n==null?{}:o?{...n}:{...t.context,...n}};continue}if(e===`searchParams`){i=n==null?void 0:o||i===void 0?n:ut(i,n);continue}q(n)&&!o&&e in t&&(n=dt(t[e],n)),t={...t,[e]:n}}if(q(o.hooks)){let{value:e,isReplace:n}=rt(o.hooks);r=lt(n?{}:r,e),t.hooks=r}if(q(o.headers)){let{value:e,isReplace:r}=rt(o.headers);n=r?J(e):ct(n,e),t.headers=n}}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:Be?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},ft=e=>Ue.includes(e)?e.toUpperCase():e,pt={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},mt=(e={})=>{if(typeof e==`number`)return{...pt,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>e!==void 0));return{...pt,...t}};async function ht(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new K(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function gt(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var _t=e=>{let t={};for(let n in e)Object.hasOwn(e,n)&&!(n in Xe)&&!(n in Ye)&&(t[n]=e[n]);return t},vt=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||!!e[X]?.size:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e,yt=Object.prototype.toString,bt=e=>yt.call(e)===`[object Error]`,xt=new Set([`network error`,`NetworkError when attempting to fetch resource.`,`The Internet connection appears to be offline.`,`Network request failed`,`fetch failed`,`terminated`,` A network error occurred.`,`Network connection lost`]);function St(e){if(!(e&&bt(e)&&e.name===`TypeError`&&typeof e.message==`string`))return!1;let{message:t,stack:n}=e;return t===`Load failed`?n===void 0||`__sentry_captured__`in e:t.startsWith(`error sending request for url`)||t===`Failed to fetch`||t.startsWith(`Failed to fetch (`)&&t.endsWith(`)`)?!0:xt.has(t)}var Ct=(e,t)=>e instanceof t||e?.name===t.name;function wt(e){return Ct(e,Pe)}function Tt(e){return Ct(e,Fe)}function Et(e){return Ct(e,K)}var Dt=10*1024*1024,Ot="The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl",Z=Symbol(`timedOutResponseData`),kt=e=>{let t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),n=t?.[1]??t?.[2];if(n)try{return new TextDecoder(n)}catch{}return new TextDecoder},At="The `schema` argument must follow the Standard Schema specification",jt=e=>typeof e==`object`?{...e,...e.methods&&{methods:[...e.methods]},...e.statusCodes&&{statusCodes:[...e.statusCodes]},...e.afterStatusCodes&&{afterStatusCodes:[...e.afterStatusCodes]}}:e,Mt=Object.prototype.toString,Nt=e=>e instanceof globalThis.Request||Mt.call(e)===`[object Request]`,Q=e=>e instanceof globalThis.Response||Mt.call(e)===`[object Response]`,Pt=e=>Array.isArray(e)?e.map(e=>[...e]):J(e);function Ft(e){let t={...e,json:J(e.json),context:J(e.context),headers:J(e.headers),searchParams:Pt(e.searchParams)};return e.retry!==void 0&&(t.retry=jt(e.retry)),t}var It=async(e,t)=>{if(typeof t!=`object`&&typeof t!=`function`||t===null)throw TypeError(At);let n=t[`~standard`];if(typeof n!=`object`||!n||typeof n.validate!=`function`)throw TypeError(At);let r=await n.validate(e);if(r.issues)throw new Le(r.issues);return r.value},Lt=class e{static create(t,n){let r=n.hooks?.init??[],i=r.length>0?Ft(n):n;for(let e of r)e(i);let a=new e(t,i),o=async()=>{if(typeof a.#i.timeout==`number`&&a.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${Ge}`);if(typeof a.#i.totalTimeout==`number`&&a.#i.totalTimeout>2147483647)throw RangeError(`The \`totalTimeout\` option cannot be greater than ${Ge}`);await Promise.resolve();let e=await a.#w(),t=e??await a.#E(async()=>a.#k()),n=e!==void 0||a.#O();for(;;){if(t===void 0)return t;if(Q(t))try{t=await a.#T(t)}catch(e){if(!(e instanceof G))throw e;let r=await a.#D(e,async()=>a.#k());if(r===void 0)return r;t=r,n=a.#O();continue}let e=t;if(!e.ok&&e.type!==`opaque`&&(typeof a.#i.throwHttpErrors==`function`?a.#i.throwHttpErrors(e.status):a.#i.throwHttpErrors)){let r=new Pe(e,a.#P(e),a.#M()),i=r;if(r.data=await a.#h(e),n)throw i;let o=await a.#D(r,async()=>a.#k());if(o===void 0)return o;t=o,n=a.#O();continue}break}if(!Q(t))return t;if(a.#m(t),a.#i.onDownloadProgress){if(typeof a.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!Ve)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let e=t.clone();return a.#x(t),et(e,a.#i.onDownloadProgress)}return t},s=(async()=>{try{return await o()}catch(e){if(!(e instanceof Error)||a.#s.has(e))throw e;let t=e;for(let e of a.#i.hooks.beforeError){let n=await e({request:a.request,options:a.#M(),error:t,retryCount:a.#n});n instanceof Error&&(t=n)}throw t}finally{let e=a.#a;a.#b(e?.body??void 0),a.request!==e&&a.#b(a.request.body??void 0)}})();for(let[e,t]of Object.entries(We))e===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(s[e]=async n=>{a.request.headers.set(`accept`,a.request.headers.get(`accept`)||t);let r=await s;if(e!==`json`)return r[e]();let o=await r.text();if(o===``)return n===void 0?JSON.parse(o):It(void 0,n);let c=i.parseJson?await i.parseJson(o,{request:a.#P(r),response:r}):JSON.parse(o);return n===void 0?c:It(c,n)});return s}static#e(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}request;#t;#n=0;#r;#i;#a;#o;#s=new WeakSet;#c;#l;#u=!1;#d=new WeakMap;constructor(t,n={}){if(this.#r=t,Object.hasOwn(n,`prefixUrl`))throw Error(Ot);if(this.#i={...n,headers:at(this.#r.headers,n.headers),hooks:lt({},n.hooks),method:ft(n.method??this.#r.method??`GET`),prefix:String(n.prefix||``),retry:mt(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,totalTimeout:n.totalTimeout??!1,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(typeof this.#r==`string`&&(this.#i.prefix&&(this.#r=`${this.#i.prefix.replace(/\/+$/,``)}/${this.#r.replace(/^\/+/,``)}`),this.#i.baseUrl)){let e;try{e=new URL(this.#r)}catch{}e||(this.#r=new URL(this.#r,new Request(this.#i.baseUrl).url))}ze&&Be&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#S()),Re&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let r=n.headers&&new globalThis.Headers(n.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(He&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!r&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),vt(this.#i.searchParams)){let t=new URL(this.request.url),n=this.#i.searchParams?.[X];if(n)for(let e of n)t.searchParams.delete(e);if(typeof this.#i.searchParams==`string`){let e=this.#i.searchParams.replace(/^\?/,``);e!==``&&(t.search=t.search?`${t.search}&${e}`:`?${e}`)}else{let n=new URLSearchParams(e.#e(this.#i.searchParams));for(let[e,r]of n.entries())t.searchParams.append(e,r)}if(this.#i.searchParams&&typeof this.#i.searchParams==`object`&&!Array.isArray(this.#i.searchParams)&&!(this.#i.searchParams instanceof URLSearchParams))for(let[e,n]of Object.entries(this.#i.searchParams))n===void 0&&t.searchParams.delete(e);this.request=new globalThis.Request(t,this.#i)}if(this.#i.onUploadProgress&&typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");this.#l=typeof this.#i.totalTimeout==`number`?this.#j():void 0}#f(){let e=this.#i.retry.delay(this.#n+1),t=e;return this.#i.retry.jitter===!0?t=Math.random()*e:typeof this.#i.retry.jitter==`function`&&(t=this.#i.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e)),Math.min(this.#i.retry.backoffLimit,t)}async#p(e){if(this.#n>=this.#i.retry.limit)throw e;let t=e instanceof Error?e:new Ie(e);if(t instanceof G)return t.customDelay??this.#f();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#i.retry.shouldRetry!==void 0){let n=await this.#i.retry.shouldRetry({error:t,retryCount:this.#n+1});if(n===!1)throw e;if(n===!0)return this.#f()}if(Et(e)){if(!this.#i.retry.retryOnTimeout)throw e;return this.#f()}if(wt(e)){if(!this.#i.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&this.#i.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;return Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now()),Number.isFinite(e)?(e=Math.max(0,e),Math.min(this.#i.retry.maxRetryAfter,e)):Math.min(this.#i.retry.maxRetryAfter,this.#f())}if(e.response.status===413)throw e;return this.#f()}if(!Tt(e))throw e;return this.#f()}#m(e){let t=this.#P(e);return this.#i.parseJson&&(e.json=async()=>{let n=await e.text();return n===``?JSON.parse(n):this.#i.parseJson(n,{request:t,response:e})}),e}async#h(e){let t=await this.#v(e,this.#g());if(t===Z){this.#C();return}if(!t)return;if(!this.#_(e.headers.get(`content-type`)??``))return t;let n=await this.#y(t,e,this.#g(),this.#P(e));if(n===Z){this.#C();return}return n}#g(){let e=this.#i.timeout===!1?1e4:this.#i.timeout,t=this.#A();if(t===void 0)return e;if(t<=0)throw new K(this.request);return Math.min(e,t)}#_(e){let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#v(e,t){let{body:n}=e;if(!n)try{return await e.text()}catch{return}let r;try{r=n.getReader()}catch{return}let i=kt(e.headers.get(`content-type`)??``),a=[],o=0,s=(async()=>{try{for(;;){let{done:e,value:t}=await r.read();if(e)break;if(o+=t.byteLength,o>Dt){r.cancel().catch(()=>void 0);return}a.push(i.decode(t,{stream:!0}))}}catch{return}return a.push(i.decode()),a.join(``)})(),c=new Promise(e=>{let n=setTimeout(()=>{e(Z)},t);s.finally(()=>{clearTimeout(n)})}),l=await Promise.race([s,c]);return l===Z&&r.cancel().catch(()=>void 0),l}async#y(e,t,n,r){let i;try{return await Promise.race([Promise.resolve().then(()=>this.#i.parseJson?this.#i.parseJson(e,{request:r,response:t}):JSON.parse(e)),new Promise(e=>{i=setTimeout(()=>{e(Z)},n)})])}catch{return}finally{clearTimeout(i)}}#b(e){e&&e.cancel().catch(()=>void 0)}#x(e){this.#b(e.body??void 0)}#S(){return this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal}#C(){let e=this.#A();if(e!==void 0&&e<=0)throw new K(this.request)}async#w(){for(let e of this.#i.hooks.beforeRequest){let t=await e({request:this.request,options:this.#M(),retryCount:0});if(Nt(t))this.#N(t);else if(Q(t))return t}}async#T(e){let t=this.#P(e);for(let n of this.#i.hooks.afterResponse){let r=this.#F(e.clone(),t);this.#m(r);let i;try{i=await n({request:this.request,options:this.#M(),response:r,retryCount:this.#n})}catch(t){throw r!==e&&this.#x(r),this.#x(e),t}if(i instanceof qe)throw r!==e&&this.#x(r),this.#x(e),new G(i.options);let a=Q(i)?this.#F(i,t):e;r!==e&&r!==a&&r.body!==a.body&&this.#x(r),e!==a&&e.body!==a.body&&this.#x(e),e=a}return e}async#E(e){try{return await e()}catch(t){return this.#D(t,e)}}async#D(e,t){this.#u=!1;let n=Math.min(await this.#p(e),Ge),r={signal:this.#o},i=this.#A();if(i!==void 0){if(i<=0)throw new K(this.request);if(n>=i)throw await gt(i,r),new K(this.request)}if(await gt(n,r),this.#C(),e instanceof G&&e.customRequest){let t=new globalThis.Request(e.customRequest,this.#i.signal?{signal:this.#i.signal}:void 0);this.#N(t)}for(let t of this.#i.hooks.beforeRetry){let n;try{n=await t({request:this.request,options:this.#M(),error:e,retryCount:this.#n+1})}catch(t){throw t instanceof Error&&t!==e&&this.#s.add(t),t}if(Nt(n)){this.#N(n);break}if(Q(n))return this.#u=!0,this.#n++,n;if(n===Ke)return}return this.#C(),this.#n++,this.#E(t)}#O(){let e=this.#u;return this.#u=!1,e}async#k(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#S(),this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));let e=_t(this.#i),t=this.#i.retry.limit>0?this.request.clone():void 0,n=this.#I(this.request,this.#i.body??void 0);this.#a=n,t&&(this.request=t);try{let t=this.#A();if(t!==void 0&&t<=0)throw new K(this.request);let r=this.#i.timeout===!1?t:t===void 0?this.#i.timeout:Math.min(this.#i.timeout,t),i=r===void 0?await this.#i.fetch(n,e):await ht(n,e,this.#t,{timeout:r,fetch:this.#i.fetch});return this.#F(i,n)}catch(e){throw St(e)?new Fe(this.request,{cause:e}):e}}#A(){if(this.#l===void 0)return;let e=this.#j()-this.#l;return Math.max(0,this.#i.totalTimeout-e)}#j(){return globalThis.performance?.now()??Date.now()}#M(){if(!this.#c){let{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:i,timeout:a,totalTimeout:o,throwHttpErrors:s,fetch:c,...l}=this.#i;this.#c=Object.freeze(l)}return this.#c}#N(e){this.#c=void 0,this.request=e}#P(e){return this.#d.get(e)??this.request}#F(e,t){return this.#d.set(e,t),e}#I(e,t){return!this.#i.onUploadProgress||!e.body||!Re?e:tt(e,this.#i.onUploadProgress,t??this.#i.body??void 0)}},Rt=e=>{let t=(t,n)=>Lt.create(t,it(e,n));for(let n of Ue)t[n]=(t,r)=>Lt.create(t,it(e,r,{method:n}));return t.create=e=>Rt(it(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),Rt(it(e,t))),t.stop=Ke,t.retry=Je,t},$=Rt().create({retry:0});async function zt(e,t){if(e instanceof Pe)try{return(await e.response.json()).error||t}catch{return t}return e instanceof Error?e.message:t}async function Bt(){return $.get(`api/schema`).json()}async function Vt(e){return $.get(`api/schema/${encodeURIComponent(e)}`).json()}async function Ht(e,t){try{await $.post(`api/schema/${encodeURIComponent(e)}`,{json:t})}catch(t){throw Error(await zt(t,`Failed to save schema: ${e}`))}}async function Ut(e){try{await $.delete(`api/schema/${encodeURIComponent(e)}`)}catch(t){throw Error(await zt(t,`Failed to delete schema: ${e}`))}}async function Wt(){let e=await $.post(`api/migrate`).json();if(!e.success)throw Error(e.error||`Migration failed`);return e}async function Gt(e){return $.get(`api/prompt-snapshot/${encodeURIComponent(e)}`).json()}async function Kt(){return $.get(`api/ai/config`).json()}async function qt(e){try{await $.put(`api/ai/config`,{json:e})}catch(e){throw Error(await zt(e,`Failed to save AI config`))}}async function Jt(e){let t=await $.post(`api/ai/registry-lookup`,{json:{modelName:e}}).json().catch(()=>null);return!t||typeof t.vision!=`boolean`?null:t}async function Yt(){return $.get(`api/data`).json()}async function Xt(){return $.get(`api/data/tables`).json()}async function Zt(e,t={}){let n=new URLSearchParams;return t.page!==void 0&&n.set(`page`,String(t.page)),t.pageSize!==void 0&&n.set(`pageSize`,String(t.pageSize)),t.search&&n.set(`search`,t.search),t.sortField&&n.set(`sortField`,t.sortField),t.sortOrder&&n.set(`sortOrder`,t.sortOrder),$.get(`api/data/tables/${encodeURIComponent(e)}`,{searchParams:n}).json()}async function Qt(e){return $.get(`api/data/${encodeURIComponent(e)}`).json()}export{Vt as a,Yt as c,Jt as d,qt as f,j as h,Gt as i,Bt as l,Ne as m,Kt as n,Zt as o,Ht as p,Qt as r,Xt as s,Ut as t,Wt as u};
|
|
1
|
+
import{A as e,B as t,F as n,Ft as r,H as i,It as a,K as o,L as s,Lt as c,M as l,N as ee,Pt as u,S as d,U as f,X as p,_ as m,d as h,et as g,g as _,h as v,ht as y,lt as b,m as x,nt as S,tt as C,v as w,w as T,x as E}from"./button-Cdgr9Igy.js";var D=1,O=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:D++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(t instanceof Function?t():t),a=r!==void 0,o,s=i.then(async t=>{if(o=[`resolve`,t],e(t))a=!1,this.create({id:r,type:`default`,message:t});else if(A(t)&&!t.ok){a=!1;let i=typeof n.error==`function`?await n.error(`HTTP error! status: ${t.status}`):n.error,o=typeof n.description==`function`?await n.description(`HTTP error! status: ${t.status}`):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}else if(t instanceof Error){a=!1;let i=typeof n.error==`function`?await n.error(t):n.error,o=typeof n.description==`function`?await n.description(t):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}else if(n.success!==void 0){a=!1;let i=typeof n.success==`function`?await n.success(t):n.success,o=typeof n.description==`function`?await n.description(t):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`success`,description:o,...s})}}).catch(async t=>{if(o=[`reject`,t],n.error!==void 0){a=!1;let i=typeof n.error==`function`?await n.error(t):n.error,o=typeof n.description==`function`?await n.description(t):n.description,s=typeof i==`object`&&!e(i)?i:{message:i||``,id:r||``};this.create({id:r,type:`error`,description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:c}:Object.assign(r,{unwrap:c})};custom=(e,t)=>{let n=t?.id||D++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function k(e,t){let n=t?.id||D++;return O.create({message:e,id:n,type:`default`,...t}),n}var A=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,j=Object.assign(k,{success:O.success,info:O.info,warning:O.warning,error:O.error,custom:O.custom,message:O.message,promise:O.promise,dismiss:O.dismiss,loading:O.loading},{getHistory:()=>O.toasts,getToasts:()=>O.getActiveToasts()});function M(e){return e.label!==void 0}var N=3,P=`24px`,F=`16px`,te=4e3,ne=356,I=14,re=45,ie=200;function ae(){let e=b(!1);return C(()=>{let t=()=>{e.value=document.hidden};return document.addEventListener(`visibilitychange`,t),()=>window.removeEventListener(`visibilitychange`,t)}),{isDocumentHidden:e}}function L(...e){return e.filter(Boolean).join(` `)}function oe(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function se(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?F:P;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ce=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],le=[`aria-label`,`data-disabled`,`data-close-button-position`],ue=T({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(e,{emit:i}){let d=e,p=i,S=b(null),T=b(null),D=b(!1),O=b(!1),k=b(!1),A=b(!1),j=b(!1),N=b(0),P=b(0),F=b(d.toast.duration||d.duration||te),ne=b(null),I=b(null),se=x(()=>d.index===0),ue=x(()=>d.index+1<=d.visibleToasts),R=x(()=>d.toast.type),z=x(()=>d.toast.dismissible!==!1),de=x(()=>d.toast.class||``),fe=x(()=>d.descriptionClass||``),pe=x(()=>{let e=d.toast.position||d.position,t=d.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===d.toast.id);return t>=0?t:0}),me=x(()=>{let e=d.toast.position||d.position;return d.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=pe.value?e:e+t.height,0)}),B=x(()=>pe.value*d.gap+me.value||0),he=x(()=>d.toast.closeButton??d.closeButton),ge=x(()=>d.toast.duration||d.duration||te),_e=b(0),ve=b(0),V=b(null),ye=x(()=>d.position.split(`-`)),be=x(()=>ye.value[0]),xe=x(()=>ye.value[1]),Se=x(()=>typeof d.toast.title!=`string`),Ce=x(()=>typeof d.toast.description!=`string`),{isDocumentHidden:we}=ae(),H=x(()=>R.value&&R.value===`loading`);s(()=>{D.value=!0,F.value=ge.value}),C(async()=>{if(!D.value||!I.value)return;await ee();let e=I.value,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,P.value=n,p(`update:height`,{toastId:d.toast.id,height:n,position:d.toast.position||d.position})});function U(){O.value=!0,N.value=B.value,setTimeout(()=>{p(`removeToast`,d.toast)},ie)}function Te(){if(H.value||!z.value)return{};U(),d.toast.onDismiss?.(d.toast)}function Ee(e){e.button!==2&&(H.value||!z.value||(ne.value=new Date,N.value=B.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(k.value=!0,V.value={x:e.clientX,y:e.clientY})))}function De(){if(A.value||!z.value)return;V.value=null;let e=Number(I.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),n=new Date().getTime()-(ne.value?.getTime()||0),r=S.value===`x`?e:t,i=Math.abs(r)/n;if(Math.abs(r)>=re||i>.11){N.value=B.value,d.toast.onDismiss?.(d.toast),S.value===`x`?T.value=e>0?`right`:`left`:T.value=t>0?`down`:`up`,U(),A.value=!0;return}else I.value?.style.setProperty(`--swipe-amount-x`,`0px`),I.value?.style.setProperty(`--swipe-amount-y`,`0px`);j.value=!1,k.value=!1,S.value=null}function Oe(e){if(!V.value||!z.value||(window?.getSelection()?.toString()?.length??!1))return;let t=e.clientY-V.value.y,n=e.clientX-V.value.x,r=d.swipeDirections??oe(d.position);!S.value&&(Math.abs(n)>1||Math.abs(t)>1)&&(S.value=Math.abs(n)>Math.abs(t)?`x`:`y`);let i={x:0,y:0},a=e=>1/(1.5+Math.abs(e)/20);if(S.value===`y`){if(r.includes(`top`)||r.includes(`bottom`))if(r.includes(`top`)&&t<0||r.includes(`bottom`)&&t>0)i.y=t;else{let e=t*a(t);i.y=Math.abs(e)<Math.abs(t)?e:t}}else if(S.value===`x`&&(r.includes(`left`)||r.includes(`right`)))if(r.includes(`left`)&&n<0||r.includes(`right`)&&n>0)i.x=n;else{let e=n*a(n);i.x=Math.abs(e)<Math.abs(n)?e:n}(Math.abs(i.x)>0||Math.abs(i.y)>0)&&(j.value=!0),I.value?.style.setProperty(`--swipe-amount-x`,`${i.x}px`),I.value?.style.setProperty(`--swipe-amount-y`,`${i.y}px`)}s(()=>{if(D.value=!0,!I.value)return;let e=I.value.getBoundingClientRect().height;P.value=e,p(`update:heights`,[{toastId:d.toast.id,height:e,position:d.toast.position},...d.heights])}),n(()=>{I.value&&p(`removeToast`,d.toast)}),C(e=>{if(d.toast.promise&&R.value===`loading`||d.toast.duration===1/0||d.toast.type===`loading`)return;let t;d.expanded||d.interacting||we.value?(()=>{if(ve.value<_e.value){let e=new Date().getTime()-_e.value;F.value-=e}ve.value=new Date().getTime()})():F.value!==1/0&&(_e.value=new Date().getTime(),t=setTimeout(()=>{d.toast.onAutoClose?.(d.toast),U()},F.value)),e(()=>{clearTimeout(t)})}),g(()=>d.toast.delete,e=>{e!==void 0&&e&&(U(),d.toast.onDismiss?.(d.toast))},{deep:!0});function ke(){k.value=!1,S.value=null,V.value=null}return(e,n)=>(t(),w(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:I,class:u(y(L)(d.class,de.value,e.classes?.toast,e.toast.classes?.toast,e.classes?.[R.value],e.toast?.classes?.[R.value])),"data-sonner-toast":``,"data-rich-colors":e.toast.richColors??e.defaultRichColors,"data-styled":!(e.toast.component||e.toast?.unstyled||e.unstyled),"data-mounted":D.value,"data-promise":!!e.toast.promise,"data-swiped":j.value,"data-removed":O.value,"data-visible":ue.value,"data-y-position":be.value,"data-x-position":xe.value,"data-index":e.index,"data-front":se.value,"data-swiping":k.value,"data-dismissible":z.value,"data-type":R.value,"data-invert":e.toast.invert||e.invert,"data-swipe-out":A.value,"data-swipe-direction":T.value,"data-expanded":!!(e.expanded||e.expandByDefault&&D.value),"data-testid":e.toast.testId,style:a({"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${O.value?N.value:B.value}px`,"--initial-height":e.expandByDefault?`auto`:`${P.value}px`,...e.style,...d.toast.style}),onDragend:ke,onPointerdown:Ee,onPointerup:De,onPointermove:Oe},[he.value&&!e.toast.component&&R.value!==`loading`?(t(),w(`button`,{key:0,"aria-label":e.closeButtonAriaLabel||`Close toast`,"data-disabled":H.value,"data-close-button":`true`,"data-close-button-position":e.closeButtonPosition,class:u(y(L)(e.classes?.closeButton,e.toast?.classes?.closeButton)),onClick:Te},[e.icons?.close?(t(),_(o(e.icons?.close),{key:0})):f(e.$slots,`close-icon`,{key:1})],10,le)):m(`v-if`,!0),e.toast.component?(t(),_(o(e.toast.component),l({key:1},e.toast.componentProps,{onCloseToast:Te,isPaused:e.$props.expanded||e.$props.interacting||y(we)}),null,16,[`isPaused`])):(t(),w(h,{key:2},[R.value!==`default`||e.toast.icon||e.toast.promise?(t(),w(`div`,{key:0,"data-icon":``,class:u(y(L)(e.classes?.icon,e.toast?.classes?.icon))},[e.toast.icon?(t(),_(o(e.toast.icon),{key:0})):(t(),w(h,{key:1},[R.value===`loading`?f(e.$slots,`loading-icon`,{key:0}):R.value===`success`?f(e.$slots,`success-icon`,{key:1}):R.value===`error`?f(e.$slots,`error-icon`,{key:2}):R.value===`warning`?f(e.$slots,`warning-icon`,{key:3}):R.value===`info`?f(e.$slots,`info-icon`,{key:4}):m(`v-if`,!0)],64))],2)):m(`v-if`,!0),v(`div`,{"data-content":``,class:u(y(L)(e.classes?.content,e.toast?.classes?.content))},[v(`div`,{"data-title":``,class:u(y(L)(e.classes?.title,e.toast.classes?.title))},[Se.value?(t(),_(o(e.toast.title),r(l({key:0},e.toast.componentProps)),null,16)):(t(),w(h,{key:1},[E(c(e.toast.title),1)],64))],2),e.toast.description?(t(),w(`div`,{key:0,"data-description":``,class:u(y(L)(e.descriptionClass,fe.value,e.classes?.description,e.toast.classes?.description))},[Ce.value?(t(),_(o(e.toast.description),r(l({key:0},e.toast.componentProps)),null,16)):(t(),w(h,{key:1},[E(c(e.toast.description),1)],64))],2)):m(`v-if`,!0)],2),e.toast.cancel?(t(),w(`button`,{key:1,style:a(e.toast.cancelButtonStyle||e.cancelButtonStyle),class:u(y(L)(e.classes?.cancelButton,e.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:n[0]||=t=>{y(M)(e.toast.cancel)&&z.value&&(e.toast.cancel.onClick?.(t),U())}},c(y(M)(e.toast.cancel)?e.toast.cancel?.label:e.toast.cancel),7)):m(`v-if`,!0),e.toast.action?(t(),w(`button`,{key:2,style:a(e.toast.actionButtonStyle||e.actionButtonStyle),class:u(y(L)(e.classes?.actionButton,e.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:n[1]||=t=>{y(M)(e.toast.action)&&(e.toast.action.onClick?.(t),!t.defaultPrevented&&U())}},c(y(M)(e.toast.action)?e.toast.action?.label:e.toast.action),7)):m(`v-if`,!0)],64))],46,ce))}}),R=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},z={},de={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function fe(e,n){return t(),w(`svg`,de,n[0]||=[v(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),v(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var pe=R(z,[[`render`,fe]]),me=[`data-visible`],B={class:`sonner-spinner`},he=T({__name:`Loader`,props:{visible:{type:Boolean}},setup(e){let n=Array(12).fill(0);return(e,r)=>(t(),w(`div`,{class:`sonner-loading-wrapper`,"data-visible":e.visible},[v(`div`,B,[(t(!0),w(h,null,i(y(n),e=>(t(),w(`div`,{key:`spinner-bar-${e}`,class:`sonner-loading-bar`}))),128))])],8,me))}}),ge={},_e={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function ve(e,n){return t(),w(`svg`,_e,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var V=R(ge,[[`render`,ve]]),ye={},be={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function xe(e,n){return t(),w(`svg`,be,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var Se=R(ye,[[`render`,xe]]),Ce={},we={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function H(e,n){return t(),w(`svg`,we,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var U=R(Ce,[[`render`,H]]),Te={},Ee={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function De(e,n){return t(),w(`svg`,Ee,n[0]||=[v(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var Oe=R(Te,[[`render`,De]]),ke=[`aria-label`],Ae=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`],je=typeof window<`u`&&typeof document<`u`;function Me(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}var Ne=T({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{id:{},invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},closeButtonPosition:{default:`top-left`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:I},visibleToasts:{default:N},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:P},mobileOffset:{default:F},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(e){let n=e,r=p(),o=b([]),s=x(()=>n.id?o.value.filter(e=>e.toasterId===n.id):o.value.filter(e=>!e.toasterId));function c(e,t){return s.value.filter(n=>!n.position&&t===0||n.position===e)}let g=x(()=>{let e=s.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([n.position].concat(e))):[n.position]}),T=x(()=>{let e={};return g.value.forEach(t=>{e[t]=o.value.filter(e=>e.position===t)}),e}),E=b([]),D=b({}),k=b(!1);C(()=>{g.value.forEach(e=>{e in D.value||(D.value[e]=!1)})});let A=b(n.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:n.theme),j=b(null),M=b(null),N=b(!1),P=n.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function F(e){o.value.find(t=>t.id===e.id)?.delete||O.dismiss(e.id),o.value=o.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{o.value.find(t=>t.id===e.id)||(E.value=E.value.filter(t=>t.toastId!==e.id))},ie+50)}function te(e){N.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(N.value=!1,M.value&&=(M.value.focus({preventScroll:!0}),null))}function I(e){e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N.value||(N.value=!0,M.value=e.relatedTarget)}function re(e){e.target&&e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||(k.value=!0)}C(e=>{e(O.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}ee(()=>{let t=o.value.findIndex(t=>t.id===e.id);t===-1?o.value=[e,...o.value]:o.value=[...o.value.slice(0,t),{...o.value[t],...e},...o.value.slice(t+1)]})}))}),C(e=>{if(typeof window>`u`)return;if(n.theme!==`system`){A.value=n.theme;return}let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=e=>{A.value=e?`dark`:`light`};r(t.matches);let i=e=>{r(e.matches)};try{t.addEventListener(`change`,i)}catch{t.addListener(i)}e(()=>{try{t.removeEventListener(`change`,i)}catch{t.removeListener(i)}})}),C(()=>{j.value&&M.value&&(M.value.focus({preventScroll:!0}),M.value=null,N.value=!1)}),C(()=>{o.value.length<=1&&Object.keys(D.value).forEach(e=>{D.value[e]=!1})}),C(e=>{function t(e){let t=n.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(j.value)?j.value[0]:j.value;t&&(g.value.forEach(e=>{D.value[e]=!0}),r?.focus());let i=document.activeElement===j.value||r?.contains(document.activeElement);e.code===`Escape`&&i&&g.value.forEach(e=>{D.value[e]=!1})}je&&(document.addEventListener(`keydown`,t),e(()=>{document.removeEventListener(`keydown`,t)}))});function ae(e){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);D.value[n]=!0}function L(e){if(!k.value){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);D.value[n]=!1}}function oe(){Object.keys(D.value).forEach(e=>{D.value[e]=!1})}function ce(){k.value=!1}function le(e){E.value=e}function R(e){let t=E.value.findIndex(t=>t.toastId===e.toastId);if(t!==-1)E.value[t]=e;else{let t=E.value.findIndex(t=>t.position===e.position);t===-1?E.value.unshift(e):E.value.splice(t,0,e)}}return(e,o)=>(t(),w(h,null,[m(` Remove item from normal navigation flow, only available via hotkey `),v(`section`,{"aria-label":`${e.containerAriaLabel} ${y(P)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(t(!0),w(h,null,i(g.value,(o,s)=>(t(),w(`ol`,l({key:o,ref_for:!0,ref_key:`listRef`,ref:j,"data-sonner-toaster":``,"data-sonner-theme":A.value,class:n.class,dir:e.dir===`auto`?Me():e.dir,tabIndex:-1,"data-theme":e.theme,"data-rich-colors":e.richColors,"data-y-position":o.split(`-`)[0],"data-x-position":o.split(`-`)[1],style:{"--front-toast-height":`${E.value[0]?.height||0}px`,"--width":`${y(ne)}px`,"--gap":`${e.gap}px`,...e.style,...y(r).style,...y(se)(e.offset,e.mobileOffset)}},{ref_for:!0},e.$attrs,{onBlur:te,onFocus:I,onMouseenter:ae,onMousemove:ae,onMouseleave:L,onDragend:oe,onPointerdown:re,onPointerup:ce}),[(t(!0),w(h,null,i(c(o,s),(r,i)=>(t(),_(ue,{key:r.id,heights:E.value,icons:e.icons,index:i,toast:r,defaultRichColors:e.richColors,duration:e.toastOptions?.duration??e.duration,class:u(e.toastOptions?.class??``),descriptionClass:e.toastOptions?.descriptionClass,invert:e.invert,visibleToasts:e.visibleToasts,closeButton:e.toastOptions?.closeButton??e.closeButton,interacting:k.value,position:o,closeButtonPosition:e.toastOptions?.closeButtonPosition??e.closeButtonPosition,style:a(e.toastOptions?.style),unstyled:e.toastOptions?.unstyled,classes:e.toastOptions?.classes,cancelButtonStyle:e.toastOptions?.cancelButtonStyle,actionButtonStyle:e.toastOptions?.actionButtonStyle,"close-button-aria-label":e.toastOptions?.closeButtonAriaLabel,toasts:T.value[o],expandByDefault:e.expand,gap:e.gap,expanded:D.value[o]||!1,swipeDirections:n.swipeDirections,"onUpdate:heights":le,"onUpdate:height":R,onRemoveToast:F},{"close-icon":S(()=>[f(e.$slots,`close-icon`,{},()=>[d(pe)])]),"loading-icon":S(()=>[f(e.$slots,`loading-icon`,{},()=>[d(he,{visible:r.type===`loading`},null,8,[`visible`])])]),"success-icon":S(()=>[f(e.$slots,`success-icon`,{},()=>[d(V)])]),"error-icon":S(()=>[f(e.$slots,`error-icon`,{},()=>[d(Oe)])]),"warning-icon":S(()=>[f(e.$slots,`warning-icon`,{},()=>[d(U)])]),"info-icon":S(()=>[f(e.$slots,`info-icon`,{},()=>[d(Se)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`closeButtonPosition`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,Ae))),128))],8,ke)],2112))}}),W=class extends Error{name=`KyError`;get isKyError(){return!0}},Pe=class extends W{name=`HTTPError`;response;request;options;data;constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),this.response=e,this.request=t,this.options=n}},Fe=class extends W{name=`NetworkError`;request;constructor(e,t){super(`Request failed due to a network error: ${e.method} ${e.url}`,t),this.request=e}},Ie=class extends Error{name=`NonError`;value;constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),this.value=e}},Le=class extends W{name=`ForceRetryError`;customDelay;code;customRequest;constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new Ie(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},Re=class extends Error{name=`SchemaValidationError`;issues;constructor(e){super(`Response schema validation failed`),this.issues=e}},G=class extends W{name=`TimeoutError`;request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.request=e}},ze=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),Be=typeof globalThis.AbortController==`function`,Ve=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,He=typeof globalThis.ReadableStream==`function`,Ue=typeof globalThis.FormData==`function`,We=[`get`,`post`,`put`,`patch`,`head`,`delete`],Ge={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},Ke=2147483647,qe=Symbol(`stop`),Je=class{options;constructor(e){this.options=e}},Ye=e=>new Je(e),Xe={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,baseUrl:!0,prefix:!0,retry:!0,timeout:!0,totalTimeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Ze={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Qe=new TextEncoder,$e=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=40,t+=Qe.encode(`Content-Disposition: form-data; name="${n}"`).byteLength,t+=typeof r==`string`?Qe.encode(r).byteLength:r.size;return t}return e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof e==`string`?Qe.encode(e).byteLength:e instanceof URLSearchParams?Qe.encode(e.toString()).byteLength:0},et=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},tt=(e,t)=>{if(!e.body)return e;let n={status:e.status,statusText:e.statusText,headers:e.headers};if(e.status===204)return new Response(null,n);let r=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response(et(e.body,r,t),n)},nt=(e,t,n)=>{if(!e.body)return e;let r=$e(n??e.body);return new Request(e,{duplex:`half`,body:et(e.body,r,t)})},K=e=>typeof e==`object`&&!!e,rt=Symbol(`replaceOption`),it=e=>K(e)&&e[rt]===!0?{isReplace:!0,value:e.value}:{isReplace:!1,value:e},at=(...e)=>{for(let t of e)if((!K(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return ft({},...e)},ot=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n},st=e=>{if(!K(e)||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},q=e=>{if(e instanceof URLSearchParams){let t=new URLSearchParams(e),n=e[Y];return n&&(t[Y]=new Set(n)),t}return e instanceof globalThis.Headers?new globalThis.Headers(e):Array.isArray(e)?[...e]:st(e)?{...e}:e},ct=e=>Object.fromEntries(Object.entries(e).filter(e=>e[1]!==void 0)),lt=(e,t)=>st(e)&&st(t)?ct({...e,...t}):ot(e,t);function J(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:ft(e[n]??[],t[n]??[])}var ut=(e={},t={})=>({init:J(e,t,`init`),beforeRequest:J(e,t,`beforeRequest`),beforeRetry:J(e,t,`beforeRetry`),beforeError:J(e,t,`beforeError`),afterResponse:J(e,t,`afterResponse`)}),Y=Symbol(`deletedParameters`),dt=(e,t)=>{let n=new URLSearchParams,r=new Set;for(let i of[e,t])if(i!==void 0)if(i instanceof URLSearchParams){for(let[e,t]of i.entries())n.append(e,t),r.delete(e);let e=i[Y];if(e)for(let t of e)n.delete(t),r.add(t)}else if(Array.isArray(i))for(let e of i){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1])),r.delete(String(e[0]))}else if(K(i))for(let[e,t]of Object.entries(i))t===void 0?(n.delete(e),r.add(e)):(n.append(e,String(t)),r.delete(e));else{let e=new URLSearchParams(i);for(let[t,i]of e.entries())n.append(t,i),r.delete(t)}return r.size>0&&(n[Y]=r),n},ft=(...e)=>{let t={},n={},r={},i,a=[];for(let o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(K(o)){for(let[e,n]of Object.entries(o)){if(e===`signal`&&n instanceof globalThis.AbortSignal){a.push(n);continue}let r=it(n),{isReplace:o}=r;if(n=r.value,e===`context`){if(n!=null&&(!K(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");t={...t,context:n==null?{}:o?{...n}:{...t.context,...n}};continue}if(e===`searchParams`){i=n==null?void 0:o||i===void 0?n:dt(i,n);continue}K(n)&&!o&&e in t&&(n=ft(t[e],n)),t={...t,[e]:n}}if(K(o.hooks)){let{value:e,isReplace:n}=it(o.hooks);r=ut(n?{}:r,e),t.hooks=r}if(K(o.headers)){let{value:e,isReplace:r}=it(o.headers);n=r?q(e):lt(n,e),t.headers=n}}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:Ve?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},pt=e=>We.includes(e)?e.toUpperCase():e,mt={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},ht=(e={})=>{if(typeof e==`number`)return{...mt,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries({...e,methods:e.methods?.map(e=>e.toLowerCase())}).filter(([,e])=>e!==void 0));return{...mt,...t}};async function gt(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new G(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function _t(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var vt=e=>{let t={};for(let n in e)Object.hasOwn(e,n)&&!(n in Ze)&&!(n in Xe)&&(t[n]=e[n]);return t},yt=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0||!!e[Y]?.size:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e,bt=Object.prototype.toString,xt=e=>bt.call(e)===`[object Error]`,St=new Set([`network error`,`NetworkError when attempting to fetch resource.`,`The Internet connection appears to be offline.`,`Network request failed`,`fetch failed`,`terminated`,` A network error occurred.`,`Network connection lost`]);function Ct(e){if(!(e&&xt(e)&&e.name===`TypeError`&&typeof e.message==`string`))return!1;let{message:t,stack:n}=e;return t===`Load failed`?n===void 0||`__sentry_captured__`in e:t.startsWith(`error sending request for url`)||t===`Failed to fetch`||t.startsWith(`Failed to fetch (`)&&t.endsWith(`)`)?!0:St.has(t)}var wt=(e,t)=>e instanceof t||e?.name===t.name;function Tt(e){return wt(e,Pe)}function Et(e){return wt(e,Fe)}function Dt(e){return wt(e,G)}var Ot=10*1024*1024,kt="The `prefixUrl` option has been renamed `prefix` in v2 and enhanced to allow slashes in input. See also the new `baseUrl` option for improved flexibility with standard URL resolution: https://github.com/sindresorhus/ky#baseurl",X=Symbol(`timedOutResponseData`),At=e=>{let t=/;\s*charset\s*=\s*(?:"([^"]+)"|([^;,\s]+))/i.exec(e),n=t?.[1]??t?.[2];if(n)try{return new TextDecoder(n)}catch{}return new TextDecoder},jt="The `schema` argument must follow the Standard Schema specification",Mt=e=>typeof e==`object`?{...e,...e.methods&&{methods:[...e.methods]},...e.statusCodes&&{statusCodes:[...e.statusCodes]},...e.afterStatusCodes&&{afterStatusCodes:[...e.afterStatusCodes]}}:e,Nt=Object.prototype.toString,Pt=e=>e instanceof globalThis.Request||Nt.call(e)===`[object Request]`,Z=e=>e instanceof globalThis.Response||Nt.call(e)===`[object Response]`,Ft=e=>Array.isArray(e)?e.map(e=>[...e]):q(e);function It(e){let t={...e,json:q(e.json),context:q(e.context),headers:q(e.headers),searchParams:Ft(e.searchParams)};return e.retry!==void 0&&(t.retry=Mt(e.retry)),t}var Lt=async(e,t)=>{if(typeof t!=`object`&&typeof t!=`function`||t===null)throw TypeError(jt);let n=t[`~standard`];if(typeof n!=`object`||!n||typeof n.validate!=`function`)throw TypeError(jt);let r=await n.validate(e);if(r.issues)throw new Re(r.issues);return r.value},Rt=class e{static create(t,n){let r=n.hooks?.init??[],i=r.length>0?It(n):n;for(let e of r)e(i);let a=new e(t,i),o=async()=>{if(typeof a.#i.timeout==`number`&&a.#i.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${Ke}`);if(typeof a.#i.totalTimeout==`number`&&a.#i.totalTimeout>2147483647)throw RangeError(`The \`totalTimeout\` option cannot be greater than ${Ke}`);await Promise.resolve();let e=await a.#w(),t=e??await a.#E(async()=>a.#k()),n=e!==void 0||a.#O();for(;;){if(t===void 0)return t;if(Z(t))try{t=await a.#T(t)}catch(e){if(!(e instanceof Le))throw e;let r=await a.#D(e,async()=>a.#k());if(r===void 0)return r;t=r,n=a.#O();continue}let e=t;if(!e.ok&&e.type!==`opaque`&&(typeof a.#i.throwHttpErrors==`function`?a.#i.throwHttpErrors(e.status):a.#i.throwHttpErrors)){let r=new Pe(e,a.#P(e),a.#M()),i=r;if(r.data=await a.#h(e),n)throw i;let o=await a.#D(r,async()=>a.#k());if(o===void 0)return o;t=o,n=a.#O();continue}break}if(!Z(t))return t;if(a.#m(t),a.#i.onDownloadProgress){if(typeof a.#i.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!He)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let e=t.clone();return a.#x(t),tt(e,a.#i.onDownloadProgress)}return t},s=(async()=>{try{return await o()}catch(e){if(!(e instanceof Error)||a.#s.has(e))throw e;let t=e;for(let e of a.#i.hooks.beforeError){let n=await e({request:a.request,options:a.#M(),error:t,retryCount:a.#n});n instanceof Error&&(t=n)}throw t}finally{let e=a.#a;a.#b(e?.body??void 0),a.request!==e&&a.#b(a.request.body??void 0)}})();for(let[e,t]of Object.entries(Ge))e===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(s[e]=async n=>{a.request.headers.set(`accept`,a.request.headers.get(`accept`)||t);let r=await s;if(e!==`json`)return r[e]();let o=await r.text();if(o===``)return n===void 0?JSON.parse(o):Lt(void 0,n);let c=i.parseJson?await i.parseJson(o,{request:a.#P(r),response:r}):JSON.parse(o);return n===void 0?c:Lt(c,n)});return s}static#e(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}request;#t;#n=0;#r;#i;#a;#o;#s=new WeakSet;#c;#l;#u=!1;#d=new WeakMap;constructor(t,n={}){if(this.#r=t,Object.hasOwn(n,`prefixUrl`))throw Error(kt);if(this.#i={...n,headers:ot(this.#r.headers,n.headers),hooks:ut({},n.hooks),method:pt(n.method??this.#r.method??`GET`),prefix:String(n.prefix||``),retry:ht(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,totalTimeout:n.totalTimeout??!1,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#r!=`string`&&!(this.#r instanceof URL||this.#r instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(typeof this.#r==`string`&&(this.#i.prefix&&(this.#r=`${this.#i.prefix.replace(/\/+$/,``)}/${this.#r.replace(/^\/+/,``)}`),this.#i.baseUrl)){let e;try{e=new URL(this.#r)}catch{}e||(this.#r=new URL(this.#r,new Request(this.#i.baseUrl).url))}Be&&Ve&&(this.#o=this.#i.signal??this.#r.signal,this.#t=new globalThis.AbortController,this.#i.signal=this.#S()),ze&&(this.#i.duplex=`half`),this.#i.json!==void 0&&(this.#i.body=this.#i.stringifyJson?.(this.#i.json)??JSON.stringify(this.#i.json),this.#i.headers.set(`content-type`,this.#i.headers.get(`content-type`)??`application/json`));let r=n.headers&&new globalThis.Headers(n.headers).has(`content-type`);if(this.#r instanceof globalThis.Request&&(Ue&&this.#i.body instanceof globalThis.FormData||this.#i.body instanceof URLSearchParams)&&!r&&this.#i.headers.delete(`content-type`),this.request=new globalThis.Request(this.#r,this.#i),yt(this.#i.searchParams)){let t=new URL(this.request.url),n=this.#i.searchParams?.[Y];if(n)for(let e of n)t.searchParams.delete(e);if(typeof this.#i.searchParams==`string`){let e=this.#i.searchParams.replace(/^\?/,``);e!==``&&(t.search=t.search?`${t.search}&${e}`:`?${e}`)}else{let n=new URLSearchParams(e.#e(this.#i.searchParams));for(let[e,r]of n.entries())t.searchParams.append(e,r)}if(this.#i.searchParams&&typeof this.#i.searchParams==`object`&&!Array.isArray(this.#i.searchParams)&&!(this.#i.searchParams instanceof URLSearchParams))for(let[e,n]of Object.entries(this.#i.searchParams))n===void 0&&t.searchParams.delete(e);this.request=new globalThis.Request(t,this.#i)}if(this.#i.onUploadProgress&&typeof this.#i.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");this.#l=typeof this.#i.totalTimeout==`number`?this.#j():void 0}#f(){let e=this.#i.retry.delay(this.#n+1),t=e;return this.#i.retry.jitter===!0?t=Math.random()*e:typeof this.#i.retry.jitter==`function`&&(t=this.#i.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e)),Math.min(this.#i.retry.backoffLimit,t)}async#p(e){if(this.#n>=this.#i.retry.limit)throw e;let t=e instanceof Error?e:new Ie(e);if(t instanceof Le)return t.customDelay??this.#f();if(!this.#i.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#i.retry.shouldRetry!==void 0){let n=await this.#i.retry.shouldRetry({error:t,retryCount:this.#n+1});if(n===!1)throw e;if(n===!0)return this.#f()}if(Dt(e)){if(!this.#i.retry.retryOnTimeout)throw e;return this.#f()}if(Tt(e)){if(!this.#i.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&this.#i.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;return Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now()),Number.isFinite(e)?(e=Math.max(0,e),Math.min(this.#i.retry.maxRetryAfter,e)):Math.min(this.#i.retry.maxRetryAfter,this.#f())}if(e.response.status===413)throw e;return this.#f()}if(!Et(e))throw e;return this.#f()}#m(e){let t=this.#P(e);return this.#i.parseJson&&(e.json=async()=>{let n=await e.text();return n===``?JSON.parse(n):this.#i.parseJson(n,{request:t,response:e})}),e}async#h(e){let t=await this.#v(e,this.#g());if(t===X){this.#C();return}if(!t)return;if(!this.#_(e.headers.get(`content-type`)??``))return t;let n=await this.#y(t,e,this.#g(),this.#P(e));if(n===X){this.#C();return}return n}#g(){let e=this.#i.timeout===!1?1e4:this.#i.timeout,t=this.#A();if(t===void 0)return e;if(t<=0)throw new G(this.request);return Math.min(e,t)}#_(e){let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return/\/(?:.*[.+-])?json$/.test(t)}async#v(e,t){let{body:n}=e;if(!n)try{return await e.text()}catch{return}let r;try{r=n.getReader()}catch{return}let i=At(e.headers.get(`content-type`)??``),a=[],o=0,s=(async()=>{try{for(;;){let{done:e,value:t}=await r.read();if(e)break;if(o+=t.byteLength,o>Ot){r.cancel().catch(()=>void 0);return}a.push(i.decode(t,{stream:!0}))}}catch{return}return a.push(i.decode()),a.join(``)})(),c=new Promise(e=>{let n=setTimeout(()=>{e(X)},t);s.finally(()=>{clearTimeout(n)})}),l=await Promise.race([s,c]);return l===X&&r.cancel().catch(()=>void 0),l}async#y(e,t,n,r){let i;try{return await Promise.race([Promise.resolve().then(()=>this.#i.parseJson?this.#i.parseJson(e,{request:r,response:t}):JSON.parse(e)),new Promise(e=>{i=setTimeout(()=>{e(X)},n)})])}catch{return}finally{clearTimeout(i)}}#b(e){e&&e.cancel().catch(()=>void 0)}#x(e){this.#b(e.body??void 0)}#S(){return this.#o?AbortSignal.any([this.#o,this.#t.signal]):this.#t.signal}#C(){let e=this.#A();if(e!==void 0&&e<=0)throw new G(this.request)}async#w(){for(let e of this.#i.hooks.beforeRequest){let t=await e({request:this.request,options:this.#M(),retryCount:0});if(Pt(t))this.#N(t);else if(Z(t))return t}}async#T(e){let t=this.#P(e);for(let n of this.#i.hooks.afterResponse){let r=this.#F(e.clone(),t);this.#m(r);let i;try{i=await n({request:this.request,options:this.#M(),response:r,retryCount:this.#n})}catch(t){throw r!==e&&this.#x(r),this.#x(e),t}if(i instanceof Je)throw r!==e&&this.#x(r),this.#x(e),new Le(i.options);let a=Z(i)?this.#F(i,t):e;r!==e&&r!==a&&r.body!==a.body&&this.#x(r),e!==a&&e.body!==a.body&&this.#x(e),e=a}return e}async#E(e){try{return await e()}catch(t){return this.#D(t,e)}}async#D(e,t){this.#u=!1;let n=Math.min(await this.#p(e),Ke),r={signal:this.#o},i=this.#A();if(i!==void 0){if(i<=0)throw new G(this.request);if(n>=i)throw await _t(i,r),new G(this.request)}if(await _t(n,r),this.#C(),e instanceof Le&&e.customRequest){let t=new globalThis.Request(e.customRequest,this.#i.signal?{signal:this.#i.signal}:void 0);this.#N(t)}for(let t of this.#i.hooks.beforeRetry){let n;try{n=await t({request:this.request,options:this.#M(),error:e,retryCount:this.#n+1})}catch(t){throw t instanceof Error&&t!==e&&this.#s.add(t),t}if(Pt(n)){this.#N(n);break}if(Z(n))return this.#u=!0,this.#n++,n;if(n===qe)return}return this.#C(),this.#n++,this.#E(t)}#O(){let e=this.#u;return this.#u=!1,e}async#k(){this.#t?.signal.aborted&&(this.#t=new globalThis.AbortController,this.#i.signal=this.#S(),this.request=new globalThis.Request(this.request,{signal:this.#i.signal}));let e=vt(this.#i),t=this.#i.retry.limit>0?this.request.clone():void 0,n=this.#I(this.request,this.#i.body??void 0);this.#a=n,t&&(this.request=t);try{let t=this.#A();if(t!==void 0&&t<=0)throw new G(this.request);let r=this.#i.timeout===!1?t:t===void 0?this.#i.timeout:Math.min(this.#i.timeout,t),i=r===void 0?await this.#i.fetch(n,e):await gt(n,e,this.#t,{timeout:r,fetch:this.#i.fetch});return this.#F(i,n)}catch(e){throw Ct(e)?new Fe(this.request,{cause:e}):e}}#A(){if(this.#l===void 0)return;let e=this.#j()-this.#l;return Math.max(0,this.#i.totalTimeout-e)}#j(){return globalThis.performance?.now()??Date.now()}#M(){if(!this.#c){let{hooks:e,json:t,parseJson:n,stringifyJson:r,searchParams:i,timeout:a,totalTimeout:o,throwHttpErrors:s,fetch:c,...l}=this.#i;this.#c=Object.freeze(l)}return this.#c}#N(e){this.#c=void 0,this.request=e}#P(e){return this.#d.get(e)??this.request}#F(e,t){return this.#d.set(e,t),e}#I(e,t){return!this.#i.onUploadProgress||!e.body||!ze?e:nt(e,this.#i.onUploadProgress,t??this.#i.body??void 0)}},zt=e=>{let t=(t,n)=>Rt.create(t,at(e,n));for(let n of We)t[n]=(t,r)=>Rt.create(t,at(e,r,{method:n}));return t.create=e=>zt(at(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),zt(at(e,t))),t.stop=qe,t.retry=Ye,t},Q=zt().create({retry:0});async function $(e,t){if(e instanceof Pe)try{return(await e.response.json()).error||t}catch{return t}return e instanceof Error?e.message:t}async function Bt(){return Q.get(`api/schema`).json()}async function Vt(e){return Q.get(`api/schema/${encodeURIComponent(e)}`).json()}async function Ht(e,t){try{await Q.post(`api/schema/${encodeURIComponent(e)}`,{json:t})}catch(t){throw Error(await $(t,`Failed to save schema: ${e}`))}}async function Ut(e){try{await Q.delete(`api/schema/${encodeURIComponent(e)}`)}catch(t){throw Error(await $(t,`Failed to delete schema: ${e}`))}}async function Wt(){let e=await Q.post(`api/migrate`).json();if(!e.success)throw Error(e.error||`Migration failed`);return e}async function Gt(e){return Q.get(`api/prompt-snapshot/${encodeURIComponent(e)}`).json()}async function Kt(){return Q.get(`api/ai/config`).json()}async function qt(e){try{await Q.put(`api/ai/config`,{json:e})}catch(e){throw Error(await $(e,`Failed to save AI config`))}}async function Jt(e){let t=await Q.post(`api/ai/registry-lookup`,{json:{modelName:e}}).json().catch(()=>null);return!t||typeof t.vision!=`boolean`?null:t}async function Yt(e){try{let t=await Q.post(`api/ai/notion/inspect`,{json:e}).json();if(!t.success)throw Error(t.error||`Notion connection failed`);return t}catch(e){throw Error(await $(e,`Notion connection failed`))}}async function Xt(e){let t=new FormData;t.set(`schema`,e.schema),e.text&&t.set(`text`,e.text),e.file&&t.set(`file`,e.file),e.model&&t.set(`model`,e.model),e.notion&&t.set(`notion`,`true`);try{let e=await Q.post(`api/extract`,{body:t}).json();if(!e.success)throw Error(e.error||`Extraction failed`);return e}catch(e){throw Error(await $(e,`Extraction failed`))}}async function Zt(){return Q.get(`api/extract/records`).json()}async function Qt(e){try{let t=await Q.post(`api/extract/records/${encodeURIComponent(e)}/retry`).json();if(!t.success)throw Error(t.error||`Retry failed`);return t}catch(e){throw Error(await $(e,`Retry failed`))}}async function $t(e){try{await Q.delete(`api/extract/records/${encodeURIComponent(e)}`)}catch(e){throw Error(await $(e,`Failed to delete extraction record`))}}async function en(){return Q.get(`api/data`).json()}async function tn(){return Q.get(`api/data/tables`).json()}async function nn(e,t={}){let n=new URLSearchParams;return t.page!==void 0&&n.set(`page`,String(t.page)),t.pageSize!==void 0&&n.set(`pageSize`,String(t.pageSize)),t.search&&n.set(`search`,t.search),t.sortField&&n.set(`sortField`,t.sortField),t.sortOrder&&n.set(`sortOrder`,t.sortOrder),Q.get(`api/data/tables/${encodeURIComponent(e)}`,{searchParams:n}).json()}async function rn(e){return Q.get(`api/data/${encodeURIComponent(e)}`).json()}export{qt as _,Gt as a,j as b,Yt as c,en as d,Bt as f,Xt as g,Qt as h,rn as i,tn as l,Jt as m,Ut as n,Vt as o,Wt as p,Kt as r,nn as s,$t as t,Zt as u,Ht as v,Ne as y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{B as e,Fn as t,M as n,a as r,h as i,i as a,v as o}from"./button-Cdgr9Igy.js";var s={name:`CheckIcon`,extends:a};function c(e){return f(e)||d(e)||u(e)||l()}function l(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(e,t){if(e){if(typeof e==`string`)return p(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function d(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function f(e){if(Array.isArray(e))return p(e)}function p(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(t,r,a,s,l,u){return e(),o(`svg`,n({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t.pti()),c(r[0]||=[i(`path`,{d:`M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z`,fill:`currentColor`},null,-1)]),16)}s.render=m;var h={name:`BaseEditableHolder`,extends:r,emits:[`update:modelValue`,`value-change`],props:{modelValue:{type:null,default:void 0},defaultValue:{type:null,default:void 0},name:{type:String,default:void 0},invalid:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},formControl:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0},$pcForm:{default:void 0},$pcFormField:{default:void 0}},data:function(){return{d_value:this.defaultValue===void 0?this.modelValue:this.defaultValue}},watch:{modelValue:{deep:!0,handler:function(e){this.d_value=e}},defaultValue:function(e){this.d_value=e},$formName:{immediate:!0,handler:function(e){var t,n;this.formField=((t=this.$pcForm)==null||(n=t.register)==null?void 0:n.call(t,e,this.$formControl))||{}}},$formControl:{immediate:!0,handler:function(e){var t,n;this.formField=((t=this.$pcForm)==null||(n=t.register)==null?void 0:n.call(t,this.$formName,e))||{}}},$formDefaultValue:{immediate:!0,handler:function(e){this.d_value!==e&&(this.d_value=e)}},$formValue:{immediate:!1,handler:function(e){var t;(t=this.$pcForm)!=null&&t.getFieldState(this.$formName)&&e!==this.d_value&&(this.d_value=e)}}},formField:{},methods:{writeValue:function(e,t){var n,r;this.controlled&&(this.d_value=e,this.$emit(`update:modelValue`,e)),this.$emit(`value-change`,e),(n=(r=this.formField).onChange)==null||n.call(r,{originalEvent:t,value:e})},findNonEmpty:function(){return[...arguments].find(t)}},computed:{$filled:function(){return t(this.d_value)},$invalid:function(){var e,t;return!this.$formNovalidate&&this.findNonEmpty(this.invalid,(e=this.$pcFormField)==null||(e=e.$field)==null?void 0:e.invalid,(t=this.$pcForm)==null||(t=t.getFieldState(this.$formName))==null?void 0:t.invalid)},$formName:function(){return this.$formNovalidate?void 0:this.name||this.$formControl?.name},$formControl:function(){return this.formControl||this.$pcFormField?.formControl},$formNovalidate:function(){return this.$formControl?.novalidate},$formDefaultValue:function(){var e;return this.findNonEmpty(this.d_value,this.$pcFormField?.initialValue,(e=this.$pcForm)==null||(e=e.initialValues)==null?void 0:e[this.$formName])},$formValue:function(){var e,t;return this.findNonEmpty((e=this.$pcFormField)==null||(e=e.$field)==null?void 0:e.value,(t=this.$pcForm)==null||(t=t.getFieldState(this.$formName))==null?void 0:t.value)},controlled:function(){return this.$inProps.hasOwnProperty(`modelValue`)||!this.$inProps.hasOwnProperty(`modelValue`)&&!this.$inProps.hasOwnProperty(`defaultValue`)},filled:function(){return this.$filled}}},g={name:`BaseInput`,extends:h,props:{size:{type:String,default:null},fluid:{type:Boolean,default:null},variant:{type:String,default:null}},inject:{$parentInstance:{default:void 0},$pcFluid:{default:void 0}},computed:{$variant:function(){return this.variant??(this.$primevue.config.inputStyle||this.$primevue.config.inputVariant)},$fluid:function(){return this.fluid??!!this.$pcFluid},hasFluid:function(){return this.$fluid}}};export{h as n,s as r,g as t};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import{B as e,M as t,Pn as n,Pt as r,Tn as i,U as a,W as o,_ as s,c,g as l,h as u,i as d,jn as f,v as p}from"./button-Cdgr9Igy.js";import{r as m,t as h}from"./baseinput-B7PU5-38.js";var g={name:`MinusIcon`,extends:d};function _(e){return x(e)||b(e)||y(e)||v()}function v(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(e,t){if(e){if(typeof e==`string`)return S(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function b(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function x(e){if(Array.isArray(e))return S(e)}function S(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(n,r,i,a,o,s){return e(),p(`svg`,t({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},n.pti()),_(r[0]||=[u(`path`,{d:`M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z`,fill:`currentColor`},null,-1)]),16)}g.render=C;var w=c.extend({name:`checkbox`,style:`
|
|
3
|
+
.p-checkbox {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
user-select: none;
|
|
7
|
+
vertical-align: bottom;
|
|
8
|
+
width: dt('checkbox.width');
|
|
9
|
+
height: dt('checkbox.height');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-checkbox-input {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
appearance: none;
|
|
15
|
+
position: absolute;
|
|
16
|
+
inset-block-start: 0;
|
|
17
|
+
inset-inline-start: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
opacity: 0;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
outline: 0 none;
|
|
25
|
+
border: 1px solid transparent;
|
|
26
|
+
border-radius: dt('checkbox.border.radius');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.p-checkbox-box {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
border-radius: dt('checkbox.border.radius');
|
|
34
|
+
border: 1px solid dt('checkbox.border.color');
|
|
35
|
+
background: dt('checkbox.background');
|
|
36
|
+
width: dt('checkbox.width');
|
|
37
|
+
height: dt('checkbox.height');
|
|
38
|
+
transition:
|
|
39
|
+
background dt('checkbox.transition.duration'),
|
|
40
|
+
color dt('checkbox.transition.duration'),
|
|
41
|
+
border-color dt('checkbox.transition.duration'),
|
|
42
|
+
box-shadow dt('checkbox.transition.duration'),
|
|
43
|
+
outline-color dt('checkbox.transition.duration');
|
|
44
|
+
outline-color: transparent;
|
|
45
|
+
box-shadow: dt('checkbox.shadow');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.p-checkbox-icon {
|
|
49
|
+
transition-duration: dt('checkbox.transition.duration');
|
|
50
|
+
color: dt('checkbox.icon.color');
|
|
51
|
+
font-size: dt('checkbox.icon.size');
|
|
52
|
+
width: dt('checkbox.icon.size');
|
|
53
|
+
height: dt('checkbox.icon.size');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
57
|
+
border-color: dt('checkbox.hover.border.color');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.p-checkbox-checked .p-checkbox-box {
|
|
61
|
+
border-color: dt('checkbox.checked.border.color');
|
|
62
|
+
background: dt('checkbox.checked.background');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.p-checkbox-checked .p-checkbox-icon {
|
|
66
|
+
color: dt('checkbox.icon.checked.color');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
70
|
+
background: dt('checkbox.checked.hover.background');
|
|
71
|
+
border-color: dt('checkbox.checked.hover.border.color');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {
|
|
75
|
+
color: dt('checkbox.icon.checked.hover.color');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
|
|
79
|
+
border-color: dt('checkbox.focus.border.color');
|
|
80
|
+
box-shadow: dt('checkbox.focus.ring.shadow');
|
|
81
|
+
outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color');
|
|
82
|
+
outline-offset: dt('checkbox.focus.ring.offset');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
|
|
86
|
+
border-color: dt('checkbox.checked.focus.border.color');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-checkbox.p-invalid > .p-checkbox-box {
|
|
90
|
+
border-color: dt('checkbox.invalid.border.color');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.p-checkbox.p-variant-filled .p-checkbox-box {
|
|
94
|
+
background: dt('checkbox.filled.background');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.p-checkbox-checked.p-variant-filled .p-checkbox-box {
|
|
98
|
+
background: dt('checkbox.checked.background');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
102
|
+
background: dt('checkbox.checked.hover.background');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-checkbox.p-disabled {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.p-checkbox.p-disabled .p-checkbox-box {
|
|
110
|
+
background: dt('checkbox.disabled.background');
|
|
111
|
+
border-color: dt('checkbox.checked.disabled.border.color');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {
|
|
115
|
+
color: dt('checkbox.icon.disabled.color');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.p-checkbox-sm,
|
|
119
|
+
.p-checkbox-sm .p-checkbox-box {
|
|
120
|
+
width: dt('checkbox.sm.width');
|
|
121
|
+
height: dt('checkbox.sm.height');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-checkbox-sm .p-checkbox-icon {
|
|
125
|
+
font-size: dt('checkbox.icon.sm.size');
|
|
126
|
+
width: dt('checkbox.icon.sm.size');
|
|
127
|
+
height: dt('checkbox.icon.sm.size');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.p-checkbox-lg,
|
|
131
|
+
.p-checkbox-lg .p-checkbox-box {
|
|
132
|
+
width: dt('checkbox.lg.width');
|
|
133
|
+
height: dt('checkbox.lg.height');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.p-checkbox-lg .p-checkbox-icon {
|
|
137
|
+
font-size: dt('checkbox.icon.lg.size');
|
|
138
|
+
width: dt('checkbox.icon.lg.size');
|
|
139
|
+
height: dt('checkbox.icon.lg.size');
|
|
140
|
+
}
|
|
141
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-checkbox p-component`,{"p-checkbox-checked":t.checked,"p-disabled":n.disabled,"p-invalid":t.$pcCheckboxGroup?t.$pcCheckboxGroup.$invalid:t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-checkbox-sm p-inputfield-sm":n.size===`small`,"p-checkbox-lg p-inputfield-lg":n.size===`large`}]},box:`p-checkbox-box`,input:`p-checkbox-input`,icon:`p-checkbox-icon`}}),T={name:`BaseCheckbox`,extends:h,props:{value:null,binary:Boolean,indeterminate:{type:Boolean,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:w,provide:function(){return{$pcCheckbox:this,$parentInstance:this}}};function E(e){"@babel/helpers - typeof";return E=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},E(e)}function D(e,t,n){return(t=O(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){var t=k(e,`string`);return E(t)==`symbol`?t:t+``}function k(e,t){if(E(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(E(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function A(e){return P(e)||N(e)||M(e)||j()}function j(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
142
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(e,t){if(e){if(typeof e==`string`)return F(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}function N(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function P(e){if(Array.isArray(e))return F(e)}function F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var I={name:`Checkbox`,extends:T,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`update:indeterminate`],inject:{$pcCheckboxGroup:{default:void 0}},data:function(){return{d_indeterminate:this.indeterminate}},watch:{indeterminate:function(e){this.d_indeterminate=e,this.updateIndeterminate()}},mounted:function(){this.updateIndeterminate()},updated:function(){this.updateIndeterminate()},methods:{getPTOptions:function(e){return(e===`root`?this.ptmi:this.ptm)(e,{context:{checked:this.checked,indeterminate:this.d_indeterminate,disabled:this.disabled}})},onChange:function(e){var t=this;if(!this.disabled&&!this.readonly){var n=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value,r=this.binary?this.d_indeterminate?this.trueValue:this.checked?this.falseValue:this.trueValue:this.checked||this.d_indeterminate?n.filter(function(e){return!f(e,t.value)}):n?[].concat(A(n),[this.value]):[this.value];this.d_indeterminate&&(this.d_indeterminate=!1,this.$emit(`update:indeterminate`,this.d_indeterminate)),this.$pcCheckboxGroup?this.$pcCheckboxGroup.writeValue(r,e):this.writeValue(r,e),this.$emit(`change`,e)}},onFocus:function(e){this.$emit(`focus`,e)},onBlur:function(e){var t,n;this.$emit(`blur`,e),(t=(n=this.formField).onBlur)==null||t.call(n,e)},updateIndeterminate:function(){this.$refs.input&&(this.$refs.input.indeterminate=this.d_indeterminate)}},computed:{groupName:function(){return this.$pcCheckboxGroup?this.$pcCheckboxGroup.groupName:this.$formName},checked:function(){var e=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value;return this.d_indeterminate?!1:this.binary?e===this.trueValue:n(this.value,e)},dataP:function(){return i(D({invalid:this.$invalid,checked:this.checked,disabled:this.disabled,filled:this.$variant===`filled`},this.size,this.size))}},components:{CheckIcon:m,MinusIcon:g}},L=[`data-p-checked`,`data-p-indeterminate`,`data-p-disabled`,`data-p`],R=[`id`,`value`,`name`,`checked`,`tabindex`,`disabled`,`readonly`,`required`,`aria-labelledby`,`aria-label`,`aria-invalid`],z=[`data-p`];function B(n,i,c,d,f,m){var h=o(`CheckIcon`),g=o(`MinusIcon`);return e(),p(`div`,t({class:n.cx(`root`)},m.getPTOptions(`root`),{"data-p-checked":m.checked,"data-p-indeterminate":f.d_indeterminate||void 0,"data-p-disabled":n.disabled,"data-p":m.dataP}),[u(`input`,t({ref:`input`,id:n.inputId,type:`checkbox`,class:[n.cx(`input`),n.inputClass],style:n.inputStyle,value:n.value,name:m.groupName,checked:m.checked,tabindex:n.tabindex,disabled:n.disabled,readonly:n.readonly,required:n.required,"aria-labelledby":n.ariaLabelledby,"aria-label":n.ariaLabel,"aria-invalid":n.invalid||void 0,onFocus:i[0]||=function(){return m.onFocus&&m.onFocus.apply(m,arguments)},onBlur:i[1]||=function(){return m.onBlur&&m.onBlur.apply(m,arguments)},onChange:i[2]||=function(){return m.onChange&&m.onChange.apply(m,arguments)}},m.getPTOptions(`input`)),null,16,R),u(`div`,t({class:n.cx(`box`)},m.getPTOptions(`box`),{"data-p":m.dataP}),[a(n.$slots,`icon`,{checked:m.checked,indeterminate:f.d_indeterminate,class:r(n.cx(`icon`)),dataP:m.dataP},function(){return[m.checked?(e(),l(h,t({key:0,class:n.cx(`icon`)},m.getPTOptions(`icon`),{"data-p":m.dataP}),null,16,[`class`,`data-p`])):f.d_indeterminate?(e(),l(g,t({key:1,class:n.cx(`icon`)},m.getPTOptions(`icon`),{"data-p":m.dataP}),null,16,[`class`,`data-p`])):s(``,!0)]})],16,z)],16,L)}I.render=B;export{I as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as e}from"./editor.api-C8BHpRhn.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c=120*1e3,l=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>c&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=s.editor.createWebWorker({moduleId:`vs/language/css/cssWorker`,label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},u;(function(e){function t(e){return typeof e==`string`}e.is=t})(u||={});var d;(function(e){function t(e){return typeof e==`string`}e.is=t})(d||={});var f;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(f||={});var p;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(p||={});var m;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.uinteger(t.line)&&V.uinteger(t.character)}e.is=n})(m||={});var h;(function(e){function t(e,t,n,r){if(V.uinteger(e)&&V.uinteger(t)&&V.uinteger(n)&&V.uinteger(r))return{start:m.create(e,t),end:m.create(n,r)};if(m.is(e)&&m.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&m.is(t.start)&&m.is(t.end)}e.is=n})(h||={});var g;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&h.is(t.range)&&(V.string(t.uri)||V.undefined(t.uri))}e.is=n})(g||={});var ee;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&h.is(t.targetRange)&&V.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||V.undefined(t.originSelectionRange))}e.is=n})(ee||={});var _;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.numberRange(t.red,0,1)&&V.numberRange(t.green,0,1)&&V.numberRange(t.blue,0,1)&&V.numberRange(t.alpha,0,1)}e.is=n})(_||={});var te;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&h.is(t.range)&&_.is(t.color)}e.is=n})(te||={});var ne;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.string(t.label)&&(V.undefined(t.textEdit)||C.is(t))&&(V.undefined(t.additionalTextEdits)||V.typedArray(t.additionalTextEdits,C.is))}e.is=n})(ne||={});var v;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(v||={});var re;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return V.defined(n)&&(o.startCharacter=n),V.defined(r)&&(o.endCharacter=r),V.defined(i)&&(o.kind=i),V.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.uinteger(t.startLine)&&V.uinteger(t.startLine)&&(V.undefined(t.startCharacter)||V.uinteger(t.startCharacter))&&(V.undefined(t.endCharacter)||V.uinteger(t.endCharacter))&&(V.undefined(t.kind)||V.string(t.kind))}e.is=n})(re||={});var y;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&g.is(t.location)&&V.string(t.message)}e.is=n})(y||={});var b;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(b||={});var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||={});var ae;(function(e){function t(e){let t=e;return V.objectLiteral(t)&&V.string(t.href)}e.is=t})(ae||={});var x;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return V.defined(n)&&(o.severity=n),V.defined(r)&&(o.code=r),V.defined(i)&&(o.source=i),V.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(t.range)&&V.string(t.message)&&(V.number(t.severity)||V.undefined(t.severity))&&(V.integer(t.code)||V.string(t.code)||V.undefined(t.code))&&(V.undefined(t.codeDescription)||V.string(t.codeDescription?.href))&&(V.string(t.source)||V.undefined(t.source))&&(V.undefined(t.relatedInformation)||V.typedArray(t.relatedInformation,y.is))}e.is=n})(x||={});var S;(function(e){function t(e,t,...n){let r={title:e,command:t};return V.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.title)&&V.string(t.command)}e.is=n})(S||={});var C;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return V.objectLiteral(t)&&V.string(t.newText)&&h.is(t.range)}e.is=i})(C||={});var w;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.string(t.label)&&(V.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(V.string(t.description)||t.description===void 0)}e.is=n})(w||={});var T;(function(e){function t(e){let t=e;return V.string(t)}e.is=t})(T||={});var oe;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return C.is(t)&&(w.is(t.annotationId)||T.is(t.annotationId))}e.is=i})(oe||={});var se;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&A.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(se||={});var E;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&V.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||V.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||V.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e.is=n})(E||={});var D;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&V.string(t.oldUri)&&V.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||V.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||V.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e.is=n})(D||={});var O;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&V.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||V.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||V.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e.is=n})(O||={});var k;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>V.string(e.kind)?E.is(e)||D.is(e)||O.is(e):se.is(e)))}e.is=t})(k||={});var ce;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)}e.is=n})(ce||={});var le;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&V.integer(t.version)}e.is=n})(le||={});var A;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&(t.version===null||V.integer(t.version))}e.is=n})(A||={});var ue;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&V.string(t.languageId)&&V.integer(t.version)&&V.string(t.text)}e.is=n})(ue||={});var j;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(j||={});var M;(function(e){function t(e){let t=e;return V.objectLiteral(e)&&j.is(t.kind)&&V.string(t.value)}e.is=t})(M||={});var N;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(N||={});var P;(function(e){e.PlainText=1,e.Snippet=2})(P||={});var de;(function(e){e.Deprecated=1})(de||={});var fe;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&V.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=n})(fe||={});var pe;(function(e){e.asIs=1,e.adjustIndentation=2})(pe||={});var me;(function(e){function t(e){let t=e;return t&&(V.string(t.detail)||t.detail===void 0)&&(V.string(t.description)||t.description===void 0)}e.is=t})(me||={});var he;(function(e){function t(e){return{label:e}}e.create=t})(he||={});var ge;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(ge||={});var F;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return V.string(t)||V.objectLiteral(t)&&V.string(t.language)&&V.string(t.value)}e.is=n})(F||={});var _e;(function(e){function t(e){let t=e;return!!t&&V.objectLiteral(t)&&(M.is(t.contents)||F.is(t.contents)||V.typedArray(t.contents,F.is))&&(e.range===void 0||h.is(e.range))}e.is=t})(_e||={});var ve;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(ve||={});var ye;(function(e){function t(e,t,...n){let r={label:e};return V.defined(t)&&(r.documentation=t),V.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(ye||={});var I;(function(e){e.Text=1,e.Read=2,e.Write=3})(I||={});var be;(function(e){function t(e,t){let n={range:e};return V.number(t)&&(n.kind=t),n}e.create=t})(be||={});var L;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(L||={});var xe;(function(e){e.Deprecated=1})(xe||={});var Se;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(Se||={});var Ce;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(Ce||={});var we;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&V.string(t.name)&&V.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||V.string(t.detail))&&(t.deprecated===void 0||V.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(we||={});var Te;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(Te||={});var R;(function(e){e.Invoked=1,e.Automatic=2})(R||={});var Ee;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return V.defined(t)&&V.typedArray(t.diagnostics,x.is)&&(t.only===void 0||V.typedArray(t.only,V.string))&&(t.triggerKind===void 0||t.triggerKind===R.Invoked||t.triggerKind===R.Automatic)}e.is=n})(Ee||={});var De;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):S.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&V.string(t.title)&&(t.diagnostics===void 0||V.typedArray(t.diagnostics,x.is))&&(t.kind===void 0||V.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||S.is(t.command))&&(t.isPreferred===void 0||V.boolean(t.isPreferred))&&(t.edit===void 0||k.is(t.edit))}e.is=n})(De||={});var Oe;(function(e){function t(e,t){let n={range:e};return V.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(t.range)&&(V.undefined(t.command)||S.is(t.command))}e.is=n})(Oe||={});var ke;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.uinteger(t.tabSize)&&V.boolean(t.insertSpaces)}e.is=n})(ke||={});var Ae;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(t.range)&&(V.undefined(t.target)||V.string(t.target))}e.is=n})(Ae||={});var je;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return V.objectLiteral(n)&&h.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(je||={});var Me;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Me||={});var Ne;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Ne||={});var Pe;(function(e){function t(e){let t=e;return V.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Pe||={});var Fe;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&h.is(t.range)&&V.string(t.text)}e.is=n})(Fe||={});var Ie;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&h.is(t.range)&&V.boolean(t.caseSensitiveLookup)&&(V.string(t.variableName)||t.variableName===void 0)}e.is=n})(Ie||={});var Le;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&h.is(t.range)&&(V.string(t.expression)||t.expression===void 0)}e.is=n})(Le||={});var Re;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(e.stoppedLocation)}e.is=n})(Re||={});var z;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(z||={});var B;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&(t.tooltip===void 0||V.string(t.tooltip)||M.is(t.tooltip))&&(t.location===void 0||g.is(t.location))&&(t.command===void 0||S.is(t.command))}e.is=n})(B||={});var ze;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&m.is(t.position)&&(V.string(t.label)||V.typedArray(t.label,B.is))&&(t.kind===void 0||z.is(t.kind))&&t.textEdits===void 0||V.typedArray(t.textEdits,C.is)&&(t.tooltip===void 0||V.string(t.tooltip)||M.is(t.tooltip))&&(t.paddingLeft===void 0||V.boolean(t.paddingLeft))&&(t.paddingRight===void 0||V.boolean(t.paddingRight))}e.is=n})(ze||={});var Be;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Be||={});var Ve;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Ve||={});var He;(function(e){function t(e){return{items:e}}e.create=t})(He||={});var Ue;(function(e){e.Invoked=0,e.Automatic=1})(Ue||={});var We;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(We||={});var Ge;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Ge||={});var Ke;(function(e){function t(e){let t=e;return V.objectLiteral(t)&&d.is(t.uri)&&V.string(t.name)}e.is=t})(Ke||={});var qe;(function(e){function t(e,t,n,r){return new Je(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(V.defined(t)&&V.string(t.uri)&&(V.undefined(t.languageId)||V.string(t.languageId))&&V.uinteger(t.lineCount)&&V.func(t.getText)&&V.func(t.positionAt)&&V.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(qe||={});var Je=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
|
|
1
|
+
import{m as e}from"./editor.api-BU_q4v8i.js";var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of r(a))!i.call(e,c)&&c!==o&&t(e,c,{get:()=>a[c],enumerable:!(s=n(a,c))||s.enumerable});return e},o=(e,t,n)=>(a(e,t,`default`),n&&a(n,t,`default`)),s={};o(s,e);var c=120*1e3,l=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>c&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||=(this._worker=s.editor.createWebWorker({moduleId:`vs/language/css/cssWorker`,label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}},u;(function(e){function t(e){return typeof e==`string`}e.is=t})(u||={});var d;(function(e){function t(e){return typeof e==`string`}e.is=t})(d||={});var f;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(f||={});var p;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(p||={});var m;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=p.MAX_VALUE),t===Number.MAX_VALUE&&(t=p.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.uinteger(t.line)&&V.uinteger(t.character)}e.is=n})(m||={});var h;(function(e){function t(e,t,n,r){if(V.uinteger(e)&&V.uinteger(t)&&V.uinteger(n)&&V.uinteger(r))return{start:m.create(e,t),end:m.create(n,r)};if(m.is(e)&&m.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&m.is(t.start)&&m.is(t.end)}e.is=n})(h||={});var g;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&h.is(t.range)&&(V.string(t.uri)||V.undefined(t.uri))}e.is=n})(g||={});var ee;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&h.is(t.targetRange)&&V.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||V.undefined(t.originSelectionRange))}e.is=n})(ee||={});var _;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.numberRange(t.red,0,1)&&V.numberRange(t.green,0,1)&&V.numberRange(t.blue,0,1)&&V.numberRange(t.alpha,0,1)}e.is=n})(_||={});var te;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&h.is(t.range)&&_.is(t.color)}e.is=n})(te||={});var ne;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.string(t.label)&&(V.undefined(t.textEdit)||C.is(t))&&(V.undefined(t.additionalTextEdits)||V.typedArray(t.additionalTextEdits,C.is))}e.is=n})(ne||={});var v;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(v||={});var re;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return V.defined(n)&&(o.startCharacter=n),V.defined(r)&&(o.endCharacter=r),V.defined(i)&&(o.kind=i),V.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.uinteger(t.startLine)&&V.uinteger(t.startLine)&&(V.undefined(t.startCharacter)||V.uinteger(t.startCharacter))&&(V.undefined(t.endCharacter)||V.uinteger(t.endCharacter))&&(V.undefined(t.kind)||V.string(t.kind))}e.is=n})(re||={});var y;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&g.is(t.location)&&V.string(t.message)}e.is=n})(y||={});var b;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(b||={});var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||={});var ae;(function(e){function t(e){let t=e;return V.objectLiteral(t)&&V.string(t.href)}e.is=t})(ae||={});var x;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return V.defined(n)&&(o.severity=n),V.defined(r)&&(o.code=r),V.defined(i)&&(o.source=i),V.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(t.range)&&V.string(t.message)&&(V.number(t.severity)||V.undefined(t.severity))&&(V.integer(t.code)||V.string(t.code)||V.undefined(t.code))&&(V.undefined(t.codeDescription)||V.string(t.codeDescription?.href))&&(V.string(t.source)||V.undefined(t.source))&&(V.undefined(t.relatedInformation)||V.typedArray(t.relatedInformation,y.is))}e.is=n})(x||={});var S;(function(e){function t(e,t,...n){let r={title:e,command:t};return V.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.title)&&V.string(t.command)}e.is=n})(S||={});var C;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return V.objectLiteral(t)&&V.string(t.newText)&&h.is(t.range)}e.is=i})(C||={});var w;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.string(t.label)&&(V.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(V.string(t.description)||t.description===void 0)}e.is=n})(w||={});var T;(function(e){function t(e){let t=e;return V.string(t)}e.is=t})(T||={});var oe;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return C.is(t)&&(w.is(t.annotationId)||T.is(t.annotationId))}e.is=i})(oe||={});var se;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&A.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(se||={});var E;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&V.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||V.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||V.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e.is=n})(E||={});var D;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&V.string(t.oldUri)&&V.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||V.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||V.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e.is=n})(D||={});var O;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&V.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||V.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||V.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||T.is(t.annotationId))}e.is=n})(O||={});var k;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>V.string(e.kind)?E.is(e)||D.is(e)||O.is(e):se.is(e)))}e.is=t})(k||={});var ce;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)}e.is=n})(ce||={});var le;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&V.integer(t.version)}e.is=n})(le||={});var A;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&(t.version===null||V.integer(t.version))}e.is=n})(A||={});var ue;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&V.string(t.languageId)&&V.integer(t.version)&&V.string(t.text)}e.is=n})(ue||={});var j;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(j||={});var M;(function(e){function t(e){let t=e;return V.objectLiteral(e)&&j.is(t.kind)&&V.string(t.value)}e.is=t})(M||={});var N;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(N||={});var P;(function(e){e.PlainText=1,e.Snippet=2})(P||={});var de;(function(e){e.Deprecated=1})(de||={});var fe;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&V.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=n})(fe||={});var pe;(function(e){e.asIs=1,e.adjustIndentation=2})(pe||={});var me;(function(e){function t(e){let t=e;return t&&(V.string(t.detail)||t.detail===void 0)&&(V.string(t.description)||t.description===void 0)}e.is=t})(me||={});var he;(function(e){function t(e){return{label:e}}e.create=t})(he||={});var ge;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(ge||={});var F;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return V.string(t)||V.objectLiteral(t)&&V.string(t.language)&&V.string(t.value)}e.is=n})(F||={});var _e;(function(e){function t(e){let t=e;return!!t&&V.objectLiteral(t)&&(M.is(t.contents)||F.is(t.contents)||V.typedArray(t.contents,F.is))&&(e.range===void 0||h.is(e.range))}e.is=t})(_e||={});var ve;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(ve||={});var ye;(function(e){function t(e,t,...n){let r={label:e};return V.defined(t)&&(r.documentation=t),V.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(ye||={});var I;(function(e){e.Text=1,e.Read=2,e.Write=3})(I||={});var be;(function(e){function t(e,t){let n={range:e};return V.number(t)&&(n.kind=t),n}e.create=t})(be||={});var L;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(L||={});var xe;(function(e){e.Deprecated=1})(xe||={});var Se;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(Se||={});var Ce;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(Ce||={});var we;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&V.string(t.name)&&V.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||V.string(t.detail))&&(t.deprecated===void 0||V.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(we||={});var Te;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(Te||={});var R;(function(e){e.Invoked=1,e.Automatic=2})(R||={});var Ee;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return V.defined(t)&&V.typedArray(t.diagnostics,x.is)&&(t.only===void 0||V.typedArray(t.only,V.string))&&(t.triggerKind===void 0||t.triggerKind===R.Invoked||t.triggerKind===R.Automatic)}e.is=n})(Ee||={});var De;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):S.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&V.string(t.title)&&(t.diagnostics===void 0||V.typedArray(t.diagnostics,x.is))&&(t.kind===void 0||V.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||S.is(t.command))&&(t.isPreferred===void 0||V.boolean(t.isPreferred))&&(t.edit===void 0||k.is(t.edit))}e.is=n})(De||={});var Oe;(function(e){function t(e,t){let n={range:e};return V.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(t.range)&&(V.undefined(t.command)||S.is(t.command))}e.is=n})(Oe||={});var ke;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.uinteger(t.tabSize)&&V.boolean(t.insertSpaces)}e.is=n})(ke||={});var Ae;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(t.range)&&(V.undefined(t.target)||V.string(t.target))}e.is=n})(Ae||={});var je;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return V.objectLiteral(n)&&h.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(je||={});var Me;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Me||={});var Ne;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Ne||={});var Pe;(function(e){function t(e){let t=e;return V.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Pe||={});var Fe;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&h.is(t.range)&&V.string(t.text)}e.is=n})(Fe||={});var Ie;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&h.is(t.range)&&V.boolean(t.caseSensitiveLookup)&&(V.string(t.variableName)||t.variableName===void 0)}e.is=n})(Ie||={});var Le;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&h.is(t.range)&&(V.string(t.expression)||t.expression===void 0)}e.is=n})(Le||={});var Re;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&h.is(e.stoppedLocation)}e.is=n})(Re||={});var z;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(z||={});var B;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&(t.tooltip===void 0||V.string(t.tooltip)||M.is(t.tooltip))&&(t.location===void 0||g.is(t.location))&&(t.command===void 0||S.is(t.command))}e.is=n})(B||={});var ze;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&m.is(t.position)&&(V.string(t.label)||V.typedArray(t.label,B.is))&&(t.kind===void 0||z.is(t.kind))&&t.textEdits===void 0||V.typedArray(t.textEdits,C.is)&&(t.tooltip===void 0||V.string(t.tooltip)||M.is(t.tooltip))&&(t.paddingLeft===void 0||V.boolean(t.paddingLeft))&&(t.paddingRight===void 0||V.boolean(t.paddingRight))}e.is=n})(ze||={});var Be;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Be||={});var Ve;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Ve||={});var He;(function(e){function t(e){return{items:e}}e.create=t})(He||={});var Ue;(function(e){e.Invoked=0,e.Automatic=1})(Ue||={});var We;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(We||={});var Ge;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Ge||={});var Ke;(function(e){function t(e){let t=e;return V.objectLiteral(t)&&d.is(t.uri)&&V.string(t.name)}e.is=t})(Ke||={});var qe;(function(e){function t(e,t,n,r){return new Je(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(V.defined(t)&&V.string(t.uri)&&(V.undefined(t.languageId)||V.string(t.languageId))&&V.uinteger(t.lineCount)&&V.func(t.getText)&&V.func(t.positionAt)&&V.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(qe||={});var Je=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
|
|
2
2
|
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
|
|
3
3
|
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return m.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return m.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},V;(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(V||={});var H=class{constructor(e,t,n){this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);let r=e=>{let t=e.getLanguageId();if(t!==this._languageId)return;let n;this._listener[e.uri.toString()]=e.onDidChangeContent(()=>{window.clearTimeout(n),n=window.setTimeout(()=>this._doValidate(e.uri,t),500)}),this._doValidate(e.uri,t)},i=e=>{s.editor.setModelMarkers(e,this._languageId,[]);let t=e.uri.toString(),n=this._listener[t];n&&(n.dispose(),delete this._listener[t])};this._disposables.push(s.editor.onDidCreateModel(r)),this._disposables.push(s.editor.onWillDisposeModel(i)),this._disposables.push(s.editor.onDidChangeModelLanguage(e=>{i(e.model),r(e.model)})),this._disposables.push(n(e=>{s.editor.getModels().forEach(e=>{e.getLanguageId()===this._languageId&&(i(e),r(e))})})),this._disposables.push({dispose:()=>{s.editor.getModels().forEach(i);for(let e in this._listener)this._listener[e].dispose()}}),s.editor.getModels().forEach(r)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,t){this._worker(e).then(t=>t.doValidation(e.toString())).then(n=>{let r=n.map(t=>Xe(e,t)),i=s.editor.getModel(e);i&&i.getLanguageId()===t&&s.editor.setModelMarkers(i,t,r)}).then(void 0,e=>{console.error(e)})}};function Ye(e){switch(e){case b.Error:return s.MarkerSeverity.Error;case b.Warning:return s.MarkerSeverity.Warning;case b.Information:return s.MarkerSeverity.Info;case b.Hint:return s.MarkerSeverity.Hint;default:return s.MarkerSeverity.Info}}function Xe(e,t){let n=typeof t.code==`number`?String(t.code):t.code;return{severity:Ye(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:n,source:t.source}}var U=class{constructor(e,t){this._worker=e,this._triggerCharacters=t}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.doComplete(i.toString(),W(t))).then(n=>{if(!n)return;let r=e.getWordUntilPosition(t),i=new s.Range(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn),a=n.items.map(e=>{let t={label:e.label,insertText:e.insertText||e.label,sortText:e.sortText,filterText:e.filterText,documentation:e.documentation,detail:e.detail,command:$e(e.command),range:i,kind:Qe(e.kind)};return e.textEdit&&(Ze(e.textEdit)?t.range={insert:K(e.textEdit.insert),replace:K(e.textEdit.replace)}:t.range=K(e.textEdit.range),t.insertText=e.textEdit.newText),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(q)),e.insertTextFormat===P.Snippet&&(t.insertTextRules=s.languages.CompletionItemInsertTextRule.InsertAsSnippet),t});return{isIncomplete:n.isIncomplete,suggestions:a}})}};function W(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function G(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function K(e){if(e)return new s.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function Ze(e){return e.insert!==void 0&&e.replace!==void 0}function Qe(e){let t=s.languages.CompletionItemKind;switch(e){case N.Text:return t.Text;case N.Method:return t.Method;case N.Function:return t.Function;case N.Constructor:return t.Constructor;case N.Field:return t.Field;case N.Variable:return t.Variable;case N.Class:return t.Class;case N.Interface:return t.Interface;case N.Module:return t.Module;case N.Property:return t.Property;case N.Unit:return t.Unit;case N.Value:return t.Value;case N.Enum:return t.Enum;case N.Keyword:return t.Keyword;case N.Snippet:return t.Snippet;case N.Color:return t.Color;case N.File:return t.File;case N.Reference:return t.Reference}return t.Property}function q(e){if(e)return{range:K(e.range),text:e.newText}}function $e(e){return e&&e.command===`editor.action.triggerSuggest`?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var et=class{constructor(e){this._worker=e}provideHover(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.doHover(r.toString(),W(t))).then(e=>{if(e)return{range:K(e.range),contents:nt(e.contents)}})}};function tt(e){return e&&typeof e==`object`&&typeof e.kind==`string`}function J(e){return typeof e==`string`?{value:e}:tt(e)?e.kind===`plaintext`?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}:{value:e.value}:{value:"```"+e.language+`
|
|
4
4
|
`+e.value+"\n```\n"}}function nt(e){if(e)return Array.isArray(e)?e.map(J):[J(e)]}var Y=class{constructor(e){this._worker=e}provideDocumentHighlights(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.findDocumentHighlights(r.toString(),W(t))).then(e=>{if(e)return e.map(e=>({range:K(e.range),kind:rt(e.kind)}))})}};function rt(e){switch(e){case I.Read:return s.languages.DocumentHighlightKind.Read;case I.Write:return s.languages.DocumentHighlightKind.Write;case I.Text:return s.languages.DocumentHighlightKind.Text}return s.languages.DocumentHighlightKind.Text}var X=class{constructor(e){this._worker=e}provideDefinition(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.findDefinition(r.toString(),W(t))).then(e=>{if(e)return[Z(e)]})}};function Z(e){return{uri:s.Uri.parse(e.uri),range:K(e.range)}}var Q=class{constructor(e){this._worker=e}provideReferences(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.findReferences(i.toString(),W(t))).then(e=>{if(e)return e.map(Z)})}},it=class{constructor(e){this._worker=e}provideRenameEdits(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.doRename(i.toString(),W(t),n)).then(e=>at(e))}};function at(e){if(!e||!e.changes)return;let t=[];for(let n in e.changes){let r=s.Uri.parse(n);for(let i of e.changes[n])t.push({resource:r,versionId:void 0,textEdit:{range:K(i.range),text:i.newText}})}return{edits:t}}var ot=class{constructor(e){this._worker=e}provideDocumentSymbols(e,t){let n=e.uri;return this._worker(n).then(e=>e.findDocumentSymbols(n.toString())).then(e=>{if(e)return e.map(e=>st(e)?ct(e):{name:e.name,detail:``,containerName:e.containerName,kind:lt(e.kind),range:K(e.location.range),selectionRange:K(e.location.range),tags:[]})})}};function st(e){return`children`in e}function ct(e){return{name:e.name,detail:e.detail??``,kind:lt(e.kind),range:K(e.range),selectionRange:K(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(e=>ct(e))}}function lt(e){let t=s.languages.SymbolKind;switch(e){case L.File:return t.File;case L.Module:return t.Module;case L.Namespace:return t.Namespace;case L.Package:return t.Package;case L.Class:return t.Class;case L.Method:return t.Method;case L.Property:return t.Property;case L.Field:return t.Field;case L.Constructor:return t.Constructor;case L.Enum:return t.Enum;case L.Interface:return t.Interface;case L.Function:return t.Function;case L.Variable:return t.Variable;case L.Constant:return t.Constant;case L.String:return t.String;case L.Number:return t.Number;case L.Boolean:return t.Boolean;case L.Array:return t.Array}return t.Function}var ut=class{constructor(e){this._worker=e}provideLinks(e,t){let n=e.uri;return this._worker(n).then(e=>e.findDocumentLinks(n.toString())).then(e=>{if(e)return{links:e.map(e=>({range:K(e.range),url:e.target}))}})}},dt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.format(r.toString(),null,$(t)).then(e=>{if(!(!e||e.length===0))return e.map(q)}))}},ft=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,t,n,r){let i=e.uri;return this._worker(i).then(e=>e.format(i.toString(),G(t),$(n)).then(e=>{if(!(!e||e.length===0))return e.map(q)}))}};function $(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var pt=class{constructor(e){this._worker=e}provideDocumentColors(e,t){let n=e.uri;return this._worker(n).then(e=>e.findDocumentColors(n.toString())).then(e=>{if(e)return e.map(e=>({color:e.color,range:K(e.range)}))})}provideColorPresentations(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.getColorPresentations(r.toString(),t.color,G(t.range))).then(e=>{if(e)return e.map(e=>{let t={label:e.label};return e.textEdit&&(t.textEdit=q(e.textEdit)),e.additionalTextEdits&&(t.additionalTextEdits=e.additionalTextEdits.map(q)),t})})}},mt=class{constructor(e){this._worker=e}provideFoldingRanges(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.getFoldingRanges(r.toString(),t)).then(e=>{if(e)return e.map(e=>{let t={start:e.startLine+1,end:e.endLine+1};return e.kind!==void 0&&(t.kind=ht(e.kind)),t})})}};function ht(e){switch(e){case v.Comment:return s.languages.FoldingRangeKind.Comment;case v.Imports:return s.languages.FoldingRangeKind.Imports;case v.Region:return s.languages.FoldingRangeKind.Region}}var gt=class{constructor(e){this._worker=e}provideSelectionRanges(e,t,n){let r=e.uri;return this._worker(r).then(e=>e.getSelectionRanges(r.toString(),t.map(W))).then(e=>{if(e)return e.map(e=>{let t=[];for(;e;)t.push({range:K(e.range)}),e=e.parent;return t})})}};function _t(e){let t=[],n=[],r=new l(e);t.push(r);let i=(...e)=>r.getLanguageServiceWorker(...e);function a(){let{languageId:t,modeConfiguration:r}=e;yt(n),r.completionItems&&n.push(s.languages.registerCompletionItemProvider(t,new U(i,[`/`,`-`,`:`]))),r.hovers&&n.push(s.languages.registerHoverProvider(t,new et(i))),r.documentHighlights&&n.push(s.languages.registerDocumentHighlightProvider(t,new Y(i))),r.definitions&&n.push(s.languages.registerDefinitionProvider(t,new X(i))),r.references&&n.push(s.languages.registerReferenceProvider(t,new Q(i))),r.documentSymbols&&n.push(s.languages.registerDocumentSymbolProvider(t,new ot(i))),r.rename&&n.push(s.languages.registerRenameProvider(t,new it(i))),r.colors&&n.push(s.languages.registerColorProvider(t,new pt(i))),r.foldingRanges&&n.push(s.languages.registerFoldingRangeProvider(t,new mt(i))),r.diagnostics&&n.push(new H(t,i,e.onDidChange)),r.selectionRanges&&n.push(s.languages.registerSelectionRangeProvider(t,new gt(i))),r.documentFormattingEdits&&n.push(s.languages.registerDocumentFormattingEditProvider(t,new dt(i))),r.documentRangeFormattingEdits&&n.push(s.languages.registerDocumentRangeFormattingEditProvider(t,new ft(i)))}return a(),t.push(vt(n)),vt(t)}function vt(e){return{dispose:()=>yt(e)}}function yt(e){for(;e.length;)e.pop().dispose()}export{U as CompletionAdapter,X as DefinitionAdapter,H as DiagnosticsAdapter,pt as DocumentColorAdapter,dt as DocumentFormattingEditProvider,Y as DocumentHighlightAdapter,ut as DocumentLinkAdapter,ft as DocumentRangeFormattingEditProvider,ot as DocumentSymbolAdapter,mt as FoldingRangeAdapter,et as HoverAdapter,Q as ReferenceAdapter,it as RenameAdapter,gt as SelectionRangeAdapter,l as WorkerManager,W as fromPosition,G as fromRange,_t as setupMode,K as toRange,q as toTextEdit};
|