@gct-paas/core-web 0.1.6-dev.12 → 0.1.6-dev.14
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/ColorPicker-DHZwCGHF.js +2 -0
- package/dist/{JsBarcode-DY53cVJ6.js → JsBarcode-BfBOW5vm.js} +2 -1
- package/dist/_plugin-vue_export-helper-B3iGtQVD.js +2 -0
- package/dist/{chunk-DPOkwzLC.js → chunk-CeX__g8u.js} +1 -0
- package/dist/{cropper-DK_hFgpO.js → cropper-DszZbwY0.js} +2 -1
- package/dist/{de_DE-B3f8kAv-.js → de_DE-Cdk5SWSW.js} +2 -1
- package/dist/{defineProperty-Co6UJKQ3.js → defineProperty-DDBtkzz5.js} +1 -0
- package/dist/{diagram-config-item-C5Ha2XJq.js → diagram-config-item-Cbh_tiOl.js} +2 -1
- package/dist/{diagram-config-item-reverse-ChoxnW-Z.js → diagram-config-item-reverse-DWH-lRVD.js} +2 -1
- package/dist/{diagram-config-item-virtual-Cbmggfwt.js → diagram-config-item-virtual-qW8Ufx3F.js} +2 -1
- package/dist/{en_US-BSG3Kz6v.js → en_US-B0wIY6a-.js} +2 -1
- package/dist/{es_ES-BGP8IOmQ.js → es_ES-CFTf_KZi.js} +2 -1
- package/dist/{fr_FR-Y-6CzjUq.js → fr_FR-CSfCfW5D.js} +2 -1
- package/dist/{hooks-yX21uJ6d.js → hooks-DXW0t29_.js} +2 -1
- package/dist/{icon-next-picker-DYiHqnNR.js → icon-next-picker-DP56qrkn.js} +1 -0
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-CDlH1v8M.js → ja_JP-DXSy7dHj.js} +2 -1
- package/dist/loader.esm.min.js +2 -1
- package/dist/{monaco-editor-CQJ9TMzD.js → monaco-editor-Bj7q97sW.js} +2 -1
- package/dist/{objectSpread2-DARadIQB.js → objectSpread2-C8eu0aH8.js} +1 -0
- package/dist/{overlayscrollbars-vue-Df-3wShc.js → overlayscrollbars-vue-DiDUuAUa.js} +1 -0
- package/dist/paas-bpmn-runtime-B0yNr5W2.js +2 -0
- package/dist/{pt_PT-N-iIoE2_.js → pt_PT-CnUcrrHa.js} +2 -1
- package/dist/{relationship-diagram-config-DstwwXCO.js → relationship-diagram-config-DJB7Hcrl.js} +2 -1
- package/dist/{rich-editor-DVOriJH0.js → rich-editor-Zg0Nr7zv.js} +2 -1
- package/dist/{ru_RU--ESLRHrj.js → ru_RU-BziGAVj5.js} +2 -1
- package/dist/template-Bq8pI82J.js +2 -0
- package/dist/{tr_TR-BOIykdZO.js → tr_TR-y8uLkPdL.js} +2 -1
- package/dist/{useMonacoEditor-DqSQTg7b.js → useMonacoEditor-2RvV9zPk.js} +2 -1
- package/dist/{vi_VN-CmVoM2Rw.js → vi_VN-CXvZpo3W.js} +2 -1
- package/dist/{zh_CN-DhsO5Qwx.js → zh_CN-CO133RFG.js} +2 -1
- package/dist/{zh_TW-DWdp2kVo.js → zh_TW-DaOg9meQ.js} +2 -1
- package/es/components/BpmnRuntime/index.d.ts +5 -2
- package/es/components/BpmnRuntime/index.mjs +5 -1
- package/es/components/field-upload/src/FieldUpload.vue_vue_type_script_setup_true_name_FieldUpload_lang.mjs +1 -0
- package/es/components/field-upload/src/components/base-upload.vue.mjs +2 -2
- package/es/components/field-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +2 -2
- package/es/components/field-upload/src/components/{base-upload.vue_vue_type_style_index_0_scoped_65872e0a_lang.css → base-upload.vue_vue_type_style_index_0_scoped_6f57e635_lang.css} +18 -18
- package/es/components/field-upload/src/components/file-list.vue_vue_type_script_setup_true_name_fileList_lang.mjs +1 -0
- package/es/components/field-upload/src/types/index.d.ts +1 -4
- package/es/components/field-upload/src/types/index.mjs +2 -6
- package/es/components/image-upload/src/components/base-upload.vue.mjs +2 -2
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +2 -2
- package/es/components/image-upload/src/components/{base-upload.vue_vue_type_style_index_0_scoped_2a928323_lang.css → base-upload.vue_vue_type_style_index_0_scoped_9b34005c_lang.css} +17 -17
- package/es/components/image-upload/src/types/index.d.ts +1 -4
- package/es/components/image-upload/src/types/index.mjs +1 -8
- package/es/components/index.mjs +0 -1
- package/es/components/monaco-editor/monaco-editor.d.ts +22 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useKeyParser.d.ts +16 -0
- package/es/hooks/useKeyParser.mjs +79 -0
- package/es/index.mjs +3 -2
- package/es/modules/gct-form/interface/i-form/i-form-item-basic.d.ts +8 -0
- package/package.json +9 -9
- package/dist/ColorPicker-BDeYRWA2.js +0 -1
- package/dist/_plugin-vue_export-helper-CGzGcWFX.js +0 -1
- package/dist/template-Dt6RJclf.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
2
|
+
import{i as e,n as t,r as n,t as r}from"./chunk-CeX__g8u.js";import{t as o}from"./defineProperty-DDBtkzz5.js";import{Modal as i,OverlayContainer as a,OverlayPopoverContainer as s,ProjectName as c,t as u,useNamespace as l}from"@gct-paas/core";import*as f from"vue";import{Fragment as d,computed as h,createVNode as g,defineComponent as p,getCurrentInstance as v,getCurrentScope as m,h as y,hasInjectionContext as b,inject as w,isRef as O,isVNode as S,nextTick as T,onBeforeMount as D,onBeforeUnmount as I,onMounted as E,onScopeDispose as x,onUnmounted as C,provide as P,reactive as j,ref as R,resolveComponent as A,shallowReadonly as N,shallowRef as k,toRaw as M,toRef as L,toRefs as _,toValue as F,unref as H,watch as W,watchEffect as U}from"vue";import{isFunction as $,isNumber as z,isString as B,merge as V}from"lodash-es";import{ConfigProvider as q,message as Y}from"ant-design-vue";function X(e,t){return!!m()&&(x(e,t),!0)}var G=/* @__PURE__ */new WeakMap,K="undefined"!=typeof window&&"undefined"!=typeof document,Z=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),e=>null!=e),J=Object.prototype.toString,Q=()=>{},ee=/* @__PURE__ */te();function te(){var e,t,n;return K&&!!(null===(e=window)||void 0===e||null===(e=e.navigator)||void 0===e?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null===(t=window)||void 0===t||null===(t=t.navigator)||void 0===t?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null===(n=window)||void 0===n?void 0:n.navigator.userAgent))}function ne(e,t){return function(...n){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(o)})}}var re=e=>e();function oe(e,t={}){let n,r,o=Q;const i=e=>{clearTimeout(e),o(),o=Q};let a;return s=>{const c=F(e),u=F(t.maxWait);return n&&i(n),c<=0||void 0!==u&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(s())):new Promise((e,l)=>{o=t.rejectOnCancel?l:e,a=s,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,e(a())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,e(s())},c)})}}function ie(e){return e.endsWith("rem")?16*Number.parseFloat(e):Number.parseFloat(e)}function ae(e){return Array.isArray(e)?e:[e]}function se(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var ce=/\B([A-Z])/g,ue=(se(e=>e.replace(ce,"-$1").toLowerCase()),/-(\w)/g);function le(e){return e||v()}function fe(e,t=200,n={}){return ne(oe(t,n),e)}function de(e,t=!0,n){le(n)?E(e,n):t?e():T(e)}function he(e,t){le(t)&&C(e,t)}function ge(e,t,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n,i=k(!1);let a;function s(){a&&(clearTimeout(a),a=void 0)}function c(){i.value=!1,s()}function u(...n){o&&e(),s(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=void 0,e(...n)},F(t))}return r&&(i.value=!0,K&&u()),X(c),{isPending:N(i),start:u,stop:c}}function pe(e,t,n={}){const{debounce:r=0,maxWait:o,...i}=n;return function(e,t,n={}){const{eventFilter:r=re,...o}=n;return W(e,ne(r,t),o)}(e,t,{...i,eventFilter:oe(r,{maxWait:o})})}se(e=>e.replace(ue,(e,t)=>t?t.toUpperCase():""));var ve=K?window:void 0,me=K?window.document:void 0;function ye(e){var t;const n=F(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}function be(...e){const t=h(()=>{const t=ae(F(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,n,r],o,i)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==n?void 0:n.length))return;const a=(s=r,"[object Object]"===J.call(s)?{...r}:r);var s;const c=e.flatMap(e=>t.flatMap(t=>n.map(n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,a))));i(()=>{c.forEach(e=>e())})},r={flush:"post"},W(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>ye(e)))&&void 0!==n?n:[ve].filter(e=>null!=e),ae(F(t.value?e[1]:e[0])),ae(H(t.value?e[2]:e[1])),F(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}K&&window.navigator,K&&window.location;var we=!1;function Oe(e,t,n={}){const{window:r=ve,ignore:o=[],capture:i=!0,detectIframe:a=!1,controls:s=!1}=n;if(!r)return s?{stop:Q,cancel:Q,trigger:Q}:Q;if(ee&&!we){we=!0;const e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener("click",Q,e)),r.document.documentElement.addEventListener("click",Q,e)}let c=!0;const u=e=>F(o).some(t=>{if("string"==typeof t)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{const n=ye(t);return n&&(e.target===n||e.composedPath().includes(n))}}),l=n=>{const r=ye(e);null!=n.target&&(r instanceof Element||!function(e){const t=F(e);return t&&16===t.$.subTree.shapeFlag}(e)||!function(e,t){const n=F(e),r=n.$.subTree&&n.$.subTree.children;return!(null==r||!Array.isArray(r))&&r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}(e,n))&&r&&r!==n.target&&!n.composedPath().includes(r)&&("detail"in n&&0===n.detail&&(c=!u(n)),c?t(n):c=!0)};let f=!1;const d=[be(r,"click",e=>{f||(f=!0,setTimeout(()=>{f=!1},0),l(e))},{passive:!0,capture:i}),be(r,"pointerdown",t=>{const n=ye(e);c=!u(t)&&!(!n||t.composedPath().includes(n))},{passive:!0}),a&&be(r,"blur",n=>{setTimeout(()=>{var o;const i=ye(e);"IFRAME"!==(null===(o=r.document.activeElement)||void 0===o?void 0:o.tagName)||(null==i?void 0:i.contains(r.document.activeElement))||t(n)},0)},{passive:!0})].filter(Boolean),h=()=>d.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,l(e),c=!1}}:h}function Se(e){const t=function(){const e=k(!1),t=v();return t&&E(()=>{e.value=!0},t),e}();return h(()=>(t.value,Boolean(e())))}function Te(e,t,n={}){const{window:r=ve,...o}=n;let i;const a=/* @__PURE__ */Se(()=>r&&"MutationObserver"in r),s=()=>{i&&(i.disconnect(),i=void 0)},c=W(h(()=>{const t=ae(F(e)).map(ye).filter(Z);return new Set(t)}),e=>{s(),a.value&&e.size&&(i=new MutationObserver(t),e.forEach(e=>i.observe(e,o)))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return X(u),{isSupported:a,stop:u,takeRecords:()=>null==i?void 0:i.takeRecords()}}var De=Symbol("vueuse-ssr-width");function Ie(){const e=b()?((...e)=>{var t;const n=e[0],r=null===(t=v())||void 0===t?void 0:t.proxy,o=null!=r?r:m();if(null==o&&!b())throw new Error("injectLocal must be called in setup");return o&&G.has(o)&&n in G.get(o)?G.get(o)[n]:w(...e)})(De,null):null;return"number"==typeof e?e:void 0}function Ee(e,t,n={}){const{window:r=ve,...o}=n;let i;const a=/* @__PURE__ */Se(()=>r&&"ResizeObserver"in r),s=()=>{i&&(i.disconnect(),i=void 0)},c=W(h(()=>{const t=F(e);return Array.isArray(t)?t.map(e=>ye(e)):[ye(t)]}),e=>{if(s(),a.value&&r){i=new ResizeObserver(t);for(const t of e)t&&i.observe(t,o)}},{immediate:!0,flush:"post"}),u=()=>{s(),c()};return X(u),{isSupported:a,stop:u}}function xe(e,t,n={}){const{root:r,rootMargin:o,threshold:i=0,window:a=ve,immediate:s=!0}=n,c=/* @__PURE__ */Se(()=>a&&"IntersectionObserver"in a),u=h(()=>ae(F(e)).map(ye).filter(Z));let l=Q;const f=k(s),d=c.value?W(()=>[u.value,ye(r),F(o),f.value],([e,n,r])=>{if(l(),!f.value)return;if(!e.length)return;const o=new IntersectionObserver(t,{root:ye(n),rootMargin:r,threshold:i});e.forEach(e=>e&&o.observe(e)),l=()=>{o.disconnect(),l=Q}},{immediate:s,flush:"post"}):Q,g=()=>{l(),d(),f.value=!1};return X(g),{isSupported:c,isActive:f,pause(){l(),f.value=!1},resume(){f.value=!0},stop:g}}function Ce(e,t={}){const{window:n=ve,scrollTarget:r,threshold:o=0,rootMargin:i,once:a=!1,initialValue:s=!1}=t,c=k(s),{stop:u}=xe(e,e=>{let t=c.value,n=0;for(const r of e)r.time>=n&&(n=r.time,t=r.isIntersecting);c.value=t,a&&W(c,()=>{u()},{once:!0})},{root:r,window:n,threshold:o,rootMargin:i});return c}var Pe=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function je(e,t={}){const{document:n=me,autoExit:r=!1}=t,o=h(()=>{var t;return null!==(t=ye(e))&&void 0!==t?t:null==n?void 0:n.documentElement}),i=k(!1),a=h(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(e=>n&&e in n||o.value&&e in o.value)),s=h(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(e=>n&&e in n||o.value&&e in o.value)),c=h(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(e=>n&&e in n||o.value&&e in o.value)),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(e=>n&&e in n),l=/* @__PURE__ */Se(()=>o.value&&n&&void 0!==a.value&&void 0!==s.value&&void 0!==c.value),f=()=>{if(c.value){if(n&&null!=n[c.value])return n[c.value];{const e=o.value;if(null!=(null==e?void 0:e[c.value]))return Boolean(e[c.value])}}return!1};async function d(){if(l.value&&i.value){if(s.value)if(null!=(null==n?void 0:n[s.value]))await n[s.value]();else{const e=o.value;null!=(null==e?void 0:e[s.value])&&await e[s.value]()}i.value=!1}}async function g(){if(!l.value||i.value)return;f()&&await d();const e=o.value;a.value&&null!=(null==e?void 0:e[a.value])&&(await e[a.value](),i.value=!0)}const p=()=>{const e=f();(!e||e&&u&&(null==n?void 0:n[u])===o.value)&&(i.value=e)},v={capture:!1,passive:!0};return be(n,Pe,p,v),be(()=>ye(o),Pe,p,v),de(p,!1),r&&X(d),{isSupported:l,isFullscreen:i,enter:g,exit:d,toggle:async function(){await(i.value?d():g())}}}function Re(e,t,n={}){var r;const{direction:o="bottom",interval:i=100,canLoadMore:a=()=>!0}=n,s=j(function(e,t={}){const{throttle:n=0,idle:r=200,onStop:o=Q,onScroll:i=Q,offset:a={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:u="auto",window:l=ve,onError:f=e=>{console.error(e)}}=t,d="boolean"==typeof s?{mutation:s}:s,g=k(0),p=k(0),v=h({get:()=>g.value,set(e){y(e,void 0)}}),m=h({get:()=>p.value,set(e){y(void 0,e)}});function y(t,n){var r,o,i,a;if(!l)return;const s=F(e);if(!s)return;null===(r=s instanceof Document?l.document.body:s)||void 0===r||r.scrollTo({top:null!==(o=F(n))&&void 0!==o?o:m.value,left:null!==(i=F(t))&&void 0!==i?i:v.value,behavior:F(u)});const c=(null==s||null===(a=s.document)||void 0===a?void 0:a.documentElement)||(null==s?void 0:s.documentElement)||s;null!=v&&(g.value=c.scrollLeft),null!=m&&(p.value=c.scrollTop)}const b=k(!1),w=j({left:!0,right:!1,top:!0,bottom:!1}),S=j({left:!1,right:!1,top:!1,bottom:!1}),T=e=>{b.value&&(b.value=!1,S.left=!1,S.right=!1,S.top=!1,S.bottom=!1,o(e))},D=fe(T,n+r),I=e=>{var t;if(!l)return;const n=(null==e||null===(t=e.document)||void 0===t?void 0:t.documentElement)||(null==e?void 0:e.documentElement)||ye(e),{display:r,flexDirection:o,direction:i}=l.getComputedStyle(n),s="rtl"===i?-1:1,c=n.scrollLeft;S.left=c<g.value,S.right=c>g.value;const u=Math.abs(c*s)<=(a.left||0),f=Math.abs(c*s)+n.clientWidth>=n.scrollWidth-(a.right||0)-1;"flex"===r&&"row-reverse"===o?(w.left=f,w.right=u):(w.left=u,w.right=f),g.value=c;let d=n.scrollTop;e!==l.document||d||(d=l.document.body.scrollTop),S.top=d<p.value,S.bottom=d>p.value;const h=Math.abs(d)<=(a.top||0),v=Math.abs(d)+n.clientHeight>=n.scrollHeight-(a.bottom||0)-1;"flex"===r&&"column-reverse"===o?(w.top=v,w.bottom=h):(w.top=h,w.bottom=v),p.value=d},E=e=>{var t;l&&(I(null!==(t=e.target.documentElement)&&void 0!==t?t:e.target),b.value=!0,D(e),i(e))};return be(e,"scroll",n?function(e,t=200,n=!1,r=!0,o=!1){return ne(function(...e){let t,n,r,o,i,a,s=0,c=!0,u=Q;O(e[0])||"object"!=typeof e[0]?[r,o=!0,i=!0,a=!1]=e:({delay:r,trailing:o=!0,leading:i=!0,rejectOnCancel:a=!1}=e[0]);const l=()=>{t&&(clearTimeout(t),t=void 0,u(),u=Q)};return e=>{const f=F(r),d=Date.now()-s,h=()=>n=e();return l(),f<=0?(s=Date.now(),h()):(d>f?(s=Date.now(),!i&&c||h()):o&&(n=new Promise((e,n)=>{u=a?n:e,t=setTimeout(()=>{s=Date.now(),c=!0,e(h()),l()},Math.max(0,f-d))})),i||t||(t=setTimeout(()=>c=!0,f)),c=!1,n)}}(t,n,r,o),e)}(E,n,!0,!1):E,c),de(()=>{try{const t=F(e);if(!t)return;I(t)}catch(t){f(t)}}),(null==d?void 0:d.mutation)&&null!=e&&e!==l&&e!==document&&Te(e,()=>{const t=F(e);t&&I(t)},{attributes:!0,childList:!0,subtree:!0}),be(e,"scrollend",T,c),{x:v,y:m,isScrolling:b,arrivedState:w,directions:S,measure(){const t=F(e);l&&t&&I(t)}}}(e,{...n,offset:{[o]:null!==(r=n.distance)&&void 0!==r?r:0,...n.offset}})),c=R(),u=h(()=>!!c.value),l=h(()=>{return t=F(e),"undefined"!=typeof Window&&t instanceof Window?t.document.documentElement:"undefined"!=typeof Document&&t instanceof Document?t.documentElement:t;var t}),f=Ce(l),d=h(()=>!!l.value&&a(l.value));function g(){if(s.measure(),!l.value||!f.value||!d.value||c.value)return;const{scrollHeight:e,clientHeight:n,scrollWidth:r,clientWidth:a}=l.value,u="bottom"===o||"top"===o?e<=n:r<=a;(s.arrivedState[o]||u)&&(c.value=Promise.all([t(s),new Promise(e=>setTimeout(e,i))]).finally(()=>{c.value=null,T(()=>g())}))}return he(W(()=>[s.arrivedState[o],f.value,d.value],g,{immediate:!0,flush:"post"})),{isLoading:u,reset(){T(()=>g())}}}function Ae(e,t){const{containerStyle:n,wrapperProps:r,scrollTo:o,calculateRange:i,currentList:a,containerRef:s}="itemHeight"in t?function(e,t){const n=Ne(t),{state:r,source:o,currentList:i,size:a,containerRef:s}=n,{itemHeight:c,overscan:u=5}=e,l=ke(r,o,c),f=Le("vertical",u,Me(o,c),l,n),d=_e(c,o),g=h(()=>d(r.value.start)),p=He(c,o);return Fe(a,t,s,f),{calculateRange:f,scrollTo:Ue("vertical",f,d,s),containerStyle:{overflowY:"auto"},wrapperProps:h(()=>({style:{width:"100%",height:p.value-g.value+"px",marginTop:`${g.value}px`}})),currentList:i,containerRef:s}}(t,e):function(e,t){const n=Ne(t),{state:r,source:o,currentList:i,size:a,containerRef:s}=n,{itemWidth:c,overscan:u=5}=e,l=ke(r,o,c),f=Le("horizontal",u,Me(o,c),l,n),d=_e(c,o),g=h(()=>d(r.value.start)),p=He(c,o);return Fe(a,t,s,f),{scrollTo:Ue("horizontal",f,d,s),calculateRange:f,wrapperProps:h(()=>({style:{height:"100%",width:p.value-g.value+"px",marginLeft:`${g.value}px`,display:"flex"}})),containerStyle:{overflowX:"auto"},currentList:i,containerRef:s}}(t,e);return{list:a,scrollTo:o,containerProps:{ref:s,onScroll:()=>{i()},style:n},wrapperProps:r}}function Ne(e){const t=k(null),n=function(e,t={width:0,height:0},n={}){const{window:r=ve,box:o="content-box"}=n,i=h(()=>{var t;return null===(t=ye(e))||void 0===t||null===(t=t.namespaceURI)||void 0===t?void 0:t.includes("svg")}),a=k(t.width),s=k(t.height),{stop:c}=Ee(e,([t])=>{const n="border-box"===o?t.borderBoxSize:"content-box"===o?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&i.value){const t=ye(e);if(t){const e=t.getBoundingClientRect();a.value=e.width,s.value=e.height}}else if(n){const e=ae(n);a.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else a.value=t.contentRect.width,s.value=t.contentRect.height},n);de(()=>{const n=ye(e);n&&(a.value="offsetWidth"in n?n.offsetWidth:t.width,s.value="offsetHeight"in n?n.offsetHeight:t.height)});const u=W(()=>ye(e),e=>{a.value=e?t.width:0,s.value=e?t.height:0});return{width:a,height:s,stop:function(){c(),u()}}}(t),r=R([]),o=k(e);return{state:R({start:0,end:10}),source:o,currentList:r,size:n,containerRef:t}}function ke(e,t,n){return r=>{if("number"==typeof n)return Math.ceil(r/n);const{start:o=0}=e.value;let i=0,a=0;for(let e=o;e<t.value.length&&(i+=n(e),a=e,!(i>r));e++);return a-o}}function Me(e,t){return n=>{if("number"==typeof t)return Math.floor(n/t)+1;let r=0,o=0;for(let i=0;i<e.value.length;i++)if(r+=t(i),r>=n){o=i;break}return o+1}}function Le(e,t,n,r,{containerRef:o,state:i,currentList:a,source:s}){return()=>{const c=o.value;if(c){const o=n("vertical"===e?c.scrollTop:c.scrollLeft),u=r("vertical"===e?c.clientHeight:c.clientWidth),l=o-t,f=o+u+t;i.value={start:l<0?0:l,end:f>s.value.length?s.value.length:f},a.value=s.value.slice(i.value.start,i.value.end).map((e,t)=>({data:e,index:t+i.value.start}))}}}function _e(e,t){return n=>"number"==typeof e?n*e:t.value.slice(0,n).reduce((t,n,r)=>t+e(r),0)}function Fe(e,t,n,r){W([e.width,e.height,()=>F(t),n],()=>{r()})}function He(e,t){return h(()=>"number"==typeof e?t.value.length*e:t.value.reduce((t,n,r)=>t+e(r),0))}Number.POSITIVE_INFINITY;var We={horizontal:"scrollLeft",vertical:"scrollTop"};function Ue(e,t,n,r){return o=>{r.value&&(r.value[We[e]]=n(o),t())}}function $e(e={}){const{window:t=ve,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:o=!0,includeScrollbar:i=!0,type:a="inner"}=e,s=k(n),c=k(r),u=()=>{if(t)if("outer"===a)s.value=t.outerWidth,c.value=t.outerHeight;else if("visual"===a&&t.visualViewport){const{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else i?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};u(),de(u);const l={passive:!0};return be("resize",u,l),t&&"visual"===a&&t.visualViewport&&be(t.visualViewport,"resize",u,l),o&&W(function(e,t={}){const{window:n=ve,ssrWidth:r=/* @__PURE__ */Ie()}=t,o=/* @__PURE__ */Se(()=>n&&"matchMedia"in n&&"function"==typeof n.matchMedia),i=k("number"==typeof r),a=k(),s=k(!1);return U(()=>{if(i.value)return i.value=!o.value,void(s.value=F(e).split(",").some(e=>{const t=e.includes("not all"),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),o=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let i=Boolean(n||o);return n&&i&&(i=r>=ie(n[1])),o&&i&&(i=r<=ie(o[1])),t?!i:i}));o.value&&(a.value=n.matchMedia(F(e)),s.value=a.value.matches)}),be(a,"change",e=>{s.value=e.matches},{passive:!0}),h(()=>s.value)}("(orientation: portrait)"),()=>u()),{width:s,height:c}}var ze=class{info(e,t){return new Promise(n=>{Y.info(e,null==t?void 0:t.duration,n)})}success(e,t){return new Promise(n=>{Y.success(e,null==t?void 0:t.duration,n)})}warning(e,t){return new Promise(n=>{Y.warning(e,null==t?void 0:t.duration,n)})}error(e,t){return new Promise(n=>{Y.error(e,null==t?void 0:t.duration,n)})}};function Be(e,t,n){const{minValue:r,maxValue:o}=n.specificConfig||{};return"number"==typeof r&&"number"==typeof o&&r>o?Promise.reject(/* @__PURE__ */new Error("MinValue cannot be greater than MaxValue")):Promise.resolve()}function Ve(e,t,n,r){if(!t)return Promise.resolve();const{minValue:o,maxValue:i}=n.specificConfig||{},a=i??(null==r?void 0:r.end),s=t.length;return"number"==typeof o&&s<o?Promise.reject(`${u("sys.model.minLengthDefault")}${o}`):"number"==typeof a&&s>a?Promise.reject(`${u("sys.model.maxLengthDefault")}${a}`):Promise.resolve()}function qe(e,t,n,r){if(null==t||""===t)return Promise.resolve();const{minValue:o,maxValue:i}=n.specificConfig||{},a=i??(null==r?void 0:r.end),s=Number(t);return"number"==typeof o&&s<o?Promise.reject(`${u("sys.model.minNumDefault")}${o}`):"number"==typeof a&&s>a?Promise.reject(`${u("sys.model.maxNumDefault")}${a}`):Promise.resolve()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach(function(t){Xe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach(function(t){Ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function et(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.apply(n,[].concat(o,r))}}}function tt(e){return{}.toString.call(e).includes("Object")}function nt(e){return"function"==typeof e}var rt=et(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),ot=function(e,t){return tt(t)||rt("changeType"),Object.keys(t).some(function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r})&&rt("changeField"),t},it=function(e){nt(e)||rt("selectorType")},at=function(e){nt(e)||tt(e)||rt("handlerType"),tt(e)&&Object.values(e).some(function(e){return!nt(e)})&&rt("handlersType")},st=function(e){var t;e||rt("initialIsRequired"),tt(e)||rt("initialType"),t=e,Object.keys(t).length||rt("initialContent")};function ct(e,t){return nt(t)?t(e.current):t}function ut(e,t){return e.current=Qe(Qe({},e.current),t),t}function lt(e,t,n){return nt(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var ft,dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};st(e),at(t);var n={current:e},r=et(lt)(n,t),o=et(ut)(n),i=et(ot)(e),a=et(ct)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return it(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,o,i,a)(e)}]},ht={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},gt=(ft=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.length>=ft.length?ft.apply(this,r):function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return e.apply(t,[].concat(r,o))}})(ht),pt=function(e){var t;return e||gt("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||gt("configType"),e.urls?(console.warn(ht.deprecation),{paths:{vs:e.urls.monacoBase}}):e};function vt(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],vt(e[n],t[n]))}),Ke(Ke({},e),t)}var mt={type:"cancelation",msg:"operation is manually canceled"};function yt(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(mt):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var bt,wt=["monaco"],Ot=function(e){if(Array.isArray(e))return e}(bt=dt({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,c=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw r}}return a}}(bt)||function(e){if(e){if("string"==typeof e)return Ye(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ye(e,2):void 0}}(bt)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),St=Ot[0],Tt=Ot[1];function Dt(e){return document.body.appendChild(e)}function It(e){var t,n,r=St(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(r.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return o.onload=function(){return e()},o.onerror=r.reject,o}function Et(){var e=St(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m||t;xt(n),e.resolve(n)},function(t){e.reject(t)})}function xt(e){St().monaco||Tt({monaco:e})}var Ct=new Promise(function(e,t){return Tt({resolve:e,reject:t})}),Pt={config:function(e){var t=pt(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,wt);Tt(function(e){return{config:vt(e.config,r),monaco:n}})},init:function(){var e=St(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(Tt({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),yt(Ct);if(window.monaco&&window.monaco.editor)return xt(window.monaco),e.resolve(window.monaco),yt(Ct);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(Dt,It)(Et)}return yt(Ct)},__getMonacoInstance:function(){return St(function(e){return e.monaco})}},jt=new class{constructor(){o(this,"_monacoInstance",null),o(this,"_loadingPromise",null),this._configureLoader()}_configureLoader(){Pt.config({paths:{vs:location.origin+"/extras/monaco-editor/0.55.1/min/vs"}})}async loadMonaco(){if(this._monacoInstance)return this._monacoInstance;if(this._loadingPromise)return this._loadingPromise;this._loadingPromise=Pt.init();try{return this._monacoInstance=await this._loadingPromise,console.info("✓ Monaco Editor loaded successfully"),this._monacoInstance}catch(e){throw console.error("✗ Failed to load Monaco Editor:",e),this._loadingPromise=null,e}}getMonaco(){return this._monacoInstance}isMonacoLoaded(){return null!==this._monacoInstance}async createMonacoEditor(e,t){return(await this.loadMonaco()).editor.create(e,t)}async createMonacoDiffEditor(e,t){return(await this.loadMonaco()).editor.createDiffEditor(e,t)}async createMonacoModel(e,t,n){return(await this.loadMonaco()).editor.createModel(e,t,n)}},Rt=/* @__PURE__ */t({Vue:()=>f,Vue2:()=>{},del:()=>Mt,install:()=>Nt,isVue2:()=>!1,isVue3:()=>!0,set:()=>kt});import*as At from"vue";function Nt(){}function kt(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Mt(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}n(Rt,At);var Lt=Symbol.for("DndContextType");function _t(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ft="function"==typeof Symbol&&Symbol.observable||"@@observable",Ht=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wt={INIT:"@@redux/INIT"+Ht(),REPLACE:"@@redux/REPLACE"+Ht(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ht()}};function Ut(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(_t(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(_t(1));return n(Ut)(e,t)}if("function"!=typeof e)throw new Error(_t(2));var o=e,i=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function l(){if(c)throw new Error(_t(3));return i}function f(e){if("function"!=typeof e)throw new Error(_t(4));if(c)throw new Error(_t(5));var t=!0;return u(),s.push(e),function(){if(t){if(c)throw new Error(_t(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),a=null}}}function d(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(_t(7));if(void 0===e.type)throw new Error(_t(8));if(c)throw new Error(_t(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=s,n=0;n<t.length;n++)(0,t[n])();return e}return d({type:Wt.INIT}),(r={dispatch:d,subscribe:f,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(_t(10));o=e,d({type:Wt.REPLACE})}})[Ft]=function(){var e,t=f;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(_t(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[Ft]=function(){return this},e},r}function $t(e,t,...n){if("undefined"!=typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function zt(e){return"object"==typeof e}var Bt="dnd-core/INIT_COORDS",Vt="dnd-core/BEGIN_DRAG",qt="dnd-core/PUBLISH_DRAG_SOURCE",Yt="dnd-core/HOVER",Xt="dnd-core/DROP",Gt="dnd-core/END_DRAG";function Kt(e,t){return{type:Bt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Zt={type:Bt,payload:{clientOffset:null,sourceClientOffset:null}};function Jt(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:i}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(Kt(o)),function(e,t,n){$t(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){$t(n.getSource(e),"Expected sourceIds to be registered.")})}(t,a,s);const c=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==c)return void e.dispatch(Zt);let u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){$t("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),u=i(c)}e.dispatch(Kt(o,u));const l=s.getSource(c).beginDrag(a,c);return null!=l?(function(e){$t(zt(e),"Item must be an object.")}(l),s.pinSource(c),{type:Vt,payload:{itemType:s.getSourceType(c),item:l,sourceId:c,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}):void 0}}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Qt(e,t,n[t])})}return e}function tn(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){$t(e.isDragging(),"Cannot call drop while not dragging."),$t(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n),function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n).forEach((o,i)=>{const a={type:Xt,payload:{dropResult:en({},t,nn(o,i,r,n))}};e.dispatch(a)})}}function nn(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;return function(e){$t(void 0===e||zt(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:r.getDropResult()),i}function rn(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){$t(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();return null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Gt}}}function on(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function an(e){return function(t,{clientOffset:n}={}){!function(e){$t(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];on(t.getTargetType(o),n)||e.splice(r,1)}}(r,i,o.getItemType()),function(e,t,n){$t(t.isDragging(),"Cannot call hover while not dragging."),$t(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];$t(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array."),$t(n.getTarget(t),"Expected targetIds to be registered.")}}(r,o,i),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,i),{type:Yt,payload:{targetIds:r,clientOffset:n||null}}}}function sn(e){return function(){if(e.getMonitor().isDragging())return{type:qt}}}var cn=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store,n=function(e){return{beginDrag:Jt(e),publishDragSource:sn(e),hover:an(e),drop:tn(e),endDrag:rn(e)}}(this);return Object.keys(n).reduce((r,o)=>{const i=n[o];var a;return r[o]=(a=i,(...n)=>{const r=a.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function un(e,t){return{x:e.x-t.x,y:e.y-t.y}}var ln=[],fn=[];ln.__IS_NONE__=!0,fn.__IS_ALL__=!0;var dn=class{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;$t("function"==typeof e,"listener must be a function."),$t(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{o===r||o===r+1&&!function(e,t){return e!==ln&&(e===fn||void 0===t||(n=t,r=e,n.filter(e=>r.indexOf(e)>-1)).length>0);var n,r}(t.dirtyHandlerIds,n)||e()}finally{r=o}})}subscribeToOffsetChange(e){$t("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return $t(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return $t(t,`Expected to find a valid target. targetId=${e}`),!(!this.isDragging()||this.didDrop())&&on(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return $t(t,`Expected to find a valid source. sourceId=${e}`),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!on(r,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?un((i=r,{x:(o=t).x+i.x,y:o.y+i.y}),n):null;var o,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?un(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},hn="undefined"!=typeof global?global:self,gn=hn.MutationObserver||hn.WebKitMutationObserver;function pn(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}var vn,mn="function"==typeof gn?function(e){let t=1;const n=new gn(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:pn,yn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},bn=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=mn(this.flush),this.requestErrorThrow=pn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},wn=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new yn(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(bn.registerPendingError),On="dnd-core/ADD_SOURCE",Sn="dnd-core/ADD_TARGET",Tn="dnd-core/REMOVE_SOURCE",Dn="dnd-core/REMOVE_TARGET";function In(e,t){t&&Array.isArray(e)?e.forEach(e=>In(e,!1)):$t("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(vn||(vn={}));var En=0;function xn(e){switch(e[0]){case"S":return vn.SOURCE;case"T":return vn.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Cn(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}var Pn=class{addSource(e,t){In(e),function(e){$t("function"==typeof e.canDrag,"Expected canDrag to be a function."),$t("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),$t("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(vn.SOURCE,e,t);return this.store.dispatch(function(e){return{type:On,payload:{sourceId:e}}}(n)),n}addTarget(e,t){In(e,!0),function(e){$t("function"==typeof e.canDrop,"Expected canDrop to be a function."),$t("function"==typeof e.hover,"Expected hover to be a function."),$t("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(vn.TARGET,e,t);return this.store.dispatch(function(e){return{type:Sn,payload:{targetId:e}}}(n)),n}containsHandler(e){return Cn(this.dragSources,e)||Cn(this.dropTargets,e)}getSource(e,t=!1){return $t(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return $t(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return $t(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return $t(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return xn(e)===vn.SOURCE}isTargetId(e){return xn(e)===vn.TARGET}removeSource(e){var t;$t(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Tn,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},bn.enqueueTask(wn.create(t))}removeTarget(e){$t(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Dn,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);$t(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){$t(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=function(e){const t=(En++).toString();switch(e){case vn.SOURCE:return`S${t}`;case vn.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}(e);return this.types.set(r,t),e===vn.SOURCE?this.dragSources.set(r,n):e===vn.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=/* @__PURE__ */new Map,this.dragSources=/* @__PURE__ */new Map,this.dropTargets=/* @__PURE__ */new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},jn=(e,t)=>e===t;function Rn(e=ln,t){switch(t.type){case Yt:break;case On:case Sn:case Dn:case Tn:return ln;default:return fn}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=/* @__PURE__ */new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r);if(!(o.length>0)&&function(e,t,n=jn){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r))return ln;const i=r[r.length-1],a=n[n.length-1];return i!==a&&(i&&o.push(i),a&&o.push(a)),o}function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nn={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function kn(e=Nn,t){const{payload:n}=t;switch(t.type){case Bt:case Vt:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Yt:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){An(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case Gt:case Xt:return Nn;default:return e}var r,o}function Mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Mn(e,t,n[t])})}return e}var _n={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Fn(e=_n,t){const{payload:n}=t;switch(t.type){case Vt:return Ln({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case qt:return Ln({},e,{isSourcePublic:!0});case Yt:return Ln({},e,{targetIds:n.targetIds});case Dn:return-1===e.targetIds.indexOf(n.targetId)?e:Ln({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case Xt:return Ln({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Gt:return Ln({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function Hn(e=0,t){switch(t.type){case On:case Sn:return e+1;case Tn:case Dn:return e-1;default:return e}}function Wn(e=0){return e+1}function Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Un(e,t,n[t])})}return e}function zn(e={},t){return{dirtyHandlerIds:Rn(e.dirtyHandlerIds,{type:t.type,payload:$n({},t.payload,{prevTargetIds:(n=e,r=[],"dragOperation.targetIds".split(".").reduce((e,t)=>e&&e[t]?e[t]:r||null,n))})}),dragOffset:kn(e.dragOffset,t),refCount:Hn(e.refCount,t),dragOperation:Fn(e.dragOperation,t),stateId:Wn(e.stateId)};var n,r}function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vn=0,qn=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function Yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xn(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;return o[qn]||(o[qn]=function(e,t,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Ut(zn,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),i=new cn(o,new dn(o,new Pn(o))),a=e(i,t,n);return i.receiveBackend(a),i}(e,t,n,r)),o[qn]}function Xn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}var Gn=(0,Rt.defineComponent)({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(e,t){var n,r,o,i,a=t.slots,s=(o=function(e){return function(e){return"manager"in e&&e.manager}(e)?[e.manager,!1]:[Yn(e.backend,e.context,e.options,e.debugMode),!e.context]}(e),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(o,i)||function(e,t){if(e){if("string"==typeof e)return Bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bn(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],u=s[1];return u&&++Vn,(0,Rt.onUnmounted)(function(){if(u){var e=Xn();0===--Vn&&(e[qn]=null)}}),n=c,(0,Rt.provide)(Lt,n),function(){var e;return null!==(r=null===(e=a.default)||void 0===e?void 0:e.call(a))&&void 0!==r?r:null}}});(0,Rt.defineComponent)({props:{connect:{type:Function,required:!0},src:{type:String,required:!0}},setup:function(e){return(0,Rt.watchEffect)(function(){if("undefined"!=typeof Image){var t=!1,n=new Image;return n.src=e.src,n.onload=function(){e.connect(n),t=!0},function(){t&&e.connect(null)}}}),function(){return null}}});var Kn=!1,Zn=!1,Jn=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){$t(!Kn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Kn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Kn=!1}},t.isDragging=function(){if(!this.sourceId)return!1;$t(!Zn,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Zn=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Zn=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}(),Qn=!1,er=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;$t(!Qn,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Qn=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Qn=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function tr(e){return function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=n)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!function(e){return!!(n=e)&&!0===n.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,n}(n)){var o=n;return e(o,r),o}}}function nr(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=tr(r);t[n]=function(){return o}}}),t}function rr(e,t,n,r){let o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const a=i[c];if(!s(a))return!1;const u=e[a],l=t[a];if(o=n?n.call(r,u,l,a):void 0,!1===o||void 0===o&&u!==l)return!1}return!0}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ir=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=nr({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r=e.prototype;return r.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},r.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},r.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},r.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},r.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},r.didDragSourceOptionsChange=function(){return!rr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},r.didDragPreviewOptionsChange=function(){return!rr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},r.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},r.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},r.clearDragSource=function(){this.dragSourceNode=null},r.clearDragPreview=function(){this.dragPreviewNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}])&&or(t.prototype,n),e}();function ar(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var sr=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=nr({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,(0,Rt.isRef)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,r=e.prototype;return r.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},r.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},r.didOptionsChange=function(){return!rr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},r.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},r.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}])&&ar(t.prototype,n),e}(),cr=/* @__PURE__ */function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n,this.connector=r}var t=e.prototype;return t.beginDrag=function(){var e,t=this.spec,n=this.monitor;return null!=(e="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(n):{})?e:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var n=this.spec,r=this.monitor,o=n.isDragging;return o?o(r):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()},e}();function ur(){var e=(0,Rt.inject)(Lt);return $t(null!=e,"Expected drag drop context"),e}function lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fr(e,t,n){var r=ur(),o=function(e,t,n){var r=(0,Rt.computed)(function(){return new cr((0,Rt.unref)(e),(0,Rt.unref)(t),(0,Rt.unref)(n))});return(0,Rt.watchEffect)(function(){r.value.spec=(0,Rt.unref)(e)}),r}(e,t,n),i=function(e){return(0,Rt.computed)(function(){var t=(0,Rt.unref)(e).type;return $t(null!=t,"spec.type must be defined"),t})}(e);(0,Rt.watchEffect)(function(e){if(null!=(0,Rt.unref)(i)){var a=(u=function(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}((0,Rt.unref)(i),(0,Rt.unref)(o),(0,Rt.unref)(r)),l=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(u,l)||function(e,t){if(e){if("string"==typeof e)return lr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lr(e,t):void 0}}(u,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];(0,Rt.unref)(t).receiveHandlerId(s),(0,Rt.unref)(n).receiveHandlerId(s),e(c)}var u,l})}function dr(e){return(0,Rt.computed)(function(){return"function"==typeof e?e():e})}var hr=/* @__PURE__ */e(/* @__PURE__ */r((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}})());function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pr(e,t,n){var r,o,i=(r=function(e,t,n){var r=(0,Rt.ref)((0,Rt.unref)(t)((0,Rt.unref)(e))),o=function(){var o=(0,Rt.unref)(t)((0,Rt.unref)(e));(0,hr.default)(r.value,o)||(r.value=o,n&&n())};return(0,Rt.watchEffect)(o),[r,o]}(e,t,n),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(r,o)||function(e,t){if(e){if("string"==typeof e)return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gr(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];return(0,Rt.watchEffect)(function(t){var n=(0,Rt.unref)(e).getHandlerId();null!=n&&t((0,Rt.unref)(e).subscribeToStateChange(s,{handlerIds:[n]}))}),a}function vr(e,t,n){return pr(t,e||function(){return{}},function(){return(0,Rt.unref)(n).reconnect()})}function mr(e,t){var n=(0,Rt.reactive)({el:null,options:(0,Rt.unref)(t)});return(0,Rt.watchEffect)(function(){e(n)},{flush:"post"}),function(e,r){kt(n,"el",e);var o=(0,Rt.unref)(t)||r;return(0,hr.default)(n.options,o)||kt(n,"options",o),(0,Rt.unref)(e)}}function yr(e,t){return mr(function(t){(0,Rt.unref)(e).hooks.dragSource()(t.el,t.options)},(0,Rt.computed)(function(){return(0,Rt.unref)(t).options}))}function br(e,t){return mr(function(t){(0,Rt.unref)(e).hooks.dragPreview()(t.el,t.options)},(0,Rt.computed)(function(){return(0,Rt.unref)(t).previewOptions}))}function wr(e){var t,n=dr(e),r=(t=ur(),(0,Rt.computed)(function(){return new Jn((0,Rt.unref)(t))})),o=function(e,t){var n=ur(),r=(0,Rt.computed)(function(){return new ir((0,Rt.unref)(n).getBackend())});return(0,Rt.watchEffect)(function(t){r.value.dragSourceOptions=(0,Rt.unref)(e)||null,(0,Rt.unref)(r).reconnect(),t(function(){r.value.disconnectDragSource()})}),(0,Rt.watchEffect)(function(e){r.value.dragPreviewOptions=(0,Rt.unref)(t)||null,(0,Rt.unref)(r).reconnect(),e(function(){r.value.disconnectDragPreview()})}),r}((0,Rt.computed)(function(){return(0,Rt.unref)(n).options}),(0,Rt.computed)(function(){return(0,Rt.unref)(n).previewOptions}));return fr(n,r,o),[vr((0,Rt.computed)(function(){return(0,Rt.unref)(n).collect||function(){return{}}}),r,o),yr(o,n),br(o,n)]}var Or=/* @__PURE__ */function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function Sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tr(e,t,n){var r=ur(),o=function(e,t){var n=(0,Rt.computed)(function(){return new Or((0,Rt.unref)(e),(0,Rt.unref)(t))});return(0,Rt.watchEffect)(function(){n.value.spec=(0,Rt.unref)(e)}),n}(e,t),i=function(e){return(0,Rt.computed)(function(){var t=(0,Rt.unref)(e).accept;return $t(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);(0,Rt.watchEffect)(function(e){var a,s,c=(a=function(e,t,n){var r=(0,Rt.unref)(n).getRegistry(),o=r.addTarget((0,Rt.unref)(e),(0,Rt.unref)(t));return[o,function(){return r.removeTarget(o)}]}(i,o,r),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(a,s)||function(e,t){if(e){if("string"==typeof e)return Sr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sr(e,t):void 0}}(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],l=c[1];(0,Rt.unref)(t).receiveHandlerId(u),(0,Rt.unref)(n).receiveHandlerId(u),e(l)})}function Dr(e,t){return mr(function(t){(0,Rt.unref)(e).hooks.dropTarget()(t.el,t.options)},(0,Rt.computed)(function(){return(0,Rt.unref)(t).options}))}function Ir(e){var t,n=dr(e),r=(t=ur(),(0,Rt.computed)(function(){return new er((0,Rt.unref)(t))})),o=function(e){var t=ur(),n=(0,Rt.computed)(function(){return new sr((0,Rt.unref)(t).getBackend())});return(0,Rt.watchEffect)(function(t){n.value.dropTargetOptions=(0,Rt.unref)(e)||null,n.value.reconnect(),t(function(){return n.value.disconnectDropTarget()})}),n}((0,Rt.computed)(function(){return(0,Rt.unref)(n).options}));return Tr(n,r,o),[vr((0,Rt.computed)(function(){return(0,Rt.unref)(n).collect||function(){return{}}}),r,o),Dr(o,n)]}function Er(e){let t=null;return()=>(null==t&&(t=e()),t)}var xr=class{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=/* @__PURE__ */new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Cr=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},Pr=/* @__PURE__ */t({FILE:()=>jr,HTML:()=>Nr,TEXT:()=>Ar,URL:()=>Rr}),jr="__NATIVE_FILE__",Rr="__NATIVE_URL__",Ar="__NATIVE_TEXT__",Nr="__NATIVE_HTML__";function kr(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}var Mr={[jr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Nr]:{exposeProperties:{html:(e,t)=>kr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Rr]:{exposeProperties:{urls:(e,t)=>kr(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Ar]:{exposeProperties:{text:(e,t)=>kr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Lr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Mr).filter(e=>{const n=Mr[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}var _r=Er(()=>/firefox/i.test(navigator.userAgent)),Fr=Er(()=>Boolean(window.safari)),Hr=class{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:i}=this;let a=t.length-1;if(e===t[a])return n[a];let s,c=0,u=i.length-1;for(;c<=u;){s=Math.floor(.5*(c+u));const r=t[s];if(r<e)c=s+1;else{if(!(r>e))return n[s];u=s-1}}a=Math.max(0,u);const l=e-t[a],f=l*l;return n[a]+r[a]*l+o[a]*f+i[a]*l*f}constructor(e,t){const{length:n}=e,r=[];for(let h=0;h<n;h++)r.push(h);r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[],i=[],a=[];let s,c;for(let h=0;h<n-1;h++)s=e[h+1]-e[h],c=t[h+1]-t[h],i.push(s),o.push(c),a.push(c/s);const u=[a[0]];for(let h=0;h<i.length-1;h++){const e=a[h],t=a[h+1];if(e*t<=0)u.push(0);else{s=i[h];const n=i[h+1],r=s+n;u.push(3*r/((r+n)/e+(r+s)/t))}}u.push(a[a.length-1]);const l=[],f=[];let d;for(let h=0;h<u.length-1;h++){d=a[h];const e=u[h],t=1/i[h],n=e+u[h+1]-d-d;l.push((d-e-n)*t),f.push(n*t*t)}this.xs=e,this.ys=t,this.c1s=u,this.c2s=l,this.c3s=f}};function Wr(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Ur(e){return{x:e.clientX,y:e.clientY}}var $r=class{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function zr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){zr(e,t,n[t])})}return e}var Vr=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Br({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Br({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Pr).some(t=>Pr[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=Mr[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new Cr(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=/* @__PURE__ */new Map,this.sourcePreviewNodeOptions=/* @__PURE__ */new Map,this.sourceNodes=/* @__PURE__ */new Map,this.sourceNodeOptions=/* @__PURE__ */new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Wr(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Ur(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=Lr(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:i,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=function(e,t,n,r,o){const i=function(e){var t;return"IMG"===e.nodeName&&(_r()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),a=Wr(i?e:t),s={x:n.x-a.x,y:n.y-a.y},{offsetWidth:c,offsetHeight:u}=e,{anchorX:l,anchorY:f}=r,{dragPreviewWidth:d,dragPreviewHeight:h}=function(e,t,n,r){let o=e?t.width:n,i=e?t.height:r;return Fr()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(i,t,c,u),{offsetX:g,offsetY:p}=o,v=0===p||p;return{x:0===g||g?g:new Hr([0,.5,1],[s.x,s.x/c*d,s.x+d-c]).interpolate(l),y:v?p:(()=>{let e=new Hr([0,.5,1],[s.y,s.y/u*h,s.y+h-u]).interpolate(f);return Fr()&&i&&(e+=(window.devicePixelRatio-1)*h),e})()}}(t,o,n,{anchorX:e,anchorY:i},{offsetX:a,offsetY:s});r.setDragImage(o,c.x,c.y)}}try{null==r||r.setData("application/json",{})}catch(i){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)),!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=Lr(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Ur(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{var t;this.dragOverTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Ur(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;this.dropTargetIds=[],this.isDraggingNativeItem()?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Lr(e.dataTransfer)&&e.preventDefault(),this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Ur(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new $r(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new xr(this.isNodeInDocument)}},qr=function(e,t,n){return new Vr(e,t,n)},Yr={"zh-CN":()=>import("./zh_CN-CO133RFG.js"),"en-US":()=>import("./en_US-B0wIY6a-.js"),"pt-PT":()=>import("./pt_PT-CnUcrrHa.js"),"tr-TR":()=>import("./tr_TR-y8uLkPdL.js"),"zh-TW":()=>import("./zh_TW-DaOg9meQ.js"),"ja-JP":()=>import("./ja_JP-DXSy7dHj.js"),"vi-VN":()=>import("./vi_VN-CXvZpo3W.js"),"de-GE":()=>import("./de_DE-Cdk5SWSW.js"),"fr-FR":()=>import("./fr_FR-CSfCfW5D.js"),"es-ES":()=>import("./es_ES-CFTf_KZi.js"),"ru-RU":()=>import("./ru_RU-BziGAVj5.js")},Xr=R({locale:""});function Gr(){if(Xr.value.locale!==_gct.i18n.global.locale.value){const e=Yr[_gct.i18n.global.locale.value];e&&e().then(e=>{Xr.value=e.default})}return{getAntdLocale:Xr}}var Kr=j({});function Zr(){return{themeVars:Kr,setPrimaryColor:function(e){Kr.primaryColor=e,q.config({theme:{primaryColor:e}})}}}function Jr(e,t,n={}){const r=n.minValue??10,o=R(e),i=j({offset:"offsetWidth",client:"clientX",clientMove:0,rowType:t,offsetWidth:2e3});function a(e){const t=e-i.clientMove;o.value=s(s(o.value)+t),i.clientMove=e}function s(e){return"right"===i.rowType||"bottom"===i.rowType?i.offsetWidth-e:e}return{moveDomDown:function(e,t,n){const r=t,o=e;i.offsetWidth=r[i.offset]??0,i.clientMove=o[i.client]??0,e.preventDefault(),document.onmousemove=e=>{a(e[i.client]??0)},document.onmouseup=()=>{document.onmouseup=null,document.onmousemove=null,null==n||n()}},moveMobileDomDown:function(e,t,n){const r=t,o=e.touches[0];o&&(i.offsetWidth=r[i.offset]??0,i.clientMove=o[i.client]??0,e.preventDefault(),document.ontouchmove=e=>{a(e.touches[0][i.client]??0)},document.ontouchend=()=>{document.ontouchend=null,document.ontouchmove=null,null==n||n()})},start:h({get:()=>o.value<r?r:o.value>i.offsetWidth-r?i.offsetWidth-r:o.value,set(e){o.value=e}})}}var Qr=/* @__PURE__ */function(e){return e.SELF_BUILT="SELF_BUILT",e.IMPORT="IMPORT",e}(Qr||{});function eo(e,t){const n=R(!1),r=R(!1),o=R(""),i=R(""),a=_gct.store.context.bid||"";function s(){const s=H(e),u=H(t);s&&(n.value=s.startsWith("$"),r.value=/\$?[A-Z]+_/.test(s),o.value=(n.value?"$":"")+(_gct.store.appInfo.sourceType===Qr.IMPORT?r.value?"I":"i":"")+(n.value?s.substring(1):s)+(s.endsWith("_")?"":"_"),i.value=""===u||_gct.store.projectName===c.WEB_RENDER?"":a?"_"+(r.value?a.toUpperCase():a):"")}return s(),O(e)&&W(e,()=>{s()}),O(t)&&W(t,()=>{s()}),{keyPrefix:o,keySuffix:i,keyReset:s,keyPad:function(e){if(e)return`${o.value}${e}${i.value}`},keyClip:function(n){const r=H(e).match(/\$?(([a-zA-Z]+_)*[a-zA-Z]+)_?/)[1],a=n.indexOf(r)+r.length,s=i.value&&""!==H(t)?n.lastIndexOf("_"):n.length;return o.value=n.substring(0,a+1),i.value=n.substring(s),n.substring(a+1,s)},keyPrePad:function(e){if(e)return`${o.value}${e}`},keyPreClip:function(t){const n=H(e).match(/\$?(([a-zA-Z]+_)*[a-zA-Z]+)_?/)[1],r=t.indexOf(n)+n.length;return o.value=t.substring(0,r+1),t.substring(r+1)}}}var to=/* @__PURE__ */p({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const n=l("modal"),r=R(!1),o=R(!!e.opts.defaultFullscreen),a=()=>{o.value=!o.value},s=R({});e.opts&&Object.assign(s.value,e.opts);let c=null;const u=new i({dismiss:e=>{r.value=!1,c=e,t.emit("dismiss",c)},setOptions(e){Object.assign(s.value,e)}});P("modal",u);const f=e=>u.dismiss(e);t.expose({present:()=>{r.value=!0},dismiss:f});const d=R(!1),h=async()=>{if(u.ok)try{d.value=!0;const e=await u.ok();d.value=!1,!e||!0!==e.ok&&!0!==e.close||f(e)}finally{d.value=!1}else console.warn("打开模态未实现ok方法")},p=async()=>{u.cancel&&!1===await u.cancel()||f()},{getAntdLocale:v}=Gr();return()=>{var e,i;let c;const l=null===(e=(i=t.slots).default)||void 0===e?void 0:e.call(i);return l&&l.length>0&&(l[0].props.modal=u),g(q,{locale:v.value},{default:()=>{return[g(Gn,{backend:qr},(e=c=y(A("a-modal"),{visible:r.value,class:[n.b(),s.value.placement&&n.m(s.value.placement),s.value.modalClass,n.is("hidden-footer",!1===s.value.showFooter),n.is("hidden-close-btn",!1===s.value.showCloseBtn),n.is("hidden-cancel-btn",!1===s.value.showCancelBtn),n.is("full-screen",o.value)],centered:!0,onOk:h,confirmLoading:d.value,onCancel:p,okText:"确认",okButtonProps:{disabled:u.state.okDisabled},...s.value},[!1!==s.value.canFullscreen?g("div",{class:n.e("full-screen"),onClick:a},[g("i",{class:"iconfont "+(o.value?"icon-tuichuquanping":"icon-quanping")},null)]):null,l]),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!S(e)?c:{default:()=>[c]}))];var e}})}}}),no=Math.min,ro=Math.max,oo=Math.round,io=Math.floor,ao=e=>({x:e,y:e}),so={left:"right",right:"left",bottom:"top",top:"bottom"};function co(e,t,n){return ro(e,no(t,n))}function uo(e,t){return"function"==typeof e?e(t):e}function lo(e){return e.split("-")[0]}function fo(e){return e.split("-")[1]}function ho(e){return"x"===e?"y":"x"}function go(e){return"y"===e?"height":"width"}function po(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function vo(e){return ho(po(e))}function mo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var yo=["left","right"],bo=["right","left"],wo=["top","bottom"],Oo=["bottom","top"];function So(e){const t=lo(e);return so[t]+e.slice(t.length)}function To(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Do(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Io(e,t,n){let{reference:r,floating:o}=e;const i=po(t),a=vo(t),s=go(a),c=lo(t),u="y"===i,l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(fo(t)){case"start":h[a]-=d*(n&&u?-1:1);break;case"end":h[a]+=d*(n&&u?-1:1)}return h}async function Eo(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=uo(t,e),g=To(h),p=s[d?"floating"===f?"reference":"floating":f],v=Do(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:l,strategy:c})),m="floating"===f?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Do(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:y,strategy:c}):m);return{top:(v.top-w.top+g.top)/b.y,bottom:(w.bottom-v.bottom+g.bottom)/b.y,left:(v.left-w.left+g.left)/b.x,right:(w.right-v.right+g.right)/b.x}}var xo=/* @__PURE__ */new Set(["left","top"]);function Co(){return"undefined"!=typeof window}function Po(e){return Ao(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ro(e){var t;return null==(t=(Ao(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ao(e){return!!Co()&&(e instanceof Node||e instanceof jo(e).Node)}function No(e){return!!Co()&&(e instanceof Element||e instanceof jo(e).Element)}function ko(e){return!!Co()&&(e instanceof HTMLElement||e instanceof jo(e).HTMLElement)}function Mo(e){return!(!Co()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot)}function Lo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function _o(e){return/^(table|td|th)$/.test(Po(e))}function Fo(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Ho,Wo=/transform|translate|scale|rotate|perspective|filter/,Uo=/paint|layout|strict|content/,$o=e=>!!e&&"none"!==e;function zo(e){const t=No(e)?qo(e):e;return $o(t.transform)||$o(t.translate)||$o(t.scale)||$o(t.rotate)||$o(t.perspective)||!Bo()&&($o(t.backdropFilter)||$o(t.filter))||Wo.test(t.willChange||"")||Uo.test(t.contain||"")}function Bo(){return null==Ho&&(Ho="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ho}function Vo(e){return/^(html|body|#document)$/.test(Po(e))}function qo(e){return jo(e).getComputedStyle(e)}function Yo(e){return No(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xo(e){if("html"===Po(e))return e;const t=e.assignedSlot||e.parentNode||Mo(e)&&e.host||Ro(e);return Mo(t)?t.host:t}function Go(e){const t=Xo(e);return Vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ko(t)&&Lo(t)?t:Go(t)}function Ko(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Go(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=jo(o);if(i){const e=Zo(a);return t.concat(a,a.visualViewport||[],Lo(o)?o:[],e&&n?Ko(e):[])}return t.concat(o,Ko(o,[],n))}function Zo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jo(e){const t=qo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ko(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=oo(n)!==i||oo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Qo(e){return No(e)?e:e.contextElement}function ei(e){const t=Qo(e);if(!ko(t))return ao(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Jo(t);let a=(i?oo(n.width):n.width)/r,s=(i?oo(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}var ti=/* @__PURE__ */ao(0);function ni(e){const t=jo(e);return Bo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ti}function ri(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Qo(e);let a=ao(1);t&&(r?No(r)&&(a=ei(r)):a=ei(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==jo(e))&&t}(i,n,r)?ni(i):ao(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,l=o.width/a.x,f=o.height/a.y;if(i){const e=jo(i),t=r&&No(r)?jo(r):r;let n=e,o=Zo(n);for(;o&&r&&t!==n;){const e=ei(o),t=o.getBoundingClientRect(),r=qo(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,l*=e.x,f*=e.y,c+=i,u+=a,n=jo(o),o=Zo(n)}}return Do({width:l,height:f,x:c,y:u})}function oi(e,t){const n=Yo(e).scrollLeft;return t?t.left+n:ri(Ro(e)).left+n}function ii(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oi(e,n),y:n.top+t.scrollTop}}function ai(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=jo(e),r=Ro(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const e=Bo();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}const u=oi(r);if(u<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else u<=25&&(i+=u);return{width:i,height:a,x:s,y:c}}(e,n);else if("document"===t)r=function(e){const t=Ro(e),n=Yo(e),r=e.ownerDocument.body,o=ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oi(e);const s=-n.scrollTop;return"rtl"===qo(r).direction&&(a+=ro(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ro(e));else if(No(t))r=function(e,t){const n=ri(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ko(e)?ei(e):ao(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ni(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Do(r)}function si(e,t){const n=Xo(e);return!(n===t||!No(n)||Vo(n))&&("fixed"===qo(n).position||si(n,t))}function ci(e,t){const n=t.get(e);if(n)return n;let r=Ko(e,[],!1).filter(e=>No(e)&&"body"!==Po(e)),o=null;const i="fixed"===qo(e).position;let a=i?Xo(e):e;for(;No(a)&&!Vo(a);){const t=qo(a),n=zo(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Lo(a)&&!n&&si(e,a))?r=r.filter(e=>e!==a):o=t,a=Xo(a)}return t.set(e,r),r}function ui(e,t,n){const r=ko(t),o=Ro(t),i="fixed"===n,a=ri(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=ao(0);function u(){c.x=oi(o)}if(r||!r&&!i)if(("body"!==Po(t)||Lo(o))&&(s=Yo(t)),r){const e=ri(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const l=!o||r||i?ao(0):ii(o,s);return{x:a.left+s.scrollLeft-c.x-l.x,y:a.top+s.scrollTop-c.y-l.y,width:a.width,height:a.height}}function li(e){return"static"===qo(e).position}function fi(e,t){if(!ko(e)||"fixed"===qo(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ro(e)===n&&(n=n.ownerDocument.body),n}function di(e,t){const n=jo(e);if(Fo(e))return n;if(!ko(e)){let t=Xo(e);for(;t&&!Vo(t);){if(No(t)&&!li(t))return t;t=Xo(t)}return n}let r=fi(e,t);for(;r&&_o(r)&&li(r);)r=fi(r,t);return r&&Vo(r)&&li(r)&&!zo(r)?n:r||function(e){let t=Xo(e);for(;ko(t)&&!Vo(t);){if(zo(t))return t;if(Fo(t))return null;t=Xo(t)}return null}(e)||n}var hi={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ro(r),s=!!t&&Fo(t.floating);if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},u=ao(1);const l=ao(0),f=ko(r);if((f||!f&&!i)&&(("body"!==Po(r)||Lo(a))&&(c=Yo(r)),f)){const e=ri(r);u=ei(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const d=!a||f||i?ao(0):ii(a,c);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:n.y*u.y-c.scrollTop*u.y+l.y+d.y}},getDocumentElement:Ro,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Fo(t)?[]:ci(t,this._c):[].concat(n),r],a=ai(t,i[0],o);let s=a.top,c=a.right,u=a.bottom,l=a.left;for(let f=1;f<i.length;f++){const e=ai(t,i[f],o);s=ro(e.top,s),c=no(e.right,c),u=no(e.bottom,u),l=ro(e.left,l)}return{width:c-l,height:u-s,x:l,y:s}},getOffsetParent:di,getElementRects:async function(e){const t=this.getOffsetParent||di,n=this.getDimensions,r=await n(e.floating);return{reference:ui(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Jo(e);return{width:t,height:n}},getScale:ei,isElement:No,isRTL:function(e){return"rtl"===qo(e).direction}};function gi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var pi=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=lo(n),s=fo(n),c="y"===po(n),u=xo.has(a)?-1:1,l=i&&c?-1:1,f=uo(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof g&&(h="end"===s?-1*g:g),c?{x:h*l,y:d*u}:{x:d*u,y:h*l}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},vi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=uo(e,t),l={x:n,y:r},f=await i.detectOverflow(t,u),d=po(lo(o)),h=ho(d);let g=l[h],p=l[d];if(a){const e="y"===h?"bottom":"right";g=co(g+f["y"===h?"top":"left"],g,g-f[e])}if(s){const e="y"===d?"bottom":"right";p=co(p+f["y"===d?"top":"left"],p,p-f[e])}const v=c.fn({...t,[h]:g,[d]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:a,[d]:s}}}}}},mi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...v}=uo(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=lo(o),y=po(s),b=lo(s)===s,w=await(null==c.isRTL?void 0:c.isRTL(u.floating)),O=d||(b||!p?[So(s)]:function(e){const t=So(e);return[mo(e),t,mo(t)]}(s)),S="none"!==g;!d&&S&&O.push(...function(e,t,n,r){const o=fo(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?bo:yo:t?yo:bo;case"left":case"right":return t?wo:Oo;default:return[]}}(lo(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(mo)))),i}(s,p,g,w));const T=[s,...O],D=await c.detectOverflow(t,v),I=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(l&&I.push(D[m]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=fo(e),o=vo(e),i=go(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=So(a)),[a,So(a)]}(o,a,w);I.push(D[e[0]],D[e[1]])}if(E=[...E,{placement:o,overflows:I}],!I.every(e=>e<=0)){var x,C;const e=((null==(x=i.flip)?void 0:x.index)||0)+1,t=T[e];if(t&&("alignment"!==f||y===po(t)||E.every(e=>po(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(C=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=E.filter(e=>{if(S){const t=po(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},yi=/* @__PURE__ */p({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const n=l("popover"),r=R(!1),o=R(),a=R(),s=j({}),{width:c,height:u,maxHeight:f}=e.opts;c&&(z(c)?s.width=`${c}px`:s.width=c),u&&(z(u)?s.height=`${u}px`:s.height=u),f&&(z(f)?s.maxHeight=`${f}px`:s.maxHeight=f);const d=new i({dismiss:e=>{t.emit("dismiss",e)}});function h(e){return d.dismiss(e)}let p=()=>{};C(()=>{p()}),Oe(o,()=>{h({ok:!1})}),t.expose({present:async function(t){r.value=!0,p=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=Qo(e),l=o||i?[...u?Ko(u):[],...t?Ko(t):[]]:[];l.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=u&&s?function(e,t){let n,r=null;const o=Ro(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),i();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:h}=u;if(s||t(),!d||!h)return;const g={rootMargin:-io(f)+"px "+-io(o.clientWidth-(l+d))+"px "+-io(o.clientHeight-(f+h))+"px "+-io(l)+"px",threshold:ro(0,no(1,c))||1};let p=!0;function v(t){const r=t[0].intersectionRatio;if(r!==c){if(!p)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||gi(u,e.getBoundingClientRect())||a(),p=!1}try{r=new IntersectionObserver(v,{...g,root:o.ownerDocument})}catch(m){r=new IntersectionObserver(v,g)}r.observe(e)}(!0),i}(u,n):null;let d,h=-1,g=null;a&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),u&&!c&&g.observe(u),t&&g.observe(t));let p=c?ri(e):null;return c&&function t(){const r=ri(e);p&&!gi(p,r)&&n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=g)||e.disconnect(),g=null,c&&cancelAnimationFrame(d)}}(t,o.value,()=>async function(e,t,n,r){const o=[pi(r.offsetOpts||6),mi(),vi()];r.noArrow||o.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:u,padding:l=0}=uo(e,t)||{};if(null==u)return{};const f=To(l),d={x:n,y:r},h=vo(o),g=go(h),p=await a.getDimensions(u),v="y"===h,m=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[h]-d[h]-i.floating[g],O=d[h]-i.reference[h],S=await(null==a.getOffsetParent?void 0:a.getOffsetParent(u));let T=S?S[b]:0;T&&await(null==a.isElement?void 0:a.isElement(S))||(T=s.floating[b]||i.floating[g]);const D=w/2-O/2,I=T/2-p[g]/2-1,E=no(f[m],I),x=no(f[y],I),C=E,P=T-p[g]-x,j=T/2-p[g]/2+D,R=co(C,j,P),A=!c.arrow&&null!=fo(o)&&j!==R&&i.reference[g]/2-(j<C?E:x)-p[g]/2<0,N=A?j<C?j-C:j-P:0;return{[h]:d[h]+N,data:{[h]:R,centerOffset:j-R-N,...A&&{alignmentOffset:N}},reset:A}}}))({element:n}));const i={placement:r.placement,strategy:"absolute",middleware:o};r.options&&Object.assign(i,r.options);const a=await((e,t,n)=>{const r=/* @__PURE__ */new Map,o={platform:hi,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Eo},c=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Io(u,r,c),d=r,h=0;const g={};for(let p=0;p<i.length;p++){const n=i[p];if(!n)continue;const{name:v,fn:m}=n,{x:y,y:b,data:w,reset:O}=await m({x:l,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});l=null!=y?y:l,f=null!=b?b:f,g[v]={...g[v],...w},O&&h<50&&(h++,"object"==typeof O&&(O.placement&&(d=O.placement),O.rects&&(u=!0===O.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):O.rects),({x:l,y:f}=Io(u,d,c))),p=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:g}})(e,t,{...o,platform:i})})(e,t,i);{const{x:e,y:o,placement:i,middlewareData:s}=a,{style:c}=t;if(c.left=`${e}px`,c.top=`${o}px`,!r.noArrow){const{x:e,y:t}=s.arrow,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(n.style,{left:null!=e?`${e}px`:"",top:null!=t?`${t}px`:"",right:"",bottom:"",[r]:"-4px"})}}}(t,o.value,a.value,e.opts))},dismiss:h});const{getAntdLocale:v}=Gr();return()=>{var i,c;const u=null===(i=(c=t.slots).default)||void 0===i?void 0:i.call(c);u&&u.length>0&&u[0].props&&(u[0].props.modal=d);const l=g("div",{class:[n.b(),n.is("show",r.value),e.opts.className],ref:o,style:s,onClick:e=>{e.stopPropagation()}},[!e.opts.noArrow&&g("div",{class:[n.e("arrow")],ref:a},null),u]);return!0===e.opts.autoClose?g("div",{class:[n.e("overlay")],onClick:()=>{!0===e.opts.autoClose&&h()}},[l]):g(q,{locale:v.value},{default:()=>{return[g(Gn,{backend:qr},(e=l,"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!S(e)?l:{default:()=>[l]}))];var e}})}}}),bi=/* @__PURE__ */p({name:"AppFullScreenContainer",props:{opts:{type:Object,default:()=>({})}},setup(e,t){const n=l("app-full-screen-container"),r=R(!1),o=R({});e.opts&&Object.assign(o.value,e.opts);let a=null;const s=new i({dismiss:e=>{r.value=!1,a=e,t.emit("dismiss",a)}});P("modal",s);const c=e=>s.dismiss(e);t.expose({present:()=>{r.value=!0},dismiss:c,ok:async()=>{if(s.ok){const e=await s.ok();e&&e.ok&&c(e)}else console.warn("打开模态未实现ok方法")},cancel:()=>s.cancel?s.cancel():c()});const{getAntdLocale:u}=Gr();return()=>{var e,i;let a;const c=null===(e=(i=t.slots).default)||void 0===e?void 0:e.call(i);return c&&c.length>0&&c[0].props&&(c[0].props.modal=s),g(q,{locale:u.value},{default:()=>{return[g(Gn,{backend:qr},(e=a=y("div",{class:[n.b(),n.is("is-hidden",!0!==r.value),o.value.containerClass],...o.value},[c]),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!S(e)?a:{default:()=>[a]}))];var e}})}}});function wi(e){return B(e)?A(e):e}var Oi=class{async modal(e,t,n){const r=this.createModal(e,t,n);return r.present(),r.onWillDismiss()}createModal(e,t,n){return function(e,t){return new a(to,e,t)}($(e)?e:()=>y(wi(e),{...t}),n)}popover(e,t,n,r){const o=this.createPopover(t,n,r);return o.present(e),o.onWillDismiss()}createPopover(e,t,n){return function(e,t){return new s(yi,e,t)}($(e)?e:()=>y(wi(e),{...t}),n)}fullScreen(e,t,n){const r=this.createFullScreen(e,t,n);return r.present(),r.onWillDismiss()}createFullScreen(e,t,n){return function(e,t){return new a(bi,e,t)}($(e)?e:()=>y(wi(e),{...t}),n)}},Si=new Oi,Ti=(e,t)=>(e.install=n=>{const r=e.name||e.displayName||e.__name;r&&(n.component(r,e),t&&(n.config.globalProperties[t]=e))},e),Di={childrenFields:["children"]},Ii=/* @__PURE__ */new Error("中断操作");function Ei(e,t){for(const n of t){const t=e[n];if(Array.isArray(t)&&t.length>0)return t}}function xi(e,t,n,r){const{childrenFields:o}=V({},Di,r||{});if(null==t?void 0:t.length)for(let i=0;i<t.length;i++){const a=t[i];if(n({item:a,index:i,parent:e}))throw Ii;const s=Ei(a,o);(null==s?void 0:s.length)&&xi(a,s,n,r)}}function Ci(e,t,n){const{childrenFields:r}=V({},Di,n||{});try{const o=Array.isArray(e)?void 0:e,i=Array.isArray(e)?e:Ei(e,r);(null==i?void 0:i.length)?xi(o,i,t,n):console.warn("没有可遍历的数组",e,n)}catch(o){if(o!==Ii)throw o}}var Pi={...Di,compareField:"id",compareCallback:({item:e,key:t,compareField:n})=>e[n]===t};function ji(e,t,n){const{compareField:r,compareCallback:o}=V({},Pi,n||{});let i,a;return Ci(e,e=>{if(o({...e,key:t,compareField:r}))return i=e.item,a=e.parent,!0},n),i?{child:i,parent:a}:void 0}function Ri(e,t){const n=e=>Ri(e,t);return e.map(e=>t(e,n))}function Ai(e,t,n){const{childrenFields:r}=V({},Di,n||{});return function e(n,o){return n.filter(n=>{console.log("item",n.title);const i=Ei(n,r);let a=[];return(null==i?void 0:i.length)&&(a=e(i,n)),n[r[0]]=a,!!a.length||t(n,o)})}(e)}var Ni=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};export{fe as A,Re as C,Ae as D,Ee as E,pe as M,$e as O,je as S,Te as T,Ve as _,Ri as a,ze as b,Si as c,Zr as d,Gr as f,Pt as g,jt as h,Ci as i,ge as j,he as k,eo as l,wr as m,Ai as n,Ti as o,Ir as p,ji as r,Oi as s,Ni as t,Jr as u,qe as v,xe as w,Oe as x,Be as y};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
1
2
|
var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,n=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,r)=>{let o={};for(var l in e)t(o,l,{get:e[l],enumerable:!0});return r||t(o,Symbol.toStringTag,{value:"Module"}),o},p=(e,l,n,u)=>{if(l&&"object"==typeof l||"function"==typeof l)for(var p,b=o(l),c=0,f=b.length;c<f;c++)p=b[c],a.call(e,p)||p===n||t(e,p,{get:(e=>l[e]).bind(null,p),enumerable:!(u=r(l,p))||u.enumerable});return e},b=(e,t,r)=>(p(e,t,"default"),r&&p(r,t,"default")),c=(r,o,a)=>(a=null!=r?e(l(r)):{},p(!o&&r&&r.__esModule?a:t(a,"default",{value:r,enumerable:!0}),r));export{c as i,u as n,b as r,n as t};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-DPOkwzLC.js";var e=/* @__PURE__ */t((t,e)=>{var i,a;i=t,a=function(){function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,a)}return i}function e(e){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?t(Object(n),!0).forEach(function(t){var a,o,r;a=e,o=t,r=n[t],(o=i(o))in a?Object.defineProperty(a,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var h="undefined"!=typeof window&&void 0!==window.document,s=h?window:{},c=!(!h||!s.document.documentElement)&&"ontouchstart"in s.document.documentElement,l=!!h&&"PointerEvent"in s,d="cropper",p="all",m="crop",u="move",g="zoom",f="e",v="w",w="s",b="n",y="ne",x="nw",M="se",C="sw",D="".concat(d,"-crop"),B="".concat(d,"-disabled"),k="".concat(d,"-hidden"),O="".concat(d,"-hide"),T="".concat(d,"-invisible"),E="".concat(d,"-modal"),W="".concat(d,"-move"),H="".concat(d,"Action"),N="".concat(d,"Preview"),L="crop",z="move",Y="none",X="crop",R="cropend",S="cropmove",j="cropstart",A="dblclick",P=l?"pointerdown":c?"touchstart":"mousedown",I=l?"pointermove":c?"touchmove":"mousemove",U=l?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",q="ready",$="resize",Q="wheel",K="zoom",Z="image/jpeg",G=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,V=/^data:/,F=/^data:image\/jpeg;base64,/,J=/^img|canvas$/i,_={viewMode:0,dragMode:L,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tt=Number.isNaN||s.isNaN;function et(t){return"number"==typeof t&&!tt(t)}var it=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function nt(t){return"object"===a(t)&&null!==t}var ot=Object.prototype.hasOwnProperty;function rt(t){if(!nt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&ot.call(i,"isPrototypeOf")}catch(a){return!1}}function ht(t){return"function"==typeof t}var st=Array.prototype.slice;function ct(t){return Array.from?Array.from(t):st.call(t)}function lt(t,e){return t&&ht(e)&&(Array.isArray(t)||et(t.length)?ct(t).forEach(function(i,a){e.call(t,i,a,t)}):nt(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var dt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return nt(t)&&i.length>0&&i.forEach(function(e){nt(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},pt=/\.\d*(?:0|9){12}\d*$/;function mt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return pt.test(t)?Math.round(t*e)/e:t}var ut=/^width|height|left|top|marginLeft|marginTop$/;function gt(t,e){var i=t.style;lt(e,function(t,e){ut.test(e)&&et(t)&&(t="".concat(t,"px")),i[e]=t})}function ft(t,e){if(e)if(et(t.length))lt(t,function(t){ft(t,e)});else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function vt(t,e){e&&(et(t.length)?lt(t,function(t){vt(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function wt(t,e,i){e&&(et(t.length)?lt(t,function(t){wt(t,e,i)}):i?ft(t,e):vt(t,e))}var bt=/([a-z\d])([A-Z])/g;function yt(t){return t.replace(bt,"$1-$2").toLowerCase()}function xt(t,e){return nt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(yt(e)))}function Mt(t,e,i){nt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(yt(e)),i)}var Ct=/\s\s*/,Dt=function(){var t=!1;if(h){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});s.addEventListener("test",i,a),s.removeEventListener("test",i,a)}return t}();function Bt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(!Dt){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)})}function kt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(a.once&&!Dt){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)})}function Ot(t,e,i){var a;return ht(Event)&&ht(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Tt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Et=s.location,Wt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Ht(t){var e=t.match(Wt);return null!==e&&(e[1]!==Et.protocol||e[2]!==Et.hostname||e[3]!==Et.port)}function Nt(t){var e="timestamp=".concat(/* @__PURE__ */(new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Lt(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];et(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),et(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),et(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),et(i)&&1!==i&&r.push("scaleX(".concat(i,")")),et(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function zt(t,i){var a=t.pageX,n=t.pageY,o={endX:a,endY:n};return i?o:e({startX:a,startY:n},o)}function Yt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=it(a),r=it(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}var Xt=String.fromCharCode,Rt=/^data:.*,/;var St={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper,n=Number(e.minContainerWidth),o=Number(e.minContainerHeight);ft(a,k),vt(t,k);var r={width:Math.max(i.offsetWidth,n>=0?n:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,gt(a,{width:r.width,height:r.height}),ft(t,k),vt(a,k)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=dt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=Yt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,m=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,m),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,m),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,m),n.maxTop=Math.max(0,m))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,gt(this.canvas,dt({width:i.width,height:i.height},Lt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);dt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),gt(this.image,dt({width:i.width,height:i.height},Lt(dt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=dt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Mt(this.face,H,i.width>=e.width&&i.height>=e.height?u:p),gt(this.cropBox,dt({width:i.width,height:i.height},Lt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Ot(this.element,X,this.getData())}},jt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,lt(r,function(t){var i=document.createElement("img");Mt(t,N,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)})}},resetPreview:function(){lt(this.previews,function(t){var e=xt(t,N);gt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(nt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(yt(e)))}(t,N)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(gt(this.viewBoxImage,dt({width:o,height:r},Lt(dt({translateX:-h,translateY:-s},t)))),lt(this.previews,function(e){var i=xt(e,N),c=i.width,l=i.height,d=c,p=l,m=1;a&&(p=n*(m=c/a)),n&&p>l&&(d=a*(m=l/n),p=l),gt(e,{width:d,height:p}),gt(e.getElementsByTagName("img")[0],dt({width:o*m,height:r*m},Lt(dt({translateX:-h*m,translateY:-s*m},t))))}))}},At={bind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&kt(t,j,e.cropstart),ht(e.cropmove)&&kt(t,S,e.cropmove),ht(e.cropend)&&kt(t,R,e.cropend),ht(e.crop)&&kt(t,X,e.crop),ht(e.zoom)&&kt(t,K,e.zoom),kt(i,P,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&kt(i,Q,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&kt(i,A,this.onDblclick=this.dblclick.bind(this)),kt(t.ownerDocument,I,this.onCropMove=this.cropMove.bind(this)),kt(t.ownerDocument,U,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&kt(window,$,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Bt(t,j,e.cropstart),ht(e.cropmove)&&Bt(t,S,e.cropmove),ht(e.cropend)&&Bt(t,R,e.cropend),ht(e.crop)&&Bt(t,X,e.crop),ht(e.zoom)&&Bt(t,K,e.zoom),Bt(i,P,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Bt(i,Q,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Bt(i,A,this.onDblclick),Bt(t.ownerDocument,I,this.onCropMove),Bt(t.ownerDocument,U,this.onCropEnd),e.responsive&&Bt(window,$,this.onResize)}},Pt={resize:function(){if(!this.disabled){var t,e,i=this.options,a=this.container,n=this.containerData,o=a.offsetWidth/n.width,r=a.offsetHeight/n.height,h=Math.abs(o-1)>Math.abs(r-1)?o:r;1!==h&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(lt(t,function(e,i){t[i]=e*h})),this.setCropBoxData(lt(e,function(t,i){e[i]=t*h}))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===Y||this.setDragMode((t=this.dragBox,e=D,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?z:L))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(et(e)&&1!==e||et(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){o[t.identifier]=zt(t)}):o[t.pointerId||0]=zt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?g:xt(t.target,H),G.test(a)&&!1!==Ot(this.element,j,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===m&&(this.cropping=!0,ft(this.dragBox,E)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Ot(this.element,S,{originalEvent:t,action:e})&&(t.changedTouches?lt(t.changedTouches,function(t){dt(i[t.identifier]||{},zt(t,!0))}):dt(i[t.pointerId||0]||{},zt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,wt(this.dragBox,E,this.cropped&&this.options.modal)),Ot(this.element,R,{originalEvent:t,action:e}))}}},It={change:function(t){var i,a=this.options,n=this.canvasData,o=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=a.aspectRatio,l=r.left,d=r.top,D=r.width,B=r.height,O=l+D,T=d+B,E=0,W=0,H=o.width,N=o.height,L=!0;!c&&t.shiftKey&&(c=D&&B?D/B:1),this.limited&&(E=r.minLeft,W=r.minTop,H=E+Math.min(o.width,n.width,n.left+n.width),N=W+Math.min(o.height,n.height,n.top+n.height));var z=h[Object.keys(h)[0]],Y={x:z.endX-z.startX,y:z.endY-z.startY},X=function(t){switch(t){case f:O+Y.x>H&&(Y.x=H-O);break;case v:l+Y.x<E&&(Y.x=E-l);break;case b:d+Y.y<W&&(Y.y=W-d);break;case w:T+Y.y>N&&(Y.y=N-T)}};switch(s){case p:l+=Y.x,d+=Y.y;break;case f:if(Y.x>=0&&(O>=H||c&&(d<=W||T>=N))){L=!1;break}X(f),(D+=Y.x)<0&&(s=v,l-=D=-D),c&&(B=D/c,d+=(r.height-B)/2);break;case b:if(Y.y<=0&&(d<=W||c&&(l<=E||O>=H))){L=!1;break}X(b),B-=Y.y,d+=Y.y,B<0&&(s=w,d-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case v:if(Y.x<=0&&(l<=E||c&&(d<=W||T>=N))){L=!1;break}X(v),D-=Y.x,l+=Y.x,D<0&&(s=f,l-=D=-D),c&&(B=D/c,d+=(r.height-B)/2);break;case w:if(Y.y>=0&&(T>=N||c&&(l<=E||O>=H))){L=!1;break}X(w),(B+=Y.y)<0&&(s=b,d-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case y:if(c){if(Y.y<=0&&(d<=W||O>=H)){L=!1;break}X(b),B-=Y.y,d+=Y.y,D=B*c}else X(b),X(f),Y.x>=0?O<H?D+=Y.x:Y.y<=0&&d<=W&&(L=!1):D+=Y.x,Y.y<=0?d>W&&(B-=Y.y,d+=Y.y):(B-=Y.y,d+=Y.y);D<0&&B<0?(s=C,d-=B=-B,l-=D=-D):D<0?(s=x,l-=D=-D):B<0&&(s=M,d-=B=-B);break;case x:if(c){if(Y.y<=0&&(d<=W||l<=E)){L=!1;break}X(b),B-=Y.y,d+=Y.y,D=B*c,l+=r.width-D}else X(b),X(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y<=0&&d<=W&&(L=!1):(D-=Y.x,l+=Y.x),Y.y<=0?d>W&&(B-=Y.y,d+=Y.y):(B-=Y.y,d+=Y.y);D<0&&B<0?(s=M,d-=B=-B,l-=D=-D):D<0?(s=y,l-=D=-D):B<0&&(s=C,d-=B=-B);break;case C:if(c){if(Y.x<=0&&(l<=E||T>=N)){L=!1;break}X(v),D-=Y.x,l+=Y.x,B=D/c}else X(w),X(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y>=0&&T>=N&&(L=!1):(D-=Y.x,l+=Y.x),Y.y>=0?T<N&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=y,d-=B=-B,l-=D=-D):D<0?(s=M,l-=D=-D):B<0&&(s=x,d-=B=-B);break;case M:if(c){if(Y.x>=0&&(O>=H||T>=N)){L=!1;break}X(f),B=(D+=Y.x)/c}else X(w),X(f),Y.x>=0?O<H?D+=Y.x:Y.y>=0&&T>=N&&(L=!1):D+=Y.x,Y.y>=0?T<N&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=x,d-=B=-B,l-=D=-D):D<0?(s=C,l-=D=-D):B<0&&(s=y,d-=B=-B);break;case u:this.move(Y.x,Y.y),L=!1;break;case g:this.zoom(function(t){var i=e({},t),a=0;return lt(t,function(t,e){delete i[e],lt(i,function(e){var i=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(i*i+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;Math.abs(s)>Math.abs(a)&&(a=s)})}),a}(h),t),L=!1;break;case m:if(!Y.x||!Y.y){L=!1;break}i=Tt(this.cropper),l=z.startX-i.left,d=z.startY-i.top,D=r.minWidth,B=r.minHeight,Y.x>0?s=Y.y>0?M:y:Y.x<0&&(l-=D,s=Y.y>0?C:x),Y.y<0&&(d-=B),this.cropped||(vt(this.cropBox,k),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}L&&(r.width=D,r.height=B,r.left=l,r.top=d,this.action=s,this.renderCropBox()),lt(h,function(t){t.startX=t.endX,t.startY=t.endY})}},Ut={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ft(this.dragBox,E),vt(this.cropBox,k),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=dt({},this.initialImageData),this.canvasData=dt({},this.initialCanvasData),this.cropBoxData=dt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(dt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),vt(this.dragBox,E),ft(this.cropBox,k)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,lt(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,vt(this.cropper,B)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ft(this.cropper,B)),this},destroy:function(){var t=this.element;return t[d]?(t[d]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(at(t)?t:a+Number(t),at(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(et(t)&&(i.left=t,a=!0),et(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===Ot(this.element,K,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=Tt(this.cropper),m=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return lt(t,function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1}),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((m.pageX-p.left-n.left)/o),n.top-=(l-r)*((m.pageY-p.top-n.top)/r)}else rt(e)&&et(e.x)&&et(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return et(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,et(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(et(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(et(t)&&(i.scaleX=t,a=!0),et(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(lt(t,function(e,i){t[i]=e/r}),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&rt(t)){var o=!1;e.rotatable&&et(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(et(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),et(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;et(t.x)&&(n.left=t.x*r+a.left),et(t.y)&&(n.top=t.y*r+a.top),et(t.width)&&(n.width=t.width*r),et(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?dt({},this.containerData):{}},getImageData:function(){return this.sized?dt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&<(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(et(t.left)&&(e.left=t.left),et(t.top)&&(e.top=t.top),et(t.width)?(e.width=t.width,e.height=t.width/i):et(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(et(t.left)&&(a.left=t.left),et(t.top)&&(a.top=t.top),et(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),et(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,a){var n=e.aspectRatio,r=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,m=void 0===p?1:p,u=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,y=void 0===b||b,x=a.imageSmoothingQuality,M=void 0===x?"low":x,C=a.maxWidth,D=void 0===C?1/0:C,B=a.maxHeight,k=void 0===B?1/0:B,O=a.minWidth,T=void 0===O?0:O,E=a.minHeight,W=void 0===E?0:E,H=document.createElement("canvas"),N=H.getContext("2d"),L=Yt({aspectRatio:u,width:D,height:k}),z=Yt({aspectRatio:u,width:T,height:W},"cover"),Y=Math.min(L.width,Math.max(z.width,g)),X=Math.min(L.height,Math.max(z.height,f)),R=Yt({aspectRatio:n,width:D,height:k}),S=Yt({aspectRatio:n,width:T,height:W},"cover"),j=Math.min(R.width,Math.max(S.width,r)),A=Math.min(R.height,Math.max(S.height,h)),P=[-j/2,-A/2,j,A];return H.width=mt(Y),H.height=mt(X),N.fillStyle=w,N.fillRect(0,0,Y,X),N.save(),N.translate(Y/2,X/2),N.rotate(c*Math.PI/180),N.scale(d,m),N.imageSmoothingEnabled=y,N.imageSmoothingQuality=M,N.drawImage.apply(N,[t].concat(o(P.map(function(t){return Math.floor(mt(t))})))),N.restore(),H}(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(t.rounded),n=a.x,r=a.y,h=a.width,s=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,h*=c,s*=c);var l=h/s,d=Yt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Yt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),m=Yt({aspectRatio:l,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),u=m.width,g=m.height;u=Math.min(d.width,Math.max(p.width,u)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=mt(u),f.height=mt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,u,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,y&&(v.imageSmoothingQuality=y);var x,M,C,D,B,k,O=i.width,T=i.height,E=n,W=r;E<=-h||E>O?(E=0,x=0,C=0,B=0):E<=0?(C=-E,E=0,B=x=Math.min(O,h+E)):E<=O&&(C=0,B=x=Math.min(h,O-E)),x<=0||W<=-s||W>T?(W=0,M=0,D=0,k=0):W<=0?(D=-W,W=0,k=M=Math.min(T,s+W)):W<=T&&(D=0,k=M=Math.min(s,T-W));var H=[E,W,x,M];if(B>0&&k>0){var N=u/h;H.push(C*N,D*N,B*N,k*N)}return v.drawImage.apply(v,[i].concat(o(H.map(function(t){return Math.floor(mt(t))})))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||at(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===L,o=e.movable&&t===z;t=n||o?t:Y,e.dragMode=t,Mt(i,H,t),wt(i,D,n),wt(i,W,o),e.cropBoxMovable||(Mt(a,H,t),wt(a,D,n),wt(a,W,o))}return this}},qt=s.Cropper,$t=/* @__PURE__ */function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!J.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=dt({},_,rt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return e=t,a=[{key:"noConflict",value:function(){return window.Cropper=qt,t}},{key:"setDefaults",value:function(t){dt(_,rt(t)&&t)}}],(i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[d]){if(e[d]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(V.test(t))F.test(t)?this.read((n=t.replace(Rt,""),o=atob(n),r=new ArrayBuffer(o.length),lt(h=new Uint8Array(r),function(t,e){h[e]=o.charCodeAt(e)}),r)):this.clone();else{var n,o,r,h,s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==Z&&s.abort()},s.onload=function(){e.read(s.response)},s.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&Ht(t)&&i.crossOrigin&&(t=Nt(t)),s.open("GET",t,!0),s.responseType="arraybuffer",s.withCredentials="use-credentials"===i.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=function(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Xt(t.getUint8(n));return a}(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,m=i.getUint16(o,a);for(p=0;p<m;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(u){e=1}return e}(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(Xt.apply(null,ct(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,Z);var h=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&Ht(e)&&(i||(i="anonymous"),a=Nt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),ft(n,O),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=s.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(s.navigator.userAgent),a=function(e,i){dt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=dt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=n.querySelector(".".concat(d,"-container")),r=o.querySelector(".".concat(d,"-canvas")),h=o.querySelector(".".concat(d,"-drag-box")),s=o.querySelector(".".concat(d,"-crop-box")),c=s.querySelector(".".concat(d,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(d,"-view-box")),this.face=c,r.appendChild(i),ft(t,k),a.insertBefore(o,t.nextSibling),vt(i,O),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,ft(s,k),e.guides||ft(s.getElementsByClassName("".concat(d,"-dashed")),k),e.center||ft(s.getElementsByClassName("".concat(d,"-center")),k),e.background&&ft(o,"".concat(d,"-bg")),e.highlight||ft(c,T),e.cropBoxMovable&&(ft(c,W),Mt(c,H,p)),e.cropBoxResizable||(ft(s.getElementsByClassName("".concat(d,"-line")),k),ft(s.getElementsByClassName("".concat(d,"-point")),k)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),ht(e.ready)&&kt(t,q,e.ready,{once:!0}),Ot(t,q)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),vt(this.element,k)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();return dt($t.prototype,St,jt,At,Pt,It,Ut),$t},"object"==typeof t&&void 0!==e?e.exports=a():"function"==typeof define&&define.amd?define(a):(i="undefined"!=typeof globalThis?globalThis:i||self).Cropper=a()});export default e();
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
2
|
+
import{t}from"./chunk-CeX__g8u.js";var e=/* @__PURE__ */t((t,e)=>{var i,a;i=t,a=function(){function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,a)}return i}function e(e){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?t(Object(n),!0).forEach(function(t){var a,o,r;a=e,o=t,r=n[t],(o=i(o))in a?Object.defineProperty(a,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[o]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var h="undefined"!=typeof window&&void 0!==window.document,s=h?window:{},c=!(!h||!s.document.documentElement)&&"ontouchstart"in s.document.documentElement,l=!!h&&"PointerEvent"in s,d="cropper",p="all",m="crop",u="move",g="zoom",f="e",v="w",w="s",b="n",y="ne",x="nw",M="se",C="sw",D="".concat(d,"-crop"),B="".concat(d,"-disabled"),k="".concat(d,"-hidden"),O="".concat(d,"-hide"),T="".concat(d,"-invisible"),E="".concat(d,"-modal"),W="".concat(d,"-move"),H="".concat(d,"Action"),N="".concat(d,"Preview"),L="crop",z="move",Y="none",X="crop",R="cropend",S="cropmove",j="cropstart",A="dblclick",P=l?"pointerdown":c?"touchstart":"mousedown",I=l?"pointermove":c?"touchmove":"mousemove",U=l?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",q="ready",$="resize",Q="wheel",K="zoom",Z="image/jpeg",G=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,V=/^data:/,F=/^data:image\/jpeg;base64,/,J=/^img|canvas$/i,_={viewMode:0,dragMode:L,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tt=Number.isNaN||s.isNaN;function et(t){return"number"==typeof t&&!tt(t)}var it=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function nt(t){return"object"===a(t)&&null!==t}var ot=Object.prototype.hasOwnProperty;function rt(t){if(!nt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&ot.call(i,"isPrototypeOf")}catch(a){return!1}}function ht(t){return"function"==typeof t}var st=Array.prototype.slice;function ct(t){return Array.from?Array.from(t):st.call(t)}function lt(t,e){return t&&ht(e)&&(Array.isArray(t)||et(t.length)?ct(t).forEach(function(i,a){e.call(t,i,a,t)}):nt(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var dt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return nt(t)&&i.length>0&&i.forEach(function(e){nt(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},pt=/\.\d*(?:0|9){12}\d*$/;function mt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return pt.test(t)?Math.round(t*e)/e:t}var ut=/^width|height|left|top|marginLeft|marginTop$/;function gt(t,e){var i=t.style;lt(e,function(t,e){ut.test(e)&&et(t)&&(t="".concat(t,"px")),i[e]=t})}function ft(t,e){if(e)if(et(t.length))lt(t,function(t){ft(t,e)});else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function vt(t,e){e&&(et(t.length)?lt(t,function(t){vt(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function wt(t,e,i){e&&(et(t.length)?lt(t,function(t){wt(t,e,i)}):i?ft(t,e):vt(t,e))}var bt=/([a-z\d])([A-Z])/g;function yt(t){return t.replace(bt,"$1-$2").toLowerCase()}function xt(t,e){return nt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(yt(e)))}function Mt(t,e,i){nt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(yt(e)),i)}var Ct=/\s\s*/,Dt=function(){var t=!1;if(h){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});s.addEventListener("test",i,a),s.removeEventListener("test",i,a)}return t}();function Bt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(!Dt){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)})}function kt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Ct).forEach(function(e){if(a.once&&!Dt){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)})}function Ot(t,e,i){var a;return ht(Event)&&ht(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Tt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Et=s.location,Wt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Ht(t){var e=t.match(Wt);return null!==e&&(e[1]!==Et.protocol||e[2]!==Et.hostname||e[3]!==Et.port)}function Nt(t){var e="timestamp=".concat(/* @__PURE__ */(new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Lt(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];et(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),et(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),et(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),et(i)&&1!==i&&r.push("scaleX(".concat(i,")")),et(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function zt(t,i){var a=t.pageX,n=t.pageY,o={endX:a,endY:n};return i?o:e({startX:a,startY:n},o)}function Yt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=it(a),r=it(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}var Xt=String.fromCharCode,Rt=/^data:.*,/;var St={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper,n=Number(e.minContainerWidth),o=Number(e.minContainerHeight);ft(a,k),vt(t,k);var r={width:Math.max(i.offsetWidth,n>=0?n:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,gt(a,{width:r.width,height:r.height}),ft(t,k),vt(a,k)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=dt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=Yt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,m=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,m),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,m),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,m),n.maxTop=Math.max(0,m))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,gt(this.canvas,dt({width:i.width,height:i.height},Lt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);dt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),gt(this.image,dt({width:i.width,height:i.height},Lt(dt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=dt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&Mt(this.face,H,i.width>=e.width&&i.height>=e.height?u:p),gt(this.cropBox,dt({width:i.width,height:i.height},Lt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Ot(this.element,X,this.getData())}},jt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,lt(r,function(t){var i=document.createElement("img");Mt(t,N,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)})}},resetPreview:function(){lt(this.previews,function(t){var e=xt(t,N);gt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(nt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(yt(e)))}(t,N)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(gt(this.viewBoxImage,dt({width:o,height:r},Lt(dt({translateX:-h,translateY:-s},t)))),lt(this.previews,function(e){var i=xt(e,N),c=i.width,l=i.height,d=c,p=l,m=1;a&&(p=n*(m=c/a)),n&&p>l&&(d=a*(m=l/n),p=l),gt(e,{width:d,height:p}),gt(e.getElementsByTagName("img")[0],dt({width:o*m,height:r*m},Lt(dt({translateX:-h*m,translateY:-s*m},t))))}))}},At={bind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&kt(t,j,e.cropstart),ht(e.cropmove)&&kt(t,S,e.cropmove),ht(e.cropend)&&kt(t,R,e.cropend),ht(e.crop)&&kt(t,X,e.crop),ht(e.zoom)&&kt(t,K,e.zoom),kt(i,P,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&kt(i,Q,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&kt(i,A,this.onDblclick=this.dblclick.bind(this)),kt(t.ownerDocument,I,this.onCropMove=this.cropMove.bind(this)),kt(t.ownerDocument,U,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&kt(window,$,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;ht(e.cropstart)&&Bt(t,j,e.cropstart),ht(e.cropmove)&&Bt(t,S,e.cropmove),ht(e.cropend)&&Bt(t,R,e.cropend),ht(e.crop)&&Bt(t,X,e.crop),ht(e.zoom)&&Bt(t,K,e.zoom),Bt(i,P,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Bt(i,Q,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Bt(i,A,this.onDblclick),Bt(t.ownerDocument,I,this.onCropMove),Bt(t.ownerDocument,U,this.onCropEnd),e.responsive&&Bt(window,$,this.onResize)}},Pt={resize:function(){if(!this.disabled){var t,e,i=this.options,a=this.container,n=this.containerData,o=a.offsetWidth/n.width,r=a.offsetHeight/n.height,h=Math.abs(o-1)>Math.abs(r-1)?o:r;1!==h&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(lt(t,function(e,i){t[i]=e*h})),this.setCropBoxData(lt(e,function(t,i){e[i]=t*h}))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===Y||this.setDragMode((t=this.dragBox,e=D,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?z:L))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(et(e)&&1!==e||et(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){o[t.identifier]=zt(t)}):o[t.pointerId||0]=zt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?g:xt(t.target,H),G.test(a)&&!1!==Ot(this.element,j,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===m&&(this.cropping=!0,ft(this.dragBox,E)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Ot(this.element,S,{originalEvent:t,action:e})&&(t.changedTouches?lt(t.changedTouches,function(t){dt(i[t.identifier]||{},zt(t,!0))}):dt(i[t.pointerId||0]||{},zt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?lt(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,wt(this.dragBox,E,this.cropped&&this.options.modal)),Ot(this.element,R,{originalEvent:t,action:e}))}}},It={change:function(t){var i,a=this.options,n=this.canvasData,o=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=a.aspectRatio,l=r.left,d=r.top,D=r.width,B=r.height,O=l+D,T=d+B,E=0,W=0,H=o.width,N=o.height,L=!0;!c&&t.shiftKey&&(c=D&&B?D/B:1),this.limited&&(E=r.minLeft,W=r.minTop,H=E+Math.min(o.width,n.width,n.left+n.width),N=W+Math.min(o.height,n.height,n.top+n.height));var z=h[Object.keys(h)[0]],Y={x:z.endX-z.startX,y:z.endY-z.startY},X=function(t){switch(t){case f:O+Y.x>H&&(Y.x=H-O);break;case v:l+Y.x<E&&(Y.x=E-l);break;case b:d+Y.y<W&&(Y.y=W-d);break;case w:T+Y.y>N&&(Y.y=N-T)}};switch(s){case p:l+=Y.x,d+=Y.y;break;case f:if(Y.x>=0&&(O>=H||c&&(d<=W||T>=N))){L=!1;break}X(f),(D+=Y.x)<0&&(s=v,l-=D=-D),c&&(B=D/c,d+=(r.height-B)/2);break;case b:if(Y.y<=0&&(d<=W||c&&(l<=E||O>=H))){L=!1;break}X(b),B-=Y.y,d+=Y.y,B<0&&(s=w,d-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case v:if(Y.x<=0&&(l<=E||c&&(d<=W||T>=N))){L=!1;break}X(v),D-=Y.x,l+=Y.x,D<0&&(s=f,l-=D=-D),c&&(B=D/c,d+=(r.height-B)/2);break;case w:if(Y.y>=0&&(T>=N||c&&(l<=E||O>=H))){L=!1;break}X(w),(B+=Y.y)<0&&(s=b,d-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case y:if(c){if(Y.y<=0&&(d<=W||O>=H)){L=!1;break}X(b),B-=Y.y,d+=Y.y,D=B*c}else X(b),X(f),Y.x>=0?O<H?D+=Y.x:Y.y<=0&&d<=W&&(L=!1):D+=Y.x,Y.y<=0?d>W&&(B-=Y.y,d+=Y.y):(B-=Y.y,d+=Y.y);D<0&&B<0?(s=C,d-=B=-B,l-=D=-D):D<0?(s=x,l-=D=-D):B<0&&(s=M,d-=B=-B);break;case x:if(c){if(Y.y<=0&&(d<=W||l<=E)){L=!1;break}X(b),B-=Y.y,d+=Y.y,D=B*c,l+=r.width-D}else X(b),X(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y<=0&&d<=W&&(L=!1):(D-=Y.x,l+=Y.x),Y.y<=0?d>W&&(B-=Y.y,d+=Y.y):(B-=Y.y,d+=Y.y);D<0&&B<0?(s=M,d-=B=-B,l-=D=-D):D<0?(s=y,l-=D=-D):B<0&&(s=C,d-=B=-B);break;case C:if(c){if(Y.x<=0&&(l<=E||T>=N)){L=!1;break}X(v),D-=Y.x,l+=Y.x,B=D/c}else X(w),X(v),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y>=0&&T>=N&&(L=!1):(D-=Y.x,l+=Y.x),Y.y>=0?T<N&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=y,d-=B=-B,l-=D=-D):D<0?(s=M,l-=D=-D):B<0&&(s=x,d-=B=-B);break;case M:if(c){if(Y.x>=0&&(O>=H||T>=N)){L=!1;break}X(f),B=(D+=Y.x)/c}else X(w),X(f),Y.x>=0?O<H?D+=Y.x:Y.y>=0&&T>=N&&(L=!1):D+=Y.x,Y.y>=0?T<N&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=x,d-=B=-B,l-=D=-D):D<0?(s=C,l-=D=-D):B<0&&(s=y,d-=B=-B);break;case u:this.move(Y.x,Y.y),L=!1;break;case g:this.zoom(function(t){var i=e({},t),a=0;return lt(t,function(t,e){delete i[e],lt(i,function(e){var i=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(i*i+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;Math.abs(s)>Math.abs(a)&&(a=s)})}),a}(h),t),L=!1;break;case m:if(!Y.x||!Y.y){L=!1;break}i=Tt(this.cropper),l=z.startX-i.left,d=z.startY-i.top,D=r.minWidth,B=r.minHeight,Y.x>0?s=Y.y>0?M:y:Y.x<0&&(l-=D,s=Y.y>0?C:x),Y.y<0&&(d-=B),this.cropped||(vt(this.cropBox,k),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}L&&(r.width=D,r.height=B,r.left=l,r.top=d,this.action=s,this.renderCropBox()),lt(h,function(t){t.startX=t.endX,t.startY=t.endY})}},Ut={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ft(this.dragBox,E),vt(this.cropBox,k),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=dt({},this.initialImageData),this.canvasData=dt({},this.initialCanvasData),this.cropBoxData=dt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(dt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),vt(this.dragBox,E),ft(this.cropBox,k)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,lt(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,vt(this.cropper,B)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ft(this.cropper,B)),this},destroy:function(){var t=this.element;return t[d]?(t[d]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(at(t)?t:a+Number(t),at(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(et(t)&&(i.left=t,a=!0),et(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===Ot(this.element,K,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=Tt(this.cropper),m=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return lt(t,function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1}),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((m.pageX-p.left-n.left)/o),n.top-=(l-r)*((m.pageY-p.top-n.top)/r)}else rt(e)&&et(e.x)&&et(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return et(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,et(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(et(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(et(t)&&(i.scaleX=t,a=!0),et(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(lt(t,function(e,i){t[i]=e/r}),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&rt(t)){var o=!1;e.rotatable&&et(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(et(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),et(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;et(t.x)&&(n.left=t.x*r+a.left),et(t.y)&&(n.top=t.y*r+a.top),et(t.width)&&(n.width=t.width*r),et(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?dt({},this.containerData):{}},getImageData:function(){return this.sized?dt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&<(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(et(t.left)&&(e.left=t.left),et(t.top)&&(e.top=t.top),et(t.width)?(e.width=t.width,e.height=t.width/i):et(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(et(t.left)&&(a.left=t.left),et(t.top)&&(a.top=t.top),et(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),et(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,a){var n=e.aspectRatio,r=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,m=void 0===p?1:p,u=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,y=void 0===b||b,x=a.imageSmoothingQuality,M=void 0===x?"low":x,C=a.maxWidth,D=void 0===C?1/0:C,B=a.maxHeight,k=void 0===B?1/0:B,O=a.minWidth,T=void 0===O?0:O,E=a.minHeight,W=void 0===E?0:E,H=document.createElement("canvas"),N=H.getContext("2d"),L=Yt({aspectRatio:u,width:D,height:k}),z=Yt({aspectRatio:u,width:T,height:W},"cover"),Y=Math.min(L.width,Math.max(z.width,g)),X=Math.min(L.height,Math.max(z.height,f)),R=Yt({aspectRatio:n,width:D,height:k}),S=Yt({aspectRatio:n,width:T,height:W},"cover"),j=Math.min(R.width,Math.max(S.width,r)),A=Math.min(R.height,Math.max(S.height,h)),P=[-j/2,-A/2,j,A];return H.width=mt(Y),H.height=mt(X),N.fillStyle=w,N.fillRect(0,0,Y,X),N.save(),N.translate(Y/2,X/2),N.rotate(c*Math.PI/180),N.scale(d,m),N.imageSmoothingEnabled=y,N.imageSmoothingQuality=M,N.drawImage.apply(N,[t].concat(o(P.map(function(t){return Math.floor(mt(t))})))),N.restore(),H}(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(t.rounded),n=a.x,r=a.y,h=a.width,s=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,h*=c,s*=c);var l=h/s,d=Yt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Yt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),m=Yt({aspectRatio:l,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),u=m.width,g=m.height;u=Math.min(d.width,Math.max(p.width,u)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=mt(u),f.height=mt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,u,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,y&&(v.imageSmoothingQuality=y);var x,M,C,D,B,k,O=i.width,T=i.height,E=n,W=r;E<=-h||E>O?(E=0,x=0,C=0,B=0):E<=0?(C=-E,E=0,B=x=Math.min(O,h+E)):E<=O&&(C=0,B=x=Math.min(h,O-E)),x<=0||W<=-s||W>T?(W=0,M=0,D=0,k=0):W<=0?(D=-W,W=0,k=M=Math.min(T,s+W)):W<=T&&(D=0,k=M=Math.min(s,T-W));var H=[E,W,x,M];if(B>0&&k>0){var N=u/h;H.push(C*N,D*N,B*N,k*N)}return v.drawImage.apply(v,[i].concat(o(H.map(function(t){return Math.floor(mt(t))})))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||at(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===L,o=e.movable&&t===z;t=n||o?t:Y,e.dragMode=t,Mt(i,H,t),wt(i,D,n),wt(i,W,o),e.cropBoxMovable||(Mt(a,H,t),wt(a,D,n),wt(a,W,o))}return this}},qt=s.Cropper,$t=/* @__PURE__ */function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!J.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=dt({},_,rt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return e=t,a=[{key:"noConflict",value:function(){return window.Cropper=qt,t}},{key:"setDefaults",value:function(t){dt(_,rt(t)&&t)}}],(i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[d]){if(e[d]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(V.test(t))F.test(t)?this.read((n=t.replace(Rt,""),o=atob(n),r=new ArrayBuffer(o.length),lt(h=new Uint8Array(r),function(t,e){h[e]=o.charCodeAt(e)}),r)):this.clone();else{var n,o,r,h,s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==Z&&s.abort()},s.onload=function(){e.read(s.response)},s.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&Ht(t)&&i.crossOrigin&&(t=Nt(t)),s.open("GET",t,!0),s.responseType="arraybuffer",s.withCredentials="use-credentials"===i.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=function(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Xt(t.getUint8(n));return a}(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,m=i.getUint16(o,a);for(p=0;p<m;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(u){e=1}return e}(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(Xt.apply(null,ct(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,Z);var h=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&Ht(e)&&(i||(i="anonymous"),a=Nt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),ft(n,O),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=s.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(s.navigator.userAgent),a=function(e,i){dt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=dt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=n.querySelector(".".concat(d,"-container")),r=o.querySelector(".".concat(d,"-canvas")),h=o.querySelector(".".concat(d,"-drag-box")),s=o.querySelector(".".concat(d,"-crop-box")),c=s.querySelector(".".concat(d,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(d,"-view-box")),this.face=c,r.appendChild(i),ft(t,k),a.insertBefore(o,t.nextSibling),vt(i,O),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,ft(s,k),e.guides||ft(s.getElementsByClassName("".concat(d,"-dashed")),k),e.center||ft(s.getElementsByClassName("".concat(d,"-center")),k),e.background&&ft(o,"".concat(d,"-bg")),e.highlight||ft(c,T),e.cropBoxMovable&&(ft(c,W),Mt(c,H,p)),e.cropBoxResizable||(ft(s.getElementsByClassName("".concat(d,"-line")),k),ft(s.getElementsByClassName("".concat(d,"-point")),k)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),ht(e.ready)&&kt(t,q,e.ready,{once:!0}),Ot(t,q)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),vt(this.element,k)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();return dt($t.prototype,St,jt,At,Pt,It,Ut),$t},"object"==typeof t&&void 0!==e?e.exports=a():"function"==typeof define&&define.amd?define(a):(i="undefined"!=typeof globalThis?globalThis:i||self).Cropper=a()});export default e();
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
2
|
+
import{t as e}from"./objectSpread2-C8eu0aH8.js";var n={placeholder:"Zeit auswählen"},a={lang:e({placeholder:"Datum auswählen",rangePlaceholder:["Startdatum","Enddatum"]},{locale:"de_DE",today:"Heute",now:"Jetzt",backToToday:"Zurück zu Heute",ok:"OK",clear:"Zurücksetzen",month:"Monat",year:"Jahr",timeSelect:"Zeit wählen",dateSelect:"Datum wählen",monthSelect:"Wähle einen Monat",yearSelect:"Wähle ein Jahr",decadeSelect:"Wähle ein Jahrzehnt",yearFormat:"YYYY",dateFormat:"D.M.YYYY",dayFormat:"D",dateTimeFormat:"D.M.YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Vorheriger Monat (PageUp)",nextMonth:"Nächster Monat (PageDown)",previousYear:"Vorheriges Jahr (Ctrl + left)",nextYear:"Nächstes Jahr (Ctrl + right)",previousDecade:"Vorheriges Jahrzehnt",nextDecade:"Nächstes Jahrzehnt",previousCentury:"Vorheriges Jahrhundert",nextCentury:"Nächstes Jahrhundert"}),timePickerLocale:e({},n)},t="${label} ist nicht gültig. ${type} erwartet",r={locale:"de",Pagination:{items_per_page:"/ Seite",jump_to:"Gehe zu",jump_to_confirm:"bestätigen",page:"",prev_page:"Vorherige Seite",next_page:"Nächste Seite",prev_5:"5 Seiten zurück",next_5:"5 Seiten vor",prev_3:"3 Seiten zurück",next_3:"3 Seiten vor"},DatePicker:a,TimePicker:n,Calendar:a,global:{placeholder:"Bitte auswählen"},Table:{filterTitle:"Filter-Menü",filterConfirm:"OK",filterReset:"Zurücksetzen",selectAll:"Selektiere Alle",selectInvert:"Selektion Invertieren",selectionAll:"Wählen Sie alle Daten aus",sortTitle:"Sortieren",expand:"Zeile erweitern",collapse:"Zeile reduzieren",triggerDesc:"Klicken zur absteigenden Sortierung",triggerAsc:"Klicken zur aufsteigenden Sortierung",cancelSort:"Klicken zum Abbrechen der Sortierung"},Modal:{okText:"OK",cancelText:"Abbrechen",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Abbrechen"},Transfer:{titles:["",""],searchPlaceholder:"Suchen",itemUnit:"Eintrag",itemsUnit:"Einträge",remove:"Entfernen",selectCurrent:"Alle auf aktueller Seite auswählen",removeCurrent:"Auswahl auf aktueller Seite aufheben",selectAll:"Alle auswählen",removeAll:"Auswahl aufheben",selectInvert:"Auswahl umkehren"},Upload:{uploading:"Hochladen...",removeFile:"Datei entfernen",uploadError:"Fehler beim Hochladen",previewFile:"Dateivorschau",downloadFile:"Download-Datei"},Empty:{description:"Keine Daten"},Text:{edit:"Bearbeiten",copy:"Kopieren",copied:"Kopiert",expand:"Erweitern"},PageHeader:{back:"Zurück"},Form:{defaultValidateMessages:{default:"Feld-Validierungsfehler: ${label}",required:"Bitte geben Sie ${label} an",enum:"${label} muss eines der folgenden sein [${enum}]",whitespace:"${label} darf kein Leerzeichen sein",date:{format:"${label} ist ein ungültiges Datumsformat",parse:"${label} kann nicht in ein Datum umgewandelt werden",invalid:"${label} ist ein ungültiges Datum"},types:{string:t,method:t,array:t,object:t,number:t,date:t,boolean:t,integer:t,float:t,regexp:t,email:t,url:t,hex:t},string:{len:"${label} muss genau ${len} Zeichen lang sein",min:"${label} muss mindestens ${min} Zeichen lang sein",max:"${label} darf höchstens ${max} Zeichen lang sein",range:"${label} muss zwischen ${min} und ${max} Zeichen lang sein"},number:{len:"${label} muss gleich ${len} sein",min:"${label} muss mindestens ${min} sein",max:"${label} darf maximal ${max} sein",range:"${label} muss zwischen ${min} und ${max} liegen"},array:{len:"Es müssen ${len} ${label} sein",min:"Es müssen mindestens ${min} ${label} sein",max:"Es dürfen maximal ${max} ${label} sein",range:"Die Anzahl an ${label} muss zwischen ${min} und ${max} liegen"},pattern:{mismatch:"${label} enspricht nicht dem ${pattern} Muster"}}},Image:{preview:"Vorschau"}};export{r as default};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
1
2
|
function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(r,o,e){return(o=function(r){var o=function(r){if("object"!=t(r)||!r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var e=o.call(r,"string");if("object"!=t(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r);return"symbol"==t(o)?o:o+""}(o))in r?Object.defineProperty(r,o,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[o]=e,r}export{r as t};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
2
|
+
import{n as e}from"./chunk-CeX__g8u.js";import{t as a}from"./hooks-DXW0t29_.js";import{FIELD_TYPE as l,t as s,useNamespace as t}from"@gct-paas/core";import{createVNode as n,defineComponent as i,ref as o,resolveComponent as d,watch as r}from"vue";import{clone as c}from"lodash-es";var u=/* @__PURE__ */e({DiagramConfigItem:()=>h,default:()=>h}),h=/* @__PURE__ */i({name:"DiagramConfigItem",props:{i:{type:Number,required:!0},isEnd:{type:Boolean,required:!0},data:{type:Object,required:!0}},setup(e){const s=t("diagram-config-item"),n=o(e.data.value||null);r(e.data,()=>{n.value=e.data.value||null});const i=[l.REF,l.REF_MULTI,l.RDO_REF,l.MASTERSLAVE],d=a(),u=o({}),h=o([]);return(async()=>{u.value=await d.getModel(e.data.modelKey),u.value.fieldMetaList&&u.value.fieldMetaList.filter(e=>i.includes(e.type)).forEach(e=>{h.value.push({id:e.id,label:e.name,value:e.key,refModelKey:e.bindInfo})})})(),{ns:s,c:d,select:n,model:u,options:h,onChange:(a,l)=>{const s=c(e.data);s.value&&d.node.cache.clear(s),l?Object.assign(s,{modelCategory:u.value.modelCategory??"entity",value:a,label:l.label,id_:l.id}):Object.assign(s,{modelCategory:null,value:null,label:null,id_:null}),d.node.update(s),a&&d.node.cache.reset(s),!d.link.getBySource(e.data.id)&&l&&d.node.create({modelKey:l.refModelKey})}}},render(){return n("div",{class:this.ns.b()},[n("div",{class:this.ns.b("title")},[n("span",null,[this.model.name])]),n("div",{class:[this.ns.b("content")]},[this.isEnd?n("div",{class:this.ns.e("end")},[n("div",{class:this.ns.em("end","line")},null),n("div",{class:this.ns.em("end","label")},[s("sys.pageDesigner.end")])]):!0!==this.data.noSelectField?n(d("a-select"),{class:[this.ns.b("select"),this.ns.is("select",!!this.select),"handle-select"],value:this.select,"onUpdate:value":e=>this.select=e,options:this.options,placeholder:s("sys.pageDesigner.dataLinkage.selectPlaceholder"),allowClear:!0,onChange:this.onChange},null):null])])}});export{u as n,h as t};
|
package/dist/{diagram-config-item-reverse-ChoxnW-Z.js → diagram-config-item-reverse-DWH-lRVD.js}
RENAMED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
2
|
+
import{n as e}from"./chunk-CeX__g8u.js";import{o as a,s as l,t}from"./hooks-DXW0t29_.js";import{t as s,useNamespace as n}from"@gct-paas/core";import{createVNode as o,defineComponent as d,ref as i,resolveComponent as u,watch as c}from"vue";import{clone as r}from"lodash-es";var v=/* @__PURE__ */e({DiagramConfigItemReverse:()=>g,default:()=>g}),g=/* @__PURE__ */d({name:"DiagramConfigItemReverse",props:{i:{type:Number,required:!0},data:{type:Object,required:!0}},setup(e){const s=n("diagram-config-item-reverse"),o=t(),d=i([]),u=i(e.data.modelKey||null),v=i(e.data.value||null),g=i([]),m=i([]);c(e.data,()=>{u.value=e.data.modelKey||null,v.value=e.data.value||null,f()});const p=e=>{if(e){const a=e.data;a.fieldMetaList&&(m.value=a.fieldMetaList.map(e=>({label:e.name,value:e.key,data:e})))}},h=async()=>{if(v.value){if(o.link.getByTarget(e.data.id))return;const t=await o.getModelList(u.value,v.value);t&&t.length>0&&o.node.create({type:l.REVERSE,reverse:!0},{type:a.VIRTUAL,reverse:!0,dashed:!0})}},y=()=>{const a=o.link.getBySource(e.data.id);if(a){const e=o.node.get(a.target,0,!0);e&&e.type===l.DEFAULT&&(v.value?o.node.update(Object.assign(e,{value:null,label:null,noSelectField:!0})):o.node.update(Object.assign(e,{value:null,label:null,noSelectField:!1})))}},f=()=>{const l=o.link.getBySource(e.data.id);if(l){const e=r(l);v.value?e.type=a.DEFAULT:e.type=a.VIRTUAL,o.link.update(e);const t=o.node.get(l.target);t&&o.node.update({...t,noSelectField:!0})}},b=async()=>{const a=o.link.getBySource(e.data.id);if(a){const e=o.node.get(a.target);e&&(d.value=await o.getModelList(e.modelKey,e.value),g.value=d.value.map(e=>({value:e.key,label:e.name,data:e})))}};return(async()=>{if(e.data.modelKey){await b();const a=g.value.find(a=>a.value===e.data.modelKey);a&&p(a)}})(),{ns:s,modelSelect:u,select:v,modelOptions:g,options:m,onModelChange:(a,l)=>{m.value=[],u.value=a,v.value=null;const t=r(e.data);o.node.cache.reverseClear(t),o.node.update(Object.assign(t,{modelKey:a??null,modelCategory:l?l.data.modelCategory??"entity":"entity",value:null,label:null})),a&&o.node.cache.reverseReset(t),m.value=[],p(l),y(),h(),f()},onChange:(a,l)=>{v.value=a;const t=r(e.data);t.value&&o.node.cache.clear(t),a?o.node.update(Object.assign(t,{value:a,label:l.label})):o.node.update(Object.assign(t,{value:null,label:null})),a&&o.node.cache.reset(t),y(),h(),f()},onModelFocus:b}},render(){return o("div",{class:this.ns.b()},[o("div",{class:[this.ns.e("title"),this.ns.e("model-select")]},[o(u("a-select"),{size:"small",allowClear:!0,placeholder:s("sys.pageDesigner.selectModel"),value:this.modelSelect,options:this.modelOptions,onChange:(e,a)=>this.onModelChange(e,a),onFocus:()=>this.onModelFocus()},null)]),o("div",{class:[this.ns.e("select")]},[o(u("a-select"),{class:"handle-select",allowClear:!0,placeholder:s("sys.pageDesigner.dataLinkage.selectPlaceholder"),value:this.select,options:this.options,onChange:(e,a)=>this.onChange(e,a),disabled:!this.modelSelect},null)])])}});export{v as n,g as t};
|
package/dist/{diagram-config-item-virtual-Cbmggfwt.js → diagram-config-item-virtual-qW8Ufx3F.js}
RENAMED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.14 */
|
|
2
|
+
import{n as t}from"./chunk-CeX__g8u.js";import{o as e,t as i}from"./hooks-DXW0t29_.js";import{useNamespace as s}from"@gct-paas/core";import{createVNode as r,defineComponent as n,nextTick as a,onMounted as o,onUnmounted as c}from"vue";var h=class{constructor(){this.map=/* @__PURE__ */new Map,this.maxListeners=100}setMaxListeners(t){this.maxListeners=t}getSize(t){return this.map.has(t)?this.map.get(t).length:0}addListener(t,e){if(e instanceof Function){this.map.has(t)||this.map.set(t,[]);const i=this.map.get(t);if(!(i.length<this.maxListeners))throw new Error(`事件监听已达最大上限[${this.maxListeners}],无法新增监听!`);i.push(e)}}removeListener(t,e){if(this.map.has(t)){const i=this.map.get(t);if(i.length>0)for(let t=0;t<i.length;t++)if(i[t]===e){i.splice(t,1);break}}}emit(t,...e){this.map.has(t)&&this.map.get(t).forEach(t=>{t(...e)})}async asyncEmit(t,...e){if(this.map.has(t)){const i=this.map.get(t).map(t=>t(...e));return Promise.all(i)}return[]}reset(){this.map.forEach(t=>{!function(t){if(t instanceof Array)t&&t.length>0&&t.splice(0,t.length);else if(t instanceof Object&&t)for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&delete t[e]}(t)}),this.map.clear()}},m=class{constructor(t){this.e=new h,this.e.setMaxListeners(t||300)}getSize(t){return this.e.getSize(t)}on(t,e){this.e.addListener(t,e)}off(t,e){this.e.removeListener(t,e)}emit(t,...e){this.e.emit(t,...e)}asyncEmit(t,...e){return this.e.asyncEmit(t,...e)}reset(){this.e.reset()}},{toString:p}=Object.prototype;function u(t){return"[object AsyncFunction]"===p.call(t)}function f(t){return"[object Promise]"===p.call(t)}function l(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var g=/* @__PURE__ */t({DiagramConfigItemVirtual:()=>d,default:()=>d}),d=/* @__PURE__ */n({name:"DiagramConfigItemVirtual",props:{i:{type:Number,required:!0},beforeNodeId:{type:String,required:!0},id:{type:String,required:!0}},setup(t){const n=s("diagram-config-item-virtual"),h=i(),m={id:`${l()+l()}-${l()}-${l()}-${l()}-${l()}${l()}${l()}`,i:t.i-1,source:t.beforeNodeId,target:t.id,type:e.VIRTUAL,return:t.i%h.config.lineCount===0,startLine:Math.floor((t.i-1)/3)+1};return o(()=>{a(()=>{h.connect(m)})}),c(()=>{h.disconnect(m)}),()=>r("div",{class:n.b()},null)}});export{m as a,f as i,g as n,u as r,d as t};
|