aiex-cli 0.0.1-beta.28 → 0.0.1-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +151 -26
- package/dist/core/schema-sqlite/migrate-helper.mjs +15 -28
- package/dist/{doctor-collector-D2q6iD_e.mjs → doctor-collector-j2dG7dG1.mjs} +41 -4
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-Dn58ZHhM.js +339 -0
- package/dist/web/assets/DataBrowser-B6WECCZM.js +6 -0
- package/dist/web/assets/{ExtractionViewer-WMUdXeyU.js → ExtractionViewer-CTS1RXzc.js} +1 -1
- package/dist/web/assets/JsonSchemaEditor-Dpgu6HPz.js +570 -0
- package/dist/web/assets/api-client-CbQEkaKT.js +1 -0
- package/dist/web/assets/dialog-CUkPLPNP.js +109 -0
- package/dist/web/assets/{index-CuOQk7nB.js → index-g2pWXPQZ.js} +38 -38
- package/dist/web/assets/object-utils-DPPzLQjH.js +1 -0
- package/dist/web/assets/select-DyjIzt-v.js +439 -0
- package/dist/web/index.html +5 -5
- package/package.json +5 -1
- package/src/core/schema-sqlite/migrate-helper.ts +15 -40
- package/dist/web/assets/AISettings-DFi-nXIi.js +0 -334
- package/dist/web/assets/DataBrowser-BWSX8O2h.js +0 -5
- package/dist/web/assets/JsonSchemaEditor-B57coz1O.js +0 -929
- package/dist/web/assets/api-client-By2rWtpv.js +0 -1
- package/dist/web/assets/dialog-dMXSeJQQ.js +0 -108
- package/dist/web/assets/overlayeventbus-CRKW6UCj.js +0 -80
- package/dist/web/assets/table-schema-C90NJyfq.js +0 -2
- /package/dist/web/assets/{runtime-dom.esm-bundler-DmdkgxQM.js → runtime-dom.esm-bundler-ei_N7Xjw.js} +0 -0
|
@@ -0,0 +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};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import{An as e,B as t,Cn as n,Fn as r,G as i,Ht as a,K as o,Kt as s,Lt as c,M as l,Nn as u,Pt as d,Qt as f,S as p,Sn as m,Tn as h,U as g,W as _,Xt as v,_ as y,a as b,bn as ee,c as x,d as S,dn as te,f as ne,g as C,gn as re,h as w,i as T,in as E,jn as ie,ln as ae,m as oe,mn as se,n as ce,nt as D,o as le,pn as O,qt as ue,rt as de,sn as fe,t as pe,v as k,x as me,xn as he}from"./button-Cdgr9Igy.js";import{t as ge}from"./runtime-dom.esm-bundler-ei_N7Xjw.js";function _e(){let e=[],t=(t,n,r=999)=>{let a=i(t,n,r),o=a.value+(a.key===t?0:r)+1;return e.push({key:t,value:o}),o},n=t=>{e=e.filter(e=>e.value!==t)},r=(e,t)=>i(e,t).value,i=(t,n,r=0)=>[...e].reverse().find(e=>n?!0:e.key===t)||{key:t,value:r},a=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:a,set:(e,n,r)=>{n&&(n.style.zIndex=String(t(e,!0,r)))},clear:e=>{e&&(n(a(e)),e.style.zIndex=``)},getCurrent:e=>r(e,!0)}}var A=_e(),j={STARTS_WITH:`startsWith`,CONTAINS:`contains`,NOT_CONTAINS:`notContains`,ENDS_WITH:`endsWith`,EQUALS:`equals`,NOT_EQUALS:`notEquals`,IN:`in`,LESS_THAN:`lt`,LESS_THAN_OR_EQUAL_TO:`lte`,GREATER_THAN:`gt`,GREATER_THAN_OR_EQUAL_TO:`gte`,BETWEEN:`between`,DATE_IS:`dateIs`,DATE_IS_NOT:`dateIsNot`,DATE_BEFORE:`dateBefore`,DATE_AFTER:`dateAfter`};function M(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=N(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function N(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 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}var F={filter:function(e,t,n,r,i){var a=[];if(!e)return a;var o=M(e),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;if(typeof c==`string`){if(this.filters[r](c,n,i)){a.push(c);continue}}else{var l=M(t),d;try{for(l.s();!(d=l.n()).done;){var f=d.value,p=u(c,f);if(this.filters[r](p,n,i)){a.push(c);break}}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){o.e(e)}finally{o.f()}return a},filters:{startsWith:function(t,n,r){if(n==null||n===``)return!0;if(t==null)return!1;var i=e(n.toString()).toLocaleLowerCase(r);return e(t.toString()).toLocaleLowerCase(r).slice(0,i.length)===i},contains:function(t,n,r){if(n==null||n===``)return!0;if(t==null)return!1;var i=e(n.toString()).toLocaleLowerCase(r);return e(t.toString()).toLocaleLowerCase(r).indexOf(i)!==-1},notContains:function(t,n,r){if(n==null||n===``)return!0;if(t==null)return!1;var i=e(n.toString()).toLocaleLowerCase(r);return e(t.toString()).toLocaleLowerCase(r).indexOf(i)===-1},endsWith:function(t,n,r){if(n==null||n===``)return!0;if(t==null)return!1;var i=e(n.toString()).toLocaleLowerCase(r),a=e(t.toString()).toLocaleLowerCase(r);return a.indexOf(i,a.length-i.length)!==-1},equals:function(t,n,r){return n==null||n===``?!0:t==null?!1:t.getTime&&n.getTime?t.getTime()===n.getTime():e(t.toString()).toLocaleLowerCase(r)==e(n.toString()).toLocaleLowerCase(r)},notEquals:function(t,n,r){return n==null||n===``?!1:t==null?!0:t.getTime&&n.getTime?t.getTime()!==n.getTime():e(t.toString()).toLocaleLowerCase(r)!=e(n.toString()).toLocaleLowerCase(r)},in:function(e,t){if(t==null||t.length===0)return!0;for(var n=0;n<t.length;n++)if(ie(e,t[n]))return!0;return!1},between:function(e,t){return t==null||t[0]==null||t[1]==null?!0:e==null?!1:e.getTime?t[0].getTime()<=e.getTime()&&e.getTime()<=t[1].getTime():t[0]<=e&&e<=t[1]},lt:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()<t.getTime():e<t},lte:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()<=t.getTime():e<=t},gt:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()>t.getTime():e>t},gte:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()>=t.getTime():e>=t},dateIs:function(e,t){return t==null?!0:e==null?!1:(typeof e==`string`&&(e=new Date(e)),typeof t==`string`&&(t=new Date(t)),e.toDateString()===t.toDateString())},dateIsNot:function(e,t){return t==null?!0:e==null?!1:(typeof e==`string`&&(e=new Date(e)),typeof t==`string`&&(t=new Date(t)),e.toDateString()!==t.toDateString())},dateBefore:function(e,t){return t==null?!0:e==null?!1:(typeof e==`string`&&(e=new Date(e)),typeof t==`string`&&(t=new Date(t)),e.getTime()<t.getTime())},dateAfter:function(e,t){return t==null?!0:e==null?!1:(typeof e==`string`&&(e=new Date(e)),typeof t==`string`&&(t=new Date(t)),e.getTime()>t.getTime())}},register:function(e,t){this.filters[e]=t}};function I(e){"@babel/helpers - typeof";return I=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},I(e)}function ve(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,xe(r.key),r)}}function be(e,t,n){return t&&ye(e.prototype,t),Object.defineProperty(e,`prototype`,{writable:!1}),e}function xe(e){var t=Se(e,`string`);return I(t)==`symbol`?t:t+``}function Se(e,t){if(I(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}var Ce=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};ve(this,e),this.element=t,this.listener=n}return be(e,[{key:`bindScrollListener`,value:function(){this.scrollableParents=s(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener(`scroll`,this.listener)}},{key:`unbindScrollListener`,value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener(`scroll`,this.listener)}},{key:`destroy`,value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])}(),L={name:`TimesIcon`,extends:T};function we(e){return Oe(e)||De(e)||Ee(e)||Te()}function Te(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ee(e,t){if(e){if(typeof e==`string`)return R(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)?R(e,t):void 0}}function De(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Oe(e){if(Array.isArray(e))return R(e)}function R(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 ke(e,n,r,i,a,o){return t(),k(`svg`,l({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),we(n[0]||=[w(`path`,{d:`M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z`,fill:`currentColor`},null,-1)]),16)}L.render=ke;var z={name:`WindowMaximizeIcon`,extends:T};function Ae(e){return Pe(e)||Ne(e)||Me(e)||je()}function je(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Me(e,t){if(e){if(typeof e==`string`)return B(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)?B(e,t):void 0}}function Ne(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Pe(e){if(Array.isArray(e))return B(e)}function B(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 Fe(e,n,r,i,a,o){return t(),k(`svg`,l({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),Ae(n[0]||=[w(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z`,fill:`currentColor`},null,-1)]),16)}z.render=Fe;var V={name:`WindowMinimizeIcon`,extends:T};function Ie(e){return Be(e)||ze(e)||Re(e)||Le()}function Le(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Re(e,t){if(e){if(typeof e==`string`)return H(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)?H(e,t):void 0}}function ze(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Be(e){if(Array.isArray(e))return H(e)}function H(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 Ve(e,n,r,i,a,o){return t(),k(`svg`,l({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),Ie(n[0]||=[w(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z`,fill:`currentColor`},null,-1)]),16)}V.render=Ve;var He=x.extend({name:`focustrap-directive`}),Ue=le.extend({style:He});function U(e){"@babel/helpers - typeof";return U=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},U(e)}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?W(Object(n),!0).forEach(function(t){We(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function We(e,t,n){return(t=Ge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){var t=Ke(e,`string`);return U(t)==`symbol`?t:t+``}function Ke(e,t){if(U(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(U(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var qe=Ue.extend(`focustrap`,{mounted:function(e,t){(t.value||{}).disabled||(this.createHiddenFocusableElements(e,t),this.bind(e,t),this.autoElementFocus(e,t)),e.setAttribute(`data-pd-focustrap`,!0),this.$el=e},updated:function(e,t){(t.value||{}).disabled&&this.unbind(e)},unmounted:function(e){this.unbind(e)},methods:{getComputedSelector:function(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??``}`},bind:function(e,t){var i=this,a=t.value||{},o=a.onFocusIn,s=a.onFocusOut;e.$_pfocustrap_mutationobserver=new MutationObserver(function(t){t.forEach(function(t){if(t.type===`childList`&&!e.contains(document.activeElement)){var a=function(t){var o=v(t)?v(t,i.getComputedSelector(e.$_pfocustrap_focusableselector))?t:n(e,i.getComputedSelector(e.$_pfocustrap_focusableselector)):n(t);return r(o)?o:t.nextSibling&&a(t.nextSibling)};O(a(t.nextSibling))}})}),e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_mutationobserver.observe(e,{childList:!0}),e.$_pfocustrap_focusinlistener=function(e){return o&&o(e)},e.$_pfocustrap_focusoutlistener=function(e){return s&&s(e)},e.addEventListener(`focusin`,e.$_pfocustrap_focusinlistener),e.addEventListener(`focusout`,e.$_pfocustrap_focusoutlistener)},unbind:function(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener(`focusin`,e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener(`focusout`,e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)},autoFocus:function(e){this.autoElementFocus(this.$el,{value:G(G({},e),{},{autoFocus:!0})})},autoElementFocus:function(e,t){var r=t.value||{},i=r.autoFocusSelector,a=i===void 0?``:i,o=r.firstFocusableSelector,s=o===void 0?``:o,c=r.autoFocus,l=c===void 0?!1:c,u=n(e,`[autofocus]${this.getComputedSelector(a)}`);l&&!u&&(u=n(e,this.getComputedSelector(s))),O(u)},onFirstHiddenElementFocus:function(e){var t,r=e.currentTarget,i=e.relatedTarget;O(i===r.$_pfocustrap_lasthiddenfocusableelement||!((t=this.$el)!=null&&t.contains(i))?n(r.parentElement,this.getComputedSelector(r.$_pfocustrap_focusableselector)):r.$_pfocustrap_lasthiddenfocusableelement)},onLastHiddenElementFocus:function(e){var t,n=e.currentTarget,r=e.relatedTarget;O(r===n.$_pfocustrap_firsthiddenfocusableelement||!((t=this.$el)!=null&&t.contains(r))?f(n.parentElement,this.getComputedSelector(n.$_pfocustrap_focusableselector)):n.$_pfocustrap_firsthiddenfocusableelement)},createHiddenFocusableElements:function(e,t){var n=this,r=t.value||{},i=r.tabIndex,a=i===void 0?0:i,o=r.firstFocusableSelector,s=o===void 0?``:o,c=r.lastFocusableSelector,l=c===void 0?``:c,u=function(e){return fe(`span`,{class:`p-hidden-accessible p-hidden-focusable`,tabIndex:a,role:`presentation`,"aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e?.bind(n)})},d=u(this.onFirstHiddenElementFocus),f=u(this.onLastHiddenElementFocus);d.$_pfocustrap_lasthiddenfocusableelement=f,d.$_pfocustrap_focusableselector=s,d.setAttribute(`data-pc-section`,`firstfocusableelement`),f.$_pfocustrap_firsthiddenfocusableelement=d,f.$_pfocustrap_focusableselector=l,f.setAttribute(`data-pc-section`,`lastfocusableelement`),e.prepend(d),e.append(f)}}}),K={name:`Portal`,props:{appendTo:{type:[String,Object],default:`body`},disabled:{type:Boolean,default:!1}},data:function(){return{mounted:!1}},mounted:function(){this.mounted=he()},computed:{inline:function(){return this.disabled||this.appendTo===`self`}}};function q(e,n,r,i,a,o){return o.inline?g(e.$slots,`default`,{key:0}):a.mounted?(t(),C(ne,{key:1,to:r.appendTo},[g(e.$slots,`default`)],8,[`to`])):y(``,!0)}K.render=q;function J(){ee({variableName:a(`scrollbar.width`).name})}function Y(){se({variableName:a(`scrollbar.width`).name})}var Je=x.extend({name:`dialog`,style:`
|
|
6
|
+
.p-dialog {
|
|
7
|
+
max-height: 90%;
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
border-radius: dt('dialog.border.radius');
|
|
10
|
+
box-shadow: dt('dialog.shadow');
|
|
11
|
+
background: dt('dialog.background');
|
|
12
|
+
border: 1px solid dt('dialog.border.color');
|
|
13
|
+
color: dt('dialog.color');
|
|
14
|
+
will-change: transform;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.p-dialog-content {
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
padding: dt('dialog.content.padding');
|
|
20
|
+
flex-grow: 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.p-dialog-header {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
padding: dt('dialog.header.padding');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.p-dialog-title {
|
|
32
|
+
font-weight: dt('dialog.title.font.weight');
|
|
33
|
+
font-size: dt('dialog.title.font.size');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.p-dialog-footer {
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
padding: dt('dialog.footer.padding');
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: flex-end;
|
|
41
|
+
gap: dt('dialog.footer.gap');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.p-dialog-header-actions {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: dt('dialog.header.gap');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.p-dialog-top .p-dialog,
|
|
51
|
+
.p-dialog-bottom .p-dialog,
|
|
52
|
+
.p-dialog-left .p-dialog,
|
|
53
|
+
.p-dialog-right .p-dialog,
|
|
54
|
+
.p-dialog-topleft .p-dialog,
|
|
55
|
+
.p-dialog-topright .p-dialog,
|
|
56
|
+
.p-dialog-bottomleft .p-dialog,
|
|
57
|
+
.p-dialog-bottomright .p-dialog {
|
|
58
|
+
margin: 1rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.p-dialog-maximized {
|
|
62
|
+
width: 100vw !important;
|
|
63
|
+
height: 100vh !important;
|
|
64
|
+
top: 0px !important;
|
|
65
|
+
left: 0px !important;
|
|
66
|
+
max-height: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
border-radius: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.p-dialog .p-resizable-handle {
|
|
72
|
+
position: absolute;
|
|
73
|
+
font-size: 0.1px;
|
|
74
|
+
display: block;
|
|
75
|
+
cursor: se-resize;
|
|
76
|
+
width: 12px;
|
|
77
|
+
height: 12px;
|
|
78
|
+
right: 1px;
|
|
79
|
+
bottom: 1px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.p-dialog-enter-active {
|
|
83
|
+
animation: p-animate-dialog-enter 300ms cubic-bezier(.19,1,.22,1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.p-dialog-leave-active {
|
|
87
|
+
animation: p-animate-dialog-leave 300ms cubic-bezier(.19,1,.22,1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes p-animate-dialog-enter {
|
|
91
|
+
from {
|
|
92
|
+
opacity: 0;
|
|
93
|
+
transform: scale(0.93);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@keyframes p-animate-dialog-leave {
|
|
98
|
+
to {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transform: scale(0.93);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`,classes:{mask:function(e){var t=e.props,n=[`left`,`right`,`top`,`topleft`,`topright`,`bottom`,`bottomleft`,`bottomright`].find(function(e){return e===t.position});return[`p-dialog-mask`,{"p-overlay-mask p-overlay-mask-enter-active":t.modal},n?`p-dialog-${n}`:``]},root:function(e){var t=e.props,n=e.instance;return[`p-dialog p-component`,{"p-dialog-maximized":t.maximizable&&n.maximized}]},header:`p-dialog-header`,title:`p-dialog-title`,headerActions:`p-dialog-header-actions`,pcMaximizeButton:`p-dialog-maximize-button`,pcCloseButton:`p-dialog-close-button`,content:`p-dialog-content`,footer:`p-dialog-footer`},inlineStyles:{mask:function(e){var t=e.position,n=e.modal;return{position:`fixed`,height:`100%`,width:`100%`,left:0,top:0,display:`flex`,justifyContent:t===`left`||t===`topleft`||t===`bottomleft`?`flex-start`:t===`right`||t===`topright`||t===`bottomright`?`flex-end`:`center`,alignItems:t===`top`||t===`topleft`||t===`topright`?`flex-start`:t===`bottom`||t===`bottomleft`||t===`bottomright`?`flex-end`:`center`,pointerEvents:n?`auto`:`none`}},root:{display:`flex`,flexDirection:`column`,pointerEvents:`auto`}}}),X={name:`Dialog`,extends:{name:`BaseDialog`,extends:b,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:`center`},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:`body`},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},maximizeButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},_instance:null},style:Je,provide:function(){return{$pcDialog:this,$parentInstance:this}}},inheritAttrs:!1,emits:[`update:visible`,`show`,`hide`,`after-hide`,`maximize`,`unmaximize`,`dragstart`,`dragend`],provide:function(){var e=this;return{dialogRef:oe(function(){return e._instance})}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null,target:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,maskMouseDownTarget:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&A.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit(`update:visible`,!1)},onEnter:function(){this.$emit(`show`),this.target=document.activeElement,this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&A.set(`modal`,this.mask,this.baseZIndex||this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.focus()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&ae(this.mask,`p-overlay-mask-leave-active`),this.dragging&&this.documentDragEndListener&&this.documentDragEndListener()},onLeave:function(){this.$emit(`hide`),O(this.target),this.target=null,this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&A.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit(`after-hide`)},onMaskMouseDown:function(e){this.maskMouseDownTarget=e.target},onMaskMouseUp:function(){this.dismissableMask&&this.modal&&this.mask===this.maskMouseDownTarget&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector(`[autofocus]`)},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&O(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit(`unmaximize`,e)):(this.maximized=!0,this.$emit(`maximize`,e)),this.modal||(this.maximized?J():Y())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&J()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&Y()},onKeyDown:function(e){e.code===`Escape`&&this.closeOnEscape&&!e.isComposing&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener(`keydown`,this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&=(window.document.removeEventListener(`keydown`,this.documentKeydownListener),null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e?e.$el:void 0},closeButtonRef:function(e){this.closeButton=e?e.$el:void 0},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement(`style`),this.styleElement.type=`text/css`,te(this.styleElement,`nonce`,(e=this.$primevue)==null||(e=e.config)==null||(e=e.csp)==null?void 0:e.nonce),document.head.appendChild(this.styleElement);var t=``;for(var n in this.breakpoints)t+=`
|
|
104
|
+
@media screen and (max-width: ${n}) {
|
|
105
|
+
.p-dialog[${this.$attrSelector}] {
|
|
106
|
+
width: ${this.breakpoints[n]} !important;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`;this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&=(document.head.removeChild(this.styleElement),null)},initDrag:function(e){e.target.closest(`div`).getAttribute(`data-pc-section`)!==`headeractions`&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin=`0`,document.body.setAttribute(`data-p-unselectable-text`,`true`),!this.isUnstyled&&E(document.body,{"user-select":`none`}),this.$emit(`dragstart`,e))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=m(e.container),r=ue(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,o=e.container.getBoundingClientRect(),s=o.left+i,c=o.top+a,l=re(),u=getComputedStyle(e.container),d=parseFloat(u.marginLeft),f=parseFloat(u.marginTop);e.container.style.position=`fixed`,e.keepInViewport?(s>=e.minX&&s+n<l.width&&(e.lastPageX=t.pageX,e.container.style.left=s-d+`px`),c>=e.minY&&c+r<l.height&&(e.lastPageY=t.pageY,e.container.style.top=c-f+`px`)):(e.lastPageX=t.pageX,e.container.style.left=s-d+`px`,e.lastPageY=t.pageY,e.container.style.top=c-f+`px`)}},window.document.addEventListener(`mousemove`,this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&=(window.document.removeEventListener(`mousemove`,this.documentDragListener),null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,document.body.removeAttribute(`data-p-unselectable-text`),!e.isUnstyled&&(document.body.style[`user-select`]=``),e.$emit(`dragend`,t))},window.document.addEventListener(`mouseup`,this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&=(window.document.removeEventListener(`mouseup`,this.documentDragEndListener),null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?`span`:`WindowMinimizeIcon`:this.maximizeIcon?`span`:`WindowMaximizeIcon`},ariaLabelledById:function(){return this.header!=null||this.$attrs[`aria-labelledby`]!==null?this.$id+`_header`:null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},dataP:function(){return h({maximized:this.maximized,modal:this.modal})}},directives:{ripple:ce,focustrap:qe},components:{Button:pe,Portal:K,WindowMinimizeIcon:V,WindowMaximizeIcon:z,TimesIcon:L}};function Z(e){"@babel/helpers - typeof";return Z=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},Z(e)}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Q(Object(n),!0).forEach(function(t){Ye(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ye(e,t,n){return(t=Xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xe(e){var t=Ze(e,`string`);return Z(t)==`symbol`?t:t+``}function Ze(e,t){if(Z(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Z(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Qe=[`data-p`],$e=[`aria-labelledby`,`aria-modal`,`data-p`],et=[`id`],tt=[`data-p`];function nt(e,n,r,a,s,u){var f=_(`Button`),m=_(`Portal`),h=i(`focustrap`);return t(),C(m,{appendTo:e.appendTo},{default:D(function(){return[s.containerVisible?(t(),k(`div`,l({key:0,ref:u.maskRef,class:e.cx(`mask`),style:e.sx(`mask`,!0,{position:e.position,modal:e.modal}),onMousedown:n[1]||=function(){return u.onMaskMouseDown&&u.onMaskMouseDown.apply(u,arguments)},onMouseup:n[2]||=function(){return u.onMaskMouseUp&&u.onMaskMouseUp.apply(u,arguments)},"data-p":u.dataP},e.ptm(`mask`)),[p(ge,l({name:`p-dialog`,onEnter:u.onEnter,onAfterEnter:u.onAfterEnter,onBeforeLeave:u.onBeforeLeave,onLeave:u.onLeave,onAfterLeave:u.onAfterLeave,appear:``},e.ptm(`transition`)),{default:D(function(){return[e.visible?de((t(),k(`div`,l({key:0,ref:u.containerRef,class:e.cx(`root`),style:e.sx(`root`),role:`dialog`,"aria-labelledby":u.ariaLabelledById,"aria-modal":e.modal,"data-p":u.dataP},e.ptmi(`root`)),[e.$slots.container?g(e.$slots,`container`,{key:0,closeCallback:u.close,maximizeCallback:function(e){return u.maximize(e)},initDragCallback:u.initDrag}):(t(),k(S,{key:1},[e.showHeader?(t(),k(`div`,l({key:0,ref:u.headerContainerRef,class:e.cx(`header`),onMousedown:n[0]||=function(){return u.initDrag&&u.initDrag.apply(u,arguments)}},e.ptm(`header`)),[g(e.$slots,`header`,{class:d(e.cx(`title`))},function(){return[e.header?(t(),k(`span`,l({key:0,id:u.ariaLabelledById,class:e.cx(`title`)},e.ptm(`title`)),c(e.header),17,et)):y(``,!0)]}),w(`div`,l({class:e.cx(`headerActions`)},e.ptm(`headerActions`)),[e.maximizable?g(e.$slots,`maximizebutton`,{key:0,maximized:s.maximized,maximizeCallback:function(e){return u.maximize(e)}},function(){return[p(f,l({ref:u.maximizableRef,autofocus:s.focusableMax,class:e.cx(`pcMaximizeButton`),onClick:u.maximize,tabindex:e.maximizable?`0`:`-1`,unstyled:e.unstyled},e.maximizeButtonProps,{pt:e.ptm(`pcMaximizeButton`),"data-pc-group-section":`headericon`}),{icon:D(function(n){return[g(e.$slots,`maximizeicon`,{maximized:s.maximized},function(){return[(t(),C(o(u.maximizeIconComponent),l({class:[n.class,s.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm(`pcMaximizeButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`autofocus`,`class`,`onClick`,`tabindex`,`unstyled`,`pt`])]}):y(``,!0),e.closable?g(e.$slots,`closebutton`,{key:1,closeCallback:u.close},function(){return[p(f,l({ref:u.closeButtonRef,autofocus:s.focusableClose,class:e.cx(`pcCloseButton`),onClick:u.close,"aria-label":u.closeAriaLabel,unstyled:e.unstyled},e.closeButtonProps,{pt:e.ptm(`pcCloseButton`),"data-pc-group-section":`headericon`}),{icon:D(function(n){return[g(e.$slots,`closeicon`,{},function(){return[(t(),C(o(e.closeIcon?`span`:`TimesIcon`),l({class:[e.closeIcon,n.class]},e.ptm(`pcCloseButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`autofocus`,`class`,`onClick`,`aria-label`,`unstyled`,`pt`])]}):y(``,!0)],16)],16)):y(``,!0),w(`div`,l({ref:u.contentRef,class:[e.cx(`content`),e.contentClass],style:e.contentStyle,"data-p":u.dataP},$($({},e.contentProps),e.ptm(`content`))),[g(e.$slots,`default`)],16,tt),e.footer||e.$slots.footer?(t(),k(`div`,l({key:1,ref:u.footerContainerRef,class:e.cx(`footer`)},e.ptm(`footer`)),[g(e.$slots,`footer`,{},function(){return[me(c(e.footer),1)]})],16)):y(``,!0)],64))],16,$e)),[[h,{disabled:!e.modal}]]):y(``,!0)]}),_:3},16,[`onEnter`,`onAfterEnter`,`onBeforeLeave`,`onLeave`,`onAfterLeave`])],16,Qe)):y(``,!0)]}),_:3},8,[`appendTo`])}X.render=nt;export{j as a,Ce as i,K as n,F as o,L as r,A as s,X as t};
|