@coffer-org/web 1.9.0 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Combination-lRbXGCSx.js +41 -0
- package/dist/assets/ExtendReasonInfo-D50L3SUy.js +1 -0
- package/dist/assets/{MarkdownEditor-BRFu6dnQ.js → MarkdownEditor-BZVJGWMb.js} +2 -2
- package/dist/assets/{NewRecordView-DPWHL7il.js → NewRecordView-Bc5P_UIV.js} +1 -1
- package/dist/assets/{PluginSettingsPage-Csx46vJ2.js → PluginSettingsPage-uganqrBt.js} +1 -1
- package/dist/assets/{SettingsForm-BlSnJkUU.js → SettingsForm-JjEXZ-t9.js} +1 -1
- package/dist/assets/SettingsPage-D7eX_VOW.js +3 -0
- package/dist/assets/Toolbar-BwCsWgeh.js +2 -0
- package/dist/assets/auth-context-Cw3aF7cR.js +1 -0
- package/dist/assets/countries-BlKrWFMP.js +1 -0
- package/dist/assets/{data-size-DCGcE2iT.js → data-size-Bszy5tww.js} +1 -1
- package/dist/assets/{dist-D0lzj0II.js → dist-BNur_jh6.js} +1 -1
- package/dist/assets/{dist-B02SqOKT.js → dist-ByXt-qy3.js} +1 -1
- package/dist/assets/{dist-0L0REEL4.js → dist-CFdrMgLX.js} +1 -1
- package/dist/assets/dist-CJvyz0jt.js +1 -0
- package/dist/assets/dist-CZA4BBQN.js +11 -0
- package/dist/assets/dist-Cnq8rabN.js +23 -0
- package/dist/assets/{dist-C9iafu0r.js → dist-DfIinXjG.js} +1 -1
- package/dist/assets/{dist-BRl6D2sz.js → dist-DgQ7xbd_.js} +1 -1
- package/dist/assets/{dist-B3teaDxf.js → dist-DjjCJQor.js} +1 -1
- package/dist/assets/dist-Dn87YmtR.js +1 -0
- package/dist/assets/dist-mtKKRYXL.js +9 -0
- package/dist/assets/{dist-mpdotBBM.js → dist-rZsvLEhc.js} +1 -1
- package/dist/assets/{dist-DnLPZbvG.js → dist-tEJ-k59b.js} +1 -1
- package/dist/assets/{extend-DDZLGxKJ.js → extend-B2TSunN9.js} +1 -1
- package/dist/assets/field-frame-ghjkvmJL.js +1 -0
- package/dist/assets/{fields-B4fdbc1_.js → fields-DM_Scep8.js} +1 -1
- package/dist/assets/index-CO8Ldftb.css +2 -0
- package/dist/assets/{index-BISxM9jx.js → index-DS03kek4.js} +62 -62
- package/dist/assets/json-DhhZ0035.js +1 -0
- package/dist/assets/shared-2FvmrkOU.js +1 -0
- package/dist/assets/{shelf-e7xL1R3N.js → shelf-BK3PnmC8.js} +1 -1
- package/dist/assets/src-1rZMvlbf.js +1 -0
- package/dist/assets/{src-Cq7iaGwG.js → src-9R01NlCm.js} +1 -1
- package/dist/assets/src-B1D9UYwu.js +1 -0
- package/dist/assets/src-B1xlnIj1.js +1 -0
- package/dist/assets/src-BMbgcBzC.js +4 -0
- package/dist/assets/{src-BYe9NBzz.js → src-BRmMx6aP.js} +1 -1
- package/dist/assets/{src-juXm-tHq.js → src-BTBN5KMd.js} +1 -1
- package/dist/assets/{src-BB5pAQoq.js → src-BZR3veCD.js} +1 -1
- package/dist/assets/{src-CQcwtQ4u.js → src-BesH3Mb-.js} +1 -1
- package/dist/assets/{src-D6YMn8QE.js → src-Btcb_Owg.js} +1 -1
- package/dist/assets/{src-BEw_wZX0.js → src-Bw5hUET5.js} +1 -1
- package/dist/assets/{src-CW-yI1QF.js → src-C5aZ23Xq.js} +1 -1
- package/dist/assets/{src-Cldq12DB.js → src-CGDLkExi.js} +1 -1
- package/dist/assets/src-CJ63Qi1g.js +1 -0
- package/dist/assets/src-CuAjDF_E.js +1 -0
- package/dist/assets/{src-BKpM04ou.js → src-D4Vq1SI2.js} +2 -2
- package/dist/assets/{src-CVMB8d9V.js → src-DiXQGHgL.js} +1 -1
- package/dist/assets/{src-iQwVT5tJ.js → src-O8AsCoRg.js} +1 -1
- package/dist/assets/{src-BNqZqACY.js → src-SoSUSubV.js} +1 -1
- package/dist/assets/src-YB9DbMxM.js +1 -0
- package/dist/assets/{src-w4NORKjp.js → src-YM3yhIXD.js} +1 -1
- package/dist/assets/{src-BylCqt8_.js → src-x98wK60X.js} +1 -1
- package/dist/assets/{src-Dm6EOjlD2.js → src-yzod66e_2.js} +1 -1
- package/dist/assets/{ui-EkC8CVbj.js → ui-CfMH0X_L.js} +1 -1
- package/dist/index.html +14 -14
- package/dist-vendor/web-sdk.js +9 -15
- package/package.json +1 -1
- package/dist/assets/ExtendReasonInfo-CEbvUMoP.js +0 -1
- package/dist/assets/SettingsPage-BimAjXix.js +0 -3
- package/dist/assets/Toolbar-CVjgIOri.js +0 -2
- package/dist/assets/auth-context-FZy55T86.js +0 -1
- package/dist/assets/countries-BSm8PNWW.js +0 -1
- package/dist/assets/dist-DCRaLcSL.js +0 -11
- package/dist/assets/dist-DKL_233B.js +0 -1
- package/dist/assets/dist-DdxaiEI9.js +0 -23
- package/dist/assets/dist-DkJnaE0X.js +0 -1
- package/dist/assets/dist-TJOGNsUr.js +0 -9
- package/dist/assets/dist-qu79xOH5.js +0 -1
- package/dist/assets/field-frame-GkHj6Ywy.js +0 -1
- package/dist/assets/index-DtDqdYhT.css +0 -2
- package/dist/assets/json-2IEVhd4i.js +0 -41
- package/dist/assets/shared-D0511v9d.js +0 -1
- package/dist/assets/src-BBTJclQ3.js +0 -1
- package/dist/assets/src-CB26t1uZ.js +0 -1
- package/dist/assets/src-CSLTj9M0.js +0 -4
- package/dist/assets/src-CrIOZO6Q.js +0 -1
- package/dist/assets/src-DlE7vhyV.js +0 -1
- package/dist/assets/src-EnowVU3i.js +0 -1
- package/dist/assets/src-R62BabNC.js +0 -1
- /package/dist/assets/{dist-CJsxDt1W2.js → dist-CJsxDt1W.js} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-n93t21jb.js";import{O as n,S as r,x as i}from"./button-Dlm2GmQs.js";import{t as a}from"./jsx-runtime-JUshM5qe.js";var o=e(t(),1);typeof window<`u`&&window.document&&window.document.createElement;function s(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}var c=a();function l(e,t=[]){let n=[];function r(t,r){let i=o.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let s=t=>{let{scope:n,children:r,...s}=t,l=n?.[e]?.[a]||i,u=o.useMemo(()=>s,Object.values(s));return(0,c.jsx)(l.Provider,{value:u,children:r})};s.displayName=t+`Provider`;function l(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[a]||i,d=o.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,l]}let i=()=>{let t=n.map(e=>o.createContext(e));return function(n){let r=n?.[e]||t;return o.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,u(i,...t)]}function u(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var d=e(n(),1),f=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=o.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,c.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function p(e,t){e&&d.flushSync(()=>e.dispatchEvent(t))}function m(e){let t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>((...e)=>t.current?.(...e)),[])}var h=`DismissableLayer`,g=`dismissableLayer.update`,_=`dismissableLayer.pointerDownOutside`,v=`dismissableLayer.focusOutside`,y,b=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),x=o.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,onDismiss:p,...h}=e,_=o.useContext(b),[v,x]=o.useState(null),S=v?.ownerDocument??globalThis?.document,[,C]=o.useState({}),w=r(t,x),T=Array.from(_.layers),[E]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),D=E?T.indexOf(E):-1,O=v?T.indexOf(v):-1,re=_.layersWithOutsidePointerEventsDisabled.size>0,k=O>=D,A=o.useRef(!1),j=ee(e=>{l?.(e),d?.(e),e.defaultPrevented||p?.()},{ownerDocument:S,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:A,dismissableSurfaces:_.dismissableSurfaces,shouldHandlePointerDownOutside:o.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[..._.branches].some(t=>t.contains(e));return k&&!t},[_.branches,k])}),M=te(e=>{if(i&&A.current)return;let t=e.target;[..._.branches].some(e=>e.contains(t))||(u?.(e),d?.(e),e.defaultPrevented||p?.())},S),N=v?O===T.length-1:!1,P=m(e=>{e.key===`Escape`&&(a?.(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))});return o.useEffect(()=>{if(N)return S.addEventListener(`keydown`,P,{capture:!0}),()=>S.removeEventListener(`keydown`,P,{capture:!0})},[S,N,P]),o.useEffect(()=>{if(v)return n&&(_.layersWithOutsidePointerEventsDisabled.size===0&&(y=S.body.style.pointerEvents,S.body.style.pointerEvents=`none`),_.layersWithOutsidePointerEventsDisabled.add(v)),_.layers.add(v),ne(),()=>{n&&(_.layersWithOutsidePointerEventsDisabled.delete(v),_.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=y))}},[v,S,n,_]),o.useEffect(()=>()=>{v&&(_.layers.delete(v),_.layersWithOutsidePointerEventsDisabled.delete(v),ne())},[v,_]),o.useEffect(()=>{let e=()=>C({});return document.addEventListener(g,e),()=>document.removeEventListener(g,e)},[]),(0,c.jsx)(f.div,{...h,ref:w,style:{pointerEvents:re?k?`auto`:`none`:void 0,...e.style},onFocusCapture:s(e.onFocusCapture,M.onFocusCapture),onBlurCapture:s(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:s(e.onPointerDownCapture,j.onPointerDownCapture)})});x.displayName=h;var S=`DismissableLayerBranch`,C=o.forwardRef((e,t)=>{let n=o.useContext(b),i=o.useRef(null),a=r(t,i);return o.useEffect(()=>{let e=i.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(f.div,{...e,ref:a})});C.displayName=S;function w(){let e=o.useContext(b),[t,n]=o.useState(null);return o.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var T=()=>!0;function ee(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=T}=t,c=m(e),l=o.useRef(!1),u=o.useRef(!1),d=o.useRef(new Map),f=o.useRef(()=>{});return o.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function o(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}let m=a=>{if(a.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||E(_,c,p,{discrete:!0})};if(!s(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,o,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,o,!0),n.removeEventListener(e,p)}},[n,c,r,i,a,s]),{onPointerDownCapture:()=>l.current=!0}}function te(e,t=globalThis?.document){let n=m(e),r=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!r.current&&E(v,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ne(){let e=new CustomEvent(g);document.dispatchEvent(e)}function E(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?p(i,a):i.dispatchEvent(a)}var D=0,O=null;function re(){o.useEffect(()=>{O||={start:k(),end:k()};let{start:e,end:t}=O;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),D++,()=>{D===1&&(O?.start.remove(),O?.end.remove(),O=null),D=Math.max(0,D-1)}},[])}function k(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var A=`focusScope.autoFocusOnMount`,j=`focusScope.autoFocusOnUnmount`,M={bubbles:!1,cancelable:!0},N=`FocusScope`,P=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[u,d]=o.useState(null),p=m(a),h=m(s),g=o.useRef(null),_=r(t,d),v=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(i){let e=function(e){if(v.paused||!u)return;let t=e.target;u.contains(t)?g.current=t:F(g.current,{select:!0})},t=function(e){if(v.paused||!u)return;let t=e.relatedTarget;t!==null&&(u.contains(t)||F(g.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&F(u)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,u,v.paused]),o.useEffect(()=>{if(u){ue.add(v);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(A,M);u.addEventListener(A,p),u.dispatchEvent(t),t.defaultPrevented||(ie(pe(oe(u)),{select:!0}),document.activeElement===e&&F(u))}return()=>{u.removeEventListener(A,p),setTimeout(()=>{let t=new CustomEvent(j,M);u.addEventListener(j,h),u.dispatchEvent(t),t.defaultPrevented||F(e??document.body,{select:!0}),u.removeEventListener(j,h),ue.remove(v)},0)}}},[u,p,h,v]);let y=o.useCallback(e=>{if(!n&&!i||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[i,a]=ae(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n&&F(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n&&F(a,{select:!0})):r===t&&e.preventDefault()}},[n,i,v.paused]);return(0,c.jsx)(f.div,{tabIndex:-1,...l,ref:_,onKeyDown:y})});P.displayName=N;function ie(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(F(r,{select:t}),document.activeElement!==n)return}function ae(e){let t=oe(e);return[se(t,e),se(t.reverse(),e)]}function oe(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function se(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ce(r,{upTo:t})))return r}function ce(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function le(e){return e instanceof HTMLInputElement&&`select`in e}function F(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&le(e)&&t&&e.select()}}var ue=de();function de(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=fe(e,t),e.unshift(t)},remove(t){e=fe(e,t),e[0]?.resume()}}}function fe(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pe(e){return e.filter(e=>e.tagName!==`A`)}var I=globalThis?.document?o.useLayoutEffect:()=>{},me=o.useId||(()=>void 0),he=0;function ge(e){let[t,n]=o.useState(me());return I(()=>{e||n(e=>e??String(he++))},[e]),e||(t?`radix-${t}`:``)}function _e(e){let[t,n]=o.useState(void 0);return I(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var ve=`Portal`,ye=o.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=o.useState(!1);I(()=>a(!0),[]);let s=n||i&&globalThis?.document?.body;return s?d.createPortal((0,c.jsx)(f.div,{...r,ref:t}),s):null});ye.displayName=ve;function be(e,t){return o.useReducer((e,n)=>t[e][n]??e,e)}var xe=e=>{let{present:t,children:n}=e,r=Se(t),i=typeof n==`function`?n({present:r.isPresent}):o.Children.only(n),a=we(r.ref,Te(i));return typeof n==`function`||r.isPresent?o.cloneElement(i,{ref:a}):null};xe.displayName=`Presence`;function Se(e){let[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef(`none`),s=o.useRef(void 0),[c,l]=be(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return o.useEffect(()=>{c===`mounted`?(a.current=s.current??L(r.current),s.current=void 0):a.current=`none`},[c]),I(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=L(t);e?(s.current=o,l(`MOUNT`)):o===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),I(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=L(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=L(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:o.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=L(t)}else r.current=null;n(e)},[])}}function Ce(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function we(...e){let t=o.useRef(e);return t.current=e,o.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ce(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ce(n[e],null)}}},[])}function L(e){return e?.animationName||`none`}function Te(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ee=o.useInsertionEffect||I;function De({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,s]=Oe({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:i;{let t=o.useRef(e!==void 0);o.useEffect(()=>{let e=t.current;e!==c&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${c?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=c},[c,r])}return[l,o.useCallback(t=>{if(c){let n=ke(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[c,e,a,s])]}function Oe({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return Ee(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ke(e){return typeof e==`function`}var Ae=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},R=new WeakMap,z=new WeakMap,B={},je=0,Me=function(e){return e&&(e.host||Me(e.parentNode))},Ne=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Me(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Pe=function(e,t,n,r){var i=Ne(t,Array.isArray(e)?e:[e]);B[n]||(B[n]=new WeakMap);var a=B[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(R.get(e)||0)+1,l=(a.get(e)||0)+1;R.set(e,c),a.set(e,l),o.push(e),c===1&&i&&z.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),je++,function(){o.forEach(function(e){var t=R.get(e)-1,i=a.get(e)-1;R.set(e,t),a.set(e,i),t||(z.has(e)||e.removeAttribute(r),z.delete(e)),i||e.removeAttribute(n)}),je--,je||(R=new WeakMap,R=new WeakMap,z=new WeakMap,B={})}},Fe=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ae(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Pe(r,i,n,`aria-hidden`)):function(){return null}},V=function(){return V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)};function Ie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Le(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var H=`right-scroll-bar-position`,U=`width-before-scroll-bar`,Re=`with-scroll-bars-hidden`,ze=`--removed-body-scroll-bar-size`;function W(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Be(e,t){var n=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Ve=typeof window<`u`?o.useLayoutEffect:o.useEffect,He=new WeakMap;function Ue(e,t){var n=Be(t||null,function(t){return e.forEach(function(e){return W(e,t)})});return Ve(function(){var t=He.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||W(e,null)}),i.forEach(function(e){r.has(e)||W(e,a)})}He.set(n,e)},[e]),n}function We(e){return e}function Ge(e,t){t===void 0&&(t=We);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ke(e){e===void 0&&(e={});var t=Ge(null);return t.options=V({async:!0,ssr:!1},e),t}var qe=function(e){var t=e.sideCar,n=Ie(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return o.createElement(r,V({},n))};qe.isSideCarExport=!0;function Je(e,t){return e.useMedium(t),qe}var Ye=Ke(),G=function(){},K=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:G,onWheelCapture:G,onTouchMoveCapture:G}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Ie(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Ue([n,t]),w=V(V({},x),i);return o.createElement(o.Fragment,null,d&&o.createElement(S,{sideCar:Ye,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?o.cloneElement(o.Children.only(c),V(V({},w),{ref:C})):o.createElement(y,V({},w,{className:l,ref:C}),c))});K.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},K.classNames={fullWidth:U,zeroRight:H};var Xe,Ze=function(){if(Xe)return Xe;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Qe(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ze();return t&&e.setAttribute(`nonce`,t),e}function $e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function et(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var tt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qe())&&($e(t,n),et(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nt=function(){var e=tt();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rt=function(){var e=nt();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},it={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||``,10)||0},at=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[q(n),q(r),q(i)]},ot=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return it;var t=at(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},st=rt(),J=`data-scroll-locked`,ct=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
+
.${Re} {
|
|
3
|
+
overflow: hidden ${r};
|
|
4
|
+
padding-right: ${s}px ${r};
|
|
5
|
+
}
|
|
6
|
+
body[${J}] {
|
|
7
|
+
overflow: hidden ${r};
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
+
padding-left: ${i}px;
|
|
11
|
+
padding-top: ${a}px;
|
|
12
|
+
padding-right: ${o}px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: ${s}px ${r};
|
|
16
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.${H} {
|
|
20
|
+
right: ${s}px ${r};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.${U} {
|
|
24
|
+
margin-right: ${s}px ${r};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${H} .${H} {
|
|
28
|
+
right: 0 ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${U} .${U} {
|
|
32
|
+
margin-right: 0 ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[${J}] {
|
|
36
|
+
${ze}: ${s}px;
|
|
37
|
+
}
|
|
38
|
+
`},lt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ut=function(){o.useEffect(function(){return document.body.setAttribute(J,(lt()+1).toString()),function(){var e=lt()-1;e<=0?document.body.removeAttribute(J):document.body.setAttribute(J,e.toString())}},[])},dt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ut();var a=o.useMemo(function(){return ot(i)},[i]);return o.createElement(st,{styles:ct(a,!t,i,n?``:`!important`)})},Y=!1;if(typeof window<`u`)try{var X=Object.defineProperty({},"passive",{get:function(){return Y=!0,!0}});window.addEventListener(`test`,X,X),window.removeEventListener(`test`,X,X)}catch{Y=!1}var Z=Y?{passive:!1}:!1,ft=function(e){return e.tagName===`TEXTAREA`},pt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ft(e)&&n[t]===`visible`)},mt=function(e){return pt(e,`overflowY`)},ht=function(e){return pt(e,`overflowX`)},gt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),yt(e,r)){var i=bt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_t=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},vt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},yt=function(e,t){return e===`v`?mt(t):ht(t)},bt=function(e,t){return e===`v`?_t(t):vt(t)},xt=function(e,t){return e===`h`&&t===`rtl`?-1:1},St=function(e,t,n,r,i){var a=xt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=bt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&yt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Q=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ct=function(e){return[e.deltaX,e.deltaY]},wt=function(e){return e&&`current`in e?e.current:e},Tt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Et=function(e){return`
|
|
39
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
+
`},Dt=0,$=[];function Ot(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Dt++)[0],a=o.useState(rt)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Le([e.lockRef.current],(e.shards||[]).map(wt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Q(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=gt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=gt(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return St(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(!(!$.length||$[$.length-1]!==a)){var r=`deltaY`in n?Ct(n):Q(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Tt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(wt).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:kt(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=Q(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,Ct(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,Q(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return $.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Z),document.addEventListener(`touchmove`,l,Z),document.addEventListener(`touchstart`,d,Z),function(){$=$.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,Z),document.removeEventListener(`touchmove`,l,Z),document.removeEventListener(`touchstart`,d,Z)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:Et(i)}):null,m?o.createElement(dt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var At=Je(Ye,Ot),jt=o.forwardRef(function(e,t){return o.createElement(K,V({},e,{ref:t,sideCar:At}))});jt.classNames=K.classNames;export{s as _,ye as a,I as c,x as d,w as f,l as g,p as h,xe as i,P as l,f as m,Fe as n,_e as o,m as p,De as r,ge as s,jt as t,re as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-n93t21jb.js";import{C as n,S as r,i,w as a,x as o}from"./button-Dlm2GmQs.js";import{t as s}from"./jsx-dev-runtime-CSfA-jUb.js";import{_ as c,a as l,d as u,g as d,i as f,l as ee,m as p,n as m,r as te,s as h,t as g,u as ne}from"./Combination-lRbXGCSx.js";import{t as _}from"./jsx-runtime-JUshM5qe.js";import{a as re,i as ie,n as v,o as y,r as ae}from"./json-DhhZ0035.js";import{T as b}from"./field-frame-ghjkvmJL.js";import{p as oe}from"./shelf-BK3PnmC8.js";var x=s(),S=e(t(),1),C=_(),w=`Popover`,[T,se]=d(w,[y]),E=y(),[ce,D]=T(w),O=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=E(t),c=S.useRef(null),[l,u]=S.useState(!1),[d,f]=te({prop:r,defaultProp:i??!1,onChange:a,caller:w});return(0,C.jsx)(re,{...s,children:(0,C.jsx)(ce,{scope:t,contentId:h(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:S.useCallback(()=>u(!0),[]),onCustomAnchorRemove:S.useCallback(()=>u(!1),[]),modal:o,children:n})})};O.displayName=w;var k=`PopoverAnchor`,A=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=D(k,n),a=E(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return S.useEffect(()=>(o(),()=>s()),[o,s]),(0,C.jsx)(v,{...a,...r,ref:t})});A.displayName=k;var j=`PopoverTrigger`,M=S.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=D(j,n),o=E(n),s=r(t,a.triggerRef),l=(0,C.jsx)(p.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":G(a.open),...i,ref:s,onClick:c(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:(0,C.jsx)(v,{asChild:!0,...o,children:l})});M.displayName=j;var N=`PopoverPortal`,[le,ue]=T(N,{forceMount:void 0}),P=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=D(N,t);return(0,C.jsx)(le,{scope:t,forceMount:n,children:(0,C.jsx)(f,{present:n||a.open,children:(0,C.jsx)(l,{asChild:!0,container:i,children:r})})})};P.displayName=N;var F=`PopoverContent`,I=S.forwardRef((e,t)=>{let n=ue(F,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=D(F,e.__scopePopover);return(0,C.jsx)(f,{present:r||a.open,children:a.modal?(0,C.jsx)(R,{...i,ref:t}):(0,C.jsx)(z,{...i,ref:t})})});I.displayName=F;var L=o(`PopoverContent.RemoveScroll`),R=S.forwardRef((e,t)=>{let n=D(F,e.__scopePopover),i=S.useRef(null),a=r(t,i),o=S.useRef(!1);return S.useEffect(()=>{let e=i.current;if(e)return m(e)},[]),(0,C.jsx)(g,{as:L,allowPinchZoom:!0,children:(0,C.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:c(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),z=S.forwardRef((e,t)=>{let n=D(F,e.__scopePopover),r=S.useRef(!1),i=S.useRef(!1);return(0,C.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=S.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:d,...f}=e,p=D(F,n),m=E(n);return ne(),(0,C.jsx)(ee,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,C.jsx)(u,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,C.jsx)(ie,{"data-state":G(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),V=`PopoverClose`,H=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=D(V,n);return(0,C.jsx)(p.button,{type:`button`,...r,ref:t,onClick:c(e.onClick,()=>i.onOpenChange(!1))})});H.displayName=V;var U=`PopoverArrow`,W=S.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=E(n);return(0,C.jsx)(ae,{...i,...r,ref:t})});W.displayName=U;function G(e){return e?`open`:`closed`}var de=O,fe=A,pe=M,K=P,me=I,q=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/components/ui/popover.tsx`;function J({...e}){return(0,x.jsxDEV)(de,{"data-slot":`popover`,...e},void 0,!1,{fileName:q,lineNumber:7,columnNumber:10},this)}function Y({...e}){return(0,x.jsxDEV)(pe,{"data-slot":`popover-trigger`,...e},void 0,!1,{fileName:q,lineNumber:11,columnNumber:10},this)}function X({className:e,align:t=`center`,sideOffset:r=4,...i}){return(0,x.jsxDEV)(K,{children:(0,x.jsxDEV)(me,{"data-slot":`popover-content`,align:t,sideOffset:r,className:n(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-xl outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...i},void 0,!1,{fileName:q,lineNumber:22,columnNumber:7},this)},void 0,!1,{fileName:q,lineNumber:21,columnNumber:5},this)}function he({...e}){return(0,x.jsxDEV)(fe,{"data-slot":`popover-anchor`,...e},void 0,!1,{fileName:q,lineNumber:37,columnNumber:10},this)}function ge(e){if(e==null||e===``)return[];if(Array.isArray(e))return e.map(String).filter(Boolean);if(typeof e==`string`){if(e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t.map(String).filter(Boolean)}catch{}return e?[e]:[]}return[String(e)]}function _e(e){return e.kind===`tags`||e.hints?.multiple===!0}var Z=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/render/dispatch.tsx`;function ve(e){let t=b(e.field);return t?(0,x.jsxDEV)(t.Page,{...e},void 0,!1,{fileName:Z,lineNumber:15,columnNumber:10},this):(console.warn(`[render] немає рендера для`,e.field.kind),(0,x.jsxDEV)(`span`,{children:String(e.value)},void 0,!1,{fileName:Z,lineNumber:13,columnNumber:12},this))}function ye({field:e,value:t,height:n}){let r=b(e),i=r?.Inline?(0,x.jsxDEV)(r.Inline,{field:e,value:t,height:n},void 0,!1,{fileName:Z,lineNumber:26,columnNumber:5},this):(0,x.jsxDEV)(`span`,{className:`truncate`,children:String(t??``)},void 0,!1,{fileName:Z,lineNumber:28,columnNumber:5},this);return n?(0,x.jsxDEV)(`span`,{className:`inline-flex min-w-0 items-center font-medium`,style:{fontSize:Math.round(n*.7),lineHeight:1.15},children:i},void 0,!1,{fileName:Z,lineNumber:32,columnNumber:5},this):i}function be(e,t,n){let r=b(e),i=t=>r?.keys?r.keys(t,e,n):t==null||t===``?[]:[{value:String(t),rawValue:t,label:String(t)}],a=_e(e)?ge(t):[t],o=new Set,s=[];for(let e of a)for(let t of i(e))o.has(t.value)||(o.add(t.value),s.push(t));return s}var xe=20,Q=new Map;function Se(e){let t=Q.get(e);if(t)return Q.delete(e),Q.set(e,t),t}function Ce(e,t){for(Q.delete(e),Q.set(e,{rows:t,ts:Date.now()});Q.size>xe;){let e=Q.keys().next();if(e.done)break;Q.delete(e.value)}}function we(e){for(let t of[...Q.keys()])(t===e||t.startsWith(`${e}?`))&&Q.delete(t)}function Te(e,t){let n=String(t.id??``);if(n)for(let[r,i]of Q){if(r!==e&&!r.startsWith(`${e}?`))continue;let a=!1,o=i.rows.map(e=>{if(String(e.id)!==n)return e;a=!0;let r={...e};for(let n of Object.keys(e))n in t&&(r[n]=t[n]);return r});a&&Q.set(r,{rows:o,ts:i.ts})}}var $=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/components/ExtendReasonInfo.tsx`;function Ee({ext:e,fieldLabel:t,valueLabel:n}){let{t:r}=a(),o=oe(e.showWhen,t,n);return o.length===0?null:(0,x.jsxDEV)(J,{children:[(0,x.jsxDEV)(Y,{type:`button`,"aria-label":r(`extend.shownWhen`),className:`inline-flex items-center text-muted hover:text-text`,children:(0,x.jsxDEV)(i,{name:`lucide:info`,size:14},void 0,!1,{fileName:$,lineNumber:30,columnNumber:9},this)},void 0,!1,{fileName:$,lineNumber:25,columnNumber:7},this),(0,x.jsxDEV)(X,{align:`start`,className:`w-auto max-w-xs text-sm`,children:[(0,x.jsxDEV)(`p`,{className:`text-muted mb-1`,children:r(`extend.shownWhen`)},void 0,!1,{fileName:$,lineNumber:33,columnNumber:9},this),(0,x.jsxDEV)(`p`,{children:o.join(`; `)},void 0,!1,{fileName:$,lineNumber:34,columnNumber:9},this)]},void 0,!0,{fileName:$,lineNumber:32,columnNumber:7},this)]},void 0,!0,{fileName:$,lineNumber:24,columnNumber:5},this)}export{Ce as a,be as c,X as d,Y as f,Se as i,J as l,we as n,ye as o,Te as r,ve as s,Ee as t,he as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-n93t21jb.js";import{n,t as r}from"./clsx-enQ3xCtU.js";import{t as i}from"./jsx-dev-runtime-CSfA-jUb.js";import{c as a,i as o,n as s,r as c,s as l}from"./floating-ui.dom-BiC1_AXf.js";import{t as u}from"./purify.es-sLXpNpJ5.js";import{n as d,t as f}from"./development-ChLInqDF.js";import{_ as p,a as m,d as h,f as g,i as _,l as v,m as y,o as b,r as ee,s as x,t as te,u as ne,v as re,y as S}from"./micromark-extension-gfm-Cu0AwUgc.js";import{$ as ie,A as ae,B as oe,Ct as se,Dt as ce,E as le,Et as ue,F as de,H as fe,I as pe,J as me,K as he,L as ge,Mt as _e,O as ve,Ot as ye,P as C,R as be,S as xe,St as Se,T as Ce,Tt as we,U as Te,V as Ee,W as De,X as Oe,Y as ke,Z as Ae,a as w,at as je,bt as Me,c as Ne,ct as Pe,dt as Fe,et as Ie,f as Le,ft as Re,g as ze,gt as Be,it as Ve,j as He,kt as Ue,l as We,lt as Ge,mt as Ke,n as qe,nt as Je,o as Ye,ot as Xe,pt as Ze,q as Qe,st as $e,t as et,tt,ut as nt,v as rt,vt as it,w as at,wt as ot,x as st,xt as ct,z as lt}from"./dist-BKBBNg6L.js";import{i as ut,n as dt,o as ft,r as pt}from"./dist-CJsxDt1W2.js";import{a as mt,i as ht,n as gt,o as _t,r as vt,s as yt,t as bt,u as xt}from"./lib-Co4B8qAy.js";var St=typeof global==`object`&&global&&global.Object===Object&&global,Ct=typeof self==`object`&&self&&self.Object===Object&&self,wt=St||Ct||Function(`return this`)(),Tt=wt.Symbol,Et=Object.prototype,Dt=Et.hasOwnProperty,Ot=Et.toString,kt=Tt?Tt.toStringTag:void 0;function At(e){var t=Dt.call(e,kt),n=e[kt];try{e[kt]=void 0;var r=!0}catch{}var i=Ot.call(e);return r&&(t?e[kt]=n:delete e[kt]),i}var jt=Object.prototype.toString;function Mt(e){return jt.call(e)}var Nt=`[object Null]`,Pt=`[object Undefined]`,Ft=Tt?Tt.toStringTag:void 0;function It(e){return e==null?e===void 0?Pt:Nt:Ft&&Ft in Object(e)?At(e):Mt(e)}function Lt(e){return typeof e==`object`&&!!e}var Rt=`[object Symbol]`;function zt(e){return typeof e==`symbol`||Lt(e)&&It(e)==Rt}var Bt=Array.isArray,Vt=/\s/;function Ht(e){for(var t=e.length;t--&&Vt.test(e.charAt(t)););return t}var Ut=/^\s+/;function Wt(e){return e&&e.slice(0,Ht(e)+1).replace(Ut,``)}function Gt(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var Kt=NaN,qt=/^[-+]0x[0-9a-f]+$/i,Jt=/^0b[01]+$/i,Yt=/^0o[0-7]+$/i,Xt=parseInt;function Zt(e){if(typeof e==`number`)return e;if(zt(e))return Kt;if(Gt(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=Gt(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Wt(e);var n=Jt.test(e);return n||Yt.test(e)?Xt(e.slice(2),n?2:8):qt.test(e)?Kt:+e}function Qt(e){return e}var $t=`[object AsyncFunction]`,en=`[object Function]`,tn=`[object GeneratorFunction]`,nn=`[object Proxy]`;function rn(e){if(!Gt(e))return!1;var t=It(e);return t==en||t==tn||t==$t||t==nn}var an=wt[`__core-js_shared__`],on=function(){var e=/[^.]+$/.exec(an&&an.keys&&an.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function sn(e){return!!on&&on in e}var cn=Function.prototype.toString;function ln(e){if(e!=null){try{return cn.call(e)}catch{}try{return e+``}catch{}}return``}var un=/[\\^$.*+?()[\]{}|]/g,dn=/^\[object .+?Constructor\]$/,fn=Function.prototype,pn=Object.prototype,mn=fn.toString,hn=pn.hasOwnProperty,gn=RegExp(`^`+mn.call(hn).replace(un,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function _n(e){return!Gt(e)||sn(e)?!1:(rn(e)?gn:dn).test(ln(e))}function vn(e,t){return e?.[t]}function yn(e,t){var n=vn(e,t);return _n(n)?n:void 0}var bn=Object.create,xn=function(){function e(){}return function(t){if(!Gt(t))return{};if(bn)return bn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Sn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Cn(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var wn=800,Tn=16,En=Date.now;function Dn(e){var t=0,n=0;return function(){var r=En(),i=Tn-(r-n);if(n=r,i>0){if(++t>=wn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function On(e){return function(){return e}}var kn=function(){try{var e=yn(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),An=Dn(kn?function(e,t){return kn(e,`toString`,{configurable:!0,enumerable:!1,value:On(t),writable:!0})}:Qt),jn=9007199254740991,Mn=/^(?:0|[1-9]\d*)$/;function Nn(e,t){var n=typeof e;return t??=jn,!!t&&(n==`number`||n!=`symbol`&&Mn.test(e))&&e>-1&&e%1==0&&e<t}function Pn(e,t,n){t==`__proto__`&&kn?kn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Fn(e,t){return e===t||e!==e&&t!==t}var In=Object.prototype.hasOwnProperty;function Ln(e,t,n){var r=e[t];(!(In.call(e,t)&&Fn(r,n))||n===void 0&&!(t in e))&&Pn(e,t,n)}function Rn(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Pn(n,s,c):Ln(n,s,c)}return n}var zn=Math.max;function Bn(e,t,n){return t=zn(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=zn(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Sn(e,this,s)}}function Vn(e,t){return An(Bn(e,t,Qt),e+``)}var Hn=9007199254740991;function Un(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Hn}function Wn(e){return e!=null&&Un(e.length)&&!rn(e)}function Gn(e,t,n){if(!Gt(n))return!1;var r=typeof t;return(r==`number`?Wn(n)&&Nn(t,n.length):r==`string`&&t in n)?Fn(n[t],e):!1}function Kn(e){return Vn(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Gn(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var qn=Object.prototype;function Jn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||qn)}function Yn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Xn=`[object Arguments]`;function Zn(e){return Lt(e)&&It(e)==Xn}var Qn=Object.prototype,$n=Qn.hasOwnProperty,er=Qn.propertyIsEnumerable,tr=Zn(function(){return arguments}())?Zn:function(e){return Lt(e)&&$n.call(e,`callee`)&&!er.call(e,`callee`)};function nr(){return!1}var rr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ir=rr&&typeof module==`object`&&module&&!module.nodeType&&module,ar=ir&&ir.exports===rr?wt.Buffer:void 0,or=(ar?ar.isBuffer:void 0)||nr,sr=`[object Arguments]`,cr=`[object Array]`,lr=`[object Boolean]`,ur=`[object Date]`,dr=`[object Error]`,fr=`[object Function]`,pr=`[object Map]`,mr=`[object Number]`,hr=`[object Object]`,gr=`[object RegExp]`,_r=`[object Set]`,vr=`[object String]`,yr=`[object WeakMap]`,br=`[object ArrayBuffer]`,xr=`[object DataView]`,Sr=`[object Float32Array]`,Cr=`[object Float64Array]`,wr=`[object Int8Array]`,Tr=`[object Int16Array]`,Er=`[object Int32Array]`,Dr=`[object Uint8Array]`,Or=`[object Uint8ClampedArray]`,kr=`[object Uint16Array]`,Ar=`[object Uint32Array]`,jr={};jr[Sr]=jr[Cr]=jr[wr]=jr[Tr]=jr[Er]=jr[Dr]=jr[Or]=jr[kr]=jr[Ar]=!0,jr[sr]=jr[cr]=jr[br]=jr[lr]=jr[xr]=jr[ur]=jr[dr]=jr[fr]=jr[pr]=jr[mr]=jr[hr]=jr[gr]=jr[_r]=jr[vr]=jr[yr]=!1;function Mr(e){return Lt(e)&&Un(e.length)&&!!jr[It(e)]}function Nr(e){return function(t){return e(t)}}var Pr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Fr=Pr&&typeof module==`object`&&module&&!module.nodeType&&module,Ir=Fr&&Fr.exports===Pr&&St.process,Lr=function(){try{return Fr&&Fr.require&&Fr.require(`util`).types||Ir&&Ir.binding&&Ir.binding(`util`)}catch{}}(),Rr=Lr&&Lr.isTypedArray,zr=Rr?Nr(Rr):Mr,Br=Object.prototype.hasOwnProperty;function Vr(e,t){var n=Bt(e),r=!n&&tr(e),i=!n&&!r&&or(e),a=!n&&!r&&!i&&zr(e),o=n||r||i||a,s=o?Yn(e.length,String):[],c=s.length;for(var l in e)(t||Br.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Nn(l,c)))&&s.push(l);return s}function Hr(e,t){return function(n){return e(t(n))}}function Ur(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Wr=Object.prototype.hasOwnProperty;function Gr(e){if(!Gt(e))return Ur(e);var t=Jn(e),n=[];for(var r in e)r==`constructor`&&(t||!Wr.call(e,r))||n.push(r);return n}function Kr(e){return Wn(e)?Vr(e,!0):Gr(e)}var qr=yn(Object,`create`);function Jr(){this.__data__=qr?qr(null):{},this.size=0}function Yr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Xr=`__lodash_hash_undefined__`,Zr=Object.prototype.hasOwnProperty;function Qr(e){var t=this.__data__;if(qr){var n=t[e];return n===Xr?void 0:n}return Zr.call(t,e)?t[e]:void 0}var $r=Object.prototype.hasOwnProperty;function ei(e){var t=this.__data__;return qr?t[e]!==void 0:$r.call(t,e)}var ti=`__lodash_hash_undefined__`;function ni(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=qr&&t===void 0?ti:t,this}function ri(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ri.prototype.clear=Jr,ri.prototype.delete=Yr,ri.prototype.get=Qr,ri.prototype.has=ei,ri.prototype.set=ni;function ii(){this.__data__=[],this.size=0}function ai(e,t){for(var n=e.length;n--;)if(Fn(e[n][0],t))return n;return-1}var oi=Array.prototype.splice;function si(e){var t=this.__data__,n=ai(t,e);return n<0?!1:(n==t.length-1?t.pop():oi.call(t,n,1),--this.size,!0)}function ci(e){var t=this.__data__,n=ai(t,e);return n<0?void 0:t[n][1]}function li(e){return ai(this.__data__,e)>-1}function ui(e,t){var n=this.__data__,r=ai(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function di(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}di.prototype.clear=ii,di.prototype.delete=si,di.prototype.get=ci,di.prototype.has=li,di.prototype.set=ui;var fi=yn(wt,`Map`);function pi(){this.size=0,this.__data__={hash:new ri,map:new(fi||di),string:new ri}}function mi(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function hi(e,t){var n=e.__data__;return mi(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function gi(e){var t=hi(this,e).delete(e);return this.size-=+!!t,t}function _i(e){return hi(this,e).get(e)}function vi(e){return hi(this,e).has(e)}function yi(e,t){var n=hi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bi.prototype.clear=pi,bi.prototype.delete=gi,bi.prototype.get=_i,bi.prototype.has=vi,bi.prototype.set=yi;var xi=Hr(Object.getPrototypeOf,Object),Si=`[object Object]`,Ci=Function.prototype,wi=Object.prototype,Ti=Ci.toString,Ei=wi.hasOwnProperty,Di=Ti.call(Object);function Oi(e){if(!Lt(e)||It(e)!=Si)return!1;var t=xi(e);if(t===null)return!0;var n=Ei.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ti.call(n)==Di}function ki(){this.__data__=new di,this.size=0}function Ai(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ji(e){return this.__data__.get(e)}function Mi(e){return this.__data__.has(e)}var Ni=200;function Pi(e,t){var n=this.__data__;if(n instanceof di){var r=n.__data__;if(!fi||r.length<Ni-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bi(r)}return n.set(e,t),this.size=n.size,this}function Fi(e){var t=this.__data__=new di(e);this.size=t.size}Fi.prototype.clear=ki,Fi.prototype.delete=Ai,Fi.prototype.get=ji,Fi.prototype.has=Mi,Fi.prototype.set=Pi;var Ii=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Li=Ii&&typeof module==`object`&&module&&!module.nodeType&&module,Ri=Li&&Li.exports===Ii?wt.Buffer:void 0,zi=Ri?Ri.allocUnsafe:void 0;function Bi(e,t){if(t)return e.slice();var n=e.length,r=zi?zi(n):new e.constructor(n);return e.copy(r),r}var Vi=wt.Uint8Array;function Hi(e){var t=new e.constructor(e.byteLength);return new Vi(t).set(new Vi(e)),t}function Ui(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Wi(e){return typeof e.constructor==`function`&&!Jn(e)?xn(xi(e)):{}}function Gi(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Ki=Gi(),qi=function(){return wt.Date.now()},Ji=`Expected a function`,Yi=Math.max,Xi=Math.min;function Zi(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Ji);t=Zt(t)||0,Gt(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Yi(Zt(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Xi(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=qi();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(qi())}function ee(){var e=qi(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return ee.cancel=y,ee.flush=b,ee}function Qi(e,t,n){(n!==void 0&&!Fn(e[t],n)||n===void 0&&!(t in e))&&Pn(e,t,n)}function $i(e){return Lt(e)&&Wn(e)}function ea(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function ta(e){return Rn(e,Kr(e))}function na(e,t,n,r,i,a,o){var s=ea(e,n),c=ea(t,n),l=o.get(c);if(l){Qi(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=Bt(c),p=!f&&or(c),m=!f&&!p&&zr(c);u=c,f||p||m?Bt(s)?u=s:$i(s)?u=Cn(s):p?(d=!1,u=Bi(c,!0)):m?(d=!1,u=Ui(c,!0)):u=[]:Oi(c)||tr(c)?(u=s,tr(s)?u=ta(s):(!Gt(s)||rn(s))&&(u=Wi(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Qi(e,n,u)}function ra(e,t,n,r,i){e!==t&&Ki(t,function(a,o){if(i||=new Fi,Gt(a))na(e,t,o,n,ra,r,i);else{var s=r?r(ea(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Qi(e,o,s)}},Kr)}function ia(e,t,n,r,i,a){return Gt(e)&&Gt(t)&&(a.set(t,e),ra(e,t,void 0,ia,a),a.delete(t)),e}var aa=Kn(function(e,t,n,r){ra(e,t,n,r)}),oa=Vn(function(e){return e.push(void 0,ia),Sn(aa,void 0,e)}),sa=`Expected a function`;function ca(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(sa);return Gt(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Zi(e,t,{leading:r,maxWait:t,trailing:i})}var la=e(t(),1);function T(e){return new Ye(Ne.define(e))}function ua(e){return n(()=>import(`./dist-DnLPZbvG.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]))}var da=[w.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return n(()=>import(`./dist-bjTa-oQ7.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,2]))}}),w.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return n(()=>import(`./dist-bjTa-oQ7.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,2]))}}),w.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return ua(`Cassandra`)}}),w.of({name:`CSS`,extensions:[`css`],load(){return n(()=>import(`./dist-BnXQsAyw.js`).then(e=>e.css()),__vite__mapDeps([5,6,1,2]))}}),w.of({name:`Go`,extensions:[`go`],load(){return n(()=>import(`./dist-DCRaLcSL.js`).then(e=>e.go()),__vite__mapDeps([7,1,2,3]))}}),w.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return n(()=>import(`./dist-DKL_233B.js`).then(e=>e.html()),__vite__mapDeps([8,9,1,2,6,10,3]))}}),w.of({name:`Java`,extensions:[`java`],load(){return n(()=>import(`./dist-6HUZUxgD.js`).then(e=>e.java()),__vite__mapDeps([11,1,2]))}}),w.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return n(()=>import(`./dist-qu79xOH5.js`).then(e=>e.javascript()),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return n(()=>import(`./dist-D0lzj0II.js`).then(e=>e.jinja()),__vite__mapDeps([13,1,2,9,6,10,3]))}}),w.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return n(()=>import(`./dist-3a5PKdzH.js`).then(e=>e.json()),__vite__mapDeps([14,1,2]))}}),w.of({name:`JSX`,extensions:[`jsx`],load(){return n(()=>import(`./dist-qu79xOH5.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`LESS`,extensions:[`less`],load(){return n(()=>import(`./dist-CUwIxyXc2.js`).then(e=>e.less()),__vite__mapDeps([15,1,2,6]))}}),w.of({name:`Liquid`,extensions:[`liquid`],load(){return n(()=>import(`./dist-BRl6D2sz.js`).then(e=>e.liquid()),__vite__mapDeps([16,1,2,9,6,10,3]))}}),w.of({name:`MariaDB SQL`,load(){return ua(`MariaSQL`)}}),w.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return n(()=>import(`./dist-0L0REEL4.js`).then(e=>e.markdown()),__vite__mapDeps([17,1,9,2,6,10,3]))}}),w.of({name:`MS SQL`,load(){return ua(`MSSQL`)}}),w.of({name:`MySQL`,load(){return ua(`MySQL`)}}),w.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return n(()=>import(`./dist-C9iafu0r.js`).then(e=>e.php()),__vite__mapDeps([18,1,2,9,6,10,3]))}}),w.of({name:`PLSQL`,extensions:[`pls`],load(){return ua(`PLSQL`)}}),w.of({name:`PostgreSQL`,load(){return ua(`PostgreSQL`)}}),w.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return n(()=>import(`./dist-TJOGNsUr.js`).then(e=>e.python()),__vite__mapDeps([19,1,2,3]))}}),w.of({name:`Rust`,extensions:[`rs`],load(){return n(()=>import(`./dist-ySmyIRea.js`).then(e=>e.rust()),__vite__mapDeps([20,1,2]))}}),w.of({name:`Sass`,extensions:[`sass`],load(){return n(()=>import(`./dist-MrrIHPUp.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([21,1,2,6]))}}),w.of({name:`SCSS`,extensions:[`scss`],load(){return n(()=>import(`./dist-MrrIHPUp.js`).then(e=>e.sass()),__vite__mapDeps([21,1,2,6]))}}),w.of({name:`SQL`,extensions:[`sql`],load(){return ua(`StandardSQL`)}}),w.of({name:`SQLite`,load(){return ua(`SQLite`)}}),w.of({name:`TSX`,extensions:[`tsx`],load(){return n(()=>import(`./dist-qu79xOH5.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return n(()=>import(`./dist-qu79xOH5.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return n(()=>import(`./dist-CFDxfp5Q.js`).then(e=>e.wast()),__vite__mapDeps([22,1,2]))}}),w.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return n(()=>import(`./dist-B2pI4xAT.js`).then(e=>e.xml()),__vite__mapDeps([23,1,2]))}}),w.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return n(()=>import(`./dist-BVqKJBMt2.js`).then(e=>e.yaml()),__vite__mapDeps([24,1,2]))}}),w.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return n(()=>import(`./apl-gfMMiTNf.js`).then(e=>T(e.apl)),[])}}),w.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return n(()=>import(`./asciiarmor-qTkVPQu6.js`).then(e=>T(e.asciiArmor)),[])}}),w.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return n(()=>import(`./asn1-Dr8qZg38.js`).then(e=>T(e.asn1({}))),[])}}),w.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return n(()=>import(`./asterisk-Bja0s6e1.js`).then(e=>T(e.asterisk)),[])}}),w.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return n(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>T(e.brainfuck)),[])}}),w.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return n(()=>import(`./cobol-DHLQUbN7.js`).then(e=>T(e.cobol)),[])}}),w.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.csharp)),[])}}),w.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return n(()=>import(`./clojure-BflJGmDX.js`).then(e=>T(e.clojure)),[])}}),w.of({name:`ClojureScript`,extensions:[`cljs`],load(){return n(()=>import(`./clojure-BflJGmDX.js`).then(e=>T(e.clojure)),[])}}),w.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return n(()=>import(`./css-CYpP4FRV.js`).then(e=>T(e.gss)),[])}}),w.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return n(()=>import(`./cmake-CyVbuzPu.js`).then(e=>T(e.cmake)),[])}}),w.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return n(()=>import(`./coffeescript-B2pKbFk8.js`).then(e=>T(e.coffeeScript)),[])}}),w.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return n(()=>import(`./commonlisp-CcllspGY.js`).then(e=>T(e.commonLisp)),[])}}),w.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return n(()=>import(`./cypher-p9eYesGn.js`).then(e=>T(e.cypher)),[])}}),w.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return n(()=>import(`./python-2zlmcyof.js`).then(e=>T(e.cython)),[])}}),w.of({name:`Crystal`,extensions:[`cr`],load(){return n(()=>import(`./crystal-M5-qzICs.js`).then(e=>T(e.crystal)),[])}}),w.of({name:`D`,extensions:[`d`],load(){return n(()=>import(`./d-BhMjBjQP.js`).then(e=>T(e.d)),[])}}),w.of({name:`Dart`,extensions:[`dart`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.dart)),[])}}),w.of({name:`diff`,extensions:[`diff`,`patch`],load(){return n(()=>import(`./diff-ChtP43wD.js`).then(e=>T(e.diff)),[])}}),w.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return n(()=>import(`./dockerfile-BLkNEvjs.js`).then(e=>T(e.dockerFile)),__vite__mapDeps([25,26]))}}),w.of({name:`DTD`,extensions:[`dtd`],load(){return n(()=>import(`./dtd-DTF72YNO.js`).then(e=>T(e.dtd)),[])}}),w.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return n(()=>import(`./dylan-C6jEEEk-.js`).then(e=>T(e.dylan)),[])}}),w.of({name:`EBNF`,load(){return n(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>T(e.ebnf)),[])}}),w.of({name:`ECL`,extensions:[`ecl`],load(){return n(()=>import(`./ecl-BSZaIHnp.js`).then(e=>T(e.ecl)),[])}}),w.of({name:`edn`,extensions:[`edn`],load(){return n(()=>import(`./clojure-BflJGmDX.js`).then(e=>T(e.clojure)),[])}}),w.of({name:`Eiffel`,extensions:[`e`],load(){return n(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>T(e.eiffel)),[])}}),w.of({name:`Elm`,extensions:[`elm`],load(){return n(()=>import(`./elm-Cshzl8qu.js`).then(e=>T(e.elm)),[])}}),w.of({name:`Erlang`,extensions:[`erl`],load(){return n(()=>import(`./erlang-DaB2Rkuy.js`).then(e=>T(e.erlang)),[])}}),w.of({name:`Esper`,load(){return n(()=>import(`./sql-DcCJ9jop.js`).then(e=>T(e.esper)),[])}}),w.of({name:`Factor`,extensions:[`factor`],load(){return n(()=>import(`./factor-D7LVTn2l.js`).then(e=>T(e.factor)),__vite__mapDeps([27,26]))}}),w.of({name:`FCL`,load(){return n(()=>import(`./fcl-ClOhbFR7.js`).then(e=>T(e.fcl)),[])}}),w.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return n(()=>import(`./forth-Cezjo90N.js`).then(e=>T(e.forth)),[])}}),w.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return n(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>T(e.fortran)),[])}}),w.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return n(()=>import(`./mllike-B45xgp2S.js`).then(e=>T(e.fSharp)),[])}}),w.of({name:`Gas`,extensions:[`s`],load(){return n(()=>import(`./gas-BHEdbvp9.js`).then(e=>T(e.gas)),[])}}),w.of({name:`Gherkin`,extensions:[`feature`],load(){return n(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>T(e.gherkin)),[])}}),w.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return n(()=>import(`./groovy-BC3IOsC8.js`).then(e=>T(e.groovy)),[])}}),w.of({name:`Haskell`,extensions:[`hs`],load(){return n(()=>import(`./haskell-BRsoo5mP.js`).then(e=>T(e.haskell)),[])}}),w.of({name:`Haxe`,extensions:[`hx`],load(){return n(()=>import(`./haxe-DjVOVvNP.js`).then(e=>T(e.haxe)),[])}}),w.of({name:`HXML`,extensions:[`hxml`],load(){return n(()=>import(`./haxe-DjVOVvNP.js`).then(e=>T(e.hxml)),[])}}),w.of({name:`HTTP`,load(){return n(()=>import(`./http-CLVgA2GD.js`).then(e=>T(e.http)),[])}}),w.of({name:`IDL`,extensions:[`pro`],load(){return n(()=>import(`./idl-BUZw3wgd.js`).then(e=>T(e.idl)),[])}}),w.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return n(()=>import(`./javascript-BRzqD9BA.js`).then(e=>T(e.jsonld)),__vite__mapDeps([28,29]))}}),w.of({name:`Julia`,extensions:[`jl`],load(){return n(()=>import(`./julia-CQfgDRfP.js`).then(e=>T(e.julia)),[])}}),w.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.kotlin)),[])}}),w.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return n(()=>import(`./livescript-BXxG0Yva.js`).then(e=>T(e.liveScript)),[])}}),w.of({name:`Lua`,extensions:[`lua`],load(){return n(()=>import(`./lua-CiA1ziua.js`).then(e=>T(e.lua)),[])}}),w.of({name:`mIRC`,extensions:[`mrc`],load(){return n(()=>import(`./mirc-C9zpzAZU.js`).then(e=>T(e.mirc)),[])}}),w.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return n(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>T(e.mathematica)),[])}}),w.of({name:`Modelica`,extensions:[`mo`],load(){return n(()=>import(`./modelica-CqHI_q-D.js`).then(e=>T(e.modelica)),[])}}),w.of({name:`MUMPS`,extensions:[`mps`],load(){return n(()=>import(`./mumps-CW_TBmxz.js`).then(e=>T(e.mumps)),[])}}),w.of({name:`Mbox`,extensions:[`mbox`],load(){return n(()=>import(`./mbox-BEMVcqjs.js`).then(e=>T(e.mbox)),[])}}),w.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return n(()=>import(`./nginx-BMaDbqW3.js`).then(e=>T(e.nginx)),[])}}),w.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return n(()=>import(`./nsis-AQ_alPln.js`).then(e=>T(e.nsis)),__vite__mapDeps([30,26]))}}),w.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return n(()=>import(`./ntriples-d28e9m0E.js`).then(e=>T(e.ntriples)),[])}}),w.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.objectiveC)),[])}}),w.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.objectiveCpp)),[])}}),w.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return n(()=>import(`./mllike-B45xgp2S.js`).then(e=>T(e.oCaml)),[])}}),w.of({name:`Octave`,extensions:[`m`],load(){return n(()=>import(`./octave-D2Q8cUp1.js`).then(e=>T(e.octave)),[])}}),w.of({name:`Oz`,extensions:[`oz`],load(){return n(()=>import(`./oz-BwTct_5T.js`).then(e=>T(e.oz)),[])}}),w.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return n(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>T(e.pascal)),[])}}),w.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return n(()=>import(`./perl-CdEHsPfU.js`).then(e=>T(e.perl)),[])}}),w.of({name:`Pig`,extensions:[`pig`],load(){return n(()=>import(`./pig-AF4Hwhju.js`).then(e=>T(e.pig)),[])}}),w.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return n(()=>import(`./powershell-CzG71I4L.js`).then(e=>T(e.powerShell)),[])}}),w.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return n(()=>import(`./properties-C357ku5U.js`).then(e=>T(e.properties)),[])}}),w.of({name:`ProtoBuf`,extensions:[`proto`],load(){return n(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>T(e.protobuf)),[])}}),w.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return n(()=>import(`./pug-Ck0YjsGM.js`).then(e=>T(e.pug)),__vite__mapDeps([31,29]))}}),w.of({name:`Puppet`,extensions:[`pp`],load(){return n(()=>import(`./puppet-B4hC2X4m.js`).then(e=>T(e.puppet)),[])}}),w.of({name:`Q`,extensions:[`q`],load(){return n(()=>import(`./q-B9NhS7L_.js`).then(e=>T(e.q)),[])}}),w.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return n(()=>import(`./r-DADKenSm.js`).then(e=>T(e.r)),[])}}),w.of({name:`RPM Changes`,load(){return n(()=>import(`./rpm-gpDK5sbt.js`).then(e=>T(e.rpmChanges)),[])}}),w.of({name:`RPM Spec`,extensions:[`spec`],load(){return n(()=>import(`./rpm-gpDK5sbt.js`).then(e=>T(e.rpmSpec)),[])}}),w.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return n(()=>import(`./ruby-DsYpTuWg.js`).then(e=>T(e.ruby)),[])}}),w.of({name:`SAS`,extensions:[`sas`],load(){return n(()=>import(`./sas-C2OyD2Y6.js`).then(e=>T(e.sas)),[])}}),w.of({name:`Scala`,extensions:[`scala`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.scala)),[])}}),w.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return n(()=>import(`./scheme-tChLYBuY.js`).then(e=>T(e.scheme)),[])}}),w.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return n(()=>import(`./shell-Du5Qg9im.js`).then(e=>T(e.shell)),[])}}),w.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return n(()=>import(`./sieve-BAxa3IjF.js`).then(e=>T(e.sieve)),[])}}),w.of({name:`Smalltalk`,extensions:[`st`],load(){return n(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>T(e.smalltalk)),[])}}),w.of({name:`Solr`,load(){return n(()=>import(`./solr-BBopId9w.js`).then(e=>T(e.solr)),[])}}),w.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return n(()=>import(`./mllike-B45xgp2S.js`).then(e=>T(e.sml)),[])}}),w.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return n(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>T(e.sparql)),[])}}),w.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return n(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>T(e.spreadsheet)),[])}}),w.of({name:`Squirrel`,extensions:[`nut`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.squirrel)),[])}}),w.of({name:`Stylus`,extensions:[`styl`],load(){return n(()=>import(`./stylus-DLLZ8dgm.js`).then(e=>T(e.stylus)),[])}}),w.of({name:`Swift`,extensions:[`swift`],load(){return n(()=>import(`./swift-DKB6_1j6.js`).then(e=>T(e.swift)),[])}}),w.of({name:`sTeX`,load(){return n(()=>import(`./stex-sDrdk2BW.js`).then(e=>T(e.stex)),[])}}),w.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return n(()=>import(`./stex-sDrdk2BW.js`).then(e=>T(e.stex)),[])}}),w.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return n(()=>import(`./verilog-BKSQ5RMB.js`).then(e=>T(e.verilog)),[])}}),w.of({name:`Tcl`,extensions:[`tcl`],load(){return n(()=>import(`./tcl-BGfruO1u.js`).then(e=>T(e.tcl)),[])}}),w.of({name:`Textile`,extensions:[`textile`],load(){return n(()=>import(`./textile-CyzeGT9J.js`).then(e=>T(e.textile)),[])}}),w.of({name:`TiddlyWiki`,load(){return n(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>T(e.tiddlyWiki)),[])}}),w.of({name:`Tiki wiki`,load(){return n(()=>import(`./tiki-CxVlf5KZ.js`).then(e=>T(e.tiki)),[])}}),w.of({name:`TOML`,extensions:[`toml`],load(){return n(()=>import(`./toml-LvoKBwCs.js`).then(e=>T(e.toml)),[])}}),w.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return n(()=>import(`./troff-C2dAgh7P.js`).then(e=>T(e.troff)),[])}}),w.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return n(()=>import(`./ttcn-BePYh-hG.js`).then(e=>T(e.ttcn)),[])}}),w.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return n(()=>import(`./ttcn-cfg-CY0aot7Q.js`).then(e=>T(e.ttcnCfg)),[])}}),w.of({name:`Turtle`,extensions:[`ttl`],load(){return n(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>T(e.turtle)),[])}}),w.of({name:`Web IDL`,extensions:[`webidl`],load(){return n(()=>import(`./webidl-D5jiJvOU.js`).then(e=>T(e.webIDL)),[])}}),w.of({name:`VB.NET`,extensions:[`vb`],load(){return n(()=>import(`./vb-BthdM_4N.js`).then(e=>T(e.vb)),[])}}),w.of({name:`VBScript`,extensions:[`vbs`],load(){return n(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>T(e.vbScript)),[])}}),w.of({name:`Velocity`,extensions:[`vtl`],load(){return n(()=>import(`./velocity-CqftRsjg.js`).then(e=>T(e.velocity)),[])}}),w.of({name:`Verilog`,extensions:[`v`],load(){return n(()=>import(`./verilog-BKSQ5RMB.js`).then(e=>T(e.verilog)),[])}}),w.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return n(()=>import(`./vhdl-CBDDcIJ_.js`).then(e=>T(e.vhdl)),[])}}),w.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return n(()=>import(`./xquery-Cda5K8Gy.js`).then(e=>T(e.xQuery)),[])}}),w.of({name:`Yacas`,extensions:[`ys`],load(){return n(()=>import(`./yacas-CXXgtw0p.js`).then(e=>T(e.yacas)),[])}}),w.of({name:`Z80`,extensions:[`z80`],load(){return n(()=>import(`./z80-CL1naaMV.js`).then(e=>T(e.z80)),[])}}),w.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return n(()=>import(`./mscgen-qgSLujhx.js`).then(e=>T(e.mscgen)),[])}}),w.of({name:`Xù`,extensions:[`xu`],load(){return n(()=>import(`./mscgen-qgSLujhx.js`).then(e=>T(e.xu)),[])}}),w.of({name:`MsGenny`,extensions:[`msgenny`],load(){return n(()=>import(`./mscgen-qgSLujhx.js`).then(e=>T(e.msgenny)),[])}}),w.of({name:`Vue`,extensions:[`vue`],load(){return n(()=>import(`./dist-mpdotBBM.js`).then(e=>e.vue()),__vite__mapDeps([32,1,2,9,6,10,3]))}}),w.of({name:`Angular Template`,load(){return n(()=>import(`./dist-B02SqOKT.js`).then(e=>e.angular()),__vite__mapDeps([33,1,2,9,6,10,3]))}})],fa=`#e5c07b`,pa=`#e06c75`,ma=`#56b6c2`,ha=`#ffffff`,ga=`#abb2bf`,_a=`#7d8799`,va=`#61afef`,ya=`#98c379`,ba=`#d19a66`,xa=`#c678dd`,Sa=`#21252b`,Ca=`#2c313a`,wa=`#282c34`,Ta=`#353a42`,Ea=`#3E4451`,Da=`#528bff`,Oa=[ge.theme({"&":{color:ga,backgroundColor:wa},".cm-content":{caretColor:Da},".cm-cursor, .cm-dropCursor":{borderLeftColor:Da},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Ea},".cm-panels":{backgroundColor:Sa,color:ga},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:wa,color:_a,border:`none`},".cm-activeLineGutter":{backgroundColor:Ca},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:Ta},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ta,borderBottomColor:Ta},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ca,color:ga}}},{dark:!0}),ae(et.define([{tag:C.keyword,color:xa},{tag:[C.name,C.deleted,C.character,C.propertyName,C.macroName],color:pa},{tag:[C.function(C.variableName),C.labelName],color:va},{tag:[C.color,C.constant(C.name),C.standard(C.name)],color:ba},{tag:[C.definition(C.name),C.separator],color:ga},{tag:[C.typeName,C.className,C.number,C.changed,C.annotation,C.modifier,C.self,C.namespace],color:fa},{tag:[C.operator,C.operatorKeyword,C.url,C.escape,C.regexp,C.link,C.special(C.string)],color:ma},{tag:[C.meta,C.comment],color:_a},{tag:C.strong,fontWeight:`bold`},{tag:C.emphasis,fontStyle:`italic`},{tag:C.strikethrough,textDecoration:`line-through`},{tag:C.link,color:_a,textDecoration:`underline`},{tag:C.heading,fontWeight:`bold`,color:pa},{tag:[C.atom,C.bool,C.special(C.variableName)],color:ba},{tag:[C.processingInstruction,C.string,C.inserted],color:ya},{tag:C.invalid,color:ha}]))],ka=function(e){return e.docTypeError=`docTypeError`,e.contextNotFound=`contextNotFound`,e.timerNotFound=`timerNotFound`,e.ctxCallOutOfScope=`ctxCallOutOfScope`,e.createNodeInParserFail=`createNodeInParserFail`,e.stackOverFlow=`stackOverFlow`,e.parserMatchError=`parserMatchError`,e.serializerMatchError=`serializerMatchError`,e.getAtomFromSchemaFail=`getAtomFromSchemaFail`,e.expectDomTypeError=`expectDomTypeError`,e.callCommandBeforeEditorView=`callCommandBeforeEditorView`,e.missingRootElement=`missingRootElement`,e.missingNodeInSchema=`missingNodeInSchema`,e.missingMarkInSchema=`missingMarkInSchema`,e.ctxNotBind=`ctxNotBind`,e.missingYjsDoc=`missingYjsDoc`,e.aiProviderError=`aiProviderError`,e.aiBuildContextError=`aiBuildContextError`,e}({}),Aa=class extends Error{constructor(e,t,n){super(t,n),this.name=`MilkdownError`,this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},ja=(e,t)=>typeof t==`function`?`[Function]`:t,Ma=e=>JSON.stringify(e,ja);function Na(e){return new Aa(ka.docTypeError,`Doc type error, unsupported type: ${Ma(e)}`)}function Pa(e){return new Aa(ka.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function Fa(e){return new Aa(ka.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function Ia(){return new Aa(ka.ctxCallOutOfScope,`Should not call a context out of the plugin.`)}function La(e,t,n){let r=`Cannot create node for ${`name`in e?e.name:e}`,i=e=>{if(e==null)return`null`;if(Array.isArray(e))return`[${e.map(i).join(`, `)}]`;if(typeof e==`object`)return`toJSON`in e&&typeof e.toJSON==`function`?JSON.stringify(e.toJSON()):`spec`in e?JSON.stringify(e.spec):JSON.stringify(e);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return JSON.stringify(e);if(typeof e==`function`)return`[Function: ${e.name||`anonymous`}]`;try{return String(e)}catch{return`[Unserializable]`}},a=[[`[Description]`,r],[`[Attributes]`,t],[`[Content]`,(n??[]).map(e=>e?typeof e==`object`&&`type`in e?`${e}`:i(e):`null`)]].reduce((e,[t,n])=>{let r=`${t}: ${i(n)}.`;return e.concat(r)},[]);return new Aa(ka.createNodeInParserFail,a.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-tEJ-k59b.js","assets/dist-BKBBNg6L.js","assets/dist-CTOneYOu.js","assets/dist-CJsxDt1W.js","assets/dist-bjTa-oQ7.js","assets/dist-BnXQsAyw.js","assets/dist-DxZ6aduu.js","assets/dist-CZA4BBQN.js","assets/dist-Dn87YmtR.js","assets/dist-DjjCJQor.js","assets/dist-Cnq8rabN.js","assets/dist-6HUZUxgD.js","assets/dist-CJvyz0jt.js","assets/dist-BNur_jh6.js","assets/dist-3a5PKdzH.js","assets/dist-CUwIxyXc2.js","assets/dist-DgQ7xbd_.js","assets/dist-CFdrMgLX.js","assets/dist-DfIinXjG.js","assets/dist-mtKKRYXL.js","assets/dist-ySmyIRea.js","assets/dist-MrrIHPUp.js","assets/dist-CFDxfp5Q.js","assets/dist-B2pI4xAT.js","assets/dist-BVqKJBMt2.js","assets/dockerfile-BLkNEvjs.js","assets/simple-mode-DRpGK0lJ.js","assets/factor-D7LVTn2l.js","assets/javascript-BRzqD9BA.js","assets/javascript-B9TABJff.js","assets/nsis-AQ_alPln.js","assets/pug-Ck0YjsGM.js","assets/dist-rZsvLEhc.js","assets/dist-ByXt-qy3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-n93t21jb.js";import{n,t as r}from"./clsx-enQ3xCtU.js";import{t as i}from"./jsx-dev-runtime-CSfA-jUb.js";import{c as a,i as o,n as s,r as c,s as l}from"./floating-ui.dom-BiC1_AXf.js";import{t as u}from"./purify.es-sLXpNpJ5.js";import{n as d,t as f}from"./development-ChLInqDF.js";import{_ as p,a as m,d as h,f as g,i as _,l as v,m as y,o as b,r as ee,s as x,t as te,u as ne,v as re,y as S}from"./micromark-extension-gfm-Cu0AwUgc.js";import{$ as ie,A as ae,B as oe,Ct as se,Dt as ce,E as le,Et as ue,F as de,H as fe,I as pe,J as me,K as he,L as ge,Mt as _e,O as ve,Ot as ye,P as C,R as be,S as xe,St as Se,T as Ce,Tt as we,U as Te,V as Ee,W as De,X as Oe,Y as ke,Z as Ae,a as w,at as je,bt as Me,c as Ne,ct as Pe,dt as Fe,et as Ie,f as Le,ft as Re,g as ze,gt as Be,it as Ve,j as He,kt as Ue,l as We,lt as Ge,mt as Ke,n as qe,nt as Je,o as Ye,ot as Xe,pt as Ze,q as Qe,st as $e,t as et,tt,ut as nt,v as rt,vt as it,w as at,wt as ot,x as st,xt as ct,z as lt}from"./dist-BKBBNg6L.js";import{i as ut,n as dt,o as ft,r as pt}from"./dist-CJsxDt1W.js";import{a as mt,i as ht,n as gt,o as _t,r as vt,s as yt,t as bt,u as xt}from"./lib-Co4B8qAy.js";var St=typeof global==`object`&&global&&global.Object===Object&&global,Ct=typeof self==`object`&&self&&self.Object===Object&&self,wt=St||Ct||Function(`return this`)(),Tt=wt.Symbol,Et=Object.prototype,Dt=Et.hasOwnProperty,Ot=Et.toString,kt=Tt?Tt.toStringTag:void 0;function At(e){var t=Dt.call(e,kt),n=e[kt];try{e[kt]=void 0;var r=!0}catch{}var i=Ot.call(e);return r&&(t?e[kt]=n:delete e[kt]),i}var jt=Object.prototype.toString;function Mt(e){return jt.call(e)}var Nt=`[object Null]`,Pt=`[object Undefined]`,Ft=Tt?Tt.toStringTag:void 0;function It(e){return e==null?e===void 0?Pt:Nt:Ft&&Ft in Object(e)?At(e):Mt(e)}function Lt(e){return typeof e==`object`&&!!e}var Rt=`[object Symbol]`;function zt(e){return typeof e==`symbol`||Lt(e)&&It(e)==Rt}var Bt=Array.isArray,Vt=/\s/;function Ht(e){for(var t=e.length;t--&&Vt.test(e.charAt(t)););return t}var Ut=/^\s+/;function Wt(e){return e&&e.slice(0,Ht(e)+1).replace(Ut,``)}function Gt(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var Kt=NaN,qt=/^[-+]0x[0-9a-f]+$/i,Jt=/^0b[01]+$/i,Yt=/^0o[0-7]+$/i,Xt=parseInt;function Zt(e){if(typeof e==`number`)return e;if(zt(e))return Kt;if(Gt(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=Gt(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Wt(e);var n=Jt.test(e);return n||Yt.test(e)?Xt(e.slice(2),n?2:8):qt.test(e)?Kt:+e}function Qt(e){return e}var $t=`[object AsyncFunction]`,en=`[object Function]`,tn=`[object GeneratorFunction]`,nn=`[object Proxy]`;function rn(e){if(!Gt(e))return!1;var t=It(e);return t==en||t==tn||t==$t||t==nn}var an=wt[`__core-js_shared__`],on=function(){var e=/[^.]+$/.exec(an&&an.keys&&an.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function sn(e){return!!on&&on in e}var cn=Function.prototype.toString;function ln(e){if(e!=null){try{return cn.call(e)}catch{}try{return e+``}catch{}}return``}var un=/[\\^$.*+?()[\]{}|]/g,dn=/^\[object .+?Constructor\]$/,fn=Function.prototype,pn=Object.prototype,mn=fn.toString,hn=pn.hasOwnProperty,gn=RegExp(`^`+mn.call(hn).replace(un,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function _n(e){return!Gt(e)||sn(e)?!1:(rn(e)?gn:dn).test(ln(e))}function vn(e,t){return e?.[t]}function yn(e,t){var n=vn(e,t);return _n(n)?n:void 0}var bn=Object.create,xn=function(){function e(){}return function(t){if(!Gt(t))return{};if(bn)return bn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Sn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Cn(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var wn=800,Tn=16,En=Date.now;function Dn(e){var t=0,n=0;return function(){var r=En(),i=Tn-(r-n);if(n=r,i>0){if(++t>=wn)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function On(e){return function(){return e}}var kn=function(){try{var e=yn(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),An=Dn(kn?function(e,t){return kn(e,`toString`,{configurable:!0,enumerable:!1,value:On(t),writable:!0})}:Qt),jn=9007199254740991,Mn=/^(?:0|[1-9]\d*)$/;function Nn(e,t){var n=typeof e;return t??=jn,!!t&&(n==`number`||n!=`symbol`&&Mn.test(e))&&e>-1&&e%1==0&&e<t}function Pn(e,t,n){t==`__proto__`&&kn?kn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Fn(e,t){return e===t||e!==e&&t!==t}var In=Object.prototype.hasOwnProperty;function Ln(e,t,n){var r=e[t];(!(In.call(e,t)&&Fn(r,n))||n===void 0&&!(t in e))&&Pn(e,t,n)}function Rn(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Pn(n,s,c):Ln(n,s,c)}return n}var zn=Math.max;function Bn(e,t,n){return t=zn(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=zn(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Sn(e,this,s)}}function Vn(e,t){return An(Bn(e,t,Qt),e+``)}var Hn=9007199254740991;function Un(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Hn}function Wn(e){return e!=null&&Un(e.length)&&!rn(e)}function Gn(e,t,n){if(!Gt(n))return!1;var r=typeof t;return(r==`number`?Wn(n)&&Nn(t,n.length):r==`string`&&t in n)?Fn(n[t],e):!1}function Kn(e){return Vn(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Gn(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var qn=Object.prototype;function Jn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||qn)}function Yn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Xn=`[object Arguments]`;function Zn(e){return Lt(e)&&It(e)==Xn}var Qn=Object.prototype,$n=Qn.hasOwnProperty,er=Qn.propertyIsEnumerable,tr=Zn(function(){return arguments}())?Zn:function(e){return Lt(e)&&$n.call(e,`callee`)&&!er.call(e,`callee`)};function nr(){return!1}var rr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ir=rr&&typeof module==`object`&&module&&!module.nodeType&&module,ar=ir&&ir.exports===rr?wt.Buffer:void 0,or=(ar?ar.isBuffer:void 0)||nr,sr=`[object Arguments]`,cr=`[object Array]`,lr=`[object Boolean]`,ur=`[object Date]`,dr=`[object Error]`,fr=`[object Function]`,pr=`[object Map]`,mr=`[object Number]`,hr=`[object Object]`,gr=`[object RegExp]`,_r=`[object Set]`,vr=`[object String]`,yr=`[object WeakMap]`,br=`[object ArrayBuffer]`,xr=`[object DataView]`,Sr=`[object Float32Array]`,Cr=`[object Float64Array]`,wr=`[object Int8Array]`,Tr=`[object Int16Array]`,Er=`[object Int32Array]`,Dr=`[object Uint8Array]`,Or=`[object Uint8ClampedArray]`,kr=`[object Uint16Array]`,Ar=`[object Uint32Array]`,jr={};jr[Sr]=jr[Cr]=jr[wr]=jr[Tr]=jr[Er]=jr[Dr]=jr[Or]=jr[kr]=jr[Ar]=!0,jr[sr]=jr[cr]=jr[br]=jr[lr]=jr[xr]=jr[ur]=jr[dr]=jr[fr]=jr[pr]=jr[mr]=jr[hr]=jr[gr]=jr[_r]=jr[vr]=jr[yr]=!1;function Mr(e){return Lt(e)&&Un(e.length)&&!!jr[It(e)]}function Nr(e){return function(t){return e(t)}}var Pr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Fr=Pr&&typeof module==`object`&&module&&!module.nodeType&&module,Ir=Fr&&Fr.exports===Pr&&St.process,Lr=function(){try{return Fr&&Fr.require&&Fr.require(`util`).types||Ir&&Ir.binding&&Ir.binding(`util`)}catch{}}(),Rr=Lr&&Lr.isTypedArray,zr=Rr?Nr(Rr):Mr,Br=Object.prototype.hasOwnProperty;function Vr(e,t){var n=Bt(e),r=!n&&tr(e),i=!n&&!r&&or(e),a=!n&&!r&&!i&&zr(e),o=n||r||i||a,s=o?Yn(e.length,String):[],c=s.length;for(var l in e)(t||Br.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Nn(l,c)))&&s.push(l);return s}function Hr(e,t){return function(n){return e(t(n))}}function Ur(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Wr=Object.prototype.hasOwnProperty;function Gr(e){if(!Gt(e))return Ur(e);var t=Jn(e),n=[];for(var r in e)r==`constructor`&&(t||!Wr.call(e,r))||n.push(r);return n}function Kr(e){return Wn(e)?Vr(e,!0):Gr(e)}var qr=yn(Object,`create`);function Jr(){this.__data__=qr?qr(null):{},this.size=0}function Yr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Xr=`__lodash_hash_undefined__`,Zr=Object.prototype.hasOwnProperty;function Qr(e){var t=this.__data__;if(qr){var n=t[e];return n===Xr?void 0:n}return Zr.call(t,e)?t[e]:void 0}var $r=Object.prototype.hasOwnProperty;function ei(e){var t=this.__data__;return qr?t[e]!==void 0:$r.call(t,e)}var ti=`__lodash_hash_undefined__`;function ni(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=qr&&t===void 0?ti:t,this}function ri(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ri.prototype.clear=Jr,ri.prototype.delete=Yr,ri.prototype.get=Qr,ri.prototype.has=ei,ri.prototype.set=ni;function ii(){this.__data__=[],this.size=0}function ai(e,t){for(var n=e.length;n--;)if(Fn(e[n][0],t))return n;return-1}var oi=Array.prototype.splice;function si(e){var t=this.__data__,n=ai(t,e);return n<0?!1:(n==t.length-1?t.pop():oi.call(t,n,1),--this.size,!0)}function ci(e){var t=this.__data__,n=ai(t,e);return n<0?void 0:t[n][1]}function li(e){return ai(this.__data__,e)>-1}function ui(e,t){var n=this.__data__,r=ai(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function di(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}di.prototype.clear=ii,di.prototype.delete=si,di.prototype.get=ci,di.prototype.has=li,di.prototype.set=ui;var fi=yn(wt,`Map`);function pi(){this.size=0,this.__data__={hash:new ri,map:new(fi||di),string:new ri}}function mi(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function hi(e,t){var n=e.__data__;return mi(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function gi(e){var t=hi(this,e).delete(e);return this.size-=+!!t,t}function _i(e){return hi(this,e).get(e)}function vi(e){return hi(this,e).has(e)}function yi(e,t){var n=hi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bi.prototype.clear=pi,bi.prototype.delete=gi,bi.prototype.get=_i,bi.prototype.has=vi,bi.prototype.set=yi;var xi=Hr(Object.getPrototypeOf,Object),Si=`[object Object]`,Ci=Function.prototype,wi=Object.prototype,Ti=Ci.toString,Ei=wi.hasOwnProperty,Di=Ti.call(Object);function Oi(e){if(!Lt(e)||It(e)!=Si)return!1;var t=xi(e);if(t===null)return!0;var n=Ei.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ti.call(n)==Di}function ki(){this.__data__=new di,this.size=0}function Ai(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ji(e){return this.__data__.get(e)}function Mi(e){return this.__data__.has(e)}var Ni=200;function Pi(e,t){var n=this.__data__;if(n instanceof di){var r=n.__data__;if(!fi||r.length<Ni-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bi(r)}return n.set(e,t),this.size=n.size,this}function Fi(e){var t=this.__data__=new di(e);this.size=t.size}Fi.prototype.clear=ki,Fi.prototype.delete=Ai,Fi.prototype.get=ji,Fi.prototype.has=Mi,Fi.prototype.set=Pi;var Ii=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Li=Ii&&typeof module==`object`&&module&&!module.nodeType&&module,Ri=Li&&Li.exports===Ii?wt.Buffer:void 0,zi=Ri?Ri.allocUnsafe:void 0;function Bi(e,t){if(t)return e.slice();var n=e.length,r=zi?zi(n):new e.constructor(n);return e.copy(r),r}var Vi=wt.Uint8Array;function Hi(e){var t=new e.constructor(e.byteLength);return new Vi(t).set(new Vi(e)),t}function Ui(e,t){var n=t?Hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Wi(e){return typeof e.constructor==`function`&&!Jn(e)?xn(xi(e)):{}}function Gi(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Ki=Gi(),qi=function(){return wt.Date.now()},Ji=`Expected a function`,Yi=Math.max,Xi=Math.min;function Zi(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Ji);t=Zt(t)||0,Gt(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Yi(Zt(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Xi(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=qi();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(qi())}function ee(){var e=qi(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return ee.cancel=y,ee.flush=b,ee}function Qi(e,t,n){(n!==void 0&&!Fn(e[t],n)||n===void 0&&!(t in e))&&Pn(e,t,n)}function $i(e){return Lt(e)&&Wn(e)}function ea(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function ta(e){return Rn(e,Kr(e))}function na(e,t,n,r,i,a,o){var s=ea(e,n),c=ea(t,n),l=o.get(c);if(l){Qi(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=Bt(c),p=!f&&or(c),m=!f&&!p&&zr(c);u=c,f||p||m?Bt(s)?u=s:$i(s)?u=Cn(s):p?(d=!1,u=Bi(c,!0)):m?(d=!1,u=Ui(c,!0)):u=[]:Oi(c)||tr(c)?(u=s,tr(s)?u=ta(s):(!Gt(s)||rn(s))&&(u=Wi(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Qi(e,n,u)}function ra(e,t,n,r,i){e!==t&&Ki(t,function(a,o){if(i||=new Fi,Gt(a))na(e,t,o,n,ra,r,i);else{var s=r?r(ea(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Qi(e,o,s)}},Kr)}function ia(e,t,n,r,i,a){return Gt(e)&&Gt(t)&&(a.set(t,e),ra(e,t,void 0,ia,a),a.delete(t)),e}var aa=Kn(function(e,t,n,r){ra(e,t,n,r)}),oa=Vn(function(e){return e.push(void 0,ia),Sn(aa,void 0,e)}),sa=`Expected a function`;function ca(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(sa);return Gt(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Zi(e,t,{leading:r,maxWait:t,trailing:i})}var la=e(t(),1);function T(e){return new Ye(Ne.define(e))}function ua(e){return n(()=>import(`./dist-tEJ-k59b.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]))}var da=[w.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return n(()=>import(`./dist-bjTa-oQ7.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,2]))}}),w.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return n(()=>import(`./dist-bjTa-oQ7.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,2]))}}),w.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return ua(`Cassandra`)}}),w.of({name:`CSS`,extensions:[`css`],load(){return n(()=>import(`./dist-BnXQsAyw.js`).then(e=>e.css()),__vite__mapDeps([5,6,1,2]))}}),w.of({name:`Go`,extensions:[`go`],load(){return n(()=>import(`./dist-CZA4BBQN.js`).then(e=>e.go()),__vite__mapDeps([7,1,2,3]))}}),w.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return n(()=>import(`./dist-Dn87YmtR.js`).then(e=>e.html()),__vite__mapDeps([8,9,1,2,6,10,3]))}}),w.of({name:`Java`,extensions:[`java`],load(){return n(()=>import(`./dist-6HUZUxgD.js`).then(e=>e.java()),__vite__mapDeps([11,1,2]))}}),w.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return n(()=>import(`./dist-CJvyz0jt.js`).then(e=>e.javascript()),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return n(()=>import(`./dist-BNur_jh6.js`).then(e=>e.jinja()),__vite__mapDeps([13,1,2,9,6,10,3]))}}),w.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return n(()=>import(`./dist-3a5PKdzH.js`).then(e=>e.json()),__vite__mapDeps([14,1,2]))}}),w.of({name:`JSX`,extensions:[`jsx`],load(){return n(()=>import(`./dist-CJvyz0jt.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`LESS`,extensions:[`less`],load(){return n(()=>import(`./dist-CUwIxyXc2.js`).then(e=>e.less()),__vite__mapDeps([15,1,2,6]))}}),w.of({name:`Liquid`,extensions:[`liquid`],load(){return n(()=>import(`./dist-DgQ7xbd_.js`).then(e=>e.liquid()),__vite__mapDeps([16,1,2,9,6,10,3]))}}),w.of({name:`MariaDB SQL`,load(){return ua(`MariaSQL`)}}),w.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return n(()=>import(`./dist-CFdrMgLX.js`).then(e=>e.markdown()),__vite__mapDeps([17,1,9,2,6,10,3]))}}),w.of({name:`MS SQL`,load(){return ua(`MSSQL`)}}),w.of({name:`MySQL`,load(){return ua(`MySQL`)}}),w.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return n(()=>import(`./dist-DfIinXjG.js`).then(e=>e.php()),__vite__mapDeps([18,1,2,9,6,10,3]))}}),w.of({name:`PLSQL`,extensions:[`pls`],load(){return ua(`PLSQL`)}}),w.of({name:`PostgreSQL`,load(){return ua(`PostgreSQL`)}}),w.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return n(()=>import(`./dist-mtKKRYXL.js`).then(e=>e.python()),__vite__mapDeps([19,1,2,3]))}}),w.of({name:`Rust`,extensions:[`rs`],load(){return n(()=>import(`./dist-ySmyIRea.js`).then(e=>e.rust()),__vite__mapDeps([20,1,2]))}}),w.of({name:`Sass`,extensions:[`sass`],load(){return n(()=>import(`./dist-MrrIHPUp.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([21,1,2,6]))}}),w.of({name:`SCSS`,extensions:[`scss`],load(){return n(()=>import(`./dist-MrrIHPUp.js`).then(e=>e.sass()),__vite__mapDeps([21,1,2,6]))}}),w.of({name:`SQL`,extensions:[`sql`],load(){return ua(`StandardSQL`)}}),w.of({name:`SQLite`,load(){return ua(`SQLite`)}}),w.of({name:`TSX`,extensions:[`tsx`],load(){return n(()=>import(`./dist-CJvyz0jt.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return n(()=>import(`./dist-CJvyz0jt.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([12,10,1,2,3]))}}),w.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return n(()=>import(`./dist-CFDxfp5Q.js`).then(e=>e.wast()),__vite__mapDeps([22,1,2]))}}),w.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return n(()=>import(`./dist-B2pI4xAT.js`).then(e=>e.xml()),__vite__mapDeps([23,1,2]))}}),w.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return n(()=>import(`./dist-BVqKJBMt2.js`).then(e=>e.yaml()),__vite__mapDeps([24,1,2]))}}),w.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return n(()=>import(`./apl-gfMMiTNf.js`).then(e=>T(e.apl)),[])}}),w.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return n(()=>import(`./asciiarmor-qTkVPQu6.js`).then(e=>T(e.asciiArmor)),[])}}),w.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return n(()=>import(`./asn1-Dr8qZg38.js`).then(e=>T(e.asn1({}))),[])}}),w.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return n(()=>import(`./asterisk-Bja0s6e1.js`).then(e=>T(e.asterisk)),[])}}),w.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return n(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>T(e.brainfuck)),[])}}),w.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return n(()=>import(`./cobol-DHLQUbN7.js`).then(e=>T(e.cobol)),[])}}),w.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.csharp)),[])}}),w.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return n(()=>import(`./clojure-BflJGmDX.js`).then(e=>T(e.clojure)),[])}}),w.of({name:`ClojureScript`,extensions:[`cljs`],load(){return n(()=>import(`./clojure-BflJGmDX.js`).then(e=>T(e.clojure)),[])}}),w.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return n(()=>import(`./css-CYpP4FRV.js`).then(e=>T(e.gss)),[])}}),w.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return n(()=>import(`./cmake-CyVbuzPu.js`).then(e=>T(e.cmake)),[])}}),w.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return n(()=>import(`./coffeescript-B2pKbFk8.js`).then(e=>T(e.coffeeScript)),[])}}),w.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return n(()=>import(`./commonlisp-CcllspGY.js`).then(e=>T(e.commonLisp)),[])}}),w.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return n(()=>import(`./cypher-p9eYesGn.js`).then(e=>T(e.cypher)),[])}}),w.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return n(()=>import(`./python-2zlmcyof.js`).then(e=>T(e.cython)),[])}}),w.of({name:`Crystal`,extensions:[`cr`],load(){return n(()=>import(`./crystal-M5-qzICs.js`).then(e=>T(e.crystal)),[])}}),w.of({name:`D`,extensions:[`d`],load(){return n(()=>import(`./d-BhMjBjQP.js`).then(e=>T(e.d)),[])}}),w.of({name:`Dart`,extensions:[`dart`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.dart)),[])}}),w.of({name:`diff`,extensions:[`diff`,`patch`],load(){return n(()=>import(`./diff-ChtP43wD.js`).then(e=>T(e.diff)),[])}}),w.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return n(()=>import(`./dockerfile-BLkNEvjs.js`).then(e=>T(e.dockerFile)),__vite__mapDeps([25,26]))}}),w.of({name:`DTD`,extensions:[`dtd`],load(){return n(()=>import(`./dtd-DTF72YNO.js`).then(e=>T(e.dtd)),[])}}),w.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return n(()=>import(`./dylan-C6jEEEk-.js`).then(e=>T(e.dylan)),[])}}),w.of({name:`EBNF`,load(){return n(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>T(e.ebnf)),[])}}),w.of({name:`ECL`,extensions:[`ecl`],load(){return n(()=>import(`./ecl-BSZaIHnp.js`).then(e=>T(e.ecl)),[])}}),w.of({name:`edn`,extensions:[`edn`],load(){return n(()=>import(`./clojure-BflJGmDX.js`).then(e=>T(e.clojure)),[])}}),w.of({name:`Eiffel`,extensions:[`e`],load(){return n(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>T(e.eiffel)),[])}}),w.of({name:`Elm`,extensions:[`elm`],load(){return n(()=>import(`./elm-Cshzl8qu.js`).then(e=>T(e.elm)),[])}}),w.of({name:`Erlang`,extensions:[`erl`],load(){return n(()=>import(`./erlang-DaB2Rkuy.js`).then(e=>T(e.erlang)),[])}}),w.of({name:`Esper`,load(){return n(()=>import(`./sql-DcCJ9jop.js`).then(e=>T(e.esper)),[])}}),w.of({name:`Factor`,extensions:[`factor`],load(){return n(()=>import(`./factor-D7LVTn2l.js`).then(e=>T(e.factor)),__vite__mapDeps([27,26]))}}),w.of({name:`FCL`,load(){return n(()=>import(`./fcl-ClOhbFR7.js`).then(e=>T(e.fcl)),[])}}),w.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return n(()=>import(`./forth-Cezjo90N.js`).then(e=>T(e.forth)),[])}}),w.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return n(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>T(e.fortran)),[])}}),w.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return n(()=>import(`./mllike-B45xgp2S.js`).then(e=>T(e.fSharp)),[])}}),w.of({name:`Gas`,extensions:[`s`],load(){return n(()=>import(`./gas-BHEdbvp9.js`).then(e=>T(e.gas)),[])}}),w.of({name:`Gherkin`,extensions:[`feature`],load(){return n(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>T(e.gherkin)),[])}}),w.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return n(()=>import(`./groovy-BC3IOsC8.js`).then(e=>T(e.groovy)),[])}}),w.of({name:`Haskell`,extensions:[`hs`],load(){return n(()=>import(`./haskell-BRsoo5mP.js`).then(e=>T(e.haskell)),[])}}),w.of({name:`Haxe`,extensions:[`hx`],load(){return n(()=>import(`./haxe-DjVOVvNP.js`).then(e=>T(e.haxe)),[])}}),w.of({name:`HXML`,extensions:[`hxml`],load(){return n(()=>import(`./haxe-DjVOVvNP.js`).then(e=>T(e.hxml)),[])}}),w.of({name:`HTTP`,load(){return n(()=>import(`./http-CLVgA2GD.js`).then(e=>T(e.http)),[])}}),w.of({name:`IDL`,extensions:[`pro`],load(){return n(()=>import(`./idl-BUZw3wgd.js`).then(e=>T(e.idl)),[])}}),w.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return n(()=>import(`./javascript-BRzqD9BA.js`).then(e=>T(e.jsonld)),__vite__mapDeps([28,29]))}}),w.of({name:`Julia`,extensions:[`jl`],load(){return n(()=>import(`./julia-CQfgDRfP.js`).then(e=>T(e.julia)),[])}}),w.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.kotlin)),[])}}),w.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return n(()=>import(`./livescript-BXxG0Yva.js`).then(e=>T(e.liveScript)),[])}}),w.of({name:`Lua`,extensions:[`lua`],load(){return n(()=>import(`./lua-CiA1ziua.js`).then(e=>T(e.lua)),[])}}),w.of({name:`mIRC`,extensions:[`mrc`],load(){return n(()=>import(`./mirc-C9zpzAZU.js`).then(e=>T(e.mirc)),[])}}),w.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return n(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>T(e.mathematica)),[])}}),w.of({name:`Modelica`,extensions:[`mo`],load(){return n(()=>import(`./modelica-CqHI_q-D.js`).then(e=>T(e.modelica)),[])}}),w.of({name:`MUMPS`,extensions:[`mps`],load(){return n(()=>import(`./mumps-CW_TBmxz.js`).then(e=>T(e.mumps)),[])}}),w.of({name:`Mbox`,extensions:[`mbox`],load(){return n(()=>import(`./mbox-BEMVcqjs.js`).then(e=>T(e.mbox)),[])}}),w.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return n(()=>import(`./nginx-BMaDbqW3.js`).then(e=>T(e.nginx)),[])}}),w.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return n(()=>import(`./nsis-AQ_alPln.js`).then(e=>T(e.nsis)),__vite__mapDeps([30,26]))}}),w.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return n(()=>import(`./ntriples-d28e9m0E.js`).then(e=>T(e.ntriples)),[])}}),w.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.objectiveC)),[])}}),w.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.objectiveCpp)),[])}}),w.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return n(()=>import(`./mllike-B45xgp2S.js`).then(e=>T(e.oCaml)),[])}}),w.of({name:`Octave`,extensions:[`m`],load(){return n(()=>import(`./octave-D2Q8cUp1.js`).then(e=>T(e.octave)),[])}}),w.of({name:`Oz`,extensions:[`oz`],load(){return n(()=>import(`./oz-BwTct_5T.js`).then(e=>T(e.oz)),[])}}),w.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return n(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>T(e.pascal)),[])}}),w.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return n(()=>import(`./perl-CdEHsPfU.js`).then(e=>T(e.perl)),[])}}),w.of({name:`Pig`,extensions:[`pig`],load(){return n(()=>import(`./pig-AF4Hwhju.js`).then(e=>T(e.pig)),[])}}),w.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return n(()=>import(`./powershell-CzG71I4L.js`).then(e=>T(e.powerShell)),[])}}),w.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return n(()=>import(`./properties-C357ku5U.js`).then(e=>T(e.properties)),[])}}),w.of({name:`ProtoBuf`,extensions:[`proto`],load(){return n(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>T(e.protobuf)),[])}}),w.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return n(()=>import(`./pug-Ck0YjsGM.js`).then(e=>T(e.pug)),__vite__mapDeps([31,29]))}}),w.of({name:`Puppet`,extensions:[`pp`],load(){return n(()=>import(`./puppet-B4hC2X4m.js`).then(e=>T(e.puppet)),[])}}),w.of({name:`Q`,extensions:[`q`],load(){return n(()=>import(`./q-B9NhS7L_.js`).then(e=>T(e.q)),[])}}),w.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return n(()=>import(`./r-DADKenSm.js`).then(e=>T(e.r)),[])}}),w.of({name:`RPM Changes`,load(){return n(()=>import(`./rpm-gpDK5sbt.js`).then(e=>T(e.rpmChanges)),[])}}),w.of({name:`RPM Spec`,extensions:[`spec`],load(){return n(()=>import(`./rpm-gpDK5sbt.js`).then(e=>T(e.rpmSpec)),[])}}),w.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return n(()=>import(`./ruby-DsYpTuWg.js`).then(e=>T(e.ruby)),[])}}),w.of({name:`SAS`,extensions:[`sas`],load(){return n(()=>import(`./sas-C2OyD2Y6.js`).then(e=>T(e.sas)),[])}}),w.of({name:`Scala`,extensions:[`scala`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.scala)),[])}}),w.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return n(()=>import(`./scheme-tChLYBuY.js`).then(e=>T(e.scheme)),[])}}),w.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return n(()=>import(`./shell-Du5Qg9im.js`).then(e=>T(e.shell)),[])}}),w.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return n(()=>import(`./sieve-BAxa3IjF.js`).then(e=>T(e.sieve)),[])}}),w.of({name:`Smalltalk`,extensions:[`st`],load(){return n(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>T(e.smalltalk)),[])}}),w.of({name:`Solr`,load(){return n(()=>import(`./solr-BBopId9w.js`).then(e=>T(e.solr)),[])}}),w.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return n(()=>import(`./mllike-B45xgp2S.js`).then(e=>T(e.sml)),[])}}),w.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return n(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>T(e.sparql)),[])}}),w.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return n(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>T(e.spreadsheet)),[])}}),w.of({name:`Squirrel`,extensions:[`nut`],load(){return n(()=>import(`./clike-CVjTFI47.js`).then(e=>T(e.squirrel)),[])}}),w.of({name:`Stylus`,extensions:[`styl`],load(){return n(()=>import(`./stylus-DLLZ8dgm.js`).then(e=>T(e.stylus)),[])}}),w.of({name:`Swift`,extensions:[`swift`],load(){return n(()=>import(`./swift-DKB6_1j6.js`).then(e=>T(e.swift)),[])}}),w.of({name:`sTeX`,load(){return n(()=>import(`./stex-sDrdk2BW.js`).then(e=>T(e.stex)),[])}}),w.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return n(()=>import(`./stex-sDrdk2BW.js`).then(e=>T(e.stex)),[])}}),w.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return n(()=>import(`./verilog-BKSQ5RMB.js`).then(e=>T(e.verilog)),[])}}),w.of({name:`Tcl`,extensions:[`tcl`],load(){return n(()=>import(`./tcl-BGfruO1u.js`).then(e=>T(e.tcl)),[])}}),w.of({name:`Textile`,extensions:[`textile`],load(){return n(()=>import(`./textile-CyzeGT9J.js`).then(e=>T(e.textile)),[])}}),w.of({name:`TiddlyWiki`,load(){return n(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>T(e.tiddlyWiki)),[])}}),w.of({name:`Tiki wiki`,load(){return n(()=>import(`./tiki-CxVlf5KZ.js`).then(e=>T(e.tiki)),[])}}),w.of({name:`TOML`,extensions:[`toml`],load(){return n(()=>import(`./toml-LvoKBwCs.js`).then(e=>T(e.toml)),[])}}),w.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return n(()=>import(`./troff-C2dAgh7P.js`).then(e=>T(e.troff)),[])}}),w.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return n(()=>import(`./ttcn-BePYh-hG.js`).then(e=>T(e.ttcn)),[])}}),w.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return n(()=>import(`./ttcn-cfg-CY0aot7Q.js`).then(e=>T(e.ttcnCfg)),[])}}),w.of({name:`Turtle`,extensions:[`ttl`],load(){return n(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>T(e.turtle)),[])}}),w.of({name:`Web IDL`,extensions:[`webidl`],load(){return n(()=>import(`./webidl-D5jiJvOU.js`).then(e=>T(e.webIDL)),[])}}),w.of({name:`VB.NET`,extensions:[`vb`],load(){return n(()=>import(`./vb-BthdM_4N.js`).then(e=>T(e.vb)),[])}}),w.of({name:`VBScript`,extensions:[`vbs`],load(){return n(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>T(e.vbScript)),[])}}),w.of({name:`Velocity`,extensions:[`vtl`],load(){return n(()=>import(`./velocity-CqftRsjg.js`).then(e=>T(e.velocity)),[])}}),w.of({name:`Verilog`,extensions:[`v`],load(){return n(()=>import(`./verilog-BKSQ5RMB.js`).then(e=>T(e.verilog)),[])}}),w.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return n(()=>import(`./vhdl-CBDDcIJ_.js`).then(e=>T(e.vhdl)),[])}}),w.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return n(()=>import(`./xquery-Cda5K8Gy.js`).then(e=>T(e.xQuery)),[])}}),w.of({name:`Yacas`,extensions:[`ys`],load(){return n(()=>import(`./yacas-CXXgtw0p.js`).then(e=>T(e.yacas)),[])}}),w.of({name:`Z80`,extensions:[`z80`],load(){return n(()=>import(`./z80-CL1naaMV.js`).then(e=>T(e.z80)),[])}}),w.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return n(()=>import(`./mscgen-qgSLujhx.js`).then(e=>T(e.mscgen)),[])}}),w.of({name:`Xù`,extensions:[`xu`],load(){return n(()=>import(`./mscgen-qgSLujhx.js`).then(e=>T(e.xu)),[])}}),w.of({name:`MsGenny`,extensions:[`msgenny`],load(){return n(()=>import(`./mscgen-qgSLujhx.js`).then(e=>T(e.msgenny)),[])}}),w.of({name:`Vue`,extensions:[`vue`],load(){return n(()=>import(`./dist-rZsvLEhc.js`).then(e=>e.vue()),__vite__mapDeps([32,1,2,9,6,10,3]))}}),w.of({name:`Angular Template`,load(){return n(()=>import(`./dist-ByXt-qy3.js`).then(e=>e.angular()),__vite__mapDeps([33,1,2,9,6,10,3]))}})],fa=`#e5c07b`,pa=`#e06c75`,ma=`#56b6c2`,ha=`#ffffff`,ga=`#abb2bf`,_a=`#7d8799`,va=`#61afef`,ya=`#98c379`,ba=`#d19a66`,xa=`#c678dd`,Sa=`#21252b`,Ca=`#2c313a`,wa=`#282c34`,Ta=`#353a42`,Ea=`#3E4451`,Da=`#528bff`,Oa=[ge.theme({"&":{color:ga,backgroundColor:wa},".cm-content":{caretColor:Da},".cm-cursor, .cm-dropCursor":{borderLeftColor:Da},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Ea},".cm-panels":{backgroundColor:Sa,color:ga},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:wa,color:_a,border:`none`},".cm-activeLineGutter":{backgroundColor:Ca},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:Ta},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ta,borderBottomColor:Ta},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ca,color:ga}}},{dark:!0}),ae(et.define([{tag:C.keyword,color:xa},{tag:[C.name,C.deleted,C.character,C.propertyName,C.macroName],color:pa},{tag:[C.function(C.variableName),C.labelName],color:va},{tag:[C.color,C.constant(C.name),C.standard(C.name)],color:ba},{tag:[C.definition(C.name),C.separator],color:ga},{tag:[C.typeName,C.className,C.number,C.changed,C.annotation,C.modifier,C.self,C.namespace],color:fa},{tag:[C.operator,C.operatorKeyword,C.url,C.escape,C.regexp,C.link,C.special(C.string)],color:ma},{tag:[C.meta,C.comment],color:_a},{tag:C.strong,fontWeight:`bold`},{tag:C.emphasis,fontStyle:`italic`},{tag:C.strikethrough,textDecoration:`line-through`},{tag:C.link,color:_a,textDecoration:`underline`},{tag:C.heading,fontWeight:`bold`,color:pa},{tag:[C.atom,C.bool,C.special(C.variableName)],color:ba},{tag:[C.processingInstruction,C.string,C.inserted],color:ya},{tag:C.invalid,color:ha}]))],ka=function(e){return e.docTypeError=`docTypeError`,e.contextNotFound=`contextNotFound`,e.timerNotFound=`timerNotFound`,e.ctxCallOutOfScope=`ctxCallOutOfScope`,e.createNodeInParserFail=`createNodeInParserFail`,e.stackOverFlow=`stackOverFlow`,e.parserMatchError=`parserMatchError`,e.serializerMatchError=`serializerMatchError`,e.getAtomFromSchemaFail=`getAtomFromSchemaFail`,e.expectDomTypeError=`expectDomTypeError`,e.callCommandBeforeEditorView=`callCommandBeforeEditorView`,e.missingRootElement=`missingRootElement`,e.missingNodeInSchema=`missingNodeInSchema`,e.missingMarkInSchema=`missingMarkInSchema`,e.ctxNotBind=`ctxNotBind`,e.missingYjsDoc=`missingYjsDoc`,e.aiProviderError=`aiProviderError`,e.aiBuildContextError=`aiBuildContextError`,e}({}),Aa=class extends Error{constructor(e,t,n){super(t,n),this.name=`MilkdownError`,this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},ja=(e,t)=>typeof t==`function`?`[Function]`:t,Ma=e=>JSON.stringify(e,ja);function Na(e){return new Aa(ka.docTypeError,`Doc type error, unsupported type: ${Ma(e)}`)}function Pa(e){return new Aa(ka.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function Fa(e){return new Aa(ka.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function Ia(){return new Aa(ka.ctxCallOutOfScope,`Should not call a context out of the plugin.`)}function La(e,t,n){let r=`Cannot create node for ${`name`in e?e.name:e}`,i=e=>{if(e==null)return`null`;if(Array.isArray(e))return`[${e.map(i).join(`, `)}]`;if(typeof e==`object`)return`toJSON`in e&&typeof e.toJSON==`function`?JSON.stringify(e.toJSON()):`spec`in e?JSON.stringify(e.spec):JSON.stringify(e);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return JSON.stringify(e);if(typeof e==`function`)return`[Function: ${e.name||`anonymous`}]`;try{return String(e)}catch{return`[Unserializable]`}},a=[[`[Description]`,r],[`[Attributes]`,t],[`[Content]`,(n??[]).map(e=>e?typeof e==`object`&&`type`in e?`${e}`:i(e):`null`)]].reduce((e,[t,n])=>{let r=`${t}: ${i(n)}.`;return e.concat(r)},[]);return new Aa(ka.createNodeInParserFail,a.join(`
|
|
3
3
|
`))}function Ra(){return new Aa(ka.stackOverFlow,`Stack over flow, cannot pop on an empty stack.`)}function za(e){return new Aa(ka.parserMatchError,`Cannot match target parser for node: ${Ma(e)}.`)}function Ba(e){return new Aa(ka.serializerMatchError,`Cannot match target serializer for node: ${Ma(e)}.`)}function Va(e,t){return new Aa(ka.getAtomFromSchemaFail,`Cannot get ${e}: ${t} from schema.`)}function Ha(e){return new Aa(ka.expectDomTypeError,`Expect to be a dom, but get: ${Ma(e)}.`)}function Ua(){return new Aa(ka.callCommandBeforeEditorView,`You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized`)}function Wa(e){return new Aa(ka.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function Ga(e){return new Aa(ka.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}function Ka(e){try{return Ma(e)}catch{return`[Unserializable]`}}function qa(e){let t=e instanceof Error?e.message:Ka(e);return new Aa(ka.aiProviderError,`AI provider error: ${t}`,{cause:e})}function Ja(e){let t=e instanceof Error?e.message:Ka(e);return new Aa(ka.aiBuildContextError,`AI buildContext failed: ${t}`,{cause:e})}var Ya=class{constructor(){this.sliceMap=new Map,this.get=e=>{let t=typeof e==`string`?[...this.sliceMap.values()].find(t=>t.type.name===e):this.sliceMap.get(e.id);if(!t)throw Pa(typeof e==`string`?e:e.name);return t},this.remove=e=>{let t=typeof e==`string`?[...this.sliceMap.values()].find(t=>t.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e==`string`?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},Xa=class{#e;#t;#n;constructor(e,t,n){this.#e=[],this.#n=()=>{this.#e.forEach(e=>e(this.#t))},this.set=e=>{this.#t=e,this.#n()},this.get=()=>this.#t,this.update=e=>{this.#t=e(this.#t),this.#n()},this.type=n,this.#t=t,e.set(n.id,this)}on(e){return this.#e.push(e),()=>{this.#e=this.#e.filter(t=>t!==e)}}once(e){let t=this.on(n=>{e(n),t()});return t}off(e){this.#e=this.#e.filter(t=>t!==e)}offAll(){this.#e=[]}},Za=class{constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw Ia()}}create(e,t=this._defaultValue){return new Xa(e,t,this)}},Qa=(e,t)=>new Za(e,t),$a=class{#e;#t;#n;#r;#i;#a;#o;constructor(e,t,n){this.#r=new Set,this.#i=new Set,this.#a=new Map,this.#o=new Map,this.read=()=>({metadata:this.#e,injectedSlices:[...this.#r].map(e=>({name:typeof e==`string`?e:e.name,value:this.#s(e)})),consumedSlices:[...this.#i].map(e=>({name:typeof e==`string`?e:e.name,value:this.#s(e)})),recordedTimers:[...this.#a].map(([e,{duration:t}])=>({name:e.name,duration:t,status:this.#c(e)})),waitTimers:[...this.#o].map(([e,{duration:t}])=>({name:e.name,duration:t,status:this.#c(e)}))}),this.onRecord=e=>{this.#a.set(e,{start:Date.now(),duration:0})},this.onClear=e=>{this.#a.delete(e)},this.onDone=e=>{let t=this.#a.get(e);t&&(t.duration=Date.now()-t.start)},this.onWait=(e,t)=>{let n=Date.now();t.finally(()=>{this.#o.set(e,{duration:Date.now()-n})}).catch(console.error)},this.onInject=e=>{this.#r.add(e)},this.onRemove=e=>{this.#r.delete(e)},this.onUse=e=>{this.#i.add(e)},this.#s=e=>this.#t.get(e).get(),this.#c=e=>this.#n.get(e).status,this.#t=e,this.#n=t,this.#e=n}#s;#c},eo=class e{#e;#t;#n;#r;constructor(t,n,r){this.produce=t=>t&&Object.keys(t).length?new e(this.#e,this.#t,{...t}):this,this.inject=(e,t)=>{let n=e.create(this.#e.sliceMap);return t!=null&&n.set(t),this.#r?.onInject(e),this},this.remove=e=>(this.#e.remove(e),this.#r?.onRemove(e),this),this.record=e=>(e.create(this.#t.store),this.#r?.onRecord(e),this),this.clearTimer=e=>(this.#t.remove(e),this.#r?.onClear(e),this),this.isInjected=e=>this.#e.has(e),this.isRecorded=e=>this.#t.has(e),this.use=e=>(this.#r?.onUse(e),this.#e.get(e)),this.get=e=>this.use(e).get(),this.set=(e,t)=>this.use(e).set(t),this.update=(e,t)=>this.use(e).update(t),this.timer=e=>this.#t.get(e),this.done=e=>{this.timer(e).done(),this.#r?.onDone(e)},this.wait=e=>{let t=this.timer(e).start();return this.#r?.onWait(e,t),t},this.waitTimers=async e=>{await Promise.all(this.get(e).map(e=>this.wait(e)))},this.#e=t,this.#t=n,this.#n=r,r&&(this.#r=new $a(t,n,r))}get meta(){return this.#n}get inspector(){return this.#r}},to=class{constructor(){this.store=new Map,this.get=e=>{let t=this.store.get(e.id);if(!t)throw Fa(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},no=class{#e;#t;#n;#r;constructor(e,t){this.#e=null,this.#t=null,this.#r=`pending`,this.start=()=>(this.#e??=new Promise((e,t)=>{this.#t=t=>{t instanceof CustomEvent&&t.detail.id===this.#n&&(this.#r=`resolved`,this.#i(),t.stopImmediatePropagation(),e())},this.#a(()=>{this.#r===`pending`&&(this.#r=`rejected`),this.#i(),t(Error(`Timing ${this.type.name} timeout.`))}),this.#r=`pending`,addEventListener(this.type.name,this.#t)}),this.#e),this.done=()=>{let e=new CustomEvent(this.type.name,{detail:{id:this.#n}});dispatchEvent(e)},this.#i=()=>{this.#t&&removeEventListener(this.type.name,this.#t)},this.#a=e=>{setTimeout(()=>{e()},this.type.timeout)},this.#n=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#r}#i;#a},ro=class{constructor(e,t=3e3){this.create=e=>new no(e,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},io=(e,t=3e3)=>new ro(e,t),ao={};function oo(e,t){let n=t||ao;return so(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function so(e,t,n){if(lo(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return co(e.children,t,n)}return Array.isArray(e)?co(e,t,n):``}function co(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=so(e[i],t,n);return r.join(``)}function lo(e){return!!(e&&typeof e==`object`)}var uo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fo(e){return e.replace(uo,po)}function po(e,t,n){if(t)return t;if(n.charCodeAt(0)===S.numberSign){let e=n.charCodeAt(1),t=e===S.lowercaseX||e===S.uppercaseX;return y(n.slice(t?2:1),t?re.numericBaseHexadecimal:re.numericBaseDecimal)}return d(n)||e}var mo={}.hasOwnProperty;function ho(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),go(n)(_(m(n).document().write(ee()(e,t,!0))))}function go(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Le),autolinkProtocol:le,autolinkEmail:le,atxHeading:a(Ne),blockQuote:a(ke),characterEscape:le,characterReference:le,codeFenced:a(Ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Ae,o),codeText:a(w,o),codeTextData:le,data:le,codeFlowValue:le,definition:a(je),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Me),hardBreakEscape:a(Pe),hardBreakTrailing:a(Pe),htmlFlow:a(Fe,o),htmlFlowData:le,htmlText:a(Fe,o),htmlTextData:le,image:a(Ie),label:o,link:a(Le),listItem:a(ze),listItemValue:h,listOrdered:a(Re,m),listUnordered:a(Re),paragraph:a(Be),reference:Se,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ne),strong:a(Ve),thematicBreak:a(Ue)},exit:{atxHeading:c(),atxHeadingSequence:ae,autolink:c(),autolinkEmail:Oe,autolinkProtocol:De,blockQuote:c(),characterEscapeValue:ue,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:Te,characterReference:Ee,codeFenced:c(ee),codeFencedFence:b,codeFencedFenceInfo:_,codeFencedFenceMeta:v,codeFlowValue:ue,codeIndented:c(x),codeText:c(he),codeTextData:ue,data:ue,definition:c(),definitionDestinationString:ie,definitionLabelString:te,definitionTitleString:ne,emphasis:c(),hardBreakEscape:c(fe),hardBreakTrailing:c(fe),htmlFlow:c(pe),htmlFlowData:ue,htmlText:c(me),htmlTextData:ue,image:c(_e),label:ye,labelText:ve,lineEnding:de,link:c(ge),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Ce,resourceDestinationString:C,resourceTitleString:be,resource:xe,setextHeading:c(ce),setextHeadingLineSequence:se,setextHeadingText:oe,strong:c(),thematicBreak:c()}};vo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)if(e[d][1].type===p.listOrdered||e[d][1].type===p.listUnordered)if(e[d][0]===`enter`)c.push(d);else{let t=c.pop();f(typeof t==`number`,`expected list to be open`),d=i(e,t,d)}for(d=-1;++d<e.length;){let n=t[e[d][0]];mo.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||bo).call(a,void 0,e[0])}for(r.position={start:_o(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:_o(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case p.listUnordered:case p.listOrdered:case p.blockQuote:t[0]===`enter`?i++:i--,l=void 0;break;case p.lineEndingBlank:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case p.linePrefix:case p.listItemValue:case p.listItemMarker:case p.listItemPrefix:case p.listItemPrefixWhitespace:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===p.listItemPrefix||i===-1&&t[0]===`exit`&&(t[1].type===p.listUnordered||t[1].type===p.listOrdered)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===p.lineEnding||t[1].type===p.lineEndingBlank){if(t[0]===`exit`)continue;s&&(e[s][1].type=p.lineEndingBlank,a=!0),t[1].type=p.lineEnding,s=i}else if(!(t[1].type===p.linePrefix||t[1].type===p.blockQuotePrefix||t[1].type===p.blockQuotePrefixWhitespace||t[1].type===p.blockQuoteMarker||t[1].type===p.listItemIndent))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===p.listItemPrefix){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){let r=this.stack[this.stack.length-1];f(r,"expected `parent`"),f(`children`in r,"expected `parent`"),r.children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:_o(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop();f(n,"expected `node`");let r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||bo).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+xt({start:e.start,end:e.end})+`): it’s not open`);f(n.type!==`fragment`,"unexpected fragment `exit`ed"),f(n.position,"expected `position` to be defined"),n.position.end=_o(e.end)}function u(){return oo(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function h(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];f(t,`expected nodes on stack`),f(t.type===`list`,`expected list on stack`),t.start=Number.parseInt(this.sliceSerialize(e),re.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`code`,`expected code on stack`),t.lang=e}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`code`,`expected code on stack`),t.meta=e}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`code`,`expected code on stack`),t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`code`,`expected code on stack`),t.value=e.replace(/(\r?\n|\r)$/g,``)}function te(e){let t=this.resume(),n=this.stack[this.stack.length-1];f(n,`expected node on stack`),f(n.type===`definition`,`expected definition on stack`),n.label=t,n.identifier=g(this.sliceSerialize(e)).toLowerCase()}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`definition`,`expected definition on stack`),t.title=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`definition`,`expected definition on stack`),t.url=e}function ae(e){let t=this.stack[this.stack.length-1];if(f(t,`expected node on stack`),f(t.type===`heading`,`expected heading on stack`),!t.depth){let n=this.sliceSerialize(e).length;f(n===1||n===2||n===3||n===4||n===5||n===6,"expected `depth` between `1` and `6`"),t.depth=n}}function oe(){this.data.setextHeadingSlurpLineEnding=!0}function se(e){let t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`heading`,`expected heading on stack`),t.depth=this.sliceSerialize(e).codePointAt(0)===S.equalsTo?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function le(e){let t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(`children`in t,`expected parent on stack`);let n=t.children,r=n[n.length-1];(!r||r.type!==`text`)&&(r=He(),r.position={start:_o(e.start),end:void 0},n.push(r)),this.stack.push(r)}function ue(e){let t=this.stack.pop();f(t,"expected a `node` to be on the stack"),f(`value`in t,"expected a `literal` to be on the stack"),f(t.position,"expected `node` to have an open position"),t.value+=this.sliceSerialize(e),t.position.end=_o(e.end)}function de(e){let n=this.stack[this.stack.length-1];if(f(n,"expected `node`"),this.data.atHardBreak){f(`children`in n,"expected `parent`");let t=n.children[n.children.length-1];f(t.position,`expected tail to have a starting position`),t.position.end=_o(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(le.call(this,e),ue.call(this,e))}function fe(){this.data.atHardBreak=!0}function pe(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`html`,`expected html on stack`),t.value=e}function me(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`html`,`expected html on stack`),t.value=e}function he(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`inlineCode`,`expected inline code on stack`),t.value=e}function ge(){let e=this.stack[this.stack.length-1];if(f(e,`expected node on stack`),f(e.type===`link`,`expected link on stack`),this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function _e(){let e=this.stack[this.stack.length-1];if(f(e,`expected node on stack`),f(e.type===`image`,`expected image on stack`),this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ve(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];f(n,`expected ancestor on stack`),f(n.type===`image`||n.type===`link`,`expected image or link on stack`),n.label=fo(t),n.identifier=g(t).toLowerCase()}function ye(){let e=this.stack[this.stack.length-1];f(e,`expected node on stack`),f(e.type===`fragment`,`expected fragment on stack`);let t=this.resume(),n=this.stack[this.stack.length-1];f(n,`expected node on stack`),f(n.type===`image`||n.type===`link`,`expected image or link on stack`),this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function C(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`image`||t.type===`link`,`expected image or link on stack`),t.url=e}function be(){let e=this.resume(),t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`image`||t.type===`link`,`expected image or link on stack`),t.title=e}function xe(){this.data.inReference=void 0}function Se(){this.data.referenceType=`collapsed`}function Ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];f(n,`expected node on stack`),f(n.type===`image`||n.type===`link`,`expected image reference or link reference on stack`),n.label=t,n.identifier=g(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function we(e){f(e.type===`characterReferenceMarkerNumeric`||e.type===`characterReferenceMarkerHexadecimal`),this.data.characterReferenceType=e.type}function Te(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;if(n)r=y(t,n===p.characterReferenceMarkerNumeric?re.numericBaseDecimal:re.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{let e=d(t);f(e!==!1,`expected reference to decode`),r=e}let i=this.stack[this.stack.length-1];f(i,"expected `node`"),f(`value`in i,"expected `node.value`"),i.value+=r}function Ee(e){let t=this.stack.pop();f(t,"expected `node`"),f(t.position,"expected `node.position`"),t.position.end=_o(e.end)}function De(e){ue.call(this,e);let t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`link`,`expected link on stack`),t.url=this.sliceSerialize(e)}function Oe(e){ue.call(this,e);let t=this.stack[this.stack.length-1];f(t,`expected node on stack`),f(t.type===`link`,`expected link on stack`),t.url=`mailto:`+this.sliceSerialize(e)}function ke(){return{type:`blockquote`,children:[]}}function Ae(){return{type:`code`,lang:null,meta:null,value:``}}function w(){return{type:`inlineCode`,value:``}}function je(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Me(){return{type:`emphasis`,children:[]}}function Ne(){return{type:`heading`,depth:0,children:[]}}function Pe(){return{type:`break`}}function Fe(){return{type:`html`,value:``}}function Ie(){return{type:`image`,title:null,url:``,alt:null}}function Le(){return{type:`link`,title:null,url:``,children:[]}}function Re(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ze(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Be(){return{type:`paragraph`,children:[]}}function Ve(){return{type:`strong`,children:[]}}function He(){return{type:`text`,value:``}}function Ue(){return{type:`thematicBreak`}}}function _o(e){return{line:e.line,column:e.column,offset:e.offset}}function vo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?vo(e,r):yo(e,r)}}function yo(e,t){let n;for(n in t)if(mo.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function bo(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+xt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xt({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+xt({start:t.start,end:t.end})+`) is still open`)}function xo(e){let t=this;t.parser=n;function n(n){return ho(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var So={}.hasOwnProperty;function Co(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Co(e,t.extensions[n]);for(r in t)if(So.call(t,r))switch(r){case`extensions`:break;case`unsafe`:wo(e[r],t[r]);break;case`join`:wo(e[r],t[r]);break;case`handlers`:To(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function wo(e,t){t&&e.push(...t)}function To(e,t){t&&Object.assign(e,t)}function Eo(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Do);return i(),o}function Do(e,t,n){return`>`+(n?``:` `)+e}function Oo(e,t){return ko(e,t.inConstruct,!0)&&!ko(e,t.notInConstruct,!1)}function ko(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ao(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
4
4
|
`&&Oo(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
5
5
|
`}function jo(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Mo(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function No(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Po(e,t,n,r){let i=No(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Mo(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Fo);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(jo(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-n93t21jb.js";import{i as n,t as r,w as i}from"./button-Dlm2GmQs.js";import{c as a,l as o}from"./chunk-KS7C4IRE-B1_Zk64s.js";import{t as s}from"./jsx-dev-runtime-CSfA-jUb.js";import{t as c}from"./json-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-n93t21jb.js";import{i as n,t as r,w as i}from"./button-Dlm2GmQs.js";import{c as a,l as o}from"./chunk-KS7C4IRE-B1_Zk64s.js";import{t as s}from"./jsx-dev-runtime-CSfA-jUb.js";import{t as c}from"./json-DhhZ0035.js";import{n as l,s as u,t as d}from"./ExtendReasonInfo-D50L3SUy.js";import{f,l as p,m,n as h,o as g,r as _,s as v,t as y,u as b,y as x}from"./Toolbar-BwCsWgeh.js";import{S,f as C,g as w,m as T}from"./fields-DM_Scep8.js";import{a as E,h as D,m as O,n as k,o as A,t as j}from"./shelf-BK3PnmC8.js";import{T as M,o as N}from"./api-CZDF0K_X.js";var P=e(t(),1),F=s(),I=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/fields-form.tsx`;function L({shelf:e,record:t,onSubmit:n,onCancel:a,submitLabel:o,busy:s,children:c,hiddenFields:l,onValuesChange:u,errorSink:d,extraValidate:f}){let{t:m}=i(),g=p(m),y=!!t,b=(0,P.useMemo)(()=>A(e.fields),[e]),{values:x,errors:C,setErrors:w,setTouched:T,bridge:E}=h({fm:b,mode:y?`edit`:`create`,recordCtx:{library:e.library,shelf:e.shelf,recordId:t?String(t.id):null},initial:()=>z(e,t),hiddenFields:l}),[D,O]=(0,P.useState)(),[M,N]=(0,P.useState)(!1);(0,P.useEffect)(()=>{u?.(x)},[x,u]),(0,P.useEffect)(()=>{d?.({setErrors:w,setTouched:T})},[d,w,T]);async function L(t){t.preventDefault(),O(void 0);let r=Object.keys(b),i={};for(let e of r)e in x&&(i[e]=x[e]);let a=B(i),o=(y?k(e):j(e)).safeParse(a),s={};if(!o.success)for(let e of o.error.issues){let t=String(e.path[0]??``);if(!r.includes(t)||s[t])continue;let{code:n,params:i}=S(e.message);s[t]=g(n,i)}if(Object.assign(s,f?.(x)??{}),Object.keys(s).length){w(s),T(new Set(Object.keys(s)));return}N(!0);let c=await n(a);N(!1),c&&O(c)}return(0,F.jsxDEV)(`form`,{onSubmit:L,noValidate:!0,className:`flex flex-col gap-5 min-w-0`,children:[(0,F.jsxDEV)(v.Provider,{value:e=>C[e.join(`.`)],children:(0,F.jsxDEV)(_,{items:e.fields,ctx:{bridge:E}},void 0,!1,{fileName:I,lineNumber:118,columnNumber:9},this)},void 0,!1,{fileName:I,lineNumber:117,columnNumber:7},this),c,D&&(0,F.jsxDEV)(`p`,{className:`text-sm text-danger`,children:D},void 0,!1,{fileName:I,lineNumber:121,columnNumber:21},this),(0,F.jsxDEV)(`div`,{className:`flex gap-3 pt-2 border-t border-border`,children:[(0,F.jsxDEV)(r,{type:`submit`,disabled:s||M,size:`lg`,className:`flex-1`,children:o??m(`actions.save`)},void 0,!1,{fileName:I,lineNumber:123,columnNumber:9},this),a&&(0,F.jsxDEV)(r,{type:`button`,variant:`secondary`,size:`lg`,onClick:a,className:`flex-1`,children:m(`actions.cancel`)},void 0,!1,{fileName:I,lineNumber:127,columnNumber:11},this)]},void 0,!0,{fileName:I,lineNumber:122,columnNumber:7},this)]},void 0,!0,{fileName:I,lineNumber:116,columnNumber:5},this)}var R=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/form.tsx`;function z(e,t){let n={};n.name=t?.name==null?``:String(t.name);for(let[r,i]of E(e.fields))if(!i.virtual)if(t){let e=t[r];e==null?n[r]=i.prim!==`checkbox`&&``:i.prim===`checkbox`?n[r]=e===1||e===!0||e===`1`:T(i)?n[r]=e===``?``:c(e,i.hints.multiple===!0?[]:{}):n[r]=e}else n[r]=i.prim===`checkbox`?!1:T(i)&&i.hints.multiple===!0?[]:``;for(let r of e.fields){if(!C(r)||!w(r))continue;let e=r.key;t?n[e]=t[e]??(r.multiple?[]:{}):n[e]=r.multiple?[]:{}}return n}function B(e){let t={};for(let[n,r]of Object.entries(e))r===``||r===void 0||Array.isArray(r)&&r.length===0||typeof r==`object`&&r&&!Array.isArray(r)&&Object.keys(r).length===0||(t[n]=r);return t}function V({ext:e,values:t,onChange:r,recordId:a,fieldLabel:o}){let{t:s}=i();return(0,F.jsxDEV)(`fieldset`,{className:`border border-accent/30 rounded-xl p-4 pt-2 flex flex-col min-w-0 gap-4`,children:[(0,F.jsxDEV)(`legend`,{className:`px-2 inline-flex items-center gap-1.5 text-sm font-semibold text-accent`,children:[(0,F.jsxDEV)(n,{name:e.icon,size:14,className:`shrink-0`},void 0,!1,{fileName:R,lineNumber:114,columnNumber:9},this),` `,s(e.label),(0,F.jsxDEV)(d,{ext:e,fieldLabel:o},void 0,!1,{fileName:R,lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:R,lineNumber:113,columnNumber:7},this),(0,F.jsxDEV)(_,{items:e.fields,ctx:{renderField:(n,i)=>D(i.hidden,t)?null:(0,F.jsxDEV)(u,{mode:`create`,field:i,label:i.label?s(i.label):void 0,required:D(i.required,t),value:t[n]??``,recordCtx:{library:``,shelf:e.id,recordId:a},onChange:t=>r(e.id,n,t)},void 0,!1,{fileName:R,lineNumber:100,columnNumber:9},this)}},void 0,!1,{fileName:R,lineNumber:117,columnNumber:7},this)]},void 0,!0,{fileName:R,lineNumber:112,columnNumber:5},this)}function H(e,t,n){let[r]=(0,P.useState)(()=>{let n={};for(let r of e){let e=t?._extends?.[r.id];n[r.id]={};for(let[t,i]of E(r.fields)){let a=e?.[t];a==null?n[r.id][t]=i.prim===`checkbox`?!1:T(i)&&i.hints.multiple===!0?[]:``:i.prim===`checkbox`?n[r.id][t]=a===1||a===!0||a===`1`:T(i)?n[r.id][t]=a===``?``:c(a,i.hints.multiple===!0?[]:{}):n[r.id][t]=a}}return n}),[i,a]=(0,P.useState)(r),o=(0,P.useMemo)(()=>e.filter(e=>O(e.showWhen,n)),[e,n]);function s(e,t,n){a(r=>({...r,[e]:{...r[e],[t]:n}}))}function l(e){let t={};for(let n of o){let a=i[n.id]??{};if(e){let e=r[n.id]??{},i=Object.fromEntries(Object.entries(a).filter(([t,n])=>n!==e[t]));Object.keys(i).length>0&&(t[`_extend_${n.id}`]=i)}else{let e=Object.fromEntries(Object.entries(a).filter(([,e])=>e!==``&&e!==!1));t[`_extend_${n.id}`]=e}}return t}return{extValues:i,setExtValue:s,activeExts:o,buildExtendPatch:l}}function U({shelf:e,record:t,defaults:n,hiddenFields:r,onSuccess:a,onCancel:o}){let{t:s}=i(),c=p(s),l=!!t,u=(0,P.useMemo)(()=>A(e.fields),[e]),[d,m]=(0,P.useState)([]),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)(()=>z(e,t)),y=(0,P.useRef)(null),{extValues:x,setExtValue:S,activeExts:C,buildExtendPatch:w}=H((0,P.useMemo)(()=>f().filter(t=>t.attachTo.some(t=>t.library===e.library&&(!t.shelf||t.shelf===e.shelf))),[e]),t,_);function T(e){return l||String(e.name??``).trim()?{}:{name:s(`validation.required`)}}async function E(n){m([]),g(!0);let r={...n,...w()},i=String(t?.id??``),o=l?await M(e.library,e.shelf,i,r):await N(e.library,e.shelf,r);if(g(!1),o.ok){a(o.row);return}let s=o.issues??[],d={},f=[];for(let e of s)e.field&&u[e.field]?d[e.field]=c(e.code,e.params):f.push(e);let p=b(s,c);(Object.keys(d).length||Object.keys(p).length)&&(y.current?.setErrors(e=>({...e,...d,...p})),y.current?.setTouched(e=>new Set([...e,...Object.keys(d)]))),m(f)}return(0,F.jsxDEV)(`div`,{children:(0,F.jsxDEV)(L,{shelf:e,record:t,onSubmit:E,onCancel:o,submitLabel:s(h?`common.saving`:l?`actions.save`:`actions.create`),busy:h,hiddenFields:r,onValuesChange:v,errorSink:e=>{y.current=e},extraValidate:T,children:[C.map(e=>(0,F.jsxDEV)(V,{ext:e,values:x[e.id]??{},onChange:S,recordId:t?String(t.id):null,fieldLabel:e=>u[e]?.label?s(u[e].label):e},e.id,!1,{fileName:R,lineNumber:318,columnNumber:11},this)),d.length>0&&(0,F.jsxDEV)(`div`,{className:`bg-danger/10 border border-danger/30 rounded-xl p-3.5 text-sm`,children:[(0,F.jsxDEV)(`p`,{className:`font-semibold text-danger mb-2`,children:s(`form.serverRejected`)},void 0,!1,{fileName:R,lineNumber:330,columnNumber:13},this),(0,F.jsxDEV)(`ul`,{className:`space-y-1 text-text/80`,children:d.map((e,t)=>{let n=u[e.field],r=n?s(n.label):e.field,i=e.code===`pattern`&&e.params?.messageKey?s(String(e.params.messageKey)):s(`validation.${e.code}`,e.params);return(0,F.jsxDEV)(`li`,{className:`flex gap-1.5`,children:[r&&(0,F.jsxDEV)(`span`,{className:`text-muted font-medium`,children:[r,`:`]},void 0,!0,{fileName:R,lineNumber:341,columnNumber:31},this),i]},t,!0,{fileName:R,lineNumber:340,columnNumber:19},this)})},void 0,!1,{fileName:R,lineNumber:331,columnNumber:13},this)]},void 0,!0,{fileName:R,lineNumber:329,columnNumber:11},this)]},`${e.library}/${e.shelf}/${t?t.id:`new`}`,!0,{fileName:R,lineNumber:301,columnNumber:7},this)},void 0,!1,{fileName:R,lineNumber:293,columnNumber:5},this)}var W=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/app/record/NewRecordView.tsx`;function G(){let{t:e}=i(),{library:t,type:n}=o(),s=a(),c=m().flatMap(e=>e.shelves).find(e=>e.library===t&&e.shelf===n);return!c||c.standalone===!1?(0,F.jsxDEV)(`div`,{className:`p-6 text-muted`,children:e(`common.notFound`)},void 0,!1,{fileName:W,lineNumber:20,columnNumber:44},this):(0,F.jsxDEV)(`div`,{className:`flex flex-col`,children:[(0,F.jsxDEV)(y,{children:(0,F.jsxDEV)(r,{variant:`ghost`,size:`sm`,className:`px-2`,onClick:()=>s(`/${t}/${n}`),children:[(0,F.jsxDEV)(x,{size:18},void 0,!1,{fileName:W,lineNumber:26,columnNumber:11},this),(0,F.jsxDEV)(`span`,{className:`text-sm`,children:e(c.label)},void 0,!1,{fileName:W,lineNumber:27,columnNumber:11},this)]},void 0,!0,{fileName:W,lineNumber:25,columnNumber:9},this)},void 0,!1,{fileName:W,lineNumber:24,columnNumber:7},this),(0,F.jsxDEV)(`div`,{className:`flex-1 min-w-0`,children:(0,F.jsxDEV)(`div`,{className:`max-w-2xl mx-auto px-6 py-6`,children:(0,F.jsxDEV)(g,{library:c.library,shelf:c.shelf,children:(0,F.jsxDEV)(U,{shelf:c,onSuccess:e=>{l(`${c.library}/${c.shelf}`),e?.id?s(`/${t}/${n}/${e.id}`):s(`/${t}/${n}`)},onCancel:()=>s(`/${t}/${n}`)},void 0,!1,{fileName:W,lineNumber:33,columnNumber:13},this)},void 0,!1,{fileName:W,lineNumber:32,columnNumber:11},this)},void 0,!1,{fileName:W,lineNumber:31,columnNumber:9},this)},void 0,!1,{fileName:W,lineNumber:30,columnNumber:7},this)]},void 0,!0,{fileName:W,lineNumber:23,columnNumber:5},this)}export{G as NewRecordView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as e}from"./button-Dlm2GmQs.js";import{l as t}from"./chunk-KS7C4IRE-B1_Zk64s.js";import{t as n}from"./SettingsForm-
|
|
1
|
+
import{w as e}from"./button-Dlm2GmQs.js";import{l as t}from"./chunk-KS7C4IRE-B1_Zk64s.js";import{t as n}from"./SettingsForm-JjEXZ-t9.js";import{t as r}from"./jsx-dev-runtime-CSfA-jUb.js";import{g as i}from"./Toolbar-BwCsWgeh.js";import{t as a}from"./PageBody-CvuReTKD.js";var o=r(),s=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web/app/PluginSettingsPage.tsx`;function c(){let{pluginId:r}=t(),{t:c}=e(),l=i().find(e=>e.id===r);if(!l||!l.settings||l.settings.fields.length===0)return(0,o.jsxDEV)(a,{children:(0,o.jsxDEV)(`p`,{className:`text-muted`,children:c(`common.notFound`)},void 0,!1,{fileName:s,lineNumber:17,columnNumber:9},this)},void 0,!1,{fileName:s,lineNumber:16,columnNumber:7},this);async function u(){let e=await fetch(`/api/plugins/${r}/settings`);return e.ok?e.json():{}}async function d(e){let t=await fetch(`/api/plugins/${r}/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});return t.ok?{ok:!0,row:(await t.json()).row??{}}:t.status===422?{ok:!1,status:422,issues:(await t.json()).issues}:{ok:!1,status:t.status}}return(0,o.jsxDEV)(n,{fields:l.settings.fields,recordCtx:{library:``,shelf:r??``,recordId:`settings`},load:u,save:d,title:c(`${r}.plugin.label`,{defaultValue:r??``}),backTo:`/settings`,backLabel:c(`settings.title`)},void 0,!1,{fileName:s,lineNumber:45,columnNumber:5},this)}export{c as PluginSettingsPage};
|