@ucap-llm/ai-ui 1.2.19 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/{_basePickBy-B6sOjL2l.mjs → _basePickBy-CdABVITC.mjs} +2 -2
- package/ai-ui.es.js +1 -1
- package/ai-ui.umd.js +11 -11
- package/{arc-BvIN1y6D.mjs → arc-DXhvoOg0.mjs} +1 -1
- package/{architecture-4AB2E3PP-B1ix1jLZ.mjs → architecture-4AB2E3PP-Cbaf8jl_.mjs} +1 -1
- package/{architectureDiagram-IEHRJDOE-C-7GZx5M.mjs → architectureDiagram-IEHRJDOE-CiI56Mah.mjs} +4 -4
- package/{blockDiagram-JOT3LUYC-C_9UDyAi.mjs → blockDiagram-JOT3LUYC-BQaxivV1.mjs} +4 -4
- package/{c4Diagram-VJAJSXHY-CMGkC755.mjs → c4Diagram-VJAJSXHY-BcIcIDWA.mjs} +2 -2
- package/{channel-BnlL8rm3.mjs → channel-DhzJqsSD.mjs} +1 -1
- package/{chunk-4BMEZGHF-DRVc6zTt.mjs → chunk-4BMEZGHF-CbKAC0tE.mjs} +1 -1
- package/{chunk-A2AXSNBT-DYvXCsrT.mjs → chunk-A2AXSNBT-CnIBL4XX.mjs} +2 -2
- package/{chunk-AEK57VVT-BZsTPWyV.mjs → chunk-AEK57VVT-DP7QJrvj.mjs} +2 -2
- package/{chunk-D6G4REZN-DHhLQ0GZ.mjs → chunk-D6G4REZN-CVAOGS08.mjs} +1 -1
- package/{chunk-RZ5BOZE2-C2xEd3n3.mjs → chunk-RZ5BOZE2-C2kQV3t7.mjs} +1 -1
- package/{chunk-XZIHB7SX-BAbcnwFi.mjs → chunk-XZIHB7SX--BwIHwbE.mjs} +1 -1
- package/{classDiagram-GIVACNV2-BALpfMBm.mjs → classDiagram-GIVACNV2-Bj6_602u.mjs} +2 -2
- package/{classDiagram-v2-COTLJTTW-BALpfMBm.mjs → classDiagram-v2-COTLJTTW-Bj6_602u.mjs} +2 -2
- package/{clone-Bq2JgnPb.mjs → clone-FnGPaARP.mjs} +1 -1
- package/{dagre-OKDRZEBW-Dz-1TKFU.mjs → dagre-OKDRZEBW-DqIaIWDk.mjs} +6 -6
- package/{diagram-SSKATNLV-CpESCl29.mjs → diagram-SSKATNLV-Ds6ExFpI.mjs} +3 -3
- package/{diagram-VNBRO52H-DjQ5JBX0.mjs → diagram-VNBRO52H-DjoCYwIt.mjs} +3 -3
- package/{erDiagram-Q7BY3M3F-_CTjqIV0.mjs → erDiagram-Q7BY3M3F-zT1r9L3p.mjs} +3 -3
- package/{flowDiagram-4HSFHLVR-BoJjGTXJ.mjs → flowDiagram-4HSFHLVR-BLzM2DTb.mjs} +3 -3
- package/{ganttDiagram-APWFNJXF-B_rald46.mjs → ganttDiagram-APWFNJXF-DnpBJEuz.mjs} +2 -2
- package/{gitGraph-O2Q2CXLX-DriKl2GG.mjs → gitGraph-O2Q2CXLX-B-VwSPlR.mjs} +1 -1
- package/{gitGraphDiagram-7IBYFJ6S-C4MsOv0X.mjs → gitGraphDiagram-7IBYFJ6S-COOHsqFA.mjs} +4 -4
- package/{graph-DZerABLC.mjs → graph-BUbpvOpp.mjs} +2 -2
- package/{index-Brqf_Z9Y.mjs → index-CItM3CyQ.mjs} +45 -45
- package/info-4N47QTOZ-B0AtgOv2.mjs +5 -0
- package/{infoDiagram-PH2N3AL5-BN42fLRi.mjs → infoDiagram-PH2N3AL5-DOa8tezQ.mjs} +2 -2
- package/{journeyDiagram-U35MCT3I-ow2tgmc5.mjs → journeyDiagram-U35MCT3I-B3BYYL5I.mjs} +3 -3
- package/{kanban-definition-NDS4AKOZ-BGCal0-6.mjs → kanban-definition-NDS4AKOZ-C0uO3SYR.mjs} +1 -1
- package/{layout-BOJoSsDc.mjs → layout-DZ9BVvdm.mjs} +4 -4
- package/{linear-Ct7RZvog.mjs → linear-Di0AUE-T.mjs} +1 -1
- package/{mermaid-parser.core-BbtQ8GsV.mjs → mermaid-parser.core-CdFWZP20.mjs} +10 -10
- package/{mindmap-definition-ALO5MXBD-DS9Ce33y.mjs → mindmap-definition-ALO5MXBD-DWR7_lAN.mjs} +1 -1
- package/package.json +18 -18
- package/{packet-KVYON367-DkCLRxW-.mjs → packet-KVYON367-BZNutpnz.mjs} +1 -1
- package/pie-R6RNRRYF-Buo59AFb.mjs +5 -0
- package/{pieDiagram-IB7DONF6-DPgv20p_.mjs → pieDiagram-IB7DONF6-Ce5q9sVW.mjs} +4 -4
- package/{quadrantDiagram-7GDLP6J5-J7tMWXg0.mjs → quadrantDiagram-7GDLP6J5-ChQW5xCV.mjs} +2 -2
- package/{radar-MK3ICKWK-uV2nb45m.mjs → radar-MK3ICKWK-BwPxQSy3.mjs} +1 -1
- package/{reduce-gJtMIAHC.mjs → reduce-DCZsGO2V.mjs} +1 -1
- package/{requirementDiagram-KVF5MWMF-D4tBt2eQ.mjs → requirementDiagram-KVF5MWMF-DvdTa37l.mjs} +2 -2
- package/{sankeyDiagram-QLVOVGJD-Df7KpbaZ.mjs → sankeyDiagram-QLVOVGJD-Bz9Mo-9F.mjs} +1 -1
- package/{sequenceDiagram-X6HHIX6F-0borWVd9.mjs → sequenceDiagram-X6HHIX6F-BdUj_zWa.mjs} +3 -3
- package/{stateDiagram-DGXRK772-DgCKd-Pt.mjs → stateDiagram-DGXRK772-C4lQ3jUp.mjs} +4 -4
- package/{stateDiagram-v2-YXO3MK2T-BD0yPAXt.mjs → stateDiagram-v2-YXO3MK2T-CK63kgQc.mjs} +2 -2
- package/style.css +2 -2
- package/{timeline-definition-BDJGKUSR-7_czGGSa.mjs → timeline-definition-BDJGKUSR-DyUoknGu.mjs} +2 -2
- package/{xychartDiagram-VJFVF3MP-CRKD45B8.mjs → xychartDiagram-VJFVF3MP-DsAJLqdc.mjs} +2 -2
- package/info-4N47QTOZ-C6UgKhFw.mjs +0 -5
- package/pie-R6RNRRYF-CQgdaUR9.mjs +0 -5
package/ai-ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(bn,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],I):(bn=typeof globalThis<"u"?globalThis:bn||self,I(bn.index={},bn.Vue))})(this,function(bn,I){"use strict";var unn=Object.defineProperty;var Wht=bn=>{throw TypeError(bn)};var cnn=(bn,I,oa)=>I in bn?unn(bn,I,{enumerable:!0,configurable:!0,writable:!0,value:oa}):bn[I]=oa;var yr=(bn,I,oa)=>cnn(bn,typeof I!="symbol"?I+"":I,oa),dnn=(bn,I,oa)=>I.has(bn)||Wht("Cannot "+oa);var Yht=(bn,I,oa)=>I.has(bn)?Wht("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(bn):I.set(bn,oa);var vM=(bn,I,oa)=>(dnn(bn,I,"access private method"),oa);var Y3e,p6,jht,ife,Xht,Pdt,hb,fb,pb,gb,mb,Tb,vb,yb,j3e,wT,_b,bb,Qb,xb,Eb,Sb,Cb,Lb,wb,Ab,Ob,Mb,Rb,Db,Nb,Ib,kb,Pb,Bb,Hb,Fb,Vb,$b,Ub,zb,Gb,qb,Wb,Yb,jb,Xb,Kb,Zb,Jb,eQ,AT,tQ,rQ,g6,Bdt,Hdt;const oa=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},rft={class:"ai-chat-list"},ufe=oa(Object.assign({name:"AiChatList"},{__name:"ChatList",setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",rft,[I.renderSlot(e.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-26750aa8"]]);function vQ(t){"@babel/helpers - typeof";return vQ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vQ(t)}function nft(t,e){if(vQ(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vQ(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ift(t){var e=nft(t,"string");return vQ(e)=="symbol"?e:e+""}function aft(t,e,r){return(e=ift(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cfe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cfe(Object(r),!0).forEach(function(n){aft(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cfe(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},he.apply(null,arguments)}const oft=t=>typeof t=="function",sft=Array.isArray,lft=t=>typeof t=="string",uft=t=>t!==null&&typeof t=="object",cft=/^on[^a-z]/,dft=t=>cft.test(t),dfe=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},hft=/-(\w)/g,hfe=dfe(t=>t.replace(hft,(e,r)=>r?r.toUpperCase():"")),fft=/\B([A-Z])/g,pft=dfe(t=>t.replace(fft,"-$1").toLowerCase()),gft=Object.prototype.hasOwnProperty,ffe=(t,e)=>gft.call(t,e);function mft(t,e,r,n){const i=t[r];if(i!=null){const a=ffe(i,"default");if(a&&n===void 0){const o=i.default;n=i.type!==Function&&oft(o)?o():o}i.type===Boolean&&(!ffe(e,r)&&!a?n=!1:n===""&&(n=!0))}return n}function VT(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return typeof t=="function"?t(e):t??r}function Tft(t){let e;const r=new Promise(i=>{e=t(()=>{i(!0)})}),n=()=>{e==null||e()};return n.then=(i,a)=>r.then(i,a),n.promise=r,n}function Ir(){const t=[];for(let e=0;e<arguments.length;e++){const r=e<0||arguments.length<=e?void 0:arguments[e];if(r){if(lft(r))t.push(r);else if(sft(r))for(let n=0;n<r.length;n++){const i=Ir(r[n]);i&&t.push(i)}else if(uft(r))for(const n in r)r[n]&&t.push(n)}}return t.join(" ")}var pfe=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(i,a){return i[0]===r?(n=a,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(r,n){var i=t(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,i=t(n,r);~i&&n.splice(i,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var o=a[i];r.call(n,o[1],o[0])}},e}()}(),bz=typeof window<"u"&&typeof document<"u"&&window.document===document,yM=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),vft=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(yM):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),yft=2;function _ft(t,e){var r=!1,n=!1,i=0;function a(){r&&(r=!1,t()),n&&s()}function o(){vft(a)}function s(){var l=Date.now();if(r){if(l-i<yft)return;n=!0}else r=!0,n=!1,setTimeout(o,e);i=l}return s}var bft=20,Qft=["top","right","bottom","left","width","height","size","weight"],xft=typeof MutationObserver<"u",Eft=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=_ft(this.refresh.bind(this),bft)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!bz||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xft?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!bz||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,i=Qft.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),gfe=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},$T=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||yM},mfe=bM(0,0,0,0);function _M(t){return parseFloat(t)||0}function Tfe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,i){var a=t["border-"+i+"-width"];return n+_M(a)},0)}function Sft(t){for(var e=["top","right","bottom","left"],r={},n=0,i=e;n<i.length;n++){var a=i[n],o=t["padding-"+a];r[a]=_M(o)}return r}function Cft(t){var e=t.getBBox();return bM(0,0,e.width,e.height)}function Lft(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return mfe;var n=$T(t).getComputedStyle(t),i=Sft(n),a=i.left+i.right,o=i.top+i.bottom,s=_M(n.width),l=_M(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=Tfe(n,"left","right")+a),Math.round(l+o)!==r&&(l-=Tfe(n,"top","bottom")+o)),!Aft(t)){var u=Math.round(s+a)-e,d=Math.round(l+o)-r;Math.abs(u)!==1&&(s-=u),Math.abs(d)!==1&&(l-=d)}return bM(i.left,i.top,s,l)}var wft=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof $T(t).SVGGraphicsElement}:function(t){return t instanceof $T(t).SVGElement&&typeof t.getBBox=="function"}}();function Aft(t){return t===$T(t).document.documentElement}function Oft(t){return bz?wft(t)?Cft(t):Lft(t):mfe}function Mft(t){var e=t.x,r=t.y,n=t.width,i=t.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return gfe(o,{x:e,y:r,width:n,height:i,top:r,right:e+n,bottom:i+r,left:e}),o}function bM(t,e,r,n){return{x:t,y:e,width:r,height:n}}var Rft=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=bM(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Oft(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),Dft=function(){function t(e,r){var n=Mft(r);gfe(this,{target:e,contentRect:n})}return t}(),Nft=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new pfe,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof $T(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new Rft(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof $T(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Dft(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),vfe=typeof WeakMap<"u"?new WeakMap:new pfe,yfe=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Eft.getInstance(),n=new Nft(e,r,this);vfe.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){yfe.prototype[t]=function(){var e;return(e=vfe.get(this))[t].apply(e,arguments)}});var _fe=function(){return typeof yM.ResizeObserver<"u"?yM.ResizeObserver:yfe}();const Qz=t=>t!=null&&t!=="",C6=(t,e)=>{const r=he({},t);return Object.keys(e).forEach(n=>{const i=r[n];if(i)i.type||i.default?i.default=e[n]:i.def?i.def(e[n]):r[n]={type:i,default:e[n]};else throw new Error(`not have ${n} prop`)}),r},Ift=t=>{const e=Object.keys(t),r={},n={},i={};for(let a=0,o=e.length;a<o;a++){const s=e[a];dft(s)?(r[s[2].toLowerCase()+s.slice(3)]=t[s],n[s]=t[s]):i[s]=t[s]}return{onEvents:n,events:r,extraAttrs:i}},kft=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r={},n=/;(?![^(]*\))/g,i=/:(.+)/;return typeof t=="object"?t:(t.split(n).forEach(function(a){if(a){const o=a.split(i);if(o.length>1){const s=e?hfe(o[0].trim()):o[0].trim();r[s]=o[1].trim()}}}),r)},Pft=(t,e)=>t[e]!==void 0,bfe=Symbol("skipFlatten"),fu=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=Array.isArray(t)?t:[t],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(...fu(i,e)):i&&i.type===I.Fragment?i.key===bfe?n.push(i):n.push(...fu(i.children,e)):i&&I.isVNode(i)?e&&!xfe(i)?n.push(i):e||n.push(i):Qz(i)&&n.push(i)}),n},Bft=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(I.isVNode(t))return t.type===I.Fragment?e==="default"?fu(t.children):[]:t.children&&t.children[e]?fu(t.children[e](r)):[];{const n=t.$slots[e]&&t.$slots[e](r);return fu(n)}},L6=t=>{var e;let r=((e=t==null?void 0:t.vnode)===null||e===void 0?void 0:e.el)||t&&(t.$el||t);for(;r&&!r.tagName;)r=r.nextSibling;return r},Hft=t=>{const e={};if(t.$&&t.$.vnode){const r=t.$.vnode.props||{};Object.keys(t.$props).forEach(n=>{const i=t.$props[n],a=pft(n);(i!==void 0||a in r)&&(e[n]=i)})}else if(I.isVNode(t)&&typeof t.type=="object"){const r=t.props||{},n={};Object.keys(r).forEach(a=>{n[hfe(a)]=r[a]});const i=t.type.props||{};Object.keys(i).forEach(a=>{const o=mft(i,n,a,n[a]);(o!==void 0||a in n)&&(e[a]=o)})}return e},Fft=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i;if(t.$){const a=t[e];if(a!==void 0)return typeof a=="function"&&n?a(r):a;i=t.$slots[e],i=n&&i?i(r):i}else if(I.isVNode(t)){const a=t.props&&t.props[e];if(a!==void 0&&t.props!==null)return typeof a=="function"&&n?a(r):a;t.type===I.Fragment?i=t.children:t.children&&t.children[e]&&(i=t.children[e],i=n&&i?i(r):i)}return Array.isArray(i)&&(i=fu(i),i=i.length===1?i[0]:i,i=i.length===0?void 0:i),i};function Qfe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r={};return t.$?r=he(he({},r),t.$attrs):r=he(he({},r),t.props),Ift(r)[e?"onEvents":"events"]}function Vft(t,e){let n=((I.isVNode(t)?t.props:t.$attrs)||{}).style||{};return typeof n=="string"&&(n=kft(n,e)),n}function $ft(t){return t.length===1&&t[0].type===I.Fragment}function xfe(t){return t&&(t.type===I.Comment||t.type===I.Fragment&&t.children.length===0||t.type===I.Text&&t.children.trim()==="")}function Oh(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=[];return t.forEach(r=>{Array.isArray(r)?e.push(...r):(r==null?void 0:r.type)===I.Fragment?e.push(...Oh(r.children)):e.push(r)}),e.filter(r=>!xfe(r))}function UT(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),t&&t.__v_isVNode&&typeof t.type!="symbol"}function yQ(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var n,i;return(n=e[r])!==null&&n!==void 0?n:(i=t[r])===null||i===void 0?void 0:i.call(t)}const QM=I.defineComponent({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(t,e){let{slots:r}=e;const n=I.reactive({width:0,height:0,offsetHeight:0,offsetWidth:0});let i=null,a=null;const o=()=>{a&&(a.disconnect(),a=null)},s=d=>{const{onResize:h}=t,f=d[0].target,{width:p,height:g}=f.getBoundingClientRect(),{offsetWidth:m,offsetHeight:v}=f,T=Math.floor(p),y=Math.floor(g);if(n.width!==T||n.height!==y||n.offsetWidth!==m||n.offsetHeight!==v){const _={width:T,height:y,offsetWidth:m,offsetHeight:v};he(n,_),h&&Promise.resolve().then(()=>{h(he(he({},_),{offsetWidth:m,offsetHeight:v}),f)})}},l=I.getCurrentInstance(),u=()=>{const{disabled:d}=t;if(d){o();return}const h=L6(l);h!==i&&(o(),i=h),!a&&h&&(a=new _fe(s),a.observe(h))};return I.onMounted(()=>{u()}),I.onUpdated(()=>{u()}),I.onUnmounted(()=>{o()}),I.watch(()=>t.disabled,()=>{u()},{flush:"post"}),()=>{var d;return(d=r.default)===null||d===void 0?void 0:d.call(r)[0]}}});let Efe=t=>setTimeout(t,16),Sfe=t=>clearTimeout(t);typeof window<"u"&&"requestAnimationFrame"in window&&(Efe=t=>window.requestAnimationFrame(t),Sfe=t=>window.cancelAnimationFrame(t));let Cfe=0;const xz=new Map;function Lfe(t){xz.delete(t)}function ro(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Cfe+=1;const r=Cfe;function n(i){if(i===0)Lfe(r),t();else{const a=Efe(()=>{n(i-1)});xz.set(r,a)}}return n(e),r}ro.cancel=t=>{const e=xz.get(t);return Lfe(e),Sfe(e)};const _Q=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e},eg=t=>{const e=t;return e.install=function(r){r.component(e.displayName||e.name,t)},t};function bQ(){return{type:[Function,Array]}}function Na(t){return{type:Object,default:t}}function cl(t){return{type:Boolean,default:t}}function wfe(t){return{type:Function,default:t}}function yo(t,e){return{validator:()=>!0,default:t}}function Ez(t){return{type:Array,default:t}}function xM(t){return{type:String,default:t}}function Sz(t,e){return t?{type:t,default:e}:yo(e)}let tg=!1;try{const t=Object.defineProperty({},"passive",{get(){tg=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch{}function b0(t,e,r,n){if(t&&t.addEventListener){let i=n;i===void 0&&tg&&(e==="touchstart"||e==="touchmove"||e==="wheel")&&(i={passive:!1}),t.addEventListener(e,r,i)}return{remove:()=>{t&&t.removeEventListener&&t.removeEventListener(e,r)}}}const Cz="anticon",Uft=Symbol("GlobalFormContextKey"),zft=t=>{I.provide(Uft,t)},Gft=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:Na(),input:Na(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:Na(),pageHeader:Na(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:Na(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:Na(),pagination:Na(),theme:Na(),select:Na(),wave:Na()}),Lz=Symbol("configProvider"),Afe={getPrefixCls:(t,e)=>e||(t?`ant-${t}`:"ant"),iconPrefixCls:I.computed(()=>Cz),getPopupContainer:I.computed(()=>()=>document.body),direction:I.computed(()=>"ltr")},wz=()=>I.inject(Lz,Afe),qft=t=>I.provide(Lz,t),Ofe=Symbol("DisabledContextKey"),QQ=()=>I.inject(Ofe,I.ref(void 0)),Wft=t=>{const e=QQ();return I.provide(Ofe,I.computed(()=>{var r;return(r=t.value)!==null&&r!==void 0?r:e.value})),t},Yft={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},jft={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Mfe={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Rfe={lang:he({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},jft),timePickerLocale:he({},Mfe)},Wc="${label} is not a valid ${type}",zT={locale:"en",Pagination:Yft,DatePicker:Rfe,TimePicker:Mfe,Calendar:Rfe,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Wc,method:Wc,array:Wc,object:Wc,number:Wc,date:Wc,boolean:Wc,integer:Wc,float:Wc,regexp:Wc,email:Wc,url:Wc,hex:Wc},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Dfe=I.defineComponent({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(t,e){let{slots:r}=e;const n=I.inject("localeData",{}),i=I.computed(()=>{const{componentName:o="global",defaultLocale:s}=t,l=s||zT[o||"global"],{antLocale:u}=n,d=o&&u?u[o]:{};return he(he({},typeof l=="function"?l():l),d||{})}),a=I.computed(()=>{const{antLocale:o}=n,s=o&&o.locale;return o&&o.exist&&!s?zT.locale:s});return()=>{const o=t.children||r.default,{antLocale:s}=n;return o==null?void 0:o(i.value,a.value,s)}}});function Az(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}const Nfe="%";class Xft{constructor(e){this.cache=new Map,this.instanceId=e}get(e){return this.cache.get(Array.isArray(e)?e.join(Nfe):e)||null}update(e,r){const n=Array.isArray(e)?e.join(Nfe):e,i=this.cache.get(n),a=r(i);a===null?this.cache.delete(n):this.cache.set(n,a)}}const Ife="data-token-hash",rg="data-css-hash",Kft="data-cache-path",GT="__cssinjs_instance__";function xQ(){const t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const e=document.body.querySelectorAll(`style[${rg}]`)||[],{firstChild:r}=document.head;Array.from(e).forEach(i=>{i[GT]=i[GT]||t,i[GT]===t&&document.head.insertBefore(i,r)});const n={};Array.from(document.querySelectorAll(`style[${rg}]`)).forEach(i=>{var a;const o=i.getAttribute(rg);n[o]?i[GT]===t&&((a=i.parentNode)===null||a===void 0||a.removeChild(i)):n[o]=!0})}return new Xft(t)}const kfe=Symbol("StyleContextKey"),Zft=()=>{var t,e,r;const n=I.getCurrentInstance();let i;if(n&&n.appContext){const a=(r=(e=(t=n.appContext)===null||t===void 0?void 0:t.config)===null||e===void 0?void 0:e.globalProperties)===null||r===void 0?void 0:r.__ANTDV_CSSINJS_CACHE__;a?i=a:(i=xQ(),n.appContext.config.globalProperties&&(n.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=i))}else i=xQ();return i},Pfe={cache:xQ(),defaultCache:!0,hashPriority:"low"},EM=()=>{const t=Zft();return I.inject(kfe,I.shallowRef(he(he({},Pfe),{cache:t})))},Jft=t=>{const e=EM(),r=I.shallowRef(he(he({},Pfe),{cache:xQ()}));return I.watch([()=>I.unref(t),e],()=>{const n=he({},e.value),i=I.unref(t);Object.keys(i).forEach(o=>{const s=i[o];i[o]!==void 0&&(n[o]=s)});const{cache:a}=i;n.cache=n.cache||xQ(),n.defaultCache=!a&&e.value.defaultCache,r.value=n},{immediate:!0}),I.provide(kfe,r),r},e4t=()=>({autoClear:cl(),mock:xM(),cache:Na(),defaultCache:cl(),hashPriority:xM(),container:Sz(),ssrInline:cl(),transformers:Ez(),linters:Ez()});eg(I.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:e4t(),setup(t,e){let{slots:r}=e;return Jft(t),()=>{var n;return(n=r.default)===null||n===void 0?void 0:n.call(r)}}}));function t4t(){return!1}let Oz=!1;function r4t(){return Oz}const n4t=process.env.NODE_ENV==="production"?t4t:r4t;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const t=window;if(typeof t.webpackHotUpdate=="function"){const e=t.webpackHotUpdate;t.webpackHotUpdate=function(){return Oz=!0,setTimeout(()=>{Oz=!1},0),e(...arguments)}}}function Bfe(t,e,r,n){const i=EM(),a=I.shallowRef(""),o=I.shallowRef();I.watchEffect(()=>{a.value=[t,...e.value].join("%")});const s=n4t(),l=u=>{i.value.cache.update(u,d=>{const[h=0,f]=d||[];return h-1===0?(n==null||n(f,!1),null):[h-1,f]})};return I.watch(a,(u,d)=>{d&&l(d),i.value.cache.update(u,h=>{const[f=0,p]=h||[];let g=p;process.env.NODE_ENV!=="production"&&p&&s&&(n==null||n(g,s),g=null);const m=g||r();return[f+1,m]}),o.value=i.value.cache.get(a.value)[1]},{immediate:!0}),I.onBeforeUnmount(()=>{l(a.value)}),o}function Xd(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function w6(t,e){return t&&t.contains?t.contains(e):!1}const Hfe="data-vc-order",i4t="vc-util-key",Mz=new Map;function Ffe(){let{mark:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t?t.startsWith("data-")?t:`data-${t}`:i4t}function SM(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function a4t(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Vfe(t){return Array.from((Mz.get(t)||t).children).filter(e=>e.tagName==="STYLE")}function $fe(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Xd())return null;const{csp:r,prepend:n}=e,i=document.createElement("style");i.setAttribute(Hfe,a4t(n)),r!=null&&r.nonce&&(i.nonce=r==null?void 0:r.nonce),i.innerHTML=t;const a=SM(e),{firstChild:o}=a;if(n){if(n==="queue"){const s=Vfe(a).filter(l=>["prepend","prependQueue"].includes(l.getAttribute(Hfe)));if(s.length)return a.insertBefore(i,s[s.length-1].nextSibling),i}a.insertBefore(i,o)}else a.appendChild(i);return i}function Ufe(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=SM(e);return Vfe(r).find(n=>n.getAttribute(Ffe(e))===t)}function CM(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Ufe(t,e);r&&SM(e).removeChild(r)}function o4t(t,e){const r=Mz.get(t);if(!r||!w6(document,r)){const n=$fe("",e),{parentNode:i}=n;Mz.set(t,i),t.removeChild(n)}}function EQ(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n,i,a;const o=SM(r);o4t(o,r);const s=Ufe(e,r);if(s)return!((n=r.csp)===null||n===void 0)&&n.nonce&&s.nonce!==((i=r.csp)===null||i===void 0?void 0:i.nonce)&&(s.nonce=(a=r.csp)===null||a===void 0?void 0:a.nonce),s.innerHTML!==t&&(s.innerHTML=t),s;const l=$fe(t,r);return l.setAttribute(Ffe(r),e),l}function s4t(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}class qT{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n={map:this.cache};return e.forEach(i=>{var a;n?n=(a=n==null?void 0:n.map)===null||a===void 0?void 0:a.get(i):n=void 0}),n!=null&&n.value&&r&&(n.value[1]=this.cacheCallTimes++),n==null?void 0:n.value}get(e){var r;return(r=this.internalGet(e,!0))===null||r===void 0?void 0:r[0]}has(e){return!!this.internalGet(e)}set(e,r){if(!this.has(e)){if(this.size()+1>qT.MAX_CACHE_SIZE+qT.MAX_CACHE_OFFSET){const[i]=this.keys.reduce((a,o)=>{const[,s]=a;return this.internalGet(o)[1]<s?[o,this.internalGet(o)[1]]:a},[this.keys[0],this.cacheCallTimes]);this.delete(i)}this.keys.push(e)}let n=this.cache;e.forEach((i,a)=>{if(a===e.length-1)n.set(i,{value:[r,this.cacheCallTimes++]});else{const o=n.get(i);o?o.map||(o.map=new Map):n.set(i,{map:new Map}),n=n.get(i).map}})}deleteByPath(e,r){var n;const i=e.get(r[0]);if(r.length===1)return i.map?e.set(r[0],{map:i.map}):e.delete(r[0]),(n=i.value)===null||n===void 0?void 0:n[0];const a=this.deleteByPath(i.map,r.slice(1));return(!i.map||i.map.size===0)&&!i.value&&e.delete(r[0]),a}delete(e){if(this.has(e))return this.keys=this.keys.filter(r=>!s4t(r,e)),this.deleteByPath(this.cache,e)}}qT.MAX_CACHE_SIZE=20,qT.MAX_CACHE_OFFSET=5;let Rz={};function zfe(t,e){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error(`Warning: ${e}`)}function l4t(){Rz={}}function u4t(t,e,r){!e&&!Rz[r]&&(t(!1,r),Rz[r]=!0)}function Dz(t,e){u4t(zfe,t,e)}function c4t(){}let Kd=c4t;process.env.NODE_ENV!=="production"&&(Kd=(t,e,r)=>{Dz(t,`[ant-design-vue: ${e}] ${r}`),process.env.NODE_ENV==="test"&&l4t()});let Gfe=0,qfe=class{constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=Gfe,e.length===0&&Kd(e.length>0,"[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."),Gfe+=1}getDerivativeToken(e){return this.derivatives.reduce((r,n)=>n(e,r),void 0)}};const Nz=new qT;function Wfe(t){const e=Array.isArray(t)?t:[t];return Nz.has(e)||Nz.set(e,new qfe(e)),Nz.get(e)}const Yfe=new WeakMap;function LM(t){let e=Yfe.get(t)||"";return e||(Object.keys(t).forEach(r=>{const n=t[r];e+=r,n instanceof qfe?e+=n.id:n&&typeof n=="object"?e+=LM(n):e+=n}),Yfe.set(t,e)),e}function d4t(t,e){return Az(`${e}_${LM(t)}`)}const SQ=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),jfe="_bAmBoO_";function h4t(t,e,r){var n,i;if(Xd()){EQ(t,SQ);const a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",e==null||e(a),document.body.appendChild(a),process.env.NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");const o=r?r(a):(n=getComputedStyle(a).content)===null||n===void 0?void 0:n.includes(jfe);return(i=a.parentNode)===null||i===void 0||i.removeChild(a),CM(SQ),o}return!1}let Iz;function f4t(){return Iz===void 0&&(Iz=h4t(`@layer ${SQ} { .${SQ} { content: "${jfe}"!important; } }`,t=>{t.className=SQ})),Iz}const Xfe={},p4t=process.env.NODE_ENV==="production",g4t=process.env.NODE_ENV==="prerender",m4t=!p4t&&!g4t?"css-dev-only-do-not-override":"css",ng=new Map;function T4t(t){ng.set(t,(ng.get(t)||0)+1)}function v4t(t,e){typeof document<"u"&&document.querySelectorAll(`style[${Ife}="${t}"]`).forEach(n=>{var i;n[GT]===e&&((i=n.parentNode)===null||i===void 0||i.removeChild(n))})}const y4t=0;function _4t(t,e){ng.set(t,(ng.get(t)||0)-1);const r=Array.from(ng.keys()),n=r.filter(i=>(ng.get(i)||0)<=0);r.length-n.length>y4t&&n.forEach(i=>{v4t(i,e),ng.delete(i)})}const b4t=(t,e,r,n)=>{const i=r.getDerivativeToken(t);let a=he(he({},i),e);return n&&(a=n(a)),a};function Q4t(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.ref({});const n=EM(),i=I.computed(()=>he({},...e.value)),a=I.computed(()=>LM(i.value)),o=I.computed(()=>LM(r.value.override||Xfe));return Bfe("token",I.computed(()=>[r.value.salt||"",t.value.id,a.value,o.value]),()=>{const{salt:l="",override:u=Xfe,formatToken:d,getComputedToken:h}=r.value,f=h?h(i.value,u,t.value):b4t(i.value,u,t.value,d),p=d4t(f,l);f._tokenKey=p,T4t(p);const g=`${m4t}-${Az(p)}`;return f._hashId=g,[f,g]},l=>{var u;_4t(l[0]._tokenKey,(u=n.value)===null||u===void 0?void 0:u.cache.instanceId)})}var x4t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kfe="comm",Zfe="rule",Jfe="decl",E4t="@import",S4t="@namespace",C4t="@keyframes",L4t="@layer",e4e=Math.abs,kz=String.fromCharCode;function t4e(t){return t.trim()}function wM(t,e,r){return t.replace(e,r)}function w4t(t,e,r){return t.indexOf(e,r)}function WT(t,e){return t.charCodeAt(e)|0}function YT(t,e,r){return t.slice(e,r)}function Zd(t){return t.length}function A4t(t){return t.length}function AM(t,e){return e.push(t),t}var OM=1,jT=1,r4e=0,c2=0,Fo=0,XT="";function Pz(t,e,r,n,i,a,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:OM,column:jT,length:o,return:"",siblings:s}}function O4t(){return Fo}function M4t(){return Fo=c2>0?WT(XT,--c2):0,jT--,Fo===10&&(jT=1,OM--),Fo}function Q0(){return Fo=c2<r4e?WT(XT,c2++):0,jT++,Fo===10&&(jT=1,OM++),Fo}function A6(){return WT(XT,c2)}function MM(){return c2}function RM(t,e){return YT(XT,t,e)}function CQ(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R4t(t){return OM=jT=1,r4e=Zd(XT=t),c2=0,[]}function D4t(t){return XT="",t}function Bz(t){return t4e(RM(c2-1,Hz(t===91?t+2:t===40?t+1:t)))}function N4t(t){for(;(Fo=A6())&&Fo<33;)Q0();return CQ(t)>2||CQ(Fo)>3?"":" "}function I4t(t,e){for(;--e&&Q0()&&!(Fo<48||Fo>102||Fo>57&&Fo<65||Fo>70&&Fo<97););return RM(t,MM()+(e<6&&A6()==32&&Q0()==32))}function Hz(t){for(;Q0();)switch(Fo){case t:return c2;case 34:case 39:t!==34&&t!==39&&Hz(Fo);break;case 40:t===41&&Hz(t);break;case 92:Q0();break}return c2}function k4t(t,e){for(;Q0()&&t+Fo!==57;)if(t+Fo===84&&A6()===47)break;return"/*"+RM(e,c2-1)+"*"+kz(t===47?t:Q0())}function P4t(t){for(;!CQ(A6());)Q0();return RM(t,c2)}function n4e(t){return D4t(DM("",null,null,null,[""],t=R4t(t),0,[0],t))}function DM(t,e,r,n,i,a,o,s,l){for(var u=0,d=0,h=o,f=0,p=0,g=0,m=1,v=1,T=1,y=0,_="",Q=i,b=a,x=n,E=_;v;)switch(g=y,y=Q0()){case 40:if(g!=108&&WT(E,h-1)==58){w4t(E+=wM(Bz(y),"&","&\f"),"&\f",e4e(u?s[u-1]:0))!=-1&&(T=-1);break}case 34:case 39:case 91:E+=Bz(y);break;case 9:case 10:case 13:case 32:E+=N4t(g);break;case 92:E+=I4t(MM()-1,7);continue;case 47:switch(A6()){case 42:case 47:AM(B4t(k4t(Q0(),MM()),e,r,l),l),(CQ(g||1)==5||CQ(A6()||1)==5)&&Zd(E)&&YT(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*m:s[u++]=Zd(E)*T;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:T==-1&&(E=wM(E,/\f/g,"")),p>0&&(Zd(E)-h||m===0&&g===47)&&AM(p>32?a4e(E+";",n,r,h-1,l):a4e(wM(E," ","")+";",n,r,h-2,l),l);break;case 59:E+=";";default:if(AM(x=i4e(E,e,r,u,d,i,s,_,Q=[],b=[],h,a),a),y===123)if(d===0)DM(E,e,x,x,Q,a,h,s,b);else{switch(f){case 99:if(WT(E,3)===110)break;case 108:if(WT(E,2)===97)break;default:d=0;case 100:case 109:case 115:}d?DM(t,x,x,n&&AM(i4e(t,x,x,0,0,i,s,_,i,Q=[],h,b),b),i,b,h,s,n?Q:b):DM(E,x,x,x,[""],b,0,s,b)}}u=d=p=0,m=T=1,_=E="",h=o;break;case 58:h=1+Zd(E),p=g;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&M4t()==125)continue}switch(E+=kz(y),y*m){case 38:T=d>0?1:(E+="\f",-1);break;case 44:s[u++]=(Zd(E)-1)*T,T=1;break;case 64:A6()===45&&(E+=Bz(Q0())),f=A6(),d=h=Zd(_=E+=P4t(MM())),y++;break;case 45:g===45&&Zd(E)==2&&(m=0)}}return a}function i4e(t,e,r,n,i,a,o,s,l,u,d,h){for(var f=i-1,p=i===0?a:[""],g=A4t(p),m=0,v=0,T=0;m<n;++m)for(var y=0,_=YT(t,f+1,f=e4e(v=o[m])),Q=t;y<g;++y)(Q=t4e(v>0?p[y]+" "+_:wM(_,/&\f/g,p[y])))&&(l[T++]=Q);return Pz(t,e,r,i===0?Zfe:s,l,u,d,h)}function B4t(t,e,r,n){return Pz(t,e,r,Kfe,kz(O4t()),YT(t,2,-2),0,n)}function a4e(t,e,r,n,i){return Pz(t,e,r,Jfe,YT(t,0,n),YT(t,n+1,-1),n,i)}function NM(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function o4e(t,e,r,n){switch(t.type){case L4t:if(t.children.length)break;case E4t:case S4t:case Jfe:return t.return=t.return||t.value;case Kfe:return"";case C4t:return t.return=t.value+"{"+NM(t.children,n)+"}";case Zfe:if(!Zd(t.value=t.props.join(",")))return""}return Zd(r=NM(t.children,n))?t.return=t.value+"{"+r+"}":""}function s4e(t,e){const{path:r,parentSelectors:n}=e;Dz(!1,`[Ant Design Vue CSS-in-JS] ${r?`Error in '${r}': `:""}${t}${n.length?` Selector info: ${n.join(" -> ")}`:""}`)}const H4t=(t,e,r)=>{if(t==="content"){const n=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof e!="string"||["normal","none","initial","inherit","unset"].indexOf(e)===-1&&!n.test(e)&&(e.charAt(0)!==e.charAt(e.length-1)||e.charAt(0)!=='"'&&e.charAt(0)!=="'"))&&s4e(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`,r)}},F4t=(t,e,r)=>{t==="animation"&&r.hashId&&e!=="none"&&s4e(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`,r)},l4e="data-ant-cssinjs-cache-path",V4t="_FILE_STYLE__";let ig,u4e=!0;function $4t(){var t;if(!ig&&(ig={},Xd())){const e=document.createElement("div");e.className=l4e,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let r=getComputedStyle(e).content||"";r=r.replace(/^"/,"").replace(/"$/,""),r.split(";").forEach(i=>{const[a,o]=i.split(":");ig[a]=o});const n=document.querySelector(`style[${l4e}]`);n&&(u4e=!1,(t=n.parentNode)===null||t===void 0||t.removeChild(n)),document.body.removeChild(e)}}function U4t(t){return $4t(),!!ig[t]}function z4t(t){const e=ig[t];let r=null;if(e&&Xd())if(u4e)r=V4t;else{const n=document.querySelector(`style[${rg}="${ig[t]}"]`);n?r=n.innerHTML:delete ig[t]}return[r,e]}const c4e=Xd(),d4e="_skip_check_",h4e="_multi_value_";function f4e(t){return NM(n4e(t),o4e).replace(/\{%%%\:[^;];}/g,";")}function G4t(t){return typeof t=="object"&&t&&(d4e in t||h4e in t)}function q4t(t,e,r){if(!e)return t;const n=`.${e}`,i=r==="low"?`:where(${n})`:n;return t.split(",").map(o=>{var s;const l=o.trim().split(/\s+/);let u=l[0]||"";const d=((s=u.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return u=`${d}${i}${u.slice(d.length)}`,[u,...l.slice(1)].join(" ")}).join(",")}const Fz=new Set;process.env.NODE_ENV;const Vz=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:r,injectHash:n,parentSelectors:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:a,layer:o,path:s,hashPriority:l,transformers:u=[],linters:d=[]}=e;let h="",f={};function p(v){const T=v.getName(a);if(!f[T]){const[y]=Vz(v.style,e,{root:!1,parentSelectors:i});f[T]=`@keyframes ${v.getName(a)}${y}`}}function g(v){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return v.forEach(y=>{Array.isArray(y)?g(y,T):y&&T.push(y)}),T}if(g(Array.isArray(t)?t:[t]).forEach(v=>{const T=typeof v=="string"&&!r?{}:v;if(typeof T=="string")h+=`${T}
|
|
1
|
+
(function(bn,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],I):(bn=typeof globalThis<"u"?globalThis:bn||self,I(bn.index={},bn.Vue))})(this,function(bn,I){"use strict";var unn=Object.defineProperty;var Wht=bn=>{throw TypeError(bn)};var cnn=(bn,I,oa)=>I in bn?unn(bn,I,{enumerable:!0,configurable:!0,writable:!0,value:oa}):bn[I]=oa;var yr=(bn,I,oa)=>cnn(bn,typeof I!="symbol"?I+"":I,oa),dnn=(bn,I,oa)=>I.has(bn)||Wht("Cannot "+oa);var Yht=(bn,I,oa)=>I.has(bn)?Wht("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(bn):I.set(bn,oa);var vM=(bn,I,oa)=>(dnn(bn,I,"access private method"),oa);var Y3e,p6,jht,ife,Xht,Pdt,hb,fb,pb,gb,mb,Tb,vb,yb,j3e,wT,_b,bb,Qb,xb,Eb,Sb,Cb,Lb,wb,Ab,Ob,Mb,Rb,Db,Nb,Ib,kb,Pb,Bb,Hb,Fb,Vb,$b,Ub,zb,Gb,qb,Wb,Yb,jb,Xb,Kb,Zb,Jb,eQ,AT,tQ,rQ,g6,Bdt,Hdt;const oa=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},rft={class:"ai-chat-list"},ufe=oa(Object.assign({name:"AiChatList"},{__name:"ChatList",setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",rft,[I.renderSlot(e.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-b8aa3bb7"]]);function vQ(t){"@babel/helpers - typeof";return vQ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vQ(t)}function nft(t,e){if(vQ(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vQ(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ift(t){var e=nft(t,"string");return vQ(e)=="symbol"?e:e+""}function aft(t,e,r){return(e=ift(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cfe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cfe(Object(r),!0).forEach(function(n){aft(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cfe(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},he.apply(null,arguments)}const oft=t=>typeof t=="function",sft=Array.isArray,lft=t=>typeof t=="string",uft=t=>t!==null&&typeof t=="object",cft=/^on[^a-z]/,dft=t=>cft.test(t),dfe=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},hft=/-(\w)/g,hfe=dfe(t=>t.replace(hft,(e,r)=>r?r.toUpperCase():"")),fft=/\B([A-Z])/g,pft=dfe(t=>t.replace(fft,"-$1").toLowerCase()),gft=Object.prototype.hasOwnProperty,ffe=(t,e)=>gft.call(t,e);function mft(t,e,r,n){const i=t[r];if(i!=null){const a=ffe(i,"default");if(a&&n===void 0){const o=i.default;n=i.type!==Function&&oft(o)?o():o}i.type===Boolean&&(!ffe(e,r)&&!a?n=!1:n===""&&(n=!0))}return n}function VT(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return typeof t=="function"?t(e):t??r}function Tft(t){let e;const r=new Promise(i=>{e=t(()=>{i(!0)})}),n=()=>{e==null||e()};return n.then=(i,a)=>r.then(i,a),n.promise=r,n}function Ir(){const t=[];for(let e=0;e<arguments.length;e++){const r=e<0||arguments.length<=e?void 0:arguments[e];if(r){if(lft(r))t.push(r);else if(sft(r))for(let n=0;n<r.length;n++){const i=Ir(r[n]);i&&t.push(i)}else if(uft(r))for(const n in r)r[n]&&t.push(n)}}return t.join(" ")}var pfe=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(i,a){return i[0]===r?(n=a,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(r,n){var i=t(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,i=t(n,r);~i&&n.splice(i,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var o=a[i];r.call(n,o[1],o[0])}},e}()}(),bz=typeof window<"u"&&typeof document<"u"&&window.document===document,yM=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),vft=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(yM):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),yft=2;function _ft(t,e){var r=!1,n=!1,i=0;function a(){r&&(r=!1,t()),n&&s()}function o(){vft(a)}function s(){var l=Date.now();if(r){if(l-i<yft)return;n=!0}else r=!0,n=!1,setTimeout(o,e);i=l}return s}var bft=20,Qft=["top","right","bottom","left","width","height","size","weight"],xft=typeof MutationObserver<"u",Eft=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=_ft(this.refresh.bind(this),bft)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!bz||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xft?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!bz||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,i=Qft.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),gfe=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},$T=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||yM},mfe=bM(0,0,0,0);function _M(t){return parseFloat(t)||0}function Tfe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,i){var a=t["border-"+i+"-width"];return n+_M(a)},0)}function Sft(t){for(var e=["top","right","bottom","left"],r={},n=0,i=e;n<i.length;n++){var a=i[n],o=t["padding-"+a];r[a]=_M(o)}return r}function Cft(t){var e=t.getBBox();return bM(0,0,e.width,e.height)}function Lft(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return mfe;var n=$T(t).getComputedStyle(t),i=Sft(n),a=i.left+i.right,o=i.top+i.bottom,s=_M(n.width),l=_M(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=Tfe(n,"left","right")+a),Math.round(l+o)!==r&&(l-=Tfe(n,"top","bottom")+o)),!Aft(t)){var u=Math.round(s+a)-e,d=Math.round(l+o)-r;Math.abs(u)!==1&&(s-=u),Math.abs(d)!==1&&(l-=d)}return bM(i.left,i.top,s,l)}var wft=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof $T(t).SVGGraphicsElement}:function(t){return t instanceof $T(t).SVGElement&&typeof t.getBBox=="function"}}();function Aft(t){return t===$T(t).document.documentElement}function Oft(t){return bz?wft(t)?Cft(t):Lft(t):mfe}function Mft(t){var e=t.x,r=t.y,n=t.width,i=t.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return gfe(o,{x:e,y:r,width:n,height:i,top:r,right:e+n,bottom:i+r,left:e}),o}function bM(t,e,r,n){return{x:t,y:e,width:r,height:n}}var Rft=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=bM(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Oft(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),Dft=function(){function t(e,r){var n=Mft(r);gfe(this,{target:e,contentRect:n})}return t}(),Nft=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new pfe,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof $T(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new Rft(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof $T(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new Dft(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),vfe=typeof WeakMap<"u"?new WeakMap:new pfe,yfe=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Eft.getInstance(),n=new Nft(e,r,this);vfe.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){yfe.prototype[t]=function(){var e;return(e=vfe.get(this))[t].apply(e,arguments)}});var _fe=function(){return typeof yM.ResizeObserver<"u"?yM.ResizeObserver:yfe}();const Qz=t=>t!=null&&t!=="",C6=(t,e)=>{const r=he({},t);return Object.keys(e).forEach(n=>{const i=r[n];if(i)i.type||i.default?i.default=e[n]:i.def?i.def(e[n]):r[n]={type:i,default:e[n]};else throw new Error(`not have ${n} prop`)}),r},Ift=t=>{const e=Object.keys(t),r={},n={},i={};for(let a=0,o=e.length;a<o;a++){const s=e[a];dft(s)?(r[s[2].toLowerCase()+s.slice(3)]=t[s],n[s]=t[s]):i[s]=t[s]}return{onEvents:n,events:r,extraAttrs:i}},kft=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r={},n=/;(?![^(]*\))/g,i=/:(.+)/;return typeof t=="object"?t:(t.split(n).forEach(function(a){if(a){const o=a.split(i);if(o.length>1){const s=e?hfe(o[0].trim()):o[0].trim();r[s]=o[1].trim()}}}),r)},Pft=(t,e)=>t[e]!==void 0,bfe=Symbol("skipFlatten"),fu=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=Array.isArray(t)?t:[t],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(...fu(i,e)):i&&i.type===I.Fragment?i.key===bfe?n.push(i):n.push(...fu(i.children,e)):i&&I.isVNode(i)?e&&!xfe(i)?n.push(i):e||n.push(i):Qz(i)&&n.push(i)}),n},Bft=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(I.isVNode(t))return t.type===I.Fragment?e==="default"?fu(t.children):[]:t.children&&t.children[e]?fu(t.children[e](r)):[];{const n=t.$slots[e]&&t.$slots[e](r);return fu(n)}},L6=t=>{var e;let r=((e=t==null?void 0:t.vnode)===null||e===void 0?void 0:e.el)||t&&(t.$el||t);for(;r&&!r.tagName;)r=r.nextSibling;return r},Hft=t=>{const e={};if(t.$&&t.$.vnode){const r=t.$.vnode.props||{};Object.keys(t.$props).forEach(n=>{const i=t.$props[n],a=pft(n);(i!==void 0||a in r)&&(e[n]=i)})}else if(I.isVNode(t)&&typeof t.type=="object"){const r=t.props||{},n={};Object.keys(r).forEach(a=>{n[hfe(a)]=r[a]});const i=t.type.props||{};Object.keys(i).forEach(a=>{const o=mft(i,n,a,n[a]);(o!==void 0||a in n)&&(e[a]=o)})}return e},Fft=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i;if(t.$){const a=t[e];if(a!==void 0)return typeof a=="function"&&n?a(r):a;i=t.$slots[e],i=n&&i?i(r):i}else if(I.isVNode(t)){const a=t.props&&t.props[e];if(a!==void 0&&t.props!==null)return typeof a=="function"&&n?a(r):a;t.type===I.Fragment?i=t.children:t.children&&t.children[e]&&(i=t.children[e],i=n&&i?i(r):i)}return Array.isArray(i)&&(i=fu(i),i=i.length===1?i[0]:i,i=i.length===0?void 0:i),i};function Qfe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r={};return t.$?r=he(he({},r),t.$attrs):r=he(he({},r),t.props),Ift(r)[e?"onEvents":"events"]}function Vft(t,e){let n=((I.isVNode(t)?t.props:t.$attrs)||{}).style||{};return typeof n=="string"&&(n=kft(n,e)),n}function $ft(t){return t.length===1&&t[0].type===I.Fragment}function xfe(t){return t&&(t.type===I.Comment||t.type===I.Fragment&&t.children.length===0||t.type===I.Text&&t.children.trim()==="")}function Oh(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=[];return t.forEach(r=>{Array.isArray(r)?e.push(...r):(r==null?void 0:r.type)===I.Fragment?e.push(...Oh(r.children)):e.push(r)}),e.filter(r=>!xfe(r))}function UT(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),t&&t.__v_isVNode&&typeof t.type!="symbol"}function yQ(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var n,i;return(n=e[r])!==null&&n!==void 0?n:(i=t[r])===null||i===void 0?void 0:i.call(t)}const QM=I.defineComponent({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(t,e){let{slots:r}=e;const n=I.reactive({width:0,height:0,offsetHeight:0,offsetWidth:0});let i=null,a=null;const o=()=>{a&&(a.disconnect(),a=null)},s=d=>{const{onResize:h}=t,f=d[0].target,{width:p,height:g}=f.getBoundingClientRect(),{offsetWidth:m,offsetHeight:v}=f,T=Math.floor(p),y=Math.floor(g);if(n.width!==T||n.height!==y||n.offsetWidth!==m||n.offsetHeight!==v){const _={width:T,height:y,offsetWidth:m,offsetHeight:v};he(n,_),h&&Promise.resolve().then(()=>{h(he(he({},_),{offsetWidth:m,offsetHeight:v}),f)})}},l=I.getCurrentInstance(),u=()=>{const{disabled:d}=t;if(d){o();return}const h=L6(l);h!==i&&(o(),i=h),!a&&h&&(a=new _fe(s),a.observe(h))};return I.onMounted(()=>{u()}),I.onUpdated(()=>{u()}),I.onUnmounted(()=>{o()}),I.watch(()=>t.disabled,()=>{u()},{flush:"post"}),()=>{var d;return(d=r.default)===null||d===void 0?void 0:d.call(r)[0]}}});let Efe=t=>setTimeout(t,16),Sfe=t=>clearTimeout(t);typeof window<"u"&&"requestAnimationFrame"in window&&(Efe=t=>window.requestAnimationFrame(t),Sfe=t=>window.cancelAnimationFrame(t));let Cfe=0;const xz=new Map;function Lfe(t){xz.delete(t)}function ro(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Cfe+=1;const r=Cfe;function n(i){if(i===0)Lfe(r),t();else{const a=Efe(()=>{n(i-1)});xz.set(r,a)}}return n(e),r}ro.cancel=t=>{const e=xz.get(t);return Lfe(e),Sfe(e)};const _Q=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e},eg=t=>{const e=t;return e.install=function(r){r.component(e.displayName||e.name,t)},t};function bQ(){return{type:[Function,Array]}}function Na(t){return{type:Object,default:t}}function cl(t){return{type:Boolean,default:t}}function wfe(t){return{type:Function,default:t}}function yo(t,e){return{validator:()=>!0,default:t}}function Ez(t){return{type:Array,default:t}}function xM(t){return{type:String,default:t}}function Sz(t,e){return t?{type:t,default:e}:yo(e)}let tg=!1;try{const t=Object.defineProperty({},"passive",{get(){tg=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch{}function b0(t,e,r,n){if(t&&t.addEventListener){let i=n;i===void 0&&tg&&(e==="touchstart"||e==="touchmove"||e==="wheel")&&(i={passive:!1}),t.addEventListener(e,r,i)}return{remove:()=>{t&&t.removeEventListener&&t.removeEventListener(e,r)}}}const Cz="anticon",Uft=Symbol("GlobalFormContextKey"),zft=t=>{I.provide(Uft,t)},Gft=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:Na(),input:Na(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:Na(),pageHeader:Na(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:Na(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:Na(),pagination:Na(),theme:Na(),select:Na(),wave:Na()}),Lz=Symbol("configProvider"),Afe={getPrefixCls:(t,e)=>e||(t?`ant-${t}`:"ant"),iconPrefixCls:I.computed(()=>Cz),getPopupContainer:I.computed(()=>()=>document.body),direction:I.computed(()=>"ltr")},wz=()=>I.inject(Lz,Afe),qft=t=>I.provide(Lz,t),Ofe=Symbol("DisabledContextKey"),QQ=()=>I.inject(Ofe,I.ref(void 0)),Wft=t=>{const e=QQ();return I.provide(Ofe,I.computed(()=>{var r;return(r=t.value)!==null&&r!==void 0?r:e.value})),t},Yft={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},jft={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Mfe={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Rfe={lang:he({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},jft),timePickerLocale:he({},Mfe)},Wc="${label} is not a valid ${type}",zT={locale:"en",Pagination:Yft,DatePicker:Rfe,TimePicker:Mfe,Calendar:Rfe,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Wc,method:Wc,array:Wc,object:Wc,number:Wc,date:Wc,boolean:Wc,integer:Wc,float:Wc,regexp:Wc,email:Wc,url:Wc,hex:Wc},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Dfe=I.defineComponent({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(t,e){let{slots:r}=e;const n=I.inject("localeData",{}),i=I.computed(()=>{const{componentName:o="global",defaultLocale:s}=t,l=s||zT[o||"global"],{antLocale:u}=n,d=o&&u?u[o]:{};return he(he({},typeof l=="function"?l():l),d||{})}),a=I.computed(()=>{const{antLocale:o}=n,s=o&&o.locale;return o&&o.exist&&!s?zT.locale:s});return()=>{const o=t.children||r.default,{antLocale:s}=n;return o==null?void 0:o(i.value,a.value,s)}}});function Az(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}const Nfe="%";class Xft{constructor(e){this.cache=new Map,this.instanceId=e}get(e){return this.cache.get(Array.isArray(e)?e.join(Nfe):e)||null}update(e,r){const n=Array.isArray(e)?e.join(Nfe):e,i=this.cache.get(n),a=r(i);a===null?this.cache.delete(n):this.cache.set(n,a)}}const Ife="data-token-hash",rg="data-css-hash",Kft="data-cache-path",GT="__cssinjs_instance__";function xQ(){const t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const e=document.body.querySelectorAll(`style[${rg}]`)||[],{firstChild:r}=document.head;Array.from(e).forEach(i=>{i[GT]=i[GT]||t,i[GT]===t&&document.head.insertBefore(i,r)});const n={};Array.from(document.querySelectorAll(`style[${rg}]`)).forEach(i=>{var a;const o=i.getAttribute(rg);n[o]?i[GT]===t&&((a=i.parentNode)===null||a===void 0||a.removeChild(i)):n[o]=!0})}return new Xft(t)}const kfe=Symbol("StyleContextKey"),Zft=()=>{var t,e,r;const n=I.getCurrentInstance();let i;if(n&&n.appContext){const a=(r=(e=(t=n.appContext)===null||t===void 0?void 0:t.config)===null||e===void 0?void 0:e.globalProperties)===null||r===void 0?void 0:r.__ANTDV_CSSINJS_CACHE__;a?i=a:(i=xQ(),n.appContext.config.globalProperties&&(n.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=i))}else i=xQ();return i},Pfe={cache:xQ(),defaultCache:!0,hashPriority:"low"},EM=()=>{const t=Zft();return I.inject(kfe,I.shallowRef(he(he({},Pfe),{cache:t})))},Jft=t=>{const e=EM(),r=I.shallowRef(he(he({},Pfe),{cache:xQ()}));return I.watch([()=>I.unref(t),e],()=>{const n=he({},e.value),i=I.unref(t);Object.keys(i).forEach(o=>{const s=i[o];i[o]!==void 0&&(n[o]=s)});const{cache:a}=i;n.cache=n.cache||xQ(),n.defaultCache=!a&&e.value.defaultCache,r.value=n},{immediate:!0}),I.provide(kfe,r),r},e4t=()=>({autoClear:cl(),mock:xM(),cache:Na(),defaultCache:cl(),hashPriority:xM(),container:Sz(),ssrInline:cl(),transformers:Ez(),linters:Ez()});eg(I.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:e4t(),setup(t,e){let{slots:r}=e;return Jft(t),()=>{var n;return(n=r.default)===null||n===void 0?void 0:n.call(r)}}}));function t4t(){return!1}let Oz=!1;function r4t(){return Oz}const n4t=process.env.NODE_ENV==="production"?t4t:r4t;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const t=window;if(typeof t.webpackHotUpdate=="function"){const e=t.webpackHotUpdate;t.webpackHotUpdate=function(){return Oz=!0,setTimeout(()=>{Oz=!1},0),e(...arguments)}}}function Bfe(t,e,r,n){const i=EM(),a=I.shallowRef(""),o=I.shallowRef();I.watchEffect(()=>{a.value=[t,...e.value].join("%")});const s=n4t(),l=u=>{i.value.cache.update(u,d=>{const[h=0,f]=d||[];return h-1===0?(n==null||n(f,!1),null):[h-1,f]})};return I.watch(a,(u,d)=>{d&&l(d),i.value.cache.update(u,h=>{const[f=0,p]=h||[];let g=p;process.env.NODE_ENV!=="production"&&p&&s&&(n==null||n(g,s),g=null);const m=g||r();return[f+1,m]}),o.value=i.value.cache.get(a.value)[1]},{immediate:!0}),I.onBeforeUnmount(()=>{l(a.value)}),o}function Xd(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function w6(t,e){return t&&t.contains?t.contains(e):!1}const Hfe="data-vc-order",i4t="vc-util-key",Mz=new Map;function Ffe(){let{mark:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t?t.startsWith("data-")?t:`data-${t}`:i4t}function SM(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function a4t(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Vfe(t){return Array.from((Mz.get(t)||t).children).filter(e=>e.tagName==="STYLE")}function $fe(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Xd())return null;const{csp:r,prepend:n}=e,i=document.createElement("style");i.setAttribute(Hfe,a4t(n)),r!=null&&r.nonce&&(i.nonce=r==null?void 0:r.nonce),i.innerHTML=t;const a=SM(e),{firstChild:o}=a;if(n){if(n==="queue"){const s=Vfe(a).filter(l=>["prepend","prependQueue"].includes(l.getAttribute(Hfe)));if(s.length)return a.insertBefore(i,s[s.length-1].nextSibling),i}a.insertBefore(i,o)}else a.appendChild(i);return i}function Ufe(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=SM(e);return Vfe(r).find(n=>n.getAttribute(Ffe(e))===t)}function CM(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Ufe(t,e);r&&SM(e).removeChild(r)}function o4t(t,e){const r=Mz.get(t);if(!r||!w6(document,r)){const n=$fe("",e),{parentNode:i}=n;Mz.set(t,i),t.removeChild(n)}}function EQ(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n,i,a;const o=SM(r);o4t(o,r);const s=Ufe(e,r);if(s)return!((n=r.csp)===null||n===void 0)&&n.nonce&&s.nonce!==((i=r.csp)===null||i===void 0?void 0:i.nonce)&&(s.nonce=(a=r.csp)===null||a===void 0?void 0:a.nonce),s.innerHTML!==t&&(s.innerHTML=t),s;const l=$fe(t,r);return l.setAttribute(Ffe(r),e),l}function s4t(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}class qT{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n={map:this.cache};return e.forEach(i=>{var a;n?n=(a=n==null?void 0:n.map)===null||a===void 0?void 0:a.get(i):n=void 0}),n!=null&&n.value&&r&&(n.value[1]=this.cacheCallTimes++),n==null?void 0:n.value}get(e){var r;return(r=this.internalGet(e,!0))===null||r===void 0?void 0:r[0]}has(e){return!!this.internalGet(e)}set(e,r){if(!this.has(e)){if(this.size()+1>qT.MAX_CACHE_SIZE+qT.MAX_CACHE_OFFSET){const[i]=this.keys.reduce((a,o)=>{const[,s]=a;return this.internalGet(o)[1]<s?[o,this.internalGet(o)[1]]:a},[this.keys[0],this.cacheCallTimes]);this.delete(i)}this.keys.push(e)}let n=this.cache;e.forEach((i,a)=>{if(a===e.length-1)n.set(i,{value:[r,this.cacheCallTimes++]});else{const o=n.get(i);o?o.map||(o.map=new Map):n.set(i,{map:new Map}),n=n.get(i).map}})}deleteByPath(e,r){var n;const i=e.get(r[0]);if(r.length===1)return i.map?e.set(r[0],{map:i.map}):e.delete(r[0]),(n=i.value)===null||n===void 0?void 0:n[0];const a=this.deleteByPath(i.map,r.slice(1));return(!i.map||i.map.size===0)&&!i.value&&e.delete(r[0]),a}delete(e){if(this.has(e))return this.keys=this.keys.filter(r=>!s4t(r,e)),this.deleteByPath(this.cache,e)}}qT.MAX_CACHE_SIZE=20,qT.MAX_CACHE_OFFSET=5;let Rz={};function zfe(t,e){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error(`Warning: ${e}`)}function l4t(){Rz={}}function u4t(t,e,r){!e&&!Rz[r]&&(t(!1,r),Rz[r]=!0)}function Dz(t,e){u4t(zfe,t,e)}function c4t(){}let Kd=c4t;process.env.NODE_ENV!=="production"&&(Kd=(t,e,r)=>{Dz(t,`[ant-design-vue: ${e}] ${r}`),process.env.NODE_ENV==="test"&&l4t()});let Gfe=0,qfe=class{constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=Gfe,e.length===0&&Kd(e.length>0,"[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."),Gfe+=1}getDerivativeToken(e){return this.derivatives.reduce((r,n)=>n(e,r),void 0)}};const Nz=new qT;function Wfe(t){const e=Array.isArray(t)?t:[t];return Nz.has(e)||Nz.set(e,new qfe(e)),Nz.get(e)}const Yfe=new WeakMap;function LM(t){let e=Yfe.get(t)||"";return e||(Object.keys(t).forEach(r=>{const n=t[r];e+=r,n instanceof qfe?e+=n.id:n&&typeof n=="object"?e+=LM(n):e+=n}),Yfe.set(t,e)),e}function d4t(t,e){return Az(`${e}_${LM(t)}`)}const SQ=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),jfe="_bAmBoO_";function h4t(t,e,r){var n,i;if(Xd()){EQ(t,SQ);const a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",e==null||e(a),document.body.appendChild(a),process.env.NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");const o=r?r(a):(n=getComputedStyle(a).content)===null||n===void 0?void 0:n.includes(jfe);return(i=a.parentNode)===null||i===void 0||i.removeChild(a),CM(SQ),o}return!1}let Iz;function f4t(){return Iz===void 0&&(Iz=h4t(`@layer ${SQ} { .${SQ} { content: "${jfe}"!important; } }`,t=>{t.className=SQ})),Iz}const Xfe={},p4t=process.env.NODE_ENV==="production",g4t=process.env.NODE_ENV==="prerender",m4t=!p4t&&!g4t?"css-dev-only-do-not-override":"css",ng=new Map;function T4t(t){ng.set(t,(ng.get(t)||0)+1)}function v4t(t,e){typeof document<"u"&&document.querySelectorAll(`style[${Ife}="${t}"]`).forEach(n=>{var i;n[GT]===e&&((i=n.parentNode)===null||i===void 0||i.removeChild(n))})}const y4t=0;function _4t(t,e){ng.set(t,(ng.get(t)||0)-1);const r=Array.from(ng.keys()),n=r.filter(i=>(ng.get(i)||0)<=0);r.length-n.length>y4t&&n.forEach(i=>{v4t(i,e),ng.delete(i)})}const b4t=(t,e,r,n)=>{const i=r.getDerivativeToken(t);let a=he(he({},i),e);return n&&(a=n(a)),a};function Q4t(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.ref({});const n=EM(),i=I.computed(()=>he({},...e.value)),a=I.computed(()=>LM(i.value)),o=I.computed(()=>LM(r.value.override||Xfe));return Bfe("token",I.computed(()=>[r.value.salt||"",t.value.id,a.value,o.value]),()=>{const{salt:l="",override:u=Xfe,formatToken:d,getComputedToken:h}=r.value,f=h?h(i.value,u,t.value):b4t(i.value,u,t.value,d),p=d4t(f,l);f._tokenKey=p,T4t(p);const g=`${m4t}-${Az(p)}`;return f._hashId=g,[f,g]},l=>{var u;_4t(l[0]._tokenKey,(u=n.value)===null||u===void 0?void 0:u.cache.instanceId)})}var x4t={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kfe="comm",Zfe="rule",Jfe="decl",E4t="@import",S4t="@namespace",C4t="@keyframes",L4t="@layer",e4e=Math.abs,kz=String.fromCharCode;function t4e(t){return t.trim()}function wM(t,e,r){return t.replace(e,r)}function w4t(t,e,r){return t.indexOf(e,r)}function WT(t,e){return t.charCodeAt(e)|0}function YT(t,e,r){return t.slice(e,r)}function Zd(t){return t.length}function A4t(t){return t.length}function AM(t,e){return e.push(t),t}var OM=1,jT=1,r4e=0,c2=0,Fo=0,XT="";function Pz(t,e,r,n,i,a,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:OM,column:jT,length:o,return:"",siblings:s}}function O4t(){return Fo}function M4t(){return Fo=c2>0?WT(XT,--c2):0,jT--,Fo===10&&(jT=1,OM--),Fo}function Q0(){return Fo=c2<r4e?WT(XT,c2++):0,jT++,Fo===10&&(jT=1,OM++),Fo}function A6(){return WT(XT,c2)}function MM(){return c2}function RM(t,e){return YT(XT,t,e)}function CQ(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R4t(t){return OM=jT=1,r4e=Zd(XT=t),c2=0,[]}function D4t(t){return XT="",t}function Bz(t){return t4e(RM(c2-1,Hz(t===91?t+2:t===40?t+1:t)))}function N4t(t){for(;(Fo=A6())&&Fo<33;)Q0();return CQ(t)>2||CQ(Fo)>3?"":" "}function I4t(t,e){for(;--e&&Q0()&&!(Fo<48||Fo>102||Fo>57&&Fo<65||Fo>70&&Fo<97););return RM(t,MM()+(e<6&&A6()==32&&Q0()==32))}function Hz(t){for(;Q0();)switch(Fo){case t:return c2;case 34:case 39:t!==34&&t!==39&&Hz(Fo);break;case 40:t===41&&Hz(t);break;case 92:Q0();break}return c2}function k4t(t,e){for(;Q0()&&t+Fo!==57;)if(t+Fo===84&&A6()===47)break;return"/*"+RM(e,c2-1)+"*"+kz(t===47?t:Q0())}function P4t(t){for(;!CQ(A6());)Q0();return RM(t,c2)}function n4e(t){return D4t(DM("",null,null,null,[""],t=R4t(t),0,[0],t))}function DM(t,e,r,n,i,a,o,s,l){for(var u=0,d=0,h=o,f=0,p=0,g=0,m=1,v=1,T=1,y=0,_="",Q=i,b=a,x=n,E=_;v;)switch(g=y,y=Q0()){case 40:if(g!=108&&WT(E,h-1)==58){w4t(E+=wM(Bz(y),"&","&\f"),"&\f",e4e(u?s[u-1]:0))!=-1&&(T=-1);break}case 34:case 39:case 91:E+=Bz(y);break;case 9:case 10:case 13:case 32:E+=N4t(g);break;case 92:E+=I4t(MM()-1,7);continue;case 47:switch(A6()){case 42:case 47:AM(B4t(k4t(Q0(),MM()),e,r,l),l),(CQ(g||1)==5||CQ(A6()||1)==5)&&Zd(E)&&YT(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*m:s[u++]=Zd(E)*T;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:T==-1&&(E=wM(E,/\f/g,"")),p>0&&(Zd(E)-h||m===0&&g===47)&&AM(p>32?a4e(E+";",n,r,h-1,l):a4e(wM(E," ","")+";",n,r,h-2,l),l);break;case 59:E+=";";default:if(AM(x=i4e(E,e,r,u,d,i,s,_,Q=[],b=[],h,a),a),y===123)if(d===0)DM(E,e,x,x,Q,a,h,s,b);else{switch(f){case 99:if(WT(E,3)===110)break;case 108:if(WT(E,2)===97)break;default:d=0;case 100:case 109:case 115:}d?DM(t,x,x,n&&AM(i4e(t,x,x,0,0,i,s,_,i,Q=[],h,b),b),i,b,h,s,n?Q:b):DM(E,x,x,x,[""],b,0,s,b)}}u=d=p=0,m=T=1,_=E="",h=o;break;case 58:h=1+Zd(E),p=g;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&M4t()==125)continue}switch(E+=kz(y),y*m){case 38:T=d>0?1:(E+="\f",-1);break;case 44:s[u++]=(Zd(E)-1)*T,T=1;break;case 64:A6()===45&&(E+=Bz(Q0())),f=A6(),d=h=Zd(_=E+=P4t(MM())),y++;break;case 45:g===45&&Zd(E)==2&&(m=0)}}return a}function i4e(t,e,r,n,i,a,o,s,l,u,d,h){for(var f=i-1,p=i===0?a:[""],g=A4t(p),m=0,v=0,T=0;m<n;++m)for(var y=0,_=YT(t,f+1,f=e4e(v=o[m])),Q=t;y<g;++y)(Q=t4e(v>0?p[y]+" "+_:wM(_,/&\f/g,p[y])))&&(l[T++]=Q);return Pz(t,e,r,i===0?Zfe:s,l,u,d,h)}function B4t(t,e,r,n){return Pz(t,e,r,Kfe,kz(O4t()),YT(t,2,-2),0,n)}function a4e(t,e,r,n,i){return Pz(t,e,r,Jfe,YT(t,0,n),YT(t,n+1,-1),n,i)}function NM(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function o4e(t,e,r,n){switch(t.type){case L4t:if(t.children.length)break;case E4t:case S4t:case Jfe:return t.return=t.return||t.value;case Kfe:return"";case C4t:return t.return=t.value+"{"+NM(t.children,n)+"}";case Zfe:if(!Zd(t.value=t.props.join(",")))return""}return Zd(r=NM(t.children,n))?t.return=t.value+"{"+r+"}":""}function s4e(t,e){const{path:r,parentSelectors:n}=e;Dz(!1,`[Ant Design Vue CSS-in-JS] ${r?`Error in '${r}': `:""}${t}${n.length?` Selector info: ${n.join(" -> ")}`:""}`)}const H4t=(t,e,r)=>{if(t==="content"){const n=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof e!="string"||["normal","none","initial","inherit","unset"].indexOf(e)===-1&&!n.test(e)&&(e.charAt(0)!==e.charAt(e.length-1)||e.charAt(0)!=='"'&&e.charAt(0)!=="'"))&&s4e(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`,r)}},F4t=(t,e,r)=>{t==="animation"&&r.hashId&&e!=="none"&&s4e(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`,r)},l4e="data-ant-cssinjs-cache-path",V4t="_FILE_STYLE__";let ig,u4e=!0;function $4t(){var t;if(!ig&&(ig={},Xd())){const e=document.createElement("div");e.className=l4e,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let r=getComputedStyle(e).content||"";r=r.replace(/^"/,"").replace(/"$/,""),r.split(";").forEach(i=>{const[a,o]=i.split(":");ig[a]=o});const n=document.querySelector(`style[${l4e}]`);n&&(u4e=!1,(t=n.parentNode)===null||t===void 0||t.removeChild(n)),document.body.removeChild(e)}}function U4t(t){return $4t(),!!ig[t]}function z4t(t){const e=ig[t];let r=null;if(e&&Xd())if(u4e)r=V4t;else{const n=document.querySelector(`style[${rg}="${ig[t]}"]`);n?r=n.innerHTML:delete ig[t]}return[r,e]}const c4e=Xd(),d4e="_skip_check_",h4e="_multi_value_";function f4e(t){return NM(n4e(t),o4e).replace(/\{%%%\:[^;];}/g,";")}function G4t(t){return typeof t=="object"&&t&&(d4e in t||h4e in t)}function q4t(t,e,r){if(!e)return t;const n=`.${e}`,i=r==="low"?`:where(${n})`:n;return t.split(",").map(o=>{var s;const l=o.trim().split(/\s+/);let u=l[0]||"";const d=((s=u.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return u=`${d}${i}${u.slice(d.length)}`,[u,...l.slice(1)].join(" ")}).join(",")}const Fz=new Set;process.env.NODE_ENV;const Vz=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:r,injectHash:n,parentSelectors:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:a,layer:o,path:s,hashPriority:l,transformers:u=[],linters:d=[]}=e;let h="",f={};function p(v){const T=v.getName(a);if(!f[T]){const[y]=Vz(v.style,e,{root:!1,parentSelectors:i});f[T]=`@keyframes ${v.getName(a)}${y}`}}function g(v){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return v.forEach(y=>{Array.isArray(y)?g(y,T):y&&T.push(y)}),T}if(g(Array.isArray(t)?t:[t]).forEach(v=>{const T=typeof v=="string"&&!r?{}:v;if(typeof T=="string")h+=`${T}
|
|
2
2
|
`;else if(T._keyframe)p(T);else{const y=u.reduce((_,Q)=>{var b;return((b=Q==null?void 0:Q.visit)===null||b===void 0?void 0:b.call(Q,_))||_},T);Object.keys(y).forEach(_=>{var Q;const b=y[_];if(typeof b=="object"&&b&&(_!=="animationName"||!b._keyframe)&&!G4t(b)){let x=!1,E=_.trim(),S=!1;(r||n)&&a?E.startsWith("@")?x=!0:E=q4t(_,a,l):r&&!a&&(E==="&"||E==="")&&(E="",S=!0);const[C,L]=Vz(b,e,{root:S,injectHash:x,parentSelectors:[...i,E]});f=he(he({},f),L),h+=`${E}${C}`}else{let x=function(S,C){process.env.NODE_ENV!=="production"&&(typeof b!="object"||!(b!=null&&b[d4e]))&&[H4t,F4t,...d].forEach(O=>O(S,C,{path:s,hashId:a,parentSelectors:i}));const L=S.replace(/[A-Z]/g,O=>`-${O.toLowerCase()}`);let w=C;!x4t[S]&&typeof w=="number"&&w!==0&&(w=`${w}px`),S==="animationName"&&(C!=null&&C._keyframe)&&(p(C),w=C.getName(a)),h+=`${L}:${w};`};const E=(Q=b==null?void 0:b.value)!==null&&Q!==void 0?Q:b;typeof b=="object"&&(b!=null&&b[h4e])&&Array.isArray(E)?E.forEach(S=>{x(_,S)}):x(_,E)}})}}),!r)h=`{${h}}`;else if(o&&f4t()){const v=o.split(",");h=`@layer ${v[v.length-1].trim()} {${h}}`,v.length>1&&(h=`@layer ${o}{%%%:%}${h}`)}return[h,f]};function W4t(t,e){return Az(`${t.join("%")}${e}`)}function $z(t,e){const r=EM(),n=I.computed(()=>t.value.token._tokenKey),i=I.computed(()=>[n.value,...t.value.path]);let a=c4e;return process.env.NODE_ENV!=="production"&&r.value.mock!==void 0&&(a=r.value.mock==="client"),Bfe("style",i,()=>{const{path:o,hashId:s,layer:l,nonce:u,clientOnly:d,order:h=0}=t.value,f=i.value.join("|");if(U4t(f)){const[E,S]=z4t(f);if(E)return[E,n.value,S,{},d,h]}const p=e(),{hashPriority:g,container:m,transformers:v,linters:T,cache:y}=r.value,[_,Q]=Vz(p,{hashId:s,hashPriority:g,layer:l,path:o.join("-"),transformers:v,linters:T}),b=f4e(_),x=W4t(i.value,b);if(a){const E={mark:rg,prepend:"queue",attachTo:m,priority:h},S=typeof u=="function"?u():u;S&&(E.csp={nonce:S});const C=EQ(b,x,E);C[GT]=y.instanceId,C.setAttribute(Ife,n.value),process.env.NODE_ENV!=="production"&&C.setAttribute(Kft,i.value.join("|")),Object.keys(Q).forEach(L=>{Fz.has(L)||(Fz.add(L),EQ(f4e(Q[L]),`_effect-${L}`,{mark:rg,prepend:"queue",attachTo:m}))})}return[b,n.value,x,Q,d,h]},(o,s)=>{let[,,l]=o;(s||r.value.autoClear)&&c4e&&CM(l,{mark:rg})}),o=>o}class ii{constructor(e,r){this._keyframe=!0,this.name=e,this.style=r}getName(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e?`${e}-${this.name}`:this.name}}function KT(t){return t.notSplit=!0,t}KT(["borderTop","borderBottom"]),KT(["borderTop"]),KT(["borderBottom"]),KT(["borderLeft","borderRight"]),KT(["borderLeft"]),KT(["borderRight"]);const Y4t="4.2.6",LQ=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function dl(t,e){j4t(t)&&(t="100%");var r=X4t(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function IM(t){return Math.min(1,Math.max(0,t))}function j4t(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function X4t(t){return typeof t=="string"&&t.indexOf("%")!==-1}function p4e(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function kM(t){return t<=1?"".concat(Number(t)*100,"%"):t}function ag(t){return t.length===1?"0"+t:String(t)}function K4t(t,e,r){return{r:dl(t,255)*255,g:dl(e,255)*255,b:dl(r,255)*255}}function g4e(t,e,r){t=dl(t,255),e=dl(e,255),r=dl(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a=0,o=0,s=(n+i)/2;if(n===i)o=0,a=0;else{var l=n-i;switch(o=s>.5?l/(2-n-i):l/(n+i),n){case t:a=(e-r)/l+(e<r?6:0);break;case e:a=(r-t)/l+2;break;case r:a=(t-e)/l+4;break}a/=6}return{h:a,s:o,l:s}}function Uz(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Z4t(t,e,r){var n,i,a;if(t=dl(t,360),e=dl(e,100),r=dl(r,100),e===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+e):r+e-r*e,s=2*r-o;n=Uz(s,o,t+1/3),i=Uz(s,o,t),a=Uz(s,o,t-1/3)}return{r:n*255,g:i*255,b:a*255}}function zz(t,e,r){t=dl(t,255),e=dl(e,255),r=dl(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a=0,o=n,s=n-i,l=n===0?0:s/n;if(n===i)a=0;else{switch(n){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4;break}a/=6}return{h:a,s:l,v:o}}function J4t(t,e,r){t=dl(t,360)*6,e=dl(e,100),r=dl(r,100);var n=Math.floor(t),i=t-n,a=r*(1-e),o=r*(1-i*e),s=r*(1-(1-i)*e),l=n%6,u=[r,o,a,a,s,r][l],d=[s,r,r,o,a,a][l],h=[a,a,s,r,r,o][l];return{r:u*255,g:d*255,b:h*255}}function Gz(t,e,r,n){var i=[ag(Math.round(t).toString(16)),ag(Math.round(e).toString(16)),ag(Math.round(r).toString(16))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function e6t(t,e,r,n,i){var a=[ag(Math.round(t).toString(16)),ag(Math.round(e).toString(16)),ag(Math.round(r).toString(16)),ag(t6t(n))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function t6t(t){return Math.round(parseFloat(t)*255).toString(16)}function m4e(t){return Yc(t)/255}function Yc(t){return parseInt(t,16)}function r6t(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var qz={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ZT(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof t=="string"&&(t=a6t(t)),typeof t=="object"&&(Mh(t.r)&&Mh(t.g)&&Mh(t.b)?(e=K4t(t.r,t.g,t.b),o=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Mh(t.h)&&Mh(t.s)&&Mh(t.v)?(n=kM(t.s),i=kM(t.v),e=J4t(t.h,n,i),o=!0,s="hsv"):Mh(t.h)&&Mh(t.s)&&Mh(t.l)&&(n=kM(t.s),a=kM(t.l),e=Z4t(t.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=p4e(r),{ok:o,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var n6t="[-\\+]?\\d+%?",i6t="[-\\+]?\\d*\\.\\d+%?",O6="(?:".concat(i6t,")|(?:").concat(n6t,")"),Wz="[\\s|\\(]+(".concat(O6,")[,|\\s]+(").concat(O6,")[,|\\s]+(").concat(O6,")\\s*\\)?"),Yz="[\\s|\\(]+(".concat(O6,")[,|\\s]+(").concat(O6,")[,|\\s]+(").concat(O6,")[,|\\s]+(").concat(O6,")\\s*\\)?"),x0={CSS_UNIT:new RegExp(O6),rgb:new RegExp("rgb"+Wz),rgba:new RegExp("rgba"+Yz),hsl:new RegExp("hsl"+Wz),hsla:new RegExp("hsla"+Yz),hsv:new RegExp("hsv"+Wz),hsva:new RegExp("hsva"+Yz),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function a6t(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(qz[t])t=qz[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=x0.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=x0.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=x0.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=x0.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=x0.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=x0.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=x0.hex8.exec(t),r?{r:Yc(r[1]),g:Yc(r[2]),b:Yc(r[3]),a:m4e(r[4]),format:e?"name":"hex8"}:(r=x0.hex6.exec(t),r?{r:Yc(r[1]),g:Yc(r[2]),b:Yc(r[3]),format:e?"name":"hex"}:(r=x0.hex4.exec(t),r?{r:Yc(r[1]+r[1]),g:Yc(r[2]+r[2]),b:Yc(r[3]+r[3]),a:m4e(r[4]+r[4]),format:e?"name":"hex8"}:(r=x0.hex3.exec(t),r?{r:Yc(r[1]+r[1]),g:Yc(r[2]+r[2]),b:Yc(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function Mh(t){return!!x0.CSS_UNIT.exec(String(t))}var Ca=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=r6t(e)),this.originalInput=e;var i=ZT(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,i,a=e.r/255,o=e.g/255,s=e.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=p4e(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=zz(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=zz(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=g4e(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=g4e(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Gz(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),e6t(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(dl(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(dl(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Gz(this.r,this.g,this.b,!1),r=0,n=Object.entries(qz);r<n.length;r++){var i=n[r],a=i[0],o=i[1];if(e===o)return a}return!1},t.prototype.toString=function(e){var r=!!e;e=e??this.format;var n=!1,i=this.a<1&&this.a>=0,a=!r&&i&&(e.startsWith("hex")||e==="name");return a?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=IM(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=IM(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=IM(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=IM(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),i=new t(e).toRgb(),a=r/100,o={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new t(o)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(new t(n));return a},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(new t({h:n,s:i,v:a})),a=(a+s)%1;return o},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),i=r.a+n.a*(1-r.a);return new t({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,i=[this],a=360/e,o=1;o<e;o++)i.push(new t({h:(n+o*a)%360,s:r.s,l:r.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}(),PM=2,T4e=.16,o6t=.05,s6t=.05,l6t=.15,v4e=5,y4e=4,u6t=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function _4e(t){var e=t.r,r=t.g,n=t.b,i=zz(e,r,n);return{h:i.h*360,s:i.s,v:i.v}}function BM(t){var e=t.r,r=t.g,n=t.b;return"#".concat(Gz(e,r,n,!1))}function c6t(t,e,r){var n=r/100,i={r:(e.r-t.r)*n+t.r,g:(e.g-t.g)*n+t.g,b:(e.b-t.b)*n+t.b};return i}function b4e(t,e,r){var n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-PM*e:Math.round(t.h)+PM*e:n=r?Math.round(t.h)+PM*e:Math.round(t.h)-PM*e,n<0?n+=360:n>=360&&(n-=360),n}function Q4e(t,e,r){if(t.h===0&&t.s===0)return t.s;var n;return r?n=t.s-T4e*e:e===y4e?n=t.s+T4e:n=t.s+o6t*e,n>1&&(n=1),r&&e===v4e&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function x4e(t,e,r){var n;return r?n=t.v+s6t*e:n=t.v-l6t*e,n>1&&(n=1),Number(n.toFixed(2))}function og(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=ZT(t),i=v4e;i>0;i-=1){var a=_4e(n),o=BM(ZT({h:b4e(a,i,!0),s:Q4e(a,i,!0),v:x4e(a,i,!0)}));r.push(o)}r.push(BM(n));for(var s=1;s<=y4e;s+=1){var l=_4e(n),u=BM(ZT({h:b4e(l,s),s:Q4e(l,s),v:x4e(l,s)}));r.push(u)}return e.theme==="dark"?u6t.map(function(d){var h=d.index,f=d.opacity,p=BM(c6t(ZT(e.backgroundColor||"#141414"),ZT(r[h]),f*100));return p}):r}var jz={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},HM={},Xz={};Object.keys(jz).forEach(function(t){HM[t]=og(jz[t]),HM[t].primary=HM[t][5],Xz[t]=og(jz[t],{theme:"dark",backgroundColor:"#141414"}),Xz[t].primary=Xz[t][5]});var d6t=HM.blue;const h6t=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function f6t(t){const{sizeUnit:e,sizeStep:r}=t;return{sizeXXL:e*(r+8),sizeXL:e*(r+4),sizeLG:e*(r+2),sizeMD:e*(r+1),sizeMS:e*r,size:e*r,sizeSM:e*(r-1),sizeXS:e*(r-2),sizeXXS:e*(r-3)}}const E4e={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},FM=he(he({},E4e),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
3
3
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
4
4
|
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function p6t(t,e){let{generateColorPalettes:r,generateNeutralColorPalettes:n}=e;const{colorSuccess:i,colorWarning:a,colorError:o,colorInfo:s,colorPrimary:l,colorBgBase:u,colorTextBase:d}=t,h=r(l),f=r(i),p=r(a),g=r(o),m=r(s),v=n(u,d);return he(he({},v),{colorPrimaryBg:h[1],colorPrimaryBgHover:h[2],colorPrimaryBorder:h[3],colorPrimaryBorderHover:h[4],colorPrimaryHover:h[5],colorPrimary:h[6],colorPrimaryActive:h[7],colorPrimaryTextHover:h[8],colorPrimaryText:h[9],colorPrimaryTextActive:h[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],colorErrorBorder:g[3],colorErrorBorderHover:g[4],colorErrorHover:g[5],colorError:g[6],colorErrorActive:g[7],colorErrorTextHover:g[8],colorErrorText:g[9],colorErrorTextActive:g[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorBgMask:new Ca("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const g6t=t=>{let e=t,r=t,n=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?r=4:t<8&&t>=7?r=5:t<14&&t>=8?r=6:t<16&&t>=14?r=7:t>=16&&(r=8),t<6&&t>=2?n=1:t>=6&&(n=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t>16?16:t,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:e,borderRadiusOuter:i}};function m6t(t){const{motionUnit:e,motionBase:r,borderRadius:n,lineWidth:i}=t;return he({motionDurationFast:`${(r+e).toFixed(1)}s`,motionDurationMid:`${(r+e*2).toFixed(1)}s`,motionDurationSlow:`${(r+e*3).toFixed(1)}s`,lineWidthBold:i+1},g6t(n))}const Rh=(t,e)=>new Ca(t).setAlpha(e).toRgbString(),wQ=(t,e)=>new Ca(t).darken(e).toHexString(),T6t=t=>{const e=og(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},v6t=(t,e)=>{const r=t||"#fff",n=e||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Rh(n,.88),colorTextSecondary:Rh(n,.65),colorTextTertiary:Rh(n,.45),colorTextQuaternary:Rh(n,.25),colorFill:Rh(n,.15),colorFillSecondary:Rh(n,.06),colorFillTertiary:Rh(n,.04),colorFillQuaternary:Rh(n,.02),colorBgLayout:wQ(r,4),colorBgContainer:wQ(r,0),colorBgElevated:wQ(r,0),colorBgSpotlight:Rh(n,.85),colorBorder:wQ(r,15),colorBorderSecondary:wQ(r,6)}};function y6t(t){const e=new Array(10).fill(null).map((r,n)=>{const i=n-1,a=t*Math.pow(2.71828,i/5),o=n>1?Math.floor(a):Math.ceil(a);return Math.floor(o/2)*2});return e[1]=t,e.map(r=>{const n=r+8;return{size:r,lineHeight:n/r}})}const _6t=t=>{const e=y6t(t),r=e.map(i=>i.size),n=e.map(i=>i.lineHeight);return{fontSizeSM:r[0],fontSize:r[1],fontSizeLG:r[2],fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:n[1],lineHeightLG:n[2],lineHeightSM:n[0],lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function b6t(t){const e=Object.keys(E4e).map(r=>{const n=og(t[r]);return new Array(10).fill(1).reduce((i,a,o)=>(i[`${r}-${o+1}`]=n[o],i),{})}).reduce((r,n)=>(r=he(he({},r),n),r),{});return he(he(he(he(he(he(he({},t),e),p6t(t,{generateColorPalettes:T6t,generateNeutralColorPalettes:v6t})),_6t(t.fontSize)),f6t(t)),h6t(t)),m6t(t))}function Kz(t){return t>=0&&t<=255}function VM(t,e){const{r,g:n,b:i,a}=new Ca(t).toRgb();if(a<1)return t;const{r:o,g:s,b:l}=new Ca(e).toRgb();for(let u=.01;u<=1;u+=.01){const d=Math.round((r-o*(1-u))/u),h=Math.round((n-s*(1-u))/u),f=Math.round((i-l*(1-u))/u);if(Kz(d)&&Kz(h)&&Kz(f))return new Ca({r:d,g:h,b:f,a:Math.round(u*100)/100}).toRgbString()}return new Ca({r,g:n,b:i,a:1}).toRgbString()}var Q6t=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function x6t(t){const{override:e}=t,r=Q6t(t,["override"]),n=he({},e);Object.keys(FM).forEach(p=>{delete n[p]});const i=he(he({},r),n),a=480,o=576,s=768,l=992,u=1200,d=1600,h=2e3;return he(he(he({},i),{colorLink:i.colorInfoText,colorLinkHover:i.colorInfoHover,colorLinkActive:i.colorInfoActive,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:VM(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:VM(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:VM(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:VM(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
|
|
@@ -214,7 +214,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
214
214
|
top:0 !important;
|
|
215
215
|
right:0 !important;
|
|
216
216
|
pointer-events: none !important;
|
|
217
|
-
`,yQt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Hq={};let v2;function _Qt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Hq[r])return Hq[r];const n=window.getComputedStyle(t),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),a=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),o=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),l={sizingStyle:yQt.map(u=>`${u}:${n.getPropertyValue(u)}`).join(";"),paddingSize:a,borderSize:o,boxSizing:i};return e&&r&&(Hq[r]=l),l}function bQt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;v2||(v2=document.createElement("textarea"),v2.setAttribute("tab-index","-1"),v2.setAttribute("aria-hidden","true"),document.body.appendChild(v2)),t.getAttribute("wrap")?v2.setAttribute("wrap",t.getAttribute("wrap")):v2.removeAttribute("wrap");const{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=_Qt(t,e);v2.setAttribute("style",`${s};${vQt}`),v2.value=t.value||t.placeholder||"";let l,u,d,h=v2.scrollHeight;if(o==="border-box"?h+=a:o==="content-box"&&(h-=i),r!==null||n!==null){v2.value=" ";const p=v2.scrollHeight-i;r!==null&&(l=p*r,o==="border-box"&&(l=l+i+a),h=Math.max(l,h)),n!==null&&(u=p*n,o==="border-box"&&(u=u+i+a),d=h>u?"":"hidden",h=Math.min(u,h))}const f={height:`${h}px`,overflowY:d,resize:"none"};return l&&(f.minHeight=`${l}px`),u&&(f.maxHeight=`${u}px`),f}const Fq=0,Vq=1,$q=2,QQt=I.defineComponent({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:b7e(),setup(t,e){let{attrs:r,emit:n,expose:i}=e,a,o;const s=I.ref(),l=I.ref({}),u=I.ref($q);I.onBeforeUnmount(()=>{ro.cancel(a),ro.cancel(o)});const d=()=>{try{if(s.value&&document.activeElement===s.value.input){const x=s.value.getSelectionStart(),E=s.value.getSelectionEnd(),S=s.value.getScrollTop();s.value.setSelectionRange(x,E),s.value.setScrollTop(S)}}catch{}},h=I.ref(),f=I.ref();I.watchEffect(()=>{const x=t.autoSize||t.autosize;x?(h.value=x.minRows,f.value=x.maxRows):(h.value=void 0,f.value=void 0)});const p=I.computed(()=>!!(t.autoSize||t.autosize)),g=()=>{u.value=Fq};I.watch([()=>t.value,h,f,p],()=>{p.value&&g()},{immediate:!0});const m=I.ref();I.watch([u,s],()=>{if(s.value)if(u.value===Fq)u.value=Vq;else if(u.value===Vq){const x=bQt(s.value.input,!1,h.value,f.value);u.value=$q,m.value=x}else d()},{immediate:!0,flush:"post"});const v=I.getCurrentInstance(),T=I.ref(),y=()=>{ro.cancel(T.value)},_=x=>{u.value===$q&&(n("resize",x),p.value&&(y(),T.value=ro(()=>{g()})))};I.onBeforeUnmount(()=>{y()}),i({resizeTextarea:()=>{g()},textArea:I.computed(()=>{var x;return(x=s.value)===null||x===void 0?void 0:x.input}),instance:v}),Kd(t.autosize===void 0,"Input.TextArea","autosize is deprecated, please use autoSize instead.");const b=()=>{const{prefixCls:x,disabled:E}=t,S=h2(t,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),C=Ir(x,r.class,{[`${x}-disabled`]:E}),L=p.value?m.value:null,w=[r.style,l.value,L],O=he(he(he({},S),r),{style:w,class:C});return(u.value===Fq||u.value===Vq)&&w.push({overflowX:"hidden",overflowY:"hidden"}),O.autofocus||delete O.autofocus,O.rows===0&&delete O.rows,I.createVNode(QM,{onResize:_,disabled:!p.value},{default:()=>[I.createVNode(i5e,xt(xt({},O),{},{ref:s,tag:"textarea"}),null)]})};return()=>b()}});function x7e(t,e){return[...t||""].slice(0,e).join("")}function E7e(t,e,r,n){let i=r;return t?i=x7e(r,n):[...e||""].length<r.length&&[...r||""].length>n&&(i=e),i}const xQt=I.defineComponent({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:b7e(),setup(t,e){let{attrs:r,expose:n,emit:i}=e;var a;const o=A5e(),s=dv.useInject(),l=I.computed(()=>jG(s.status,t.status)),u=I.shallowRef((a=t.value)!==null&&a!==void 0?a:t.defaultValue),d=I.shallowRef(),h=I.shallowRef(""),{prefixCls:f,size:p,direction:g}=La("input",t),[m,v]=Lq(f),T=QQ(),y=I.computed(()=>t.showCount===""||t.showCount||!1),_=I.computed(()=>Number(t.maxlength)>0),Q=I.shallowRef(!1),b=I.shallowRef(),x=I.shallowRef(0),E=V=>{Q.value=!0,b.value=h.value,x.value=V.currentTarget.selectionStart,i("compositionstart",V)},S=V=>{var H;Q.value=!1;let $=V.currentTarget.value;if(_.value){const G=x.value>=t.maxlength+1||x.value===((H=b.value)===null||H===void 0?void 0:H.length);$=E7e(G,b.value,$,t.maxlength)}$!==h.value&&(O($),ax(V.currentTarget,V,D,$)),i("compositionend",V)},C=I.getCurrentInstance();I.watch(()=>t.value,()=>{var V;"value"in C.vnode.props,u.value=(V=t.value)!==null&&V!==void 0?V:""});const L=V=>{var H;v7e((H=d.value)===null||H===void 0?void 0:H.textArea,V)},w=()=>{var V,H;(H=(V=d.value)===null||V===void 0?void 0:V.textArea)===null||H===void 0||H.blur()},O=(V,H)=>{u.value!==V&&(t.value===void 0?u.value=V:I.nextTick(()=>{var $,G,U;d.value.textArea.value!==h.value&&((U=($=d.value)===null||$===void 0?void 0:(G=$.instance).update)===null||U===void 0||U.call(G))}),I.nextTick(()=>{H&&H()}))},R=V=>{V.keyCode===13&&i("pressEnter",V),i("keydown",V)},M=V=>{const{onBlur:H}=t;H==null||H(V),o.onFieldBlur()},D=V=>{i("update:value",V.target.value),i("change",V),i("input",V),o.onFieldChange()},P=V=>{ax(d.value.textArea,V,D),O("",()=>{L()})},B=V=>{let H=V.target.value;if(u.value!==H){if(_.value){const $=V.target,G=$.selectionStart>=t.maxlength+1||$.selectionStart===H.length||!$.selectionStart;H=E7e(G,h.value,H,t.maxlength)}ax(V.currentTarget,V,D,H),O(H)}},k=()=>{var V,H;const{class:$}=r,{bordered:G=!0}=t,U=he(he(he({},h2(t,["allowClear"])),r),{class:[{[`${f.value}-borderless`]:!G,[`${$}`]:$&&!y.value,[`${f.value}-sm`]:p.value==="small",[`${f.value}-lg`]:p.value==="large"},UQ(f.value,l.value),v.value],disabled:T.value,showCount:null,prefixCls:f.value,onInput:B,onChange:B,onBlur:M,onKeydown:R,onCompositionstart:E,onCompositionend:S});return!((V=t.valueModifiers)===null||V===void 0)&&V.lazy&&delete U.onInput,I.createVNode(QQt,xt(xt({},U),{},{id:(H=U==null?void 0:U.id)!==null&&H!==void 0?H:o.id.value,ref:d,maxlength:t.maxlength,lazy:t.lazy}),null)};return n({focus:L,blur:w,resizableTextArea:d}),I.watchEffect(()=>{let V=Bq(u.value);!Q.value&&_.value&&(t.value===null||t.value===void 0)&&(V=x7e(V,t.maxlength)),h.value=V}),()=>{var V;const{maxlength:H,bordered:$=!0,hidden:G}=t,{style:U,class:Y}=r,ne=he(he(he({},t),r),{prefixCls:f.value,inputType:"text",handleReset:P,direction:g.value,bordered:$,style:y.value?void 0:U,hashId:v.value,disabled:(V=t.disabled)!==null&&V!==void 0?V:T.value});let te=I.createVNode(TQt,xt(xt({},ne),{},{value:h.value,status:t.status}),{element:k});if(y.value||s.hasFeedback){const ee=[...h.value].length;let ie="";typeof y.value=="object"?ie=y.value.formatter({value:h.value,count:ee,maxlength:H}):ie=`${ee}${_.value?` / ${H}`:""}`,te=I.createVNode("div",{hidden:G,class:Ir(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:g.value==="rtl",[`${f.value}-textarea-show-count`]:y.value,[`${f.value}-textarea-in-form-item`]:s.isFormItemInput},`${f.value}-textarea-show-count`,Y,v.value),style:U,"data-count":typeof ie!="object"?ie:void 0},[te,s.hasFeedback&&I.createVNode("span",{class:`${f.value}-textarea-suffix`},[s.feedbackIcon])])}return m(te)}}});var EQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function S7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){SQt(t,i,r[i])})}return t}function SQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var zR=function(e,r){var n=S7e({},e,r.attrs);return I.createVNode(Mi,S7e({},n,{icon:EQt}),null)};zR.displayName="EyeOutlined",zR.inheritAttrs=!1;var CQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function C7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){LQt(t,i,r[i])})}return t}function LQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Uq=function(e,r){var n=C7e({},e,r.attrs);return I.createVNode(Mi,C7e({},n,{icon:CQt}),null)};Uq.displayName="EyeInvisibleOutlined",Uq.inheritAttrs=!1;var wQt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const AQt={click:"onClick",hover:"onMouseover"},OQt=t=>t?I.createVNode(zR,null,null):I.createVNode(Uq,null,null),MQt=I.defineComponent({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:he(he({},UR()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(t,e){let{slots:r,attrs:n,expose:i,emit:a}=e;const o=I.shallowRef(!1),s=()=>{const{disabled:v}=t;v||(o.value=!o.value,a("update:visible",o.value))};I.watchEffect(()=>{t.visible!==void 0&&(o.value=!!t.visible)});const l=I.shallowRef();i({focus:()=>{var v;(v=l.value)===null||v===void 0||v.focus()},blur:()=>{var v;(v=l.value)===null||v===void 0||v.blur()}});const h=v=>{const{action:T,iconRender:y=r.iconRender||OQt}=t,_=AQt[T]||"",Q=y(o.value),b={[_]:s,class:`${v}-icon`,key:"passwordIcon",onMousedown:x=>{x.preventDefault()},onMouseup:x=>{x.preventDefault()}};return ns(UT(Q)?Q:I.createVNode("span",null,[Q]),b)},{prefixCls:f,getPrefixCls:p}=La("input-password",t),g=I.computed(()=>p("input",t.inputPrefixCls)),m=()=>{const{size:v,visibilityToggle:T}=t,y=wQt(t,["size","visibilityToggle"]),_=T&&h(f.value),Q=Ir(f.value,n.class,{[`${f.value}-${v}`]:!!v}),b=he(he(he({},h2(y,["suffix","iconRender","action"])),n),{type:o.value?"text":"password",class:Q,prefixCls:g.value,suffix:_});return v&&(b.size=v),I.createVNode(Ps,xt({ref:l},b),r)};return()=>m()}});Ps.Group=hQt,Ps.Search=pQt,Ps.TextArea=xQt,Ps.Password=MQt,Ps.install=function(t){return t.component(Ps.name,Ps),t.component(Ps.Group.name,Ps.Group),t.component(Ps.Search.name,Ps.Search),t.component(Ps.TextArea.name,Ps.TextArea),t.component(Ps.Password.name,Ps.Password),t};function GR(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Wt.shape({x:Number,y:Number}).loose,title:Wt.any,footer:Wt.any,transitionName:String,maskTransitionName:String,animation:Wt.any,maskAnimation:Wt.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Wt.any,maskProps:Wt.any,wrapProps:Wt.any,getContainer:Wt.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Wt.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function L7e(t,e,r){let n=e;return!n&&r&&(n=`${t}-${r}`),n}let w7e=-1;function RQt(){return w7e+=1,w7e}function A7e(t,e){let r=t[`page${e?"Y":"X"}Offset`];const n=`scroll${e?"Top":"Left"}`;if(typeof r!="number"){const i=t.document;r=i.documentElement[n],typeof r!="number"&&(r=i.body[n])}return r}function DQt(t){const e=t.getBoundingClientRect(),r={left:e.left,top:e.top},n=t.ownerDocument,i=n.defaultView||n.parentWindow;return r.left+=A7e(i),r.top+=A7e(i,!0),r}const NQt={width:0,height:0,overflow:"hidden",outline:"none"},IQt={outline:"none"},kQt=I.defineComponent({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:he(he({},GR()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(t,e){let{expose:r,slots:n,attrs:i}=e;const a=I.ref(),o=I.ref(),s=I.ref();r({focus:()=>{var f;(f=a.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:p}=document;f&&p===o.value?a.value.focus({preventScroll:!0}):!f&&p===a.value&&o.value.focus({preventScroll:!0})}});const l=I.ref(),u=I.computed(()=>{const{width:f,height:p}=t,g={};return f!==void 0&&(g.width=typeof f=="number"?`${f}px`:f),p!==void 0&&(g.height=typeof p=="number"?`${p}px`:p),l.value&&(g.transformOrigin=l.value),g}),d=()=>{I.nextTick(()=>{if(s.value){const f=DQt(s.value);l.value=t.mousePosition?`${t.mousePosition.x-f.left}px ${t.mousePosition.y-f.top}px`:""}})},h=f=>{t.onVisibleChanged(f)};return()=>{var f,p,g,m;const{prefixCls:v,footer:T=(f=n.footer)===null||f===void 0?void 0:f.call(n),title:y=(p=n.title)===null||p===void 0?void 0:p.call(n),ariaId:_,closable:Q,closeIcon:b=(g=n.closeIcon)===null||g===void 0?void 0:g.call(n),onClose:x,bodyStyle:E,bodyProps:S,onMousedown:C,onMouseup:L,visible:w,modalRender:O=n.modalRender,destroyOnClose:R,motionName:M}=t;let D;T&&(D=I.createVNode("div",{class:`${v}-footer`},[T]));let P;y&&(P=I.createVNode("div",{class:`${v}-header`},[I.createVNode("div",{class:`${v}-title`,id:_},[y])]));let B;Q&&(B=I.createVNode("button",{type:"button",onClick:x,"aria-label":"Close",class:`${v}-close`},[b||I.createVNode("span",{class:`${v}-close-x`},null)]));const k=I.createVNode("div",{class:`${v}-content`},[B,P,I.createVNode("div",xt({class:`${v}-body`,style:E},S),[(m=n.default)===null||m===void 0?void 0:m.call(n)]),D]),V=iR(M);return I.createVNode(I.Transition,xt(xt({},V),{},{onBeforeEnter:d,onAfterEnter:()=>h(!0),onAfterLeave:()=>h(!1)}),{default:()=>[w||!R?I.withDirectives(I.createVNode("div",xt(xt({},i),{},{ref:s,key:"dialog-element",role:"document",style:[u.value,i.style],class:[v,i.class],onMousedown:C,onMouseup:L}),[I.createVNode("div",{tabindex:0,ref:a,style:IQt},[O?O({originVNode:k}):k]),I.createVNode("div",{tabindex:0,ref:o,style:NQt},null)]),[[I.vShow,w]]):null]})}}}),PQt=I.defineComponent({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(t,e){return()=>{const{prefixCls:r,visible:n,maskProps:i,motionName:a}=t,o=iR(a);return I.createVNode(I.Transition,o,{default:()=>[I.withDirectives(I.createVNode("div",xt({class:`${r}-mask`},i),null),[[I.vShow,n]])]})}}}),O7e=I.defineComponent({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:C6(he(he({},GR()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(t,e){let{attrs:r,slots:n}=e;const i=I.shallowRef(),a=I.shallowRef(),o=I.shallowRef(),s=I.shallowRef(t.visible),l=I.shallowRef(`vcDialogTitle${RQt()}`),u=T=>{var y,_;if(T)w6(a.value,document.activeElement)||(i.value=document.activeElement,(y=o.value)===null||y===void 0||y.focus());else{const Q=s.value;if(s.value=!1,t.mask&&i.value&&t.focusTriggerAfterClose){try{i.value.focus({preventScroll:!0})}catch{}i.value=null}Q&&((_=t.afterClose)===null||_===void 0||_.call(t))}},d=T=>{var y;(y=t.onClose)===null||y===void 0||y.call(t,T)},h=I.shallowRef(!1),f=I.shallowRef(),p=()=>{clearTimeout(f.value),h.value=!0},g=()=>{f.value=setTimeout(()=>{h.value=!1})},m=T=>{if(!t.maskClosable)return null;h.value?h.value=!1:a.value===T.target&&d(T)},v=T=>{if(t.keyboard&&T.keyCode===FQ.ESC){T.stopPropagation(),d(T);return}t.visible&&T.keyCode===FQ.TAB&&o.value.changeActive(!T.shiftKey)};return I.watch(()=>t.visible,()=>{t.visible&&(s.value=!0)},{flush:"post"}),I.onBeforeUnmount(()=>{var T;clearTimeout(f.value),(T=t.scrollLocker)===null||T===void 0||T.unLock()}),I.watchEffect(()=>{var T,y;(T=t.scrollLocker)===null||T===void 0||T.unLock(),s.value&&((y=t.scrollLocker)===null||y===void 0||y.lock())}),()=>{const{prefixCls:T,mask:y,visible:_,maskTransitionName:Q,maskAnimation:b,zIndex:x,wrapClassName:E,rootClassName:S,wrapStyle:C,closable:L,maskProps:w,maskStyle:O,transitionName:R,animation:M,wrapProps:D,title:P=n.title}=t,{style:B,class:k}=r;return I.createVNode("div",xt({class:[`${T}-root`,S]},N7t(t,{data:!0})),[I.createVNode(PQt,{prefixCls:T,visible:y&&_,motionName:L7e(T,Q,b),style:he({zIndex:x},O),maskProps:w},null),I.createVNode("div",xt({tabIndex:-1,onKeydown:v,class:Ir(`${T}-wrap`,E),ref:a,onClick:m,role:"dialog","aria-labelledby":P?l.value:null,style:he(he({zIndex:x},C),{display:s.value?null:"none"})},D),[I.createVNode(kQt,xt(xt({},h2(t,["scrollLocker"])),{},{style:B,class:k,onMousedown:p,onMouseup:g,ref:o,closable:L,ariaId:l.value,prefixCls:T,visible:_,onClose:d,onVisibleChanged:u,motionName:L7e(T,R,M)}),n)])])}}}),BQt=GR(),HQt=I.defineComponent({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:C6(BQt,{visible:!1}),setup(t,e){let{attrs:r,slots:n}=e;const i=I.ref(t.visible);return NG({},{inTriggerContext:!1}),I.watch(()=>t.visible,()=>{t.visible&&(i.value=!0)},{flush:"post"}),()=>{const{visible:a,getContainer:o,forceRender:s,destroyOnClose:l=!1,afterClose:u}=t;let d=he(he(he({},t),r),{ref:"_component",key:"dialog"});return o===!1?I.createVNode(O7e,xt(xt({},d),{},{getOpenCount:()=>2}),n):!s&&l&&!i.value?null:I.createVNode(r5e,{autoLock:!0,visible:a,forceRender:s,getContainer:o},{default:h=>(d=he(he(he({},d),h),{afterClose:()=>{u==null||u(),i.value=!1}}),I.createVNode(O7e,d,n))})}}});function FQt(t){const e=I.ref(null),r=I.reactive(he({},t)),n=I.ref([]),i=a=>{e.value===null&&(n.value=[],e.value=ro(()=>{let o;n.value.forEach(s=>{o=he(he({},o),s)}),he(r,o),e.value=null})),n.value.push(a)};return I.onMounted(()=>{e.value&&ro.cancel(e.value)}),[r,i]}function M7e(t,e,r,n){const i=e+r,a=(r-n)/2;if(r>n){if(e>0)return{[t]:a};if(e<0&&i<n)return{[t]:-a}}else if(e<0||i>n)return{[t]:e<0?a:-a};return{}}function VQt(t,e,r,n){const{width:i,height:a}=A7t();let o=null;return t<=i&&e<=a?o={x:0,y:0}:(t>i||e>a)&&(o=he(he({},M7e("x",r,t,i)),M7e("y",n,e,a))),o}var $Qt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const R7e=Symbol("previewGroupContext"),zq={provide:t=>{I.provide(R7e,t)},inject:()=>I.inject(R7e,{isPreviewGroup:I.shallowRef(!1),previewUrls:I.computed(()=>new Map),setPreviewUrls:()=>{},current:I.ref(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},UQt=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),D7e=I.defineComponent({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:UQt(),setup(t,e){let{slots:r}=e;const n=I.computed(()=>{const b={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof t.preview=="object"?k7e(t.preview,b):b}),i=I.reactive(new Map),a=I.ref(),o=I.computed(()=>n.value.visible),s=I.computed(()=>n.value.getContainer),l=(b,x)=>{var E,S;(S=(E=n.value).onVisibleChange)===null||S===void 0||S.call(E,b,x)},[u,d]=c5e(!!o.value,{value:o,onChange:l}),h=I.ref(null),f=I.computed(()=>o.value!==void 0),p=I.computed(()=>Array.from(i.keys())),g=I.computed(()=>p.value[n.value.current]),m=I.computed(()=>new Map(Array.from(i).filter(b=>{let[,{canPreview:x}]=b;return!!x}).map(b=>{let[x,{url:E}]=b;return[x,E]}))),v=function(b,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;i.set(b,{url:x,canPreview:E})},T=b=>{a.value=b},y=b=>{h.value=b},_=function(b,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const S=()=>{i.delete(b)};return i.set(b,{url:x,canPreview:E}),S},Q=b=>{b==null||b.stopPropagation(),d(!1),y(null)};return I.watch(g,b=>{T(b)},{immediate:!0,flush:"post"}),I.watchEffect(()=>{u.value&&f.value&&T(g.value)},{flush:"post"}),zq.provide({isPreviewGroup:I.shallowRef(!0),previewUrls:m,setPreviewUrls:v,current:a,setCurrent:T,setShowPreview:d,setMousePosition:y,registerImage:_}),()=>{const b=$Qt(n.value,[]);return I.createVNode(I.Fragment,null,[r.default&&r.default(),I.createVNode(N7e,xt(xt({},b),{},{"ria-hidden":!u.value,visible:u.value,prefixCls:t.previewPrefixCls,onClose:Q,mousePosition:h.value,src:m.value.get(a.value),icons:t.icons,getContainer:s.value}),null)])}}}),xg={x:0,y:0},zQt=he(he({},GR()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),N7e=I.defineComponent({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:zQt,emits:["close","afterClose"],setup(t,e){let{emit:r,attrs:n}=e;const{rotateLeft:i,rotateRight:a,zoomIn:o,zoomOut:s,close:l,left:u,right:d,flipX:h,flipY:f}=I.reactive(t.icons),p=I.shallowRef(1),g=I.shallowRef(0),m=I.reactive({x:1,y:1}),[v,T]=FQt(xg),y=()=>r("close"),_=I.shallowRef(),Q=I.reactive({originX:0,originY:0,deltaX:0,deltaY:0}),b=I.shallowRef(!1),x=zq.inject(),{previewUrls:E,current:S,isPreviewGroup:C,setCurrent:L}=x,w=I.computed(()=>E.value.size),O=I.computed(()=>Array.from(E.value.keys())),R=I.computed(()=>O.value.indexOf(S.value)),M=I.computed(()=>C.value?E.value.get(S.value):t.src),D=I.computed(()=>C.value&&w.value>1),P=I.shallowRef({wheelDirection:0}),B=()=>{p.value=1,g.value=0,m.x=1,m.y=1,T(xg),r("afterClose")},k=fe=>{fe?p.value+=.5:p.value++,T(xg)},V=fe=>{p.value>1&&(fe?p.value-=.5:p.value--),T(xg)},H=()=>{g.value+=90},$=()=>{g.value-=90},G=()=>{m.x=-m.x},U=()=>{m.y=-m.y},Y=fe=>{fe.preventDefault(),fe.stopPropagation(),R.value>0&&L(O.value[R.value-1])},ne=fe=>{fe.preventDefault(),fe.stopPropagation(),R.value<w.value-1&&L(O.value[R.value+1])},te=Ir({[`${t.prefixCls}-moving`]:b.value}),ee=`${t.prefixCls}-operations-operation`,ie=`${t.prefixCls}-operations-icon`,j=[{icon:l,onClick:y,type:"close"},{icon:o,onClick:()=>k(),type:"zoomIn"},{icon:s,onClick:()=>V(),type:"zoomOut",disabled:I.computed(()=>p.value===1)},{icon:a,onClick:H,type:"rotateRight"},{icon:i,onClick:$,type:"rotateLeft"},{icon:h,onClick:G,type:"flipX"},{icon:f,onClick:U,type:"flipY"}],X=()=>{if(t.visible&&b.value){const fe=_.value.offsetWidth*p.value,ce=_.value.offsetHeight*p.value,{left:ke,top:Ee}=n5e(_.value),Ze=g.value%180!==0;b.value=!1;const ct=VQt(Ze?ce:fe,Ze?fe:ce,ke,Ee);ct&&T(he({},ct))}},Z=fe=>{fe.button===0&&(fe.preventDefault(),fe.stopPropagation(),Q.deltaX=fe.pageX-v.x,Q.deltaY=fe.pageY-v.y,Q.originX=v.x,Q.originY=v.y,b.value=!0)},K=fe=>{t.visible&&b.value&&T({x:fe.pageX-Q.deltaX,y:fe.pageY-Q.deltaY})},ae=fe=>{if(!t.visible)return;fe.preventDefault();const ce=fe.deltaY;P.value={wheelDirection:ce}},le=fe=>{!t.visible||!D.value||(fe.preventDefault(),fe.keyCode===FQ.LEFT?R.value>0&&L(O.value[R.value-1]):fe.keyCode===FQ.RIGHT&&R.value<w.value-1&&L(O.value[R.value+1]))},oe=()=>{t.visible&&(p.value!==1&&(p.value=1),(v.x!==xg.x||v.y!==xg.y)&&T(xg))};let Ce=()=>{};return I.onMounted(()=>{I.watch([()=>t.visible,b],()=>{Ce();let fe,ce;const ke=b0(window,"mouseup",X,!1),Ee=b0(window,"mousemove",K,!1),Ze=b0(window,"wheel",ae,{passive:!1}),ct=b0(window,"keydown",le,!1);try{window.top!==window.self&&(fe=b0(window.top,"mouseup",X,!1),ce=b0(window.top,"mousemove",K,!1))}catch(at){zfe(!1,`[vc-image] ${at}`)}Ce=()=>{ke.remove(),Ee.remove(),Ze.remove(),ct.remove(),fe&&fe.remove(),ce&&ce.remove()}},{flush:"post",immediate:!0}),I.watch([P],()=>{const{wheelDirection:fe}=P.value;fe>0?V(!0):fe<0&&k(!0)})}),I.onUnmounted(()=>{Ce()}),()=>{const{visible:fe,prefixCls:ce,rootClassName:ke}=t;return I.createVNode(HQt,xt(xt({},n),{},{transitionName:t.transitionName,maskTransitionName:t.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ce,onClose:y,afterClose:B,visible:fe,wrapClassName:te,rootClassName:ke,getContainer:t.getContainer}),{default:()=>[I.createVNode("div",{class:[`${t.prefixCls}-operations-wrapper`,ke]},[I.createVNode("ul",{class:`${t.prefixCls}-operations`},[j.map(Ee=>{let{icon:Ze,onClick:ct,type:at,disabled:qe}=Ee;return I.createVNode("li",{class:Ir(ee,{[`${t.prefixCls}-operations-operation-disabled`]:qe&&(qe==null?void 0:qe.value)}),onClick:ct,key:at},[I.cloneVNode(Ze,{class:ie})])})])]),I.createVNode("div",{class:`${t.prefixCls}-img-wrapper`,style:{transform:`translate3d(${v.x}px, ${v.y}px, 0)`}},[I.createVNode("img",{onMousedown:Z,onDblclick:oe,ref:_,class:`${t.prefixCls}-img`,src:M.value,alt:t.alt,style:{transform:`scale3d(${m.x*p.value}, ${m.y*p.value}, 1) rotate(${g.value}deg)`}},null)]),D.value&&I.createVNode("div",{class:Ir(`${t.prefixCls}-switch-left`,{[`${t.prefixCls}-switch-left-disabled`]:R.value<=0}),onClick:Y},[u]),D.value&&I.createVNode("div",{class:Ir(`${t.prefixCls}-switch-right`,{[`${t.prefixCls}-switch-right-disabled`]:R.value>=w.value-1}),onClick:ne},[d])]})}}});var GQt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const I7e=()=>({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:Wt.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),k7e=(t,e)=>{const r=he({},t);return Object.keys(e).forEach(n=>{t[n]===void 0&&(r[n]=e[n])}),r};let qQt=0;const P7e=I.defineComponent({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:I7e(),emits:["click","error"],setup(t,e){let{attrs:r,slots:n,emit:i}=e;const a=I.computed(()=>t.prefixCls),o=I.computed(()=>`${a.value}-preview`),s=I.computed(()=>{const k={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof t.preview=="object"?k7e(t.preview,k):k}),l=I.computed(()=>{var k;return(k=s.value.src)!==null&&k!==void 0?k:t.src}),u=I.computed(()=>t.placeholder&&t.placeholder!==!0||n.placeholder),d=I.computed(()=>s.value.visible),h=I.computed(()=>s.value.getContainer),f=I.computed(()=>d.value!==void 0),p=(k,V)=>{var H,$;($=(H=s.value).onVisibleChange)===null||$===void 0||$.call(H,k,V)},[g,m]=c5e(!!d.value,{value:d,onChange:p}),v=I.ref(u.value?"loading":"normal");I.watch(()=>t.src,()=>{v.value=u.value?"loading":"normal"});const T=I.ref(null),y=I.computed(()=>v.value==="error"),_=zq.inject(),{isPreviewGroup:Q,setCurrent:b,setShowPreview:x,setMousePosition:E,registerImage:S}=_,C=I.ref(qQt++),L=I.computed(()=>t.preview&&!y.value),w=()=>{v.value="normal"},O=k=>{v.value="error",i("error",k)},R=k=>{if(!f.value){const{left:V,top:H}=n5e(k.target);Q.value?(b(C.value),E({x:V,y:H})):T.value={x:V,y:H}}Q.value?x(!0):m(!0),i("click",k)},M=()=>{m(!1),f.value||(T.value=null)},D=I.ref(null);I.watch(()=>D,()=>{v.value==="loading"&&D.value.complete&&(D.value.naturalWidth||D.value.naturalHeight)&&w()});let P=()=>{};I.onMounted(()=>{I.watch([l,L],()=>{if(P(),!Q.value)return()=>{};P=S(C.value,l.value,L.value),L.value||P()},{flush:"post",immediate:!0})}),I.onUnmounted(()=>{P()});const B=k=>Avt(k)?k+"px":k;return()=>{const{prefixCls:k,wrapperClassName:V,fallback:H,src:$,placeholder:G,wrapperStyle:U,rootClassName:Y,width:ne,height:te,crossorigin:ee,decoding:ie,alt:j,sizes:X,srcset:Z,usemap:K,class:ae,style:le}=he(he({},t),r),oe=s.value,{icons:Ce,maskClassName:fe}=oe,ce=GQt(oe,["icons","maskClassName"]),ke=Ir(k,V,Y,{[`${k}-error`]:y.value}),Ee=y.value&&H?H:l.value,Ze={crossorigin:ee,decoding:ie,alt:j,sizes:X,srcset:Z,usemap:K,width:ne,height:te,class:Ir(`${k}-img`,{[`${k}-img-placeholder`]:G===!0},ae),style:he({height:B(te)},le)};return I.createVNode(I.Fragment,null,[I.createVNode("div",{class:ke,onClick:L.value?R:ct=>{i("click",ct)},style:he({width:B(ne),height:B(te)},U)},[I.createVNode("img",xt(xt(xt({},Ze),y.value&&H?{src:H}:{onLoad:w,onError:O,src:$}),{},{ref:D}),null),v.value==="loading"&&I.createVNode("div",{"aria-hidden":"true",class:`${k}-placeholder`},[G||n.placeholder&&n.placeholder()]),n.previewMask&&L.value&&I.createVNode("div",{class:[`${k}-mask`,fe]},[n.previewMask()])]),!Q.value&&L.value&&I.createVNode(N7e,xt(xt({},ce),{},{"aria-hidden":!g.value,visible:g.value,prefixCls:o.value,onClose:M,mousePosition:T.value,src:Ee,alt:j,getContainer:h.value,icons:Ce,rootClassName:Y}),null)])}}});P7e.PreviewGroup=D7e;var WQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function B7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){YQt(t,i,r[i])})}return t}function YQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gq=function(e,r){var n=B7e({},e,r.attrs);return I.createVNode(Mi,B7e({},n,{icon:WQt}),null)};Gq.displayName="RotateLeftOutlined",Gq.inheritAttrs=!1;var jQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};function H7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){XQt(t,i,r[i])})}return t}function XQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qq=function(e,r){var n=H7e({},e,r.attrs);return I.createVNode(Mi,H7e({},n,{icon:jQt}),null)};qq.displayName="RotateRightOutlined",qq.inheritAttrs=!1;var KQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};function F7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){ZQt(t,i,r[i])})}return t}function ZQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qR=function(e,r){var n=F7e({},e,r.attrs);return I.createVNode(Mi,F7e({},n,{icon:KQt}),null)};qR.displayName="ZoomInOutlined",qR.inheritAttrs=!1;var JQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};function V7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){ext(t,i,r[i])})}return t}function ext(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var WR=function(e,r){var n=V7e({},e,r.attrs);return I.createVNode(Mi,V7e({},n,{icon:JQt}),null)};WR.displayName="ZoomOutOutlined",WR.inheritAttrs=!1;var txt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};function $7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){rxt(t,i,r[i])})}return t}function rxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var YR=function(e,r){var n=$7e({},e,r.attrs);return I.createVNode(Mi,$7e({},n,{icon:txt}),null)};YR.displayName="SwapOutlined",YR.inheritAttrs=!1;function U7e(t){return{position:t,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const nxt=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${t.antCls}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:he(he({},U7e("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:he(he({},U7e("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:Lpe(t)}]},Wq=t=>({position:t||"absolute",inset:0}),ixt=t=>{const{iconCls:e,motionDurationSlow:r,paddingXXS:n,marginXXS:i,prefixCls:a}=t;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new Ca("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:he(he({},Zz),{padding:`0 ${n}px`,[e]:{marginInlineEnd:i,svg:{verticalAlign:"baseline"}}})}},axt=t=>{const{previewCls:e,modalMaskBg:r,paddingSM:n,previewOperationColorDisabled:i,motionDurationSlow:a}=t,o=new Ca(r).setAlpha(.1),s=o.clone().setAlpha(.2);return{[`${e}-operations`]:he(he({},d2(t)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:t.previewOperationColor,listStyle:"none",background:o.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${a}`,userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{color:i,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:t.previewOperationSize}})}},oxt=t=>{const{modalMaskBg:e,iconCls:r,previewOperationColorDisabled:n,previewCls:i,zIndexPopup:a,motionDurationSlow:o}=t,s=new Ca(e).setAlpha(.1),l=s.clone().setAlpha(.2);return{[`${i}-switch-left, ${i}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:a+1,display:"flex",alignItems:"center",justifyContent:"center",width:t.imagePreviewSwitchSize,height:t.imagePreviewSwitchSize,marginTop:-t.imagePreviewSwitchSize/2,color:t.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${o}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:t.previewOperationSize}},[`${i}-switch-left`]:{insetInlineStart:t.marginSM},[`${i}-switch-right`]:{insetInlineEnd:t.marginSM}}},sxt=t=>{const{motionEaseOut:e,previewCls:r,motionDurationSlow:n,componentCls:i}=t;return[{[`${i}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:he(he({},Wq()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${n} ${e} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":he(he({},Wq()),{transition:`transform ${n} ${e} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${i}-preview-root`]:{[`${r}-wrap`]:{zIndex:t.zIndexPopup}}},{[`${i}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:t.zIndexPopup+1,width:"100%"},"&":[axt(t),oxt(t)]}]},lxt=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",display:"inline-block",[`${e}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${e}-img-placeholder`]:{backgroundColor:t.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${e}-mask`]:he({},ixt(t)),[`${e}-mask:hover`]:{opacity:1},[`${e}-placeholder`]:he({},Wq())}}},uxt=t=>{const{previewCls:e}=t;return{[`${e}-root`]:ex(t,"zoom"),"&":Lpe(t,!0)}},z7e=pu("Image",t=>{const e=`${t.componentCls}-preview`,r=no(t,{previewCls:e,modalMaskBg:new Ca("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:t.controlHeightLG});return[lxt(r),sxt(r),nxt(no(r,{componentCls:e})),uxt(r)]},t=>({zIndexPopup:t.zIndexPopupBase+80,previewOperationColor:new Ca(t.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new Ca(t.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5})),G7e={rotateLeft:I.createVNode(Gq,null,null),rotateRight:I.createVNode(qq,null,null),zoomIn:I.createVNode(qR,null,null),zoomOut:I.createVNode(WR,null,null),close:I.createVNode(cv,null,null),left:I.createVNode(wq,null,null),right:I.createVNode(tx,null,null),flipX:I.createVNode(YR,null,null),flipY:I.createVNode(YR,{rotate:90},null)},cxt=()=>({previewPrefixCls:String,preview:yo()}),dxt=I.defineComponent({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:cxt(),setup(t,e){let{attrs:r,slots:n}=e;const{prefixCls:i,rootPrefixCls:a}=La("image",t),o=I.computed(()=>`${i.value}-preview`),[s,l]=z7e(i),u=I.computed(()=>{const{preview:d}=t;if(d===!1)return d;const h=typeof d=="object"?d:{};return he(he({},h),{rootClassName:l.value,transitionName:lv(a.value,"zoom",h.transitionName),maskTransitionName:lv(a.value,"fade",h.maskTransitionName)})});return()=>s(I.createVNode(D7e,xt(xt({},he(he({},r),t)),{},{preview:u.value,icons:G7e,previewPrefixCls:o.value}),n))}}),Eg=I.defineComponent({name:"AImage",inheritAttrs:!1,props:I7e(),setup(t,e){let{slots:r,attrs:n}=e;const{prefixCls:i,rootPrefixCls:a,configProvider:o}=La("image",t),[s,l]=z7e(i),u=I.computed(()=>{const{preview:d}=t;if(d===!1)return d;const h=typeof d=="object"?d:{};return he(he({icons:G7e},h),{transitionName:lv(a.value,"zoom",h.transitionName),maskTransitionName:lv(a.value,"fade",h.maskTransitionName)})});return()=>{var d,h;const f=((h=(d=o.locale)===null||d===void 0?void 0:d.value)===null||h===void 0?void 0:h.Image)||zT.Image,p=()=>I.createVNode("div",{class:`${i.value}-mask-info`},[I.createVNode(zR,null,null),f==null?void 0:f.preview]),{previewMask:g=r.previewMask||p}=t;return s(I.createVNode(P7e,xt(xt({},he(he(he({},n),t),{prefixCls:i.value})),{},{preview:u.value,rootClassName:Ir(t.rootClassName,l.value)}),he(he({},r),{previewMask:typeof g=="function"?g:null})))}}});Eg.PreviewGroup=dxt,Eg.install=function(t){return t.component(Eg.name,Eg),t.component(Eg.PreviewGroup.name,Eg.PreviewGroup),t};var hxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function q7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){fxt(t,i,r[i])})}return t}function fxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ox=function(e,r){var n=q7e({},e,r.attrs);return I.createVNode(Mi,q7e({},n,{icon:hxt}),null)};ox.displayName="CopyOutlined",ox.inheritAttrs=!1;var pxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function W7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){gxt(t,i,r[i])})}return t}function gxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jR=function(e,r){var n=W7e({},e,r.attrs);return I.createVNode(Mi,W7e({},n,{icon:pxt}),null)};jR.displayName="DownloadOutlined",jR.inheritAttrs=!1;function Y7e(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function j7e(t){return{backgroundColor:t.bgColorSelected,boxShadow:t.boxShadow}}const mxt=he({overflow:"hidden"},Zz),Txt=t=>{const{componentCls:e}=t;return{[e]:he(he(he(he(he({},d2(t)),{display:"inline-block",padding:t.segmentedContainerPadding,color:t.labelColor,backgroundColor:t.bgColor,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,"&-selected":he(he({},j7e(t)),{color:t.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.labelColorHover,"&::after":{backgroundColor:t.bgColorHover}},"&-label":he({minHeight:t.controlHeight-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeight-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`},mxt),"&-icon + *":{marginInlineStart:t.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:he(he({},j7e(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${t.paddingXXS}px 0`,borderRadius:t.borderRadiusSM,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:t.controlHeightLG-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightLG-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:t.controlHeightSM-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightSM-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontalSM}px`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),Y7e(`&-disabled ${e}-item`,t)),Y7e(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"}})}},vxt=pu("Segmented",t=>{const{lineWidthBold:e,lineWidth:r,colorTextLabel:n,colorText:i,colorFillSecondary:a,colorBgLayout:o,colorBgElevated:s}=t,l=no(t,{segmentedPaddingHorizontal:t.controlPaddingHorizontal-r,segmentedPaddingHorizontalSM:t.controlPaddingHorizontalSM-r,segmentedContainerPadding:e,labelColor:n,labelColorHover:i,bgColor:o,bgColorHover:a,bgColorSelected:s});return[Txt(l)]}),X7e=t=>t?{left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth}:null,Lv=t=>t!==void 0?`${t}px`:void 0,yxt=I.defineComponent({props:{value:yo(),getValueIndex:yo(),prefixCls:yo(),motionName:yo(),onMotionStart:yo(),onMotionEnd:yo(),direction:yo(),containerRef:yo()},emits:["motionStart","motionEnd"],setup(t,e){let{emit:r}=e;const n=I.ref(),i=g=>{var m;const v=t.getValueIndex(g),T=(m=t.containerRef.value)===null||m===void 0?void 0:m.querySelectorAll(`.${t.prefixCls}-item`)[v];return(T==null?void 0:T.offsetParent)&&T},a=I.ref(null),o=I.ref(null);I.watch(()=>t.value,(g,m)=>{const v=i(m),T=i(g),y=X7e(v),_=X7e(T);a.value=y,o.value=_,r(v&&T?"motionStart":"motionEnd")},{flush:"post"});const s=I.computed(()=>{var g,m;return t.direction==="rtl"?Lv(-((g=a.value)===null||g===void 0?void 0:g.right)):Lv((m=a.value)===null||m===void 0?void 0:m.left)}),l=I.computed(()=>{var g,m;return t.direction==="rtl"?Lv(-((g=o.value)===null||g===void 0?void 0:g.right)):Lv((m=o.value)===null||m===void 0?void 0:m.left)});let u;const d=g=>{clearTimeout(u),I.nextTick(()=>{g&&(g.style.transform="translateX(var(--thumb-start-left))",g.style.width="var(--thumb-start-width)")})},h=g=>{u=setTimeout(()=>{g&&(Qq(g,`${t.motionName}-appear-active`),g.style.transform="translateX(var(--thumb-active-left))",g.style.width="var(--thumb-active-width)")})},f=g=>{a.value=null,o.value=null,g&&(g.style.transform=null,g.style.width=null,xq(g,`${t.motionName}-appear-active`)),r("motionEnd")},p=I.computed(()=>{var g,m;return{"--thumb-start-left":s.value,"--thumb-start-width":Lv((g=a.value)===null||g===void 0?void 0:g.width),"--thumb-active-left":l.value,"--thumb-active-width":Lv((m=o.value)===null||m===void 0?void 0:m.width)}});return I.onBeforeUnmount(()=>{clearTimeout(u)}),()=>{const g={ref:n,style:p.value,class:[`${t.prefixCls}-thumb`]};return process.env.NODE_ENV==="test"&&(g["data-test-style"]=JSON.stringify(p.value)),I.createVNode(I.Transition,{appear:!0,onBeforeEnter:d,onEnter:h,onAfterEnter:f},{default:()=>[!a.value||!o.value?null:I.createVNode("div",g,null)]})}}});function _xt(t){return t.map(e=>typeof e=="object"&&e!==null?e:{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e})}const bxt=()=>({prefixCls:String,options:Ez(),block:cl(),disabled:cl(),size:xM(),value:he(he({},Sz([String,Number])),{required:!0}),motionName:String,onChange:wfe(),"onUpdate:value":wfe()}),K7e=(t,e)=>{let{slots:r,emit:n}=e;const{value:i,disabled:a,payload:o,title:s,prefixCls:l,label:u=r.label,checked:d,className:h}=t,f=p=>{a||n("change",p,i)};return I.createVNode("label",{class:Ir({[`${l}-item-disabled`]:a},h)},[I.createVNode("input",{class:`${l}-item-input`,type:"radio",disabled:a,checked:d,onChange:f},null),I.createVNode("div",{class:`${l}-item-label`,title:typeof s=="string"?s:""},[typeof u=="function"?u({value:i,disabled:a,payload:o,title:s}):u??i])])};K7e.inheritAttrs=!1;const Qxt=I.defineComponent({name:"ASegmented",inheritAttrs:!1,props:C6(bxt(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(t,e){let{emit:r,slots:n,attrs:i}=e;const{prefixCls:a,direction:o,size:s}=La("segmented",t),[l,u]=vxt(a),d=I.shallowRef(),h=I.shallowRef(!1),f=I.computed(()=>_xt(t.options)),p=(g,m)=>{t.disabled||(r("update:value",m),r("change",m))};return()=>{const g=a.value;return l(I.createVNode("div",xt(xt({},i),{},{class:Ir(g,{[u.value]:!0,[`${g}-block`]:t.block,[`${g}-disabled`]:t.disabled,[`${g}-lg`]:s.value=="large",[`${g}-sm`]:s.value=="small",[`${g}-rtl`]:o.value==="rtl"},i.class),ref:d}),[I.createVNode("div",{class:`${g}-group`},[I.createVNode(yxt,{containerRef:d,prefixCls:g,value:t.value,motionName:`${g}-${t.motionName}`,direction:o.value,getValueIndex:m=>f.value.findIndex(v=>v.value===m),onMotionStart:()=>{h.value=!0},onMotionEnd:()=>{h.value=!1}},null),f.value.map(m=>I.createVNode(K7e,xt(xt({key:m.value,prefixCls:g,checked:m.value===t.value,onChange:p},m),{},{className:Ir(m.className,`${g}-item`,{[`${g}-item-selected`]:m.value===t.value&&!h.value}),disabled:!!t.disabled||!!m.disabled}),n))])]))}}}),Z7e=eg(Qxt);var xxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};function J7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ext(t,i,r[i])})}return t}function Ext(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yq=function(e,r){var n=J7e({},e,r.attrs);return I.createVNode(Mi,J7e({},n,{icon:xxt}),null)};Yq.displayName="AudioOutlined",Yq.inheritAttrs=!1;var Sxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function eme(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Cxt(t,i,r[i])})}return t}function Cxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jq=function(e,r){var n=eme({},e,r.attrs);return I.createVNode(Mi,eme({},n,{icon:Sxt}),null)};jq.displayName="ClearOutlined",jq.inheritAttrs=!1;var Lxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"};function tme(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){wxt(t,i,r[i])})}return t}function wxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xq=function(e,r){var n=tme({},e,r.attrs);return I.createVNode(Mi,tme({},n,{icon:Lxt}),null)};Xq.displayName="MoreOutlined",Xq.inheritAttrs=!1;function Axt(t,e,{signal:r,edges:n}={}){let i,a=null;const o=n!=null&&n.includes("leading"),s=n==null||n.includes("trailing"),l=()=>{a!==null&&(t.apply(i,a),i=void 0,a=null)},u=()=>{s&&l(),p()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,u()},e)},f=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{f(),i=void 0,a=null},g=()=>{f(),l()},m=function(...v){if(r!=null&&r.aborted)return;i=this,a=v;const T=d==null;h(),o&&T&&l()};return m.schedule=h,m.cancel=p,m.flush=g,r==null||r.addEventListener("abort",p,{once:!0}),m}function Oxt(...t){return function(...e){let r=t.length?t[0].apply(this,e):e[0];for(let n=1;n<t.length;n++)r=t[n].call(this,r);return r}}function Mxt(t,e,{signal:r,edges:n=["leading","trailing"]}={}){let i=null;const a=Axt(t,e,{signal:r,edges:n}),o=function(...s){i==null?i=Date.now():Date.now()-i>=e&&(i=Date.now(),a.cancel()),a(...s)};return o.cancel=a.cancel,o.flush=a.flush,o}const Rxt={key:0,class:"ai-chat-head"},Dxt={class:"ai-chat-body"},Nxt={class:"ai-chat-body-l"},Ixt={key:0,class:"ai-chat-prefix"},kxt={class:"ai-chat-name"},Pxt=["title"],Bxt={class:"ai-chat-actions ai-chat-actions--after"},Hxt=["disabled"],Fxt=["disabled"],Vxt={key:1,class:"ai-chat-foot"},rme=oa(Object.assign({name:"AiChat"},{__name:"Chat",props:{name:String,active:Boolean,editable:Boolean,disabled:Boolean,showMore:Boolean,actions:{type:Array,default:()=>["edit","delete"]}},emits:["rename","delete"],setup(t,{emit:e}){const r=t,n=e,i=I.ref(null),a=I.ref(!1),o=I.ref(""),s=I.ref(!1);function l(){r.disabled||!r.editable||(a.value=!0,o.value=r.name,I.nextTick(()=>{i.value.select(),i.value.focus()}))}function u(){if(a.value){if(a.value=!1,o.value===r.name)return;n("rename",o.value)}}return(d,h)=>{const f=Ps,p=Fh;return I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-chat",{"ai-chat--disabled":t.disabled,"ai-chat--active":t.active,"ai-chat--on":s.value}])},[d.$slots.head?(I.openBlock(),I.createElementBlock("div",Rxt,[I.renderSlot(d.$slots,"head",{},void 0,!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",Dxt,[I.createElementVNode("div",Nxt,[d.$slots.prefix?(I.openBlock(),I.createElementBlock("div",Ixt,[I.renderSlot(d.$slots,"prefix",{},void 0,!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",kxt,[a.value?(I.openBlock(),I.createBlock(f,{key:0,ref_key:"editInputRef",ref:i,value:o.value,"onUpdate:value":h[0]||(h[0]=g=>o.value=g),class:"ai-chat-name-input",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",onClick:h[1]||(h[1]=I.withModifiers(()=>{},["stop"])),onBlur:u,onKeyup:I.withKeys(u,["enter"])},null,8,["value"])):(I.openBlock(),I.createElementBlock("div",{key:1,class:"ai-chat-name-text",title:t.name,onDblclick:I.withModifiers(l,["stop"])},I.toDisplayString(t.name),41,Pxt))])]),I.createElementVNode("div",Bxt,[t.actions.includes("edit")&&t.editable?(I.openBlock(),I.createElementBlock("button",{key:0,title:"\u7F16\u8F91",disabled:t.disabled||a.value,onClick:I.withModifiers(l,["stop"])},h[5]||(h[5]=[I.createElementVNode("i",{class:"ai-icon ai-icon-edit"},null,-1)]),8,Hxt)):I.createCommentVNode("",!0),t.actions.includes("delete")?(I.openBlock(),I.createElementBlock("button",{key:1,title:"\u5220\u9664",disabled:t.disabled,onClick:h[2]||(h[2]=I.withModifiers(g=>n("delete"),["stop"]))},h[6]||(h[6]=[I.createElementVNode("i",{class:"ai-icon ai-icon-delete"},null,-1)]),8,Fxt)):I.createCommentVNode("",!0),I.createVNode(p,{open:s.value,"onUpdate:open":h[4]||(h[4]=g=>s.value=g)},{overlay:I.withCtx(()=>[I.createElementVNode("div",{onClick:h[3]||(h[3]=I.withModifiers(g=>s.value=!1,["stop"]))},[I.renderSlot(d.$slots,"moreOverlay",{},void 0,!0)])]),default:I.withCtx(()=>[t.showMore?(I.openBlock(),I.createElementBlock("button",{key:0,class:I.normalizeClass({active:s.value})},h[7]||(h[7]=[I.createElementVNode("i",{class:"ai-icon ai-icon-more"},null,-1)]),2)):I.createCommentVNode("",!0)]),_:3},8,["open"])])]),d.$slots.foot?(I.openBlock(),I.createElementBlock("div",Vxt,[I.renderSlot(d.$slots,"foot",{},void 0,!0)])):I.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-ed62d746"]]),nme=oa(Object.assign({name:"AiChatRecordList"},{__name:"ChatRecordList",props:{backgroundColor:{type:String,default:"rgba(243, 247, 253, 1)"}},setup(t){const e=t,r=I.computed(()=>({backgroundColor:e.backgroundColor}));return(n,i)=>(I.openBlock(),I.createElementBlock("div",{class:"ai-chat-record-list",style:I.normalizeStyle(r.value)},[I.renderSlot(n.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-0edcf29f"]]),$xt={class:"dropdown-wrap"},ime=oa(Object.assign({name:"AiChatRecordGroup"},{__name:"ChatRecordGroup",props:{showMore:{type:Boolean,default:!0}},setup(t){const e=I.ref(!1);return(r,n)=>{const i=Fh;return I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-chat-record-group",{"ai-chat-record-group--on":e.value}])},[I.createElementVNode("div",$xt,[I.createVNode(i,{open:e.value,"onUpdate:open":n[2]||(n[2]=a=>e.value=a)},{overlay:I.withCtx(()=>[I.createElementVNode("div",{onClick:n[1]||(n[1]=a=>e.value=!1)},[I.renderSlot(r.$slots,"moreOverlay",{},void 0,!0)])]),default:I.withCtx(()=>[t.showMore?(I.openBlock(),I.createElementBlock("a",{key:0,class:"dropdown-trigger",onClick:n[0]||(n[0]=I.withModifiers(()=>{},["prevent"]))},[I.createVNode(I.unref(Xq))])):I.createCommentVNode("",!0)]),_:3},8,["open"])]),I.renderSlot(r.$slots,"default",{},void 0,!0)],2)}}}),[["__scopeId","data-v-5f15a2c4"]]);function Kq(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Sg=Kq();function ame(t){Sg=t}const ome=/[&<>"']/,Uxt=new RegExp(ome.source,"g"),sme=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,zxt=new RegExp(sme.source,"g"),Gxt={"&":"&","<":"<",">":">",'"':""","'":"'"},lme=t=>Gxt[t];function e1(t,e){if(e){if(ome.test(t))return t.replace(Uxt,lme)}else if(sme.test(t))return t.replace(zxt,lme);return t}const qxt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Wxt(t){return t.replace(qxt,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const Yxt=/(^|[^\[])\^/g;function ea(t,e){let r=typeof t=="string"?t:t.source;e=e||"";const n={replace:(i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Yxt,"$1"),r=r.replace(i,o),n},getRegex:()=>new RegExp(r,e)};return n}function ume(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const sx={exec:()=>null};function cme(t,e){const r=t.replace(/\|/g,(a,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function lx(t,e,r){const n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function jxt(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function dme(t,e,r,n){const i=e.href,a=e.title?e1(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;const s={type:"link",raw:r,href:i,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,s}return{type:"image",raw:r,href:i,title:a,text:e1(o)}}function Xxt(t,e){const r=t.match(/^(\s+)(?:```)/);if(r===null)return e;const n=r[1];return e.split(`
|
|
217
|
+
`,yQt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Hq={};let v2;function _Qt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Hq[r])return Hq[r];const n=window.getComputedStyle(t),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),a=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),o=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),l={sizingStyle:yQt.map(u=>`${u}:${n.getPropertyValue(u)}`).join(";"),paddingSize:a,borderSize:o,boxSizing:i};return e&&r&&(Hq[r]=l),l}function bQt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;v2||(v2=document.createElement("textarea"),v2.setAttribute("tab-index","-1"),v2.setAttribute("aria-hidden","true"),document.body.appendChild(v2)),t.getAttribute("wrap")?v2.setAttribute("wrap",t.getAttribute("wrap")):v2.removeAttribute("wrap");const{paddingSize:i,borderSize:a,boxSizing:o,sizingStyle:s}=_Qt(t,e);v2.setAttribute("style",`${s};${vQt}`),v2.value=t.value||t.placeholder||"";let l,u,d,h=v2.scrollHeight;if(o==="border-box"?h+=a:o==="content-box"&&(h-=i),r!==null||n!==null){v2.value=" ";const p=v2.scrollHeight-i;r!==null&&(l=p*r,o==="border-box"&&(l=l+i+a),h=Math.max(l,h)),n!==null&&(u=p*n,o==="border-box"&&(u=u+i+a),d=h>u?"":"hidden",h=Math.min(u,h))}const f={height:`${h}px`,overflowY:d,resize:"none"};return l&&(f.minHeight=`${l}px`),u&&(f.maxHeight=`${u}px`),f}const Fq=0,Vq=1,$q=2,QQt=I.defineComponent({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:b7e(),setup(t,e){let{attrs:r,emit:n,expose:i}=e,a,o;const s=I.ref(),l=I.ref({}),u=I.ref($q);I.onBeforeUnmount(()=>{ro.cancel(a),ro.cancel(o)});const d=()=>{try{if(s.value&&document.activeElement===s.value.input){const x=s.value.getSelectionStart(),E=s.value.getSelectionEnd(),S=s.value.getScrollTop();s.value.setSelectionRange(x,E),s.value.setScrollTop(S)}}catch{}},h=I.ref(),f=I.ref();I.watchEffect(()=>{const x=t.autoSize||t.autosize;x?(h.value=x.minRows,f.value=x.maxRows):(h.value=void 0,f.value=void 0)});const p=I.computed(()=>!!(t.autoSize||t.autosize)),g=()=>{u.value=Fq};I.watch([()=>t.value,h,f,p],()=>{p.value&&g()},{immediate:!0});const m=I.ref();I.watch([u,s],()=>{if(s.value)if(u.value===Fq)u.value=Vq;else if(u.value===Vq){const x=bQt(s.value.input,!1,h.value,f.value);u.value=$q,m.value=x}else d()},{immediate:!0,flush:"post"});const v=I.getCurrentInstance(),T=I.ref(),y=()=>{ro.cancel(T.value)},_=x=>{u.value===$q&&(n("resize",x),p.value&&(y(),T.value=ro(()=>{g()})))};I.onBeforeUnmount(()=>{y()}),i({resizeTextarea:()=>{g()},textArea:I.computed(()=>{var x;return(x=s.value)===null||x===void 0?void 0:x.input}),instance:v}),Kd(t.autosize===void 0,"Input.TextArea","autosize is deprecated, please use autoSize instead.");const b=()=>{const{prefixCls:x,disabled:E}=t,S=h2(t,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),C=Ir(x,r.class,{[`${x}-disabled`]:E}),L=p.value?m.value:null,w=[r.style,l.value,L],O=he(he(he({},S),r),{style:w,class:C});return(u.value===Fq||u.value===Vq)&&w.push({overflowX:"hidden",overflowY:"hidden"}),O.autofocus||delete O.autofocus,O.rows===0&&delete O.rows,I.createVNode(QM,{onResize:_,disabled:!p.value},{default:()=>[I.createVNode(i5e,xt(xt({},O),{},{ref:s,tag:"textarea"}),null)]})};return()=>b()}});function x7e(t,e){return[...t||""].slice(0,e).join("")}function E7e(t,e,r,n){let i=r;return t?i=x7e(r,n):[...e||""].length<r.length&&[...r||""].length>n&&(i=e),i}const xQt=I.defineComponent({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:b7e(),setup(t,e){let{attrs:r,expose:n,emit:i}=e;var a;const o=A5e(),s=dv.useInject(),l=I.computed(()=>jG(s.status,t.status)),u=I.shallowRef((a=t.value)!==null&&a!==void 0?a:t.defaultValue),d=I.shallowRef(),h=I.shallowRef(""),{prefixCls:f,size:p,direction:g}=La("input",t),[m,v]=Lq(f),T=QQ(),y=I.computed(()=>t.showCount===""||t.showCount||!1),_=I.computed(()=>Number(t.maxlength)>0),Q=I.shallowRef(!1),b=I.shallowRef(),x=I.shallowRef(0),E=V=>{Q.value=!0,b.value=h.value,x.value=V.currentTarget.selectionStart,i("compositionstart",V)},S=V=>{var H;Q.value=!1;let $=V.currentTarget.value;if(_.value){const G=x.value>=t.maxlength+1||x.value===((H=b.value)===null||H===void 0?void 0:H.length);$=E7e(G,b.value,$,t.maxlength)}$!==h.value&&(O($),ax(V.currentTarget,V,D,$)),i("compositionend",V)},C=I.getCurrentInstance();I.watch(()=>t.value,()=>{var V;"value"in C.vnode.props,u.value=(V=t.value)!==null&&V!==void 0?V:""});const L=V=>{var H;v7e((H=d.value)===null||H===void 0?void 0:H.textArea,V)},w=()=>{var V,H;(H=(V=d.value)===null||V===void 0?void 0:V.textArea)===null||H===void 0||H.blur()},O=(V,H)=>{u.value!==V&&(t.value===void 0?u.value=V:I.nextTick(()=>{var $,G,U;d.value.textArea.value!==h.value&&((U=($=d.value)===null||$===void 0?void 0:(G=$.instance).update)===null||U===void 0||U.call(G))}),I.nextTick(()=>{H&&H()}))},R=V=>{V.keyCode===13&&i("pressEnter",V),i("keydown",V)},M=V=>{const{onBlur:H}=t;H==null||H(V),o.onFieldBlur()},D=V=>{i("update:value",V.target.value),i("change",V),i("input",V),o.onFieldChange()},P=V=>{ax(d.value.textArea,V,D),O("",()=>{L()})},B=V=>{let H=V.target.value;if(u.value!==H){if(_.value){const $=V.target,G=$.selectionStart>=t.maxlength+1||$.selectionStart===H.length||!$.selectionStart;H=E7e(G,h.value,H,t.maxlength)}ax(V.currentTarget,V,D,H),O(H)}},k=()=>{var V,H;const{class:$}=r,{bordered:G=!0}=t,U=he(he(he({},h2(t,["allowClear"])),r),{class:[{[`${f.value}-borderless`]:!G,[`${$}`]:$&&!y.value,[`${f.value}-sm`]:p.value==="small",[`${f.value}-lg`]:p.value==="large"},UQ(f.value,l.value),v.value],disabled:T.value,showCount:null,prefixCls:f.value,onInput:B,onChange:B,onBlur:M,onKeydown:R,onCompositionstart:E,onCompositionend:S});return!((V=t.valueModifiers)===null||V===void 0)&&V.lazy&&delete U.onInput,I.createVNode(QQt,xt(xt({},U),{},{id:(H=U==null?void 0:U.id)!==null&&H!==void 0?H:o.id.value,ref:d,maxlength:t.maxlength,lazy:t.lazy}),null)};return n({focus:L,blur:w,resizableTextArea:d}),I.watchEffect(()=>{let V=Bq(u.value);!Q.value&&_.value&&(t.value===null||t.value===void 0)&&(V=x7e(V,t.maxlength)),h.value=V}),()=>{var V;const{maxlength:H,bordered:$=!0,hidden:G}=t,{style:U,class:Y}=r,ne=he(he(he({},t),r),{prefixCls:f.value,inputType:"text",handleReset:P,direction:g.value,bordered:$,style:y.value?void 0:U,hashId:v.value,disabled:(V=t.disabled)!==null&&V!==void 0?V:T.value});let te=I.createVNode(TQt,xt(xt({},ne),{},{value:h.value,status:t.status}),{element:k});if(y.value||s.hasFeedback){const ee=[...h.value].length;let ie="";typeof y.value=="object"?ie=y.value.formatter({value:h.value,count:ee,maxlength:H}):ie=`${ee}${_.value?` / ${H}`:""}`,te=I.createVNode("div",{hidden:G,class:Ir(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:g.value==="rtl",[`${f.value}-textarea-show-count`]:y.value,[`${f.value}-textarea-in-form-item`]:s.isFormItemInput},`${f.value}-textarea-show-count`,Y,v.value),style:U,"data-count":typeof ie!="object"?ie:void 0},[te,s.hasFeedback&&I.createVNode("span",{class:`${f.value}-textarea-suffix`},[s.feedbackIcon])])}return m(te)}}});var EQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function S7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){SQt(t,i,r[i])})}return t}function SQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var zR=function(e,r){var n=S7e({},e,r.attrs);return I.createVNode(Mi,S7e({},n,{icon:EQt}),null)};zR.displayName="EyeOutlined",zR.inheritAttrs=!1;var CQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function C7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){LQt(t,i,r[i])})}return t}function LQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Uq=function(e,r){var n=C7e({},e,r.attrs);return I.createVNode(Mi,C7e({},n,{icon:CQt}),null)};Uq.displayName="EyeInvisibleOutlined",Uq.inheritAttrs=!1;var wQt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const AQt={click:"onClick",hover:"onMouseover"},OQt=t=>t?I.createVNode(zR,null,null):I.createVNode(Uq,null,null),MQt=I.defineComponent({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:he(he({},UR()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(t,e){let{slots:r,attrs:n,expose:i,emit:a}=e;const o=I.shallowRef(!1),s=()=>{const{disabled:v}=t;v||(o.value=!o.value,a("update:visible",o.value))};I.watchEffect(()=>{t.visible!==void 0&&(o.value=!!t.visible)});const l=I.shallowRef();i({focus:()=>{var v;(v=l.value)===null||v===void 0||v.focus()},blur:()=>{var v;(v=l.value)===null||v===void 0||v.blur()}});const h=v=>{const{action:T,iconRender:y=r.iconRender||OQt}=t,_=AQt[T]||"",Q=y(o.value),b={[_]:s,class:`${v}-icon`,key:"passwordIcon",onMousedown:x=>{x.preventDefault()},onMouseup:x=>{x.preventDefault()}};return ns(UT(Q)?Q:I.createVNode("span",null,[Q]),b)},{prefixCls:f,getPrefixCls:p}=La("input-password",t),g=I.computed(()=>p("input",t.inputPrefixCls)),m=()=>{const{size:v,visibilityToggle:T}=t,y=wQt(t,["size","visibilityToggle"]),_=T&&h(f.value),Q=Ir(f.value,n.class,{[`${f.value}-${v}`]:!!v}),b=he(he(he({},h2(y,["suffix","iconRender","action"])),n),{type:o.value?"text":"password",class:Q,prefixCls:g.value,suffix:_});return v&&(b.size=v),I.createVNode(Ps,xt({ref:l},b),r)};return()=>m()}});Ps.Group=hQt,Ps.Search=pQt,Ps.TextArea=xQt,Ps.Password=MQt,Ps.install=function(t){return t.component(Ps.name,Ps),t.component(Ps.Group.name,Ps.Group),t.component(Ps.Search.name,Ps.Search),t.component(Ps.TextArea.name,Ps.TextArea),t.component(Ps.Password.name,Ps.Password),t};function GR(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Wt.shape({x:Number,y:Number}).loose,title:Wt.any,footer:Wt.any,transitionName:String,maskTransitionName:String,animation:Wt.any,maskAnimation:Wt.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Wt.any,maskProps:Wt.any,wrapProps:Wt.any,getContainer:Wt.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Wt.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function L7e(t,e,r){let n=e;return!n&&r&&(n=`${t}-${r}`),n}let w7e=-1;function RQt(){return w7e+=1,w7e}function A7e(t,e){let r=t[`page${e?"Y":"X"}Offset`];const n=`scroll${e?"Top":"Left"}`;if(typeof r!="number"){const i=t.document;r=i.documentElement[n],typeof r!="number"&&(r=i.body[n])}return r}function DQt(t){const e=t.getBoundingClientRect(),r={left:e.left,top:e.top},n=t.ownerDocument,i=n.defaultView||n.parentWindow;return r.left+=A7e(i),r.top+=A7e(i,!0),r}const NQt={width:0,height:0,overflow:"hidden",outline:"none"},IQt={outline:"none"},kQt=I.defineComponent({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:he(he({},GR()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(t,e){let{expose:r,slots:n,attrs:i}=e;const a=I.ref(),o=I.ref(),s=I.ref();r({focus:()=>{var f;(f=a.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:p}=document;f&&p===o.value?a.value.focus({preventScroll:!0}):!f&&p===a.value&&o.value.focus({preventScroll:!0})}});const l=I.ref(),u=I.computed(()=>{const{width:f,height:p}=t,g={};return f!==void 0&&(g.width=typeof f=="number"?`${f}px`:f),p!==void 0&&(g.height=typeof p=="number"?`${p}px`:p),l.value&&(g.transformOrigin=l.value),g}),d=()=>{I.nextTick(()=>{if(s.value){const f=DQt(s.value);l.value=t.mousePosition?`${t.mousePosition.x-f.left}px ${t.mousePosition.y-f.top}px`:""}})},h=f=>{t.onVisibleChanged(f)};return()=>{var f,p,g,m;const{prefixCls:v,footer:T=(f=n.footer)===null||f===void 0?void 0:f.call(n),title:y=(p=n.title)===null||p===void 0?void 0:p.call(n),ariaId:_,closable:Q,closeIcon:b=(g=n.closeIcon)===null||g===void 0?void 0:g.call(n),onClose:x,bodyStyle:E,bodyProps:S,onMousedown:C,onMouseup:L,visible:w,modalRender:O=n.modalRender,destroyOnClose:R,motionName:M}=t;let D;T&&(D=I.createVNode("div",{class:`${v}-footer`},[T]));let P;y&&(P=I.createVNode("div",{class:`${v}-header`},[I.createVNode("div",{class:`${v}-title`,id:_},[y])]));let B;Q&&(B=I.createVNode("button",{type:"button",onClick:x,"aria-label":"Close",class:`${v}-close`},[b||I.createVNode("span",{class:`${v}-close-x`},null)]));const k=I.createVNode("div",{class:`${v}-content`},[B,P,I.createVNode("div",xt({class:`${v}-body`,style:E},S),[(m=n.default)===null||m===void 0?void 0:m.call(n)]),D]),V=iR(M);return I.createVNode(I.Transition,xt(xt({},V),{},{onBeforeEnter:d,onAfterEnter:()=>h(!0),onAfterLeave:()=>h(!1)}),{default:()=>[w||!R?I.withDirectives(I.createVNode("div",xt(xt({},i),{},{ref:s,key:"dialog-element",role:"document",style:[u.value,i.style],class:[v,i.class],onMousedown:C,onMouseup:L}),[I.createVNode("div",{tabindex:0,ref:a,style:IQt},[O?O({originVNode:k}):k]),I.createVNode("div",{tabindex:0,ref:o,style:NQt},null)]),[[I.vShow,w]]):null]})}}}),PQt=I.defineComponent({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(t,e){return()=>{const{prefixCls:r,visible:n,maskProps:i,motionName:a}=t,o=iR(a);return I.createVNode(I.Transition,o,{default:()=>[I.withDirectives(I.createVNode("div",xt({class:`${r}-mask`},i),null),[[I.vShow,n]])]})}}}),O7e=I.defineComponent({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:C6(he(he({},GR()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(t,e){let{attrs:r,slots:n}=e;const i=I.shallowRef(),a=I.shallowRef(),o=I.shallowRef(),s=I.shallowRef(t.visible),l=I.shallowRef(`vcDialogTitle${RQt()}`),u=T=>{var y,_;if(T)w6(a.value,document.activeElement)||(i.value=document.activeElement,(y=o.value)===null||y===void 0||y.focus());else{const Q=s.value;if(s.value=!1,t.mask&&i.value&&t.focusTriggerAfterClose){try{i.value.focus({preventScroll:!0})}catch{}i.value=null}Q&&((_=t.afterClose)===null||_===void 0||_.call(t))}},d=T=>{var y;(y=t.onClose)===null||y===void 0||y.call(t,T)},h=I.shallowRef(!1),f=I.shallowRef(),p=()=>{clearTimeout(f.value),h.value=!0},g=()=>{f.value=setTimeout(()=>{h.value=!1})},m=T=>{if(!t.maskClosable)return null;h.value?h.value=!1:a.value===T.target&&d(T)},v=T=>{if(t.keyboard&&T.keyCode===FQ.ESC){T.stopPropagation(),d(T);return}t.visible&&T.keyCode===FQ.TAB&&o.value.changeActive(!T.shiftKey)};return I.watch(()=>t.visible,()=>{t.visible&&(s.value=!0)},{flush:"post"}),I.onBeforeUnmount(()=>{var T;clearTimeout(f.value),(T=t.scrollLocker)===null||T===void 0||T.unLock()}),I.watchEffect(()=>{var T,y;(T=t.scrollLocker)===null||T===void 0||T.unLock(),s.value&&((y=t.scrollLocker)===null||y===void 0||y.lock())}),()=>{const{prefixCls:T,mask:y,visible:_,maskTransitionName:Q,maskAnimation:b,zIndex:x,wrapClassName:E,rootClassName:S,wrapStyle:C,closable:L,maskProps:w,maskStyle:O,transitionName:R,animation:M,wrapProps:D,title:P=n.title}=t,{style:B,class:k}=r;return I.createVNode("div",xt({class:[`${T}-root`,S]},N7t(t,{data:!0})),[I.createVNode(PQt,{prefixCls:T,visible:y&&_,motionName:L7e(T,Q,b),style:he({zIndex:x},O),maskProps:w},null),I.createVNode("div",xt({tabIndex:-1,onKeydown:v,class:Ir(`${T}-wrap`,E),ref:a,onClick:m,role:"dialog","aria-labelledby":P?l.value:null,style:he(he({zIndex:x},C),{display:s.value?null:"none"})},D),[I.createVNode(kQt,xt(xt({},h2(t,["scrollLocker"])),{},{style:B,class:k,onMousedown:p,onMouseup:g,ref:o,closable:L,ariaId:l.value,prefixCls:T,visible:_,onClose:d,onVisibleChanged:u,motionName:L7e(T,R,M)}),n)])])}}}),BQt=GR(),HQt=I.defineComponent({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:C6(BQt,{visible:!1}),setup(t,e){let{attrs:r,slots:n}=e;const i=I.ref(t.visible);return NG({},{inTriggerContext:!1}),I.watch(()=>t.visible,()=>{t.visible&&(i.value=!0)},{flush:"post"}),()=>{const{visible:a,getContainer:o,forceRender:s,destroyOnClose:l=!1,afterClose:u}=t;let d=he(he(he({},t),r),{ref:"_component",key:"dialog"});return o===!1?I.createVNode(O7e,xt(xt({},d),{},{getOpenCount:()=>2}),n):!s&&l&&!i.value?null:I.createVNode(r5e,{autoLock:!0,visible:a,forceRender:s,getContainer:o},{default:h=>(d=he(he(he({},d),h),{afterClose:()=>{u==null||u(),i.value=!1}}),I.createVNode(O7e,d,n))})}}});function FQt(t){const e=I.ref(null),r=I.reactive(he({},t)),n=I.ref([]),i=a=>{e.value===null&&(n.value=[],e.value=ro(()=>{let o;n.value.forEach(s=>{o=he(he({},o),s)}),he(r,o),e.value=null})),n.value.push(a)};return I.onMounted(()=>{e.value&&ro.cancel(e.value)}),[r,i]}function M7e(t,e,r,n){const i=e+r,a=(r-n)/2;if(r>n){if(e>0)return{[t]:a};if(e<0&&i<n)return{[t]:-a}}else if(e<0||i>n)return{[t]:e<0?a:-a};return{}}function VQt(t,e,r,n){const{width:i,height:a}=A7t();let o=null;return t<=i&&e<=a?o={x:0,y:0}:(t>i||e>a)&&(o=he(he({},M7e("x",r,t,i)),M7e("y",n,e,a))),o}var $Qt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const R7e=Symbol("previewGroupContext"),zq={provide:t=>{I.provide(R7e,t)},inject:()=>I.inject(R7e,{isPreviewGroup:I.shallowRef(!1),previewUrls:I.computed(()=>new Map),setPreviewUrls:()=>{},current:I.ref(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},UQt=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),D7e=I.defineComponent({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:UQt(),setup(t,e){let{slots:r}=e;const n=I.computed(()=>{const b={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof t.preview=="object"?k7e(t.preview,b):b}),i=I.reactive(new Map),a=I.ref(),o=I.computed(()=>n.value.visible),s=I.computed(()=>n.value.getContainer),l=(b,x)=>{var E,S;(S=(E=n.value).onVisibleChange)===null||S===void 0||S.call(E,b,x)},[u,d]=c5e(!!o.value,{value:o,onChange:l}),h=I.ref(null),f=I.computed(()=>o.value!==void 0),p=I.computed(()=>Array.from(i.keys())),g=I.computed(()=>p.value[n.value.current]),m=I.computed(()=>new Map(Array.from(i).filter(b=>{let[,{canPreview:x}]=b;return!!x}).map(b=>{let[x,{url:E}]=b;return[x,E]}))),v=function(b,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;i.set(b,{url:x,canPreview:E})},T=b=>{a.value=b},y=b=>{h.value=b},_=function(b,x){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const S=()=>{i.delete(b)};return i.set(b,{url:x,canPreview:E}),S},Q=b=>{b==null||b.stopPropagation(),d(!1),y(null)};return I.watch(g,b=>{T(b)},{immediate:!0,flush:"post"}),I.watchEffect(()=>{u.value&&f.value&&T(g.value)},{flush:"post"}),zq.provide({isPreviewGroup:I.shallowRef(!0),previewUrls:m,setPreviewUrls:v,current:a,setCurrent:T,setShowPreview:d,setMousePosition:y,registerImage:_}),()=>{const b=$Qt(n.value,[]);return I.createVNode(I.Fragment,null,[r.default&&r.default(),I.createVNode(N7e,xt(xt({},b),{},{"ria-hidden":!u.value,visible:u.value,prefixCls:t.previewPrefixCls,onClose:Q,mousePosition:h.value,src:m.value.get(a.value),icons:t.icons,getContainer:s.value}),null)])}}}),xg={x:0,y:0},zQt=he(he({},GR()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),N7e=I.defineComponent({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:zQt,emits:["close","afterClose"],setup(t,e){let{emit:r,attrs:n}=e;const{rotateLeft:i,rotateRight:a,zoomIn:o,zoomOut:s,close:l,left:u,right:d,flipX:h,flipY:f}=I.reactive(t.icons),p=I.shallowRef(1),g=I.shallowRef(0),m=I.reactive({x:1,y:1}),[v,T]=FQt(xg),y=()=>r("close"),_=I.shallowRef(),Q=I.reactive({originX:0,originY:0,deltaX:0,deltaY:0}),b=I.shallowRef(!1),x=zq.inject(),{previewUrls:E,current:S,isPreviewGroup:C,setCurrent:L}=x,w=I.computed(()=>E.value.size),O=I.computed(()=>Array.from(E.value.keys())),R=I.computed(()=>O.value.indexOf(S.value)),M=I.computed(()=>C.value?E.value.get(S.value):t.src),D=I.computed(()=>C.value&&w.value>1),P=I.shallowRef({wheelDirection:0}),B=()=>{p.value=1,g.value=0,m.x=1,m.y=1,T(xg),r("afterClose")},k=fe=>{fe?p.value+=.5:p.value++,T(xg)},V=fe=>{p.value>1&&(fe?p.value-=.5:p.value--),T(xg)},H=()=>{g.value+=90},$=()=>{g.value-=90},G=()=>{m.x=-m.x},U=()=>{m.y=-m.y},Y=fe=>{fe.preventDefault(),fe.stopPropagation(),R.value>0&&L(O.value[R.value-1])},ne=fe=>{fe.preventDefault(),fe.stopPropagation(),R.value<w.value-1&&L(O.value[R.value+1])},te=Ir({[`${t.prefixCls}-moving`]:b.value}),ee=`${t.prefixCls}-operations-operation`,ie=`${t.prefixCls}-operations-icon`,j=[{icon:l,onClick:y,type:"close"},{icon:o,onClick:()=>k(),type:"zoomIn"},{icon:s,onClick:()=>V(),type:"zoomOut",disabled:I.computed(()=>p.value===1)},{icon:a,onClick:H,type:"rotateRight"},{icon:i,onClick:$,type:"rotateLeft"},{icon:h,onClick:G,type:"flipX"},{icon:f,onClick:U,type:"flipY"}],X=()=>{if(t.visible&&b.value){const fe=_.value.offsetWidth*p.value,ce=_.value.offsetHeight*p.value,{left:ke,top:Ee}=n5e(_.value),Ze=g.value%180!==0;b.value=!1;const ct=VQt(Ze?ce:fe,Ze?fe:ce,ke,Ee);ct&&T(he({},ct))}},Z=fe=>{fe.button===0&&(fe.preventDefault(),fe.stopPropagation(),Q.deltaX=fe.pageX-v.x,Q.deltaY=fe.pageY-v.y,Q.originX=v.x,Q.originY=v.y,b.value=!0)},K=fe=>{t.visible&&b.value&&T({x:fe.pageX-Q.deltaX,y:fe.pageY-Q.deltaY})},ae=fe=>{if(!t.visible)return;fe.preventDefault();const ce=fe.deltaY;P.value={wheelDirection:ce}},le=fe=>{!t.visible||!D.value||(fe.preventDefault(),fe.keyCode===FQ.LEFT?R.value>0&&L(O.value[R.value-1]):fe.keyCode===FQ.RIGHT&&R.value<w.value-1&&L(O.value[R.value+1]))},oe=()=>{t.visible&&(p.value!==1&&(p.value=1),(v.x!==xg.x||v.y!==xg.y)&&T(xg))};let Ce=()=>{};return I.onMounted(()=>{I.watch([()=>t.visible,b],()=>{Ce();let fe,ce;const ke=b0(window,"mouseup",X,!1),Ee=b0(window,"mousemove",K,!1),Ze=b0(window,"wheel",ae,{passive:!1}),ct=b0(window,"keydown",le,!1);try{window.top!==window.self&&(fe=b0(window.top,"mouseup",X,!1),ce=b0(window.top,"mousemove",K,!1))}catch(at){zfe(!1,`[vc-image] ${at}`)}Ce=()=>{ke.remove(),Ee.remove(),Ze.remove(),ct.remove(),fe&&fe.remove(),ce&&ce.remove()}},{flush:"post",immediate:!0}),I.watch([P],()=>{const{wheelDirection:fe}=P.value;fe>0?V(!0):fe<0&&k(!0)})}),I.onUnmounted(()=>{Ce()}),()=>{const{visible:fe,prefixCls:ce,rootClassName:ke}=t;return I.createVNode(HQt,xt(xt({},n),{},{transitionName:t.transitionName,maskTransitionName:t.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ce,onClose:y,afterClose:B,visible:fe,wrapClassName:te,rootClassName:ke,getContainer:t.getContainer}),{default:()=>[I.createVNode("div",{class:[`${t.prefixCls}-operations-wrapper`,ke]},[I.createVNode("ul",{class:`${t.prefixCls}-operations`},[j.map(Ee=>{let{icon:Ze,onClick:ct,type:at,disabled:qe}=Ee;return I.createVNode("li",{class:Ir(ee,{[`${t.prefixCls}-operations-operation-disabled`]:qe&&(qe==null?void 0:qe.value)}),onClick:ct,key:at},[I.cloneVNode(Ze,{class:ie})])})])]),I.createVNode("div",{class:`${t.prefixCls}-img-wrapper`,style:{transform:`translate3d(${v.x}px, ${v.y}px, 0)`}},[I.createVNode("img",{onMousedown:Z,onDblclick:oe,ref:_,class:`${t.prefixCls}-img`,src:M.value,alt:t.alt,style:{transform:`scale3d(${m.x*p.value}, ${m.y*p.value}, 1) rotate(${g.value}deg)`}},null)]),D.value&&I.createVNode("div",{class:Ir(`${t.prefixCls}-switch-left`,{[`${t.prefixCls}-switch-left-disabled`]:R.value<=0}),onClick:Y},[u]),D.value&&I.createVNode("div",{class:Ir(`${t.prefixCls}-switch-right`,{[`${t.prefixCls}-switch-right-disabled`]:R.value>=w.value-1}),onClick:ne},[d])]})}}});var GQt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const I7e=()=>({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:Wt.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),k7e=(t,e)=>{const r=he({},t);return Object.keys(e).forEach(n=>{t[n]===void 0&&(r[n]=e[n])}),r};let qQt=0;const P7e=I.defineComponent({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:I7e(),emits:["click","error"],setup(t,e){let{attrs:r,slots:n,emit:i}=e;const a=I.computed(()=>t.prefixCls),o=I.computed(()=>`${a.value}-preview`),s=I.computed(()=>{const k={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof t.preview=="object"?k7e(t.preview,k):k}),l=I.computed(()=>{var k;return(k=s.value.src)!==null&&k!==void 0?k:t.src}),u=I.computed(()=>t.placeholder&&t.placeholder!==!0||n.placeholder),d=I.computed(()=>s.value.visible),h=I.computed(()=>s.value.getContainer),f=I.computed(()=>d.value!==void 0),p=(k,V)=>{var H,$;($=(H=s.value).onVisibleChange)===null||$===void 0||$.call(H,k,V)},[g,m]=c5e(!!d.value,{value:d,onChange:p}),v=I.ref(u.value?"loading":"normal");I.watch(()=>t.src,()=>{v.value=u.value?"loading":"normal"});const T=I.ref(null),y=I.computed(()=>v.value==="error"),_=zq.inject(),{isPreviewGroup:Q,setCurrent:b,setShowPreview:x,setMousePosition:E,registerImage:S}=_,C=I.ref(qQt++),L=I.computed(()=>t.preview&&!y.value),w=()=>{v.value="normal"},O=k=>{v.value="error",i("error",k)},R=k=>{if(!f.value){const{left:V,top:H}=n5e(k.target);Q.value?(b(C.value),E({x:V,y:H})):T.value={x:V,y:H}}Q.value?x(!0):m(!0),i("click",k)},M=()=>{m(!1),f.value||(T.value=null)},D=I.ref(null);I.watch(()=>D,()=>{v.value==="loading"&&D.value.complete&&(D.value.naturalWidth||D.value.naturalHeight)&&w()});let P=()=>{};I.onMounted(()=>{I.watch([l,L],()=>{if(P(),!Q.value)return()=>{};P=S(C.value,l.value,L.value),L.value||P()},{flush:"post",immediate:!0})}),I.onUnmounted(()=>{P()});const B=k=>Avt(k)?k+"px":k;return()=>{const{prefixCls:k,wrapperClassName:V,fallback:H,src:$,placeholder:G,wrapperStyle:U,rootClassName:Y,width:ne,height:te,crossorigin:ee,decoding:ie,alt:j,sizes:X,srcset:Z,usemap:K,class:ae,style:le}=he(he({},t),r),oe=s.value,{icons:Ce,maskClassName:fe}=oe,ce=GQt(oe,["icons","maskClassName"]),ke=Ir(k,V,Y,{[`${k}-error`]:y.value}),Ee=y.value&&H?H:l.value,Ze={crossorigin:ee,decoding:ie,alt:j,sizes:X,srcset:Z,usemap:K,width:ne,height:te,class:Ir(`${k}-img`,{[`${k}-img-placeholder`]:G===!0},ae),style:he({height:B(te)},le)};return I.createVNode(I.Fragment,null,[I.createVNode("div",{class:ke,onClick:L.value?R:ct=>{i("click",ct)},style:he({width:B(ne),height:B(te)},U)},[I.createVNode("img",xt(xt(xt({},Ze),y.value&&H?{src:H}:{onLoad:w,onError:O,src:$}),{},{ref:D}),null),v.value==="loading"&&I.createVNode("div",{"aria-hidden":"true",class:`${k}-placeholder`},[G||n.placeholder&&n.placeholder()]),n.previewMask&&L.value&&I.createVNode("div",{class:[`${k}-mask`,fe]},[n.previewMask()])]),!Q.value&&L.value&&I.createVNode(N7e,xt(xt({},ce),{},{"aria-hidden":!g.value,visible:g.value,prefixCls:o.value,onClose:M,mousePosition:T.value,src:Ee,alt:j,getContainer:h.value,icons:Ce,rootClassName:Y}),null)])}}});P7e.PreviewGroup=D7e;var WQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function B7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){YQt(t,i,r[i])})}return t}function YQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gq=function(e,r){var n=B7e({},e,r.attrs);return I.createVNode(Mi,B7e({},n,{icon:WQt}),null)};Gq.displayName="RotateLeftOutlined",Gq.inheritAttrs=!1;var jQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};function H7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){XQt(t,i,r[i])})}return t}function XQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qq=function(e,r){var n=H7e({},e,r.attrs);return I.createVNode(Mi,H7e({},n,{icon:jQt}),null)};qq.displayName="RotateRightOutlined",qq.inheritAttrs=!1;var KQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};function F7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){ZQt(t,i,r[i])})}return t}function ZQt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qR=function(e,r){var n=F7e({},e,r.attrs);return I.createVNode(Mi,F7e({},n,{icon:KQt}),null)};qR.displayName="ZoomInOutlined",qR.inheritAttrs=!1;var JQt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};function V7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){ext(t,i,r[i])})}return t}function ext(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var WR=function(e,r){var n=V7e({},e,r.attrs);return I.createVNode(Mi,V7e({},n,{icon:JQt}),null)};WR.displayName="ZoomOutOutlined",WR.inheritAttrs=!1;var txt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};function $7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){rxt(t,i,r[i])})}return t}function rxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var YR=function(e,r){var n=$7e({},e,r.attrs);return I.createVNode(Mi,$7e({},n,{icon:txt}),null)};YR.displayName="SwapOutlined",YR.inheritAttrs=!1;function U7e(t){return{position:t,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const nxt=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${t.antCls}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:he(he({},U7e("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:he(he({},U7e("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:Lpe(t)}]},Wq=t=>({position:t||"absolute",inset:0}),ixt=t=>{const{iconCls:e,motionDurationSlow:r,paddingXXS:n,marginXXS:i,prefixCls:a}=t;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new Ca("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:he(he({},Zz),{padding:`0 ${n}px`,[e]:{marginInlineEnd:i,svg:{verticalAlign:"baseline"}}})}},axt=t=>{const{previewCls:e,modalMaskBg:r,paddingSM:n,previewOperationColorDisabled:i,motionDurationSlow:a}=t,o=new Ca(r).setAlpha(.1),s=o.clone().setAlpha(.2);return{[`${e}-operations`]:he(he({},d2(t)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:t.previewOperationColor,listStyle:"none",background:o.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${a}`,userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{color:i,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:t.previewOperationSize}})}},oxt=t=>{const{modalMaskBg:e,iconCls:r,previewOperationColorDisabled:n,previewCls:i,zIndexPopup:a,motionDurationSlow:o}=t,s=new Ca(e).setAlpha(.1),l=s.clone().setAlpha(.2);return{[`${i}-switch-left, ${i}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:a+1,display:"flex",alignItems:"center",justifyContent:"center",width:t.imagePreviewSwitchSize,height:t.imagePreviewSwitchSize,marginTop:-t.imagePreviewSwitchSize/2,color:t.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${o}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:t.previewOperationSize}},[`${i}-switch-left`]:{insetInlineStart:t.marginSM},[`${i}-switch-right`]:{insetInlineEnd:t.marginSM}}},sxt=t=>{const{motionEaseOut:e,previewCls:r,motionDurationSlow:n,componentCls:i}=t;return[{[`${i}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:he(he({},Wq()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${n} ${e} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":he(he({},Wq()),{transition:`transform ${n} ${e} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${i}-preview-root`]:{[`${r}-wrap`]:{zIndex:t.zIndexPopup}}},{[`${i}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:t.zIndexPopup+1,width:"100%"},"&":[axt(t),oxt(t)]}]},lxt=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",display:"inline-block",[`${e}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${e}-img-placeholder`]:{backgroundColor:t.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${e}-mask`]:he({},ixt(t)),[`${e}-mask:hover`]:{opacity:1},[`${e}-placeholder`]:he({},Wq())}}},uxt=t=>{const{previewCls:e}=t;return{[`${e}-root`]:ex(t,"zoom"),"&":Lpe(t,!0)}},z7e=pu("Image",t=>{const e=`${t.componentCls}-preview`,r=no(t,{previewCls:e,modalMaskBg:new Ca("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:t.controlHeightLG});return[lxt(r),sxt(r),nxt(no(r,{componentCls:e})),uxt(r)]},t=>({zIndexPopup:t.zIndexPopupBase+80,previewOperationColor:new Ca(t.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new Ca(t.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5})),G7e={rotateLeft:I.createVNode(Gq,null,null),rotateRight:I.createVNode(qq,null,null),zoomIn:I.createVNode(qR,null,null),zoomOut:I.createVNode(WR,null,null),close:I.createVNode(cv,null,null),left:I.createVNode(wq,null,null),right:I.createVNode(tx,null,null),flipX:I.createVNode(YR,null,null),flipY:I.createVNode(YR,{rotate:90},null)},cxt=()=>({previewPrefixCls:String,preview:yo()}),dxt=I.defineComponent({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:cxt(),setup(t,e){let{attrs:r,slots:n}=e;const{prefixCls:i,rootPrefixCls:a}=La("image",t),o=I.computed(()=>`${i.value}-preview`),[s,l]=z7e(i),u=I.computed(()=>{const{preview:d}=t;if(d===!1)return d;const h=typeof d=="object"?d:{};return he(he({},h),{rootClassName:l.value,transitionName:lv(a.value,"zoom",h.transitionName),maskTransitionName:lv(a.value,"fade",h.maskTransitionName)})});return()=>s(I.createVNode(D7e,xt(xt({},he(he({},r),t)),{},{preview:u.value,icons:G7e,previewPrefixCls:o.value}),n))}}),Eg=I.defineComponent({name:"AImage",inheritAttrs:!1,props:I7e(),setup(t,e){let{slots:r,attrs:n}=e;const{prefixCls:i,rootPrefixCls:a,configProvider:o}=La("image",t),[s,l]=z7e(i),u=I.computed(()=>{const{preview:d}=t;if(d===!1)return d;const h=typeof d=="object"?d:{};return he(he({icons:G7e},h),{transitionName:lv(a.value,"zoom",h.transitionName),maskTransitionName:lv(a.value,"fade",h.maskTransitionName)})});return()=>{var d,h;const f=((h=(d=o.locale)===null||d===void 0?void 0:d.value)===null||h===void 0?void 0:h.Image)||zT.Image,p=()=>I.createVNode("div",{class:`${i.value}-mask-info`},[I.createVNode(zR,null,null),f==null?void 0:f.preview]),{previewMask:g=r.previewMask||p}=t;return s(I.createVNode(P7e,xt(xt({},he(he(he({},n),t),{prefixCls:i.value})),{},{preview:u.value,rootClassName:Ir(t.rootClassName,l.value)}),he(he({},r),{previewMask:typeof g=="function"?g:null})))}}});Eg.PreviewGroup=dxt,Eg.install=function(t){return t.component(Eg.name,Eg),t.component(Eg.PreviewGroup.name,Eg.PreviewGroup),t};var hxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function q7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){fxt(t,i,r[i])})}return t}function fxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ox=function(e,r){var n=q7e({},e,r.attrs);return I.createVNode(Mi,q7e({},n,{icon:hxt}),null)};ox.displayName="CopyOutlined",ox.inheritAttrs=!1;var pxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function W7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){gxt(t,i,r[i])})}return t}function gxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jR=function(e,r){var n=W7e({},e,r.attrs);return I.createVNode(Mi,W7e({},n,{icon:pxt}),null)};jR.displayName="DownloadOutlined",jR.inheritAttrs=!1;function Y7e(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function j7e(t){return{backgroundColor:t.bgColorSelected,boxShadow:t.boxShadow}}const mxt=he({overflow:"hidden"},Zz),Txt=t=>{const{componentCls:e}=t;return{[e]:he(he(he(he(he({},d2(t)),{display:"inline-block",padding:t.segmentedContainerPadding,color:t.labelColor,backgroundColor:t.bgColor,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,"&-selected":he(he({},j7e(t)),{color:t.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.labelColorHover,"&::after":{backgroundColor:t.bgColorHover}},"&-label":he({minHeight:t.controlHeight-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeight-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`},mxt),"&-icon + *":{marginInlineStart:t.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:he(he({},j7e(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${t.paddingXXS}px 0`,borderRadius:t.borderRadiusSM,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:t.controlHeightLG-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightLG-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:t.controlHeightSM-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightSM-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontalSM}px`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),Y7e(`&-disabled ${e}-item`,t)),Y7e(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"}})}},vxt=pu("Segmented",t=>{const{lineWidthBold:e,lineWidth:r,colorTextLabel:n,colorText:i,colorFillSecondary:a,colorBgLayout:o,colorBgElevated:s}=t,l=no(t,{segmentedPaddingHorizontal:t.controlPaddingHorizontal-r,segmentedPaddingHorizontalSM:t.controlPaddingHorizontalSM-r,segmentedContainerPadding:e,labelColor:n,labelColorHover:i,bgColor:o,bgColorHover:a,bgColorSelected:s});return[Txt(l)]}),X7e=t=>t?{left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth}:null,Lv=t=>t!==void 0?`${t}px`:void 0,yxt=I.defineComponent({props:{value:yo(),getValueIndex:yo(),prefixCls:yo(),motionName:yo(),onMotionStart:yo(),onMotionEnd:yo(),direction:yo(),containerRef:yo()},emits:["motionStart","motionEnd"],setup(t,e){let{emit:r}=e;const n=I.ref(),i=g=>{var m;const v=t.getValueIndex(g),T=(m=t.containerRef.value)===null||m===void 0?void 0:m.querySelectorAll(`.${t.prefixCls}-item`)[v];return(T==null?void 0:T.offsetParent)&&T},a=I.ref(null),o=I.ref(null);I.watch(()=>t.value,(g,m)=>{const v=i(m),T=i(g),y=X7e(v),_=X7e(T);a.value=y,o.value=_,r(v&&T?"motionStart":"motionEnd")},{flush:"post"});const s=I.computed(()=>{var g,m;return t.direction==="rtl"?Lv(-((g=a.value)===null||g===void 0?void 0:g.right)):Lv((m=a.value)===null||m===void 0?void 0:m.left)}),l=I.computed(()=>{var g,m;return t.direction==="rtl"?Lv(-((g=o.value)===null||g===void 0?void 0:g.right)):Lv((m=o.value)===null||m===void 0?void 0:m.left)});let u;const d=g=>{clearTimeout(u),I.nextTick(()=>{g&&(g.style.transform="translateX(var(--thumb-start-left))",g.style.width="var(--thumb-start-width)")})},h=g=>{u=setTimeout(()=>{g&&(Qq(g,`${t.motionName}-appear-active`),g.style.transform="translateX(var(--thumb-active-left))",g.style.width="var(--thumb-active-width)")})},f=g=>{a.value=null,o.value=null,g&&(g.style.transform=null,g.style.width=null,xq(g,`${t.motionName}-appear-active`)),r("motionEnd")},p=I.computed(()=>{var g,m;return{"--thumb-start-left":s.value,"--thumb-start-width":Lv((g=a.value)===null||g===void 0?void 0:g.width),"--thumb-active-left":l.value,"--thumb-active-width":Lv((m=o.value)===null||m===void 0?void 0:m.width)}});return I.onBeforeUnmount(()=>{clearTimeout(u)}),()=>{const g={ref:n,style:p.value,class:[`${t.prefixCls}-thumb`]};return process.env.NODE_ENV==="test"&&(g["data-test-style"]=JSON.stringify(p.value)),I.createVNode(I.Transition,{appear:!0,onBeforeEnter:d,onEnter:h,onAfterEnter:f},{default:()=>[!a.value||!o.value?null:I.createVNode("div",g,null)]})}}});function _xt(t){return t.map(e=>typeof e=="object"&&e!==null?e:{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e})}const bxt=()=>({prefixCls:String,options:Ez(),block:cl(),disabled:cl(),size:xM(),value:he(he({},Sz([String,Number])),{required:!0}),motionName:String,onChange:wfe(),"onUpdate:value":wfe()}),K7e=(t,e)=>{let{slots:r,emit:n}=e;const{value:i,disabled:a,payload:o,title:s,prefixCls:l,label:u=r.label,checked:d,className:h}=t,f=p=>{a||n("change",p,i)};return I.createVNode("label",{class:Ir({[`${l}-item-disabled`]:a},h)},[I.createVNode("input",{class:`${l}-item-input`,type:"radio",disabled:a,checked:d,onChange:f},null),I.createVNode("div",{class:`${l}-item-label`,title:typeof s=="string"?s:""},[typeof u=="function"?u({value:i,disabled:a,payload:o,title:s}):u??i])])};K7e.inheritAttrs=!1;const Qxt=I.defineComponent({name:"ASegmented",inheritAttrs:!1,props:C6(bxt(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(t,e){let{emit:r,slots:n,attrs:i}=e;const{prefixCls:a,direction:o,size:s}=La("segmented",t),[l,u]=vxt(a),d=I.shallowRef(),h=I.shallowRef(!1),f=I.computed(()=>_xt(t.options)),p=(g,m)=>{t.disabled||(r("update:value",m),r("change",m))};return()=>{const g=a.value;return l(I.createVNode("div",xt(xt({},i),{},{class:Ir(g,{[u.value]:!0,[`${g}-block`]:t.block,[`${g}-disabled`]:t.disabled,[`${g}-lg`]:s.value=="large",[`${g}-sm`]:s.value=="small",[`${g}-rtl`]:o.value==="rtl"},i.class),ref:d}),[I.createVNode("div",{class:`${g}-group`},[I.createVNode(yxt,{containerRef:d,prefixCls:g,value:t.value,motionName:`${g}-${t.motionName}`,direction:o.value,getValueIndex:m=>f.value.findIndex(v=>v.value===m),onMotionStart:()=>{h.value=!0},onMotionEnd:()=>{h.value=!1}},null),f.value.map(m=>I.createVNode(K7e,xt(xt({key:m.value,prefixCls:g,checked:m.value===t.value,onChange:p},m),{},{className:Ir(m.className,`${g}-item`,{[`${g}-item-selected`]:m.value===t.value&&!h.value}),disabled:!!t.disabled||!!m.disabled}),n))])]))}}}),Z7e=eg(Qxt);var xxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};function J7e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ext(t,i,r[i])})}return t}function Ext(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yq=function(e,r){var n=J7e({},e,r.attrs);return I.createVNode(Mi,J7e({},n,{icon:xxt}),null)};Yq.displayName="AudioOutlined",Yq.inheritAttrs=!1;var Sxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function eme(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Cxt(t,i,r[i])})}return t}function Cxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jq=function(e,r){var n=eme({},e,r.attrs);return I.createVNode(Mi,eme({},n,{icon:Sxt}),null)};jq.displayName="ClearOutlined",jq.inheritAttrs=!1;var Lxt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"};function tme(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){wxt(t,i,r[i])})}return t}function wxt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xq=function(e,r){var n=tme({},e,r.attrs);return I.createVNode(Mi,tme({},n,{icon:Lxt}),null)};Xq.displayName="MoreOutlined",Xq.inheritAttrs=!1;function Axt(t,e,{signal:r,edges:n}={}){let i,a=null;const o=n!=null&&n.includes("leading"),s=n==null||n.includes("trailing"),l=()=>{a!==null&&(t.apply(i,a),i=void 0,a=null)},u=()=>{s&&l(),p()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,u()},e)},f=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{f(),i=void 0,a=null},g=()=>{f(),l()},m=function(...v){if(r!=null&&r.aborted)return;i=this,a=v;const T=d==null;h(),o&&T&&l()};return m.schedule=h,m.cancel=p,m.flush=g,r==null||r.addEventListener("abort",p,{once:!0}),m}function Oxt(...t){return function(...e){let r=t.length?t[0].apply(this,e):e[0];for(let n=1;n<t.length;n++)r=t[n].call(this,r);return r}}function Mxt(t,e,{signal:r,edges:n=["leading","trailing"]}={}){let i=null;const a=Axt(t,e,{signal:r,edges:n}),o=function(...s){i==null?i=Date.now():Date.now()-i>=e&&(i=Date.now(),a.cancel()),a(...s)};return o.cancel=a.cancel,o.flush=a.flush,o}const Rxt={key:0,class:"ai-chat-head"},Dxt={class:"ai-chat-body"},Nxt={class:"ai-chat-body-l"},Ixt={key:0,class:"ai-chat-prefix"},kxt={class:"ai-chat-name"},Pxt=["title"],Bxt={class:"ai-chat-actions ai-chat-actions--after"},Hxt=["disabled"],Fxt=["disabled"],Vxt={key:1,class:"ai-chat-foot"},rme=oa(Object.assign({name:"AiChat"},{__name:"Chat",props:{name:String,active:Boolean,editable:Boolean,disabled:Boolean,showMore:Boolean,actions:{type:Array,default:()=>["edit","delete"]}},emits:["rename","delete"],setup(t,{emit:e}){const r=t,n=e,i=I.ref(null),a=I.ref(!1),o=I.ref(""),s=I.ref(!1);function l(){r.disabled||!r.editable||(a.value=!0,o.value=r.name,I.nextTick(()=>{i.value.select(),i.value.focus()}))}function u(){if(a.value){if(a.value=!1,o.value===r.name)return;n("rename",o.value)}}return(d,h)=>{const f=Ps,p=Fh;return I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-chat",{"ai-chat--disabled":t.disabled,"ai-chat--active":t.active,"ai-chat--on":s.value}])},[d.$slots.head?(I.openBlock(),I.createElementBlock("div",Rxt,[I.renderSlot(d.$slots,"head",{},void 0,!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",Dxt,[I.createElementVNode("div",Nxt,[d.$slots.prefix?(I.openBlock(),I.createElementBlock("div",Ixt,[I.renderSlot(d.$slots,"prefix",{},void 0,!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",kxt,[a.value?(I.openBlock(),I.createBlock(f,{key:0,ref_key:"editInputRef",ref:i,value:o.value,"onUpdate:value":h[0]||(h[0]=g=>o.value=g),class:"ai-chat-name-input",placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",onClick:h[1]||(h[1]=I.withModifiers(()=>{},["stop"])),onBlur:u,onKeyup:I.withKeys(u,["enter"])},null,8,["value"])):(I.openBlock(),I.createElementBlock("div",{key:1,class:"ai-chat-name-text",title:t.name,onDblclick:I.withModifiers(l,["stop"])},I.toDisplayString(t.name),41,Pxt))])]),I.createElementVNode("div",Bxt,[t.actions.includes("edit")&&t.editable?(I.openBlock(),I.createElementBlock("button",{key:0,title:"\u7F16\u8F91",disabled:t.disabled||a.value,onClick:I.withModifiers(l,["stop"])},h[5]||(h[5]=[I.createElementVNode("i",{class:"ai-icon ai-icon-edit"},null,-1)]),8,Hxt)):I.createCommentVNode("",!0),t.actions.includes("delete")?(I.openBlock(),I.createElementBlock("button",{key:1,title:"\u5220\u9664",disabled:t.disabled,onClick:h[2]||(h[2]=I.withModifiers(g=>n("delete"),["stop"]))},h[6]||(h[6]=[I.createElementVNode("i",{class:"ai-icon ai-icon-delete"},null,-1)]),8,Fxt)):I.createCommentVNode("",!0),I.createVNode(p,{open:s.value,"onUpdate:open":h[4]||(h[4]=g=>s.value=g)},{overlay:I.withCtx(()=>[I.createElementVNode("div",{onClick:h[3]||(h[3]=I.withModifiers(g=>s.value=!1,["stop"]))},[I.renderSlot(d.$slots,"moreOverlay",{},void 0,!0)])]),default:I.withCtx(()=>[t.showMore?(I.openBlock(),I.createElementBlock("button",{key:0,class:I.normalizeClass({active:s.value})},h[7]||(h[7]=[I.createElementVNode("i",{class:"ai-icon ai-icon-more"},null,-1)]),2)):I.createCommentVNode("",!0)]),_:3},8,["open"])])]),d.$slots.foot?(I.openBlock(),I.createElementBlock("div",Vxt,[I.renderSlot(d.$slots,"foot",{},void 0,!0)])):I.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-83635da6"]]),nme=oa(Object.assign({name:"AiChatRecordList"},{__name:"ChatRecordList",props:{backgroundColor:{type:String,default:"rgba(243, 247, 253, 1)"}},setup(t){const e=t,r=I.computed(()=>({backgroundColor:e.backgroundColor}));return(n,i)=>(I.openBlock(),I.createElementBlock("div",{class:"ai-chat-record-list",style:I.normalizeStyle(r.value)},[I.renderSlot(n.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-c0956bb4"]]),$xt={class:"dropdown-wrap"},ime=oa(Object.assign({name:"AiChatRecordGroup"},{__name:"ChatRecordGroup",props:{showMore:{type:Boolean,default:!0}},setup(t){const e=I.ref(!1);return(r,n)=>{const i=Fh;return I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-chat-record-group",{"ai-chat-record-group--on":e.value}])},[I.createElementVNode("div",$xt,[I.createVNode(i,{open:e.value,"onUpdate:open":n[2]||(n[2]=a=>e.value=a)},{overlay:I.withCtx(()=>[I.createElementVNode("div",{onClick:n[1]||(n[1]=a=>e.value=!1)},[I.renderSlot(r.$slots,"moreOverlay",{},void 0,!0)])]),default:I.withCtx(()=>[t.showMore?(I.openBlock(),I.createElementBlock("a",{key:0,class:"dropdown-trigger",onClick:n[0]||(n[0]=I.withModifiers(()=>{},["prevent"]))},[I.createVNode(I.unref(Xq))])):I.createCommentVNode("",!0)]),_:3},8,["open"])]),I.renderSlot(r.$slots,"default",{},void 0,!0)],2)}}}),[["__scopeId","data-v-ec07072a"]]);function Kq(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Sg=Kq();function ame(t){Sg=t}const ome=/[&<>"']/,Uxt=new RegExp(ome.source,"g"),sme=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,zxt=new RegExp(sme.source,"g"),Gxt={"&":"&","<":"<",">":">",'"':""","'":"'"},lme=t=>Gxt[t];function e1(t,e){if(e){if(ome.test(t))return t.replace(Uxt,lme)}else if(sme.test(t))return t.replace(zxt,lme);return t}const qxt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Wxt(t){return t.replace(qxt,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const Yxt=/(^|[^\[])\^/g;function ea(t,e){let r=typeof t=="string"?t:t.source;e=e||"";const n={replace:(i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Yxt,"$1"),r=r.replace(i,o),n},getRegex:()=>new RegExp(r,e)};return n}function ume(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const sx={exec:()=>null};function cme(t,e){const r=t.replace(/\|/g,(a,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function lx(t,e,r){const n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function jxt(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return-1}function dme(t,e,r,n){const i=e.href,a=e.title?e1(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){n.state.inLink=!0;const s={type:"link",raw:r,href:i,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,s}return{type:"image",raw:r,href:i,title:a,text:e1(o)}}function Xxt(t,e){const r=t.match(/^(\s+)(?:```)/);if(r===null)return e;const n=r[1];return e.split(`
|
|
218
218
|
`).map(i=>{const a=i.match(/^\s+/);if(a===null)return i;const[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(`
|
|
219
219
|
`)}let XR=class{constructor(e){yr(this,"options");yr(this,"rules");yr(this,"lexer");this.options=e||Sg}space(e){const r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){const r=this.rules.block.code.exec(e);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:lx(n,`
|
|
220
220
|
`)}}}fences(e){const r=this.rules.block.fences.exec(e);if(r){const n=r[0],i=Xxt(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){const r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(/#$/.test(n)){const i=lx(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:lx(r[0],`
|
|
@@ -784,7 +784,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
784
784
|
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/ {2,}/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\v/g,"\v")}function IUt(t){const{markdown:e,protectedRegions:r}=RUt(t),n=NUt(e);return DUt(n,r)}const kUt=/(\n*)(\$\$)([\s\S]*?)(\$\$)/g;function PUt(t){return t.replace(kUt,(e,r,n,i)=>i.startsWith(`
|
|
785
785
|
`)&&i.endsWith(`
|
|
786
786
|
`)&&r.length<2?`
|
|
787
|
-
`.repeat(2-r.length)+e:e)}const BUt=/(?:https?:\/\/|www\.)?[a-zA-Z0-9][-a-zA-Z0-9.]+(?:\.[a-zA-Z]{2,})(?:\/[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}]*)?(?:\?[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}]*)?(?:#[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}]*)?/g;function HUt(t){return t.replace(BUt,e=>` ${e} `)}const FUt=t=>MUt.flow([IUt,HUt,PUt])(t),VUt=cI.parse;cI.parse=function(t,e){const r=FUt(t);return VUt.call(this,r,e)},cI.use(JAt({throwOnError:!1,nonStandard:!1}));function $Ut(){return"xxxxx-xxxxx-4xxxx-yxxxx-xxxxx".replace(/[xy]/g,e=>{const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString()})}function HLe(t,e){if(t){const r=new Date(t),n={"M+":r.getMonth()+1,"d+":r.getDate(),"h+":r.getHours(),"m+":r.getMinutes(),"s+":r.getSeconds(),"q+":Math.floor((r.getMonth()+3)/3),S:r.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(r.getFullYear()+"").substr(4-RegExp.$1.length)));for(const i in n)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,RegExp.$1.length===1?n[i]:("00"+n[i]).substr((""+n[i]).length)));return e}else return""}function UUt(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function zUt(t){return new Promise((e,r)=>{try{const n=document.createElement("script");n.src=t,document.getElementsByTagName("head")[0].appendChild(n),n.onload=()=>{e()}}catch(n){r(n)}})}function GUt(t){t<.1*1024?t=t.toFixed(2)+"B":t<.1*1024*1024?t=(t/1024).toFixed(2)+"KB":t<.1*1024*1024*1024?t=(t/(1024*1024)).toFixed(2)+"MB":t=(t/(1024*1024*1024)).toFixed(2)+"GB";let e=t+"",r=e.indexOf(".");return e.substr(r+1,2)==="00"?e.substring(0,r)+e.substr(r+3,2):t}function qUt(t){return/<\/?[\w\s="/.':;#-\/\[\]@]+>/.test(t)}function FLe(t){return new Promise((e,r)=>{try{const n=t.innerHTML,i=t.innerText;if(navigator.clipboard){const a=new DataTransfer;a.setData("text/plain",i),a.setData("text/html",n),navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([i],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})})]).then(()=>{e()}).catch(o=>{r()})}else{let a=document.createElement("textarea");a.readOnly=!0,a.style.position="absolute",a.style.left="-9999px",a.value=i,document.body.appendChild(a),a.select(),document.execCommand("Copy"),document.body.removeChild(a),e()}}catch{r()}})}function dI(t){return new Promise((e,r)=>{try{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t).then(()=>{e()}).catch(()=>{r()});else{let n=document.createElement("textarea");n.readOnly=!0,n.style.position="absolute",n.style.left="-9999px",n.value=t,document.body.appendChild(n),n.select(),document.execCommand("Copy"),document.body.removeChild(n),e()}}catch{r()}})}const VLe=cI,WUt=Object.freeze(Object.defineProperty({__proto__:null,bytesToSize:GUt,copy:FLe,copyText:dI,dateFmt:HLe,guid:$Ut,isHtmlString:qUt,loadScript:zUt,loadStyle:UUt,marked:VLe},Symbol.toStringTag,{value:"Module"})),YUt={key:0,class:"ai-loading-message"},jUt=oa({__name:"Loading",props:{theme:{type:String,default:"dark"},message:{type:String,default:""}},setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-loading",{"ai-loading--theme-light":t.theme==="light"}])},[r[0]||(r[0]=I.createElementVNode("div",{class:"ai-loading-icon"},[I.createElementVNode("div",{class:"bounce1"}),I.createElementVNode("div",{class:"bounce2"}),I.createElementVNode("div",{class:"bounce3"})],-1)),t.message?(I.openBlock(),I.createElementBlock("div",YUt,I.toDisplayString(t.message),1)):I.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-604394fd"]]);function $Le(t,e){const r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function wnn(){}const wu=n5(/[A-Za-z]/),ql=n5(/[\dA-Za-z]/),XUt=n5(/[#-'*+\--9=?A-Z^-~]/);function hI(t){return t!==null&&(t<32||t===127)}const JJ=n5(/\d/),KUt=n5(/[\dA-Fa-f]/),ZUt=n5(/[!-/:-@[-`{-~]/);function Gr(t){return t!==null&&t<-2}function la(t){return t!==null&&(t<0||t===32)}function si(t){return t===-2||t===-1||t===32}const fI=n5(new RegExp("\\p{P}|\\p{S}","u")),r7=n5(/\s/);function n5(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function JUt(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const xE=function(t){if(t==null)return nzt;if(typeof t=="function")return pI(t);if(typeof t=="object")return Array.isArray(t)?ezt(t):tzt(t);if(typeof t=="string")return rzt(t);throw new Error("Expected function, string, or object as test")};function ezt(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=xE(t[r]);return pI(n);function n(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function tzt(t){const e=t;return pI(r);function r(n){const i=n;let a;for(a in t)if(i[a]!==e[a])return!1;return!0}}function rzt(t){return pI(e);function e(r){return r&&r.type===t}}function pI(t){return e;function e(r,n,i){return!!(izt(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function nzt(){return!0}function izt(t){return t!==null&&typeof t=="object"&&"type"in t}function Ann(t){return t}const ULe=[],azt=!0,eee=!1,tee="skip";function gI(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;const a=xE(i),o=n?-1:1;s(t,void 0,[])();function s(l,u,d){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=ULe,g,m,v;if((!e||a(l,u,d[d.length-1]||void 0))&&(p=ozt(r(l,d)),p[0]===eee))return p;if("children"in l&&l.children){const T=l;if(T.children&&p[0]!==tee)for(m=(n?T.children.length:-1)+o,v=d.concat(T);m>-1&&m<T.children.length;){const y=T.children[m];if(g=s(y,m,v)(),g[0]===eee)return g;m=typeof g[1]=="number"?g[1]:m+o}}return p}}}function ozt(t){return Array.isArray(t)?t:typeof t=="number"?[azt,t]:t==null?ULe:[t]}function ree(t,e,r){const i=xE((r||{}).ignore||[]),a=szt(e);let o=-1;for(;++o<a.length;)gI(t,"text",s);function s(u,d){let h=-1,f;for(;++h<d.length;){const p=d[h],g=f?f.children:void 0;if(i(p,g?g.indexOf(p):void 0,f))return;f=p}if(f)return l(u,d)}function l(u,d){const h=d[d.length-1],f=a[o][0],p=a[o][1];let g=0;const v=h.children.indexOf(u);let T=!1,y=[];f.lastIndex=0;let _=f.exec(u.value);for(;_;){const Q=_.index,b={index:_.index,input:_.input,stack:[...d,u]};let x=p(..._,b);if(typeof x=="string"&&(x=x.length>0?{type:"text",value:x}:void 0),x===!1?f.lastIndex=Q+1:(g!==Q&&y.push({type:"text",value:u.value.slice(g,Q)}),Array.isArray(x)?y.push(...x):x&&y.push(x),g=Q+_[0].length,T=!0),!f.global)break;_=f.exec(u.value)}return T?(g<u.value.length&&y.push({type:"text",value:u.value.slice(g)}),h.children.splice(v,1,...y)):y=[u],v+y.length}}function szt(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let n=-1;for(;++n<r.length;){const i=r[n];e.push([lzt(i[0]),uzt(i[1])])}return e}function lzt(t){return typeof t=="string"?new RegExp(JUt(t),"g"):t}function uzt(t){return typeof t=="function"?t:function(){return t}}const nee="phrasing",iee=["autolink","link","image","label"];function czt(){return{transforms:[Tzt],enter:{literalAutolink:hzt,literalAutolinkEmail:aee,literalAutolinkHttp:aee,literalAutolinkWww:aee},exit:{literalAutolink:mzt,literalAutolinkEmail:gzt,literalAutolinkHttp:fzt,literalAutolinkWww:pzt}}}function dzt(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nee,notInConstruct:iee},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nee,notInConstruct:iee},{character:":",before:"[ps]",after:"\\/",inConstruct:nee,notInConstruct:iee}]}}function hzt(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function aee(t){this.config.enter.autolinkProtocol.call(this,t)}function fzt(t){this.config.exit.autolinkProtocol.call(this,t)}function pzt(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function gzt(t){this.config.exit.autolinkEmail.call(this,t)}function mzt(t){this.exit(t)}function Tzt(t){ree(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vzt],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yzt]],{ignore:["link","linkReference"]})}function vzt(t,e,r,n,i){let a="";if(!zLe(i)||(/^w/i.test(e)&&(r=e+r,e="",a="http://"),!_zt(r)))return!1;const o=bzt(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function yzt(t,e,r,n){return!zLe(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function _zt(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function bzt(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")");const i=$Le(t,"(");let a=$Le(t,")");for(;n!==-1&&i>a;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[t,r]}function zLe(t,e){const r=t.input.charCodeAt(t.index-1);return(t.index===0||r7(r)||fI(r))&&(!e||r!==47)}function I0(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}GLe.peek=Ozt;function Qzt(){this.buffer()}function xzt(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Ezt(){this.buffer()}function Szt(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Czt(t){const e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=I0(this.sliceSerialize(t)).toLowerCase(),r.label=e}function Lzt(t){this.exit(t)}function wzt(t){const e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=I0(this.sliceSerialize(t)).toLowerCase(),r.label=e}function Azt(t){this.exit(t)}function Ozt(){return"["}function GLe(t,e,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(t),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function Mzt(){return{enter:{gfmFootnoteCallString:Qzt,gfmFootnoteCall:xzt,gfmFootnoteDefinitionLabelString:Ezt,gfmFootnoteDefinition:Szt},exit:{gfmFootnoteCallString:Czt,gfmFootnoteCall:Lzt,gfmFootnoteDefinitionLabelString:wzt,gfmFootnoteDefinition:Azt}}}function Rzt(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:GLe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,o){const s=a.createTracker(o);let l=s.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return l+=s.move(a.safe(a.associationId(n),{before:l,after:"]"})),d(),l+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),l+=s.move((e?`
|
|
787
|
+
`.repeat(2-r.length)+e:e)}const BUt=/(?:https?:\/\/|www\.)?[a-zA-Z0-9][-a-zA-Z0-9.]+(?:\.[a-zA-Z]{2,})(?:\/[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}]*)?(?:\?[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}]*)?(?:#[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}]*)?/g;function HUt(t){return t.replace(BUt,e=>` ${e} `)}const FUt=t=>MUt.flow([IUt,HUt,PUt])(t),VUt=cI.parse;cI.parse=function(t,e){const r=FUt(t);return VUt.call(this,r,e)},cI.use(JAt({throwOnError:!1,nonStandard:!1}));function $Ut(){return"xxxxx-xxxxx-4xxxx-yxxxx-xxxxx".replace(/[xy]/g,e=>{const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString()})}function HLe(t,e){if(t){const r=new Date(t),n={"M+":r.getMonth()+1,"d+":r.getDate(),"h+":r.getHours(),"m+":r.getMinutes(),"s+":r.getSeconds(),"q+":Math.floor((r.getMonth()+3)/3),S:r.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(r.getFullYear()+"").substr(4-RegExp.$1.length)));for(const i in n)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,RegExp.$1.length===1?n[i]:("00"+n[i]).substr((""+n[i]).length)));return e}else return""}function UUt(t){const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}function zUt(t){return new Promise((e,r)=>{try{const n=document.createElement("script");n.src=t,document.getElementsByTagName("head")[0].appendChild(n),n.onload=()=>{e()}}catch(n){r(n)}})}function GUt(t){t<.1*1024?t=t.toFixed(2)+"B":t<.1*1024*1024?t=(t/1024).toFixed(2)+"KB":t<.1*1024*1024*1024?t=(t/(1024*1024)).toFixed(2)+"MB":t=(t/(1024*1024*1024)).toFixed(2)+"GB";let e=t+"",r=e.indexOf(".");return e.substr(r+1,2)==="00"?e.substring(0,r)+e.substr(r+3,2):t}function qUt(t){return/<\/?[\w\s="/.':;#-\/\[\]@]+>/.test(t)}function FLe(t){return new Promise((e,r)=>{try{const n=t.innerHTML,i=t.innerText;if(navigator.clipboard){const a=new DataTransfer;a.setData("text/plain",i),a.setData("text/html",n),navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([i],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})})]).then(()=>{e()}).catch(o=>{r()})}else{let a=document.createElement("textarea");a.readOnly=!0,a.style.position="absolute",a.style.left="-9999px",a.value=i,document.body.appendChild(a),a.select(),document.execCommand("Copy"),document.body.removeChild(a),e()}}catch{r()}})}function dI(t){return new Promise((e,r)=>{try{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t).then(()=>{e()}).catch(()=>{r()});else{let n=document.createElement("textarea");n.readOnly=!0,n.style.position="absolute",n.style.left="-9999px",n.value=t,document.body.appendChild(n),n.select(),document.execCommand("Copy"),document.body.removeChild(n),e()}}catch{r()}})}const VLe=cI,WUt=Object.freeze(Object.defineProperty({__proto__:null,bytesToSize:GUt,copy:FLe,copyText:dI,dateFmt:HLe,guid:$Ut,isHtmlString:qUt,loadScript:zUt,loadStyle:UUt,marked:VLe},Symbol.toStringTag,{value:"Module"})),YUt={key:0,class:"ai-loading-message"},jUt=oa({__name:"Loading",props:{theme:{type:String,default:"dark"},message:{type:String,default:""}},setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-loading",{"ai-loading--theme-light":t.theme==="light"}])},[r[0]||(r[0]=I.createElementVNode("div",{class:"ai-loading-icon"},[I.createElementVNode("div",{class:"bounce1"}),I.createElementVNode("div",{class:"bounce2"}),I.createElementVNode("div",{class:"bounce3"})],-1)),t.message?(I.openBlock(),I.createElementBlock("div",YUt,I.toDisplayString(t.message),1)):I.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-59568942"]]);function $Le(t,e){const r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function wnn(){}const wu=n5(/[A-Za-z]/),ql=n5(/[\dA-Za-z]/),XUt=n5(/[#-'*+\--9=?A-Z^-~]/);function hI(t){return t!==null&&(t<32||t===127)}const JJ=n5(/\d/),KUt=n5(/[\dA-Fa-f]/),ZUt=n5(/[!-/:-@[-`{-~]/);function Gr(t){return t!==null&&t<-2}function la(t){return t!==null&&(t<0||t===32)}function si(t){return t===-2||t===-1||t===32}const fI=n5(new RegExp("\\p{P}|\\p{S}","u")),r7=n5(/\s/);function n5(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function JUt(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const xE=function(t){if(t==null)return nzt;if(typeof t=="function")return pI(t);if(typeof t=="object")return Array.isArray(t)?ezt(t):tzt(t);if(typeof t=="string")return rzt(t);throw new Error("Expected function, string, or object as test")};function ezt(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=xE(t[r]);return pI(n);function n(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function tzt(t){const e=t;return pI(r);function r(n){const i=n;let a;for(a in t)if(i[a]!==e[a])return!1;return!0}}function rzt(t){return pI(e);function e(r){return r&&r.type===t}}function pI(t){return e;function e(r,n,i){return!!(izt(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function nzt(){return!0}function izt(t){return t!==null&&typeof t=="object"&&"type"in t}function Ann(t){return t}const ULe=[],azt=!0,eee=!1,tee="skip";function gI(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;const a=xE(i),o=n?-1:1;s(t,void 0,[])();function s(l,u,d){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=ULe,g,m,v;if((!e||a(l,u,d[d.length-1]||void 0))&&(p=ozt(r(l,d)),p[0]===eee))return p;if("children"in l&&l.children){const T=l;if(T.children&&p[0]!==tee)for(m=(n?T.children.length:-1)+o,v=d.concat(T);m>-1&&m<T.children.length;){const y=T.children[m];if(g=s(y,m,v)(),g[0]===eee)return g;m=typeof g[1]=="number"?g[1]:m+o}}return p}}}function ozt(t){return Array.isArray(t)?t:typeof t=="number"?[azt,t]:t==null?ULe:[t]}function ree(t,e,r){const i=xE((r||{}).ignore||[]),a=szt(e);let o=-1;for(;++o<a.length;)gI(t,"text",s);function s(u,d){let h=-1,f;for(;++h<d.length;){const p=d[h],g=f?f.children:void 0;if(i(p,g?g.indexOf(p):void 0,f))return;f=p}if(f)return l(u,d)}function l(u,d){const h=d[d.length-1],f=a[o][0],p=a[o][1];let g=0;const v=h.children.indexOf(u);let T=!1,y=[];f.lastIndex=0;let _=f.exec(u.value);for(;_;){const Q=_.index,b={index:_.index,input:_.input,stack:[...d,u]};let x=p(..._,b);if(typeof x=="string"&&(x=x.length>0?{type:"text",value:x}:void 0),x===!1?f.lastIndex=Q+1:(g!==Q&&y.push({type:"text",value:u.value.slice(g,Q)}),Array.isArray(x)?y.push(...x):x&&y.push(x),g=Q+_[0].length,T=!0),!f.global)break;_=f.exec(u.value)}return T?(g<u.value.length&&y.push({type:"text",value:u.value.slice(g)}),h.children.splice(v,1,...y)):y=[u],v+y.length}}function szt(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let n=-1;for(;++n<r.length;){const i=r[n];e.push([lzt(i[0]),uzt(i[1])])}return e}function lzt(t){return typeof t=="string"?new RegExp(JUt(t),"g"):t}function uzt(t){return typeof t=="function"?t:function(){return t}}const nee="phrasing",iee=["autolink","link","image","label"];function czt(){return{transforms:[Tzt],enter:{literalAutolink:hzt,literalAutolinkEmail:aee,literalAutolinkHttp:aee,literalAutolinkWww:aee},exit:{literalAutolink:mzt,literalAutolinkEmail:gzt,literalAutolinkHttp:fzt,literalAutolinkWww:pzt}}}function dzt(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nee,notInConstruct:iee},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nee,notInConstruct:iee},{character:":",before:"[ps]",after:"\\/",inConstruct:nee,notInConstruct:iee}]}}function hzt(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function aee(t){this.config.enter.autolinkProtocol.call(this,t)}function fzt(t){this.config.exit.autolinkProtocol.call(this,t)}function pzt(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function gzt(t){this.config.exit.autolinkEmail.call(this,t)}function mzt(t){this.exit(t)}function Tzt(t){ree(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vzt],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yzt]],{ignore:["link","linkReference"]})}function vzt(t,e,r,n,i){let a="";if(!zLe(i)||(/^w/i.test(e)&&(r=e+r,e="",a="http://"),!_zt(r)))return!1;const o=bzt(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function yzt(t,e,r,n){return!zLe(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function _zt(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function bzt(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")");const i=$Le(t,"(");let a=$Le(t,")");for(;n!==-1&&i>a;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[t,r]}function zLe(t,e){const r=t.input.charCodeAt(t.index-1);return(t.index===0||r7(r)||fI(r))&&(!e||r!==47)}function I0(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}GLe.peek=Ozt;function Qzt(){this.buffer()}function xzt(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Ezt(){this.buffer()}function Szt(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Czt(t){const e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=I0(this.sliceSerialize(t)).toLowerCase(),r.label=e}function Lzt(t){this.exit(t)}function wzt(t){const e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=I0(this.sliceSerialize(t)).toLowerCase(),r.label=e}function Azt(t){this.exit(t)}function Ozt(){return"["}function GLe(t,e,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(t),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function Mzt(){return{enter:{gfmFootnoteCallString:Qzt,gfmFootnoteCall:xzt,gfmFootnoteDefinitionLabelString:Ezt,gfmFootnoteDefinition:Szt},exit:{gfmFootnoteCallString:Czt,gfmFootnoteCall:Lzt,gfmFootnoteDefinitionLabelString:wzt,gfmFootnoteDefinition:Azt}}}function Rzt(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:GLe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,o){const s=a.createTracker(o);let l=s.move("[^");const u=a.enter("footnoteDefinition"),d=a.enter("label");return l+=s.move(a.safe(a.associationId(n),{before:l,after:"]"})),d(),l+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),l+=s.move((e?`
|
|
788
788
|
`:" ")+a.indentLines(a.containerFlow(n,s.current()),e?qLe:Dzt))),u(),l}}function Dzt(t,e,r){return e===0?t:qLe(t,e,r)}function qLe(t,e,r){return(r?"":" ")+t}const Nzt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];WLe.peek=Hzt;function Izt(){return{canContainEols:["delete"],enter:{strikethrough:Pzt},exit:{strikethrough:Bzt}}}function kzt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Nzt}],handlers:{delete:WLe}}}function Pzt(t){this.enter({type:"delete",children:[]},t)}function Bzt(t){this.exit(t)}function WLe(t,e,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let o=i.move("~~");return o+=r.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function Hzt(){return"~"}function Fzt(t){return t.length}function Vzt(t,e){const r=e||{},n=(r.align||[]).concat(),i=r.stringLength||Fzt,a=[],o=[],s=[],l=[];let u=0,d=-1;for(;++d<t.length;){const m=[],v=[];let T=-1;for(t[d].length>u&&(u=t[d].length);++T<t[d].length;){const y=$zt(t[d][T]);if(r.alignDelimiters!==!1){const _=i(y);v[T]=_,(l[T]===void 0||_>l[T])&&(l[T]=_)}m.push(y)}o[d]=m,s[d]=v}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<u;)a[h]=YLe(n[h]);else{const m=YLe(n);for(;++h<u;)a[h]=m}h=-1;const f=[],p=[];for(;++h<u;){const m=a[h];let v="",T="";m===99?(v=":",T=":"):m===108?v=":":m===114&&(T=":");let y=r.alignDelimiters===!1?1:Math.max(1,l[h]-v.length-T.length);const _=v+"-".repeat(y)+T;r.alignDelimiters!==!1&&(y=v.length+y+T.length,y>l[h]&&(l[h]=y),p[h]=y),f[h]=_}o.splice(1,0,f),s.splice(1,0,p),d=-1;const g=[];for(;++d<o.length;){const m=o[d],v=s[d];h=-1;const T=[];for(;++h<u;){const y=m[h]||"";let _="",Q="";if(r.alignDelimiters!==!1){const b=l[h]-(v[h]||0),x=a[h];x===114?_=" ".repeat(b):x===99?b%2?(_=" ".repeat(b/2+.5),Q=" ".repeat(b/2-.5)):(_=" ".repeat(b/2),Q=_):Q=" ".repeat(b)}r.delimiterStart!==!1&&!h&&T.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&y==="")&&(r.delimiterStart!==!1||h)&&T.push(" "),r.alignDelimiters!==!1&&T.push(_),T.push(y),r.alignDelimiters!==!1&&T.push(Q),r.padding!==!1&&T.push(" "),(r.delimiterEnd!==!1||h!==u-1)&&T.push("|")}g.push(r.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return g.join(`
|
|
789
789
|
`)}function $zt(t){return t==null?"":String(t)}function YLe(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}const jLe={}.hasOwnProperty;function XLe(t,e){const r=e||{};function n(i,...a){let o=n.invalid;const s=n.handlers;if(i&&jLe.call(i,t)){const l=String(i[t]);o=jLe.call(s,l)?s[l]:n.unknown}if(o)return o.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}function Uzt(t,e,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(t,a.current()),zzt);return i(),o}function zzt(t,e,r){return">"+(r?"":" ")+t}function Gzt(t,e){return KLe(t,e.inConstruct,!0)&&!KLe(t,e.notInConstruct,!1)}function KLe(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}function ZLe(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
|
|
790
790
|
`&&Gzt(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
|
|
@@ -867,7 +867,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
867
867
|
`});++n<t.length;)n&&r.push({type:"text",value:`
|
|
868
868
|
`}),r.push(t[n]);return e&&t.length>0&&r.push({type:"text",value:`
|
|
869
869
|
`}),r}function iPe(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}function aPe(t,e){const r=Irr(t,e),n=r.one(t,void 0),i=Drr(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
870
|
-
`},i),a}function Frr(t,e){return t&&"run"in t?async function(r,n){const i=aPe(r,{file:n,...e});await t.run(i,n)}:function(r,n){return aPe(r,{file:n,...t||e})}}function oPe(t){if(t)throw t}var bte,sPe;function Vrr(){if(sPe)return bte;sPe=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):e.call(u)==="[object Array]"},a=function(u){if(!u||e.call(u)!=="[object Object]")return!1;var d=t.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&t.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var f;for(f in u);return typeof f>"u"||t.call(u,f)},o=function(u,d){r&&d.name==="__proto__"?r(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},s=function(u,d){if(d==="__proto__")if(t.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return bte=function l(){var u,d,h,f,p,g,m=arguments[0],v=1,T=arguments.length,y=!1;for(typeof m=="boolean"&&(y=m,m=arguments[1]||{},v=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});v<T;++v)if(u=arguments[v],u!=null)for(d in u)h=s(m,d),f=s(u,d),m!==f&&(y&&f&&(a(f)||(p=i(f)))?(p?(p=!1,g=h&&i(h)?h:[]):g=h&&a(h)?h:{},o(m,{name:d,newValue:l(y,g,f)})):typeof f<"u"&&o(m,{name:d,newValue:f}));return m},bte}var $rr=Vrr();const Qte=$h($rr);function xte(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Urr(){const t=[],e={run:r,use:n};return e;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...u){const d=t[++a];let h=-1;if(l){o(l);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?zrr(d,s)(...u):o(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function zrr(t,e){let r;return n;function n(...o){const s=t.length>o.length;let l;s&&o.push(i);try{l=t.apply(this,o)}catch(u){const d=u;if(s&&r)throw d;return i(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){r||(r=!0,e(o,...s))}function a(o){i(null,o)}}class _c extends Error{constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof e=="string"?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=MC(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}_c.prototype.file="",_c.prototype.name="",_c.prototype.reason="",_c.prototype.message="",_c.prototype.stack="",_c.prototype.column=void 0,_c.prototype.line=void 0,_c.prototype.ancestors=void 0,_c.prototype.cause=void 0,_c.prototype.fatal=void 0,_c.prototype.place=void 0,_c.prototype.ruleId=void 0,_c.prototype.source=void 0;const C3={basename:Grr,dirname:qrr,extname:Wrr,join:Yrr,sep:"/"};function Grr(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');RC(t);let r=0,n=-1,i=t.length,a;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let o=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=t.length),t.slice(r,n)}function qrr(t){if(RC(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Wrr(t){RC(t);let e=t.length,r=-1,n=0,i=-1,a=0,o;for(;e--;){const s=t.codePointAt(e);if(s===47){if(o){n=e+1;break}continue}r<0&&(o=!0,r=e+1),s===46?i<0?i=e:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":t.slice(i,r)}function Yrr(...t){let e=-1,r;for(;++e<t.length;)RC(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":jrr(r)}function jrr(t){RC(t);const e=t.codePointAt(0)===47;let r=Xrr(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}function Xrr(t,e){let r="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=t.length;){if(o<t.length)s=t.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,o):r=t.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function RC(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Krr={cwd:Zrr};function Zrr(){return"/"}function Ete(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Jrr(t){if(typeof t=="string")t=new URL(t);else if(!Ete(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return enr(t)}function enr(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=t.pathname;let r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){const n=e.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Ste=["history","path","basename","stem","extname","dirname"];class lPe{constructor(e){let r;e?Ete(e)?r={path:e}:typeof e=="string"||tnr(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":Krr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ste.length;){const a=Ste[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Ste.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?C3.basename(this.path):void 0}set basename(e){Lte(e,"basename"),Cte(e,"basename"),this.path=C3.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?C3.dirname(this.path):void 0}set dirname(e){uPe(this.basename,"dirname"),this.path=C3.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?C3.extname(this.path):void 0}set extname(e){if(Cte(e,"extname"),uPe(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=C3.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ete(e)&&(e=Jrr(e)),Lte(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?C3.basename(this.path,this.extname):void 0}set stem(e){Lte(e,"stem"),Cte(e,"stem"),this.path=C3.join(this.dirname||"",e+(this.extname||""))}fail(e,r,n){const i=this.message(e,r,n);throw i.fatal=!0,i}info(e,r,n){const i=this.message(e,r,n);return i.fatal=void 0,i}message(e,r,n){const i=new _c(e,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Cte(t,e){if(t&&t.includes(C3.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+C3.sep+"`")}function Lte(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function uPe(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function tnr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const rnr=function(t){const n=this.constructor.prototype,i=n[t],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},nnr={}.hasOwnProperty;class wte extends rnr{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Urr()}copy(){const e=new wte;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];e.use(...n)}return e.data(Qte(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(Mte("data",this.frozen),this.namespace[e]=r,this):nnr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Mte("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const r=VI(e),n=this.parser||this.Parser;return Ate("parse",n),n(String(r),r)}process(e,r){const n=this;return this.freeze(),Ate("process",this.parser||this.Parser),Ote("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=VI(e),l=n.parse(s);n.run(l,s,function(d,h,f){if(d||!h||!f)return u(d);const p=h,g=n.stringify(p,f);onr(g)?f.value=g:f.result=g,u(d,f)});function u(d,h){d||!h?o(d):a?a(h):r(void 0,h)}}}processSync(e){let r=!1,n;return this.freeze(),Ate("processSync",this.parser||this.Parser),Ote("processSync",this.compiler||this.Compiler),this.process(e,i),dPe("processSync","process",r),n;function i(a,o){r=!0,oPe(a),n=o}}run(e,r,n){cPe(e),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const l=VI(r);i.run(e,l,u);function u(d,h,f){const p=h||e;d?s(d):o?o(p):n(void 0,p,f)}}}runSync(e,r){let n=!1,i;return this.run(e,r,a),dPe("runSync","run",n),i;function a(o,s){oPe(o),i=s,n=!0}}stringify(e,r){this.freeze();const n=VI(r),i=this.compiler||this.Compiler;return Ote("stringify",i),cPe(e),i(e,n)}use(e,...r){const n=this.attachers,i=this.namespace;if(Mte("use",this.frozen),e!=null)if(typeof e=="function")l(e,r);else if(typeof e=="object")Array.isArray(e)?s(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;l(d,h)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Qte(!0,i.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let h=-1,f=-1;for(;++h<n.length;)if(n[h][0]===u){f=h;break}if(f===-1)n.push([u,...d]);else if(d.length>0){let[p,...g]=d;const m=n[f][1];xte(m)&&xte(p)&&(p=Qte(!0,m,p)),n[f]=[u,p,...g]}}}}const inr=new wte().freeze();function Ate(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ote(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mte(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cPe(t){if(!xte(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function dPe(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function VI(t){return anr(t)?t:new lPe(t)}function anr(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function onr(t){return typeof t=="string"||snr(t)}function snr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lnr=({remarkPlugins:t=[],rehypePlugins:e=[],remarkRehypeOptions:r={allowDangerousHtml:!0},skipHtml:n=!1,disallowedElements:i=[],async:a=!1})=>{const o=I.ref(""),s=I.shallowRef(null),l=I.useSlots(),d=inr().use(irr).use(t).use(Frr,r).use(e),h=()=>{const g=new lPe;return g.value=o.value,g};function f(g,m,v){if(g.type==="raw"&&v&&typeof m=="number")return n?v.children.splice(m,1):v.children[m]={type:"text",value:g.value},m;i.includes(g.tagName)&&v.children.splice(m,1)}const p=g=>{if(!g)return null;if(g.type==="root")return I.h("div",g.children.map(m=>p(m)));if(g.type==="text")return l&&l[g.type]?l[g.type]({node:g}):g.value;if(g.type==="raw")return g.value;if(g.type==="element"){const m=g.tagName;if(l&&l[m])return l[m]({node:g});const v=(g.children||[]).map(_=>p(_)),T={};for(const[_,Q]of Object.entries(g.properties))if(/^(data|aria)[A-Z]/.test(_)){const b=_.replace(/[A-Z]/g,x=>"-"+x.toLowerCase());T[b]=Q}else T[_]=Q;const y={...T};return y.className&&(y.class=y.className,delete y.className),I.h(g.tagName,y,v)}return null};return I.watch(o,async(g,m)=>{if(g!==m)try{const v=h(),T=a?await d.run(d.parse(v),v):d.runSync(d.parse(v),v);SE(T,f),s.value=p(T)}catch(v){console.error(v)}}),{content:o,vNodes:s}},Rte=Object.assign({name:"AiMarkdown"},{__name:"Markdown",props:I.mergeDefaults({markdown:{type:String,required:!0},remarkPlugins:Array,rehypePlugins:Array,remarkRehypeOptions:Object,skipHtml:Boolean,disallowedElements:Array,async:Boolean},{remarkPlugins:()=>[],rehypePlugins:()=>[],remarkRehypeOptions:()=>({allowDangerousHtml:!0}),skipHtml:!1,disallowedElements:()=>[],async:!1}),setup(t){const{content:e,vNodes:r}=lnr({remarkPlugins:t.remarkPlugins,rehypePlugins:t.rehypePlugins,remarkRehypeOptions:t.remarkRehypeOptions,skipHtml:t.skipHtml,disallowedElements:t.disallowedElements,async:t.async});return I.watchEffect(()=>{e.value=t.markdown}),(n,i)=>(I.openBlock(),I.createBlock(I.resolveDynamicComponent(I.unref(r))))}}),unr={},cnr={class:"code-header"},dnr={class:"code-title"},hnr={class:"code-actions"};function fnr(t,e){return I.openBlock(),I.createElementBlock("div",cnr,[I.createElementVNode("div",dnr,[I.renderSlot(t.$slots,"title",{},void 0,!0)]),I.createElementVNode("div",hnr,[I.renderSlot(t.$slots,"actions",{},void 0,!0)])])}const Dte=oa(unr,[["render",fnr],["__scopeId","data-v-c45ba717"]]),pnr={class:"code-num"},gnr=["innerHTML"],mnr=oa({__name:"CodeParser",props:{code:{type:String,required:!0},lang:{type:String,default:"js"}},setup(t){hx.registerLanguage("vue",()=>({subLanguage:"xml"}));const e=I.ref(""),r=I.ref([]);I.watchEffect(()=>{var a;t.code&&(e.value=((a=hx.getLanguage(t.lang))==null?void 0:a.name)??"plaintext",r.value=hx.highlightAuto(t.code).value.split(/\n(?!$)/g))});const n=async()=>{try{await dI(t.code),ma.success("\u590D\u5236\u6210\u529F!")}catch(a){ma.error(a)}},i=()=>{try{const a=new Blob([t.code],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(a),s=document.createElement("a");s.href=o;const l=new Date,u=h=>h.toString().padStart(2,"0"),d=`${l.getFullYear()}${u(l.getMonth()+1)}${u(l.getDate())}`;s.download=`${e.value}-${d}.${t.lang||"txt"}`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o),ma.success("\u4E0B\u8F7D\u6210\u529F!")}catch(a){ma.error(a)}};return(a,o)=>{const s=Jc,l=k6;return I.openBlock(),I.createElementBlock("pre",null,[o[21]||(o[21]=I.createTextVNode(" ")),I.createVNode(Dte,null,{title:I.withCtx(()=>[o[0]||(o[0]=I.createTextVNode(`
|
|
870
|
+
`},i),a}function Frr(t,e){return t&&"run"in t?async function(r,n){const i=aPe(r,{file:n,...e});await t.run(i,n)}:function(r,n){return aPe(r,{file:n,...t||e})}}function oPe(t){if(t)throw t}var bte,sPe;function Vrr(){if(sPe)return bte;sPe=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):e.call(u)==="[object Array]"},a=function(u){if(!u||e.call(u)!=="[object Object]")return!1;var d=t.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&t.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var f;for(f in u);return typeof f>"u"||t.call(u,f)},o=function(u,d){r&&d.name==="__proto__"?r(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},s=function(u,d){if(d==="__proto__")if(t.call(u,d)){if(n)return n(u,d).value}else return;return u[d]};return bte=function l(){var u,d,h,f,p,g,m=arguments[0],v=1,T=arguments.length,y=!1;for(typeof m=="boolean"&&(y=m,m=arguments[1]||{},v=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});v<T;++v)if(u=arguments[v],u!=null)for(d in u)h=s(m,d),f=s(u,d),m!==f&&(y&&f&&(a(f)||(p=i(f)))?(p?(p=!1,g=h&&i(h)?h:[]):g=h&&a(h)?h:{},o(m,{name:d,newValue:l(y,g,f)})):typeof f<"u"&&o(m,{name:d,newValue:f}));return m},bte}var $rr=Vrr();const Qte=$h($rr);function xte(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Urr(){const t=[],e={run:r,use:n};return e;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...u){const d=t[++a];let h=-1;if(l){o(l);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?zrr(d,s)(...u):o(null,...u)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function zrr(t,e){let r;return n;function n(...o){const s=t.length>o.length;let l;s&&o.push(i);try{l=t.apply(this,o)}catch(u){const d=u;if(s&&r)throw d;return i(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){r||(r=!0,e(o,...s))}function a(o){i(null,o)}}class _c extends Error{constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof e=="string"?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=MC(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}_c.prototype.file="",_c.prototype.name="",_c.prototype.reason="",_c.prototype.message="",_c.prototype.stack="",_c.prototype.column=void 0,_c.prototype.line=void 0,_c.prototype.ancestors=void 0,_c.prototype.cause=void 0,_c.prototype.fatal=void 0,_c.prototype.place=void 0,_c.prototype.ruleId=void 0,_c.prototype.source=void 0;const C3={basename:Grr,dirname:qrr,extname:Wrr,join:Yrr,sep:"/"};function Grr(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');RC(t);let r=0,n=-1,i=t.length,a;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let o=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=t.length),t.slice(r,n)}function qrr(t){if(RC(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Wrr(t){RC(t);let e=t.length,r=-1,n=0,i=-1,a=0,o;for(;e--;){const s=t.codePointAt(e);if(s===47){if(o){n=e+1;break}continue}r<0&&(o=!0,r=e+1),s===46?i<0?i=e:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":t.slice(i,r)}function Yrr(...t){let e=-1,r;for(;++e<t.length;)RC(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":jrr(r)}function jrr(t){RC(t);const e=t.codePointAt(0)===47;let r=Xrr(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}function Xrr(t,e){let r="",n=0,i=-1,a=0,o=-1,s,l;for(;++o<=t.length;){if(o<t.length)s=t.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,o):r=t.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function RC(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Krr={cwd:Zrr};function Zrr(){return"/"}function Ete(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Jrr(t){if(typeof t=="string")t=new URL(t);else if(!Ete(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return enr(t)}function enr(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=t.pathname;let r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){const n=e.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const Ste=["history","path","basename","stem","extname","dirname"];class lPe{constructor(e){let r;e?Ete(e)?r={path:e}:typeof e=="string"||tnr(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":Krr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ste.length;){const a=Ste[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Ste.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?C3.basename(this.path):void 0}set basename(e){Lte(e,"basename"),Cte(e,"basename"),this.path=C3.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?C3.dirname(this.path):void 0}set dirname(e){uPe(this.basename,"dirname"),this.path=C3.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?C3.extname(this.path):void 0}set extname(e){if(Cte(e,"extname"),uPe(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=C3.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ete(e)&&(e=Jrr(e)),Lte(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?C3.basename(this.path,this.extname):void 0}set stem(e){Lte(e,"stem"),Cte(e,"stem"),this.path=C3.join(this.dirname||"",e+(this.extname||""))}fail(e,r,n){const i=this.message(e,r,n);throw i.fatal=!0,i}info(e,r,n){const i=this.message(e,r,n);return i.fatal=void 0,i}message(e,r,n){const i=new _c(e,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Cte(t,e){if(t&&t.includes(C3.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+C3.sep+"`")}function Lte(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function uPe(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function tnr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const rnr=function(t){const n=this.constructor.prototype,i=n[t],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},nnr={}.hasOwnProperty;class wte extends rnr{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Urr()}copy(){const e=new wte;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];e.use(...n)}return e.data(Qte(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(Mte("data",this.frozen),this.namespace[e]=r,this):nnr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Mte("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const r=VI(e),n=this.parser||this.Parser;return Ate("parse",n),n(String(r),r)}process(e,r){const n=this;return this.freeze(),Ate("process",this.parser||this.Parser),Ote("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=VI(e),l=n.parse(s);n.run(l,s,function(d,h,f){if(d||!h||!f)return u(d);const p=h,g=n.stringify(p,f);onr(g)?f.value=g:f.result=g,u(d,f)});function u(d,h){d||!h?o(d):a?a(h):r(void 0,h)}}}processSync(e){let r=!1,n;return this.freeze(),Ate("processSync",this.parser||this.Parser),Ote("processSync",this.compiler||this.Compiler),this.process(e,i),dPe("processSync","process",r),n;function i(a,o){r=!0,oPe(a),n=o}}run(e,r,n){cPe(e),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const l=VI(r);i.run(e,l,u);function u(d,h,f){const p=h||e;d?s(d):o?o(p):n(void 0,p,f)}}}runSync(e,r){let n=!1,i;return this.run(e,r,a),dPe("runSync","run",n),i;function a(o,s){oPe(o),i=s,n=!0}}stringify(e,r){this.freeze();const n=VI(r),i=this.compiler||this.Compiler;return Ote("stringify",i),cPe(e),i(e,n)}use(e,...r){const n=this.attachers,i=this.namespace;if(Mte("use",this.frozen),e!=null)if(typeof e=="function")l(e,r);else if(typeof e=="object")Array.isArray(e)?s(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;l(d,h)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Qte(!0,i.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let h=-1,f=-1;for(;++h<n.length;)if(n[h][0]===u){f=h;break}if(f===-1)n.push([u,...d]);else if(d.length>0){let[p,...g]=d;const m=n[f][1];xte(m)&&xte(p)&&(p=Qte(!0,m,p)),n[f]=[u,p,...g]}}}}const inr=new wte().freeze();function Ate(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ote(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mte(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cPe(t){if(!xte(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function dPe(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function VI(t){return anr(t)?t:new lPe(t)}function anr(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function onr(t){return typeof t=="string"||snr(t)}function snr(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lnr=({remarkPlugins:t=[],rehypePlugins:e=[],remarkRehypeOptions:r={allowDangerousHtml:!0},skipHtml:n=!1,disallowedElements:i=[],async:a=!1})=>{const o=I.ref(""),s=I.shallowRef(null),l=I.useSlots(),d=inr().use(irr).use(t).use(Frr,r).use(e),h=()=>{const g=new lPe;return g.value=o.value,g};function f(g,m,v){if(g.type==="raw"&&v&&typeof m=="number")return n?v.children.splice(m,1):v.children[m]={type:"text",value:g.value},m;i.includes(g.tagName)&&v.children.splice(m,1)}const p=g=>{if(!g)return null;if(g.type==="root")return I.h("div",g.children.map(m=>p(m)));if(g.type==="text")return l&&l[g.type]?l[g.type]({node:g}):g.value;if(g.type==="raw")return g.value;if(g.type==="element"){const m=g.tagName;if(l&&l[m])return l[m]({node:g});const v=(g.children||[]).map(_=>p(_)),T={};for(const[_,Q]of Object.entries(g.properties))if(/^(data|aria)[A-Z]/.test(_)){const b=_.replace(/[A-Z]/g,x=>"-"+x.toLowerCase());T[b]=Q}else T[_]=Q;const y={...T};return y.className&&(y.class=y.className,delete y.className),I.h(g.tagName,y,v)}return null};return I.watch(o,async(g,m)=>{if(g!==m)try{const v=h(),T=a?await d.run(d.parse(v),v):d.runSync(d.parse(v),v);SE(T,f),s.value=p(T)}catch(v){console.error(v)}}),{content:o,vNodes:s}},Rte=Object.assign({name:"AiMarkdown"},{__name:"Markdown",props:I.mergeDefaults({markdown:{type:String,required:!0},remarkPlugins:Array,rehypePlugins:Array,remarkRehypeOptions:Object,skipHtml:Boolean,disallowedElements:Array,async:Boolean},{remarkPlugins:()=>[],rehypePlugins:()=>[],remarkRehypeOptions:()=>({allowDangerousHtml:!0}),skipHtml:!1,disallowedElements:()=>[],async:!1}),setup(t){const{content:e,vNodes:r}=lnr({remarkPlugins:t.remarkPlugins,rehypePlugins:t.rehypePlugins,remarkRehypeOptions:t.remarkRehypeOptions,skipHtml:t.skipHtml,disallowedElements:t.disallowedElements,async:t.async});return I.watchEffect(()=>{e.value=t.markdown}),(n,i)=>(I.openBlock(),I.createBlock(I.resolveDynamicComponent(I.unref(r))))}}),unr={},cnr={class:"code-header"},dnr={class:"code-title"},hnr={class:"code-actions"};function fnr(t,e){return I.openBlock(),I.createElementBlock("div",cnr,[I.createElementVNode("div",dnr,[I.renderSlot(t.$slots,"title",{},void 0,!0)]),I.createElementVNode("div",hnr,[I.renderSlot(t.$slots,"actions",{},void 0,!0)])])}const Dte=oa(unr,[["render",fnr],["__scopeId","data-v-5fb63e49"]]),pnr={class:"code-num"},gnr=["innerHTML"],mnr=oa({__name:"CodeParser",props:{code:{type:String,required:!0},lang:{type:String,default:"js"}},setup(t){hx.registerLanguage("vue",()=>({subLanguage:"xml"}));const e=I.ref(""),r=I.ref([]);I.watchEffect(()=>{var a;t.code&&(e.value=((a=hx.getLanguage(t.lang))==null?void 0:a.name)??"plaintext",r.value=hx.highlightAuto(t.code).value.split(/\n(?!$)/g))});const n=async()=>{try{await dI(t.code),ma.success("\u590D\u5236\u6210\u529F!")}catch(a){ma.error(a)}},i=()=>{try{const a=new Blob([t.code],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(a),s=document.createElement("a");s.href=o;const l=new Date,u=h=>h.toString().padStart(2,"0"),d=`${l.getFullYear()}${u(l.getMonth()+1)}${u(l.getDate())}`;s.download=`${e.value}-${d}.${t.lang||"txt"}`,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(o),ma.success("\u4E0B\u8F7D\u6210\u529F!")}catch(a){ma.error(a)}};return(a,o)=>{const s=Jc,l=k6;return I.openBlock(),I.createElementBlock("pre",null,[o[21]||(o[21]=I.createTextVNode(" ")),I.createVNode(Dte,null,{title:I.withCtx(()=>[o[0]||(o[0]=I.createTextVNode(`
|
|
871
871
|
`)),I.createElementVNode("span",null,I.toDisplayString(t.lang||"plaintext"),1),o[1]||(o[1]=I.createTextVNode(`
|
|
872
872
|
`))]),actions:I.withCtx(()=>[o[10]||(o[10]=I.createTextVNode(`
|
|
873
873
|
`)),I.createVNode(l,null,{title:I.withCtx(()=>o[2]||(o[2]=[I.createTextVNode("\u590D\u5236")])),default:I.withCtx(()=>[o[3]||(o[3]=I.createTextVNode(`
|
|
@@ -885,8 +885,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
885
885
|
`)),I.createElementVNode("span",{class:"code-line",innerHTML:u},null,8,gnr),o[18]||(o[18]=I.createTextVNode(`
|
|
886
886
|
`))]))),128)),o[20]||(o[20]=I.createTextVNode(`
|
|
887
887
|
`))],2),o[23]||(o[23]=I.createTextVNode(`
|
|
888
|
-
`))])}}},[["__scopeId","data-v-a3bc51b3"]]);function Nte(t){return I.getCurrentScope()?(I.onScopeDispose(t),!0):!1}const Tnr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vnr=t=>t!=null,ynr=Object.prototype.toString,_nr=t=>ynr.call(t)==="[object Object]",w9=()=>{};function Ite(t,e){function r(...n){return new Promise((i,a)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(i).catch(a)})}return r}const bnr=t=>t();function hPe(t,e={}){let r,n,i=w9;const a=l=>{clearTimeout(l),i(),i=w9};let o;return l=>{const u=I.toValue(t),d=I.toValue(e.maxWait);return r&&a(r),u<=0||d!==void 0&&d<=0?(n&&(a(n),n=null),Promise.resolve(l())):new Promise((h,f)=>{i=e.rejectOnCancel?f:h,o=l,d&&!n&&(n=setTimeout(()=>{r&&a(r),n=null,h(o())},d)),r=setTimeout(()=>{n&&a(n),n=null,h(l())},u)})}}function Qnr(...t){let e=0,r,n=!0,i=w9,a,o,s,l,u;!I.isRef(t[0])&&typeof t[0]=="object"?{delay:o,trailing:s=!0,leading:l=!0,rejectOnCancel:u=!1}=t[0]:[o,s=!0,l=!0,u=!1]=t;const d=()=>{r&&(clearTimeout(r),r=void 0,i(),i=w9)};return f=>{const p=I.toValue(o),g=Date.now()-e,m=()=>a=f();return d(),p<=0?(e=Date.now(),m()):(g>p&&(l||!n)?(e=Date.now(),m()):s&&(a=new Promise((v,T)=>{i=u?T:v,r=setTimeout(()=>{e=Date.now(),n=!0,v(m()),d()},Math.max(0,p-g))})),!l&&!r&&(r=setTimeout(()=>n=!0,p)),n=!1,a)}}function $I(t){return Array.isArray(t)?t:[t]}function xnr(t){return I.getCurrentInstance()}function Enr(t,e=200,r={}){return Ite(hPe(e,r),t)}function Snr(t,e=200,r=!1,n=!0,i=!1){return Ite(Qnr(e,r,n,i),t)}function Cnr(t,e,r={}){const{eventFilter:n=bnr,...i}=r;return I.watch(t,Ite(n,e),i)}function Lnr(t,e=!0,r){xnr()?I.onMounted(t,r):e?t():I.nextTick(t)}function fPe(t,e,r={}){const{debounce:n=0,maxWait:i=void 0,...a}=r;return Cnr(t,e,{...a,eventFilter:hPe(n,{maxWait:i})})}function wnr(t,e,r){return I.watch(t,e,{...r,immediate:!0})}const UI=Tnr?window:void 0;function A9(t){var e;const r=I.toValue(t);return(e=r==null?void 0:r.$el)!=null?e:r}function pPe(...t){const e=[],r=()=>{e.forEach(s=>s()),e.length=0},n=(s,l,u,d)=>(s.addEventListener(l,u,d),()=>s.removeEventListener(l,u,d)),i=I.computed(()=>{const s=$I(I.toValue(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),a=wnr(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(u=>A9(u)))!=null?l:[UI].filter(u=>u!=null),$I(I.toValue(i.value?t[1]:t[0])),$I(I.unref(i.value?t[2]:t[1])),I.toValue(i.value?t[3]:t[2])]},([s,l,u,d])=>{if(r(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const h=_nr(d)?{...d}:d;e.push(...s.flatMap(f=>l.flatMap(p=>u.map(g=>n(f,p,g,h)))))},{flush:"post"}),o=()=>{a(),r()};return Nte(r),o}function Anr(){const t=I.shallowRef(!1),e=I.getCurrentInstance();return e&&I.onMounted(()=>{t.value=!0},e),t}function gPe(t){const e=Anr();return I.computed(()=>(e.value,!!t()))}function Onr(t,e,r={}){const{window:n=UI,...i}=r;let a;const o=gPe(()=>n&&"MutationObserver"in n),s=()=>{a&&(a.disconnect(),a=void 0)},l=I.computed(()=>{const f=I.toValue(t),p=$I(f).map(A9).filter(vnr);return new Set(p)}),u=I.watch(()=>l.value,f=>{s(),o.value&&f.size&&(a=new MutationObserver(e),f.forEach(p=>a.observe(p,i)))},{immediate:!0,flush:"post"}),d=()=>a==null?void 0:a.takeRecords(),h=()=>{u(),s()};return Nte(h),{isSupported:o,stop:h,takeRecords:d}}function mPe(t,e,r={}){const{window:n=UI,...i}=r;let a;const o=gPe(()=>n&&"ResizeObserver"in n),s=()=>{a&&(a.disconnect(),a=void 0)},l=I.computed(()=>{const h=I.toValue(t);return Array.isArray(h)?h.map(f=>A9(f)):[A9(h)]}),u=I.watch(l,h=>{if(s(),o.value&&n){a=new ResizeObserver(e);for(const f of h)f&&a.observe(f,i)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return Nte(d),{isSupported:o,stop:d}}const TPe=1;function Mnr(t,e={}){const{throttle:r=0,idle:n=200,onStop:i=w9,onScroll:a=w9,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:l="auto",window:u=UI,onError:d=E=>{console.error(E)}}=e,h=I.shallowRef(0),f=I.shallowRef(0),p=I.computed({get(){return h.value},set(E){m(E,void 0)}}),g=I.computed({get(){return f.value},set(E){m(void 0,E)}});function m(E,S){var C,L,w,O;if(!u)return;const R=I.toValue(t);if(!R)return;(w=R instanceof Document?u.document.body:R)==null||w.scrollTo({top:(C=I.toValue(S))!=null?C:g.value,left:(L=I.toValue(E))!=null?L:p.value,behavior:I.toValue(l)});const M=((O=R==null?void 0:R.document)==null?void 0:O.documentElement)||(R==null?void 0:R.documentElement)||R;p!=null&&(h.value=M.scrollLeft),g!=null&&(f.value=M.scrollTop)}const v=I.shallowRef(!1),T=I.reactive({left:!0,right:!1,top:!0,bottom:!1}),y=I.reactive({left:!1,right:!1,top:!1,bottom:!1}),_=E=>{v.value&&(v.value=!1,y.left=!1,y.right=!1,y.top=!1,y.bottom=!1,i(E))},Q=Enr(_,r+n),b=E=>{var S;if(!u)return;const C=((S=E==null?void 0:E.document)==null?void 0:S.documentElement)||(E==null?void 0:E.documentElement)||A9(E),{display:L,flexDirection:w,direction:O}=getComputedStyle(C),R=O==="rtl"?-1:1,M=C.scrollLeft;y.left=M<h.value,y.right=M>h.value;const D=Math.abs(M*R)<=(o.left||0),P=Math.abs(M*R)+C.clientWidth>=C.scrollWidth-(o.right||0)-TPe;L==="flex"&&w==="row-reverse"?(T.left=P,T.right=D):(T.left=D,T.right=P),h.value=M;let B=C.scrollTop;E===u.document&&!B&&(B=u.document.body.scrollTop),y.top=B<f.value,y.bottom=B>f.value;const k=Math.abs(B)<=(o.top||0),V=Math.abs(B)+C.clientHeight>=C.scrollHeight-(o.bottom||0)-TPe;L==="flex"&&w==="column-reverse"?(T.top=V,T.bottom=k):(T.top=k,T.bottom=V),f.value=B},x=E=>{var S;if(!u)return;const C=(S=E.target.documentElement)!=null?S:E.target;b(C),v.value=!0,Q(E),a(E)};return pPe(t,"scroll",r?Snr(x,r,!0,!1):x,s),Lnr(()=>{try{const E=I.toValue(t);if(!E)return;b(E)}catch(E){d(E)}}),pPe(t,"scrollend",_,s),{x:p,y:g,isScrolling:v,arrivedState:T,directions:y,measure(){const E=I.toValue(t);u&&E&&b(E)}}}const Rnr={class:"mermaid-wrapper"},Dnr={class:"mermaid-body"},Nnr=["innerHTML"],Inr={key:1,style:{margin:"32px 0"}},knr=oa({__name:"MermaidParser",props:{code:{type:String,required:!0}},setup(t){const e=t,r=Dh.PRESENTED_IMAGE_SIMPLE,n=[{value:1,label:"\u56FE\u8868"},{value:2,label:"\u6E90\u7801"}],i=I.ref(n[0].value),a=I.ref("");I.onMounted(()=>{bE.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"arial"})});const o=I.computed(()=>!a.value);fPe(()=>e.code,async x=>{if(x){try{await bE.parse(x)}catch{return}try{const{svg:E}=await bE.render(`mermaid-${Date.now()}`,x);a.value=E}catch{a.value=""}}},{immediate:!0,debounce:50,maxWait:100});const s=async()=>{try{await dI(e.code),ma.success("\u590D\u5236\u6210\u529F!")}catch(x){ma.error(x)}};function l({key:x}){x==="1"?u():x==="2"?d():x==="3"&&h()}function u(){if(!a.value){ma.error("\u6682\u65E0\u53EF\u4E0B\u8F7D\u7684SVG");return}const x=a.value,E=new Blob([x],{type:"image/svg+xml"}),S=URL.createObjectURL(E),C=document.createElement("a");C.href=S;const L=new Date,w=R=>R.toString().padStart(2,"0"),O=`${L.getFullYear()}${w(L.getMonth()+1)}${w(L.getDate())}`;C.download=`${O}-mermaid.svg`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(S),ma.success("\u4E0B\u8F7D\u6210\u529F!")}function d(){if(!a.value){ma.error("\u6682\u65E0\u53EF\u4E0B\u8F7D\u7684PNG");return}let x=a.value;x.includes('xmlns="http://www.w3.org/2000/svg"')||(x=x.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let E=800,S=600;const C=x.match(/viewBox="([\d.\s]+)"/);if(C){const D=C[1].split(" ");D.length===4&&(E=parseFloat(D[2]),S=parseFloat(D[3]))}else{const D=x.match(/width="([\d.]+)(px)?"/),P=x.match(/height="([\d.]+)(px)?"/);D&&(E=parseFloat(D[1])),P&&(S=parseFloat(P[1]))}const L=2,w=E*L,O=S*L,R=window.btoa(unescape(encodeURIComponent(x))),M=new Image;M.onload=function(){const D=document.createElement("canvas");D.width=w,D.height=O;const P=D.getContext("2d");P.fillStyle="#fff",P.fillRect(0,0,w,O),P.drawImage(M,0,0,w,O),D.toBlob(function(B){if(!B){ma.error("PNG\u751F\u6210\u5931\u8D25\uFF0Ccanvas\u5185\u5BB9\u4E3A\u7A7A");return}const k=document.createElement("a");k.href=URL.createObjectURL(B);const V=new Date,H=G=>G.toString().padStart(2,"0"),$=`${V.getFullYear()}${H(V.getMonth()+1)}${H(V.getDate())}`;k.download=`${$}-mermaid.png`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(k.href),ma.success("PNG\u5DF2\u4E0B\u8F7D")},"image/png")},M.onerror=function(){ma.error("PNG\u751F\u6210\u5931\u8D25")},M.src=`data:image/svg+xml;base64,${R}`}function h(){if(!e.code){ma.error("\u6682\u65E0\u53EF\u4E0B\u8F7D\u7684\u6E90\u7801");return}const x=new Blob([e.code],{type:"text/plain"}),E=URL.createObjectURL(x),S=document.createElement("a");S.href=E;const C=new Date,L=O=>O.toString().padStart(2,"0"),w=`${C.getFullYear()}${L(C.getMonth()+1)}${L(C.getDate())}`;S.download=`${w}-mermaid.txt`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(E),ma.success("\u6E90\u7801\u5DF2\u4E0B\u8F7D")}const f=I.ref(1),p=I.ref({x:0,y:0}),g=I.ref(!1),m=I.ref({x:0,y:0}),v=I.computed(()=>({transform:`translate(${p.value.x}px, ${p.value.y}px) scale(${f.value})`,"transform-origin":"center top",cursor:g.value?"grabbing":"grab",userSelect:g.value?"none":"auto"}));function T(){f.value<3&&(f.value+=.1)}function y(){f.value>.2&&(f.value-=.1)}function _(x){g.value=!0,m.value={x:x.clientX,y:x.clientY},document.addEventListener("mousemove",Q),document.addEventListener("mouseup",b)}function Q(x){if(!g.value)return;const E=x.clientX-m.value.x,S=x.clientY-m.value.y;p.value.x+=E,p.value.y+=S,m.value={x:x.clientX,y:x.clientY}}function b(){g.value=!1,document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",b)}return(x,E)=>{const S=Z7e,C=Jc,L=k6,w=LR,O=oQt,R=xv,M=B6,D=Fh,P=Dh;return I.openBlock(),I.createElementBlock("div",Rnr,[I.createVNode(Dte,null,{title:I.withCtx(()=>[I.createVNode(S,{value:i.value,"onUpdate:value":E[0]||(E[0]=B=>i.value=B),options:n},null,8,["value"])]),actions:I.withCtx(()=>[i.value===1?(I.openBlock(),I.createBlock(w,{key:0},{default:I.withCtx(()=>[I.createVNode(L,null,{title:I.withCtx(()=>E[1]||(E[1]=[I.createTextVNode("\u7F29\u5C0F")])),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small",disabled:f.value<=.2||o.value,onClick:y},{default:I.withCtx(()=>[I.createVNode(I.unref(WR))]),_:1},8,["disabled"])]),_:1}),I.createVNode(L,null,{title:I.withCtx(()=>E[2]||(E[2]=[I.createTextVNode("\u653E\u5927")])),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small",disabled:f.value>=3||o.value,onClick:T},{default:I.withCtx(()=>[I.createVNode(I.unref(qR))]),_:1},8,["disabled"])]),_:1})]),_:1})):I.createCommentVNode("",!0),i.value===1?(I.openBlock(),I.createBlock(O,{key:1,type:"vertical"})):I.createCommentVNode("",!0),I.createVNode(L,null,{title:I.withCtx(()=>E[3]||(E[3]=[I.createTextVNode("\u590D\u5236")])),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small",onClick:s},{default:I.withCtx(()=>[I.createVNode(I.unref(ox))]),_:1})]),_:1}),I.createVNode(D,{disabled:o.value},{overlay:I.withCtx(()=>[I.createVNode(M,{onClick:l},{default:I.withCtx(()=>[I.createVNode(R,{key:"1"},{default:I.withCtx(()=>E[4]||(E[4]=[I.createTextVNode(" \u4E0B\u8F7DSVG ")])),_:1,__:[4]}),I.createVNode(R,{key:"2"},{default:I.withCtx(()=>E[5]||(E[5]=[I.createTextVNode(" \u4E0B\u8F7DPNG ")])),_:1,__:[5]}),I.createVNode(R,{key:"3"},{default:I.withCtx(()=>E[6]||(E[6]=[I.createTextVNode(" \u4E0B\u8F7D\u6E90\u7801 ")])),_:1,__:[6]})]),_:1})]),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small"},{default:I.withCtx(()=>[I.createVNode(I.unref(jR))]),_:1})]),_:1},8,["disabled"])]),_:1}),I.createElementVNode("div",Dnr,[i.value===1?(I.openBlock(),I.createElementBlock(I.Fragment,{key:0},[a.value?(I.openBlock(),I.createElementBlock("div",{key:0,innerHTML:a.value,class:"mermaid-content",style:I.normalizeStyle(v.value),onMousedown:_},null,44,Nnr)):(I.openBlock(),I.createBlock(P,{key:1,description:"\u6E32\u67D3\u5931\u8D25",image:I.unref(r)},null,8,["image"]))],64)):(I.openBlock(),I.createElementBlock("pre",Inr,[E[7]||(E[7]=I.createTextVNode(" ")),I.createElementVNode("code",null,I.toDisplayString(t.code),1),E[8]||(E[8]=I.createTextVNode(`
|
|
889
|
-
`))]))])])}}},[["__scopeId","data-v-
|
|
888
|
+
`))])}}},[["__scopeId","data-v-d36bf829"]]);function Nte(t){return I.getCurrentScope()?(I.onScopeDispose(t),!0):!1}const Tnr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vnr=t=>t!=null,ynr=Object.prototype.toString,_nr=t=>ynr.call(t)==="[object Object]",w9=()=>{};function Ite(t,e){function r(...n){return new Promise((i,a)=>{Promise.resolve(t(()=>e.apply(this,n),{fn:e,thisArg:this,args:n})).then(i).catch(a)})}return r}const bnr=t=>t();function hPe(t,e={}){let r,n,i=w9;const a=l=>{clearTimeout(l),i(),i=w9};let o;return l=>{const u=I.toValue(t),d=I.toValue(e.maxWait);return r&&a(r),u<=0||d!==void 0&&d<=0?(n&&(a(n),n=null),Promise.resolve(l())):new Promise((h,f)=>{i=e.rejectOnCancel?f:h,o=l,d&&!n&&(n=setTimeout(()=>{r&&a(r),n=null,h(o())},d)),r=setTimeout(()=>{n&&a(n),n=null,h(l())},u)})}}function Qnr(...t){let e=0,r,n=!0,i=w9,a,o,s,l,u;!I.isRef(t[0])&&typeof t[0]=="object"?{delay:o,trailing:s=!0,leading:l=!0,rejectOnCancel:u=!1}=t[0]:[o,s=!0,l=!0,u=!1]=t;const d=()=>{r&&(clearTimeout(r),r=void 0,i(),i=w9)};return f=>{const p=I.toValue(o),g=Date.now()-e,m=()=>a=f();return d(),p<=0?(e=Date.now(),m()):(g>p&&(l||!n)?(e=Date.now(),m()):s&&(a=new Promise((v,T)=>{i=u?T:v,r=setTimeout(()=>{e=Date.now(),n=!0,v(m()),d()},Math.max(0,p-g))})),!l&&!r&&(r=setTimeout(()=>n=!0,p)),n=!1,a)}}function $I(t){return Array.isArray(t)?t:[t]}function xnr(t){return I.getCurrentInstance()}function Enr(t,e=200,r={}){return Ite(hPe(e,r),t)}function Snr(t,e=200,r=!1,n=!0,i=!1){return Ite(Qnr(e,r,n,i),t)}function Cnr(t,e,r={}){const{eventFilter:n=bnr,...i}=r;return I.watch(t,Ite(n,e),i)}function Lnr(t,e=!0,r){xnr()?I.onMounted(t,r):e?t():I.nextTick(t)}function fPe(t,e,r={}){const{debounce:n=0,maxWait:i=void 0,...a}=r;return Cnr(t,e,{...a,eventFilter:hPe(n,{maxWait:i})})}function wnr(t,e,r){return I.watch(t,e,{...r,immediate:!0})}const UI=Tnr?window:void 0;function A9(t){var e;const r=I.toValue(t);return(e=r==null?void 0:r.$el)!=null?e:r}function pPe(...t){const e=[],r=()=>{e.forEach(s=>s()),e.length=0},n=(s,l,u,d)=>(s.addEventListener(l,u,d),()=>s.removeEventListener(l,u,d)),i=I.computed(()=>{const s=$I(I.toValue(t[0])).filter(l=>l!=null);return s.every(l=>typeof l!="string")?s:void 0}),a=wnr(()=>{var s,l;return[(l=(s=i.value)==null?void 0:s.map(u=>A9(u)))!=null?l:[UI].filter(u=>u!=null),$I(I.toValue(i.value?t[1]:t[0])),$I(I.unref(i.value?t[2]:t[1])),I.toValue(i.value?t[3]:t[2])]},([s,l,u,d])=>{if(r(),!(s!=null&&s.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const h=_nr(d)?{...d}:d;e.push(...s.flatMap(f=>l.flatMap(p=>u.map(g=>n(f,p,g,h)))))},{flush:"post"}),o=()=>{a(),r()};return Nte(r),o}function Anr(){const t=I.shallowRef(!1),e=I.getCurrentInstance();return e&&I.onMounted(()=>{t.value=!0},e),t}function gPe(t){const e=Anr();return I.computed(()=>(e.value,!!t()))}function Onr(t,e,r={}){const{window:n=UI,...i}=r;let a;const o=gPe(()=>n&&"MutationObserver"in n),s=()=>{a&&(a.disconnect(),a=void 0)},l=I.computed(()=>{const f=I.toValue(t),p=$I(f).map(A9).filter(vnr);return new Set(p)}),u=I.watch(()=>l.value,f=>{s(),o.value&&f.size&&(a=new MutationObserver(e),f.forEach(p=>a.observe(p,i)))},{immediate:!0,flush:"post"}),d=()=>a==null?void 0:a.takeRecords(),h=()=>{u(),s()};return Nte(h),{isSupported:o,stop:h,takeRecords:d}}function mPe(t,e,r={}){const{window:n=UI,...i}=r;let a;const o=gPe(()=>n&&"ResizeObserver"in n),s=()=>{a&&(a.disconnect(),a=void 0)},l=I.computed(()=>{const h=I.toValue(t);return Array.isArray(h)?h.map(f=>A9(f)):[A9(h)]}),u=I.watch(l,h=>{if(s(),o.value&&n){a=new ResizeObserver(e);for(const f of h)f&&a.observe(f,i)}},{immediate:!0,flush:"post"}),d=()=>{s(),u()};return Nte(d),{isSupported:o,stop:d}}const TPe=1;function Mnr(t,e={}){const{throttle:r=0,idle:n=200,onStop:i=w9,onScroll:a=w9,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:l="auto",window:u=UI,onError:d=E=>{console.error(E)}}=e,h=I.shallowRef(0),f=I.shallowRef(0),p=I.computed({get(){return h.value},set(E){m(E,void 0)}}),g=I.computed({get(){return f.value},set(E){m(void 0,E)}});function m(E,S){var C,L,w,O;if(!u)return;const R=I.toValue(t);if(!R)return;(w=R instanceof Document?u.document.body:R)==null||w.scrollTo({top:(C=I.toValue(S))!=null?C:g.value,left:(L=I.toValue(E))!=null?L:p.value,behavior:I.toValue(l)});const M=((O=R==null?void 0:R.document)==null?void 0:O.documentElement)||(R==null?void 0:R.documentElement)||R;p!=null&&(h.value=M.scrollLeft),g!=null&&(f.value=M.scrollTop)}const v=I.shallowRef(!1),T=I.reactive({left:!0,right:!1,top:!0,bottom:!1}),y=I.reactive({left:!1,right:!1,top:!1,bottom:!1}),_=E=>{v.value&&(v.value=!1,y.left=!1,y.right=!1,y.top=!1,y.bottom=!1,i(E))},Q=Enr(_,r+n),b=E=>{var S;if(!u)return;const C=((S=E==null?void 0:E.document)==null?void 0:S.documentElement)||(E==null?void 0:E.documentElement)||A9(E),{display:L,flexDirection:w,direction:O}=getComputedStyle(C),R=O==="rtl"?-1:1,M=C.scrollLeft;y.left=M<h.value,y.right=M>h.value;const D=Math.abs(M*R)<=(o.left||0),P=Math.abs(M*R)+C.clientWidth>=C.scrollWidth-(o.right||0)-TPe;L==="flex"&&w==="row-reverse"?(T.left=P,T.right=D):(T.left=D,T.right=P),h.value=M;let B=C.scrollTop;E===u.document&&!B&&(B=u.document.body.scrollTop),y.top=B<f.value,y.bottom=B>f.value;const k=Math.abs(B)<=(o.top||0),V=Math.abs(B)+C.clientHeight>=C.scrollHeight-(o.bottom||0)-TPe;L==="flex"&&w==="column-reverse"?(T.top=V,T.bottom=k):(T.top=k,T.bottom=V),f.value=B},x=E=>{var S;if(!u)return;const C=(S=E.target.documentElement)!=null?S:E.target;b(C),v.value=!0,Q(E),a(E)};return pPe(t,"scroll",r?Snr(x,r,!0,!1):x,s),Lnr(()=>{try{const E=I.toValue(t);if(!E)return;b(E)}catch(E){d(E)}}),pPe(t,"scrollend",_,s),{x:p,y:g,isScrolling:v,arrivedState:T,directions:y,measure(){const E=I.toValue(t);u&&E&&b(E)}}}const Rnr={class:"mermaid-wrapper"},Dnr={class:"mermaid-body"},Nnr=["innerHTML"],Inr={key:1,style:{margin:"32px 0"}},knr=oa({__name:"MermaidParser",props:{code:{type:String,required:!0}},setup(t){const e=t,r=Dh.PRESENTED_IMAGE_SIMPLE,n=[{value:1,label:"\u56FE\u8868"},{value:2,label:"\u6E90\u7801"}],i=I.ref(n[0].value),a=I.ref("");I.onMounted(()=>{bE.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose",fontFamily:"arial"})});const o=I.computed(()=>!a.value);fPe(()=>e.code,async x=>{if(x){try{await bE.parse(x)}catch{return}try{const{svg:E}=await bE.render(`mermaid-${Date.now()}`,x);a.value=E}catch{a.value=""}}},{immediate:!0,debounce:50,maxWait:100});const s=async()=>{try{await dI(e.code),ma.success("\u590D\u5236\u6210\u529F!")}catch(x){ma.error(x)}};function l({key:x}){x==="1"?u():x==="2"?d():x==="3"&&h()}function u(){if(!a.value){ma.error("\u6682\u65E0\u53EF\u4E0B\u8F7D\u7684SVG");return}const x=a.value,E=new Blob([x],{type:"image/svg+xml"}),S=URL.createObjectURL(E),C=document.createElement("a");C.href=S;const L=new Date,w=R=>R.toString().padStart(2,"0"),O=`${L.getFullYear()}${w(L.getMonth()+1)}${w(L.getDate())}`;C.download=`${O}-mermaid.svg`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(S),ma.success("\u4E0B\u8F7D\u6210\u529F!")}function d(){if(!a.value){ma.error("\u6682\u65E0\u53EF\u4E0B\u8F7D\u7684PNG");return}let x=a.value;x.includes('xmlns="http://www.w3.org/2000/svg"')||(x=x.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let E=800,S=600;const C=x.match(/viewBox="([\d.\s]+)"/);if(C){const D=C[1].split(" ");D.length===4&&(E=parseFloat(D[2]),S=parseFloat(D[3]))}else{const D=x.match(/width="([\d.]+)(px)?"/),P=x.match(/height="([\d.]+)(px)?"/);D&&(E=parseFloat(D[1])),P&&(S=parseFloat(P[1]))}const L=2,w=E*L,O=S*L,R=window.btoa(unescape(encodeURIComponent(x))),M=new Image;M.onload=function(){const D=document.createElement("canvas");D.width=w,D.height=O;const P=D.getContext("2d");P.fillStyle="#fff",P.fillRect(0,0,w,O),P.drawImage(M,0,0,w,O),D.toBlob(function(B){if(!B){ma.error("PNG\u751F\u6210\u5931\u8D25\uFF0Ccanvas\u5185\u5BB9\u4E3A\u7A7A");return}const k=document.createElement("a");k.href=URL.createObjectURL(B);const V=new Date,H=G=>G.toString().padStart(2,"0"),$=`${V.getFullYear()}${H(V.getMonth()+1)}${H(V.getDate())}`;k.download=`${$}-mermaid.png`,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(k.href),ma.success("PNG\u5DF2\u4E0B\u8F7D")},"image/png")},M.onerror=function(){ma.error("PNG\u751F\u6210\u5931\u8D25")},M.src=`data:image/svg+xml;base64,${R}`}function h(){if(!e.code){ma.error("\u6682\u65E0\u53EF\u4E0B\u8F7D\u7684\u6E90\u7801");return}const x=new Blob([e.code],{type:"text/plain"}),E=URL.createObjectURL(x),S=document.createElement("a");S.href=E;const C=new Date,L=O=>O.toString().padStart(2,"0"),w=`${C.getFullYear()}${L(C.getMonth()+1)}${L(C.getDate())}`;S.download=`${w}-mermaid.txt`,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(E),ma.success("\u6E90\u7801\u5DF2\u4E0B\u8F7D")}const f=I.ref(1),p=I.ref({x:0,y:0}),g=I.ref(!1),m=I.ref({x:0,y:0}),v=I.computed(()=>({transform:`translate(${p.value.x}px, ${p.value.y}px) scale(${f.value})`,"transform-origin":"center top",cursor:g.value?"grabbing":"grab",userSelect:g.value?"none":"auto"}));function T(){f.value<3&&(f.value+=.1)}function y(){f.value>.2&&(f.value-=.1)}function _(x){g.value=!0,m.value={x:x.clientX,y:x.clientY},document.addEventListener("mousemove",Q),document.addEventListener("mouseup",b)}function Q(x){if(!g.value)return;const E=x.clientX-m.value.x,S=x.clientY-m.value.y;p.value.x+=E,p.value.y+=S,m.value={x:x.clientX,y:x.clientY}}function b(){g.value=!1,document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",b)}return(x,E)=>{const S=Z7e,C=Jc,L=k6,w=LR,O=oQt,R=xv,M=B6,D=Fh,P=Dh;return I.openBlock(),I.createElementBlock("div",Rnr,[I.createVNode(Dte,null,{title:I.withCtx(()=>[I.createVNode(S,{value:i.value,"onUpdate:value":E[0]||(E[0]=B=>i.value=B),options:n},null,8,["value"])]),actions:I.withCtx(()=>[i.value===1?(I.openBlock(),I.createBlock(w,{key:0},{default:I.withCtx(()=>[I.createVNode(L,null,{title:I.withCtx(()=>E[1]||(E[1]=[I.createTextVNode("\u7F29\u5C0F")])),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small",disabled:f.value<=.2||o.value,onClick:y},{default:I.withCtx(()=>[I.createVNode(I.unref(WR))]),_:1},8,["disabled"])]),_:1}),I.createVNode(L,null,{title:I.withCtx(()=>E[2]||(E[2]=[I.createTextVNode("\u653E\u5927")])),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small",disabled:f.value>=3||o.value,onClick:T},{default:I.withCtx(()=>[I.createVNode(I.unref(qR))]),_:1},8,["disabled"])]),_:1})]),_:1})):I.createCommentVNode("",!0),i.value===1?(I.openBlock(),I.createBlock(O,{key:1,type:"vertical"})):I.createCommentVNode("",!0),I.createVNode(L,null,{title:I.withCtx(()=>E[3]||(E[3]=[I.createTextVNode("\u590D\u5236")])),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small",onClick:s},{default:I.withCtx(()=>[I.createVNode(I.unref(ox))]),_:1})]),_:1}),I.createVNode(D,{disabled:o.value},{overlay:I.withCtx(()=>[I.createVNode(M,{onClick:l},{default:I.withCtx(()=>[I.createVNode(R,{key:"1"},{default:I.withCtx(()=>E[4]||(E[4]=[I.createTextVNode(" \u4E0B\u8F7DSVG ")])),_:1,__:[4]}),I.createVNode(R,{key:"2"},{default:I.withCtx(()=>E[5]||(E[5]=[I.createTextVNode(" \u4E0B\u8F7DPNG ")])),_:1,__:[5]}),I.createVNode(R,{key:"3"},{default:I.withCtx(()=>E[6]||(E[6]=[I.createTextVNode(" \u4E0B\u8F7D\u6E90\u7801 ")])),_:1,__:[6]})]),_:1})]),default:I.withCtx(()=>[I.createVNode(C,{type:"text",size:"small"},{default:I.withCtx(()=>[I.createVNode(I.unref(jR))]),_:1})]),_:1},8,["disabled"])]),_:1}),I.createElementVNode("div",Dnr,[i.value===1?(I.openBlock(),I.createElementBlock(I.Fragment,{key:0},[a.value?(I.openBlock(),I.createElementBlock("div",{key:0,innerHTML:a.value,class:"mermaid-content",style:I.normalizeStyle(v.value),onMousedown:_},null,44,Nnr)):(I.openBlock(),I.createBlock(P,{key:1,description:"\u6E32\u67D3\u5931\u8D25",image:I.unref(r)},null,8,["image"]))],64)):(I.openBlock(),I.createElementBlock("pre",Inr,[E[7]||(E[7]=I.createTextVNode(" ")),I.createElementVNode("code",null,I.toDisplayString(t.code),1),E[8]||(E[8]=I.createTextVNode(`
|
|
889
|
+
`))]))])])}}},[["__scopeId","data-v-2c4e35d5"]]);/*! *****************************************************************************
|
|
890
890
|
Copyright (c) Microsoft Corporation.
|
|
891
891
|
|
|
892
892
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -961,12 +961,12 @@ echarts.use([`+O+"]);":"Unknown series "+w))}return}if(h==="tooltip"){if(_){proc
|
|
|
961
961
|
`)),ti(n));var y=p?OVe(p):null;p&&!y&&(process.env.NODE_ENV!=="production"&&(n=Bu("Invalid parser name "+p+`.
|
|
962
962
|
`,"Illegal config:",d,`.
|
|
963
963
|
`)),ti(n)),a.push({dimIdx:T.index,parser:y,comparator:new RVe(f,g)})});var o=e.sourceFormat;o!==Xs&&o!==z1&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),ti(n));for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(d,h){for(var f=0;f<a.length;f++){var p=a[f],g=e.retrieveValueFromItem(d,p.dimIdx),m=e.retrieveValueFromItem(h,p.dimIdx);p.parser&&(g=p.parser(g),m=p.parser(m));var v=p.comparator.evaluate(g,m);if(v!==0)return v}return 0}),{data:s}}};function CTr(t){t.registerTransform(ETr),t.registerTransform(STr)}var LTr=function(t){Ye(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new BVe(this),HVe(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),HVe(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ed},e}(yn),wTr=function(t){Ye(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(ia);function ATr(t){t.registerComponentModel(LTr),t.registerComponentView(wTr)}var ih=$3.CMD;function Xy(t,e){return Math.abs(t-e)<1e-5}function Rle(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,l=0;function u(R,M){i&&i.length>2&&n.push(i),i=[R,M]}function d(R,M,D,P){Xy(R,D)&&Xy(M,P)||i.push(R,M,D,P,D,P)}function h(R,M,D,P,B,k){var V=Math.abs(M-R),H=Math.tan(V/4)*4/3,$=M<R?-1:1,G=Math.cos(R),U=Math.sin(R),Y=Math.cos(M),ne=Math.sin(M),te=G*B+D,ee=U*k+P,ie=Y*B+D,j=ne*k+P,X=B*H*$,Z=k*H*$;i.push(te-X*U,ee+Z*G,ie+X*ne,j-Z*Y,ie,j)}for(var f,p,g,m,v=0;v<r;){var T=e[v++],y=v===1;switch(y&&(a=e[v],o=e[v+1],s=a,l=o,(T===ih.L||T===ih.C||T===ih.Q)&&(i=[s,l])),T){case ih.M:a=s=e[v++],o=l=e[v++],u(s,l);break;case ih.L:f=e[v++],p=e[v++],d(a,o,f,p),a=f,o=p;break;case ih.C:i.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case ih.Q:f=e[v++],p=e[v++],g=e[v++],m=e[v++],i.push(a+2/3*(f-a),o+2/3*(p-o),g+2/3*(f-g),m+2/3*(p-m),g,m),a=g,o=m;break;case ih.A:var _=e[v++],Q=e[v++],b=e[v++],x=e[v++],E=e[v++],S=e[v++]+E;v+=1;var C=!e[v++];f=Math.cos(E)*b+_,p=Math.sin(E)*x+Q,y?(s=f,l=p,u(s,l)):d(a,o,f,p),a=Math.cos(S)*b+_,o=Math.sin(S)*x+Q;for(var L=(C?-1:1)*Math.PI/2,w=E;C?w>S:w<S;w+=L){var O=C?Math.max(w+L,S):Math.min(w+L,S);h(w,O,_,Q,b,x)}break;case ih.R:s=a=e[v++],l=o=e[v++],f=s+e[v++],p=l+e[v++],u(f,l),d(f,l,f,p),d(f,p,s,p),d(s,p,s,l),d(s,l,f,l);break;case ih.Z:i&&d(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function Dle(t,e,r,n,i,a,o,s,l,u){if(Xy(t,r)&&Xy(e,n)&&Xy(i,o)&&Xy(a,s)){l.push(o,s);return}var d=2/u,h=d*d,f=o-t,p=s-e,g=Math.sqrt(f*f+p*p);f/=g,p/=g;var m=r-t,v=n-e,T=i-o,y=a-s,_=m*m+v*v,Q=T*T+y*y;if(_<h&&Q<h){l.push(o,s);return}var b=f*m+p*v,x=-f*T-p*y,E=_-b*b,S=Q-x*x;if(E<h&&b>=0&&S<h&&x>=0){l.push(o,s);return}var C=[],L=[];v5(t,r,i,o,.5,C),v5(e,n,a,s,.5,L),Dle(C[0],L[0],C[1],L[1],C[2],L[2],C[3],L[3],l,u),Dle(C[4],L[4],C[5],L[5],C[6],L[6],C[7],L[7],l,u)}function OTr(t,e){var r=Rle(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var d=a[u++],h=a[u++],f=a[u++],p=a[u++],g=a[u++],m=a[u++];Dle(s,l,d,h,f,p,g,m,o,e),s=g,l=m}n.push(o)}return n}function GKe(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var d=o*s,h=r-d;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function qKe(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,d=l>Math.abs(u),h=GKe([l,u],d?0:1,e),f=(d?s:u)/h.length,p=0;p<h.length;p++)for(var g=(d?u:s)/h[p],m=0;m<h[p];m++){var v={};d?(v.startAngle=a+f*p,v.endAngle=a+f*(p+1),v.r0=n+g*m,v.r=n+g*(m+1)):(v.startAngle=a+g*m,v.endAngle=a+g*(m+1),v.r0=n+f*p,v.r=n+f*(p+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,r.push(v)}}function MTr(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=GKe([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",d=a?"y":"x",h=t[s]/o.length,f=0;f<o.length;f++)for(var p=t[l]/o[f],g=0;g<o[f];g++){var m={};m[u]=f*h,m[d]=g*p,m[s]=h,m[l]=p,m.x+=t.x,m.y+=t.y,r.push(m)}}function WKe(t,e,r,n){return t*n-r*e}function RTr(t,e,r,n,i,a,o,s){var l=r-t,u=n-e,d=o-i,h=s-a,f=WKe(d,h,l,u);if(Math.abs(f)<1e-6)return null;var p=t-i,g=e-a,m=WKe(p,g,d,h)/f;return m<0||m>1?null:new xr(m*l+t,m*u+e)}function DTr(t,e,r){var n=new xr;xr.sub(n,r,e),n.normalize();var i=new xr;xr.sub(i,t,e);var a=i.dot(n);return a}function Ky(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function NTr(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],l=RTr(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);l&&i.push({projPt:DTr(l,e,r),pt:l,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(v,T){return v.projPt-T.projPt});var u=i[0],d=i[i.length-1];if(d.idx<u.idx){var h=u;u=d,d=h}for(var f=[u.pt.x,u.pt.y],p=[d.pt.x,d.pt.y],g=[f],m=[p],a=u.idx+1;a<=d.idx;a++)Ky(g,t[a].slice());Ky(g,p),Ky(g,f);for(var a=d.idx+1;a<=u.idx+n;a++)Ky(m,t[a%n].slice());return Ky(m,f),Ky(m,p),[{points:g},{points:m}]}function YKe(t){var e=t.points,r=[],n=[];Pk(e,r,n);var i=new Cr(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new xr,d=new xr;return a>o?(u.x=d.x=s+a/2,u.y=l,d.y=l+o):(u.y=d.y=l+o/2,u.x=s,d.x=s+a),NTr(e,u,d)}function QH(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);QH(t,a[0],i,n),QH(t,a[1],r-i,n)}return n}function ITr(t,e){for(var r=[],n=0;n<e;n++)r.push(Lne(t));return r}function kTr(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function PTr(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function BTr(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":MTr(n,e,r),i=dn;break;case"sector":qKe(n,e,r),i=eu;break;case"circle":qKe({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=eu;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=bt(OTr(t.getUpdatedPathProxy(),o),function(T){return PTr(T)}),l=s.length;if(l===0)QH(YKe,{points:s[0]},e,r);else if(l===e)for(var u=0;u<l;u++)r.push({points:s[u]});else{var d=0,h=bt(s,function(T){var y=[],_=[];Pk(T,y,_);var Q=(_[1]-y[1])*(_[0]-y[0]);return d+=Q,{poly:T,area:Q}});h.sort(function(T,y){return y.area-T.area});for(var f=e,u=0;u<l;u++){var p=h[u];if(f<=0)break;var g=u===l-1?f:Math.ceil(p.area/d*e);g<0||(QH(YKe,{points:p.poly},g,r),f-=g)}}i=tu;break}if(!i)return ITr(t,e);for(var m=[],u=0;u<r.length;u++){var v=new i;v.setShape(r[u]),kTr(t,v),m.push(v)}return m}function HTr(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,d=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,p=2;p<s;){var g=o[p-2],m=o[p-1],v=o[p++],T=o[p++],y=o[p++],_=o[p++],Q=o[p++],b=o[p++];if(f<=0){h.push(v,T,y,_,Q,b);continue}for(var x=Math.min(f,d-1)+1,E=1;E<=x;E++){var S=E/x;v5(g,v,y,Q,S,i),v5(m,T,_,b,S,a),g=i[3],m=a[3],h.push(i[1],a[1],i[2],a[2],g,m),v=i[5],T=a[5],y=i[6],_=a[6]}f-=x-1}return o===t?[h,e]:[t,h]}function jKe(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function FTr(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var l=t[s],u=e[s],d=void 0,h=void 0;l?u?(r=HTr(l,u),d=r[0],h=r[1],n=d,i=h):(h=jKe(i||l,l),d=l):(d=jKe(n||u,u),h=u),a.push(d),o.push(h)}return[a,o]}function XKe(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],l=t[o+1],u=t[a],d=t[a+1],h=s*d-u*l;e+=h,r+=(s+u)*h,n+=(l+d)*h}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function VTr(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,l=s-2,u=0;u<i;u++){for(var d=u*6,h=0,f=0;f<s;f+=2){var p=f===0?d:(d+f-2)%l+2,g=t[p]-r[0],m=t[p+1]-r[1],v=e[f]-n[0],T=e[f+1]-n[1],y=v-g,_=T-m;h+=y*y+_*_}h<a&&(a=h,o=u)}return o}function $Tr(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function UTr(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],l=e[o],u=XKe(s),d=XKe(l);a==null&&(a=u[2]<0!=d[2]<0);var h=[],f=[],p=0,g=1/0,m=[],v=s.length;a&&(s=$Tr(s));for(var T=VTr(s,l,u,d)*6,y=v-2,_=0;_<y;_+=2){var Q=(T+_)%y+2;h[_+2]=s[Q]-u[0],h[_+3]=s[Q+1]-u[1]}h[0]=s[T]-u[0],h[1]=s[T+1]-u[1];for(var b=n/r,x=-n/2;x<=n/2;x+=b){for(var E=Math.sin(x),S=Math.cos(x),C=0,_=0;_<s.length;_+=2){var L=h[_],w=h[_+1],O=l[_]-d[0],R=l[_+1]-d[1],M=O*S-R*E,D=O*E+R*S;m[_]=M,m[_+1]=D;var P=M-L,B=D-w;C+=P*P+B*B}if(C<g){g=C,p=x;for(var k=0;k<m.length;k++)f[k]=m[k]}}i.push({from:h,to:f,fromCp:u,toCp:d,rotation:-p})}return i}function xH(t){return t.__isCombineMorphing}var KKe="__mOriginal_";function EH(t,e,r){var n=KKe+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function ww(t,e){var r=KKe+e;t[r]&&(t[e]=t[r],t[r]=null)}function ZKe(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function JKe(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=FTr(Rle(r),Rle(n)),a=i[0],o=i[1],s=t.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&ZKe(a,s),l&&ZKe(o,l),EH(e,"updateTransform",{replace:u}),e.transform=null;var d=UTr(a,o,10,Math.PI),h=[];EH(e,"buildPath",{replace:function(f){for(var p=e.__morphT,g=1-p,m=[],v=0;v<d.length;v++){var T=d[v],y=T.from,_=T.to,Q=T.rotation*p,b=T.fromCp,x=T.toCp,E=Math.sin(Q),S=Math.cos(Q);JI(m,b,x,p);for(var C=0;C<y.length;C+=2){var L=y[C],w=y[C+1],O=_[C],R=_[C+1],M=L*g+O*p,D=w*g+R*p;h[C]=M*S-D*E+m[0],h[C+1]=M*E+D*S+m[1]}var P=h[0],B=h[1];f.moveTo(P,B);for(var C=2;C<y.length;){var O=h[C++],R=h[C++],k=h[C++],V=h[C++],H=h[C++],$=h[C++];P===O&&B===R&&k===H&&V===$?f.lineTo(H,$):f.bezierCurveTo(O,R,k,V,H,$),P=H,B=$}}}})}function Nle(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;JKe(t,e),e.__morphT=0;function a(){ww(e,"buildPath"),ww(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Sr({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function zTr(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var d=0,h=0;(t&u)>0&&(d=1),(e&u)>0&&(h=1),s+=u*u*(3*d^h),h===0&&(d===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function SH(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=bt(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),d=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(d,e),r=Math.min(h,r),n=Math.max(d,n),i=Math.max(h,i),[d,h]}),o=bt(a,function(s,l){return{cp:s,z:zTr(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function eZe(t){return BTr(t.path,t.count)}function Ile(){return{fromIndividuals:[],toIndividuals:[],count:0}}function GTr(t,e,r){var n=[];function i(b){for(var x=0;x<b.length;x++){var E=b[x];xH(E)?i(E.childrenRef()):E instanceof vn&&n.push(E)}}i(t);var a=n.length;if(!a)return Ile();var o=r.dividePath||eZe,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),Ile();n=SH(n),s=SH(s);for(var l=r.done,u=r.during,d=r.individualDelay,h=new Q4,f=0;f<a;f++){var p=n[f],g=s[f];g.parent=e,g.copyTransform(h),d||JKe(p,g)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function m(b){for(var x=0;x<s.length;x++)s[x].addSelfToZr(b)}EH(e,"addSelfToZr",{after:function(b){m(b)}}),EH(e,"removeSelfFromZr",{after:function(b){for(var x=0;x<s.length;x++)s[x].removeSelfFromZr(b)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,ww(e,"addSelfToZr"),ww(e,"removeSelfFromZr")}var T=s.length;if(d)for(var y=T,_=function(){y--,y===0&&(v(),l&&l())},f=0;f<T;f++){var Q=d?Sr({delay:(r.delay||0)+d(f,T,n[f],s[f]),done:_},r):r;Nle(n[f],s[f],Q)}else e.__morphT=0,e.animateTo({__morphT:1},Sr({during:function(b){for(var x=0;x<T;x++){var E=s[x];E.__morphT=e.__morphT,E.dirtyShape()}u&&u(b)},done:function(){v();for(var b=0;b<t.length;b++)ww(t[b],"updateTransform");l&&l()}},r));return e.__zr&&m(e.__zr),{fromIndividuals:n,toIndividuals:s,count:T}}function qTr(t,e,r){var n=e.length,i=[],a=r.dividePath||eZe;function o(p){for(var g=0;g<p.length;g++){var m=p[g];xH(m)?o(m.childrenRef()):m instanceof vn&&i.push(m)}}if(xH(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(Lne(i[l++%s]));i.length=n}else{i=a({path:t,count:n});for(var d=t.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(d);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Ile()}i=SH(i),e=SH(e);for(var h=r.individualDelay,u=0;u<n;u++){var f=h?Sr({delay:(r.delay||0)+h(u,n,i[u],e[u])},r):r;Nle(i[u],e[u],f)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function tZe(t){return yt(t[0])}function rZe(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var WTr={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=Lne(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function kle(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=J9("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,d;tZe(t)&&(u=t,d=e),tZe(e)&&(u=e,d=t);function h(T,y,_,Q,b){var x=T.many,E=T.one;if(x.length===1&&!b){var S=y?x[0]:E,C=y?E:x[0];if(xH(S))h({many:[S],one:C},!0,_,Q,!0);else{var L=s?Sr({delay:s(_,Q)},l):l;Nle(S,C,L),a(S,C,S,C,L)}}else for(var w=Sr({dividePath:WTr[r],individualDelay:s&&function(B,k,V,H){return s(B+_,Q)}},l),O=y?GTr(x,E,w):qTr(E,x,w),R=O.fromIndividuals,M=O.toIndividuals,D=R.length,P=0;P<D;P++){var L=s?Sr({delay:s(P,D)},l):l;a(R[P],M[P],y?x[P]:T.one,y?T.one:x[P],L)}}for(var f=u?u===t:t.length>e.length,p=u?rZe(d,u):rZe(f?e:t,[f?t:e]),g=0,m=0;m<p.length;m++)g+=p[m].many.length;for(var v=0,m=0;m<p.length;m++)h(p[m],f,v,g),v+=p[m].many.length}function _8(t){if(!t)return[];if(yt(t)){for(var e=[],r=0;r<t.length;r++)e.push(_8(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof vn&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var nZe=1e4,YTr=0,iZe=1,aZe=2,jTr=fn();function XTr(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function KTr(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function oZe(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=XTr(t,i);if(a){var o=KTr(t,e,a);return o}var s=t.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||t.getId(e)}function sZe(t){var e=[];return ue(t,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>nZe){process.env.NODE_ENV!=="production"&&_a("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:oZe(n,o,i,!1),childGroupId:oZe(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function Ple(t,e,r){t.traverse(function(n){n instanceof vn&&na(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Ble(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function Zy(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function ZTr(t,e,r){var n=J9("update",r,e);n&&t.traverse(function(i){if(i instanceof $2){var a=Lsr(i);a&&i.animateFrom({style:a},n)}})}function JTr(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function lZe(t,e,r){var n=sZe(t),i=sZe(e);function a(_,Q,b,x,E){(b||_)&&Q.animateFrom({style:b&&b!==_?gt(gt({},b.style),_.style):_.style},E)}var o=!1,s=YTr,l=ur(),u=ur();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var d=0;d<i.length;d++){var h=i[d].groupId;if(u.get(h)){s=iZe;break}var f=i[d].childGroupId;if(f&&l.get(f)){s=aZe;break}}function p(_,Q){return function(b){var x=b.data,E=b.dataIndex;return Q?x.getId(E):_?s===iZe?b.childGroupId:b.groupId:s===aZe?b.childGroupId:b.groupId}}var g=JTr(n,i),m={};if(!g)for(var d=0;d<i.length;d++){var v=i[d],T=v.data.getItemGraphicEl(v.dataIndex);T&&(m[T.id]=!0)}function y(_,Q){var b=n[Q],x=i[_],E=x.data.hostModel,S=b.data.getItemGraphicEl(b.dataIndex),C=x.data.getItemGraphicEl(x.dataIndex);if(S===C){C&&ZTr(C,x.dataIndex,E);return}S&&m[S.id]||C&&(Zy(C),S?(Zy(S),Ble(S),o=!0,kle(_8(S),_8(C),x.divide,E,_,a)):Ple(C,E,_))}new I4(n,i,p(!0,g),p(!1,g),null,"multiple").update(y).updateManyToOne(function(_,Q){var b=i[_],x=b.data,E=x.hostModel,S=x.getItemGraphicEl(b.dataIndex),C=li(bt(Q,function(L){return n[L].data.getItemGraphicEl(n[L].dataIndex)}),function(L){return L&&L!==S&&!m[L.id]});S&&(Zy(S),C.length?(ue(C,function(L){Zy(L),Ble(L)}),o=!0,kle(_8(C),_8(S),b.divide,E,_,a)):Ple(S,E,b.dataIndex))}).updateOneToMany(function(_,Q){var b=n[Q],x=b.data.getItemGraphicEl(b.dataIndex);if(!(x&&m[x.id])){var E=li(bt(_,function(C){return i[C].data.getItemGraphicEl(i[C].dataIndex)}),function(C){return C&&C!==x}),S=i[_[0]].data.hostModel;E.length&&(ue(E,function(C){return Zy(C)}),x?(Zy(x),Ble(x),o=!0,kle(_8(x),_8(E),b.divide,S,_[0],a)):ue(E,function(C){return Ple(C,S,_[0])}))}}).updateManyToMany(function(_,Q){new I4(Q,_,function(b){return n[b].data.getId(n[b].dataIndex)},function(b){return i[b].data.getId(i[b].dataIndex)}).update(function(b,x){y(_[b],Q[x])}).execute()}).execute(),o&&ue(e,function(_){var Q=_.data,b=Q.hostModel,x=b&&r.getViewOfSeriesModel(b),E=J9("update",b,0);x&&b.isAnimationEnabled()&&E&&E.duration>0&&x.group.traverse(function(S){S instanceof vn&&!S.animators.length&&S.animateFrom({style:{opacity:0}},E)})})}function uZe(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function cZe(t){return yt(t)?t.sort().join(","):t}function K5(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function evr(t,e){var r=ur(),n=ur(),i=ur();ue(t.oldSeries,function(o,s){var l=t.oldDataGroupIds[s],u=t.oldData[s],d=uZe(o),h=cZe(d);n.set(h,{dataGroupId:l,data:u}),yt(d)&&ue(d,function(f){i.set(f,{key:h,dataGroupId:l,data:u})})});function a(o){r.get(o)&&_a("Duplicated seriesKey in universalTransition "+o)}return ue(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),l=o.getData(),u=uZe(o),d=cZe(u),h=n.get(d);if(h)process.env.NODE_ENV!=="production"&&a(d),r.set(d,{oldSeries:[{dataGroupId:h.dataGroupId,divide:K5(h.data),data:h.data}],newSeries:[{dataGroupId:s,divide:K5(l),data:l}]});else if(yt(u)){process.env.NODE_ENV!=="production"&&a(d);var f=[];ue(u,function(m){var v=n.get(m);v.data&&f.push({dataGroupId:v.dataGroupId,divide:K5(v.data),data:v.data})}),f.length&&r.set(d,{oldSeries:f,newSeries:[{dataGroupId:s,data:l,divide:K5(l)}]})}else{var p=i.get(u);if(p){var g=r.get(p.key);g||(g={oldSeries:[{dataGroupId:p.dataGroupId,data:p.data,divide:K5(p.data)}],newSeries:[]},r.set(p.key,g)),g.newSeries.push({dataGroupId:s,data:l,divide:K5(l)})}}}}),r}function dZe(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function tvr(t,e,r,n){var i=[],a=[];ue(Ri(t.from),function(o){var s=dZe(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:K5(e.oldData[s]),groupIdDim:o.dimension})}),ue(Ri(t.to),function(o){var s=dZe(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:K5(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&lZe(i,a,n)}function rvr(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){ue(Ri(n.seriesTransition),function(i){ue(Ri(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][CP]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=jTr(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)ue(Ri(a),function(p){tvr(p,i,n,r)});else{var o=evr(i,n);ue(o.keys(),function(p){var g=o.get(p);lZe(g.oldSeries,g.newSeries,r)})}ue(n.updatedSeries,function(p){p[CP]&&(p[CP]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],d=i.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<nZe&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),d.push(f))}})}var nvr=function(){function t(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return t.prototype.setBreaks=function(e){this.breaks=e.breaks},t.prototype.update=function(e){avr(this,e);var r=this._elapsedExtent;r[0]=this.elapse(e[0]),r[1]=this.elapse(e[1])},t.prototype.hasBreaks=function(){return!!this.breaks.length},t.prototype.calcNiceTickMultiple=function(e,r){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<e&&e<i.vmax){var a=r(e,i.vmax);return process.env.NODE_ENV!=="production"&&nr(a>=0&&Math.round(a)===a),a}}return 0},t.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},t.prototype.normalize=function(e){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(e)-this._elapsedExtent[0])/r},t.prototype.scale=function(e){return this.unelapse(e*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},t.prototype.elapse=function(e){for(var r=hZe,n=fZe,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(e<=o.vmax){e>o.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=hZe,n=fZe,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-n,u=l+s.gapReal;if(e<=u){e>l?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function ivr(){return new nvr}var hZe=0,fZe=0;function avr(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};ue(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=Hle(s,e);if(u){var d=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(d&&h))if(d||h){var p=d?"S":"E";a[p][l.type].has=!0,a[p][l.type].span=f,a[p][l.type].inExtFrac=f/(s.vmax-s.vmin),a[p][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));ue(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function ovr(t,e,r,n,i,a){t!=="no"&&ue(r,function(o){var s=Hle(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],d=n(u),h=i*3/4;d>s.vmin-h&&d<s.vmax+h&&(t!=="preserve_extent_bound"||d!==a[0]&&d!==a[1])&&e.splice(l,1)}})}function svr(t,e,r,n){ue(e,function(i){var a=Hle(i,r);a&&(t.push({value:a.vmin,break:{type:"vmin",parsedBreak:a},time:n?n(a):void 0}),t.push({value:a.vmax,break:{type:"vmax",parsedBreak:a},time:n?n(a):void 0}))}),e.length&&t.sort(function(i,a){return i.value-a.value})}function Hle(t,e){var r=Math.max(t.vmin,e[0]),n=Math.min(t.vmax,e[1]);return r<n||r===n&&r>e[0]&&r<e[1]?{vmin:r,vmax:n,breakOption:t.breakOption,gapParsed:t.gapParsed,gapReal:t.gapReal}:null}function Fle(t,e,r){var n=[];if(!t)return{breaks:n};function i(o,s){return o>=0&&o<1-1e-5?!0:(process.env.NODE_ENV!=="production"&&kn(s+" must be >= 0 and < 1, rather than "+o+" ."),!1)}ue(t,function(o){if(!o||o.start==null||o.end==null){process.env.NODE_ENV!=="production"&&kn("The input axis breaks start/end should not be empty.");return}if(!o.isExpanded){var s={breakOption:br(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(zt(o.gap)){var u=k2(o.gap);if(u.match(/%$/)){var d=parseFloat(u)/100;i(d,"Percent gap")||(d=0),s.gapParsed.type="tpPrct",s.gapParsed.val=d,l=!0}}if(!l){var h=e(o.gap);(!isFinite(h)||h<0)&&(process.env.NODE_ENV!=="production"&&kn("Axis breaks gap must positive finite rather than ("+o.gap+")."),h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&ue(["vmin","vmax"],function(p){s[p]<0&&(process.env.NODE_ENV!=="production"&&kn("Axis break."+p+" must not be negative."),s[p]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return ue(n,function(o,s){a>o.vmin&&(process.env.NODE_ENV!=="production"&&kn("Axis breaks must not overlap."),n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function Vle(t,e){return $le(e)===$le(t)}function $le(t){return t.start+"_\0_"+t.end}function lvr(t,e,r){var n=[];ue(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),ue(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=rm(n,function(u){return Vle(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return ue(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function uvr(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=rm(r,function(h){return Vle(h.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),d={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Co(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:d,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function cvr(t,e,r){var n={noNegative:!0},i=Fle(t,r,n),a=Fle(t,r,n),o=Math.log(e);return a.breaks=bt(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,d={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:d,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var dvr={vmin:"start",vmax:"end"};function hvr(t,e){return e&&(t=t||{},t.break={type:dvr[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function fvr(){Xsr({createScaleBreakContext:ivr,pruneTicksByBreak:ovr,addBreaksToTicks:svr,parseAxisBreakOption:Fle,identifyAxisBreak:Vle,serializeAxisBreakIdentifier:$le,retrieveAxisBreakPairs:lvr,getTicksLogTransformBreak:uvr,logarithmicParseBreaksFromOption:cvr,makeAxisLabelFormatterParamBreak:hvr})}var pZe=fn();function pvr(t,e){var r=rm(t,function(n){return Oo().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function gvr(t){ue(t,function(e){return e.shouldRemove=!0})}function mvr(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Tvr(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Oo())return;var o=Oo().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),d=s.get("zigzagMaxSpan");u=Math.max(2,u||0),d=Math.max(u,d||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),p=s.getModel("itemStyle"),g=p.getItemStyle(),m=g.stroke,v=g.lineWidth,T=g.lineDash,y=g.fill,_=new Tr({ignoreModelZ:!0}),Q=a.isHorizontal(),b=pZe(e).visualList||(pZe(e).visualList=[]);gvr(b);for(var x=function(C){var L=o[C][0].break.parsedBreak,w=[];w[0]=a.toGlobalCoord(a.dataToCoord(L.vmin,!0)),w[1]=a.toGlobalCoord(a.dataToCoord(L.vmax,!0)),w[1]<w[0]&&w.reverse();var O=pvr(b,L);O.shouldRemove=!1;var R=new Tr;S(O.zigzagRandomList,R,w[0],w[1],Q,L),h&&R.on("click",function(){var M={type:TB,breaks:[{start:L.breakOption.start,end:L.breakOption.end}]};M[a.dim+"AxisIndex"]=r.componentIndex,i.dispatchAction(M)}),R.silent=!h,_.add(R)},E=0;E<o.length;E++)x(E);t.add(_),mvr(b);function S(C,L,w,O,R,M){var D={stroke:m,lineWidth:v,lineDash:T,fill:"none"},P=R?0:1,B=1-P,k=n[Pr[B]]+n[Ao[B]];function V(ae){var le=[],oe=[];le[P]=oe[P]=ae,le[B]=n[Pr[B]],oe[B]=k;var Ce={x1:le[0],y1:le[1],x2:oe[0],y2:oe[1]};return Fk(Ce,Ce,{lineWidth:1}),le[0]=Ce.x1,le[1]=Ce.y1,le[P]}w=V(w),O=V(O);for(var H=[],$=[],G=!0,U=n[Pr[B]],Y=0;;Y++){var ne=U===n[Pr[B]],te=U>=k;te&&(U=k);var ee=[],ie=[];ee[P]=w,ie[P]=O,!ne&&!te&&(ee[P]+=G?-l:l,ie[P]-=G?l:-l),ee[B]=U,ie[B]=U,H.push(ee),$.push(ie);var j=void 0;if(Y<C.length?j=C[Y]:(j=Math.random(),C.push(j)),U+=j*(d-u)+u,G=!G,te)break}var X=Oo().serializeAxisBreakIdentifier(M.breakOption);if(L.add(new yl({anid:"break_a_"+X,shape:{points:H},style:D,z:f})),M.gapReal!==0){L.add(new yl({anid:"break_b_"+X,shape:{points:$},style:D,z:f}));var Z=$.slice();Z.reverse();var K=H.concat(Z);L.add(new tu({anid:"break_c_"+X,shape:{points:K},style:{fill:y,opacity:g.opacity},z:f}))}}}function vvr(t,e,r,n){var i=t.axis,a=r.transform;nr(n.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=Oo().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(v){return v.break},!1),l=bt(s,function(v){var T=v[0].break.parsedBreak,y=[i.dataToCoord(T.vmin,!0),i.dataToCoord(T.vmax,!0)];return y[0]>y[1]&&y.reverse(),{coordPair:y,brkId:Oo().serializeAxisBreakIdentifier(T.breakOption)}});l.sort(function(v,T){return v.coordPair[0]-T.coordPair[0]});for(var u=o[0],d=null,h=0;h<l.length;h++){var f=l[h],p=Math.max(f.coordPair[0],o[0]),g=Math.min(f.coordPair[1],o[1]);u<=p&&m(u,p,d,f),u=g,d=f}u<=o[1]&&m(u,o[1],d,null);function m(v,T,y,_){function Q(w,O){a&&(lo(w,w,a),lo(O,O,a))}function b(w,O){var R={x1:w[0],y1:w[1],x2:O[0],y2:O[1]};Fk(R,R,n.style),w[0]=R.x1,w[1]=R.y1,O[0]=R.x2,O[1]=R.y2}var x=[v,0],E=[T,0],S=[v,5],C=[T,5];Q(x,S),b(x,S),Q(E,C),b(E,C),b(x,E);var L=new wo(gt({shape:{x1:x[0],y1:x[1],x2:E[0],y2:E[1]}},n));e.add(L),L.anid="breakLine_"+(y?y.brkId:"\0")+"_\0_"+(_?_.brkId:"\0")}}function yvr(t,e,r){if(rm(r,function(y){return!y}))return;var n=new xr;if(!aB(r[0],r[1],n,{direction:-(t?e+Math.PI:e),touchThreshold:0,bidirectional:!1}))return;var i=qs();g5(i,i,-e);var a=bt(r,function(y){return y.transform?w3(qs(),i,y.transform):i});function o(y){var _=r[0].localRect,Q=new xr(_[Ao[y]]*a[0][0],_[Ao[y]]*a[0][1]);return Math.abs(Q.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=bt(r,function(y,_){var Q=y.localRect.clone();return Q.applyTransform(a[_]),Q}),u=new xr;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(i);var d=n.clone().transform(i),h=l[0].x+l[1].x+(d.x>=0?l[0].width:l[1].width),f=(h+d.x)/2-u.x,p=Math.min(f,f-d.x),g=Math.max(f,f-d.x),m=g<0?g:p>0?p:0;s=(f-m)/d.x}var v=new xr,T=new xr;xr.scale(v,n,-s),xr.scale(T,n,1-s),pae(r[0],v),pae(r[1],T)}function _vr(t,e){var r={breaks:[]};return ue(e.breaks,function(n){if(n){var i=rm(t.get("breaks",!0),function(s){return Oo().identifyAxisBreak(s,n)});if(!i){process.env.NODE_ENV!=="production"&&_a("Can not find axis break by start: "+n.start+", end: "+n.end);return}var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===TB?!0:a===EGe?!1:a===SGe?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}),r}function bvr(){Tdr({adjustBreakLabelPair:yvr,buildAxisBreakLine:vvr,rectCoordBuildBreakAxis:Tvr,updateModelAxisBreak:_vr})}function Qvr(t){xdr(t),fvr(),bvr()}function xvr(){zdr(Evr)}function Evr(t,e){ue(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Svr(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function Svr(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof xy?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Sy(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var d=0;d<i;d+=u){var h=n?n[d]:{value:a[0]+d},f=s(h,d),p=o.getTextRect(f),g=m(p,o.get("rotate")||0);l?l.union(g):l=g}return l;function m(v,T){var y=T*Math.PI/180,_=v.width,Q=v.height,b=_*Math.abs(Math.cos(y))+Math.abs(Q*Math.sin(y)),x=_*Math.abs(Math.sin(y))+Math.abs(Q*Math.cos(y)),E=new Cr(v.x,v.y,b,x);return E}}rn([g0r]),rn([c0r]),rn([I0r,X0r,odr,u3r,_3r,uhr,khr,yfr,Ffr,Wfr,Jfr,s4r,e6r,E6r,I6r,K6r,t5r,d5r,v5r,A5r,I5r,G5r,wpr]),rn(Wpr),rn(vgr),rn(Dqe),rn(Ogr),rn(iYe),rn(Ngr),rn(e7r),rn(u7r),rn(j7r),rn(pmr),rn(Tw),rn(Omr),rn(Dmr),rn(Umr),rn(Kmr),rn(n8r),rn(u8r),rn(y8r),rn(B8r),rn(vKe),rn(_Ke),rn(iTr),rn(kKe),rn(BKe),rn(lTr),rn(fTr),rn(CTr),rn(ATr),rn(rvr),rn(O2r),rn(Qvr),rn(xvr),rn(c3r);const Cvr=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Lvr=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,wvr=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Avr(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){Ovr(t);return}return e}function Ovr(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function gZe(t,e={}){if(typeof t!="string")return t;if(t[0]==='"'&&t[t.length-1]==='"'&&t.indexOf("\\")===-1)return t.slice(1,-1);const r=t.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!wvr.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(Cvr.test(t)||Lvr.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,Avr)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}const Mvr={class:"echarts-content"},Rvr={class:"echartsWrap"},Dvr={key:0,class:"echartsContent",ref:"echartsContent"},Nvr=oa({__name:"EchartsParser",props:{code:{type:String,required:!0}},setup(t){const e=Dh.PRESENTED_IMAGE_SIMPLE,r=[{value:1,label:"\u56FE\u8868"},{value:2,label:"\u6E90\u7801"}],n=I.ref(r[0].value),i=I.useTemplateRef("echartsContent"),a=I.ref(!1);let o=null;const s=d=>{const h=E=>E.replace(/"/g,'"').replace(/"/g,'"').replace(/'/g,"'").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),f=E=>{const S=E.indexOf("{"),C=E.lastIndexOf("}");return S!==-1&&C!==-1&&C>S?E.slice(S,C+1).trim():""},p=E=>E.replace(/\\"/g,'"').replace(/\\n/g,`
|
|
964
|
-
`).replace(/\\r/g,"").replace(/\\t/g," "),g=typeof d=="string"?d:"",m=g.trim(),v=m.replace(/^[ \t]*echarts[ \t]*(?:\\n|\r?\n)/i,"").trim(),T=m.replace(/^```[ \t]*[a-zA-Z0-9_-]*\r?\n?/,"").replace(/\r?\n?```$/,"").trim(),y=T.replace(/^[ \t]*echarts[ \t]*(?:\\n|\r?\n)/i,"").trim(),_=h(y||v||m),Q=f(_),b=p(Q),x=[g,m,v,T,y,_,Q,b];for(const E of x){if(!E)continue;const S=gZe(E);if(S&&typeof S=="object"&&!Array.isArray(S))return S;if(typeof S=="string"){const C=gZe(S);if(C&&typeof C=="object"&&!Array.isArray(C))return C}}return null},{stop:l}=mPe(i,()=>{o&&o.resize()});I.onMounted(()=>{o=Wcr(i.value)}),I.onUnmounted(()=>{l()}),fPe(()=>t.code,d=>{if(!o)return;const h=s(d);if(!h){a.value=!0,o.hideLoading();return}a.value=!1,o.hideLoading();try{o.setOption(h,!0)}catch(f){a.value=!0,console.error("\u51FA\u9519\u5566\u554A",f)}},{immediate:!0,debounce:50,maxWait:100});const u=async()=>{try{await dI(t.code),ma.success("\u590D\u5236\u6210\u529F!")}catch(d){ma.error(d)}};return(d,h)=>{const f=Z7e,p=Jc,g=k6,m=Dh;return I.openBlock(),I.createElementBlock("div",Mvr,[I.createVNode(Dte,null,{title:I.withCtx(()=>[I.createVNode(f,{value:n.value,"onUpdate:value":h[0]||(h[0]=v=>n.value=v),options:r},null,8,["value"])]),actions:I.withCtx(()=>[I.createVNode(g,null,{title:I.withCtx(()=>h[1]||(h[1]=[I.createTextVNode("\u590D\u5236")])),default:I.withCtx(()=>[I.createVNode(p,{type:"text",size:"small",onClick:u},{default:I.withCtx(()=>[I.createVNode(I.unref(ox))]),_:1})]),_:1})]),_:1}),I.withDirectives(I.createElementVNode("div",Rvr,[a.value?(I.openBlock(),I.createBlock(m,{key:1,description:"\u6E32\u67D3\u5931\u8D25",image:I.unref(e)},null,8,["image"])):(I.openBlock(),I.createElementBlock("div",Dvr,null,512))],512),[[I.vShow,n.value===1]]),I.withDirectives(I.createElementVNode("pre",{class:"code-wrapper"},I.toDisplayString(t.code),513),[[I.vShow,n.value===2]])])}}},[["__scopeId","data-v-
|
|
964
|
+
`).replace(/\\r/g,"").replace(/\\t/g," "),g=typeof d=="string"?d:"",m=g.trim(),v=m.replace(/^[ \t]*echarts[ \t]*(?:\\n|\r?\n)/i,"").trim(),T=m.replace(/^```[ \t]*[a-zA-Z0-9_-]*\r?\n?/,"").replace(/\r?\n?```$/,"").trim(),y=T.replace(/^[ \t]*echarts[ \t]*(?:\\n|\r?\n)/i,"").trim(),_=h(y||v||m),Q=f(_),b=p(Q),x=[g,m,v,T,y,_,Q,b];for(const E of x){if(!E)continue;const S=gZe(E);if(S&&typeof S=="object"&&!Array.isArray(S))return S;if(typeof S=="string"){const C=gZe(S);if(C&&typeof C=="object"&&!Array.isArray(C))return C}}return null},{stop:l}=mPe(i,()=>{o&&o.resize()});I.onMounted(()=>{o=Wcr(i.value)}),I.onUnmounted(()=>{l()}),fPe(()=>t.code,d=>{if(!o)return;const h=s(d);if(!h){a.value=!0,o.hideLoading();return}a.value=!1,o.hideLoading();try{o.setOption(h,!0)}catch(f){a.value=!0,console.error("\u51FA\u9519\u5566\u554A",f)}},{immediate:!0,debounce:50,maxWait:100});const u=async()=>{try{await dI(t.code),ma.success("\u590D\u5236\u6210\u529F!")}catch(d){ma.error(d)}};return(d,h)=>{const f=Z7e,p=Jc,g=k6,m=Dh;return I.openBlock(),I.createElementBlock("div",Mvr,[I.createVNode(Dte,null,{title:I.withCtx(()=>[I.createVNode(f,{value:n.value,"onUpdate:value":h[0]||(h[0]=v=>n.value=v),options:r},null,8,["value"])]),actions:I.withCtx(()=>[I.createVNode(g,null,{title:I.withCtx(()=>h[1]||(h[1]=[I.createTextVNode("\u590D\u5236")])),default:I.withCtx(()=>[I.createVNode(p,{type:"text",size:"small",onClick:u},{default:I.withCtx(()=>[I.createVNode(I.unref(ox))]),_:1})]),_:1})]),_:1}),I.withDirectives(I.createElementVNode("div",Rvr,[a.value?(I.openBlock(),I.createBlock(m,{key:1,description:"\u6E32\u67D3\u5931\u8D25",image:I.unref(e)},null,8,["image"])):(I.openBlock(),I.createElementBlock("div",Dvr,null,512))],512),[[I.vShow,n.value===1]]),I.withDirectives(I.createElementVNode("pre",{class:"code-wrapper"},I.toDisplayString(t.code),513),[[I.vShow,n.value===2]])])}}},[["__scopeId","data-v-58c3141e"]]),Ivr={__name:"FenceParser",props:{node:{type:Object,default:()=>null}},setup(t){const e=I.ref(""),r=I.ref("");return I.watch(()=>t.node,()=>{t.node&&SE(t.node,n=>{var i,a,o;n.type==="text"?e.value=n.value:n.type==="element"&&n.tagName==="code"&&(r.value=((o=(a=(i=n.properties)==null?void 0:i.className)==null?void 0:a[0])==null?void 0:o.replace("language-",""))||"")})},{immediate:!0}),(n,i)=>r.value==="mermaid"?(I.openBlock(),I.createBlock(knr,{key:0,code:e.value},null,8,["code"])):r.value==="echarts"?(I.openBlock(),I.createBlock(Nvr,{key:1,code:e.value},null,8,["code"])):(I.openBlock(),I.createBlock(mnr,{key:2,code:e.value,lang:r.value},null,8,["code","lang"]))}},kvr={class:"markdown-body"},Pvr=["onClick"],CH=Object.assign({name:"AiMdParser"},{__name:"MdParser",props:I.mergeDefaults({content:String},{content:""}),setup(t){function e(m){const v=[];let T=0;return m=m.replace(/\$\$([\s\S]*?)\$\$/g,y=>{const _=`__PROTECTED_MATH_BLOCK_${T}__`;return v[T]=y,T++,_}),m=m.replace(/\$([^\$\n]+?)\$/g,(y,_)=>{if(/[\u4e00-\u9fa5。,、“”‘’;:?!【】()《》]/.test(_))return y;const Q=`__PROTECTED_INLINE_MATH_${T}__`;return v[T]=y,T++,Q}),m=m.replace(/```[\s\S]*?```/g,y=>{const _=`__PROTECTED_CODE_BLOCK_${T}__`;return v[T]=y,T++,_}),m=m.replace(/`([^`]+)`/g,y=>{const _=`__PROTECTED_INLINE_CODE_${T}__`;return v[T]=y,T++,_}),{markdown:m,protectedRegions:v}}function r(m,v){let T=m;return v.forEach((y,_)=>{let Q="INLINE_CODE";y.startsWith("```")?Q="CODE_BLOCK":y.startsWith("$$")?Q="MATH_BLOCK":y.startsWith("$")&&(Q="INLINE_MATH");const b=`__PROTECTED_${Q}_${_}__`;T=T.split(b).join(y)}),T}function n(m){return m.replace(/\\n/g,`
|
|
965
965
|
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\v/g,"\v").replace(/\$/g,"\\$")}function i(m){const{markdown:v,protectedRegions:T}=e(m),y=n(v);return r(y,T)}function a(m){return m.replace(/```[ \t]*([a-zA-Z0-9_-]+)\\n([\s\S]*?)```/g,(v,T,y)=>`\`\`\`${T}
|
|
966
966
|
${y}
|
|
967
967
|
\`\`\``)}const o=/(?:https?:\/\/|www\.)?(?:\d{1,3}(?:\.\d{1,3}){3}|\w[-\w.]+(?:\.[a-zA-Z]{2,}))(?:\:\d+)?(?:\/[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}\\]*)?(?:\?[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}\\]*)?(?:#[^\s\)\[\]\}\u4e00-\u9fa5。()"'“”‘’}\\]*)?/g;function s(m){const v=[];return m.replace(/<[^>]+>/gi,_=>(v.push(_),`__PROTECTED_PLACEHOLDER_${v.length-1}__`)).replace(o,_=>` ${_} `).replace(/__PROTECTED_PLACEHOLDER_(\d+)__/g,(_,Q)=>v[Q])}const l=m=>{const v=/<\/?[a-z][^>]*>/i.test(m),T=m.trim().startsWith("<");if(v&&!T){const _=m.match(/<\/?[a-z][^>]*>/i);if(_){const Q=_.index,b=m.substring(0,Q),x=m.substring(Q);m=b+`
|
|
968
968
|
|
|
969
|
-
`+x}}return Oxt(a,i,s)(m)},u=I.computed(()=>l(t.content));function d(m){const v=m||"";return/<(td|tr|th|table)\b[^>]*?(?=<\/(td|tr|th|table)\b)/i.test(v)}const h=I.computed(()=>d(t.content)),f=I.computed(()=>h.value?[OOe,Uke]:[AKt,OOe,Uke]),p={singleTilde:!1},g=m=>{const v=document.getElementById(m.properties.href.split("#")[1]);v&&(v.style.background="yellow",setTimeout(()=>{v.style.background=""},2e3))};return(m,v)=>{const T=Eg;return I.openBlock(),I.createElementBlock("div",kvr,[I.createVNode(Rte,{markdown:u.value,remarkPlugins:[[I.unref(NWt),p],I.unref(jWt),I.unref(PWt),I.unref(YWt)],rehypePlugins:f.value},{a:I.withCtx(({node:y})=>{var _,Q,b;return[(_=y.properties.href)!=null&&_.startsWith("#")?(I.openBlock(),I.createElementBlock("a",I.mergeProps({key:0},y.properties,{onClick:x=>g(y)}),I.toDisplayString((Q=y.children[0])==null?void 0:Q.value),17,Pvr)):(I.openBlock(),I.createElementBlock("a",I.mergeProps({key:1},y.properties,{target:"_blank",rel:"noopener noreferrer"}),I.toDisplayString((b=y.children[0])==null?void 0:b.value),17))]}),pre:I.withCtx(({node:y})=>[I.createVNode(Ivr,{node:y},null,8,["node"])]),img:I.withCtx(({node:y})=>[I.createVNode(T,I.mergeProps(y.properties,{previewMask:!1,style:{cursor:"pointer"}}),null,16)]),_:1},8,["markdown","remarkPlugins","rehypePlugins"])])}}}),Bvr={key:0,class:"ai-chat-record-avatar"},Hvr={class:"ai-chat-record-wrap"},Fvr={class:"ai-chat-record-head"},Vvr={key:0,class:"ai-chat-record-time"},$vr={class:"ai-chat-record-body"},Uvr={key:0,class:"ai-chat-record-loading-wrap"},zvr={key:1,class:"ai-chat-record-content"},Gvr={class:"ai-chat-record-content-before"},qvr={class:"ai-chat-record-content-inner"},Wvr={class:"ai-chat-record-content-after"},Yvr={key:0,class:"character-count"},jvr={key:0,class:"ai-chat-record-foot"},Xvr={class:"foot-actions"},Kvr={key:0,class:"copy-tooltip-inner"},Zvr={key:1,class:"copy-tooltip-inner copy-tooltip-inner--error"},mZe=oa(Object.assign({name:"AiChatRecord"},{__name:"ChatRecord",props:{status:{type:String,default:"done"},loadingMessage:{type:String,default:"AI\u7EC4\u7EC7\u8BED\u8A00\u4E2D"},pos:{type:String,default:"l"},fullWidth:{type:Boolean,default:!1},avatar:{type:String,default:""},showAvatar:{type:Boolean,default:!0},content:{type:String,default:""},time:{type:String},showTime:{type:Boolean,default:!0},timeFormat:{type:String,default:"yyyy/MM/dd hh:mm:ss"},showCharacterCount:{type:Boolean,default:!0},showFoot:{type:Boolean,default:!0},actions:{type:Array,default:()=>["copy","regenerate"]},copyTipType:{type:String,default:"tooltip"}},emits:["regenerate"],setup(t,{expose:e,emit:r}){const n={Loading:"loading",Generating:"generating",Done:"done"},i=t,a=r,o=I.ref(),s=I.ref(!0),l=I.ref(!1),u=I.computed(()=>HLe(i.time,i.timeFormat)),d=I.computed(()=>{var f,p;if(i.status==="done"){let g=(p=(f=o.value)==null?void 0:f.querySelector(".ai-chat-record-content-inner"))==null?void 0:p.innerText;return(g==null?void 0:g.length)??0}else return 0});function h(){var g;let f=(g=o.value)==null?void 0:g.querySelector(".ai-chat-record-content-inner");if(!f)return;function p(){i.copyTipType==="message"?s.value?ma.success("\u590D\u5236\u6210\u529F"):ma.error("\u590D\u5236\u5931\u8D25"):(l.value=!0,setTimeout(()=>{l.value=!1},1e3))}FLe(f).then(()=>{s.value=!0,p()}).catch(()=>{s.value=!1,p()})}return e({statusEnum:n}),(f,p)=>{const g=_v,m=k6;return I.openBlock(),I.createElementBlock("div",{ref_key:"elRef",ref:o,class:I.normalizeClass(["ai-chat-record",{"ai-chat-record--r":t.pos==="r","ai-chat-record--full-width":t.fullWidth,"ai-chat-record--show-time":t.showTime}])},[t.showAvatar?(I.openBlock(),I.createElementBlock("div",Bvr,[I.renderSlot(f.$slots,"avatar",{},()=>[I.createVNode(g,{size:40,src:t.avatar},{icon:I.withCtx(()=>p[1]||(p[1]=[])),_:1},8,["src"])],!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",Hvr,[I.createElementVNode("div",Fvr,[I.renderSlot(f.$slots,"head",{},()=>[t.showTime?(I.openBlock(),I.createElementBlock("div",Vvr,[I.renderSlot(f.$slots,"time",{time:u.value},()=>[I.createTextVNode(I.toDisplayString(u.value),1)],!0)])):I.createCommentVNode("",!0),I.renderSlot(f.$slots,"headRight",{},void 0,!0)],!0)]),I.createElementVNode("div",$vr,[t.status===n.Loading?(I.openBlock(),I.createElementBlock("div",Uvr,[I.renderSlot(f.$slots,"loading",{},()=>[I.createVNode(jUt,{theme:t.pos==="r"?"light":"",message:t.loadingMessage},null,8,["theme","message"])],!0)])):(I.openBlock(),I.createElementBlock("div",zvr,[I.createElementVNode("div",Gvr,[I.renderSlot(f.$slots,"contentBefore",{},void 0,!0)]),I.createElementVNode("div",qvr,[I.renderSlot(f.$slots,"content",{},()=>[I.createVNode(CH,{content:t.content},null,8,["content"])],!0)]),I.createElementVNode("div",Wvr,[I.renderSlot(f.$slots,"contentAfter",{},void 0,!0)]),t.showCharacterCount&&t.status===n.Done?(I.openBlock(),I.createElementBlock("div",Yvr,[I.renderSlot(f.$slots,"characterCountBefore",{},void 0,!0),I.renderSlot(f.$slots,"characterCount",{},()=>[I.withDirectives(I.createElementVNode("span",null,"\u5171"+I.toDisplayString(d.value)+"\u4E2A\u5B57\u7B26",513),[[I.vShow,d.value]])],!0),I.renderSlot(f.$slots,"characterCountAfter",{},void 0,!0)])):I.createCommentVNode("",!0)]))]),t.showFoot?(I.openBlock(),I.createElementBlock("div",jvr,[I.renderSlot(f.$slots,"foot",{},()=>[I.createElementVNode("div",Xvr,[I.renderSlot(f.$slots,"actionsBefore",{},void 0,!0),I.renderSlot(f.$slots,"actions",{},()=>[I.createVNode(m,{overlayClassName:"copy-tooltip",open:l.value,color:"#fff"},{title:I.withCtx(()=>[s.value?(I.openBlock(),I.createElementBlock("span",Kvr,[I.createVNode(I.unref(bg),{class:"copy-tooltip-icon"}),p[2]||(p[2]=I.createTextVNode(" \u590D\u5236\u6210\u529F "))])):(I.openBlock(),I.createElementBlock("span",Zvr,[I.createVNode(I.unref(xR),{class:"copy-tooltip-icon"}),p[3]||(p[3]=I.createTextVNode(" \u590D\u5236\u5931\u8D25 "))]))]),default:I.withCtx(()=>[I.createVNode(m,{title:"\u590D\u5236"},{default:I.withCtx(()=>[t.status===n.Done&&t.actions.includes("copy")?(I.openBlock(),I.createElementBlock("button",{key:0,class:"action",onClick:h},p[4]||(p[4]=[I.createElementVNode("i",{class:"action-icon ai-icon ai-icon-copy"},null,-1)]))):I.createCommentVNode("",!0)]),_:1})]),_:1},8,["open"]),I.createVNode(m,{title:"\u91CD\u65B0\u751F\u6210"},{default:I.withCtx(()=>[t.status===n.Done&&t.actions.includes("regenerate")?(I.openBlock(),I.createElementBlock("button",{key:0,class:"action",onClick:p[0]||(p[0]=v=>a("regenerate"))},p[5]||(p[5]=[I.createElementVNode("i",{class:"action-icon ai-icon ai-icon-shuaxin"},null,-1)]))):I.createCommentVNode("",!0)]),_:1})],!0),I.renderSlot(f.$slots,"actionsAfter",{},void 0,!0)])],!0)])):I.createCommentVNode("",!0),I.renderSlot(f.$slots,"bottom",{},void 0,!0)])],2)}}}),[["__scopeId","data-v-6dd93daa"]]);var TZe=11;function Jvr(t,e){var r=e.attributes,n,i,a,o,s;if(!(e.nodeType===TZe||t.nodeType===TZe)){for(var l=r.length-1;l>=0;l--)n=r[l],i=n.name,a=n.namespaceURI,o=n.value,a?(i=n.localName||i,s=t.getAttributeNS(a,i),s!==o&&(n.prefix==="xmlns"&&(i=n.name),t.setAttributeNS(a,i,o))):(s=t.getAttribute(i),s!==o&&t.setAttribute(i,o));for(var u=t.attributes,d=u.length-1;d>=0;d--)n=u[d],i=n.name,a=n.namespaceURI,a?(i=n.localName||i,e.hasAttributeNS(a,i)||t.removeAttributeNS(a,i)):e.hasAttribute(i)||t.removeAttribute(i)}}var LH,e9r="http://www.w3.org/1999/xhtml",Lc=typeof document>"u"?void 0:document,t9r=!!Lc&&"content"in Lc.createElement("template"),r9r=!!Lc&&Lc.createRange&&"createContextualFragment"in Lc.createRange();function n9r(t){var e=Lc.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function i9r(t){LH||(LH=Lc.createRange(),LH.selectNode(Lc.body));var e=LH.createContextualFragment(t);return e.childNodes[0]}function a9r(t){var e=Lc.createElement("body");return e.innerHTML=t,e.childNodes[0]}function o9r(t){return t=t.trim(),t9r?n9r(t):r9r?i9r(t):a9r(t)}function wH(t,e){var r=t.nodeName,n=e.nodeName,i,a;return r===n?!0:(i=r.charCodeAt(0),a=n.charCodeAt(0),i<=90&&a>=97?r===n.toUpperCase():a<=90&&i>=97?n===r.toUpperCase():!1)}function s9r(t,e){return!e||e===e9r?Lc.createElement(t):Lc.createElementNS(e,t)}function l9r(t,e){for(var r=t.firstChild;r;){var n=r.nextSibling;e.appendChild(r),r=n}return e}function Ule(t,e,r){t[r]!==e[r]&&(t[r]=e[r],t[r]?t.setAttribute(r,""):t.removeAttribute(r))}var vZe={OPTION:function(t,e){var r=t.parentNode;if(r){var n=r.nodeName.toUpperCase();n==="OPTGROUP"&&(r=r.parentNode,n=r&&r.nodeName.toUpperCase()),n==="SELECT"&&!r.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),r.selectedIndex=-1)}Ule(t,e,"selected")},INPUT:function(t,e){Ule(t,e,"checked"),Ule(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var r=e.value;t.value!==r&&(t.value=r);var n=t.firstChild;if(n){var i=n.nodeValue;if(i==r||!r&&i==t.placeholder)return;n.nodeValue=r}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var r=-1,n=0,i=t.firstChild,a,o;i;)if(o=i.nodeName&&i.nodeName.toUpperCase(),o==="OPTGROUP")a=i,i=a.firstChild;else{if(o==="OPTION"){if(i.hasAttribute("selected")){r=n;break}n++}i=i.nextSibling,!i&&a&&(i=a.nextSibling,a=null)}t.selectedIndex=r}}},Aw=1,yZe=11,_Ze=3,bZe=8;function Z5(){}function u9r(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function c9r(t){return function(r,n,i){if(i||(i={}),typeof n=="string")if(r.nodeName==="#document"||r.nodeName==="HTML"||r.nodeName==="BODY"){var a=n;n=Lc.createElement("html"),n.innerHTML=a}else n=o9r(n);else n.nodeType===yZe&&(n=n.firstElementChild);var o=i.getNodeKey||u9r,s=i.onBeforeNodeAdded||Z5,l=i.onNodeAdded||Z5,u=i.onBeforeElUpdated||Z5,d=i.onElUpdated||Z5,h=i.onBeforeNodeDiscarded||Z5,f=i.onNodeDiscarded||Z5,p=i.onBeforeElChildrenUpdated||Z5,g=i.skipFromChildren||Z5,m=i.addChild||function(B,k){return B.appendChild(k)},v=i.childrenOnly===!0,T=Object.create(null),y=[];function _(B){y.push(B)}function Q(B,k){if(B.nodeType===Aw)for(var V=B.firstChild;V;){var H=void 0;k&&(H=o(V))?_(H):(f(V),V.firstChild&&Q(V,k)),V=V.nextSibling}}function b(B,k,V){h(B)!==!1&&(k&&k.removeChild(B),f(B),Q(B,V))}function x(B){if(B.nodeType===Aw||B.nodeType===yZe)for(var k=B.firstChild;k;){var V=o(k);V&&(T[V]=k),x(k),k=k.nextSibling}}x(r);function E(B){l(B);for(var k=B.firstChild;k;){var V=k.nextSibling,H=o(k);if(H){var $=T[H];$&&wH(k,$)?(k.parentNode.replaceChild($,k),C($,k)):E(k)}else E(k);k=V}}function S(B,k,V){for(;k;){var H=k.nextSibling;(V=o(k))?_(V):b(k,B,!0),k=H}}function C(B,k,V){var H=o(k);if(H&&delete T[H],!V){var $=u(B,k);if($===!1||($ instanceof HTMLElement&&(B=$,x(B)),t(B,k),d(B),p(B,k)===!1))return}B.nodeName!=="TEXTAREA"?L(B,k):vZe.TEXTAREA(B,k)}function L(B,k){var V=g(B,k),H=k.firstChild,$=B.firstChild,G,U,Y,ne,te;e:for(;H;){for(ne=H.nextSibling,G=o(H);!V&&$;){if(Y=$.nextSibling,H.isSameNode&&H.isSameNode($)){H=ne,$=Y;continue e}U=o($);var ee=$.nodeType,ie=void 0;if(ee===H.nodeType&&(ee===Aw?(G?G!==U&&((te=T[G])?Y===te?ie=!1:(B.insertBefore(te,$),U?_(U):b($,B,!0),$=te,U=o($)):ie=!1):U&&(ie=!1),ie=ie!==!1&&wH($,H),ie&&C($,H)):(ee===_Ze||ee==bZe)&&(ie=!0,$.nodeValue!==H.nodeValue&&($.nodeValue=H.nodeValue))),ie){H=ne,$=Y;continue e}U?_(U):b($,B,!0),$=Y}if(G&&(te=T[G])&&wH(te,H))V||m(B,te),C(te,H);else{var j=s(H);j!==!1&&(j&&(H=j),H.actualize&&(H=H.actualize(B.ownerDocument||Lc)),m(B,H),E(H))}H=ne,$=Y}S(B,$,U);var X=vZe[B.nodeName];X&&X(B,k)}var w=r,O=w.nodeType,R=n.nodeType;if(!v){if(O===Aw)R===Aw?wH(r,n)||(f(r),w=l9r(r,s9r(n.nodeName,n.namespaceURI))):w=n;else if(O===_Ze||O===bZe){if(R===O)return w.nodeValue!==n.nodeValue&&(w.nodeValue=n.nodeValue),w;w=n}}if(w===n)f(r);else{if(n.isSameNode&&n.isSameNode(w))return;if(C(w,n,v),y)for(var M=0,D=y.length;M<D;M++){var P=T[y[M]];P&&b(P,P.parentNode,!1)}}return!v&&w!==r&&r.parentNode&&(w.actualize&&(w=w.actualize(r.ownerDocument||Lc)),r.parentNode.replaceChild(w,r)),w}}var d9r=c9r(Jvr);const h9r={key:1,class:"ai-content-parser-inner"},QZe=Object.assign({name:"AiContentParser"},{__name:"ContentParser",props:{type:{type:String,default:"text"},content:String,stream:{type:Boolean,default:!1},streamDone:{type:Boolean,default:!1}},setup(t){const e=t,r=I.ref(null),n=I.ref("");return I.onMounted(()=>{I.watch(()=>e.content,()=>{if(n.value=e.type==="markdown"?VLe.parse(e.content):e.content,e.type==="markdown"||e.type==="html"){const i=document.createElement("div");i.innerHTML=n.value,i.classList.add("ai-content-parser-inner"),d9r(r.value,i)}},{immediate:!0})}),(i,a)=>(I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-content-parser",`ai-content-parser--${t.type}`])},[t.type==="html"||t.type==="markdown"?(I.openBlock(),I.createElementBlock("div",{key:0,ref_key:"contentRef",ref:r,class:"ai-content-parser-inner"},null,512)):(I.openBlock(),I.createElementBlock("div",h9r,I.toDisplayString(n.value),1))],2))}}),f9r={class:"ai-think-parser"},p9r={class:"ai-think-parser-content"},xZe=oa(Object.assign({name:"AiThinkParser"},{__name:"ThinkParser",setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",f9r,[I.createElementVNode("div",p9r,[I.renderSlot(e.$slots,"content",{},()=>[I.createVNode(CH,I.normalizeProps(I.guardReactiveProps(e.$attrs)),null,16)],!0)])]))}}),[["__scopeId","data-v-e2220f53"]]);function Ql(t){this.content=t}Ql.prototype={constructor:Ql,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,i=n.find(t),a=n.content.slice();return i==-1?a.push(r||t,e):(a[i+1]=e,r&&(a[i]=r)),new Ql(a)},remove:function(t){var e=this.find(t);if(e==-1)return this;var r=this.content.slice();return r.splice(e,2),new Ql(r)},addToStart:function(t,e){return new Ql([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new Ql(r)},addBefore:function(t,e,r){var n=this.remove(e),i=n.content.slice(),a=n.find(t);return i.splice(a==-1?i.length:a,0,e,r),new Ql(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Ql.from(t),t.size?new Ql(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ql.from(t),t.size?new Ql(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ql.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},toObject:function(){var t={};return this.forEach(function(e,r){t[e]=r}),t},get size(){return this.content.length>>1}},Ql.from=function(t){if(t instanceof Ql)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new Ql(e)};function EZe(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let i=t.child(n),a=e.child(n);if(i==a){r+=i.nodeSize;continue}if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)r++;return r}if(i.content.size||a.content.size){let o=EZe(i.content,a.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function SZe(t,e,r,n){for(let i=t.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:r,b:n};let o=t.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){r-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:r,b:n};if(o.isText&&o.text!=s.text){let u=0,d=Math.min(o.text.length,s.text.length);for(;u<d&&o.text[o.text.length-u-1]==s.text[s.text.length-u-1];)u++,r--,n--;return{a:r,b:n}}if(o.content.size||s.content.size){let u=SZe(o.content,s.content,r-1,n-1);if(u)return u}r-=l,n-=l}}class Gt{constructor(e,r){if(this.content=e,this.size=r||0,r==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,r,n,i=0,a){for(let o=0,s=0;s<r;o++){let l=this.content[o],u=s+l.nodeSize;if(u>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let d=s+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,r-d),n,i+d)}s=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,i){let a="",o=!0;return this.nodesBetween(e,r,(s,l)=>{let u=s.isText?s.text.slice(Math.max(e,l)-l,r-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=u},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new Gt(i,this.size+e.size)}cut(e,r=this.size){if(e==0&&r==this.size)return this;let n=[],i=0;if(r>e)for(let a=0,o=0;o<r;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>r)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,r-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,r-o-1))),n.push(s),i+=s.nodeSize),o=l}return new Gt(n,i)}cutByIndex(e,r){return e==r?Gt.empty:e==0&&r==this.content.length?this:new Gt(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let i=this.content.slice(),a=this.size+r.nodeSize-n.nodeSize;return i[e]=r,new Gt(i,a)}addToStart(e){return new Gt([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Gt(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;r<this.content.length;r++)if(!this.content[r].eq(e.content[r]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let r=this.content[e];if(!r)throw new RangeError("Index "+e+" out of range for "+this);return r}maybeChild(e){return this.content[e]||null}forEach(e){for(let r=0,n=0;r<this.content.length;r++){let i=this.content[r];e(i,n,r),n+=i.nodeSize}}findDiffStart(e,r=0){return EZe(this,e,r)}findDiffEnd(e,r=this.size,n=e.size){return SZe(this,e,r,n)}findIndex(e){if(e==0)return AH(0,e);if(e==this.size)return AH(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let i=this.child(r),a=n+i.nodeSize;if(a>=e)return a==e?AH(r+1,a):AH(r,n);n=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return Gt.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new Gt(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Gt.empty;let r,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(r||(r=e.slice(0,i)),r[r.length-1]=a.withText(r[r.length-1].text+a.text)):r&&r.push(a)}return new Gt(r||e,n)}static from(e){if(!e)return Gt.empty;if(e instanceof Gt)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Gt([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Gt.empty=new Gt([],0);const zle={index:0,offset:0};function AH(t,e){return zle.index=t,zle.offset=e,zle}function OH(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!OH(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!OH(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let ha=class sfe{constructor(e,r){this.type=e,this.attrs=r}addToSet(e){let r,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))r||(r=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(r||(r=e.slice(0,i)),r.push(this),n=!0),r&&r.push(a)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return e.slice(0,r).concat(e.slice(r+1));return e}isInSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return!0;return!1}eq(e){return this==e||this.type==e.type&&OH(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[r.type];if(!n)throw new RangeError(`There is no mark type ${r.type} in this schema`);let i=n.create(r.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,r){if(e==r)return!0;if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(r[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return sfe.none;if(e instanceof sfe)return[e];let r=e.slice();return r.sort((n,i)=>n.type.rank-i.type.rank),r}};ha.none=[];class MH extends Error{}class Lr{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=LZe(this.content,e+this.openStart,r);return n&&new Lr(n,this.openStart,this.openEnd)}removeBetween(e,r){return new Lr(CZe(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return Lr.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Lr(Gt.fromJSON(e,r.content),n,i)}static maxOpen(e,r=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(r||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(r||!a.type.spec.isolating);a=a.lastChild)i++;return new Lr(e,n,i)}}Lr.empty=new Lr(Gt.empty,0,0);function CZe(t,e,r){let{index:n,offset:i}=t.findIndex(e),a=t.maybeChild(n),{index:o,offset:s}=t.findIndex(r);if(i==e||a.isText){if(s!=r&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(n,a.copy(CZe(a.content,e-i-1,r-i-1)))}function LZe(t,e,r,n){let{index:i,offset:a}=t.findIndex(e),o=t.maybeChild(i);if(a==e||o.isText)return t.cut(0,e).append(r).append(t.cut(e));let s=LZe(o.content,e-a-1,r);return s&&t.replaceChild(i,o.copy(s))}function g9r(t,e,r){if(r.openStart>t.depth)throw new MH("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new MH("Inconsistent open depths");return wZe(t,e,r,0)}function wZe(t,e,r,n){let i=t.index(n),a=t.node(n);if(i==e.index(n)&&n<t.depth-r.openStart){let o=wZe(t,e,r,n+1);return a.copy(a.content.replaceChild(i,o))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&t.depth==n&&e.depth==n){let o=t.parent,s=o.content;return Q8(o,s.cut(0,t.parentOffset).append(r.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=m9r(r,t);return Q8(a,OZe(t,o,s,e,n))}else return Q8(a,RH(t,e,n))}function AZe(t,e){if(!e.type.compatibleContent(t.type))throw new MH("Cannot join "+e.type.name+" onto "+t.type.name)}function Gle(t,e,r){let n=t.node(r);return AZe(n,e.node(r)),n}function b8(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function Ow(t,e,r,n){let i=(e||t).node(r),a=0,o=e?e.index(r):i.childCount;t&&(a=t.index(r),t.depth>r?a++:t.textOffset&&(b8(t.nodeAfter,n),a++));for(let s=a;s<o;s++)b8(i.child(s),n);e&&e.depth==r&&e.textOffset&&b8(e.nodeBefore,n)}function Q8(t,e){return t.type.checkContent(e),t.copy(e)}function OZe(t,e,r,n,i){let a=t.depth>i&&Gle(t,e,i+1),o=n.depth>i&&Gle(r,n,i+1),s=[];return Ow(null,t,i,s),a&&o&&e.index(i)==r.index(i)?(AZe(a,o),b8(Q8(a,OZe(t,e,r,n,i+1)),s)):(a&&b8(Q8(a,RH(t,e,i+1)),s),Ow(e,r,i,s),o&&b8(Q8(o,RH(r,n,i+1)),s)),Ow(n,null,i,s),new Gt(s)}function RH(t,e,r){let n=[];if(Ow(null,t,r,n),t.depth>r){let i=Gle(t,e,r+1);b8(Q8(i,RH(t,e,r+1)),n)}return Ow(e,null,r,n),new Gt(n)}function m9r(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let a=r-1;a>=0;a--)i=e.node(a).copy(Gt.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}class Mw{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(r);return n?e.child(r).cut(n):i}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,r=this.index();if(e.content.size==0)return ha.none;if(this.textOffset)return e.child(r).marks;let n=e.maybeChild(r-1),i=e.maybeChild(r);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let n=r.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let r=this.depth;r>0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new DH(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let r=1;r<=this.depth;r++)e+=(e?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return e+":"+this.parentOffset}static resolve(e,r){if(!(r>=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,a=r;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),u=a-l;if(n.push(o,s,i+l),!u||(o=o.child(s),o.isText))break;a=u-1,i+=l+1}return new Mw(r,n,a)}static resolveCached(e,r){let n=MZe.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==r)return o}else MZe.set(e,n=new T9r);let i=n.elts[n.i]=Mw.resolve(e,r);return n.i=(n.i+1)%v9r,i}}class T9r{constructor(){this.elts=[],this.i=0}}const v9r=12,MZe=new WeakMap;class DH{constructor(e,r,n){this.$from=e,this.$to=r,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const y9r=Object.create(null);class Od{constructor(e,r,n,i=ha.none){this.type=e,this.attrs=r,this.marks=i,this.content=n||Gt.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,r,n,i=0){this.content.nodesBetween(e,r,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,r,n,i){return this.content.textBetween(e,r,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,r,n){return this.type==e&&OH(this.attrs,r||e.defaultAttrs||y9r)&&ha.sameSet(this.marks,n||ha.none)}copy(e=null){return e==this.content?this:new Od(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Od(this.type,this.attrs,this.content,e)}cut(e,r=this.content.size){return e==0&&r==this.content.size?this:this.copy(this.content.cut(e,r))}slice(e,r=this.content.size,n=!1){if(e==r)return Lr.empty;let i=this.resolve(e),a=this.resolve(r),o=n?0:i.sharedDepth(r),s=i.start(o),u=i.node(o).content.cut(i.pos-s,a.pos-s);return new Lr(u,i.depth-o,a.depth-o)}replace(e,r,n){return g9r(this.resolve(e),this.resolve(r),n)}nodeAt(e){for(let r=this;;){let{index:n,offset:i}=r.content.findIndex(e);if(r=r.maybeChild(n),!r)return null;if(i==e||r.isText)return r;e-=i+1}}childAfter(e){let{index:r,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(r),index:r,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:r,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(r),index:r,offset:n};let i=this.content.child(r-1);return{node:i,index:r-1,offset:n-i.nodeSize}}resolve(e){return Mw.resolveCached(this,e)}resolveNoCache(e){return Mw.resolve(this,e)}rangeHasMark(e,r,n){let i=!1;return r>e&&this.nodesBetween(e,r,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),RZe(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=Gt.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,r);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,r,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,r);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=ha.none;for(let r=0;r<this.marks.length;r++){let n=this.marks[r];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!ha.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let i=Gt.fromJSON(e,r.content),a=e.nodeType(r.type).create(r.attrs,i,n);return a.type.checkAttrs(a.attrs),a}}Od.prototype.text=void 0;class NH extends Od{constructor(e,r,n,i){if(super(e,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):RZe(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new NH(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new NH(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function RZe(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class x8{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new _9r(e,r);if(n.next==null)return x8.empty;let i=DZe(n);n.next&&n.err("Unexpected trailing text");let a=L9r(C9r(i));return w9r(a,n),a}matchType(e){for(let r=0;r<this.next.length;r++)if(this.next[r].type==e)return this.next[r].next;return null}matchFragment(e,r=0,n=e.childCount){let i=this;for(let a=r;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:r}=this.next[e];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(e){for(let r=0;r<this.next.length;r++)for(let n=0;n<e.next.length;n++)if(this.next[r].type==e.next[n].type)return!0;return!1}fillBefore(e,r=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!r||l.validEnd))return Gt.from(s.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:d,next:h}=o.next[u];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(h)==-1){i.push(h);let f=a(h,s.concat(d));if(f)return f}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let r=this.computeWrapping(e);return this.wrapCache.push(e,r),r}computeWrapping(e){let r=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in r)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),r[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function r(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&r(n.next[i].next)}return r(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
|
|
969
|
+
`+x}}return Oxt(a,i,s)(m)},u=I.computed(()=>l(t.content));function d(m){const v=m||"";return/<(td|tr|th|table)\b[^>]*?(?=<\/(td|tr|th|table)\b)/i.test(v)}const h=I.computed(()=>d(t.content)),f=I.computed(()=>h.value?[OOe,Uke]:[AKt,OOe,Uke]),p={singleTilde:!1},g=m=>{const v=document.getElementById(m.properties.href.split("#")[1]);v&&(v.style.background="yellow",setTimeout(()=>{v.style.background=""},2e3))};return(m,v)=>{const T=Eg;return I.openBlock(),I.createElementBlock("div",kvr,[I.createVNode(Rte,{markdown:u.value,remarkPlugins:[[I.unref(NWt),p],I.unref(jWt),I.unref(PWt),I.unref(YWt)],rehypePlugins:f.value},{a:I.withCtx(({node:y})=>{var _,Q,b;return[(_=y.properties.href)!=null&&_.startsWith("#")?(I.openBlock(),I.createElementBlock("a",I.mergeProps({key:0},y.properties,{onClick:x=>g(y)}),I.toDisplayString((Q=y.children[0])==null?void 0:Q.value),17,Pvr)):(I.openBlock(),I.createElementBlock("a",I.mergeProps({key:1},y.properties,{target:"_blank",rel:"noopener noreferrer"}),I.toDisplayString((b=y.children[0])==null?void 0:b.value),17))]}),pre:I.withCtx(({node:y})=>[I.createVNode(Ivr,{node:y},null,8,["node"])]),img:I.withCtx(({node:y})=>[I.createVNode(T,I.mergeProps(y.properties,{previewMask:!1,style:{cursor:"pointer"}}),null,16)]),_:1},8,["markdown","remarkPlugins","rehypePlugins"])])}}}),Bvr={key:0,class:"ai-chat-record-avatar"},Hvr={class:"ai-chat-record-wrap"},Fvr={class:"ai-chat-record-head"},Vvr={key:0,class:"ai-chat-record-time"},$vr={class:"ai-chat-record-body"},Uvr={key:0,class:"ai-chat-record-loading-wrap"},zvr={key:1,class:"ai-chat-record-content"},Gvr={class:"ai-chat-record-content-before"},qvr={class:"ai-chat-record-content-inner"},Wvr={class:"ai-chat-record-content-after"},Yvr={key:0,class:"character-count"},jvr={key:0,class:"ai-chat-record-foot"},Xvr={class:"foot-actions"},Kvr={key:0,class:"copy-tooltip-inner"},Zvr={key:1,class:"copy-tooltip-inner copy-tooltip-inner--error"},mZe=oa(Object.assign({name:"AiChatRecord"},{__name:"ChatRecord",props:{status:{type:String,default:"done"},loadingMessage:{type:String,default:"AI\u7EC4\u7EC7\u8BED\u8A00\u4E2D"},pos:{type:String,default:"l"},fullWidth:{type:Boolean,default:!1},avatar:{type:String,default:""},showAvatar:{type:Boolean,default:!0},content:{type:String,default:""},time:{type:String},showTime:{type:Boolean,default:!0},timeFormat:{type:String,default:"yyyy/MM/dd hh:mm:ss"},showCharacterCount:{type:Boolean,default:!0},showFoot:{type:Boolean,default:!0},actions:{type:Array,default:()=>["copy","regenerate"]},copyTipType:{type:String,default:"tooltip"}},emits:["regenerate"],setup(t,{expose:e,emit:r}){const n={Loading:"loading",Generating:"generating",Done:"done"},i=t,a=r,o=I.ref(),s=I.ref(!0),l=I.ref(!1),u=I.computed(()=>HLe(i.time,i.timeFormat)),d=I.computed(()=>{var f,p;if(i.status==="done"){let g=(p=(f=o.value)==null?void 0:f.querySelector(".ai-chat-record-content-inner"))==null?void 0:p.innerText;return(g==null?void 0:g.length)??0}else return 0});function h(){var g;let f=(g=o.value)==null?void 0:g.querySelector(".ai-chat-record-content-inner");if(!f)return;function p(){i.copyTipType==="message"?s.value?ma.success("\u590D\u5236\u6210\u529F"):ma.error("\u590D\u5236\u5931\u8D25"):(l.value=!0,setTimeout(()=>{l.value=!1},1e3))}FLe(f).then(()=>{s.value=!0,p()}).catch(()=>{s.value=!1,p()})}return e({statusEnum:n}),(f,p)=>{const g=_v,m=k6;return I.openBlock(),I.createElementBlock("div",{ref_key:"elRef",ref:o,class:I.normalizeClass(["ai-chat-record",{"ai-chat-record--r":t.pos==="r","ai-chat-record--full-width":t.fullWidth,"ai-chat-record--show-time":t.showTime}])},[t.showAvatar?(I.openBlock(),I.createElementBlock("div",Bvr,[I.renderSlot(f.$slots,"avatar",{},()=>[I.createVNode(g,{size:40,src:t.avatar},{icon:I.withCtx(()=>p[1]||(p[1]=[])),_:1},8,["src"])],!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",Hvr,[I.createElementVNode("div",Fvr,[I.renderSlot(f.$slots,"head",{},()=>[t.showTime?(I.openBlock(),I.createElementBlock("div",Vvr,[I.renderSlot(f.$slots,"time",{time:u.value},()=>[I.createTextVNode(I.toDisplayString(u.value),1)],!0)])):I.createCommentVNode("",!0),I.renderSlot(f.$slots,"headRight",{},void 0,!0)],!0)]),I.createElementVNode("div",$vr,[t.status===n.Loading?(I.openBlock(),I.createElementBlock("div",Uvr,[I.renderSlot(f.$slots,"loading",{},()=>[I.createVNode(jUt,{theme:t.pos==="r"?"light":"",message:t.loadingMessage},null,8,["theme","message"])],!0)])):(I.openBlock(),I.createElementBlock("div",zvr,[I.createElementVNode("div",Gvr,[I.renderSlot(f.$slots,"contentBefore",{},void 0,!0)]),I.createElementVNode("div",qvr,[I.renderSlot(f.$slots,"content",{},()=>[I.createVNode(CH,{content:t.content},null,8,["content"])],!0)]),I.createElementVNode("div",Wvr,[I.renderSlot(f.$slots,"contentAfter",{},void 0,!0)]),t.showCharacterCount&&t.status===n.Done?(I.openBlock(),I.createElementBlock("div",Yvr,[I.renderSlot(f.$slots,"characterCountBefore",{},void 0,!0),I.renderSlot(f.$slots,"characterCount",{},()=>[I.withDirectives(I.createElementVNode("span",null,"\u5171"+I.toDisplayString(d.value)+"\u4E2A\u5B57\u7B26",513),[[I.vShow,d.value]])],!0),I.renderSlot(f.$slots,"characterCountAfter",{},void 0,!0)])):I.createCommentVNode("",!0)]))]),t.showFoot?(I.openBlock(),I.createElementBlock("div",jvr,[I.renderSlot(f.$slots,"foot",{},()=>[I.createElementVNode("div",Xvr,[I.renderSlot(f.$slots,"actionsBefore",{},void 0,!0),I.renderSlot(f.$slots,"actions",{},()=>[I.createVNode(m,{overlayClassName:"copy-tooltip",open:l.value,color:"#fff"},{title:I.withCtx(()=>[s.value?(I.openBlock(),I.createElementBlock("span",Kvr,[I.createVNode(I.unref(bg),{class:"copy-tooltip-icon"}),p[2]||(p[2]=I.createTextVNode(" \u590D\u5236\u6210\u529F "))])):(I.openBlock(),I.createElementBlock("span",Zvr,[I.createVNode(I.unref(xR),{class:"copy-tooltip-icon"}),p[3]||(p[3]=I.createTextVNode(" \u590D\u5236\u5931\u8D25 "))]))]),default:I.withCtx(()=>[I.createVNode(m,{title:"\u590D\u5236"},{default:I.withCtx(()=>[t.status===n.Done&&t.actions.includes("copy")?(I.openBlock(),I.createElementBlock("button",{key:0,class:"action",onClick:h},p[4]||(p[4]=[I.createElementVNode("i",{class:"action-icon ai-icon ai-icon-copy"},null,-1)]))):I.createCommentVNode("",!0)]),_:1})]),_:1},8,["open"]),I.createVNode(m,{title:"\u91CD\u65B0\u751F\u6210"},{default:I.withCtx(()=>[t.status===n.Done&&t.actions.includes("regenerate")?(I.openBlock(),I.createElementBlock("button",{key:0,class:"action",onClick:p[0]||(p[0]=v=>a("regenerate"))},p[5]||(p[5]=[I.createElementVNode("i",{class:"action-icon ai-icon ai-icon-shuaxin"},null,-1)]))):I.createCommentVNode("",!0)]),_:1})],!0),I.renderSlot(f.$slots,"actionsAfter",{},void 0,!0)])],!0)])):I.createCommentVNode("",!0),I.renderSlot(f.$slots,"bottom",{},void 0,!0)])],2)}}}),[["__scopeId","data-v-9c9dad67"]]);var TZe=11;function Jvr(t,e){var r=e.attributes,n,i,a,o,s;if(!(e.nodeType===TZe||t.nodeType===TZe)){for(var l=r.length-1;l>=0;l--)n=r[l],i=n.name,a=n.namespaceURI,o=n.value,a?(i=n.localName||i,s=t.getAttributeNS(a,i),s!==o&&(n.prefix==="xmlns"&&(i=n.name),t.setAttributeNS(a,i,o))):(s=t.getAttribute(i),s!==o&&t.setAttribute(i,o));for(var u=t.attributes,d=u.length-1;d>=0;d--)n=u[d],i=n.name,a=n.namespaceURI,a?(i=n.localName||i,e.hasAttributeNS(a,i)||t.removeAttributeNS(a,i)):e.hasAttribute(i)||t.removeAttribute(i)}}var LH,e9r="http://www.w3.org/1999/xhtml",Lc=typeof document>"u"?void 0:document,t9r=!!Lc&&"content"in Lc.createElement("template"),r9r=!!Lc&&Lc.createRange&&"createContextualFragment"in Lc.createRange();function n9r(t){var e=Lc.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function i9r(t){LH||(LH=Lc.createRange(),LH.selectNode(Lc.body));var e=LH.createContextualFragment(t);return e.childNodes[0]}function a9r(t){var e=Lc.createElement("body");return e.innerHTML=t,e.childNodes[0]}function o9r(t){return t=t.trim(),t9r?n9r(t):r9r?i9r(t):a9r(t)}function wH(t,e){var r=t.nodeName,n=e.nodeName,i,a;return r===n?!0:(i=r.charCodeAt(0),a=n.charCodeAt(0),i<=90&&a>=97?r===n.toUpperCase():a<=90&&i>=97?n===r.toUpperCase():!1)}function s9r(t,e){return!e||e===e9r?Lc.createElement(t):Lc.createElementNS(e,t)}function l9r(t,e){for(var r=t.firstChild;r;){var n=r.nextSibling;e.appendChild(r),r=n}return e}function Ule(t,e,r){t[r]!==e[r]&&(t[r]=e[r],t[r]?t.setAttribute(r,""):t.removeAttribute(r))}var vZe={OPTION:function(t,e){var r=t.parentNode;if(r){var n=r.nodeName.toUpperCase();n==="OPTGROUP"&&(r=r.parentNode,n=r&&r.nodeName.toUpperCase()),n==="SELECT"&&!r.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),r.selectedIndex=-1)}Ule(t,e,"selected")},INPUT:function(t,e){Ule(t,e,"checked"),Ule(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var r=e.value;t.value!==r&&(t.value=r);var n=t.firstChild;if(n){var i=n.nodeValue;if(i==r||!r&&i==t.placeholder)return;n.nodeValue=r}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var r=-1,n=0,i=t.firstChild,a,o;i;)if(o=i.nodeName&&i.nodeName.toUpperCase(),o==="OPTGROUP")a=i,i=a.firstChild;else{if(o==="OPTION"){if(i.hasAttribute("selected")){r=n;break}n++}i=i.nextSibling,!i&&a&&(i=a.nextSibling,a=null)}t.selectedIndex=r}}},Aw=1,yZe=11,_Ze=3,bZe=8;function Z5(){}function u9r(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function c9r(t){return function(r,n,i){if(i||(i={}),typeof n=="string")if(r.nodeName==="#document"||r.nodeName==="HTML"||r.nodeName==="BODY"){var a=n;n=Lc.createElement("html"),n.innerHTML=a}else n=o9r(n);else n.nodeType===yZe&&(n=n.firstElementChild);var o=i.getNodeKey||u9r,s=i.onBeforeNodeAdded||Z5,l=i.onNodeAdded||Z5,u=i.onBeforeElUpdated||Z5,d=i.onElUpdated||Z5,h=i.onBeforeNodeDiscarded||Z5,f=i.onNodeDiscarded||Z5,p=i.onBeforeElChildrenUpdated||Z5,g=i.skipFromChildren||Z5,m=i.addChild||function(B,k){return B.appendChild(k)},v=i.childrenOnly===!0,T=Object.create(null),y=[];function _(B){y.push(B)}function Q(B,k){if(B.nodeType===Aw)for(var V=B.firstChild;V;){var H=void 0;k&&(H=o(V))?_(H):(f(V),V.firstChild&&Q(V,k)),V=V.nextSibling}}function b(B,k,V){h(B)!==!1&&(k&&k.removeChild(B),f(B),Q(B,V))}function x(B){if(B.nodeType===Aw||B.nodeType===yZe)for(var k=B.firstChild;k;){var V=o(k);V&&(T[V]=k),x(k),k=k.nextSibling}}x(r);function E(B){l(B);for(var k=B.firstChild;k;){var V=k.nextSibling,H=o(k);if(H){var $=T[H];$&&wH(k,$)?(k.parentNode.replaceChild($,k),C($,k)):E(k)}else E(k);k=V}}function S(B,k,V){for(;k;){var H=k.nextSibling;(V=o(k))?_(V):b(k,B,!0),k=H}}function C(B,k,V){var H=o(k);if(H&&delete T[H],!V){var $=u(B,k);if($===!1||($ instanceof HTMLElement&&(B=$,x(B)),t(B,k),d(B),p(B,k)===!1))return}B.nodeName!=="TEXTAREA"?L(B,k):vZe.TEXTAREA(B,k)}function L(B,k){var V=g(B,k),H=k.firstChild,$=B.firstChild,G,U,Y,ne,te;e:for(;H;){for(ne=H.nextSibling,G=o(H);!V&&$;){if(Y=$.nextSibling,H.isSameNode&&H.isSameNode($)){H=ne,$=Y;continue e}U=o($);var ee=$.nodeType,ie=void 0;if(ee===H.nodeType&&(ee===Aw?(G?G!==U&&((te=T[G])?Y===te?ie=!1:(B.insertBefore(te,$),U?_(U):b($,B,!0),$=te,U=o($)):ie=!1):U&&(ie=!1),ie=ie!==!1&&wH($,H),ie&&C($,H)):(ee===_Ze||ee==bZe)&&(ie=!0,$.nodeValue!==H.nodeValue&&($.nodeValue=H.nodeValue))),ie){H=ne,$=Y;continue e}U?_(U):b($,B,!0),$=Y}if(G&&(te=T[G])&&wH(te,H))V||m(B,te),C(te,H);else{var j=s(H);j!==!1&&(j&&(H=j),H.actualize&&(H=H.actualize(B.ownerDocument||Lc)),m(B,H),E(H))}H=ne,$=Y}S(B,$,U);var X=vZe[B.nodeName];X&&X(B,k)}var w=r,O=w.nodeType,R=n.nodeType;if(!v){if(O===Aw)R===Aw?wH(r,n)||(f(r),w=l9r(r,s9r(n.nodeName,n.namespaceURI))):w=n;else if(O===_Ze||O===bZe){if(R===O)return w.nodeValue!==n.nodeValue&&(w.nodeValue=n.nodeValue),w;w=n}}if(w===n)f(r);else{if(n.isSameNode&&n.isSameNode(w))return;if(C(w,n,v),y)for(var M=0,D=y.length;M<D;M++){var P=T[y[M]];P&&b(P,P.parentNode,!1)}}return!v&&w!==r&&r.parentNode&&(w.actualize&&(w=w.actualize(r.ownerDocument||Lc)),r.parentNode.replaceChild(w,r)),w}}var d9r=c9r(Jvr);const h9r={key:1,class:"ai-content-parser-inner"},QZe=Object.assign({name:"AiContentParser"},{__name:"ContentParser",props:{type:{type:String,default:"text"},content:String,stream:{type:Boolean,default:!1},streamDone:{type:Boolean,default:!1}},setup(t){const e=t,r=I.ref(null),n=I.ref("");return I.onMounted(()=>{I.watch(()=>e.content,()=>{if(n.value=e.type==="markdown"?VLe.parse(e.content):e.content,e.type==="markdown"||e.type==="html"){const i=document.createElement("div");i.innerHTML=n.value,i.classList.add("ai-content-parser-inner"),d9r(r.value,i)}},{immediate:!0})}),(i,a)=>(I.openBlock(),I.createElementBlock("div",{class:I.normalizeClass(["ai-content-parser",`ai-content-parser--${t.type}`])},[t.type==="html"||t.type==="markdown"?(I.openBlock(),I.createElementBlock("div",{key:0,ref_key:"contentRef",ref:r,class:"ai-content-parser-inner"},null,512)):(I.openBlock(),I.createElementBlock("div",h9r,I.toDisplayString(n.value),1))],2))}}),f9r={class:"ai-think-parser"},p9r={class:"ai-think-parser-content"},xZe=oa(Object.assign({name:"AiThinkParser"},{__name:"ThinkParser",setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",f9r,[I.createElementVNode("div",p9r,[I.renderSlot(e.$slots,"content",{},()=>[I.createVNode(CH,I.normalizeProps(I.guardReactiveProps(e.$attrs)),null,16)],!0)])]))}}),[["__scopeId","data-v-70d4677e"]]);function Ql(t){this.content=t}Ql.prototype={constructor:Ql,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,r){var n=r&&r!=t?this.remove(r):this,i=n.find(t),a=n.content.slice();return i==-1?a.push(r||t,e):(a[i+1]=e,r&&(a[i]=r)),new Ql(a)},remove:function(t){var e=this.find(t);if(e==-1)return this;var r=this.content.slice();return r.splice(e,2),new Ql(r)},addToStart:function(t,e){return new Ql([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var r=this.remove(t).content.slice();return r.push(t,e),new Ql(r)},addBefore:function(t,e,r){var n=this.remove(e),i=n.content.slice(),a=n.find(t);return i.splice(a==-1?i.length:a,0,e,r),new Ql(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Ql.from(t),t.size?new Ql(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ql.from(t),t.size?new Ql(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ql.from(t);for(var r=0;r<t.content.length;r+=2)e=e.remove(t.content[r]);return e},toObject:function(){var t={};return this.forEach(function(e,r){t[e]=r}),t},get size(){return this.content.length>>1}},Ql.from=function(t){if(t instanceof Ql)return t;var e=[];if(t)for(var r in t)e.push(r,t[r]);return new Ql(e)};function EZe(t,e,r){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:r;let i=t.child(n),a=e.child(n);if(i==a){r+=i.nodeSize;continue}if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)r++;return r}if(i.content.size||a.content.size){let o=EZe(i.content,a.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function SZe(t,e,r,n){for(let i=t.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:r,b:n};let o=t.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){r-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:r,b:n};if(o.isText&&o.text!=s.text){let u=0,d=Math.min(o.text.length,s.text.length);for(;u<d&&o.text[o.text.length-u-1]==s.text[s.text.length-u-1];)u++,r--,n--;return{a:r,b:n}}if(o.content.size||s.content.size){let u=SZe(o.content,s.content,r-1,n-1);if(u)return u}r-=l,n-=l}}class Gt{constructor(e,r){if(this.content=e,this.size=r||0,r==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,r,n,i=0,a){for(let o=0,s=0;s<r;o++){let l=this.content[o],u=s+l.nodeSize;if(u>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let d=s+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,r-d),n,i+d)}s=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,r,n,i){let a="",o=!0;return this.nodesBetween(e,r,(s,l)=>{let u=s.isText?s.text.slice(Math.max(e,l)-l,r-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&u||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=u},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let r=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new Gt(i,this.size+e.size)}cut(e,r=this.size){if(e==0&&r==this.size)return this;let n=[],i=0;if(r>e)for(let a=0,o=0;o<r;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>r)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,r-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,r-o-1))),n.push(s),i+=s.nodeSize),o=l}return new Gt(n,i)}cutByIndex(e,r){return e==r?Gt.empty:e==0&&r==this.content.length?this:new Gt(this.content.slice(e,r))}replaceChild(e,r){let n=this.content[e];if(n==r)return this;let i=this.content.slice(),a=this.size+r.nodeSize-n.nodeSize;return i[e]=r,new Gt(i,a)}addToStart(e){return new Gt([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Gt(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let r=0;r<this.content.length;r++)if(!this.content[r].eq(e.content[r]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let r=this.content[e];if(!r)throw new RangeError("Index "+e+" out of range for "+this);return r}maybeChild(e){return this.content[e]||null}forEach(e){for(let r=0,n=0;r<this.content.length;r++){let i=this.content[r];e(i,n,r),n+=i.nodeSize}}findDiffStart(e,r=0){return EZe(this,e,r)}findDiffEnd(e,r=this.size,n=e.size){return SZe(this,e,r,n)}findIndex(e){if(e==0)return AH(0,e);if(e==this.size)return AH(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,n=0;;r++){let i=this.child(r),a=n+i.nodeSize;if(a>=e)return a==e?AH(r+1,a):AH(r,n);n=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,r){if(!r)return Gt.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new Gt(r.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Gt.empty;let r,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(r||(r=e.slice(0,i)),r[r.length-1]=a.withText(r[r.length-1].text+a.text)):r&&r.push(a)}return new Gt(r||e,n)}static from(e){if(!e)return Gt.empty;if(e instanceof Gt)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Gt([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Gt.empty=new Gt([],0);const zle={index:0,offset:0};function AH(t,e){return zle.index=t,zle.offset=e,zle}function OH(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let r=Array.isArray(t);if(Array.isArray(e)!=r)return!1;if(r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!OH(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!OH(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let ha=class sfe{constructor(e,r){this.type=e,this.attrs=r}addToSet(e){let r,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))r||(r=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(r||(r=e.slice(0,i)),r.push(this),n=!0),r&&r.push(a)}}return r||(r=e.slice()),n||r.push(this),r}removeFromSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return e.slice(0,r).concat(e.slice(r+1));return e}isInSet(e){for(let r=0;r<e.length;r++)if(this.eq(e[r]))return!0;return!1}eq(e){return this==e||this.type==e.type&&OH(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[r.type];if(!n)throw new RangeError(`There is no mark type ${r.type} in this schema`);let i=n.create(r.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,r){if(e==r)return!0;if(e.length!=r.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(r[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return sfe.none;if(e instanceof sfe)return[e];let r=e.slice();return r.sort((n,i)=>n.type.rank-i.type.rank),r}};ha.none=[];class MH extends Error{}class Lr{constructor(e,r,n){this.content=e,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,r){let n=LZe(this.content,e+this.openStart,r);return n&&new Lr(n,this.openStart,this.openEnd)}removeBetween(e,r){return new Lr(CZe(this.content,e+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,r){if(!r)return Lr.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Lr(Gt.fromJSON(e,r.content),n,i)}static maxOpen(e,r=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(r||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(r||!a.type.spec.isolating);a=a.lastChild)i++;return new Lr(e,n,i)}}Lr.empty=new Lr(Gt.empty,0,0);function CZe(t,e,r){let{index:n,offset:i}=t.findIndex(e),a=t.maybeChild(n),{index:o,offset:s}=t.findIndex(r);if(i==e||a.isText){if(s!=r&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(n,a.copy(CZe(a.content,e-i-1,r-i-1)))}function LZe(t,e,r,n){let{index:i,offset:a}=t.findIndex(e),o=t.maybeChild(i);if(a==e||o.isText)return t.cut(0,e).append(r).append(t.cut(e));let s=LZe(o.content,e-a-1,r);return s&&t.replaceChild(i,o.copy(s))}function g9r(t,e,r){if(r.openStart>t.depth)throw new MH("Inserted content deeper than insertion position");if(t.depth-r.openStart!=e.depth-r.openEnd)throw new MH("Inconsistent open depths");return wZe(t,e,r,0)}function wZe(t,e,r,n){let i=t.index(n),a=t.node(n);if(i==e.index(n)&&n<t.depth-r.openStart){let o=wZe(t,e,r,n+1);return a.copy(a.content.replaceChild(i,o))}else if(r.content.size)if(!r.openStart&&!r.openEnd&&t.depth==n&&e.depth==n){let o=t.parent,s=o.content;return Q8(o,s.cut(0,t.parentOffset).append(r.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=m9r(r,t);return Q8(a,OZe(t,o,s,e,n))}else return Q8(a,RH(t,e,n))}function AZe(t,e){if(!e.type.compatibleContent(t.type))throw new MH("Cannot join "+e.type.name+" onto "+t.type.name)}function Gle(t,e,r){let n=t.node(r);return AZe(n,e.node(r)),n}function b8(t,e){let r=e.length-1;r>=0&&t.isText&&t.sameMarkup(e[r])?e[r]=t.withText(e[r].text+t.text):e.push(t)}function Ow(t,e,r,n){let i=(e||t).node(r),a=0,o=e?e.index(r):i.childCount;t&&(a=t.index(r),t.depth>r?a++:t.textOffset&&(b8(t.nodeAfter,n),a++));for(let s=a;s<o;s++)b8(i.child(s),n);e&&e.depth==r&&e.textOffset&&b8(e.nodeBefore,n)}function Q8(t,e){return t.type.checkContent(e),t.copy(e)}function OZe(t,e,r,n,i){let a=t.depth>i&&Gle(t,e,i+1),o=n.depth>i&&Gle(r,n,i+1),s=[];return Ow(null,t,i,s),a&&o&&e.index(i)==r.index(i)?(AZe(a,o),b8(Q8(a,OZe(t,e,r,n,i+1)),s)):(a&&b8(Q8(a,RH(t,e,i+1)),s),Ow(e,r,i,s),o&&b8(Q8(o,RH(r,n,i+1)),s)),Ow(n,null,i,s),new Gt(s)}function RH(t,e,r){let n=[];if(Ow(null,t,r,n),t.depth>r){let i=Gle(t,e,r+1);b8(Q8(i,RH(t,e,r+1)),n)}return Ow(e,null,r,n),new Gt(n)}function m9r(t,e){let r=e.depth-t.openStart,i=e.node(r).copy(t.content);for(let a=r-1;a>=0;a--)i=e.node(a).copy(Gt.from(i));return{start:i.resolveNoCache(t.openStart+r),end:i.resolveNoCache(i.content.size-t.openEnd-r)}}class Mw{constructor(e,r,n){this.pos=e,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,r=this.index(this.depth);if(r==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(r);return n?e.child(r).cut(n):i}get nodeBefore(){let e=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(e).cut(0,r):e==0?null:this.parent.child(e-1)}posAtIndex(e,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,r=this.index();if(e.content.size==0)return ha.none;if(this.textOffset)return e.child(r).marks;let n=e.maybeChild(r-1),i=e.maybeChild(r);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let r=this.parent.maybeChild(this.index());if(!r||!r.isInline)return null;let n=r.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let r=this.depth;r>0;r--)if(this.start(r)<=e&&this.end(r)>=e)return r;return 0}blockRange(e=this,r){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!r||r(this.node(n))))return new DH(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let r=1;r<=this.depth;r++)e+=(e?"/":"")+this.node(r).type.name+"_"+this.index(r-1);return e+":"+this.parentOffset}static resolve(e,r){if(!(r>=0&&r<=e.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,a=r;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),u=a-l;if(n.push(o,s,i+l),!u||(o=o.child(s),o.isText))break;a=u-1,i+=l+1}return new Mw(r,n,a)}static resolveCached(e,r){let n=MZe.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==r)return o}else MZe.set(e,n=new T9r);let i=n.elts[n.i]=Mw.resolve(e,r);return n.i=(n.i+1)%v9r,i}}class T9r{constructor(){this.elts=[],this.i=0}}const v9r=12,MZe=new WeakMap;class DH{constructor(e,r,n){this.$from=e,this.$to=r,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const y9r=Object.create(null);class Od{constructor(e,r,n,i=ha.none){this.type=e,this.attrs=r,this.marks=i,this.content=n||Gt.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,r,n,i=0){this.content.nodesBetween(e,r,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,r,n,i){return this.content.textBetween(e,r,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,r,n){return this.type==e&&OH(this.attrs,r||e.defaultAttrs||y9r)&&ha.sameSet(this.marks,n||ha.none)}copy(e=null){return e==this.content?this:new Od(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Od(this.type,this.attrs,this.content,e)}cut(e,r=this.content.size){return e==0&&r==this.content.size?this:this.copy(this.content.cut(e,r))}slice(e,r=this.content.size,n=!1){if(e==r)return Lr.empty;let i=this.resolve(e),a=this.resolve(r),o=n?0:i.sharedDepth(r),s=i.start(o),u=i.node(o).content.cut(i.pos-s,a.pos-s);return new Lr(u,i.depth-o,a.depth-o)}replace(e,r,n){return g9r(this.resolve(e),this.resolve(r),n)}nodeAt(e){for(let r=this;;){let{index:n,offset:i}=r.content.findIndex(e);if(r=r.maybeChild(n),!r)return null;if(i==e||r.isText)return r;e-=i+1}}childAfter(e){let{index:r,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(r),index:r,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:r,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(r),index:r,offset:n};let i=this.content.child(r-1);return{node:i,index:r-1,offset:n-i.nodeSize}}resolve(e){return Mw.resolveCached(this,e)}resolveNoCache(e){return Mw.resolve(this,e)}rangeHasMark(e,r,n){let i=!1;return r>e&&this.nodesBetween(e,r,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),RZe(this.marks,e)}contentMatchAt(e){let r=this.type.contentMatch.matchFragment(this.content,0,e);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(e,r,n=Gt.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,r);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,r,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,r);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=ha.none;for(let r=0;r<this.marks.length;r++){let n=this.marks[r];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!ha.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(r=>r.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let e={type:this.type.name};for(let r in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(r=>r.toJSON())),e}static fromJSON(e,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(e.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(r.text,n)}let i=Gt.fromJSON(e,r.content),a=e.nodeType(r.type).create(r.attrs,i,n);return a.type.checkAttrs(a.attrs),a}}Od.prototype.text=void 0;class NH extends Od{constructor(e,r,n,i){if(super(e,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):RZe(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,r){return this.text.slice(e,r)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new NH(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new NH(this.type,this.attrs,e,this.marks)}cut(e=0,r=this.text.length){return e==0&&r==this.text.length?this:this.withText(this.text.slice(e,r))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function RZe(t,e){for(let r=t.length-1;r>=0;r--)e=t[r].type.name+"("+e+")";return e}class x8{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,r){let n=new _9r(e,r);if(n.next==null)return x8.empty;let i=DZe(n);n.next&&n.err("Unexpected trailing text");let a=L9r(C9r(i));return w9r(a,n),a}matchType(e){for(let r=0;r<this.next.length;r++)if(this.next[r].type==e)return this.next[r].next;return null}matchFragment(e,r=0,n=e.childCount){let i=this;for(let a=r;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:r}=this.next[e];if(!(r.isText||r.hasRequiredAttrs()))return r}return null}compatible(e){for(let r=0;r<this.next.length;r++)for(let n=0;n<e.next.length;n++)if(this.next[r].type==e.next[n].type)return!0;return!1}fillBefore(e,r=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!r||l.validEnd))return Gt.from(s.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:d,next:h}=o.next[u];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(h)==-1){i.push(h);let f=a(h,s.concat(d));if(f)return f}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let r=this.computeWrapping(e);return this.wrapCache.push(e,r),r}computeWrapping(e){let r=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in r)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),r[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function r(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&r(n.next[i].next)}return r(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
|
|
970
970
|
`)}}x8.empty=new x8(!0);class _9r{constructor(e,r){this.string=e,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function DZe(t){let e=[];do e.push(b9r(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function b9r(t){let e=[];do e.push(Q9r(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Q9r(t){let e=S9r(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=x9r(t,e);else break;return e}function NZe(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function x9r(t,e){let r=NZe(t),n=r;return t.eat(",")&&(t.next!="}"?n=NZe(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:e}}function E9r(t,e){let r=t.nodeTypes,n=r[e];if(n)return[n];let i=[];for(let a in r){let o=r[a];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function S9r(t){if(t.eat("(")){let e=DZe(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=E9r(t,t.next).map(r=>(t.inline==null?t.inline=r.isInline:t.inline!=r.isInline&&t.err("Mixing inline and block content"),{type:"name",value:r}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function C9r(t){let e=[[]];return i(a(t,0),r()),e;function r(){return e.push([])-1}function n(o,s,l){let u={term:l,to:s};return e[o].push(u),u}function i(o,s){o.forEach(l=>l.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(a(u,s)),[]);if(o.type=="seq")for(let l=0;;l++){let u=a(o.exprs[l],s);if(l==o.exprs.length-1)return u;i(u,s=r())}else if(o.type=="star"){let l=r();return n(s,l),i(a(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=r();return i(a(o.expr,s),l),i(a(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(s)].concat(a(o.expr,s));if(o.type=="range"){let l=s;for(let u=0;u<o.min;u++){let d=r();i(a(o.expr,l),d),l=d}if(o.max==-1)i(a(o.expr,l),l);else for(let u=o.min;u<o.max;u++){let d=r();n(l,d),i(a(o.expr,l),d),l=d}return[n(l)]}else{if(o.type=="name")return[n(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function IZe(t,e){return e-t}function kZe(t,e){let r=[];return n(e),r.sort(IZe);function n(i){let a=t[i];if(a.length==1&&!a[0].term)return n(a[0].to);r.push(i);for(let o=0;o<a.length;o++){let{term:s,to:l}=a[o];!s&&r.indexOf(l)==-1&&n(l)}}}function L9r(t){let e=Object.create(null);return r(kZe(t,0));function r(n){let i=[];n.forEach(o=>{t[o].forEach(({term:s,to:l})=>{if(!s)return;let u;for(let d=0;d<i.length;d++)i[d][0]==s&&(u=i[d][1]);kZe(t,l).forEach(d=>{u||i.push([s,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let a=e[n.join(",")]=new x8(n.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(IZe);a.next.push({type:i[o][0],next:e[s.join(",")]||r(s)})}return a}}function w9r(t,e){for(let r=0,n=[t];r<n.length;r++){let i=n[r],a=!i.validEnd,o=[];for(let s=0;s<i.next.length;s++){let{type:l,next:u}=i.next[s];o.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),n.indexOf(u)==-1&&n.push(u)}a&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function PZe(t){let e=Object.create(null);for(let r in t){let n=t[r];if(!n.hasDefault)return null;e[r]=n.default}return e}function BZe(t,e){let r=Object.create(null);for(let n in t){let i=e&&e[n];if(i===void 0){let a=t[n];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+n)}r[n]=i}return r}function HZe(t,e,r,n){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${r} of type ${i}`);for(let i in t){let a=t[i];a.validate&&a.validate(e[i])}}function FZe(t,e){let r=Object.create(null);if(e)for(let n in e)r[n]=new O9r(t,n,e[n]);return r}let VZe=class Zht{constructor(e,r,n){this.name=e,this.schema=r,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=FZe(e,n.attrs),this.defaultAttrs=PZe(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==x8.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:BZe(this.attrs,e)}create(e=null,r,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Od(this,this.computeAttrs(e),Gt.from(r),ha.setFrom(n))}createChecked(e=null,r,n){return r=Gt.from(r),this.checkContent(r),new Od(this,this.computeAttrs(e),r,ha.setFrom(n))}createAndFill(e=null,r,n){if(e=this.computeAttrs(e),r=Gt.from(r),r.size){let o=this.contentMatch.fillBefore(r);if(!o)return null;r=o.append(r)}let i=this.contentMatch.matchFragment(r),a=i&&i.fillBefore(Gt.empty,!0);return a?new Od(this,e,r.append(a),ha.setFrom(n)):null}validContent(e){let r=this.contentMatch.matchFragment(e);if(!r||!r.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){HZe(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let r=0;r<e.length;r++)if(!this.allowsMarkType(e[r].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let r;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?r&&r.push(e[n]):r||(r=e.slice(0,n));return r?r.length?r:ha.none:e}static compile(e,r){let n=Object.create(null);e.forEach((a,o)=>n[a]=new Zht(a,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let a in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function A9r(t,e,r){let n=r.split("|");return i=>{let a=i===null?"null":typeof i;if(n.indexOf(a)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${t}, got ${a}`)}}class O9r{constructor(e,r,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?A9r(e,r,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class IH{constructor(e,r,n,i){this.name=e,this.rank=r,this.schema=n,this.spec=i,this.attrs=FZe(e,i.attrs),this.excluded=null;let a=PZe(this.attrs);this.instance=a?new ha(this,a):null}create(e=null){return!e&&this.instance?this.instance:new ha(this,BZe(this.attrs,e))}static compile(e,r){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new IH(a,i++,r,o)),n}removeFromSet(e){for(var r=0;r<e.length;r++)e[r].type==this&&(e=e.slice(0,r).concat(e.slice(r+1)),r--);return e}isInSet(e){for(let r=0;r<e.length;r++)if(e[r].type==this)return e[r]}checkAttrs(e){HZe(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class $Ze{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let r=this.spec={};for(let i in e)r[i]=e[i];r.nodes=Ql.from(e.nodes),r.marks=Ql.from(e.marks||{}),this.nodes=VZe.compile(this.spec.nodes,this),this.marks=IH.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=n[o]||(n[o]=x8.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?UZe(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:UZe(this,o.split(" "))}this.nodeFromJSON=i=>Od.fromJSON(this,i),this.markFromJSON=i=>ha.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,r=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof VZe){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(r,n,i)}text(e,r){let n=this.nodes.text;return new NH(n,n.defaultAttrs,e,ha.setFrom(r))}mark(e,r){return typeof e=="string"&&(e=this.marks[e]),e.create(r)}nodeType(e){let r=this.nodes[e];if(!r)throw new RangeError("Unknown node type: "+e);return r}}function UZe(t,e){let r=[];for(let n=0;n<e.length;n++){let i=e[n],a=t.marks[i],o=a;if(a)r.push(a);else for(let s in t.marks){let l=t.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&r.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return r}function M9r(t){return t.tag!=null}function R9r(t){return t.style!=null}let Rw=class lfe{constructor(e,r){this.schema=e,this.rules=r,this.tags=[],this.styles=[];let n=this.matchedStyles=[];r.forEach(i=>{if(M9r(i))this.tags.push(i);else if(R9r(i)){let a=/[^=]*/.exec(i.style)[0];n.indexOf(a)<0&&n.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,r={}){let n=new WZe(this,r,!1);return n.addAll(e,ha.none,r.from,r.to),n.finish()}parseSlice(e,r={}){let n=new WZe(this,r,!0);return n.addAll(e,ha.none,r.from,r.to),Lr.maxOpen(n.finish())}matchTag(e,r,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(I9r(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||r.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(e);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(e,r,n,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=r))){if(o.getAttrs){let l=o.getAttrs(r);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let r=[];function n(i){let a=i.priority==null?50:i.priority,o=0;for(;o<r.length;o++){let s=r[o];if((s.priority==null?50:s.priority)<a)break}r.splice(o,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(o=>{n(o=YZe(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(o=>{n(o=YZe(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new lfe(e,lfe.schemaRules(e)))}};const zZe={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},D9r={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},GZe={ol:!0,ul:!0},Dw=1,qle=2,Nw=4;function qZe(t,e,r){return e!=null?(e?Dw:0)|(e==="full"?qle:0):t&&t.whitespace=="pre"?Dw|qle:r&~Nw}class kH{constructor(e,r,n,i,a,o){this.type=e,this.attrs=r,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=ha.none,this.match=a||(o&Nw?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(Gt.from(e));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Dw)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let a=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let r=Gt.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(Gt.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!zZe.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class WZe{constructor(e,r,n){this.parser=e,this.options=r,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=r.topNode,a,o=qZe(null,r.preserveWhitespace,0)|(n?Nw:0);i?a=new kH(i.type,i.attrs,ha.none,!0,r.topMatch||i.type.contentMatch,o):n?a=new kH(null,null,ha.none,!0,null,o):a=new kH(e.schema.topNodeType,null,ha.none,!0,null,o),this.nodes=[a],this.find=r.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,r){e.nodeType==3?this.addTextNode(e,r):e.nodeType==1&&this.addElement(e,r)}addTextNode(e,r){let n=e.nodeValue,i=this.top,a=i.options&qle?"full":this.localPreserveWS||(i.options&Dw)>0;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)a!=="full"?n=n.replace(/\r?\n|\r/g," "):n=n.replace(/\r\n?/g,`
|
|
971
971
|
`);else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),r,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,r,n){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;GZe.hasOwnProperty(o)&&this.parser.normalizeLists&&N9r(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:D9r.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,r);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,d=this.needsBlock;if(zZe.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),u=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,r);break e}let h=l&&l.skip?r:this.readStyles(e,r);h&&this.addAll(e,h),u&&this.sync(a),this.needsBlock=d}else{let u=this.readStyles(e,r);u&&this.addElementByRule(e,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,r){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
972
972
|
`),r)}ignoreFallback(e,r){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),r,!0)}readStyles(e,r){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],o=n.getPropertyValue(a);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(a,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?r=r.filter(u=>!l.clearMark(u)):r=r.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return r}addElementByRule(e,r,n,i){let a,o;if(r.node)if(o=this.parser.schema.nodes[r.node],o.isLeaf)this.insertNode(o.create(r.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,r.attrs||null,n,r.preserveWhitespace);l&&(a=!0,n=l)}else{let l=this.parser.schema.marks[r.mark];n=n.concat(l.create(r.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(r.getContent)this.findInside(e),r.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof r.contentElement=="string"?l=e.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(e):r.contentElement&&(l=r.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}a&&this.sync(s)&&this.open--}addAll(e,r,n,i){let a=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(o,r);this.findAtPoint(e,a)}findPlace(e,r,n){let i,a;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+s)&&(i=u,a=l,!u.length))break;if(l.solid){if(n)break;s+=2}}if(!i)return null;this.sync(a);for(let o=0;o<i.length;o++)r=this.enterInner(i[o],null,r,!1);return r}insertNode(e,r,n){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(r=this.enterInner(a,null,r))}let i=this.findPlace(e,r,n);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let o=ha.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):jZe(s.type,e.type))&&(o=s.addToSet(o));return a.content.push(e.mark(o)),!0}return!1}enter(e,r,n,i){let a=this.findPlace(e.create(r),n,!1);return a&&(a=this.enterInner(e,r,n,!0,i)),a}enterInner(e,r,n,i=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=qZe(e,a,o.options);o.options&Nw&&o.content.length==0&&(s|=Nw);let l=ha.none;return n=n.filter(u=>(o.type?o.type.allowsMarkType(u.type):jZe(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new kH(e,r,l,i,null,s)),this.open++,n}closeExtra(e=!1){let r=this.nodes.length-1;if(r>this.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let r=this.open;r>=0;r--){if(this.nodes[r]==e)return this.open=r,!0;this.localPreserveWS&&(this.nodes[r].options|=Dw)}return!1}get currentPos(){this.closeExtra();let e=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;r&&e++}return e}findAtPoint(e,r){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==r&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&(this.find[r].pos=this.currentPos)}findAround(e,r,n){if(e!=r&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&r.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&(this.find[r].pos=this.currentPos-(e.nodeValue.length-this.find[r].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let r=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),a=-(n?n.depth+1:0)+(i?0:1),o=(s,l)=>{for(;s>=0;s--){let u=r[s];if(u==""){if(s==r.length-1||s==0)continue;for(;l>=a;l--)if(o(s-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:n&&l>=a?n.node(l-a).type:null;if(!d||d.name!=u&&!d.isInGroup(u))return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let r=e.depth;r>=0;r--){let n=e.node(r).contentMatchAt(e.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}}function N9r(t){for(let e=t.firstChild,r=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&GZe.hasOwnProperty(n)&&r?(r.appendChild(e),e=r):n=="li"?r=e:n&&(r=null)}}function I9r(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function YZe(t){let e={};for(let r in t)e[r]=t[r];return e}function jZe(t,e){let r=e.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(t))continue;let a=[],o=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:u,next:d}=s.edge(l);if(u==e||a.indexOf(d)<0&&o(d))return!0}};if(o(i.contentMatch))return!0}}class E8{constructor(e,r){this.nodes=e,this.marks=r}serializeFragment(e,r={},n){n||(n=Wle(r).createDocumentFragment());let i=n,a=[];return e.forEach(o=>{if(a.length||o.marks.length){let s=0,l=0;for(;s<a.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(a[s][0])||u.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)i=a.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],d=this.serializeMark(u,o.isInline,r);d&&(a.push([u,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(o,r))}),n}serializeNodeInner(e,r){let{dom:n,contentDOM:i}=PH(Wle(r),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,r,i)}return n}serializeNode(e,r={}){let n=this.serializeNodeInner(e,r);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,r);a&&((a.contentDOM||a.dom).appendChild(n),n=a.dom)}return n}serializeMark(e,r,n={}){let i=this.marks[e.type.name];return i&&PH(Wle(n),i(e,r),null,e.attrs)}static renderSpec(e,r,n=null,i){return PH(e,r,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new E8(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let r=XZe(e.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(e){return XZe(e.marks)}}function XZe(t){let e={};for(let r in t){let n=t[r].spec.toDOM;n&&(e[r]=n)}return e}function Wle(t){return t.document||window.document}const KZe=new WeakMap;function k9r(t){let e=KZe.get(t);return e===void 0&&KZe.set(t,e=P9r(t)),e}function P9r(t){let e=null;function r(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)r(n[i]);else for(let i in n)r(n[i])}return r(t),e}function PH(t,e,r,n){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=k9r(n))&&a.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let s,l=r?t.createElementNS(r,i):t.createElement(i),u=e[1],d=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){d=2;for(let h in u)if(u[h]!=null){let f=h.indexOf(" ");f>0?l.setAttributeNS(h.slice(0,f),h.slice(f+1),u[h]):h=="style"&&l.style?l.style.cssText=u[h]:l.setAttribute(h,u[h])}}for(let h=d;h<e.length;h++){let f=e[h];if(f===0){if(h<e.length-1||h>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:g}=PH(t,f,r,n);if(l.appendChild(p),g){if(s)throw new RangeError("Multiple content holes");s=g}}}return{dom:l,contentDOM:s}}const ZZe=65535,JZe=Math.pow(2,16);function B9r(t,e){return t+e*JZe}function eJe(t){return t&ZZe}function H9r(t){return(t-(t&ZZe))/JZe}const tJe=1,rJe=2,BH=4,nJe=8;class Yle{constructor(e,r,n){this.pos=e,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&nJe)>0}get deletedBefore(){return(this.delInfo&(tJe|BH))>0}get deletedAfter(){return(this.delInfo&(rJe|BH))>0}get deletedAcross(){return(this.delInfo&BH)>0}}class q1{constructor(e,r=!1){if(this.ranges=e,this.inverted=r,!e.length&&q1.empty)return q1.empty}recover(e){let r=0,n=eJe(e);if(!this.inverted)for(let i=0;i<n;i++)r+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+r+H9r(e)}mapResult(e,r=1){return this._map(e,r,!1)}map(e,r=1){return this._map(e,r,!0)}_map(e,r,n){let i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[s+a],d=this.ranges[s+o],h=l+u;if(e<=h){let f=u?e==l?-1:e==h?1:r:r,p=l+i+(f<0?0:d);if(n)return p;let g=e==(r<0?l:h)?null:B9r(s/3,e-l),m=e==l?rJe:e==h?tJe:BH;return(r<0?e!=l:e!=h)&&(m|=nJe),new Yle(p,m,g)}i+=d-u}return n?e+i:new Yle(e+i,0,null)}touches(e,r){let n=0,i=eJe(r),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;let u=this.ranges[s+a],d=l+u;if(e<=d&&s==i*3)return!0;n+=this.ranges[s+o]-u}return!1}forEach(e){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let o=this.ranges[i],s=o-(this.inverted?a:0),l=o+(this.inverted?0:a),u=this.ranges[i+r],d=this.ranges[i+n];e(s,s+u,l,l+d),a+=d-u}}invert(){return new q1(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?q1.empty:new q1(e<0?[0,-e,0]:[0,0,e])}}q1.empty=new q1([]);class Iw{constructor(e,r,n=0,i=e?e.length:0){this.mirror=r,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||r)}get maps(){return this._maps}slice(e=0,r=this.maps.length){return new Iw(this._maps,this.mirror,e,r)}appendMap(e,r){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),r!=null&&this.setMirror(this._maps.length-1,r)}appendMapping(e){for(let r=0,n=this._maps.length;r<e._maps.length;r++){let i=e.getMirror(r);this.appendMap(e._maps[r],i!=null&&i<r?n+i:void 0)}}getMirror(e){if(this.mirror){for(let r=0;r<this.mirror.length;r++)if(this.mirror[r]==e)return this.mirror[r+(r%2?-1:1)]}}setMirror(e,r){this.mirror||(this.mirror=[]),this.mirror.push(e,r)}appendMappingInverted(e){for(let r=e.maps.length-1,n=this._maps.length+e._maps.length;r>=0;r--){let i=e.getMirror(r);this.appendMap(e._maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let e=new Iw;return e.appendMappingInverted(this),e}map(e,r=1){if(this.mirror)return this._map(e,r,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,r);return e}mapResult(e,r=1){return this._map(e,r,!1)}_map(e,r,n){let i=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(e,r);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new Yle(e,i,null)}}const jle=Object.create(null);class nu{getMap(){return q1.empty}merge(e){return null}static fromJSON(e,r){if(!r||!r.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=jle[r.stepType];if(!n)throw new RangeError(`No step type ${r.stepType} defined`);return n.fromJSON(e,r)}static jsonID(e,r){if(e in jle)throw new RangeError("Duplicate use of step JSON ID "+e);return jle[e]=r,r.prototype.jsonID=e,r}}class Ko{constructor(e,r){this.doc=e,this.failed=r}static ok(e){return new Ko(e,null)}static fail(e){return new Ko(null,e)}static fromReplace(e,r,n,i){try{return Ko.ok(e.replace(r,n,i))}catch(a){if(a instanceof MH)return Ko.fail(a.message);throw a}}}function Xle(t,e,r){let n=[];for(let i=0;i<t.childCount;i++){let a=t.child(i);a.content.size&&(a=a.copy(Xle(a.content,e,a))),a.isInline&&(a=e(a,r,i)),n.push(a)}return Gt.fromArray(n)}class J5 extends nu{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),a=new Lr(Xle(r.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return Ko.fromReplace(e,this.from,this.to,a)}invert(){return new Md(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new J5(r.pos,n.pos,this.mark)}merge(e){return e instanceof J5&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new J5(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new J5(r.from,r.to,e.markFromJSON(r.mark))}}nu.jsonID("addMark",J5);class Md extends nu{constructor(e,r,n){super(),this.from=e,this.to=r,this.mark=n}apply(e){let r=e.slice(this.from,this.to),n=new Lr(Xle(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),r.openStart,r.openEnd);return Ko.fromReplace(e,this.from,this.to,n)}invert(){return new J5(this.from,this.to,this.mark)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Md(r.pos,n.pos,this.mark)}merge(e){return e instanceof Md&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Md(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Md(r.from,r.to,e.markFromJSON(r.mark))}}nu.jsonID("removeMark",Md);class ep extends nu{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return Ko.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return Ko.fromReplace(e,this.pos,this.pos+1,new Lr(Gt.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;i<r.marks.length;i++)if(!r.marks[i].isInSet(n))return new ep(this.pos,r.marks[i]);return new ep(this.pos,this.mark)}}return new S8(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new ep(r.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ep(r.pos,e.markFromJSON(r.mark))}}nu.jsonID("addNodeMark",ep);class S8 extends nu{constructor(e,r){super(),this.pos=e,this.mark=r}apply(e){let r=e.nodeAt(this.pos);if(!r)return Ko.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.removeFromSet(r.marks));return Ko.fromReplace(e,this.pos,this.pos+1,new Lr(Gt.from(n),0,r.isLeaf?0:1))}invert(e){let r=e.nodeAt(this.pos);return!r||!this.mark.isInSet(r.marks)?this:new ep(this.pos,this.mark)}map(e){let r=e.mapResult(this.pos,1);return r.deletedAfter?null:new S8(r.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new S8(r.pos,e.markFromJSON(r.mark))}}nu.jsonID("removeNodeMark",S8);class Zs extends nu{constructor(e,r,n,i=!1){super(),this.from=e,this.to=r,this.slice=n,this.structure=i}apply(e){return this.structure&&Kle(e,this.from,this.to)?Ko.fail("Structure replace would overwrite content"):Ko.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new q1([this.from,this.to-this.from,this.slice.size])}invert(e){return new Zs(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return r.deletedAcross&&n.deletedAcross?null:new Zs(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Zs)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let r=this.slice.size+e.slice.size==0?Lr.empty:new Lr(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Zs(this.from,this.to+(e.to-e.from),r,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let r=this.slice.size+e.slice.size==0?Lr.empty:new Lr(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Zs(e.from,this.to,r,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Zs(r.from,r.to,Lr.fromJSON(e,r.slice),!!r.structure)}}nu.jsonID("replace",Zs);class Js extends nu{constructor(e,r,n,i,a,o,s=!1){super(),this.from=e,this.to=r,this.gapFrom=n,this.gapTo=i,this.slice=a,this.insert=o,this.structure=s}apply(e){if(this.structure&&(Kle(e,this.from,this.gapFrom)||Kle(e,this.gapTo,this.to)))return Ko.fail("Structure gap-replace would overwrite content");let r=e.slice(this.gapFrom,this.gapTo);if(r.openStart||r.openEnd)return Ko.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,r.content);return n?Ko.fromReplace(e,this.from,this.to,n):Ko.fail("Content does not fit in gap")}getMap(){return new q1([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let r=this.gapTo-this.gapFrom;return new Js(this.from,this.from+this.slice.size+r,this.from+this.insert,this.from+this.insert+r,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let r=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?r.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return r.deletedAcross&&n.deletedAcross||i<r.pos||a>n.pos?null:new Js(r.pos,n.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Js(r.from,r.to,r.gapFrom,r.gapTo,Lr.fromJSON(e,r.slice),r.insert,!!r.structure)}}nu.jsonID("replaceAround",Js);function Kle(t,e,r){let n=t.resolve(e),i=r-e,a=n.depth;for(;i>0&&a>0&&n.indexAfter(a)==n.node(a).childCount;)a--,i--;if(i>0){let o=n.node(a).maybeChild(n.indexAfter(a));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function F9r(t,e,r,n){let i=[],a=[],o,s;t.doc.nodesBetween(e,r,(l,u,d)=>{if(!l.isInline)return;let h=l.marks;if(!n.isInSet(h)&&d.type.allowsMarkType(n.type)){let f=Math.max(u,e),p=Math.min(u+l.nodeSize,r),g=n.addToSet(h);for(let m=0;m<h.length;m++)h[m].isInSet(g)||(o&&o.to==f&&o.mark.eq(h[m])?o.to=p:i.push(o=new Md(f,p,h[m])));s&&s.to==f?s.to=p:a.push(s=new J5(f,p,n))}}),i.forEach(l=>t.step(l)),a.forEach(l=>t.step(l))}function V9r(t,e,r,n){let i=[],a=0;t.doc.nodesBetween(e,r,(o,s)=>{if(!o.isInline)return;a++;let l=null;if(n instanceof IH){let u=o.marks,d;for(;d=n.isInSet(u);)(l||(l=[])).push(d),u=d.removeFromSet(u)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let u=Math.min(s+o.nodeSize,r);for(let d=0;d<l.length;d++){let h=l[d],f;for(let p=0;p<i.length;p++){let g=i[p];g.step==a-1&&h.eq(i[p].style)&&(f=g)}f?(f.to=u,f.step=a):i.push({style:h,from:Math.max(s,e),to:u,step:a})}}}),i.forEach(o=>t.step(new Md(o.from,o.to,o.style)))}function Zle(t,e,r,n=r.contentMatch,i=!0){let a=t.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<a.childCount;l++){let u=a.child(l),d=s+u.nodeSize,h=n.matchType(u.type);if(!h)o.push(new Zs(s,d,Lr.empty));else{n=h;for(let f=0;f<u.marks.length;f++)r.allowsMarkType(u.marks[f].type)||t.step(new Md(s,d,u.marks[f]));if(i&&u.isText&&r.whitespace!="pre"){let f,p=/\r?\n|\r/g,g;for(;f=p.exec(u.text);)g||(g=new Lr(Gt.from(r.schema.text(" ",r.allowedMarks(u.marks))),0,0)),o.push(new Zs(s+f.index,s+f.index+f[0].length,g))}}s=d}if(!n.validEnd){let l=n.fillBefore(Gt.empty,!0);t.replace(s,s,new Lr(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function $9r(t,e,r){return(e==0||t.canReplace(e,t.childCount))&&(r==t.childCount||t.canReplace(0,r))}function Jy(t){let r=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let i=t.$from.node(n),a=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&i.canReplace(a,o,r))return n;if(n==0||i.type.spec.isolating||!$9r(i,a,o))break}return null}function U9r(t,e,r){let{$from:n,$to:i,depth:a}=e,o=n.before(a+1),s=i.after(a+1),l=o,u=s,d=Gt.empty,h=0;for(let g=a,m=!1;g>r;g--)m||n.index(g)>0?(m=!0,d=Gt.from(n.node(g).copy(d)),h++):l--;let f=Gt.empty,p=0;for(let g=a,m=!1;g>r;g--)m||i.after(g+1)<i.end(g)?(m=!0,f=Gt.from(i.node(g).copy(f)),p++):u++;t.step(new Js(l,u,o,s,new Lr(d.append(f),h,p),d.size-h,!0))}function iJe(t,e,r=null,n=t){let i=z9r(t,e),a=i&&G9r(n,e);return a?i.map(aJe).concat({type:e,attrs:r}).concat(a.map(aJe)):null}function aJe(t){return{type:t,attrs:null}}function z9r(t,e){let{parent:r,startIndex:n,endIndex:i}=t,a=r.contentMatchAt(n).findWrapping(e);if(!a)return null;let o=a.length?a[0]:e;return r.canReplaceWith(n,i,o)?a:null}function G9r(t,e){let{parent:r,startIndex:n,endIndex:i}=t,a=r.child(n),o=e.contentMatch.findWrapping(a.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let u=n;l&&u<i;u++)l=l.matchType(r.child(u).type);return!l||!l.validEnd?null:o}function q9r(t,e,r){let n=Gt.empty;for(let o=r.length-1;o>=0;o--){if(n.size){let s=r[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=Gt.from(r[o].type.create(r[o].attrs,n))}let i=e.start,a=e.end;t.step(new Js(i,a,i,a,new Lr(n,0,0),r.length,!0))}function W9r(t,e,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=t.steps.length;t.doc.nodesBetween(e,r,(o,s)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&Y9r(t.doc,t.mapping.slice(a).map(s),n)){let u=null;if(n.schema.linebreakReplacement){let p=n.whitespace=="pre",g=!!n.contentMatch.matchType(n.schema.linebreakReplacement);p&&!g?u=!1:!p&&g&&(u=!0)}u===!1&&sJe(t,o,s,a),Zle(t,t.mapping.slice(a).map(s,1),n,void 0,u===null);let d=t.mapping.slice(a),h=d.map(s,1),f=d.map(s+o.nodeSize,1);return t.step(new Js(h,f,h+1,f-1,new Lr(Gt.from(n.create(l,null,o.marks)),0,0),1,!0)),u===!0&&oJe(t,o,s,a),!1}})}function oJe(t,e,r,n){e.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let l=t.mapping.slice(n).map(r+1+a+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function sJe(t,e,r,n){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(n).map(r+1+a);t.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -1050,7 +1050,7 @@ img.ProseMirror-separator {
|
|
|
1050
1050
|
display: block;
|
|
1051
1051
|
}`;function rxr(t,e,r){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}var nxr=class extends ybr{constructor(e={}){super(),this.css=null,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:i})=>{throw i},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:i,slice:a,moved:o})=>this.options.onDrop(i,a,o)),this.on("paste",({event:i,slice:a})=>this.options.onPaste(i,a)),this.on("delete",this.options.onDelete);const r=this.createDoc(),n=ptt(r,this.options.autofocus);this.editorState=n_.create({doc:r,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){var e;if(this.editorView){const r=this.editorView.dom;r!=null&&r.editor&&delete r.editor,this.editorView.destroy()}this.editorView=null,this.isInitialized=!1,(e=this.css)==null||e.remove(),this.css=null}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=rxr(txr,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,r=!0){this.setOptions({editable:e}),r&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.editorState=this.state.apply(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,r)=>{if(r==="state")return this.editorState;if(r in e)return Reflect.get(e,r);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${r}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,r){const n=ett(r)?r(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const r=this.state.plugins;let n=r;if([].concat(e).forEach(a=>{const o=typeof a=="string"?`${a}$`:a.key;n=n.filter(s=>!s.key.startsWith(o))}),r.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,r;const i=[...this.options.enableCoreExtensions?[Stt,mtt.configure({blockSeparator:(r=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:r.blockSeparator}),Qtt,Ltt,wtt,Ott,Ett,Att,xtt].filter(a=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[a.name]!==!1:!0):[],...this.options.extensions].filter(a=>["extension","node","mark"].includes(a==null?void 0:a.type));this.extensionManager=new cF(i,this)}createCommandManager(){this.commandManager=new JH({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=kue(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(r){if(!(r instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(r.message))throw r;this.emit("contentError",{editor:this,error:r,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=kue(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var r;this.editorView=new Ret(e,{...this.options.editorProps,attributes:{role:"textbox",...(r=this.options.editorProps)==null?void 0:r.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass(),this.injectCSS();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(d=>{var h;return(h=this.capturedTransaction)==null?void 0:h.step(d)});return}const{state:r,transactions:n}=this.state.applyTransaction(e),i=!this.state.selection.eq(r.selection),a=n.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:r}),!a)return;this.view.updateState(r),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});const s=n.findLast(d=>d.getMeta("focus")||d.getMeta("blur")),l=s==null?void 0:s.getMeta("focus"),u=s==null?void 0:s.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),u&&this.emit("blur",{editor:this,event:u.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(d=>d.docChanged)||o.doc.eq(r.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Abr(this.state,e)}isActive(e,r){const n=typeof e=="string"?e:null,i=typeof e=="string"?r:e;return Nbr(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Hue(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:r=`
|
|
1052
1052
|
|
|
1053
|
-
`,textSerializers:n={}}=e||{};return Lbr(this.state.doc,{blockSeparator:r,textSerializers:{...ott(this.schema),...n}})}get isEmpty(){return oF(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,r;return(r=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?r:!0}$node(e,r){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,r))||null}$nodes(e,r){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,r))||null}$pos(e){const r=this.state.doc.resolve(e);return new exr(r,this)}get $doc(){return this.$pos(0)}};function ixr(t,e,r={}){const{state:n}=e,{doc:i,tr:a}=n,o=t;i.descendants((s,l)=>{const u=a.mapping.map(l),d=a.mapping.map(l)+s.nodeSize;let h=null;if(s.marks.forEach(p=>{if(p!==o)return!1;h=p}),!h)return;let f=!1;if(Object.keys(r).forEach(p=>{r[p]!==h.attrs[p]&&(f=!0)}),f){const p=t.type.create({...t.attrs,...r});a.removeMark(u,d,t.type),a.addMark(u,d,p)}}),a.docChanged&&e.view.dispatch(a)}var Zw=class tft extends zue{constructor(){super(...arguments),this.type="node"}static create(e={}){const r=typeof e=="function"?e():e;return new tft(r)}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}},axr=class{constructor(t,e,r){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,r,n,i,a,o,s;const{view:l}=this.editor,u=t.target,d=u.nodeType===3?(e=u.parentElement)==null?void 0:e.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(r=this.contentDOM)!=null&&r.contains(u)||!d)return;let h=0,f=0;if(this.dom!==d){const T=this.dom.getBoundingClientRect(),y=d.getBoundingClientRect(),_=(i=t.offsetX)!=null?i:(n=t.nativeEvent)==null?void 0:n.offsetX,Q=(o=t.offsetY)!=null?o:(a=t.nativeEvent)==null?void 0:a.offsetY;h=y.x-T.x+_,f=y.y-T.y+Q}const p=this.dom.cloneNode(!0);(s=t.dataTransfer)==null||s.setDragImage(p,h,f);const g=this.getPos();if(typeof g!="number")return;const m=nn.create(l.state.doc,g),v=l.state.tr.setSelection(m);l.dispatch(v)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!((e=this.contentDOM)!=null&&e.contains(r))))return!1;const i=t.type.startsWith("drag"),a=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!i)return!0;const{isEditable:s}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,d=nn.isSelectable(this.node),h=t.type==="copy",f=t.type==="paste",p=t.type==="cut",g=t.type==="mousedown";if(!u&&d&&i&&t.target===this.dom&&t.preventDefault(),u&&i&&!l&&t.target===this.dom)return t.preventDefault(),!1;if(u&&s&&!l&&g){const m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||a||h||f||p||g&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(dF()||vtt())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const r=this.getPos();return typeof r!="number"?!1:(e.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function Mtt(t){return I.customRef((e,r)=>({get(){return e(),t},set(n){t=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}}))}var oxr=class extends nxr{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=Mtt(this.view.state),this.reactiveExtensionStorage=Mtt(this.extensionStorage),this.on("beforeTransaction",({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),I.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){const r=super.registerPlugin(t,e);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(t){const e=super.unregisterPlugin(t);return this.reactiveState&&e&&(this.reactiveState.value=e),e}},sxr=I.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=I.ref(),r=I.getCurrentInstance();return I.watchEffect(()=>{const n=t.editor;n&&n.options.element&&e.value&&I.nextTick(()=>{var i;if(!e.value||!((i=n.options.element)!=null&&i.firstChild))return;const a=I.unref(e.value);e.value.append(...n.options.element.childNodes),n.contentComponent=r.ctx._,r&&(n.appContext={...r.appContext,provides:r.provides}),n.setOptions({element:a}),n.createNodeViews()})}),I.onBeforeUnmount(()=>{const n=t.editor;n&&(n.contentComponent=null,n.appContext=null)}),{rootEl:e}},render(){return I.h("div",{ref:t=>{this.rootEl=t}})}}),Rtt=I.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return I.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),Dtt=I.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return I.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)==null?void 0:e.call(t))}}),lxr=(t={})=>{const e=I.shallowRef();return I.onMounted(()=>{e.value=new oxr(t)}),I.onBeforeUnmount(()=>{var r,n,i;const a=(r=e.value)==null?void 0:r.options.element,o=a==null?void 0:a.cloneNode(!0);(n=a==null?void 0:a.parentNode)==null||n.replaceChild(o,a),(i=e.value)==null||i.destroy()}),e},uxr=class{constructor(t,{props:e={},editor:r}){this.editor=r,this.component=I.markRaw(t),this.el=document.createElement("div"),this.props=I.reactive(e),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var t,e,r,n;return(e=(t=this.renderedComponent.vNode)==null?void 0:t.component)!=null&&e.exposed?this.renderedComponent.vNode.component.exposed:(n=(r=this.renderedComponent.vNode)==null?void 0:r.component)==null?void 0:n.proxy}renderComponent(){let t=I.h(this.component,this.props);return this.editor.appContext&&(t.appContext=this.editor.appContext),typeof document<"u"&&this.el&&I.render(t,this.el),{vNode:t,destroy:()=>{this.el&&I.render(null,this.el),this.el=null,t=null},el:this.el?this.el.firstElementChild:null}}updateProps(t={}){Object.entries(t).forEach(([e,r])=>{this.props[e]=r}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}};I.defineComponent({name:"MarkViewContent",props:{as:{type:String,default:"span"}},render(){return I.h(this.as,{style:{whiteSpace:"inherit"},"data-mark-view-content":""})}});var Ntt={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}},cxr=class extends axr{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(n={})=>this.updateAttributes(n),deleteNode:()=>this.deleteNode()},e=this.onDragStart.bind(this);this.decorationClasses=I.ref(this.getDecorationClasses());const r=I.defineComponent({extends:{...this.component},props:Object.keys(t),template:this.component.template,setup:n=>{var i,a;return I.provide("onDragStart",e),I.provide("decorationClasses",this.decorationClasses),(a=(i=this.component).setup)==null?void 0:a.call(i,n,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new uxr(r,{editor:this.editor,props:t})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:t,to:e}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(t<=r&&e>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,e,r){const n=i=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(i)};if(typeof this.options.update=="function"){const i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:a,newNode:t,newDecorations:e,oldInnerDecorations:o,innerDecorations:r,updateProps:()=>n({node:t,decorations:e,innerDecorations:r})})}return t.type!==this.node.type?!1:(t===this.node&&this.decorations===e&&this.innerDecorations===r||(this.node=t,this.decorations=e,this.innerDecorations=r,n({node:t,decorations:e,innerDecorations:r})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(t=>t.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}};function Itt(t,e){return r=>{if(!r.editor.contentComponent)return{};const n=typeof t=="function"&&"__vccOpts"in t?t.__vccOpts:t;return new cxr(n,r,e)}}function dxr(t={}){return new el({view(e){return new hxr(e,t)}})}class hxr{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let a=o=>{this[i](o)};return e.dom.addEventListener(i,a),{name:i,handler:a}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n,i=this.editorView.dom,a=i.getBoundingClientRect(),o=a.width/i.offsetWidth,s=a.height/i.offsetHeight;if(r){let h=e.nodeBefore,f=e.nodeAfter;if(h||f){let p=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(p){let g=p.getBoundingClientRect(),m=h?g.bottom:g.top;h&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let v=this.width/2*s;n={left:g.left,right:g.right,top:m-v,bottom:m+v}}}}if(!n){let h=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;n={left:h.left-f,right:h.left+f,top:h.top,bottom:h.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,d=-pageYOffset;else{let h=l.getBoundingClientRect(),f=h.width/l.offsetWidth,p=h.height/l.offsetHeight;u=h.left-l.scrollLeft*f,d=h.top-l.scrollTop*p}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-d)/s+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/s+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),i=n&&n.type.spec.disableDropCursor,a=typeof i=="function"?i(this.editorView,r,e):i;if(r&&!a){let o=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=uJe(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class fo extends Wn{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return fo.valid(n)?new fo(n):Wn.near(n)}content(){return Lr.empty}eq(e){return e instanceof fo&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new fo(e.resolve(r.pos))}getBookmark(){return new Wue(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!fxr(e)||!pxr(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let i=r.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&fo.valid(e))return e;let i=e.pos,a=null;for(let o=e.depth;;o--){let s=e.node(o);if(r>0?e.indexAfter(o)<s.childCount:e.index(o)>0){a=s.child(r>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=r;let l=e.doc.resolve(i);if(fo.valid(l))return l}for(;;){let o=r>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!nn.isSelectable(a)){e=e.doc.resolve(i+a.nodeSize*r),n=!1;continue e}break}a=o,i+=r;let s=e.doc.resolve(i);if(fo.valid(s))return s}return null}}}fo.prototype.visible=!1,fo.findFrom=fo.findGapCursorFrom,Wn.jsonID("gapcursor",fo);class Wue{constructor(e){this.pos=e}map(e){return new Wue(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return fo.valid(r)?new fo(r):Wn.near(r)}}function fxr(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function pxr(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function gxr(){return new el({props:{decorations:yxr,createSelectionBetween(t,e,r){return e.pos==r.pos&&fo.valid(r)?new fo(r):null},handleClick:Txr,handleKeyDown:mxr,handleDOMEvents:{beforeinput:vxr}}})}const mxr=Bet({ArrowLeft:hF("horiz",-1),ArrowRight:hF("horiz",1),ArrowUp:hF("vert",-1),ArrowDown:hF("vert",1)});function hF(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,a){let o=n.selection,s=e>0?o.$to:o.$from,l=o.empty;if(o instanceof Gn){if(!a.endOfTextblock(r)||s.depth==0)return!1;l=!1,s=n.doc.resolve(e>0?s.after():s.before())}let u=fo.findGapCursorFrom(s,e,l);return u?(i&&i(n.tr.setSelection(new fo(u))),!0):!1}}function Txr(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!fo.valid(n))return!1;let i=t.posAtCoords({left:r.clientX,top:r.clientY});return i&&i.inside>-1&&nn.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new fo(n))),!0)}function vxr(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof fo))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let i=Gt.empty;for(let o=n.length-1;o>=0;o--)i=Gt.from(n[o].createAndFill(null,i));let a=t.state.tr.replace(r.pos,r.pos,new Lr(i,0,0));return a.setSelection(Gn.near(a.doc.resolve(r.pos+1))),t.dispatch(a),!1}function yxr(t){if(!(t.selection instanceof fo))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ya.create(t.doc,[Yu.widget(t.selection.head,e,{key:"gapcursor"})])}var fF=200,nl=function(){};nl.prototype.append=function(e){return e.length?(e=nl.from(e),!this.length&&e||e.length<fF&&this.leafAppend(e)||this.length<fF&&e.leafPrepend(this)||this.appendInner(e)):this},nl.prototype.prepend=function(e){return e.length?nl.from(e).append(this):this},nl.prototype.appendInner=function(e){return new _xr(this,e)},nl.prototype.slice=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.length),e>=r?nl.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))},nl.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},nl.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)},nl.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(a,o){return i.push(e(a,o))},r,n),i},nl.from=function(e){return e instanceof nl?e:e&&e.length?new ktt(e):nl.empty};var ktt=function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new e(this.values.slice(i,a))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,a,o,s){for(var l=a;l<o;l++)if(i(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,a,o,s){for(var l=a-1;l>=o;l--)if(i(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=fF)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=fF)return new e(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(nl);nl.empty=new ktt([]);var _xr=function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,a,o){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(n,Math.min(i,s),a,o)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var a=this.left.length;return i<=a?this.left.slice(n,i):n>=a?this.right.slice(n-a,i-a):this.left.slice(n,a).append(this.right.slice(0,i-a))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(nl);const bxr=500;let Jw=class TQ{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,a;r&&(i=this.remapping(n,this.items.length),a=i.maps.length);let o=e.tr,s,l,u=[],d=[];return this.items.forEach((h,f)=>{if(!h.step){i||(i=this.remapping(n,f+1),a=i.maps.length),a--,d.push(h);return}if(i){d.push(new sh(h.map));let p=h.step.map(i.slice(a)),g;p&&o.maybeStep(p).doc&&(g=o.mapping.maps[o.mapping.maps.length-1],u.push(new sh(g,void 0,void 0,u.length+d.length))),a--,g&&i.appendMap(g,a)}else o.maybeStep(h.step);if(h.selection)return s=i?h.selection.map(i.slice(a)):h.selection,l=new TQ(this.items.slice(0,n).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(e,r,n,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let d=0;d<e.steps.length;d++){let h=e.steps[d].invert(e.docs[d]),f=new sh(e.mapping.maps[d],h,r),p;(p=l&&l.merge(f))&&(f=p,d?a.pop():s=s.slice(0,s.length-1)),a.push(f),r&&(o++,r=void 0),i||(l=f)}let u=o-n.depth;return u>xxr&&(s=Qxr(s,u),o-=u),new TQ(s.append(a),o)}remapping(e,r){let n=new Iw;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,r),n}addMaps(e){return this.eventCount==0?this:new TQ(this.items.append(e.map(r=>new sh(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-r),a=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},i);let l=r;this.items.forEach(f=>{let p=a.getMirror(--l);if(p==null)return;o=Math.min(o,p);let g=a.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),v=f.selection&&f.selection.map(a.slice(l+1,p));v&&s++,n.push(new sh(g,m,v))}else n.push(new sh(g))},i);let u=[];for(let f=r;f<o;f++)u.push(new sh(a.maps[f]));let d=this.items.slice(0,i).append(u).append(n),h=new TQ(d,s);return h.emptyItemCount()>bxr&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=e)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(r.slice(n)),u=l&&l.getMap();if(n--,u&&r.appendMap(u,n),l){let d=o.selection&&o.selection.map(r.slice(n));d&&a++;let h=new sh(u.invert(),l,d),f,p=i.length-1;(f=i.length&&i[p].merge(h))?i[p]=f:i.push(h)}}else o.map&&n--},this.items.length,0),new TQ(nl.from(i.reverse()),a)}};Jw.empty=new Jw(nl.empty,0);function Qxr(t,e){let r;return t.forEach((n,i)=>{if(n.selection&&e--==0)return r=i,!1}),t.slice(r)}class sh{constructor(e,r,n,i){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new sh(r.getMap().invert(),r,this.selection)}}}class cp{constructor(e,r,n,i,a){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}}const xxr=20;function Exr(t,e,r,n){let i=r.getMeta(I8),a;if(i)return i.historyState;r.getMeta(Lxr)&&(t=new cp(t.done,t.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(o&&o.getMeta(I8))return o.getMeta(I8).redo?new cp(t.done.addTransform(r,void 0,n,pF(e)),t.undone,Ptt(r.mapping.maps),t.prevTime,t.prevComposition):new cp(t.done,t.undone.addTransform(r,void 0,n,pF(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=r.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=s&&(t.prevTime<(r.time||0)-n.newGroupDelay||!Sxr(r,t.prevRanges)),u=o?Yue(t.prevRanges,r.mapping):Ptt(r.mapping.maps);return new cp(t.done.addTransform(r,l?e.selection.getBookmark():void 0,n,pF(e)),Jw.empty,u,r.time,s??t.prevComposition)}else return(a=r.getMeta("rebased"))?new cp(t.done.rebased(r,a),t.undone.rebased(r,a),Yue(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new cp(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Yue(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function Sxr(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,i)=>{for(let a=0;a<e.length;a+=2)n<=e[a+1]&&i>=e[a]&&(r=!0)}),r}function Ptt(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,i,a,o)=>e.push(a,o));return e}function Yue(t,e){if(!t)return null;let r=[];for(let n=0;n<t.length;n+=2){let i=e.map(t[n],1),a=e.map(t[n+1],-1);i<=a&&r.push(i,a)}return r}function Cxr(t,e,r){let n=pF(e),i=I8.get(e).spec.config,a=(r?t.undone:t.done).popEvent(e,n);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(r?t.done:t.undone).addTransform(a.transform,e.selection.getBookmark(),i,n),l=new cp(r?s:a.remaining,r?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(I8,{redo:r,historyState:l})}let jue=!1,Btt=null;function pF(t){let e=t.plugins;if(Btt!=e){jue=!1,Btt=e;for(let r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){jue=!0;break}}return jue}const I8=new wc("history"),Lxr=new wc("closeHistory");function wxr(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new el({key:I8,state:{init(){return new cp(Jw.empty,Jw.empty,null,0,-1)},apply(e,r,n){return Exr(r,n,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,r){let n=r.inputType,i=n=="historyUndo"?Ftt:n=="historyRedo"?Vtt:null;return i?(r.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Htt(t,e){return(r,n)=>{let i=I8.getState(r);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(n){let a=Cxr(i,r,t);a&&n(e?a.scrollIntoView():a)}return!0}}const Ftt=Htt(!1,!0),Vtt=Htt(!0,!0);var Axr=rl.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,r=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let t=!1;return[new el({key:new wc("characterCount"),appendTransaction:(e,r,n)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const a=this.storage.characters({node:n.doc});if(a>i){const o=a-i,s=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const u=n.tr.deleteRange(s,l);return t=!0,u}t=!0},filterTransaction:(e,r)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const i=this.storage.characters({node:r.doc}),a=this.storage.characters({node:e.doc});if(a<=n||i>n&&a>n&&a<=i)return!0;if(i>n&&a>n&&a>i||!e.getMeta("paste"))return!1;const s=e.selection.$head.pos,l=a-n,u=s-l,d=s;return e.deleteRange(u,d),!(this.storage.characters({node:e.doc})>n)}})]}});rl.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[dxr(this.options)]}}),rl.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new el({key:new wc("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:r,isFocused:n}=this.editor,{anchor:i}=e,a=[];if(!r||!n)return Ya.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,u)=>{if(l.isText)return;if(!(i>=u&&i<=u+l.nodeSize-1))return!1;o+=1});let s=0;return t.descendants((l,u)=>{if(l.isText||!(i>=u&&i<=u+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&o-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";a.push(Yu.node(u,u+l.nodeSize,{class:this.options.className}))}),Ya.create(t,a)}}})]}}),rl.create({name:"gapCursor",addProseMirrorPlugins(){return[gxr()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ha(Jr(t,"allowGapCursor",r)))!=null?e:null}}});var Oxr=rl.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new el({key:new wc("placeholder"),props:{decorations:({doc:t,selection:e})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!r)return null;const a=this.editor.isEmpty;return t.descendants((o,s)=>{const l=n>=s&&n<=s+o.nodeSize,u=!o.isLeaf&&oF(o);if((l||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];a&&d.push(this.options.emptyEditorClass);const h=Yu.node(s,s+o.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:l}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),Ya.create(t,i)}}})]}});rl.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new el({key:new wc("selection"),props:{decorations(r){return r.selection.empty||t.isFocused||!t.isEditable||Ibr(r.selection)||t.view.dragging?null:Ya.create(r.doc,[Yu.inline(r.selection.from,r.selection.to,{class:e.className})])}}})]}});function $tt({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}rl.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:[]}},addProseMirrorPlugins(){const t=new wc(this.name),e=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(this.options.node).includes(r.name));return[new el({key:t,appendTransaction:(r,n,i)=>{const{doc:a,tr:o,schema:s}=i,l=t.getState(i),u=a.content.size,d=s.nodes[this.options.node];if(l)return o.insert(u,d.create())},state:{init:(r,n)=>{const i=n.tr.doc.lastChild;return!$tt({node:i,types:e})},apply:(r,n)=>{if(!r.docChanged)return n;const i=r.doc.lastChild;return!$tt({node:i,types:e})}}})]}});var Mxr=rl.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Ftt(t,e),redo:()=>({state:t,dispatch:e})=>Vtt(t,e)}},addProseMirrorPlugins(){return[wxr(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),Rxr=Zw.create({name:"doc",topNode:!0,content:"block+"}),Dxr=Rxr,Nxr=Zw.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",tF(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Ixr=Nxr,kxr=Zw.create({name:"text",group:"inline"}),Pxr=kxr;const Bxr=oa(Object.assign({name:"InputNode"},{__name:"InputNode",props:Ntt,setup(t){const e=t;return(r,n)=>(I.openBlock(),I.createBlock(I.unref(Dtt),{as:"span"},{default:I.withCtx(()=>{var i;return[I.createVNode(I.unref(Rtt),{as:"span",class:"text",placeholder:((i=e.node.textContent.trim())==null?void 0:i.length)===0?e.node.attrs.value:""},null,8,["placeholder"])]}),_:1}))}}),[["__scopeId","data-v-f468e1ab"]]),Hxr=Zw.create({name:"inputNode",group:"inline",inline:!0,priority:1,content:"inline*",addAttributes(){return{value:{default:"",type:String}}},parseHTML(){return[{tag:"inputNode"}]},renderHTML({HTMLAttributes:t}){return["inputNode",tF(t)]},addNodeView(){return Itt(Bxr)}}),Fxr=oa(Object.assign({name:"CommandNode"},{__name:"CommandNode",props:Ntt,setup(t){return(e,r)=>(I.openBlock(),I.createBlock(I.unref(Dtt),{as:"span",contenteditable:"false"},{default:I.withCtx(()=>[I.createVNode(I.unref(Rtt),{as:"span",class:"name",contenteditable:"false"})]),_:1}))}}),[["__scopeId","data-v-879d692b"]]),Vxr=Zw.create({name:"commandNode",group:"inline",inline:!0,priority:1,content:"inline*",selectable:!1,atom:!0,draggable:!1,addAttributes(){return{value:{default:"",type:String}}},parseHTML(){return[{tag:"commandNode"}]},renderHTML({HTMLAttributes:t}){return["commandNode",tF(t)]},addNodeView(){return Itt(Fxr)},addKeyboardShortcuts(){return{Backspace:({editor:t})=>{const{selection:e}=t.state,{$anchor:r,$from:n,$to:i}=e,a=r.parent;if(!e.empty){let s=!1;if(t.state.doc.nodesBetween(n.pos,i.pos,l=>{if(l.type.name==="commandNode")return s=!0,!1}),s)return!0}if(a.type.name==="commandNode")return!0;const o=n.nodeBefore;return!!(o&&o.type.name==="commandNode")},Delete:({editor:t})=>{const{selection:e}=t.state,{$anchor:r,$from:n,$to:i}=e,a=r.parent;if(!e.empty){let s=!1;if(t.state.doc.nodesBetween(n.pos,i.pos,l=>{if(l.type.name==="commandNode")return s=!0,!1}),s)return!0}if(a.type.name==="commandNode")return!0;const o=n.nodeAfter;return!!(o&&o.type.name==="commandNode")}}}}),$xr=rl.create({name:"keyBoardExtend",addKeyboardShortcuts(){return{Enter:({editor:t})=>event.shiftKey?!1:(this.options.onKeySend(t),!0),"Shift-Enter":({editor:t})=>(t.commands.enter(),t.commands.scrollIntoView(),!0)}}}),Uxr={class:"icon","aria-hidden":"true"},zxr=["xlink:href"],gF=oa(Object.assign({name:"AiSvgIcon"},{__name:"index",props:{name:{type:String,required:!0}},setup(t){const e=I.computed(()=>`#${t.name}`);return(r,n)=>(I.openBlock(),I.createElementBlock("svg",Uxr,[I.createElementVNode("use",{"xlink:href":e.value},null,8,zxr)]))}}),[["__scopeId","data-v-df9e1da9"]]);var mF={exports:{}};/*!
|
|
1053
|
+
`,textSerializers:n={}}=e||{};return Lbr(this.state.doc,{blockSeparator:r,textSerializers:{...ott(this.schema),...n}})}get isEmpty(){return oF(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,r;return(r=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?r:!0}$node(e,r){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,r))||null}$nodes(e,r){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,r))||null}$pos(e){const r=this.state.doc.resolve(e);return new exr(r,this)}get $doc(){return this.$pos(0)}};function ixr(t,e,r={}){const{state:n}=e,{doc:i,tr:a}=n,o=t;i.descendants((s,l)=>{const u=a.mapping.map(l),d=a.mapping.map(l)+s.nodeSize;let h=null;if(s.marks.forEach(p=>{if(p!==o)return!1;h=p}),!h)return;let f=!1;if(Object.keys(r).forEach(p=>{r[p]!==h.attrs[p]&&(f=!0)}),f){const p=t.type.create({...t.attrs,...r});a.removeMark(u,d,t.type),a.addMark(u,d,p)}}),a.docChanged&&e.view.dispatch(a)}var Zw=class tft extends zue{constructor(){super(...arguments),this.type="node"}static create(e={}){const r=typeof e=="function"?e():e;return new tft(r)}configure(e){return super.configure(e)}extend(e){const r=typeof e=="function"?e():e;return super.extend(r)}},axr=class{constructor(t,e,r){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,r,n,i,a,o,s;const{view:l}=this.editor,u=t.target,d=u.nodeType===3?(e=u.parentElement)==null?void 0:e.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(r=this.contentDOM)!=null&&r.contains(u)||!d)return;let h=0,f=0;if(this.dom!==d){const T=this.dom.getBoundingClientRect(),y=d.getBoundingClientRect(),_=(i=t.offsetX)!=null?i:(n=t.nativeEvent)==null?void 0:n.offsetX,Q=(o=t.offsetY)!=null?o:(a=t.nativeEvent)==null?void 0:a.offsetY;h=y.x-T.x+_,f=y.y-T.y+Q}const p=this.dom.cloneNode(!0);(s=t.dataTransfer)==null||s.setDragImage(p,h,f);const g=this.getPos();if(typeof g!="number")return;const m=nn.create(l.state.doc,g),v=l.state.tr.setSelection(m);l.dispatch(v)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!((e=this.contentDOM)!=null&&e.contains(r))))return!1;const i=t.type.startsWith("drag"),a=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!i)return!0;const{isEditable:s}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,d=nn.isSelectable(this.node),h=t.type==="copy",f=t.type==="paste",p=t.type==="cut",g=t.type==="mousedown";if(!u&&d&&i&&t.target===this.dom&&t.preventDefault(),u&&i&&!l&&t.target===this.dom)return t.preventDefault(),!1;if(u&&s&&!l&&g){const m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||a||h||f||p||g&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(dF()||vtt())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const r=this.getPos();return typeof r!="number"?!1:(e.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function Mtt(t){return I.customRef((e,r)=>({get(){return e(),t},set(n){t=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r()})})}}))}var oxr=class extends nxr{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=Mtt(this.view.state),this.reactiveExtensionStorage=Mtt(this.extensionStorage),this.on("beforeTransaction",({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),I.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){const r=super.registerPlugin(t,e);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(t){const e=super.unregisterPlugin(t);return this.reactiveState&&e&&(this.reactiveState.value=e),e}},sxr=I.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=I.ref(),r=I.getCurrentInstance();return I.watchEffect(()=>{const n=t.editor;n&&n.options.element&&e.value&&I.nextTick(()=>{var i;if(!e.value||!((i=n.options.element)!=null&&i.firstChild))return;const a=I.unref(e.value);e.value.append(...n.options.element.childNodes),n.contentComponent=r.ctx._,r&&(n.appContext={...r.appContext,provides:r.provides}),n.setOptions({element:a}),n.createNodeViews()})}),I.onBeforeUnmount(()=>{const n=t.editor;n&&(n.contentComponent=null,n.appContext=null)}),{rootEl:e}},render(){return I.h("div",{ref:t=>{this.rootEl=t}})}}),Rtt=I.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return I.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),Dtt=I.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return I.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)==null?void 0:e.call(t))}}),lxr=(t={})=>{const e=I.shallowRef();return I.onMounted(()=>{e.value=new oxr(t)}),I.onBeforeUnmount(()=>{var r,n,i;const a=(r=e.value)==null?void 0:r.options.element,o=a==null?void 0:a.cloneNode(!0);(n=a==null?void 0:a.parentNode)==null||n.replaceChild(o,a),(i=e.value)==null||i.destroy()}),e},uxr=class{constructor(t,{props:e={},editor:r}){this.editor=r,this.component=I.markRaw(t),this.el=document.createElement("div"),this.props=I.reactive(e),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var t,e,r,n;return(e=(t=this.renderedComponent.vNode)==null?void 0:t.component)!=null&&e.exposed?this.renderedComponent.vNode.component.exposed:(n=(r=this.renderedComponent.vNode)==null?void 0:r.component)==null?void 0:n.proxy}renderComponent(){let t=I.h(this.component,this.props);return this.editor.appContext&&(t.appContext=this.editor.appContext),typeof document<"u"&&this.el&&I.render(t,this.el),{vNode:t,destroy:()=>{this.el&&I.render(null,this.el),this.el=null,t=null},el:this.el?this.el.firstElementChild:null}}updateProps(t={}){Object.entries(t).forEach(([e,r])=>{this.props[e]=r}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}};I.defineComponent({name:"MarkViewContent",props:{as:{type:String,default:"span"}},render(){return I.h(this.as,{style:{whiteSpace:"inherit"},"data-mark-view-content":""})}});var Ntt={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}},cxr=class extends axr{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(n={})=>this.updateAttributes(n),deleteNode:()=>this.deleteNode()},e=this.onDragStart.bind(this);this.decorationClasses=I.ref(this.getDecorationClasses());const r=I.defineComponent({extends:{...this.component},props:Object.keys(t),template:this.component.template,setup:n=>{var i,a;return I.provide("onDragStart",e),I.provide("decorationClasses",this.decorationClasses),(a=(i=this.component).setup)==null?void 0:a.call(i,n,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new uxr(r,{editor:this.editor,props:t})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:t,to:e}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(t<=r&&e>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,e,r){const n=i=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(i)};if(typeof this.options.update=="function"){const i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:a,newNode:t,newDecorations:e,oldInnerDecorations:o,innerDecorations:r,updateProps:()=>n({node:t,decorations:e,innerDecorations:r})})}return t.type!==this.node.type?!1:(t===this.node&&this.decorations===e&&this.innerDecorations===r||(this.node=t,this.decorations=e,this.innerDecorations=r,n({node:t,decorations:e,innerDecorations:r})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(t=>t.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}};function Itt(t,e){return r=>{if(!r.editor.contentComponent)return{};const n=typeof t=="function"&&"__vccOpts"in t?t.__vccOpts:t;return new cxr(n,r,e)}}function dxr(t={}){return new el({view(e){return new hxr(e,t)}})}class hxr{constructor(e,r){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=r.width)!==null&&n!==void 0?n:1,this.color=r.color===!1?void 0:r.color||"black",this.class=r.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let a=o=>{this[i](o)};return e.dom.addEventListener(i,a),{name:i,handler:a}})}destroy(){this.handlers.forEach(({name:e,handler:r})=>this.editorView.dom.removeEventListener(e,r))}update(e,r){this.cursorPos!=null&&r.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),r=!e.parent.inlineContent,n,i=this.editorView.dom,a=i.getBoundingClientRect(),o=a.width/i.offsetWidth,s=a.height/i.offsetHeight;if(r){let h=e.nodeBefore,f=e.nodeAfter;if(h||f){let p=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(p){let g=p.getBoundingClientRect(),m=h?g.bottom:g.top;h&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let v=this.width/2*s;n={left:g.left,right:g.right,top:m-v,bottom:m+v}}}}if(!n){let h=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;n={left:h.left-f,right:h.left+f,top:h.top,bottom:h.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r);let u,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,d=-pageYOffset;else{let h=l.getBoundingClientRect(),f=h.width/l.offsetWidth,p=h.height/l.offsetHeight;u=h.left-l.scrollLeft*f,d=h.top-l.scrollTop*p}this.element.style.left=(n.left-u)/o+"px",this.element.style.top=(n.top-d)/s+"px",this.element.style.width=(n.right-n.left)/o+"px",this.element.style.height=(n.bottom-n.top)/s+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let r=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=r&&r.inside>=0&&this.editorView.state.doc.nodeAt(r.inside),i=n&&n.type.spec.disableDropCursor,a=typeof i=="function"?i(this.editorView,r,e):i;if(r&&!a){let o=r.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=uJe(this.editorView.state.doc,o,this.editorView.dragging.slice);s!=null&&(o=s)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class fo extends Wn{constructor(e){super(e,e)}map(e,r){let n=e.resolve(r.map(this.head));return fo.valid(n)?new fo(n):Wn.near(n)}content(){return Lr.empty}eq(e){return e instanceof fo&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,r){if(typeof r.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new fo(e.resolve(r.pos))}getBookmark(){return new Wue(this.anchor)}static valid(e){let r=e.parent;if(r.isTextblock||!fxr(e)||!pxr(e))return!1;let n=r.type.spec.allowGapCursor;if(n!=null)return n;let i=r.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,r,n=!1){e:for(;;){if(!n&&fo.valid(e))return e;let i=e.pos,a=null;for(let o=e.depth;;o--){let s=e.node(o);if(r>0?e.indexAfter(o)<s.childCount:e.index(o)>0){a=s.child(r>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=r;let l=e.doc.resolve(i);if(fo.valid(l))return l}for(;;){let o=r>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!nn.isSelectable(a)){e=e.doc.resolve(i+a.nodeSize*r),n=!1;continue e}break}a=o,i+=r;let s=e.doc.resolve(i);if(fo.valid(s))return s}return null}}}fo.prototype.visible=!1,fo.findFrom=fo.findGapCursorFrom,Wn.jsonID("gapcursor",fo);class Wue{constructor(e){this.pos=e}map(e){return new Wue(e.map(this.pos))}resolve(e){let r=e.resolve(this.pos);return fo.valid(r)?new fo(r):Wn.near(r)}}function fxr(t){for(let e=t.depth;e>=0;e--){let r=t.index(e),n=t.node(e);if(r==0){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function pxr(t){for(let e=t.depth;e>=0;e--){let r=t.indexAfter(e),n=t.node(e);if(r==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let i=n.child(r);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function gxr(){return new el({props:{decorations:yxr,createSelectionBetween(t,e,r){return e.pos==r.pos&&fo.valid(r)?new fo(r):null},handleClick:Txr,handleKeyDown:mxr,handleDOMEvents:{beforeinput:vxr}}})}const mxr=Bet({ArrowLeft:hF("horiz",-1),ArrowRight:hF("horiz",1),ArrowUp:hF("vert",-1),ArrowDown:hF("vert",1)});function hF(t,e){const r=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,i,a){let o=n.selection,s=e>0?o.$to:o.$from,l=o.empty;if(o instanceof Gn){if(!a.endOfTextblock(r)||s.depth==0)return!1;l=!1,s=n.doc.resolve(e>0?s.after():s.before())}let u=fo.findGapCursorFrom(s,e,l);return u?(i&&i(n.tr.setSelection(new fo(u))),!0):!1}}function Txr(t,e,r){if(!t||!t.editable)return!1;let n=t.state.doc.resolve(e);if(!fo.valid(n))return!1;let i=t.posAtCoords({left:r.clientX,top:r.clientY});return i&&i.inside>-1&&nn.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new fo(n))),!0)}function vxr(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof fo))return!1;let{$from:r}=t.state.selection,n=r.parent.contentMatchAt(r.index()).findWrapping(t.state.schema.nodes.text);if(!n)return!1;let i=Gt.empty;for(let o=n.length-1;o>=0;o--)i=Gt.from(n[o].createAndFill(null,i));let a=t.state.tr.replace(r.pos,r.pos,new Lr(i,0,0));return a.setSelection(Gn.near(a.doc.resolve(r.pos+1))),t.dispatch(a),!1}function yxr(t){if(!(t.selection instanceof fo))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ya.create(t.doc,[Yu.widget(t.selection.head,e,{key:"gapcursor"})])}var fF=200,nl=function(){};nl.prototype.append=function(e){return e.length?(e=nl.from(e),!this.length&&e||e.length<fF&&this.leafAppend(e)||this.length<fF&&e.leafPrepend(this)||this.appendInner(e)):this},nl.prototype.prepend=function(e){return e.length?nl.from(e).append(this):this},nl.prototype.appendInner=function(e){return new _xr(this,e)},nl.prototype.slice=function(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.length),e>=r?nl.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,r))},nl.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},nl.prototype.forEach=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length),r<=n?this.forEachInner(e,r,n,0):this.forEachInvertedInner(e,r,n,0)},nl.prototype.map=function(e,r,n){r===void 0&&(r=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(a,o){return i.push(e(a,o))},r,n),i},nl.from=function(e){return e instanceof nl?e:e&&e.length?new ktt(e):nl.empty};var ktt=function(t){function e(n){t.call(this),this.values=n}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new e(this.values.slice(i,a))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,a,o,s){for(var l=a;l<o;l++)if(i(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,a,o,s){for(var l=a-1;l>=o;l--)if(i(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=fF)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=fF)return new e(i.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(e.prototype,r),e}(nl);nl.empty=new ktt([]);var _xr=function(t){function e(r,n){t.call(this),this.left=r,this.right=n,this.length=r.length+n.length,this.depth=Math.max(r.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,a,o){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(n,Math.min(i,s),a,o)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var a=this.left.length;return i<=a?this.left.slice(n,i):n>=a?this.right.slice(n-a,i-a):this.left.slice(n,a).append(this.right.slice(0,i-a))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(nl);const bxr=500;let Jw=class TQ{constructor(e,r){this.items=e,this.eventCount=r}popEvent(e,r){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,a;r&&(i=this.remapping(n,this.items.length),a=i.maps.length);let o=e.tr,s,l,u=[],d=[];return this.items.forEach((h,f)=>{if(!h.step){i||(i=this.remapping(n,f+1),a=i.maps.length),a--,d.push(h);return}if(i){d.push(new sh(h.map));let p=h.step.map(i.slice(a)),g;p&&o.maybeStep(p).doc&&(g=o.mapping.maps[o.mapping.maps.length-1],u.push(new sh(g,void 0,void 0,u.length+d.length))),a--,g&&i.appendMap(g,a)}else o.maybeStep(h.step);if(h.selection)return s=i?h.selection.map(i.slice(a)):h.selection,l=new TQ(this.items.slice(0,n).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(e,r,n,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let d=0;d<e.steps.length;d++){let h=e.steps[d].invert(e.docs[d]),f=new sh(e.mapping.maps[d],h,r),p;(p=l&&l.merge(f))&&(f=p,d?a.pop():s=s.slice(0,s.length-1)),a.push(f),r&&(o++,r=void 0),i||(l=f)}let u=o-n.depth;return u>xxr&&(s=Qxr(s,u),o-=u),new TQ(s.append(a),o)}remapping(e,r){let n=new Iw;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,r),n}addMaps(e){return this.eventCount==0?this:new TQ(this.items.append(e.map(r=>new sh(r))),this.eventCount)}rebased(e,r){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-r),a=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},i);let l=r;this.items.forEach(f=>{let p=a.getMirror(--l);if(p==null)return;o=Math.min(o,p);let g=a.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),v=f.selection&&f.selection.map(a.slice(l+1,p));v&&s++,n.push(new sh(g,m,v))}else n.push(new sh(g))},i);let u=[];for(let f=r;f<o;f++)u.push(new sh(a.maps[f]));let d=this.items.slice(0,i).append(u).append(n),h=new TQ(d,s);return h.emptyItemCount()>bxr&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(r=>{r.step||e++}),e}compress(e=this.items.length){let r=this.remapping(0,e),n=r.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=e)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(r.slice(n)),u=l&&l.getMap();if(n--,u&&r.appendMap(u,n),l){let d=o.selection&&o.selection.map(r.slice(n));d&&a++;let h=new sh(u.invert(),l,d),f,p=i.length-1;(f=i.length&&i[p].merge(h))?i[p]=f:i.push(h)}}else o.map&&n--},this.items.length,0),new TQ(nl.from(i.reverse()),a)}};Jw.empty=new Jw(nl.empty,0);function Qxr(t,e){let r;return t.forEach((n,i)=>{if(n.selection&&e--==0)return r=i,!1}),t.slice(r)}class sh{constructor(e,r,n,i){this.map=e,this.step=r,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let r=e.step.merge(this.step);if(r)return new sh(r.getMap().invert(),r,this.selection)}}}class cp{constructor(e,r,n,i,a){this.done=e,this.undone=r,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}}const xxr=20;function Exr(t,e,r,n){let i=r.getMeta(I8),a;if(i)return i.historyState;r.getMeta(Lxr)&&(t=new cp(t.done,t.undone,null,0,-1));let o=r.getMeta("appendedTransaction");if(r.steps.length==0)return t;if(o&&o.getMeta(I8))return o.getMeta(I8).redo?new cp(t.done.addTransform(r,void 0,n,pF(e)),t.undone,Ptt(r.mapping.maps),t.prevTime,t.prevComposition):new cp(t.done,t.undone.addTransform(r,void 0,n,pF(e)),null,t.prevTime,t.prevComposition);if(r.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=r.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=s&&(t.prevTime<(r.time||0)-n.newGroupDelay||!Sxr(r,t.prevRanges)),u=o?Yue(t.prevRanges,r.mapping):Ptt(r.mapping.maps);return new cp(t.done.addTransform(r,l?e.selection.getBookmark():void 0,n,pF(e)),Jw.empty,u,r.time,s??t.prevComposition)}else return(a=r.getMeta("rebased"))?new cp(t.done.rebased(r,a),t.undone.rebased(r,a),Yue(t.prevRanges,r.mapping),t.prevTime,t.prevComposition):new cp(t.done.addMaps(r.mapping.maps),t.undone.addMaps(r.mapping.maps),Yue(t.prevRanges,r.mapping),t.prevTime,t.prevComposition)}function Sxr(t,e){if(!e)return!1;if(!t.docChanged)return!0;let r=!1;return t.mapping.maps[0].forEach((n,i)=>{for(let a=0;a<e.length;a+=2)n<=e[a+1]&&i>=e[a]&&(r=!0)}),r}function Ptt(t){let e=[];for(let r=t.length-1;r>=0&&e.length==0;r--)t[r].forEach((n,i,a,o)=>e.push(a,o));return e}function Yue(t,e){if(!t)return null;let r=[];for(let n=0;n<t.length;n+=2){let i=e.map(t[n],1),a=e.map(t[n+1],-1);i<=a&&r.push(i,a)}return r}function Cxr(t,e,r){let n=pF(e),i=I8.get(e).spec.config,a=(r?t.undone:t.done).popEvent(e,n);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(r?t.done:t.undone).addTransform(a.transform,e.selection.getBookmark(),i,n),l=new cp(r?s:a.remaining,r?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(I8,{redo:r,historyState:l})}let jue=!1,Btt=null;function pF(t){let e=t.plugins;if(Btt!=e){jue=!1,Btt=e;for(let r=0;r<e.length;r++)if(e[r].spec.historyPreserveItems){jue=!0;break}}return jue}const I8=new wc("history"),Lxr=new wc("closeHistory");function wxr(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new el({key:I8,state:{init(){return new cp(Jw.empty,Jw.empty,null,0,-1)},apply(e,r,n){return Exr(r,n,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,r){let n=r.inputType,i=n=="historyUndo"?Ftt:n=="historyRedo"?Vtt:null;return i?(r.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Htt(t,e){return(r,n)=>{let i=I8.getState(r);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(n){let a=Cxr(i,r,t);a&&n(e?a.scrollIntoView():a)}return!0}}const Ftt=Htt(!1,!0),Vtt=Htt(!0,!0);var Axr=rl.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,r=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(r)}},addProseMirrorPlugins(){let t=!1;return[new el({key:new wc("characterCount"),appendTransaction:(e,r,n)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const a=this.storage.characters({node:n.doc});if(a>i){const o=a-i,s=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const u=n.tr.deleteRange(s,l);return t=!0,u}t=!0},filterTransaction:(e,r)=>{const n=this.options.limit;if(!e.docChanged||n===0||n===null||n===void 0)return!0;const i=this.storage.characters({node:r.doc}),a=this.storage.characters({node:e.doc});if(a<=n||i>n&&a>n&&a<=i)return!0;if(i>n&&a>n&&a>i||!e.getMeta("paste"))return!1;const s=e.selection.$head.pos,l=a-n,u=s-l,d=s;return e.deleteRange(u,d),!(this.storage.characters({node:e.doc})>n)}})]}});rl.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[dxr(this.options)]}}),rl.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new el({key:new wc("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:r,isFocused:n}=this.editor,{anchor:i}=e,a=[];if(!r||!n)return Ya.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,u)=>{if(l.isText)return;if(!(i>=u&&i<=u+l.nodeSize-1))return!1;o+=1});let s=0;return t.descendants((l,u)=>{if(l.isText||!(i>=u&&i<=u+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&o-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";a.push(Yu.node(u,u+l.nodeSize,{class:this.options.className}))}),Ya.create(t,a)}}})]}}),rl.create({name:"gapCursor",addProseMirrorPlugins(){return[gxr()]},extendNodeSchema(t){var e;const r={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ha(Jr(t,"allowGapCursor",r)))!=null?e:null}}});var Oxr=rl.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new el({key:new wc("placeholder"),props:{decorations:({doc:t,selection:e})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!r)return null;const a=this.editor.isEmpty;return t.descendants((o,s)=>{const l=n>=s&&n<=s+o.nodeSize,u=!o.isLeaf&&oF(o);if((l||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];a&&d.push(this.options.emptyEditorClass);const h=Yu.node(s,s+o.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:s,hasAnchor:l}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),Ya.create(t,i)}}})]}});rl.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new el({key:new wc("selection"),props:{decorations(r){return r.selection.empty||t.isFocused||!t.isEditable||Ibr(r.selection)||t.view.dragging?null:Ya.create(r.doc,[Yu.inline(r.selection.from,r.selection.to,{class:e.className})])}}})]}});function $tt({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}rl.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:[]}},addProseMirrorPlugins(){const t=new wc(this.name),e=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(this.options.node).includes(r.name));return[new el({key:t,appendTransaction:(r,n,i)=>{const{doc:a,tr:o,schema:s}=i,l=t.getState(i),u=a.content.size,d=s.nodes[this.options.node];if(l)return o.insert(u,d.create())},state:{init:(r,n)=>{const i=n.tr.doc.lastChild;return!$tt({node:i,types:e})},apply:(r,n)=>{if(!r.docChanged)return n;const i=r.doc.lastChild;return!$tt({node:i,types:e})}}})]}});var Mxr=rl.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Ftt(t,e),redo:()=>({state:t,dispatch:e})=>Vtt(t,e)}},addProseMirrorPlugins(){return[wxr(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),Rxr=Zw.create({name:"doc",topNode:!0,content:"block+"}),Dxr=Rxr,Nxr=Zw.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",tF(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Ixr=Nxr,kxr=Zw.create({name:"text",group:"inline"}),Pxr=kxr;const Bxr=oa(Object.assign({name:"InputNode"},{__name:"InputNode",props:Ntt,setup(t){const e=t;return(r,n)=>(I.openBlock(),I.createBlock(I.unref(Dtt),{as:"span"},{default:I.withCtx(()=>{var i;return[I.createVNode(I.unref(Rtt),{as:"span",class:"text",placeholder:((i=e.node.textContent.trim())==null?void 0:i.length)===0?e.node.attrs.value:""},null,8,["placeholder"])]}),_:1}))}}),[["__scopeId","data-v-164bb925"]]),Hxr=Zw.create({name:"inputNode",group:"inline",inline:!0,priority:1,content:"inline*",addAttributes(){return{value:{default:"",type:String}}},parseHTML(){return[{tag:"inputNode"}]},renderHTML({HTMLAttributes:t}){return["inputNode",tF(t)]},addNodeView(){return Itt(Bxr)}}),Fxr=oa(Object.assign({name:"CommandNode"},{__name:"CommandNode",props:Ntt,setup(t){return(e,r)=>(I.openBlock(),I.createBlock(I.unref(Dtt),{as:"span",contenteditable:"false"},{default:I.withCtx(()=>[I.createVNode(I.unref(Rtt),{as:"span",class:"name",contenteditable:"false"})]),_:1}))}}),[["__scopeId","data-v-3ac8730d"]]),Vxr=Zw.create({name:"commandNode",group:"inline",inline:!0,priority:1,content:"inline*",selectable:!1,atom:!0,draggable:!1,addAttributes(){return{value:{default:"",type:String}}},parseHTML(){return[{tag:"commandNode"}]},renderHTML({HTMLAttributes:t}){return["commandNode",tF(t)]},addNodeView(){return Itt(Fxr)},addKeyboardShortcuts(){return{Backspace:({editor:t})=>{const{selection:e}=t.state,{$anchor:r,$from:n,$to:i}=e,a=r.parent;if(!e.empty){let s=!1;if(t.state.doc.nodesBetween(n.pos,i.pos,l=>{if(l.type.name==="commandNode")return s=!0,!1}),s)return!0}if(a.type.name==="commandNode")return!0;const o=n.nodeBefore;return!!(o&&o.type.name==="commandNode")},Delete:({editor:t})=>{const{selection:e}=t.state,{$anchor:r,$from:n,$to:i}=e,a=r.parent;if(!e.empty){let s=!1;if(t.state.doc.nodesBetween(n.pos,i.pos,l=>{if(l.type.name==="commandNode")return s=!0,!1}),s)return!0}if(a.type.name==="commandNode")return!0;const o=n.nodeAfter;return!!(o&&o.type.name==="commandNode")}}}}),$xr=rl.create({name:"keyBoardExtend",addKeyboardShortcuts(){return{Enter:({editor:t})=>event.shiftKey?!1:(this.options.onKeySend(t),!0),"Shift-Enter":({editor:t})=>(t.commands.enter(),t.commands.scrollIntoView(),!0)}}}),Uxr={class:"icon","aria-hidden":"true"},zxr=["xlink:href"],gF=oa(Object.assign({name:"AiSvgIcon"},{__name:"index",props:{name:{type:String,required:!0}},setup(t){const e=I.computed(()=>`#${t.name}`);return(r,n)=>(I.openBlock(),I.createElementBlock("svg",Uxr,[I.createElementVNode("use",{"xlink:href":e.value},null,8,zxr)]))}}),[["__scopeId","data-v-62be7b85"]]);var mF={exports:{}};/*!
|
|
1054
1054
|
*
|
|
1055
1055
|
* js-audio-recorder - js audio recorder plugin
|
|
1056
1056
|
*
|
|
@@ -1059,8 +1059,8 @@ img.ProseMirror-separator {
|
|
|
1059
1059
|
* @author 2fps <echoweb@126.com> (https://www.zhuyuntao.cn)
|
|
1060
1060
|
* @license MIT
|
|
1061
1061
|
*
|
|
1062
|
-
*/var Gxr=mF.exports,Utt;function qxr(){return Utt||(Utt=1,function(t,e){(function(r,n){t.exports=n()})(Gxr,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(1&o&&(a=i(a)),8&o||4&o&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),2&o&&typeof a!="string")for(var l in a)i.d(s,l,(function(u){return a[u]}).bind(null,l));return s},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=1)}([function(r,n,i){function a(o,s,l){for(var u=0;u<l.length;u++)o.setUint8(s+u,l.charCodeAt(u))}Object.defineProperty(n,"__esModule",{value:!0}),n.compress=function(o,s,l){for(var u=s/l,d=Math.max(u,1),h=o.left,f=o.right,p=Math.floor((h.length+f.length)/u),g=new Float32Array(p),m=0,v=0;m<p;){var T=Math.floor(v);g[m]=h[T],m++,f.length&&(g[m]=f[T],m++),v+=d}return g},n.encodePCM=function(o,s,l){l===void 0&&(l=!0);var u=0,d=o.length*(s/8),h=new ArrayBuffer(d),f=new DataView(h);if(s===8)for(var p=0;p<o.length;p++,u++){var g=(m=Math.max(-1,Math.min(1,o[p])))<0?128*m:127*m;g=+g+128,f.setInt8(u,g)}else for(p=0;p<o.length;p++,u+=2){var m=Math.max(-1,Math.min(1,o[p]));f.setInt16(u,m<0?32768*m:32767*m,l)}return f},n.encodeWAV=function(o,s,l,u,d,h){h===void 0&&(h=!0);var f=l>s?s:l,p=d,g=new ArrayBuffer(44+o.byteLength),m=new DataView(g),v=u,T=0;a(m,T,"RIFF"),T+=4,m.setUint32(T,36+o.byteLength,h),a(m,T+=4,"WAVE"),a(m,T+=4,"fmt "),T+=4,m.setUint32(T,16,h),T+=4,m.setUint16(T,1,h),T+=2,m.setUint16(T,v,h),T+=2,m.setUint32(T,f,h),T+=4,m.setUint32(T,v*f*(p/8),h),T+=4,m.setUint16(T,v*(p/8),h),T+=2,m.setUint16(T,p,h),a(m,T+=2,"data"),T+=4,m.setUint32(T,o.byteLength,h),T+=4;for(var y=0;y<o.byteLength;)m.setUint8(T,o.getUint8(y)),T++,y++;return m}},function(r,n,i){var a,o=this&&this.__extends||(a=function(h,f){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var m in g)g.hasOwnProperty(m)&&(p[m]=g[m])})(h,f)},function(h,f){function p(){this.constructor=h}a(h,f),h.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)});Object.defineProperty(n,"__esModule",{value:!0});var s=i(2),l=i(0),u=i(3),d=function(h){function f(p){p===void 0&&(p={});var g=h.call(this,p)||this;return g.isrecording=!1,g.ispause=!1,g.isplaying=!1,g}return o(f,h),f.prototype.setOption=function(p){p===void 0&&(p={}),this.setNewOption(p)},f.prototype.start=function(){return this.isrecording?Promise.reject():(this.isrecording=!0,this.startRecord())},f.prototype.pause=function(){this.isrecording&&!this.ispause&&(this.ispause=!0,this.pauseRecord())},f.prototype.resume=function(){this.isrecording&&this.ispause&&(this.ispause=!1,this.resumeRecord())},f.prototype.stop=function(){this.isrecording&&(this.isrecording=!1,this.ispause=!1,this.stopRecord())},f.prototype.play=function(){this.stop(),this.isplaying=!0,this.onplay&&this.onplay(),u.default.addPlayEnd(this.onplayend);var p=this.getWAV();p.byteLength>44&&u.default.play(p.buffer)},f.prototype.getPlayTime=function(){return u.default.getPlayTime()},f.prototype.pausePlay=function(){!this.isrecording&&this.isplaying&&(this.isplaying=!1,this.onpauseplay&&this.onpauseplay(),u.default.pausePlay())},f.prototype.resumePlay=function(){this.isrecording||this.isplaying||(this.isplaying=!0,this.onresumeplay&&this.onresumeplay(),u.default.resumePlay())},f.prototype.stopPlay=function(){this.isrecording||(this.isplaying=!1,this.onstopplay&&this.onstopplay(),u.default.stopPlay())},f.prototype.destroy=function(){return u.default.destroyPlay(),this.destroyRecord()},f.prototype.getRecordAnalyseData=function(){return this.getAnalyseData()},f.prototype.getPlayAnalyseData=function(){return u.default.getAnalyseData()},f.prototype.getPCM=function(){this.stop();var p=this.getData();return p=l.compress(p,this.inputSampleRate,this.outputSampleRate),l.encodePCM(p,this.oututSampleBits,this.littleEdian)},f.prototype.getPCMBlob=function(){return new Blob([this.getPCM()])},f.prototype.downloadPCM=function(p){p===void 0&&(p="recorder");var g=this.getPCMBlob();s.downloadPCM(g,p)},f.prototype.getWAV=function(){var p=this.getPCM();return l.encodeWAV(p,this.inputSampleRate,this.outputSampleRate,this.config.numChannels,this.oututSampleBits,this.littleEdian)},f.prototype.getWAVBlob=function(){return new Blob([this.getWAV()],{type:"audio/wav"})},f.prototype.downloadWAV=function(p){p===void 0&&(p="recorder");var g=this.getWAVBlob();s.downloadWAV(g,p)},f.prototype.download=function(p,g,m){s.download(p,g,m)},f.prototype.getChannelData=function(){var p=this.getPCM(),g=p.byteLength,m=this.littleEdian,v={left:null,right:null};if(this.config.numChannels===2){var T=new DataView(new ArrayBuffer(g/2)),y=new DataView(new ArrayBuffer(g/2));if(this.config.sampleBits===16)for(var _=0;_<g/2;_+=2)T.setInt16(_,p.getInt16(2*_,m),m),y.setInt16(_,p.getInt16(2*_+2,m),m);else for(_=0;_<g/2;_+=2)T.setInt8(_,p.getInt8(2*_)),y.setInt8(_,p.getInt8(2*_+1));v.left=T,v.right=y}else v.left=p;return v},f}(i(5).default);n.default=d},function(r,n,i){function a(o,s,l){var u=document.createElement("a");u.href=window.URL.createObjectURL(o),u.download=s+"."+l,u.click()}Object.defineProperty(n,"__esModule",{value:!0}),n.downloadWAV=function(o,s){s===void 0&&(s="recorder"),a(o,s,"wav")},n.downloadPCM=function(o,s){s===void 0&&(s="recorder"),a(o,s,"pcm")},n.download=function(o,s,l){return a(o,s,l)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),o=null,s=0,l=0,u=null,d=null,h=null,f=!1,p=0,g=function(){};function m(){return f=!1,u.decodeAudioData(h.slice(0),function(y){(o=u.createBufferSource()).onended=function(){f||(p=u.currentTime-l+s,g())},o.buffer=y,o.connect(d),d.connect(u.destination),o.start(0,s),l=u.currentTime},function(y){a.throwError(y)})}function v(){o&&(o.stop(),o=null)}var T=function(){function y(){}return y.play=function(_){return u||(u=new(window.AudioContext||window.webkitAudioContext),(d=u.createAnalyser()).fftSize=2048),this.stopPlay(),h=_,p=0,m()},y.pausePlay=function(){v(),s+=u.currentTime-l,f=!0},y.resumePlay=function(){return m()},y.stopPlay=function(){s=0,h=null,v()},y.destroyPlay=function(){this.stopPlay()},y.getAnalyseData=function(){var _=new Uint8Array(d.frequencyBinCount);return d.getByteTimeDomainData(_),_},y.addPlayEnd=function(_){_===void 0&&(_=function(){}),g=_},y.getPlayTime=function(){var _=f?s:u.currentTime-l+s;return p||_},y}();n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.throwError=function(a){throw new Error(a)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=function(){function s(l){l===void 0&&(l={}),this.size=0,this.lBuffer=[],this.rBuffer=[],this.tempPCM=[],this.inputSampleBits=16,this.fileSize=0,this.duration=0,this.needRecord=!0;var u,d=new(window.AudioContext||window.webkitAudioContext);this.inputSampleRate=d.sampleRate,this.setNewOption(l),this.littleEdian=(u=new ArrayBuffer(2),new DataView(u).setInt16(0,256,!0),new Int16Array(u)[0]===256),s.initUserMedia()}return s.prototype.setNewOption=function(l){l===void 0&&(l={}),this.config={sampleBits:~[8,16].indexOf(l.sampleBits)?l.sampleBits:16,sampleRate:~[8e3,11025,16e3,22050,24e3,44100,48e3].indexOf(l.sampleRate)?l.sampleRate:this.inputSampleRate,numChannels:~[1,2].indexOf(l.numChannels)?l.numChannels:1},this.outputSampleRate=this.config.sampleRate,this.oututSampleBits=this.config.sampleBits},s.prototype.startRecord=function(){var l=this;return this.context&&this.destroyRecord(),this.initRecorder(),navigator.mediaDevices.getUserMedia({audio:!0}).then(function(u){l.audioInput=l.context.createMediaStreamSource(u),l.stream=u}).then(function(){l.audioInput.connect(l.analyser),l.analyser.connect(l.recorder),l.recorder.connect(l.context.destination)})},s.prototype.pauseRecord=function(){this.needRecord=!1},s.prototype.resumeRecord=function(){this.needRecord=!0},s.prototype.stopRecord=function(){this.audioInput&&this.audioInput.disconnect(),this.source&&this.source.stop(),this.recorder.disconnect(),this.analyser.disconnect(),this.needRecord=!0},s.prototype.destroyRecord=function(){return this.clearRecordStatus(),this.stopStream(),this.closeAudioContext()},s.prototype.getAnalyseData=function(){var l=new Uint8Array(this.analyser.frequencyBinCount);return this.analyser.getByteTimeDomainData(l),l},s.prototype.getData=function(){return this.flat()},s.prototype.clearRecordStatus=function(){this.lBuffer.length=0,this.rBuffer.length=0,this.size=0,this.fileSize=0,this.PCM=null,this.audioInput=null,this.duration=0},s.prototype.flat=function(){var l=null,u=new Float32Array(0);this.config.numChannels===1?l=new Float32Array(this.size):(l=new Float32Array(this.size/2),u=new Float32Array(this.size/2));for(var d=0,h=0;h<this.lBuffer.length;h++)l.set(this.lBuffer[h],d),d+=this.lBuffer[h].length;for(d=0,h=0;h<this.rBuffer.length;h++)u.set(this.rBuffer[h],d),d+=this.rBuffer[h].length;return{left:l,right:u}},s.prototype.initRecorder=function(){var l=this;this.clearRecordStatus(),this.context=new(window.AudioContext||window.webkitAudioContext),this.analyser=this.context.createAnalyser(),this.analyser.fftSize=2048;var u=this.context.createScriptProcessor||this.context.createJavaScriptNode;this.recorder=u.apply(this.context,[4096,this.config.numChannels,this.config.numChannels]),this.recorder.onaudioprocess=function(d){if(l.needRecord){var h,f=d.inputBuffer.getChannelData(0),p=null;l.lBuffer.push(new Float32Array(f)),l.size+=f.length,l.config.numChannels===2&&(p=d.inputBuffer.getChannelData(1),l.rBuffer.push(new Float32Array(p)),l.size+=p.length),l.fileSize=Math.floor(l.size/Math.max(l.inputSampleRate/l.outputSampleRate,1))*(l.oututSampleBits/8),h=100*Math.max.apply(Math,f),l.duration+=4096/l.inputSampleRate,l.onprocess&&l.onprocess(l.duration),l.onprogress&&l.onprogress({duration:l.duration,fileSize:l.fileSize,vol:h})}}},s.prototype.stopStream=function(){this.stream&&this.stream.getTracks&&(this.stream.getTracks().forEach(function(l){return l.stop()}),this.stream=null)},s.prototype.closeAudioContext=function(){return this.context&&this.context.close&&this.context.state!=="closed"?this.context.close():new Promise(function(l){l()})},s.initUserMedia=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(l){var u=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return u?new Promise(function(d,h){u.call(navigator,l,d,h)}):Promise.reject(new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 getUserMedia !"))})},s.prototype.transformIntoPCM=function(l,u){var d=new Float32Array(l),h=new Float32Array(u),f=a.compress({left:d,right:h},this.inputSampleRate,this.outputSampleRate);return a.encodePCM(f,this.oututSampleBits,this.littleEdian)},s.getPermission=function(){return this.initUserMedia(),navigator.mediaDevices.getUserMedia({audio:!0}).then(function(l){l&&l.getTracks().forEach(function(u){return u.stop()})})},s}();n.default=o}]).default})}(mF)),mF.exports}var Xue,ztt;function Wxr(){return ztt||(ztt=1,Xue=qxr()),Xue}var Yxr=Wxr();const jxr=$h(Yxr);function Xxr(t,e,r){let n=e/r,i=Math.max(n,1),a=t.left,o=t.right,s=Math.floor((a.length+o.length)/n),l=new Float32Array(s),u=0,d=0;for(;u<s;){let h=Math.floor(d);l[u]=a[h],u++,o.length&&(l[u]=o[h],u++),d+=i}return l}function Kxr(t,e,r=!0){let n=0,i=t.length*(e/8),a=new ArrayBuffer(i),o=new DataView(a);if(e===8)for(let s=0;s<t.length;s++,n++){let l=Math.max(-1,Math.min(1,t[s])),u=l<0?l*128:l*127;u=+u+128,o.setInt8(n,u)}else for(let s=0;s<t.length;s++,n+=2){let l=Math.max(-1,Math.min(1,t[s]));o.setInt16(n,l<0?l*32768:l*32767,r)}return o}class Gtt extends jxr{constructor(e={}){super(e)}getPCM(){let e=this.getData();return e=Xxr(e,this.inputSampleRate,this.outputSampleRate),Kxr(e,this.oututSampleBits,this.littleEdian)}getPCMBlob(){return new Blob([this.getPCM()],{type:"audio/pcm"})}}const Zxr=oa({__name:"VoiceWave",props:{size:{type:Number,default:16},total:{type:Number,default:41}},setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",{class:"voice-wave",style:I.normalizeStyle({"font-size":`${t.size}px`})},[(I.openBlock(!0),I.createElementBlock(I.Fragment,null,I.renderList(t.total,n=>(I.openBlock(),I.createElementBlock("span",{key:n}))),128))],4))}},[["__scopeId","data-v-49170f5f"]]),Jxr={__name:"AudioButton",props:I.mergeDefaults({audioConfig:Object,audioLoading:Boolean},{audioConfig:()=>({}),audioLoading:!1}),emits:["onAudioLoaded","onAudioStart"],setup(t,{emit:e}){const r={maxTime:6e4,timeSlice:0,needPCM:!1,sampleBits:16,sampleRate:16e3,numChannels:1},n=e,i=I.ref(!1);let a=null;const o=new AbortController,s=o.signal,l=I.computed(()=>({...r,...t.audioConfig})),u=async()=>{var v;if(!((v=navigator==null?void 0:navigator.mediaDevices)!=null&&v.getUserMedia)){ma.warning("\u62B1\u6B49\uFF0C\u60A8\u7684\u8BBE\u5907\u4E0D\u652F\u6301\u5F55\u97F3\u529F\u80FD");return}try{await Gtt.getPermission()}catch(T){ma.warning("\u62B1\u6B49\uFF0C\u8BF7\u6C42\u9EA6\u514B\u98CE\u6743\u9650\u5931\u8D25\uFF0C\u65E0\u6CD5\u4F7F\u7528\u5F55\u97F3\u529F\u80FD"),console.error("\u9EA6\u514B\u98CE\u6743\u9650\u8BF7\u6C42\u5931\u8D25:",T);return}const{sampleBits:p,sampleRate:g,numChannels:m}=l.value;a=new Gtt({sampleBits:p,sampleRate:g,numChannels:m}),a.onprogress=Mxt(T=>{if(Math.floor(T.duration)*1e3>=l.value.maxTime)return d(),!1;l.value.timeSlice!==0&&h(!1)},l.value.timeSlice,{signal:s}),a.start(),i.value=!0,n("onAudioStart")},d=()=>{a&&(a.stop(),h(!0),f())},h=p=>{a&&(l.value.needPCM?n("onAudioLoaded",{blob:a.getPCMBlob(),stop:p}):n("onAudioLoaded",{blob:a.getWAVBlob(),stop:p}))},f=()=>{a&&(a.destroy(),a=null),o.abort(),i.value=!1};return(p,g)=>{const m=Jc,v=k6;return I.openBlock(),I.createBlock(v,null,{title:I.withCtx(()=>[I.createTextVNode(I.toDisplayString(i.value?"\u70B9\u51FB\u505C\u6B62":"\u8BED\u97F3\u5F55\u5165"),1)]),default:I.withCtx(()=>[i.value?(I.openBlock(),I.createBlock(m,{key:1,type:"text",onClick:d},{default:I.withCtx(()=>[I.createVNode(Zxr,{total:5,size:18})]),_:1})):(I.openBlock(),I.createBlock(m,{key:0,loading:t.audioLoading,type:"text",onClick:u},{icon:I.withCtx(()=>[I.createVNode(I.unref(Yq))]),_:1},8,["loading"]))]),_:1})}}},eEr=({command:t,value:e=""})=>{const n=e.split(`
|
|
1063
|
-
`).reduce((i,a)=>{if(a.trim(),a.length===0)return i;const s=(a.split(/(\{{.*?\}})/)||[]).reduce((l,u)=>{if(!u)return l;if(u.startsWith("{{")&&u.endsWith("}}")){const d=u.slice(2,-2);d&&l.push({type:"inputNode",attrs:{value:d},content:[{type:"text",text:"\uFEFF"},{type:"text",text:d}]})}else l.push({type:"text",text:u});return l},[]);return i.push({type:"paragraph",content:s}),i},[]);if(t){const i={type:"commandNode",attrs:{value:t},content:[{type:"text",text:t}]};n.length>0?n[0].content.unshift(i):n.push({type:"paragraph",content:[i]})}return{type:"doc",content:n}},tEr={class:"sender"},rEr={key:0,class:"sender-header"},nEr={class:"sender-content"},iEr={class:"sender-footer"},aEr={class:"sender-footer_left"},oEr={key:0},sEr={class:"sender-footer_right"},lEr={key:0,class:"sender-footer_count"},uEr={key:1},TF=1.7,qtt=oa(Object.assign({name:"AiSender"},{__name:"Sender",props:I.mergeDefaults({placeholder:String,maxLength:Number,loading:Boolean,rows:Number,autoSize:[Boolean,Object],showAudio:Boolean,clearable:Boolean,audioLoading:Boolean,audioConfig:Object},{placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u95EE\u9898\uFF0Center\u53D1\u9001\uFF0Cshift+enter\u6362\u884C",maxLength:0,loading:!1,rows:2,autoSize:!1,showAudio:!1,clearable:!0,audioLoading:!1,audioConfig:()=>({})}),emits:["onSend","onStop","onClear","onChange","onAudioLoaded","onAudioStart"],setup(t,{expose:e,emit:r}){I.useCssVars(T=>({b1b56008:s.value.minHeight,"791a398e":s.value.maxHeight}));const n=r,i=I.ref(""),a=I.ref(""),o=I.computed(()=>{if(!l.value)return 0;let T=0;return l.value.state.doc.descendants(y=>{y.type.name==="text"&&y.text&&(T+=y.text.length)}),T-a.value.length}),s=I.computed(()=>t.autoSize?typeof t.autoSize=="boolean"?{minHeight:"auto",maxHeight:"auto"}:{minHeight:`${t.autoSize.minRows*TF+1}em`,maxHeight:`${t.autoSize.maxRows*TF+1}em`}:{minHeight:`${t.rows*TF+1}em`,maxHeight:`${t.rows*TF+1}em`}),l=lxr({extensions:[Dxr,Ixr,Pxr,Oxr.configure({placeholder:t.placeholder}),Mxr,Axr.configure({limit:t.maxLength?t.maxLength:null}),Hxr,Vxr,$xr.configure({onKeySend:()=>{d()}})],onUpdate:()=>{const T=l.value.getText();l.value.isEmpty&&(a.value=""),i.value=T.slice(a.value.length),n("onChange",i.value)}}),u=T=>{var _,Q;a.value=T.command||"";const y=eEr(T);(_=l.value)==null||_.commands.clearContent(),(Q=l.value)==null||Q.chain().setContent(y).run()},d=()=>{t.loading?ma.warning("\u56DE\u7B54\u8F93\u51FA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u64CD\u4F5C\u6216\u70B9\u51FB\u505C\u6B62\u56DE\u7B54"):i.value.trim()&&(n("onSend",i.value.trim()),h())},h=()=>{var T;a.value="",(T=l.value)==null||T.commands.clearContent()},f=()=>{d()},p=()=>{n("onStop")},g=()=>{n("onClear"),h()},m=T=>{n("onAudioLoaded",T)},v=()=>{n("onAudioStart")};return e({insert:u,reset:h}),(T,y)=>{const _=Jc,Q=k6;return I.openBlock(),I.createElementBlock("div",tEr,[T.$slots.header?(I.openBlock(),I.createElementBlock("div",rEr,[I.renderSlot(T.$slots,"header",{},void 0,!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",nEr,[I.createVNode(I.unref(sxr),{editor:I.unref(l)},null,8,["editor"])]),I.createElementVNode("div",iEr,[I.createElementVNode("div",aEr,[T.$slots.extra?(I.openBlock(),I.createElementBlock("div",oEr,[I.renderSlot(T.$slots,"extra",{},void 0,!0)])):I.createCommentVNode("",!0)]),I.createElementVNode("div",sEr,[t.maxLength?(I.openBlock(),I.createElementBlock("span",lEr,I.toDisplayString(o.value)+"/"+I.toDisplayString(t.maxLength),1)):I.createCommentVNode("",!0),T.$slots.operate?(I.openBlock(),I.createElementBlock("div",uEr,[I.renderSlot(T.$slots,"operate",{},void 0,!0)])):I.createCommentVNode("",!0),t.showAudio?(I.openBlock(),I.createBlock(Jxr,{key:2,audioLoading:t.audioLoading,audioConfig:t.audioConfig,onOnAudioStart:v,onOnAudioLoaded:m},null,8,["audioLoading","audioConfig"])):I.createCommentVNode("",!0),I.createVNode(Q,null,{title:I.withCtx(()=>y[0]||(y[0]=[I.createTextVNode("\u6E05\u9664")])),default:I.withCtx(()=>[t.clearable?(I.openBlock(),I.createBlock(_,{key:0,onClick:g,type:"text"},{icon:I.withCtx(()=>[I.createVNode(I.unref(jq))]),_:1})):I.createCommentVNode("",!0)]),_:1}),t.loading?(I.openBlock(),I.createBlock(_,{key:4,type:"primary",shape:"circle",onClick:p},{icon:I.withCtx(()=>[I.createVNode(gF,{name:"ai-icon-tingzhi",class:"btn-icon"})]),_:1})):(I.openBlock(),I.createBlock(_,{key:3,type:"primary",shape:"circle",disabled:!i.value.trim(),onClick:f},{icon:I.withCtx(()=>[I.createVNode(gF,{name:"ai-icon-fasong",class:"btn-icon",style:{"margin-right":"2px"}})]),_:1},8,["disabled"]))])])])}}}),[["__scopeId","data-v-e6800ae8"]]),cEr=(t,e={bottom:50,top:50,left:0,right:0})=>{const r=()=>{n.bottom&&u({behavior:"instant"})},{arrivedState:n,measure:i}=Mnr(t,{offset:e}),{stop:a}=Onr(t,r,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),{stop:o}=mPe(t,r),s=I.computed(()=>A9(t));let l=null;const u=({behavior:d="smooth"}={})=>{s.value&&(l=setTimeout(()=>{try{s.value.scrollTo({top:s.value.scrollHeight,behavior:d})}catch{s.value.scrollTop=s.value.scrollHeight}},0))};return I.onMounted(()=>{I.nextTick(()=>{u({behavior:"instant"})})}),I.onUnmounted(()=>{a(),o(),clearTimeout(l)}),{scrollToBottom:u,arrivedState:n,measure:i}};window._iconfont_svg_string_4730060='<svg><symbol id="ai-icon-clear" viewBox="0 0 1024 1024"><path d="M975.36 455.85c0.512-53.247-42.496-96.767-95.744-97.28h-227.84V166.06c0.512-65.536-52.736-119.296-118.272-119.808H501.76c-65.536 0.512-118.784 54.272-118.272 119.808V358.57H151.04c-53.76 0.512-96.256 44.544-95.744 98.304 0.512 41.984 28.16 78.848 68.096 91.648v339.456c-0.512 43.008 34.304 77.824 77.312 78.336h635.392c43.008-0.512 77.312-35.328 77.312-78.336V546.475c37.376-14.336 61.952-50.688 61.952-90.624zM442.88 166.06c0-32.768 26.112-59.392 58.88-59.392h31.744c32.768 0.512 58.88 27.136 58.88 59.392V358.57H442.88V166.059z m393.216 739.84h-97.792V782.507c0.512-16.384-12.288-30.208-28.672-30.72-16.384-0.512-30.208 12.288-30.72 28.672v125.44h-130.56V782.507c0-16.384-13.312-29.696-29.696-29.696s-29.696 13.312-29.696 29.696v123.392H358.4V782.507c0-16.384-13.312-29.696-29.696-29.696s-29.696 13.312-29.696 29.696v123.392h-98.304c-9.728 0-17.92-8.192-17.92-17.92V553.13h671.232v334.848c0 9.728-8.192 17.92-17.92 17.92z m43.52-413.184H151.04c-20.48 0-36.864-16.896-36.864-37.376s16.384-36.864 36.864-36.864h728.576c20.48 0 36.864 16.896 36.864 37.376s-16.384 36.864-36.864 36.864z" ></path></symbol><symbol id="ai-icon-fasong" viewBox="0 0 1024 1024"><path d="M894.208 160.3584s85.2992-33.2288 78.1824 47.5136c-2.3552 33.28-23.7056 149.6064-40.2944 275.456l-56.832 372.7872s-4.7104 54.6304-47.36 64.1024c-42.5984 9.5232-106.5472-33.2288-118.3744-42.752-9.472-7.1168-177.664-113.9712-236.8512-166.1952-16.5888-14.2336-35.5328-42.752 2.4064-75.9808l248.6272-237.4656c28.416-28.4672 56.832-94.976-61.5424-14.2336l-331.5712 225.5872s-37.888 23.7568-108.9536 2.3552l-153.9072-47.4624s-56.832-35.6352 40.2432-71.2704c236.8512-111.616 528.128-225.5872 786.2272-332.4416z" ></path></symbol><symbol id="ai-icon-tingzhi" viewBox="0 0 1024 1024"><path d="M512 0a512 512 0 1 1 0 1024A512 512 0 0 1 512 0z m0 73.142857a438.857143 438.857143 0 1 0 0 877.714286A438.857143 438.857143 0 0 0 512 73.142857z" ></path><path d="M292.571429 292.571429m73.142857 0l292.571428 0q73.142857 0 73.142857 73.142857l0 292.571428q0 73.142857-73.142857 73.142857l-292.571428 0q-73.142857 0-73.142857-73.142857l0-292.571428q0-73.142857 73.142857-73.142857Z" ></path></symbol><symbol id="ai-icon-more" viewBox="0 0 1024 1024"><path d="M576 832a64 64 0 1 1-128 0 64 64 0 0 1 128 0zM512 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128z m0 320a64 64 0 1 0 0-128 64 64 0 0 0 0 128z" fill="#515151" fill-opacity=".9" ></path></symbol><symbol id="ai-icon-top" viewBox="0 0 1024 1024"><path d="M842.42 131.29H180.55c-18.2 0-33.1-14.89-33.1-33.09 0-18.2 14.89-33.1 33.1-33.1h661.88c18.2 0 33.09 14.89 33.09 33.1-0.01 18.2-14.9 33.09-33.1 33.09zM511.49 958.64c-18.2 0-33.1-14.89-33.1-33.09V263.67c0-18.2 14.89-33.1 33.1-33.1 18.2 0 33.09 14.89 33.09 33.1v661.88c0 18.19-14.9 33.09-33.09 33.09z m330.93-364.03c-8.28 0-16.55-3.31-23.17-9.93L511.49 276.9 203.71 584.68c-13.24 13.23-33.09 13.23-46.33 0-13.24-13.24-13.24-33.1 0-46.34L488.32 207.4c13.24-13.23 33.1-13.23 46.33 0l330.94 330.94c13.24 13.24 13.24 33.1 0 46.34-6.62 6.61-14.9 9.93-23.17 9.93z" fill="#515151" ></path></symbol><symbol id="ai-icon-edit" viewBox="0 0 1024 1024"><path d="M82.26816 720.45909333a109.22666667 109.22666667 0 0 1 18.73237334-71.76192l365.90933333-533.13536a109.22666667 109.22666667 0 0 1 151.82506667-28.28970666l144.12458666 98.85013333a109.22666667 109.22666667 0 0 1 28.23509334 151.93429333l-365.90933334 533.13536a109.22666667 109.22666667 0 0 1-60.23850666 43.25376l-131.61813334 37.41013334a109.22666667 109.22666667 0 0 1-138.60864-95.13642667l-12.45184-136.26026667z m643.50890667-480.26965333l-144.12458667-98.85013333a43.69066667 43.69066667 0 0 0-60.73002666 11.30496L433.70496 279.67488l216.15957334 148.32981333 87.21749333-127.03061333a43.69066667 43.69066667 0 0 0-11.30496-60.78464z m-113.0496 241.88245333L396.67712 333.74208l-241.60938666 352.03754667a43.69066667 43.69066667 0 0 0-7.48202667 28.72661333l12.45184 136.26026667a43.69066667 43.69066667 0 0 0 55.43253333 38.01088l131.61813334-37.35552a43.69066667 43.69066667 0 0 0 24.13909333-17.31242667l241.60938667-352.03754667zM534.41194667 877.41781333a32.768 32.768 0 1 0 0 65.536h393.216a32.768 32.768 0 1 0 0-65.536h-393.216z" fill="#515151" ></path></symbol><symbol id="ai-icon-search" viewBox="0 0 1024 1024"><path d="M475.59111111 75.09333333a400.49777778 400.49777778 0 0 1 307.80074667 656.81635556l157.2864 157.2864c12.23338667 11.94211555 10.55857778 33.35054222-3.64088889 47.91409778-14.56355555 14.19946667-35.97198222 15.80145778-47.84128 3.56807111l-157.2864-157.2864A400.49777778 400.49777778 0 1 1 475.59111111 75.09333333z m0 72.0896c-207.89475555 0-327.82563555 167.48088889-327.82563556 328.40817778s119.56679111 329.13635555 327.68 329.13635556c208.04039111 0 327.68-168.20906667 327.68-329.13635556 0-160.92728889-119.63960889-328.40817778-327.53436444-328.40817778z" fill="#515151" ></path></symbol><symbol id="ai-icon-shuaxin" viewBox="0 0 1024 1024"><path d="M512 894.08c-210.72 0-382.08-171.36-382.08-382.08 0-8.16 0.48-16.32 0.96-24.48l67.2 4.32c-0.48 6.72-0.48 13.44-0.48 20.16 0 173.76 141.12 314.88 314.88 314.88 81.12 0 157.92-30.72 216.48-86.4l46.08 48.96C703.52 857.12 610.4 894.08 512 894.08zM894.08 512h-67.2c0-11.04-0.48-22.08-1.92-33.12-16.8-160.8-151.2-281.76-313.44-281.76-63.36 0-123.84 18.72-176.16 53.76L298.4 195.2c62.88-42.72 136.8-65.28 213.6-65.28 196.32 0 360 146.88 380.16 342.24 1.44 12.96 1.92 26.4 1.92 39.84z" fill="#515151" ></path><path d="M163.52 304.64L58.4 492.8c-2.88 4.8 0.96 11.04 6.24 11.04H274.4c5.76 0 9.12-5.76 6.24-11.04L176 304.64c-2.88-5.28-10.08-5.28-12.48 0zM848 665.6L742.88 477.44c-2.88-4.8 0.96-11.04 6.24-11.04h209.76c5.76 0 9.12 5.76 6.24 11.04L860.48 665.6c-2.4 4.8-9.6 4.8-12.48 0zM285.44 221.6a33.6 33.6 0 1 0 67.2 0 33.6 33.6 0 1 0-67.2 0zM715.04 767.84a33.6 33.6 0 1 0 67.2 0 33.6 33.6 0 1 0-67.2 0z" fill="#515151" ></path></symbol><symbol id="ai-icon-shoucang" viewBox="0 0 1024 1024"><path d="M323.20853333 943.60462187c-38.30897813 23.80231147-88.40533333 11.4915552-111.67288853-27.2611552a82.48888853 82.48888853 0 0 1-9.55733333-61.2579552l49.5843552-211.456a14.01742187 14.01742187 0 0 0-4.28942187-13.7216l-162.304-141.42577814c-33.7123552-29.35466667-37.6035552-80.6912-8.7836448-114.9155552a80.72533333 80.72533333 0 0 1 55.18222187-28.53546666L344.3712 327.68c4.64213333-0.3868448 8.79502187-3.44746667 10.69511147-8.10097813l82.0679104-200.71537707c17.1008-41.81333333 64.65991147-61.78133333 106.15466666-44.22542293a81.39662187 81.39662187 0 0 1 43.55413334 44.22542293l82.06791146 200.704c1.90008853 4.66488853 6.05297813 7.73688853 10.69511147 8.1123552l213.02613333 17.36248853c44.6691552 3.64088853 77.7443552 43.15591147 74.20586667 88.0184896a82.06791147 82.06791147 0 0 1-27.81866667 55.4439104l-162.304 141.42577814c-3.77742187 3.28817813-5.48408853 8.61297813-4.28942293 13.71022186l49.58435627 211.456c10.2627552 43.7475552-16.384 87.82506667-59.8812448 98.37226667a80.3043552 80.3043552 0 0 1-61.3603552-9.8531552l-182.3744-113.32266667a12.04906667 12.04906667 0 0 0-12.81137814 0l-182.38577813 113.32266667zM554.43911147 772.3008l182.3744 113.32266667c2.79893333 1.72942187 6.09848853 2.26417813 9.22737706 1.50186666 6.8380448-1.6611552 11.264-8.9884448 9.5232-16.45226666l-49.5843552-211.456a82.28408853 82.28408853 0 0 1 25.89582187-80.78222187L894.1795552 437.0204448c2.65102187-2.30968853 4.3235552-5.66613333 4.61937813-9.32977813 0.60302187-7.61173333-4.7900448-14.0515552-11.70773333-14.60906667l-213.02613333-17.37386667a81.05528853 81.05528853 0 0 1-68.33493334-50.31253333l-82.06791146-200.704a13.1299552 13.1299552 0 0 0-6.97457707-7.1907552c-6.29191147-2.6624-13.57368853 0.39822187-16.34986667 7.1907552l-82.0792896 200.704a81.05528853 81.05528853 0 0 1-68.33493333 50.31253333l-213.0147552 17.37386667a12.45866667 12.45866667 0 0 0-8.51057813 4.46008853 14.1084448 14.1084448 0 0 0 1.42222293 19.47875627l162.304 141.42577707a82.28408853 82.28408853 0 0 1 25.89582187 80.78222293l-49.5843552 211.44462187a14.22222187 14.22222187 0 0 0 1.61564373 10.53582186c3.72053333 6.17813333 11.2867552 8.03271147 17.13493333 4.4032l182.38577814-113.31128853a80.31573333 80.31573333 0 0 1 84.8668448 0z" fill="#515151" ></path></symbol><symbol id="ai-icon-delete" viewBox="0 0 1024 1024"><path d="M832 224v704H192v-704h640z m-64 64H256v576h512v-576z" fill="#515151" ></path><path d="M64 224h896v64H64zM320 96h384v64H320zM384 416h64v320H384zM576 416h64v320H576z" fill="#515151" ></path></symbol><symbol id="ai-icon-copy" viewBox="0 0 1024 1024"><path d="M667.25 250.25h-471.75c-57.75 0-105 47.25-105 105v471.75c0 57.75 47.25 105 105 105h471.75c57.75 0 105-47.25 105-105V355.25c-0.75-58.5-47.25-105-105-105z m52.5 576c0 29.25-23.25 52.5-52.5 52.5h-471.75c-29.25 0-52.5-23.25-52.5-52.5v-471.75c0-29.25 23.25-52.5 52.5-52.5h471.75c29.25 0 52.5 23.25 52.5 52.5v471.75z" fill="#515151" ></path><path d="M248 437h366.75v52.5h-366.75zM248 564.5h366.75v52.5h-366.75zM248 691.25h209.25v52.5h-209.25z" fill="#515151" ></path><path d="M824 92.75h-471.75c-57.75 0-105 47.25-105 105h52.5c0-29.25 23.25-52.5 52.5-52.5h471.75c29.25 0 52.5 23.25 52.5 52.5v471.75c0 29.25-23.25 52.5-52.5 52.5v52.5c57.75 0 105-47.25 105-105V197.75c0-58.5-47.25-105-105-105z" fill="#515151" ></path></symbol></svg>',(t=>{var e=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,a,o,s,l=function(h,f){f.parentNode.insertBefore(h,f)};if(e&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(h){console&&console.log(h)}}n=function(){var h,f=document.createElement("div");f.innerHTML=t._iconfont_svg_string_4730060,(f=f.getElementsByTagName("svg")[0])&&(f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.width=0,f.style.height=0,f.style.overflow="hidden",f=f,(h=document.body).firstChild?l(f,h.firstChild):h.appendChild(f))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=n,o=t.document,s=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,u())})}function u(){s||(s=!0,a())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}u()}})(window);const dEr=[ufe,rme,nme,ime,mZe,QZe,CH,xZe,qtt,Rte,gF],Wtt=(t,e={})=>{dEr.forEach(r=>{t.component(r.name,r)})};typeof window<"u"&&window.Vue&&Wtt(window.Vue);const hEr={install:Wtt};var fEr="\0",k8="\0",Ytt="";class Oc{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=hv(void 0),this._defaultEdgeLabelFn=hv(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[k8]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return p2(e)||(e=hv(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return is(this._nodes)}sources(){var e=this;return io(this.nodes(),function(r){return xi(e._in[r])})}sinks(){var e=this;return io(this.nodes(),function(r){return xi(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return lt(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=k8,this._children[e]={},this._children[k8][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],lt(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),lt(is(this._in[e]),r),delete this._in[e],delete this._preds[e],lt(is(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ni(r))r=k8;else{r+="";for(var n=r;!Ni(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==k8)return r}}children(e){if(Ni(e)&&(e=k8),this._isCompound){var r=this._children[e];if(r)return is(r)}else{if(e===k8)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return is(r)}successors(e){var r=this._sucs[e];if(r)return is(r)}neighbors(e){var r=this.predecessors(e);if(r)return jvt(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;lt(this._nodes,function(o,s){e(s)&&r.setNode(s,o)}),lt(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var s=n.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&<(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return p2(e)||(e=hv(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ji(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Vo(e,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var e,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,Ni(n)||(n=""+n);var s=eA(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!Ni(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(e,r,n);var l=pEr(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[s]=l,jtt(this._preds[r],e),jtt(this._sucs[e],r),this._in[r][s]=l,this._out[e][s]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?Kue(this._isDirected,arguments[0]):eA(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?Kue(this._isDirected,arguments[0]):eA(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?Kue(this._isDirected,arguments[0]):eA(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Xtt(this._preds[r],e),Xtt(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=Ji(n);return r?io(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=Ji(n);return r?io(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}}Oc.prototype._nodeCount=0,Oc.prototype._edgeCount=0;function jtt(t,e){t[e]?t[e]++:t[e]=1}function Xtt(t,e){--t[e]||delete t[e]}function eA(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}return i+Ytt+a+Ytt+(Ni(n)?fEr:n)}function pEr(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return n&&(s.name=n),s}function Kue(t,e){return eA(t,e.v,e.w,e.name)}class gEr{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Ktt(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Ktt(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,mEr)),n=n._prev;return"["+e.join(", ")+"]"}}function Ktt(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function mEr(t,e){if(t!=="_next"&&t!=="_prev")return e}var TEr=hv(1);function vEr(t,e){if(t.nodeCount()<=1)return[];var r=_Er(t,e||TEr),n=yEr(r.graph,r.buckets,r.zeroIdx);return ks(or(n,function(i){return t.outEdges(i.v,i.w)}))}function yEr(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],o;t.nodeCount();){for(;o=a.dequeue();)Zue(t,e,r,o);for(;o=i.dequeue();)Zue(t,e,r,o);if(t.nodeCount()){for(var s=e.length-2;s>0;--s)if(o=e[s].dequeue(),o){n=n.concat(Zue(t,e,r,o,!0));break}}}return n}function Zue(t,e,r,n,i){var a=i?[]:void 0;return lt(t.inEdges(n.v),function(o){var s=t.edge(o),l=t.node(o.v);i&&a.push({v:o.v,w:o.w}),l.out-=s,Jue(e,r,l)}),lt(t.outEdges(n.v),function(o){var s=t.edge(o),l=o.w,u=t.node(l);u.in-=s,Jue(e,r,u)}),t.removeNode(n.v),a}function _Er(t,e){var r=new Oc,n=0,i=0;lt(t.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),lt(t.edges(),function(s){var l=r.edge(s.v,s.w)||0,u=e(s),d=l+u;r.setEdge(s.v,s.w,d),i=Math.max(i,r.node(s.v).out+=u),n=Math.max(n,r.node(s.w).in+=u)});var a=mv(i+n+3).map(function(){return new gEr}),o=n+1;return lt(r.nodes(),function(s){Jue(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function Jue(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function bEr(t){var e=t.graph().acyclicer==="greedy"?vEr(t,r(t)):QEr(t);lt(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,lq("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function QEr(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,lt(t.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return lt(t.nodes(),i),e}function xEr(t){lt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}function d_(t,e,r,n){var i;do i=lq(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function EEr(t){var e=new Oc().setGraph(t.graph());return lt(t.nodes(),function(r){e.setNode(r,t.node(r))}),lt(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function Ztt(t){var e=new Oc({multigraph:t.isMultigraph()}).setGraph(t.graph());return lt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),lt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function Jtt(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,s=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),l=s*i/a,u=s):(i<0&&(o=-o),l=o,u=o*a/i),{x:r+l,y:n+u}}function vF(t){var e=or(mv(trt(t)+1),function(){return[]});return lt(t.nodes(),function(r){var n=t.node(r),i=n.rank;Ni(i)||(e[i][n.order]=r)}),e}function SEr(t){var e=gv(or(t.nodes(),function(r){return t.node(r).rank}));lt(t.nodes(),function(r){var n=t.node(r);on(n,"rank")&&(n.rank-=e)})}function CEr(t){var e=gv(or(t.nodes(),function(a){return t.node(a).rank})),r=[];lt(t.nodes(),function(a){var o=t.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=t.graph().nodeRankFactor;lt(r,function(a,o){Ni(a)&&o%i!==0?--n:n&<(a,function(s){t.node(s).rank+=n})})}function ert(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),d_(t,"border",i,e)}function trt(t){return _g(or(t.nodes(),function(e){var r=t.node(e).rank;if(!Ni(r))return r}))}function LEr(t,e){var r={lhs:[],rhs:[]};return lt(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function wEr(t,e){return e()}function AEr(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&<(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)rrt(t,"borderLeft","_bl",r,i,a),rrt(t,"borderRight","_br",r,i,a)}}lt(t.children(),e)}function rrt(t,e,r,n,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],l=d_(t,"border",o,r);i[e][a]=l,t.setParent(l,n),s&&t.setEdge(s,l,{weight:1})}function OEr(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&nrt(t)}function MEr(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&REr(t),(e==="lr"||e==="rl")&&(DEr(t),nrt(t))}function nrt(t){lt(t.nodes(),function(e){irt(t.node(e))}),lt(t.edges(),function(e){irt(t.edge(e))})}function irt(t){var e=t.width;t.width=t.height,t.height=e}function REr(t){lt(t.nodes(),function(e){ece(t.node(e))}),lt(t.edges(),function(e){var r=t.edge(e);lt(r.points,ece),Object.prototype.hasOwnProperty.call(r,"y")&&ece(r)})}function ece(t){t.y=-t.y}function DEr(t){lt(t.nodes(),function(e){tce(t.node(e))}),lt(t.edges(),function(e){var r=t.edge(e);lt(r.points,tce),Object.prototype.hasOwnProperty.call(r,"x")&&tce(r)})}function tce(t){var e=t.x;t.x=t.y,t.y=e}function NEr(t){t.graph().dummyChains=[],lt(t.edges(),function(e){IEr(t,e)})}function IEr(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,o=e.name,s=t.edge(e),l=s.labelRank;if(a!==n+1){t.removeEdge(e);var u=void 0,d,h;for(h=0,++n;n<a;++h,++n)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:e,rank:n},d=d_(t,"edge",u,"_d"),n===l&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),t.setEdge(r,d,{weight:s.weight},o),h===0&&t.graph().dummyChains.push(d),r=d;t.setEdge(r,i,{weight:s.weight},o)}}function kEr(t){lt(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e)})}function rce(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=gv(or(t.outEdges(n),function(o){return r(o.w)-t.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}lt(t.sources(),r)}function tA(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function art(t){var e=new Oc({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;PEr(e,t)<n;)i=BEr(e,t),a=e.hasNode(i.v)?tA(t,i):-tA(t,i),HEr(e,t,a);return e}function PEr(t,e){function r(n){lt(e.nodeEdges(n),function(i){var a=i.v,o=n===a?i.w:a;!t.hasNode(o)&&!tA(e,i)&&(t.setNode(o,{}),t.setEdge(n,o,{}),r(o))})}return lt(t.nodes(),r),t.nodeCount()}function BEr(t,e){return oq(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return tA(e,r)})}function HEr(t,e,r){lt(t.nodes(),function(n){e.node(n).rank+=r})}function FEr(){}FEr.prototype=new Error;function ort(t,e,r){ai(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return lt(e,function(o){if(!t.hasNode(o))throw new Error("Graph does not have node: "+o);srt(t,o,r==="post",a,n,i)}),i}function srt(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),lt(i(e),function(o){srt(t,o,r,n,i,a)}),r&&a.push(e))}function VEr(t,e){return ort(t,e,"post")}function $Er(t,e){return ort(t,e,"pre")}P8.initLowLimValues=ice,P8.initCutValues=nce,P8.calcCutValue=lrt,P8.leaveEdge=crt,P8.enterEdge=drt,P8.exchangeEdges=hrt;function P8(t){t=EEr(t),rce(t);var e=art(t);ice(e),nce(e,t);for(var r,n;r=crt(e);)n=drt(e,t,r),hrt(e,t,r,n)}function nce(t,e){var r=VEr(t,t.nodes());r=r.slice(0,r.length-1),lt(r,function(n){UEr(t,e,n)})}function UEr(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=lrt(t,e,r)}function lrt(t,e,r){var n=t.node(r),i=n.parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,lt(e.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==i){var h=u===a,f=e.edge(l).weight;if(s+=h?f:-f,GEr(t,r,d)){var p=t.edge(r,d).cutvalue;s+=h?-p:p}}}),s}function ice(t,e){arguments.length<2&&(e=t.nodes()[0]),urt(t,{},1,e)}function urt(t,e,r,n,i){var a=r,o=t.node(n);return e[n]=!0,lt(t.neighbors(n),function(s){Object.prototype.hasOwnProperty.call(e,s)||(r=urt(t,e,r,s,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function crt(t){return Ph(t.edges(),function(e){return t.edge(e).cutvalue<0})}function drt(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),o=t.node(i),s=a,l=!1;a.lim>o.lim&&(s=o,l=!0);var u=io(e.edges(),function(d){return l===frt(t,t.node(d.v),s)&&l!==frt(t,t.node(d.w),s)});return oq(u,function(d){return tA(e,d)})}function hrt(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),ice(t),nce(t,e),zEr(t,e)}function zEr(t,e){var r=Ph(t.nodes(),function(i){return!e.node(i).parent}),n=$Er(t,r);n=n.slice(1),lt(n,function(i){var a=t.node(i).parent,o=e.edge(i,a),s=!1;o||(o=e.edge(a,i),s=!0),e.node(i).rank=e.node(a).rank+(s?o.minlen:-o.minlen)})}function GEr(t,e,r){return t.hasEdge(e,r)}function frt(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function qEr(t){switch(t.graph().ranker){case"network-simplex":prt(t);break;case"tight-tree":YEr(t);break;case"longest-path":WEr(t);break;default:prt(t)}}var WEr=rce;function YEr(t){rce(t),art(t)}function prt(t){P8(t)}function jEr(t){var e=d_(t,"root",{},"_root"),r=XEr(t),n=_g(Ji(r))-1,i=2*n+1;t.graph().nestingRoot=e,lt(t.edges(),function(o){t.edge(o).minlen*=i});var a=KEr(t)+1;lt(t.children(),function(o){grt(t,e,i,a,n,r,o)}),t.graph().nodeRankFactor=i}function grt(t,e,r,n,i,a,o){var s=t.children(o);if(!s.length){o!==e&&t.setEdge(e,o,{weight:0,minlen:r});return}var l=ert(t,"_bt"),u=ert(t,"_bb"),d=t.node(o);t.setParent(l,o),d.borderTop=l,t.setParent(u,o),d.borderBottom=u,lt(s,function(h){grt(t,e,r,n,i,a,h);var f=t.node(h),p=f.borderTop?f.borderTop:h,g=f.borderBottom?f.borderBottom:h,m=f.borderTop?n:2*n,v=p!==g?1:i-a[o]+1;t.setEdge(l,p,{weight:m,minlen:v,nestingEdge:!0}),t.setEdge(g,u,{weight:m,minlen:v,nestingEdge:!0})}),t.parent(o)||t.setEdge(e,l,{weight:0,minlen:i+a[o]})}function XEr(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&<(a,function(o){r(o,i+1)}),e[n]=i}return lt(t.children(),function(n){r(n,1)}),e}function KEr(t){return Vo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function ZEr(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,lt(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}function JEr(t,e,r){var n={},i;lt(r,function(a){for(var o=t.parent(a),s,l;o;){if(s=t.parent(o),s?(l=n[s],n[s]=o):(l=i,i=o),l&&l!==o){e.setEdge(l,o);return}o=s}})}function eSr(t,e,r){var n=tSr(t),i=new Oc({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return lt(t.nodes(),function(a){var o=t.node(a),s=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||n),lt(t[r](a),function(l){var u=l.v===a?l.w:l.v,d=i.edge(u,a),h=Ni(d)?0:d.weight;i.setEdge(u,a,{weight:t.edge(l).weight+h})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function tSr(t){for(var e;t.hasNode(e=lq("_root")););return e}function rSr(t,e){for(var r=0,n=1;n<e.length;++n)r+=nSr(t,e[n-1],e[n]);return r}function nSr(t,e,r){for(var n=Jvt(r,or(r,function(u,d){return d})),i=ks(or(e,function(u){return JQ(or(t.outEdges(u),function(d){return{pos:n[d.w],weight:t.edge(d).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var o=2*a-1;a-=1;var s=or(new Array(o),function(){return 0}),l=0;return lt(i.forEach(function(u){var d=u.pos+a;s[d]+=u.weight;for(var h=0;d>0;)d%2&&(h+=s[d+1]),d=d-1>>1,s[d]+=u.weight;l+=u.weight*h})),l}function iSr(t){var e={},r=io(t.nodes(),function(s){return!t.children(s).length}),n=_g(or(r,function(s){return t.node(s).rank})),i=or(mv(n+1),function(){return[]});function a(s){if(!on(e,s)){e[s]=!0;var l=t.node(s);i[l.rank].push(s),lt(t.successors(s),a)}}var o=JQ(r,function(s){return t.node(s).rank});return lt(o,a),i}function aSr(t,e){return or(e,function(r){var n=t.inEdges(r);if(n.length){var i=Vo(n,function(a,o){var s=t.edge(o),l=t.node(o.v);return{sum:a.sum+s.weight*l.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function oSr(t,e){var r={};lt(t,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Ni(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),lt(e.edges(),function(i){var a=r[i.v],o=r[i.w];!Ni(a)&&!Ni(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=io(r,function(i){return!i.indegree});return sSr(n)}function sSr(t){var e=[];function r(a){return function(o){o.merged||(Ni(o.barycenter)||Ni(a.barycenter)||o.barycenter>=a.barycenter)&&lSr(a,o)}}function n(a){return function(o){o.in.push(a),--o.indegree===0&&t.push(o)}}for(;t.length;){var i=t.pop();e.push(i),lt(i.in.reverse(),r(i)),lt(i.out,n(i))}return or(io(e,function(a){return!a.merged}),function(a){return vR(a,["vs","i","barycenter","weight"])})}function lSr(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}function uSr(t,e){var r=LEr(t,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,i=JQ(r.rhs,function(d){return-d.i}),a=[],o=0,s=0,l=0;n.sort(cSr(!!e)),l=mrt(a,i,l),lt(n,function(d){l+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,s+=d.weight,l=mrt(a,i,l)});var u={vs:ks(a)};return s&&(u.barycenter=o/s,u.weight=s),u}function mrt(t,e,r){for(var n;e.length&&(n=a3(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function cSr(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function Trt(t,e,r,n){var i=t.children(e),a=t.node(e),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,l={};o&&(i=io(i,function(g){return g!==o&&g!==s}));var u=aSr(t,i);lt(u,function(g){if(t.children(g.v).length){var m=Trt(t,g.v,r,n);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&hSr(g,m)}});var d=oSr(u,r);dSr(d,l);var h=uSr(d,n);if(o&&(h.vs=ks([o,h.vs,s]),t.predecessors(o).length)){var f=t.node(t.predecessors(o)[0]),p=t.node(t.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+f.order+p.order)/(h.weight+2),h.weight+=2}return h}function dSr(t,e){lt(t,function(r){r.vs=ks(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function hSr(t,e){Ni(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}function fSr(t){var e=trt(t),r=vrt(t,mv(1,e+1),"inEdges"),n=vrt(t,mv(e-1,-1,-1),"outEdges"),i=iSr(t);yrt(t,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,l=0;l<4;++s,++l){pSr(s%2?r:n,s%4>=2),i=vF(t);var u=rSr(t,i);u<a&&(l=0,o=BTt(i),a=u)}yrt(t,o)}function vrt(t,e,r){return or(e,function(n){return eSr(t,n,r)})}function pSr(t,e){var r=new Oc;lt(t,function(n){var i=n.graph().root,a=Trt(n,i,r,e);lt(a.vs,function(o,s){n.node(o).order=s}),JEr(n,r,a.vs)})}function yrt(t,e){lt(e,function(r){lt(r,function(n,i){t.node(n).order=i})})}function gSr(t){var e=TSr(t);lt(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=mSr(t,e,i.v,i.w),o=a.path,s=a.lca,l=0,u=o[l],d=!0;r!==i.w;){if(n=t.node(r),d){for(;(u=o[l])!==s&&t.node(u).maxRank<n.rank;)l++;u===s&&(d=!1)}if(!d){for(;l<o.length-1&&t.node(u=o[l+1]).minRank<=n.rank;)l++;u=o[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function mSr(t,e,r,n){var i=[],a=[],o=Math.min(e[r].low,e[n].low),s=Math.max(e[r].lim,e[n].lim),l,u;l=r;do l=t.parent(l),i.push(l);while(l&&(e[l].low>o||s>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function TSr(t){var e={},r=0;function n(i){var a=r;lt(t.children(i),n),e[i]={low:a,lim:r++}}return lt(t.children(),n),e}function vSr(t,e){var r={};function n(i,a){var o=0,s=0,l=i.length,u=a3(a);return lt(a,function(d,h){var f=_Sr(t,d),p=f?t.node(f).order:l;(f||d===u)&&(lt(a.slice(s,h+1),function(g){lt(t.predecessors(g),function(m){var v=t.node(m),T=v.order;(T<o||p<T)&&!(v.dummy&&t.node(g).dummy)&&_rt(r,m,g)})}),s=h+1,o=p)}),a}return Vo(e,n),r}function ySr(t,e){var r={};function n(a,o,s,l,u){var d;lt(mv(o,s),function(h){d=a[h],t.node(d).dummy&<(t.predecessors(d),function(f){var p=t.node(f);p.dummy&&(p.order<l||p.order>u)&&_rt(r,f,d)})})}function i(a,o){var s=-1,l,u=0;return lt(o,function(d,h){if(t.node(d).dummy==="border"){var f=t.predecessors(d);f.length&&(l=t.node(f[0]).order,n(o,u,h,s,l),u=h,s=l)}n(o,u,o.length,l,a.length)}),o}return Vo(e,i),r}function _Sr(t,e){if(t.node(e).dummy)return Ph(t.predecessors(e),function(r){return t.node(r).dummy})}function _rt(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function bSr(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function QSr(t,e,r,n){var i={},a={},o={};return lt(e,function(s){lt(s,function(l,u){i[l]=l,a[l]=l,o[l]=u})}),lt(e,function(s){var l=-1;lt(s,function(u){var d=n(u);if(d.length){d=JQ(d,function(m){return o[m]});for(var h=(d.length-1)/2,f=Math.floor(h),p=Math.ceil(h);f<=p;++f){var g=d[f];a[u]===u&&l<o[g]&&!bSr(r,u,g)&&(a[g]=u,a[u]=i[u]=i[g],l=o[g])}}})}),{root:i,align:a}}function xSr(t,e,r,n,i){var a={},o=ESr(t,e,r,i),s=i?"borderLeft":"borderRight";function l(h,f){for(var p=o.nodes(),g=p.pop(),m={};g;)m[g]?h(g):(m[g]=!0,p.push(g),p=p.concat(f(g))),g=p.pop()}function u(h){a[h]=o.inEdges(h).reduce(function(f,p){return Math.max(f,a[p.v]+o.edge(p))},0)}function d(h){var f=o.outEdges(h).reduce(function(g,m){return Math.min(g,a[m.w]-o.edge(m))},Number.POSITIVE_INFINITY),p=t.node(h);f!==Number.POSITIVE_INFINITY&&p.borderType!==s&&(a[h]=Math.max(a[h],f))}return l(u,o.predecessors.bind(o)),l(d,o.successors.bind(o)),lt(n,function(h){a[h]=a[r[h]]}),a}function ESr(t,e,r,n){var i=new Oc,a=t.graph(),o=ASr(a.nodesep,a.edgesep,n);return lt(e,function(s){var l;lt(s,function(u){var d=r[u];if(i.setNode(d),l){var h=r[l],f=i.edge(h,d);i.setEdge(h,d,Math.max(o(t,u,l),f||0))}l=u})}),i}function SSr(t,e){return oq(Ji(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return hvt(r,function(a,o){var s=OSr(t,o)/2;n=Math.max(a+s,n),i=Math.min(a-s,i)}),n-i})}function CSr(t,e){var r=Ji(e),n=gv(r),i=_g(r);lt(["u","d"],function(a){lt(["l","r"],function(o){var s=a+o,l=t[s],u;if(l!==e){var d=Ji(l);u=o==="l"?n-gv(d):i-_g(d),u&&(t[s]=mR(l,function(h){return h+u}))}})})}function LSr(t,e){return mR(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=JQ(or(t,n));return(i[1]+i[2])/2})}function wSr(t){var e=vF(t),r=TR(vSr(t,e),ySr(t,e)),n={},i;lt(["u","d"],function(o){i=o==="u"?e:Ji(e).reverse(),lt(["l","r"],function(s){s==="r"&&(i=or(i,function(h){return Ji(h).reverse()}));var l=(o==="u"?t.predecessors:t.successors).bind(t),u=QSr(t,i,r,l),d=xSr(t,i,u.root,u.align,s==="r");s==="r"&&(d=mR(d,function(h){return-h})),n[o+s]=d})});var a=SSr(t,n);return CSr(n,a),LSr(n,t.graph().align)}function ASr(t,e,r){return function(n,i,a){var o=n.node(i),s=n.node(a),l=0,u;if(l+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=-o.width/2;break;case"r":u=o.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(o.dummy?e:t)/2,l+=(s.dummy?e:t)/2,l+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function OSr(t,e){return t.node(e).width}function MSr(t){t=Ztt(t),RSr(t),fvt(wSr(t),function(e,r){t.node(r).x=e})}function RSr(t){var e=vF(t),r=t.graph().ranksep,n=0;lt(e,function(i){var a=_g(or(i,function(o){return t.node(o).height}));lt(i,function(o){t.node(o).y=n+a/2}),n+=a+r})}function brt(t,e){var r=wEr;r("layout",()=>{var n=r(" buildLayoutGraph",()=>USr(t));r(" runLayout",()=>DSr(n,r)),r(" updateInputGraph",()=>NSr(t,n))})}function DSr(t,e){e(" makeSpaceForEdgeLabels",()=>zSr(t)),e(" removeSelfEdges",()=>JSr(t)),e(" acyclic",()=>bEr(t)),e(" nestingGraph.run",()=>jEr(t)),e(" rank",()=>qEr(Ztt(t))),e(" injectEdgeLabelProxies",()=>GSr(t)),e(" removeEmptyRanks",()=>CEr(t)),e(" nestingGraph.cleanup",()=>ZEr(t)),e(" normalizeRanks",()=>SEr(t)),e(" assignRankMinMax",()=>qSr(t)),e(" removeEdgeLabelProxies",()=>WSr(t)),e(" normalize.run",()=>NEr(t)),e(" parentDummyChains",()=>gSr(t)),e(" addBorderSegments",()=>AEr(t)),e(" order",()=>fSr(t)),e(" insertSelfEdges",()=>eCr(t)),e(" adjustCoordinateSystem",()=>OEr(t)),e(" position",()=>MSr(t)),e(" positionSelfEdges",()=>tCr(t)),e(" removeBorderNodes",()=>ZSr(t)),e(" normalize.undo",()=>kEr(t)),e(" fixupEdgeLabelCoords",()=>XSr(t)),e(" undoCoordinateSystem",()=>MEr(t)),e(" translateGraph",()=>YSr(t)),e(" assignNodeIntersects",()=>jSr(t)),e(" reversePoints",()=>KSr(t)),e(" acyclic.undo",()=>xEr(t))}function NSr(t,e){lt(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),lt(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var ISr=["nodesep","edgesep","ranksep","marginx","marginy"],kSr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},PSr=["acyclicer","ranker","rankdir","align"],BSr=["width","height"],HSr={width:0,height:0},FSr=["minlen","weight","width","height","labeloffset"],VSr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$Sr=["labelpos"];function USr(t){var e=new Oc({multigraph:!0,compound:!0}),r=oce(t.graph());return e.setGraph(TR({},kSr,ace(r,ISr),vR(r,PSr))),lt(t.nodes(),function(n){var i=oce(t.node(n));e.setNode(n,fR(ace(i,BSr),HSr)),e.setParent(n,t.parent(n))}),lt(t.edges(),function(n){var i=oce(t.edge(n));e.setEdge(n,TR({},VSr,ace(i,FSr),vR(i,$Sr)))}),e}function zSr(t){var e=t.graph();e.ranksep/=2,lt(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function GSr(t){lt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};d_(t,"edge-proxy",a,"_ep")}})}function qSr(t){var e=0;lt(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=_g(e,n.maxRank))}),t.graph().maxRank=e}function WSr(t){lt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function YSr(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),o=a.marginx||0,s=a.marginy||0;function l(u){var d=u.x,h=u.y,f=u.width,p=u.height;e=Math.min(e,d-f/2),r=Math.max(r,d+f/2),n=Math.min(n,h-p/2),i=Math.max(i,h+p/2)}lt(t.nodes(),function(u){l(t.node(u))}),lt(t.edges(),function(u){var d=t.edge(u);Object.prototype.hasOwnProperty.call(d,"x")&&l(d)}),e-=o,n-=s,lt(t.nodes(),function(u){var d=t.node(u);d.x-=e,d.y-=n}),lt(t.edges(),function(u){var d=t.edge(u);lt(d.points,function(h){h.x-=e,h.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=e),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),a.width=r-e+o,a.height=i-n+s}function jSr(t){lt(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(Jtt(n,a)),r.points.push(Jtt(i,o))})}function XSr(t){lt(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function KSr(t){lt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function ZSr(t){lt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(a3(r.borderLeft)),o=t.node(a3(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),lt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function JSr(t){lt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function eCr(t){var e=vF(t);lt(e,function(r){var n=0;lt(r,function(i,a){var o=t.node(i);o.order=a+n,lt(o.selfEdges,function(s){d_(t,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++n,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function tCr(t){lt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}function ace(t,e){return mR(vR(t,e),Number)}function oce(t){var e={};return lt(t,function(r,n){e[n.toLowerCase()]=r}),e}function lh(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:rCr(t),edges:nCr(t)};return Ni(t.graph())||(e.value=ss(t.graph())),e}function rCr(t){return or(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return Ni(r)||(i.value=r),Ni(n)||(i.parent=n),i})}function nCr(t){return or(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Ni(e.name)||(n.name=e.name),Ni(r)||(n.value=r),n})}var jn=new Map,B8=new Map,Qrt=new Map,iCr=N(()=>{B8.clear(),Qrt.clear(),jn.clear()},"clear"),yF=N((t,e)=>{const r=B8.get(e)||[];return Te.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),aCr=N((t,e)=>{const r=B8.get(e)||[];return Te.info("Descendants of ",e," is ",r),Te.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||yF(t.v,e)||yF(t.w,e)||r.includes(t.w):(Te.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),xrt=N((t,e,r,n)=>{Te.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),Te.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)xrt(a,e,r,n);else{const o=e.node(a);Te.info("cp ",a," to ",n," with parent ",t),r.setNode(a,o),n!==e.parent(a)&&(Te.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(Te.debug("Setting parent",a,t),r.setParent(a,t)):(Te.info("In copy ",t,"root",n,"data",e.node(t),n),Te.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));const s=e.edges(a);Te.debug("Copying Edges",s),s.forEach(l=>{Te.info("Edge",l);const u=e.edge(l.v,l.w,l.name);Te.info("Edge data",u,n);try{aCr(l,n)?(Te.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),Te.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):Te.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(d){Te.error(d)}})}Te.debug("Removing node",a),e.removeNode(a)})},"copy"),Ert=N((t,e)=>{const r=e.children(t);let n=[...r];for(const i of r)Qrt.set(i,t),n=[...n,...Ert(i,e)];return n},"extractDescendants"),oCr=N((t,e,r)=>{const n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),o=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),rA=N((t,e,r)=>{const n=e.children(t);if(Te.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(const a of n){const o=rA(a,e,r),s=oCr(e,r,o);if(o)if(s.length>0)i=o;else return o}return i},"findNonClusterChild"),Srt=N(t=>!jn.has(t)||!jn.get(t).externalConnections?t:jn.has(t)?jn.get(t).id:t,"getAnchorId"),sCr=N((t,e)=>{if(!t||e>10){Te.debug("Opting out, no graph ");return}else Te.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(Te.warn("Cluster identified",r," Replacement id in edges: ",rA(r,t,r)),B8.set(r,Ert(r,t)),jn.set(r,{id:rA(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){const n=t.children(r),i=t.edges();n.length>0?(Te.debug("Cluster identified",r,B8),i.forEach(a=>{const o=yF(a.v,r),s=yF(a.w,r);o^s&&(Te.warn("Edge: ",a," leaves cluster ",r),Te.warn("Descendants of XXX ",r,": ",B8.get(r)),jn.get(r).externalConnections=!0)})):Te.debug("Not a cluster ",r,B8)});for(let r of jn.keys()){const n=jn.get(r).id,i=t.parent(n);i!==r&&jn.has(i)&&!jn.get(i).externalConnections&&(jn.get(r).id=i)}t.edges().forEach(function(r){const n=t.edge(r);Te.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),Te.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(Te.warn("Fix XXX",jn,"ids:",r.v,r.w,"Translating: ",jn.get(r.v)," --- ",jn.get(r.w)),jn.get(r.v)||jn.get(r.w)){if(Te.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Srt(r.v),a=Srt(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){const o=t.parent(i);jn.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){const o=t.parent(a);jn.get(o).externalConnections=!0,n.toCluster=r.w}Te.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),Te.warn("Adjusted Graph",lh(t)),Crt(t,0),Te.trace(jn)},"adjustClustersAndEdges"),Crt=N((t,e)=>{var i,a;if(Te.warn("extractor - ",e,lh(t),t.children("D")),e>10){Te.error("Bailing out");return}let r=t.nodes(),n=!1;for(const o of r){const s=t.children(o);n=n||s.length>0}if(!n){Te.debug("Done, no node has children",t.nodes());return}Te.debug("Nodes = ",r,e);for(const o of r)if(Te.debug("Extracting node",o,jn,jn.has(o)&&!jn.get(o).externalConnections,!t.parent(o),t.node(o),t.children("D")," Depth ",e),!jn.has(o))Te.debug("Not a cluster",o,e);else if(!jn.get(o).externalConnections&&t.children(o)&&t.children(o).length>0){Te.warn("Cluster without external connections, without a parent and with children",o,e);let l=t.graph().rankdir==="TB"?"LR":"TB";(a=(i=jn.get(o))==null?void 0:i.clusterData)!=null&&a.dir&&(l=jn.get(o).clusterData.dir,Te.warn("Fixing dir",jn.get(o).clusterData.dir,l));const u=new Oc({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Te.warn("Old graph before copy",lh(t)),xrt(o,t,u,o),t.setNode(o,{clusterNode:!0,id:o,clusterData:jn.get(o).clusterData,label:jn.get(o).label,graph:u}),Te.warn("New graph after copy node: (",o,")",lh(u)),Te.debug("Old graph after copy",lh(t))}else Te.warn("Cluster ** ",o," **not meeting the criteria !externalConnections:",!jn.get(o).externalConnections," no parent: ",!t.parent(o)," children ",t.children(o)&&t.children(o).length>0,t.children("D"),e),Te.debug(jn);r=t.nodes(),Te.warn("New list of nodes",r);for(const o of r){const s=t.node(o);Te.warn(" Now next level",o,s),s!=null&&s.clusterNode&&Crt(s.graph,e+1)}},"extractor"),Lrt=N((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{const i=t.children(n),a=Lrt(t,i);r=[...r,...a]}),r},"sorter"),lCr=N(t=>Lrt(t,t.children()),"sortNodesByHierarchy"),wrt=N(async(t,e,r,n,i,a)=>{Te.warn("Graph in recursive render:XAX",lh(e),i);const o=e.graph().rankdir;Te.trace("Dir in recursive render - dir:",o);const s=t.insert("g").attr("class","root");e.nodes()?Te.info("Recursive render XXX",e.nodes()):Te.info("No nodes found for",e),e.edges().length>0&&Te.info("Recursive edges",e.edge(e.edges()[0]));const l=s.insert("g").attr("class","clusters"),u=s.insert("g").attr("class","edgePaths"),d=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(m){const v=e.node(m);if(i!==void 0){const T=JSON.parse(JSON.stringify(i.clusterData));Te.trace(`Setting data for parent cluster XXX
|
|
1062
|
+
*/var Gxr=mF.exports,Utt;function qxr(){return Utt||(Utt=1,function(t,e){(function(r,n){t.exports=n()})(Gxr,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,s){i.o(a,o)||Object.defineProperty(a,o,{enumerable:!0,get:s})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,o){if(1&o&&(a=i(a)),8&o||4&o&&typeof a=="object"&&a&&a.__esModule)return a;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:a}),2&o&&typeof a!="string")for(var l in a)i.d(s,l,(function(u){return a[u]}).bind(null,l));return s},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=1)}([function(r,n,i){function a(o,s,l){for(var u=0;u<l.length;u++)o.setUint8(s+u,l.charCodeAt(u))}Object.defineProperty(n,"__esModule",{value:!0}),n.compress=function(o,s,l){for(var u=s/l,d=Math.max(u,1),h=o.left,f=o.right,p=Math.floor((h.length+f.length)/u),g=new Float32Array(p),m=0,v=0;m<p;){var T=Math.floor(v);g[m]=h[T],m++,f.length&&(g[m]=f[T],m++),v+=d}return g},n.encodePCM=function(o,s,l){l===void 0&&(l=!0);var u=0,d=o.length*(s/8),h=new ArrayBuffer(d),f=new DataView(h);if(s===8)for(var p=0;p<o.length;p++,u++){var g=(m=Math.max(-1,Math.min(1,o[p])))<0?128*m:127*m;g=+g+128,f.setInt8(u,g)}else for(p=0;p<o.length;p++,u+=2){var m=Math.max(-1,Math.min(1,o[p]));f.setInt16(u,m<0?32768*m:32767*m,l)}return f},n.encodeWAV=function(o,s,l,u,d,h){h===void 0&&(h=!0);var f=l>s?s:l,p=d,g=new ArrayBuffer(44+o.byteLength),m=new DataView(g),v=u,T=0;a(m,T,"RIFF"),T+=4,m.setUint32(T,36+o.byteLength,h),a(m,T+=4,"WAVE"),a(m,T+=4,"fmt "),T+=4,m.setUint32(T,16,h),T+=4,m.setUint16(T,1,h),T+=2,m.setUint16(T,v,h),T+=2,m.setUint32(T,f,h),T+=4,m.setUint32(T,v*f*(p/8),h),T+=4,m.setUint16(T,v*(p/8),h),T+=2,m.setUint16(T,p,h),a(m,T+=2,"data"),T+=4,m.setUint32(T,o.byteLength,h),T+=4;for(var y=0;y<o.byteLength;)m.setUint8(T,o.getUint8(y)),T++,y++;return m}},function(r,n,i){var a,o=this&&this.__extends||(a=function(h,f){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var m in g)g.hasOwnProperty(m)&&(p[m]=g[m])})(h,f)},function(h,f){function p(){this.constructor=h}a(h,f),h.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)});Object.defineProperty(n,"__esModule",{value:!0});var s=i(2),l=i(0),u=i(3),d=function(h){function f(p){p===void 0&&(p={});var g=h.call(this,p)||this;return g.isrecording=!1,g.ispause=!1,g.isplaying=!1,g}return o(f,h),f.prototype.setOption=function(p){p===void 0&&(p={}),this.setNewOption(p)},f.prototype.start=function(){return this.isrecording?Promise.reject():(this.isrecording=!0,this.startRecord())},f.prototype.pause=function(){this.isrecording&&!this.ispause&&(this.ispause=!0,this.pauseRecord())},f.prototype.resume=function(){this.isrecording&&this.ispause&&(this.ispause=!1,this.resumeRecord())},f.prototype.stop=function(){this.isrecording&&(this.isrecording=!1,this.ispause=!1,this.stopRecord())},f.prototype.play=function(){this.stop(),this.isplaying=!0,this.onplay&&this.onplay(),u.default.addPlayEnd(this.onplayend);var p=this.getWAV();p.byteLength>44&&u.default.play(p.buffer)},f.prototype.getPlayTime=function(){return u.default.getPlayTime()},f.prototype.pausePlay=function(){!this.isrecording&&this.isplaying&&(this.isplaying=!1,this.onpauseplay&&this.onpauseplay(),u.default.pausePlay())},f.prototype.resumePlay=function(){this.isrecording||this.isplaying||(this.isplaying=!0,this.onresumeplay&&this.onresumeplay(),u.default.resumePlay())},f.prototype.stopPlay=function(){this.isrecording||(this.isplaying=!1,this.onstopplay&&this.onstopplay(),u.default.stopPlay())},f.prototype.destroy=function(){return u.default.destroyPlay(),this.destroyRecord()},f.prototype.getRecordAnalyseData=function(){return this.getAnalyseData()},f.prototype.getPlayAnalyseData=function(){return u.default.getAnalyseData()},f.prototype.getPCM=function(){this.stop();var p=this.getData();return p=l.compress(p,this.inputSampleRate,this.outputSampleRate),l.encodePCM(p,this.oututSampleBits,this.littleEdian)},f.prototype.getPCMBlob=function(){return new Blob([this.getPCM()])},f.prototype.downloadPCM=function(p){p===void 0&&(p="recorder");var g=this.getPCMBlob();s.downloadPCM(g,p)},f.prototype.getWAV=function(){var p=this.getPCM();return l.encodeWAV(p,this.inputSampleRate,this.outputSampleRate,this.config.numChannels,this.oututSampleBits,this.littleEdian)},f.prototype.getWAVBlob=function(){return new Blob([this.getWAV()],{type:"audio/wav"})},f.prototype.downloadWAV=function(p){p===void 0&&(p="recorder");var g=this.getWAVBlob();s.downloadWAV(g,p)},f.prototype.download=function(p,g,m){s.download(p,g,m)},f.prototype.getChannelData=function(){var p=this.getPCM(),g=p.byteLength,m=this.littleEdian,v={left:null,right:null};if(this.config.numChannels===2){var T=new DataView(new ArrayBuffer(g/2)),y=new DataView(new ArrayBuffer(g/2));if(this.config.sampleBits===16)for(var _=0;_<g/2;_+=2)T.setInt16(_,p.getInt16(2*_,m),m),y.setInt16(_,p.getInt16(2*_+2,m),m);else for(_=0;_<g/2;_+=2)T.setInt8(_,p.getInt8(2*_)),y.setInt8(_,p.getInt8(2*_+1));v.left=T,v.right=y}else v.left=p;return v},f}(i(5).default);n.default=d},function(r,n,i){function a(o,s,l){var u=document.createElement("a");u.href=window.URL.createObjectURL(o),u.download=s+"."+l,u.click()}Object.defineProperty(n,"__esModule",{value:!0}),n.downloadWAV=function(o,s){s===void 0&&(s="recorder"),a(o,s,"wav")},n.downloadPCM=function(o,s){s===void 0&&(s="recorder"),a(o,s,"pcm")},n.download=function(o,s,l){return a(o,s,l)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),o=null,s=0,l=0,u=null,d=null,h=null,f=!1,p=0,g=function(){};function m(){return f=!1,u.decodeAudioData(h.slice(0),function(y){(o=u.createBufferSource()).onended=function(){f||(p=u.currentTime-l+s,g())},o.buffer=y,o.connect(d),d.connect(u.destination),o.start(0,s),l=u.currentTime},function(y){a.throwError(y)})}function v(){o&&(o.stop(),o=null)}var T=function(){function y(){}return y.play=function(_){return u||(u=new(window.AudioContext||window.webkitAudioContext),(d=u.createAnalyser()).fftSize=2048),this.stopPlay(),h=_,p=0,m()},y.pausePlay=function(){v(),s+=u.currentTime-l,f=!0},y.resumePlay=function(){return m()},y.stopPlay=function(){s=0,h=null,v()},y.destroyPlay=function(){this.stopPlay()},y.getAnalyseData=function(){var _=new Uint8Array(d.frequencyBinCount);return d.getByteTimeDomainData(_),_},y.addPlayEnd=function(_){_===void 0&&(_=function(){}),g=_},y.getPlayTime=function(){var _=f?s:u.currentTime-l+s;return p||_},y}();n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.throwError=function(a){throw new Error(a)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=function(){function s(l){l===void 0&&(l={}),this.size=0,this.lBuffer=[],this.rBuffer=[],this.tempPCM=[],this.inputSampleBits=16,this.fileSize=0,this.duration=0,this.needRecord=!0;var u,d=new(window.AudioContext||window.webkitAudioContext);this.inputSampleRate=d.sampleRate,this.setNewOption(l),this.littleEdian=(u=new ArrayBuffer(2),new DataView(u).setInt16(0,256,!0),new Int16Array(u)[0]===256),s.initUserMedia()}return s.prototype.setNewOption=function(l){l===void 0&&(l={}),this.config={sampleBits:~[8,16].indexOf(l.sampleBits)?l.sampleBits:16,sampleRate:~[8e3,11025,16e3,22050,24e3,44100,48e3].indexOf(l.sampleRate)?l.sampleRate:this.inputSampleRate,numChannels:~[1,2].indexOf(l.numChannels)?l.numChannels:1},this.outputSampleRate=this.config.sampleRate,this.oututSampleBits=this.config.sampleBits},s.prototype.startRecord=function(){var l=this;return this.context&&this.destroyRecord(),this.initRecorder(),navigator.mediaDevices.getUserMedia({audio:!0}).then(function(u){l.audioInput=l.context.createMediaStreamSource(u),l.stream=u}).then(function(){l.audioInput.connect(l.analyser),l.analyser.connect(l.recorder),l.recorder.connect(l.context.destination)})},s.prototype.pauseRecord=function(){this.needRecord=!1},s.prototype.resumeRecord=function(){this.needRecord=!0},s.prototype.stopRecord=function(){this.audioInput&&this.audioInput.disconnect(),this.source&&this.source.stop(),this.recorder.disconnect(),this.analyser.disconnect(),this.needRecord=!0},s.prototype.destroyRecord=function(){return this.clearRecordStatus(),this.stopStream(),this.closeAudioContext()},s.prototype.getAnalyseData=function(){var l=new Uint8Array(this.analyser.frequencyBinCount);return this.analyser.getByteTimeDomainData(l),l},s.prototype.getData=function(){return this.flat()},s.prototype.clearRecordStatus=function(){this.lBuffer.length=0,this.rBuffer.length=0,this.size=0,this.fileSize=0,this.PCM=null,this.audioInput=null,this.duration=0},s.prototype.flat=function(){var l=null,u=new Float32Array(0);this.config.numChannels===1?l=new Float32Array(this.size):(l=new Float32Array(this.size/2),u=new Float32Array(this.size/2));for(var d=0,h=0;h<this.lBuffer.length;h++)l.set(this.lBuffer[h],d),d+=this.lBuffer[h].length;for(d=0,h=0;h<this.rBuffer.length;h++)u.set(this.rBuffer[h],d),d+=this.rBuffer[h].length;return{left:l,right:u}},s.prototype.initRecorder=function(){var l=this;this.clearRecordStatus(),this.context=new(window.AudioContext||window.webkitAudioContext),this.analyser=this.context.createAnalyser(),this.analyser.fftSize=2048;var u=this.context.createScriptProcessor||this.context.createJavaScriptNode;this.recorder=u.apply(this.context,[4096,this.config.numChannels,this.config.numChannels]),this.recorder.onaudioprocess=function(d){if(l.needRecord){var h,f=d.inputBuffer.getChannelData(0),p=null;l.lBuffer.push(new Float32Array(f)),l.size+=f.length,l.config.numChannels===2&&(p=d.inputBuffer.getChannelData(1),l.rBuffer.push(new Float32Array(p)),l.size+=p.length),l.fileSize=Math.floor(l.size/Math.max(l.inputSampleRate/l.outputSampleRate,1))*(l.oututSampleBits/8),h=100*Math.max.apply(Math,f),l.duration+=4096/l.inputSampleRate,l.onprocess&&l.onprocess(l.duration),l.onprogress&&l.onprogress({duration:l.duration,fileSize:l.fileSize,vol:h})}}},s.prototype.stopStream=function(){this.stream&&this.stream.getTracks&&(this.stream.getTracks().forEach(function(l){return l.stop()}),this.stream=null)},s.prototype.closeAudioContext=function(){return this.context&&this.context.close&&this.context.state!=="closed"?this.context.close():new Promise(function(l){l()})},s.initUserMedia=function(){navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(l){var u=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return u?new Promise(function(d,h){u.call(navigator,l,d,h)}):Promise.reject(new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 getUserMedia !"))})},s.prototype.transformIntoPCM=function(l,u){var d=new Float32Array(l),h=new Float32Array(u),f=a.compress({left:d,right:h},this.inputSampleRate,this.outputSampleRate);return a.encodePCM(f,this.oututSampleBits,this.littleEdian)},s.getPermission=function(){return this.initUserMedia(),navigator.mediaDevices.getUserMedia({audio:!0}).then(function(l){l&&l.getTracks().forEach(function(u){return u.stop()})})},s}();n.default=o}]).default})}(mF)),mF.exports}var Xue,ztt;function Wxr(){return ztt||(ztt=1,Xue=qxr()),Xue}var Yxr=Wxr();const jxr=$h(Yxr);function Xxr(t,e,r){let n=e/r,i=Math.max(n,1),a=t.left,o=t.right,s=Math.floor((a.length+o.length)/n),l=new Float32Array(s),u=0,d=0;for(;u<s;){let h=Math.floor(d);l[u]=a[h],u++,o.length&&(l[u]=o[h],u++),d+=i}return l}function Kxr(t,e,r=!0){let n=0,i=t.length*(e/8),a=new ArrayBuffer(i),o=new DataView(a);if(e===8)for(let s=0;s<t.length;s++,n++){let l=Math.max(-1,Math.min(1,t[s])),u=l<0?l*128:l*127;u=+u+128,o.setInt8(n,u)}else for(let s=0;s<t.length;s++,n+=2){let l=Math.max(-1,Math.min(1,t[s]));o.setInt16(n,l<0?l*32768:l*32767,r)}return o}class Gtt extends jxr{constructor(e={}){super(e)}getPCM(){let e=this.getData();return e=Xxr(e,this.inputSampleRate,this.outputSampleRate),Kxr(e,this.oututSampleBits,this.littleEdian)}getPCMBlob(){return new Blob([this.getPCM()],{type:"audio/pcm"})}}const Zxr=oa({__name:"VoiceWave",props:{size:{type:Number,default:16},total:{type:Number,default:41}},setup(t){return(e,r)=>(I.openBlock(),I.createElementBlock("div",{class:"voice-wave",style:I.normalizeStyle({"font-size":`${t.size}px`})},[(I.openBlock(!0),I.createElementBlock(I.Fragment,null,I.renderList(t.total,n=>(I.openBlock(),I.createElementBlock("span",{key:n}))),128))],4))}},[["__scopeId","data-v-58535a55"]]),Jxr={__name:"AudioButton",props:I.mergeDefaults({audioConfig:Object,audioLoading:Boolean},{audioConfig:()=>({}),audioLoading:!1}),emits:["onAudioLoaded","onAudioStart"],setup(t,{emit:e}){const r={maxTime:6e4,timeSlice:0,needPCM:!1,sampleBits:16,sampleRate:16e3,numChannels:1},n=e,i=I.ref(!1);let a=null;const o=new AbortController,s=o.signal,l=I.computed(()=>({...r,...t.audioConfig})),u=async()=>{var v;if(!((v=navigator==null?void 0:navigator.mediaDevices)!=null&&v.getUserMedia)){ma.warning("\u62B1\u6B49\uFF0C\u60A8\u7684\u8BBE\u5907\u4E0D\u652F\u6301\u5F55\u97F3\u529F\u80FD");return}try{await Gtt.getPermission()}catch(T){ma.warning("\u62B1\u6B49\uFF0C\u8BF7\u6C42\u9EA6\u514B\u98CE\u6743\u9650\u5931\u8D25\uFF0C\u65E0\u6CD5\u4F7F\u7528\u5F55\u97F3\u529F\u80FD"),console.error("\u9EA6\u514B\u98CE\u6743\u9650\u8BF7\u6C42\u5931\u8D25:",T);return}const{sampleBits:p,sampleRate:g,numChannels:m}=l.value;a=new Gtt({sampleBits:p,sampleRate:g,numChannels:m}),a.onprogress=Mxt(T=>{if(Math.floor(T.duration)*1e3>=l.value.maxTime)return d(),!1;l.value.timeSlice!==0&&h(!1)},l.value.timeSlice,{signal:s}),a.start(),i.value=!0,n("onAudioStart")},d=()=>{a&&(a.stop(),h(!0),f())},h=p=>{a&&(l.value.needPCM?n("onAudioLoaded",{blob:a.getPCMBlob(),stop:p}):n("onAudioLoaded",{blob:a.getWAVBlob(),stop:p}))},f=()=>{a&&(a.destroy(),a=null),o.abort(),i.value=!1};return(p,g)=>{const m=Jc,v=k6;return I.openBlock(),I.createBlock(v,null,{title:I.withCtx(()=>[I.createTextVNode(I.toDisplayString(i.value?"\u70B9\u51FB\u505C\u6B62":"\u8BED\u97F3\u5F55\u5165"),1)]),default:I.withCtx(()=>[i.value?(I.openBlock(),I.createBlock(m,{key:1,type:"text",onClick:d},{default:I.withCtx(()=>[I.createVNode(Zxr,{total:5,size:18})]),_:1})):(I.openBlock(),I.createBlock(m,{key:0,loading:t.audioLoading,type:"text",onClick:u},{icon:I.withCtx(()=>[I.createVNode(I.unref(Yq))]),_:1},8,["loading"]))]),_:1})}}},eEr=({command:t,value:e=""})=>{const n=e.split(`
|
|
1063
|
+
`).reduce((i,a)=>{if(a.trim(),a.length===0)return i;const s=(a.split(/(\{{.*?\}})/)||[]).reduce((l,u)=>{if(!u)return l;if(u.startsWith("{{")&&u.endsWith("}}")){const d=u.slice(2,-2);d&&l.push({type:"inputNode",attrs:{value:d},content:[{type:"text",text:"\uFEFF"},{type:"text",text:d}]})}else l.push({type:"text",text:u});return l},[]);return i.push({type:"paragraph",content:s}),i},[]);if(t){const i={type:"commandNode",attrs:{value:t},content:[{type:"text",text:t}]};n.length>0?n[0].content.unshift(i):n.push({type:"paragraph",content:[i]})}return{type:"doc",content:n}},tEr={class:"sender"},rEr={key:0,class:"sender-header"},nEr={class:"sender-content"},iEr={class:"sender-footer"},aEr={class:"sender-footer_left"},oEr={key:0},sEr={class:"sender-footer_right"},lEr={key:0,class:"sender-footer_count"},uEr={key:1},TF=1.7,qtt=oa(Object.assign({name:"AiSender"},{__name:"Sender",props:I.mergeDefaults({placeholder:String,maxLength:Number,loading:Boolean,rows:Number,autoSize:[Boolean,Object],showAudio:Boolean,clearable:Boolean,audioLoading:Boolean,audioConfig:Object},{placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u95EE\u9898\uFF0Center\u53D1\u9001\uFF0Cshift+enter\u6362\u884C",maxLength:0,loading:!1,rows:2,autoSize:!1,showAudio:!1,clearable:!0,audioLoading:!1,audioConfig:()=>({})}),emits:["onSend","onStop","onClear","onChange","onAudioLoaded","onAudioStart"],setup(t,{expose:e,emit:r}){I.useCssVars(T=>({"66c3aa38":s.value.minHeight,"38b893ca":s.value.maxHeight}));const n=r,i=I.ref(""),a=I.ref(""),o=I.computed(()=>{if(!l.value)return 0;let T=0;return l.value.state.doc.descendants(y=>{y.type.name==="text"&&y.text&&(T+=y.text.length)}),T-a.value.length}),s=I.computed(()=>t.autoSize?typeof t.autoSize=="boolean"?{minHeight:"auto",maxHeight:"auto"}:{minHeight:`${t.autoSize.minRows*TF+1}em`,maxHeight:`${t.autoSize.maxRows*TF+1}em`}:{minHeight:`${t.rows*TF+1}em`,maxHeight:`${t.rows*TF+1}em`}),l=lxr({extensions:[Dxr,Ixr,Pxr,Oxr.configure({placeholder:t.placeholder}),Mxr,Axr.configure({limit:t.maxLength?t.maxLength:null}),Hxr,Vxr,$xr.configure({onKeySend:()=>{d()}})],onUpdate:()=>{const T=l.value.getText();l.value.isEmpty&&(a.value=""),i.value=T.slice(a.value.length),n("onChange",i.value)}}),u=T=>{var _,Q;a.value=T.command||"";const y=eEr(T);(_=l.value)==null||_.commands.clearContent(),(Q=l.value)==null||Q.chain().setContent(y).run()},d=()=>{t.loading?ma.warning("\u56DE\u7B54\u8F93\u51FA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u64CD\u4F5C\u6216\u70B9\u51FB\u505C\u6B62\u56DE\u7B54"):i.value.trim()&&(n("onSend",i.value.trim()),h())},h=()=>{var T;a.value="",(T=l.value)==null||T.commands.clearContent()},f=()=>{d()},p=()=>{n("onStop")},g=()=>{n("onClear"),h()},m=T=>{n("onAudioLoaded",T)},v=()=>{n("onAudioStart")};return e({insert:u,reset:h}),(T,y)=>{const _=Jc,Q=k6;return I.openBlock(),I.createElementBlock("div",tEr,[T.$slots.header?(I.openBlock(),I.createElementBlock("div",rEr,[I.renderSlot(T.$slots,"header",{},void 0,!0)])):I.createCommentVNode("",!0),I.createElementVNode("div",nEr,[I.createVNode(I.unref(sxr),{editor:I.unref(l)},null,8,["editor"])]),I.createElementVNode("div",iEr,[I.createElementVNode("div",aEr,[T.$slots.extra?(I.openBlock(),I.createElementBlock("div",oEr,[I.renderSlot(T.$slots,"extra",{},void 0,!0)])):I.createCommentVNode("",!0)]),I.createElementVNode("div",sEr,[t.maxLength?(I.openBlock(),I.createElementBlock("span",lEr,I.toDisplayString(o.value)+"/"+I.toDisplayString(t.maxLength),1)):I.createCommentVNode("",!0),T.$slots.operate?(I.openBlock(),I.createElementBlock("div",uEr,[I.renderSlot(T.$slots,"operate",{},void 0,!0)])):I.createCommentVNode("",!0),t.showAudio?(I.openBlock(),I.createBlock(Jxr,{key:2,audioLoading:t.audioLoading,audioConfig:t.audioConfig,onOnAudioStart:v,onOnAudioLoaded:m},null,8,["audioLoading","audioConfig"])):I.createCommentVNode("",!0),I.createVNode(Q,null,{title:I.withCtx(()=>y[0]||(y[0]=[I.createTextVNode("\u6E05\u9664")])),default:I.withCtx(()=>[t.clearable?(I.openBlock(),I.createBlock(_,{key:0,onClick:g,type:"text"},{icon:I.withCtx(()=>[I.createVNode(I.unref(jq))]),_:1})):I.createCommentVNode("",!0)]),_:1}),t.loading?(I.openBlock(),I.createBlock(_,{key:4,type:"primary",shape:"circle",onClick:p},{icon:I.withCtx(()=>[I.createVNode(gF,{name:"ai-icon-tingzhi",class:"btn-icon"})]),_:1})):(I.openBlock(),I.createBlock(_,{key:3,type:"primary",shape:"circle",disabled:!i.value.trim(),onClick:f},{icon:I.withCtx(()=>[I.createVNode(gF,{name:"ai-icon-fasong",class:"btn-icon",style:{"margin-right":"2px"}})]),_:1},8,["disabled"]))])])])}}}),[["__scopeId","data-v-86d5a7f2"]]),cEr=(t,e={bottom:50,top:50,left:0,right:0})=>{const r=()=>{n.bottom&&u({behavior:"instant"})},{arrivedState:n,measure:i}=Mnr(t,{offset:e}),{stop:a}=Onr(t,r,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),{stop:o}=mPe(t,r),s=I.computed(()=>A9(t));let l=null;const u=({behavior:d="smooth"}={})=>{s.value&&(l=setTimeout(()=>{try{s.value.scrollTo({top:s.value.scrollHeight,behavior:d})}catch{s.value.scrollTop=s.value.scrollHeight}},0))};return I.onMounted(()=>{I.nextTick(()=>{u({behavior:"instant"})})}),I.onUnmounted(()=>{a(),o(),clearTimeout(l)}),{scrollToBottom:u,arrivedState:n,measure:i}};window._iconfont_svg_string_4730060='<svg><symbol id="ai-icon-clear" viewBox="0 0 1024 1024"><path d="M975.36 455.85c0.512-53.247-42.496-96.767-95.744-97.28h-227.84V166.06c0.512-65.536-52.736-119.296-118.272-119.808H501.76c-65.536 0.512-118.784 54.272-118.272 119.808V358.57H151.04c-53.76 0.512-96.256 44.544-95.744 98.304 0.512 41.984 28.16 78.848 68.096 91.648v339.456c-0.512 43.008 34.304 77.824 77.312 78.336h635.392c43.008-0.512 77.312-35.328 77.312-78.336V546.475c37.376-14.336 61.952-50.688 61.952-90.624zM442.88 166.06c0-32.768 26.112-59.392 58.88-59.392h31.744c32.768 0.512 58.88 27.136 58.88 59.392V358.57H442.88V166.059z m393.216 739.84h-97.792V782.507c0.512-16.384-12.288-30.208-28.672-30.72-16.384-0.512-30.208 12.288-30.72 28.672v125.44h-130.56V782.507c0-16.384-13.312-29.696-29.696-29.696s-29.696 13.312-29.696 29.696v123.392H358.4V782.507c0-16.384-13.312-29.696-29.696-29.696s-29.696 13.312-29.696 29.696v123.392h-98.304c-9.728 0-17.92-8.192-17.92-17.92V553.13h671.232v334.848c0 9.728-8.192 17.92-17.92 17.92z m43.52-413.184H151.04c-20.48 0-36.864-16.896-36.864-37.376s16.384-36.864 36.864-36.864h728.576c20.48 0 36.864 16.896 36.864 37.376s-16.384 36.864-36.864 36.864z" ></path></symbol><symbol id="ai-icon-fasong" viewBox="0 0 1024 1024"><path d="M894.208 160.3584s85.2992-33.2288 78.1824 47.5136c-2.3552 33.28-23.7056 149.6064-40.2944 275.456l-56.832 372.7872s-4.7104 54.6304-47.36 64.1024c-42.5984 9.5232-106.5472-33.2288-118.3744-42.752-9.472-7.1168-177.664-113.9712-236.8512-166.1952-16.5888-14.2336-35.5328-42.752 2.4064-75.9808l248.6272-237.4656c28.416-28.4672 56.832-94.976-61.5424-14.2336l-331.5712 225.5872s-37.888 23.7568-108.9536 2.3552l-153.9072-47.4624s-56.832-35.6352 40.2432-71.2704c236.8512-111.616 528.128-225.5872 786.2272-332.4416z" ></path></symbol><symbol id="ai-icon-tingzhi" viewBox="0 0 1024 1024"><path d="M512 0a512 512 0 1 1 0 1024A512 512 0 0 1 512 0z m0 73.142857a438.857143 438.857143 0 1 0 0 877.714286A438.857143 438.857143 0 0 0 512 73.142857z" ></path><path d="M292.571429 292.571429m73.142857 0l292.571428 0q73.142857 0 73.142857 73.142857l0 292.571428q0 73.142857-73.142857 73.142857l-292.571428 0q-73.142857 0-73.142857-73.142857l0-292.571428q0-73.142857 73.142857-73.142857Z" ></path></symbol><symbol id="ai-icon-more" viewBox="0 0 1024 1024"><path d="M576 832a64 64 0 1 1-128 0 64 64 0 0 1 128 0zM512 256a64 64 0 1 0 0-128 64 64 0 0 0 0 128z m0 320a64 64 0 1 0 0-128 64 64 0 0 0 0 128z" fill="#515151" fill-opacity=".9" ></path></symbol><symbol id="ai-icon-top" viewBox="0 0 1024 1024"><path d="M842.42 131.29H180.55c-18.2 0-33.1-14.89-33.1-33.09 0-18.2 14.89-33.1 33.1-33.1h661.88c18.2 0 33.09 14.89 33.09 33.1-0.01 18.2-14.9 33.09-33.1 33.09zM511.49 958.64c-18.2 0-33.1-14.89-33.1-33.09V263.67c0-18.2 14.89-33.1 33.1-33.1 18.2 0 33.09 14.89 33.09 33.1v661.88c0 18.19-14.9 33.09-33.09 33.09z m330.93-364.03c-8.28 0-16.55-3.31-23.17-9.93L511.49 276.9 203.71 584.68c-13.24 13.23-33.09 13.23-46.33 0-13.24-13.24-13.24-33.1 0-46.34L488.32 207.4c13.24-13.23 33.1-13.23 46.33 0l330.94 330.94c13.24 13.24 13.24 33.1 0 46.34-6.62 6.61-14.9 9.93-23.17 9.93z" fill="#515151" ></path></symbol><symbol id="ai-icon-edit" viewBox="0 0 1024 1024"><path d="M82.26816 720.45909333a109.22666667 109.22666667 0 0 1 18.73237334-71.76192l365.90933333-533.13536a109.22666667 109.22666667 0 0 1 151.82506667-28.28970666l144.12458666 98.85013333a109.22666667 109.22666667 0 0 1 28.23509334 151.93429333l-365.90933334 533.13536a109.22666667 109.22666667 0 0 1-60.23850666 43.25376l-131.61813334 37.41013334a109.22666667 109.22666667 0 0 1-138.60864-95.13642667l-12.45184-136.26026667z m643.50890667-480.26965333l-144.12458667-98.85013333a43.69066667 43.69066667 0 0 0-60.73002666 11.30496L433.70496 279.67488l216.15957334 148.32981333 87.21749333-127.03061333a43.69066667 43.69066667 0 0 0-11.30496-60.78464z m-113.0496 241.88245333L396.67712 333.74208l-241.60938666 352.03754667a43.69066667 43.69066667 0 0 0-7.48202667 28.72661333l12.45184 136.26026667a43.69066667 43.69066667 0 0 0 55.43253333 38.01088l131.61813334-37.35552a43.69066667 43.69066667 0 0 0 24.13909333-17.31242667l241.60938667-352.03754667zM534.41194667 877.41781333a32.768 32.768 0 1 0 0 65.536h393.216a32.768 32.768 0 1 0 0-65.536h-393.216z" fill="#515151" ></path></symbol><symbol id="ai-icon-search" viewBox="0 0 1024 1024"><path d="M475.59111111 75.09333333a400.49777778 400.49777778 0 0 1 307.80074667 656.81635556l157.2864 157.2864c12.23338667 11.94211555 10.55857778 33.35054222-3.64088889 47.91409778-14.56355555 14.19946667-35.97198222 15.80145778-47.84128 3.56807111l-157.2864-157.2864A400.49777778 400.49777778 0 1 1 475.59111111 75.09333333z m0 72.0896c-207.89475555 0-327.82563555 167.48088889-327.82563556 328.40817778s119.56679111 329.13635555 327.68 329.13635556c208.04039111 0 327.68-168.20906667 327.68-329.13635556 0-160.92728889-119.63960889-328.40817778-327.53436444-328.40817778z" fill="#515151" ></path></symbol><symbol id="ai-icon-shuaxin" viewBox="0 0 1024 1024"><path d="M512 894.08c-210.72 0-382.08-171.36-382.08-382.08 0-8.16 0.48-16.32 0.96-24.48l67.2 4.32c-0.48 6.72-0.48 13.44-0.48 20.16 0 173.76 141.12 314.88 314.88 314.88 81.12 0 157.92-30.72 216.48-86.4l46.08 48.96C703.52 857.12 610.4 894.08 512 894.08zM894.08 512h-67.2c0-11.04-0.48-22.08-1.92-33.12-16.8-160.8-151.2-281.76-313.44-281.76-63.36 0-123.84 18.72-176.16 53.76L298.4 195.2c62.88-42.72 136.8-65.28 213.6-65.28 196.32 0 360 146.88 380.16 342.24 1.44 12.96 1.92 26.4 1.92 39.84z" fill="#515151" ></path><path d="M163.52 304.64L58.4 492.8c-2.88 4.8 0.96 11.04 6.24 11.04H274.4c5.76 0 9.12-5.76 6.24-11.04L176 304.64c-2.88-5.28-10.08-5.28-12.48 0zM848 665.6L742.88 477.44c-2.88-4.8 0.96-11.04 6.24-11.04h209.76c5.76 0 9.12 5.76 6.24 11.04L860.48 665.6c-2.4 4.8-9.6 4.8-12.48 0zM285.44 221.6a33.6 33.6 0 1 0 67.2 0 33.6 33.6 0 1 0-67.2 0zM715.04 767.84a33.6 33.6 0 1 0 67.2 0 33.6 33.6 0 1 0-67.2 0z" fill="#515151" ></path></symbol><symbol id="ai-icon-shoucang" viewBox="0 0 1024 1024"><path d="M323.20853333 943.60462187c-38.30897813 23.80231147-88.40533333 11.4915552-111.67288853-27.2611552a82.48888853 82.48888853 0 0 1-9.55733333-61.2579552l49.5843552-211.456a14.01742187 14.01742187 0 0 0-4.28942187-13.7216l-162.304-141.42577814c-33.7123552-29.35466667-37.6035552-80.6912-8.7836448-114.9155552a80.72533333 80.72533333 0 0 1 55.18222187-28.53546666L344.3712 327.68c4.64213333-0.3868448 8.79502187-3.44746667 10.69511147-8.10097813l82.0679104-200.71537707c17.1008-41.81333333 64.65991147-61.78133333 106.15466666-44.22542293a81.39662187 81.39662187 0 0 1 43.55413334 44.22542293l82.06791146 200.704c1.90008853 4.66488853 6.05297813 7.73688853 10.69511147 8.1123552l213.02613333 17.36248853c44.6691552 3.64088853 77.7443552 43.15591147 74.20586667 88.0184896a82.06791147 82.06791147 0 0 1-27.81866667 55.4439104l-162.304 141.42577814c-3.77742187 3.28817813-5.48408853 8.61297813-4.28942293 13.71022186l49.58435627 211.456c10.2627552 43.7475552-16.384 87.82506667-59.8812448 98.37226667a80.3043552 80.3043552 0 0 1-61.3603552-9.8531552l-182.3744-113.32266667a12.04906667 12.04906667 0 0 0-12.81137814 0l-182.38577813 113.32266667zM554.43911147 772.3008l182.3744 113.32266667c2.79893333 1.72942187 6.09848853 2.26417813 9.22737706 1.50186666 6.8380448-1.6611552 11.264-8.9884448 9.5232-16.45226666l-49.5843552-211.456a82.28408853 82.28408853 0 0 1 25.89582187-80.78222187L894.1795552 437.0204448c2.65102187-2.30968853 4.3235552-5.66613333 4.61937813-9.32977813 0.60302187-7.61173333-4.7900448-14.0515552-11.70773333-14.60906667l-213.02613333-17.37386667a81.05528853 81.05528853 0 0 1-68.33493334-50.31253333l-82.06791146-200.704a13.1299552 13.1299552 0 0 0-6.97457707-7.1907552c-6.29191147-2.6624-13.57368853 0.39822187-16.34986667 7.1907552l-82.0792896 200.704a81.05528853 81.05528853 0 0 1-68.33493333 50.31253333l-213.0147552 17.37386667a12.45866667 12.45866667 0 0 0-8.51057813 4.46008853 14.1084448 14.1084448 0 0 0 1.42222293 19.47875627l162.304 141.42577707a82.28408853 82.28408853 0 0 1 25.89582187 80.78222293l-49.5843552 211.44462187a14.22222187 14.22222187 0 0 0 1.61564373 10.53582186c3.72053333 6.17813333 11.2867552 8.03271147 17.13493333 4.4032l182.38577814-113.31128853a80.31573333 80.31573333 0 0 1 84.8668448 0z" fill="#515151" ></path></symbol><symbol id="ai-icon-delete" viewBox="0 0 1024 1024"><path d="M832 224v704H192v-704h640z m-64 64H256v576h512v-576z" fill="#515151" ></path><path d="M64 224h896v64H64zM320 96h384v64H320zM384 416h64v320H384zM576 416h64v320H576z" fill="#515151" ></path></symbol><symbol id="ai-icon-copy" viewBox="0 0 1024 1024"><path d="M667.25 250.25h-471.75c-57.75 0-105 47.25-105 105v471.75c0 57.75 47.25 105 105 105h471.75c57.75 0 105-47.25 105-105V355.25c-0.75-58.5-47.25-105-105-105z m52.5 576c0 29.25-23.25 52.5-52.5 52.5h-471.75c-29.25 0-52.5-23.25-52.5-52.5v-471.75c0-29.25 23.25-52.5 52.5-52.5h471.75c29.25 0 52.5 23.25 52.5 52.5v471.75z" fill="#515151" ></path><path d="M248 437h366.75v52.5h-366.75zM248 564.5h366.75v52.5h-366.75zM248 691.25h209.25v52.5h-209.25z" fill="#515151" ></path><path d="M824 92.75h-471.75c-57.75 0-105 47.25-105 105h52.5c0-29.25 23.25-52.5 52.5-52.5h471.75c29.25 0 52.5 23.25 52.5 52.5v471.75c0 29.25-23.25 52.5-52.5 52.5v52.5c57.75 0 105-47.25 105-105V197.75c0-58.5-47.25-105-105-105z" fill="#515151" ></path></symbol></svg>',(t=>{var e=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,a,o,s,l=function(h,f){f.parentNode.insertBefore(h,f)};if(e&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(h){console&&console.log(h)}}n=function(){var h,f=document.createElement("div");f.innerHTML=t._iconfont_svg_string_4730060,(f=f.getElementsByTagName("svg")[0])&&(f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.width=0,f.style.height=0,f.style.overflow="hidden",f=f,(h=document.body).firstChild?l(f,h.firstChild):h.appendChild(f))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=n,o=t.document,s=!1,d(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,u())})}function u(){s||(s=!0,a())}function d(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(d,50)}u()}})(window);const dEr=[ufe,rme,nme,ime,mZe,QZe,CH,xZe,qtt,Rte,gF],Wtt=(t,e={})=>{dEr.forEach(r=>{t.component(r.name,r)})};typeof window<"u"&&window.Vue&&Wtt(window.Vue);const hEr={install:Wtt};var fEr="\0",k8="\0",Ytt="";class Oc{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=hv(void 0),this._defaultEdgeLabelFn=hv(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[k8]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return p2(e)||(e=hv(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return is(this._nodes)}sources(){var e=this;return io(this.nodes(),function(r){return xi(e._in[r])})}sinks(){var e=this;return io(this.nodes(),function(r){return xi(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return lt(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=k8,this._children[e]={},this._children[k8][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],lt(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),lt(is(this._in[e]),r),delete this._in[e],delete this._preds[e],lt(is(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ni(r))r=k8;else{r+="";for(var n=r;!Ni(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==k8)return r}}children(e){if(Ni(e)&&(e=k8),this._isCompound){var r=this._children[e];if(r)return is(r)}else{if(e===k8)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return is(r)}successors(e){var r=this._sucs[e];if(r)return is(r)}neighbors(e){var r=this.predecessors(e);if(r)return jvt(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;lt(this._nodes,function(o,s){e(s)&&r.setNode(s,o)}),lt(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var s=n.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&<(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return p2(e)||(e=hv(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ji(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Vo(e,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var e,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,Ni(n)||(n=""+n);var s=eA(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!Ni(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(e,r,n);var l=pEr(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[s]=l,jtt(this._preds[r],e),jtt(this._sucs[e],r),this._in[r][s]=l,this._out[e][s]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?Kue(this._isDirected,arguments[0]):eA(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?Kue(this._isDirected,arguments[0]):eA(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?Kue(this._isDirected,arguments[0]):eA(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Xtt(this._preds[r],e),Xtt(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=Ji(n);return r?io(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=Ji(n);return r?io(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}}Oc.prototype._nodeCount=0,Oc.prototype._edgeCount=0;function jtt(t,e){t[e]?t[e]++:t[e]=1}function Xtt(t,e){--t[e]||delete t[e]}function eA(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}return i+Ytt+a+Ytt+(Ni(n)?fEr:n)}function pEr(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return n&&(s.name=n),s}function Kue(t,e){return eA(t,e.v,e.w,e.name)}class gEr{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return Ktt(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&Ktt(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,mEr)),n=n._prev;return"["+e.join(", ")+"]"}}function Ktt(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function mEr(t,e){if(t!=="_next"&&t!=="_prev")return e}var TEr=hv(1);function vEr(t,e){if(t.nodeCount()<=1)return[];var r=_Er(t,e||TEr),n=yEr(r.graph,r.buckets,r.zeroIdx);return ks(or(n,function(i){return t.outEdges(i.v,i.w)}))}function yEr(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],o;t.nodeCount();){for(;o=a.dequeue();)Zue(t,e,r,o);for(;o=i.dequeue();)Zue(t,e,r,o);if(t.nodeCount()){for(var s=e.length-2;s>0;--s)if(o=e[s].dequeue(),o){n=n.concat(Zue(t,e,r,o,!0));break}}}return n}function Zue(t,e,r,n,i){var a=i?[]:void 0;return lt(t.inEdges(n.v),function(o){var s=t.edge(o),l=t.node(o.v);i&&a.push({v:o.v,w:o.w}),l.out-=s,Jue(e,r,l)}),lt(t.outEdges(n.v),function(o){var s=t.edge(o),l=o.w,u=t.node(l);u.in-=s,Jue(e,r,u)}),t.removeNode(n.v),a}function _Er(t,e){var r=new Oc,n=0,i=0;lt(t.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),lt(t.edges(),function(s){var l=r.edge(s.v,s.w)||0,u=e(s),d=l+u;r.setEdge(s.v,s.w,d),i=Math.max(i,r.node(s.v).out+=u),n=Math.max(n,r.node(s.w).in+=u)});var a=mv(i+n+3).map(function(){return new gEr}),o=n+1;return lt(r.nodes(),function(s){Jue(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function Jue(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function bEr(t){var e=t.graph().acyclicer==="greedy"?vEr(t,r(t)):QEr(t);lt(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,lq("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function QEr(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,lt(t.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return lt(t.nodes(),i),e}function xEr(t){lt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}function d_(t,e,r,n){var i;do i=lq(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function EEr(t){var e=new Oc().setGraph(t.graph());return lt(t.nodes(),function(r){e.setNode(r,t.node(r))}),lt(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function Ztt(t){var e=new Oc({multigraph:t.isMultigraph()}).setGraph(t.graph());return lt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),lt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function Jtt(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,s=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),l=s*i/a,u=s):(i<0&&(o=-o),l=o,u=o*a/i),{x:r+l,y:n+u}}function vF(t){var e=or(mv(trt(t)+1),function(){return[]});return lt(t.nodes(),function(r){var n=t.node(r),i=n.rank;Ni(i)||(e[i][n.order]=r)}),e}function SEr(t){var e=gv(or(t.nodes(),function(r){return t.node(r).rank}));lt(t.nodes(),function(r){var n=t.node(r);on(n,"rank")&&(n.rank-=e)})}function CEr(t){var e=gv(or(t.nodes(),function(a){return t.node(a).rank})),r=[];lt(t.nodes(),function(a){var o=t.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=t.graph().nodeRankFactor;lt(r,function(a,o){Ni(a)&&o%i!==0?--n:n&<(a,function(s){t.node(s).rank+=n})})}function ert(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),d_(t,"border",i,e)}function trt(t){return _g(or(t.nodes(),function(e){var r=t.node(e).rank;if(!Ni(r))return r}))}function LEr(t,e){var r={lhs:[],rhs:[]};return lt(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function wEr(t,e){return e()}function AEr(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&<(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)rrt(t,"borderLeft","_bl",r,i,a),rrt(t,"borderRight","_br",r,i,a)}}lt(t.children(),e)}function rrt(t,e,r,n,i,a){var o={width:0,height:0,rank:a,borderType:e},s=i[e][a-1],l=d_(t,"border",o,r);i[e][a]=l,t.setParent(l,n),s&&t.setEdge(s,l,{weight:1})}function OEr(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&nrt(t)}function MEr(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&REr(t),(e==="lr"||e==="rl")&&(DEr(t),nrt(t))}function nrt(t){lt(t.nodes(),function(e){irt(t.node(e))}),lt(t.edges(),function(e){irt(t.edge(e))})}function irt(t){var e=t.width;t.width=t.height,t.height=e}function REr(t){lt(t.nodes(),function(e){ece(t.node(e))}),lt(t.edges(),function(e){var r=t.edge(e);lt(r.points,ece),Object.prototype.hasOwnProperty.call(r,"y")&&ece(r)})}function ece(t){t.y=-t.y}function DEr(t){lt(t.nodes(),function(e){tce(t.node(e))}),lt(t.edges(),function(e){var r=t.edge(e);lt(r.points,tce),Object.prototype.hasOwnProperty.call(r,"x")&&tce(r)})}function tce(t){var e=t.x;t.x=t.y,t.y=e}function NEr(t){t.graph().dummyChains=[],lt(t.edges(),function(e){IEr(t,e)})}function IEr(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,o=e.name,s=t.edge(e),l=s.labelRank;if(a!==n+1){t.removeEdge(e);var u=void 0,d,h;for(h=0,++n;n<a;++h,++n)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:e,rank:n},d=d_(t,"edge",u,"_d"),n===l&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),t.setEdge(r,d,{weight:s.weight},o),h===0&&t.graph().dummyChains.push(d),r=d;t.setEdge(r,i,{weight:s.weight},o)}}function kEr(t){lt(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,i;for(t.setEdge(r.edgeObj,n);r.dummy;)i=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=i,r=t.node(e)})}function rce(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=gv(or(t.outEdges(n),function(o){return r(o.w)-t.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}lt(t.sources(),r)}function tA(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function art(t){var e=new Oc({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;PEr(e,t)<n;)i=BEr(e,t),a=e.hasNode(i.v)?tA(t,i):-tA(t,i),HEr(e,t,a);return e}function PEr(t,e){function r(n){lt(e.nodeEdges(n),function(i){var a=i.v,o=n===a?i.w:a;!t.hasNode(o)&&!tA(e,i)&&(t.setNode(o,{}),t.setEdge(n,o,{}),r(o))})}return lt(t.nodes(),r),t.nodeCount()}function BEr(t,e){return oq(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return tA(e,r)})}function HEr(t,e,r){lt(t.nodes(),function(n){e.node(n).rank+=r})}function FEr(){}FEr.prototype=new Error;function ort(t,e,r){ai(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return lt(e,function(o){if(!t.hasNode(o))throw new Error("Graph does not have node: "+o);srt(t,o,r==="post",a,n,i)}),i}function srt(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),lt(i(e),function(o){srt(t,o,r,n,i,a)}),r&&a.push(e))}function VEr(t,e){return ort(t,e,"post")}function $Er(t,e){return ort(t,e,"pre")}P8.initLowLimValues=ice,P8.initCutValues=nce,P8.calcCutValue=lrt,P8.leaveEdge=crt,P8.enterEdge=drt,P8.exchangeEdges=hrt;function P8(t){t=EEr(t),rce(t);var e=art(t);ice(e),nce(e,t);for(var r,n;r=crt(e);)n=drt(e,t,r),hrt(e,t,r,n)}function nce(t,e){var r=VEr(t,t.nodes());r=r.slice(0,r.length-1),lt(r,function(n){UEr(t,e,n)})}function UEr(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=lrt(t,e,r)}function lrt(t,e,r){var n=t.node(r),i=n.parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,lt(e.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==i){var h=u===a,f=e.edge(l).weight;if(s+=h?f:-f,GEr(t,r,d)){var p=t.edge(r,d).cutvalue;s+=h?-p:p}}}),s}function ice(t,e){arguments.length<2&&(e=t.nodes()[0]),urt(t,{},1,e)}function urt(t,e,r,n,i){var a=r,o=t.node(n);return e[n]=!0,lt(t.neighbors(n),function(s){Object.prototype.hasOwnProperty.call(e,s)||(r=urt(t,e,r,s,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function crt(t){return Ph(t.edges(),function(e){return t.edge(e).cutvalue<0})}function drt(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),o=t.node(i),s=a,l=!1;a.lim>o.lim&&(s=o,l=!0);var u=io(e.edges(),function(d){return l===frt(t,t.node(d.v),s)&&l!==frt(t,t.node(d.w),s)});return oq(u,function(d){return tA(e,d)})}function hrt(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),ice(t),nce(t,e),zEr(t,e)}function zEr(t,e){var r=Ph(t.nodes(),function(i){return!e.node(i).parent}),n=$Er(t,r);n=n.slice(1),lt(n,function(i){var a=t.node(i).parent,o=e.edge(i,a),s=!1;o||(o=e.edge(a,i),s=!0),e.node(i).rank=e.node(a).rank+(s?o.minlen:-o.minlen)})}function GEr(t,e,r){return t.hasEdge(e,r)}function frt(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function qEr(t){switch(t.graph().ranker){case"network-simplex":prt(t);break;case"tight-tree":YEr(t);break;case"longest-path":WEr(t);break;default:prt(t)}}var WEr=rce;function YEr(t){rce(t),art(t)}function prt(t){P8(t)}function jEr(t){var e=d_(t,"root",{},"_root"),r=XEr(t),n=_g(Ji(r))-1,i=2*n+1;t.graph().nestingRoot=e,lt(t.edges(),function(o){t.edge(o).minlen*=i});var a=KEr(t)+1;lt(t.children(),function(o){grt(t,e,i,a,n,r,o)}),t.graph().nodeRankFactor=i}function grt(t,e,r,n,i,a,o){var s=t.children(o);if(!s.length){o!==e&&t.setEdge(e,o,{weight:0,minlen:r});return}var l=ert(t,"_bt"),u=ert(t,"_bb"),d=t.node(o);t.setParent(l,o),d.borderTop=l,t.setParent(u,o),d.borderBottom=u,lt(s,function(h){grt(t,e,r,n,i,a,h);var f=t.node(h),p=f.borderTop?f.borderTop:h,g=f.borderBottom?f.borderBottom:h,m=f.borderTop?n:2*n,v=p!==g?1:i-a[o]+1;t.setEdge(l,p,{weight:m,minlen:v,nestingEdge:!0}),t.setEdge(g,u,{weight:m,minlen:v,nestingEdge:!0})}),t.parent(o)||t.setEdge(e,l,{weight:0,minlen:i+a[o]})}function XEr(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&<(a,function(o){r(o,i+1)}),e[n]=i}return lt(t.children(),function(n){r(n,1)}),e}function KEr(t){return Vo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function ZEr(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,lt(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}function JEr(t,e,r){var n={},i;lt(r,function(a){for(var o=t.parent(a),s,l;o;){if(s=t.parent(o),s?(l=n[s],n[s]=o):(l=i,i=o),l&&l!==o){e.setEdge(l,o);return}o=s}})}function eSr(t,e,r){var n=tSr(t),i=new Oc({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return lt(t.nodes(),function(a){var o=t.node(a),s=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||n),lt(t[r](a),function(l){var u=l.v===a?l.w:l.v,d=i.edge(u,a),h=Ni(d)?0:d.weight;i.setEdge(u,a,{weight:t.edge(l).weight+h})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function tSr(t){for(var e;t.hasNode(e=lq("_root")););return e}function rSr(t,e){for(var r=0,n=1;n<e.length;++n)r+=nSr(t,e[n-1],e[n]);return r}function nSr(t,e,r){for(var n=Jvt(r,or(r,function(u,d){return d})),i=ks(or(e,function(u){return JQ(or(t.outEdges(u),function(d){return{pos:n[d.w],weight:t.edge(d).weight}}),"pos")})),a=1;a<r.length;)a<<=1;var o=2*a-1;a-=1;var s=or(new Array(o),function(){return 0}),l=0;return lt(i.forEach(function(u){var d=u.pos+a;s[d]+=u.weight;for(var h=0;d>0;)d%2&&(h+=s[d+1]),d=d-1>>1,s[d]+=u.weight;l+=u.weight*h})),l}function iSr(t){var e={},r=io(t.nodes(),function(s){return!t.children(s).length}),n=_g(or(r,function(s){return t.node(s).rank})),i=or(mv(n+1),function(){return[]});function a(s){if(!on(e,s)){e[s]=!0;var l=t.node(s);i[l.rank].push(s),lt(t.successors(s),a)}}var o=JQ(r,function(s){return t.node(s).rank});return lt(o,a),i}function aSr(t,e){return or(e,function(r){var n=t.inEdges(r);if(n.length){var i=Vo(n,function(a,o){var s=t.edge(o),l=t.node(o.v);return{sum:a.sum+s.weight*l.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function oSr(t,e){var r={};lt(t,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Ni(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),lt(e.edges(),function(i){var a=r[i.v],o=r[i.w];!Ni(a)&&!Ni(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=io(r,function(i){return!i.indegree});return sSr(n)}function sSr(t){var e=[];function r(a){return function(o){o.merged||(Ni(o.barycenter)||Ni(a.barycenter)||o.barycenter>=a.barycenter)&&lSr(a,o)}}function n(a){return function(o){o.in.push(a),--o.indegree===0&&t.push(o)}}for(;t.length;){var i=t.pop();e.push(i),lt(i.in.reverse(),r(i)),lt(i.out,n(i))}return or(io(e,function(a){return!a.merged}),function(a){return vR(a,["vs","i","barycenter","weight"])})}function lSr(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}function uSr(t,e){var r=LEr(t,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,i=JQ(r.rhs,function(d){return-d.i}),a=[],o=0,s=0,l=0;n.sort(cSr(!!e)),l=mrt(a,i,l),lt(n,function(d){l+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,s+=d.weight,l=mrt(a,i,l)});var u={vs:ks(a)};return s&&(u.barycenter=o/s,u.weight=s),u}function mrt(t,e,r){for(var n;e.length&&(n=a3(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function cSr(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function Trt(t,e,r,n){var i=t.children(e),a=t.node(e),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,l={};o&&(i=io(i,function(g){return g!==o&&g!==s}));var u=aSr(t,i);lt(u,function(g){if(t.children(g.v).length){var m=Trt(t,g.v,r,n);l[g.v]=m,Object.prototype.hasOwnProperty.call(m,"barycenter")&&hSr(g,m)}});var d=oSr(u,r);dSr(d,l);var h=uSr(d,n);if(o&&(h.vs=ks([o,h.vs,s]),t.predecessors(o).length)){var f=t.node(t.predecessors(o)[0]),p=t.node(t.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+f.order+p.order)/(h.weight+2),h.weight+=2}return h}function dSr(t,e){lt(t,function(r){r.vs=ks(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function hSr(t,e){Ni(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}function fSr(t){var e=trt(t),r=vrt(t,mv(1,e+1),"inEdges"),n=vrt(t,mv(e-1,-1,-1),"outEdges"),i=iSr(t);yrt(t,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,l=0;l<4;++s,++l){pSr(s%2?r:n,s%4>=2),i=vF(t);var u=rSr(t,i);u<a&&(l=0,o=BTt(i),a=u)}yrt(t,o)}function vrt(t,e,r){return or(e,function(n){return eSr(t,n,r)})}function pSr(t,e){var r=new Oc;lt(t,function(n){var i=n.graph().root,a=Trt(n,i,r,e);lt(a.vs,function(o,s){n.node(o).order=s}),JEr(n,r,a.vs)})}function yrt(t,e){lt(e,function(r){lt(r,function(n,i){t.node(n).order=i})})}function gSr(t){var e=TSr(t);lt(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=mSr(t,e,i.v,i.w),o=a.path,s=a.lca,l=0,u=o[l],d=!0;r!==i.w;){if(n=t.node(r),d){for(;(u=o[l])!==s&&t.node(u).maxRank<n.rank;)l++;u===s&&(d=!1)}if(!d){for(;l<o.length-1&&t.node(u=o[l+1]).minRank<=n.rank;)l++;u=o[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function mSr(t,e,r,n){var i=[],a=[],o=Math.min(e[r].low,e[n].low),s=Math.max(e[r].lim,e[n].lim),l,u;l=r;do l=t.parent(l),i.push(l);while(l&&(e[l].low>o||s>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function TSr(t){var e={},r=0;function n(i){var a=r;lt(t.children(i),n),e[i]={low:a,lim:r++}}return lt(t.children(),n),e}function vSr(t,e){var r={};function n(i,a){var o=0,s=0,l=i.length,u=a3(a);return lt(a,function(d,h){var f=_Sr(t,d),p=f?t.node(f).order:l;(f||d===u)&&(lt(a.slice(s,h+1),function(g){lt(t.predecessors(g),function(m){var v=t.node(m),T=v.order;(T<o||p<T)&&!(v.dummy&&t.node(g).dummy)&&_rt(r,m,g)})}),s=h+1,o=p)}),a}return Vo(e,n),r}function ySr(t,e){var r={};function n(a,o,s,l,u){var d;lt(mv(o,s),function(h){d=a[h],t.node(d).dummy&<(t.predecessors(d),function(f){var p=t.node(f);p.dummy&&(p.order<l||p.order>u)&&_rt(r,f,d)})})}function i(a,o){var s=-1,l,u=0;return lt(o,function(d,h){if(t.node(d).dummy==="border"){var f=t.predecessors(d);f.length&&(l=t.node(f[0]).order,n(o,u,h,s,l),u=h,s=l)}n(o,u,o.length,l,a.length)}),o}return Vo(e,i),r}function _Sr(t,e){if(t.node(e).dummy)return Ph(t.predecessors(e),function(r){return t.node(r).dummy})}function _rt(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function bSr(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function QSr(t,e,r,n){var i={},a={},o={};return lt(e,function(s){lt(s,function(l,u){i[l]=l,a[l]=l,o[l]=u})}),lt(e,function(s){var l=-1;lt(s,function(u){var d=n(u);if(d.length){d=JQ(d,function(m){return o[m]});for(var h=(d.length-1)/2,f=Math.floor(h),p=Math.ceil(h);f<=p;++f){var g=d[f];a[u]===u&&l<o[g]&&!bSr(r,u,g)&&(a[g]=u,a[u]=i[u]=i[g],l=o[g])}}})}),{root:i,align:a}}function xSr(t,e,r,n,i){var a={},o=ESr(t,e,r,i),s=i?"borderLeft":"borderRight";function l(h,f){for(var p=o.nodes(),g=p.pop(),m={};g;)m[g]?h(g):(m[g]=!0,p.push(g),p=p.concat(f(g))),g=p.pop()}function u(h){a[h]=o.inEdges(h).reduce(function(f,p){return Math.max(f,a[p.v]+o.edge(p))},0)}function d(h){var f=o.outEdges(h).reduce(function(g,m){return Math.min(g,a[m.w]-o.edge(m))},Number.POSITIVE_INFINITY),p=t.node(h);f!==Number.POSITIVE_INFINITY&&p.borderType!==s&&(a[h]=Math.max(a[h],f))}return l(u,o.predecessors.bind(o)),l(d,o.successors.bind(o)),lt(n,function(h){a[h]=a[r[h]]}),a}function ESr(t,e,r,n){var i=new Oc,a=t.graph(),o=ASr(a.nodesep,a.edgesep,n);return lt(e,function(s){var l;lt(s,function(u){var d=r[u];if(i.setNode(d),l){var h=r[l],f=i.edge(h,d);i.setEdge(h,d,Math.max(o(t,u,l),f||0))}l=u})}),i}function SSr(t,e){return oq(Ji(e),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return hvt(r,function(a,o){var s=OSr(t,o)/2;n=Math.max(a+s,n),i=Math.min(a-s,i)}),n-i})}function CSr(t,e){var r=Ji(e),n=gv(r),i=_g(r);lt(["u","d"],function(a){lt(["l","r"],function(o){var s=a+o,l=t[s],u;if(l!==e){var d=Ji(l);u=o==="l"?n-gv(d):i-_g(d),u&&(t[s]=mR(l,function(h){return h+u}))}})})}function LSr(t,e){return mR(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=JQ(or(t,n));return(i[1]+i[2])/2})}function wSr(t){var e=vF(t),r=TR(vSr(t,e),ySr(t,e)),n={},i;lt(["u","d"],function(o){i=o==="u"?e:Ji(e).reverse(),lt(["l","r"],function(s){s==="r"&&(i=or(i,function(h){return Ji(h).reverse()}));var l=(o==="u"?t.predecessors:t.successors).bind(t),u=QSr(t,i,r,l),d=xSr(t,i,u.root,u.align,s==="r");s==="r"&&(d=mR(d,function(h){return-h})),n[o+s]=d})});var a=SSr(t,n);return CSr(n,a),LSr(n,t.graph().align)}function ASr(t,e,r){return function(n,i,a){var o=n.node(i),s=n.node(a),l=0,u;if(l+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=-o.width/2;break;case"r":u=o.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(o.dummy?e:t)/2,l+=(s.dummy?e:t)/2,l+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function OSr(t,e){return t.node(e).width}function MSr(t){t=Ztt(t),RSr(t),fvt(wSr(t),function(e,r){t.node(r).x=e})}function RSr(t){var e=vF(t),r=t.graph().ranksep,n=0;lt(e,function(i){var a=_g(or(i,function(o){return t.node(o).height}));lt(i,function(o){t.node(o).y=n+a/2}),n+=a+r})}function brt(t,e){var r=wEr;r("layout",()=>{var n=r(" buildLayoutGraph",()=>USr(t));r(" runLayout",()=>DSr(n,r)),r(" updateInputGraph",()=>NSr(t,n))})}function DSr(t,e){e(" makeSpaceForEdgeLabels",()=>zSr(t)),e(" removeSelfEdges",()=>JSr(t)),e(" acyclic",()=>bEr(t)),e(" nestingGraph.run",()=>jEr(t)),e(" rank",()=>qEr(Ztt(t))),e(" injectEdgeLabelProxies",()=>GSr(t)),e(" removeEmptyRanks",()=>CEr(t)),e(" nestingGraph.cleanup",()=>ZEr(t)),e(" normalizeRanks",()=>SEr(t)),e(" assignRankMinMax",()=>qSr(t)),e(" removeEdgeLabelProxies",()=>WSr(t)),e(" normalize.run",()=>NEr(t)),e(" parentDummyChains",()=>gSr(t)),e(" addBorderSegments",()=>AEr(t)),e(" order",()=>fSr(t)),e(" insertSelfEdges",()=>eCr(t)),e(" adjustCoordinateSystem",()=>OEr(t)),e(" position",()=>MSr(t)),e(" positionSelfEdges",()=>tCr(t)),e(" removeBorderNodes",()=>ZSr(t)),e(" normalize.undo",()=>kEr(t)),e(" fixupEdgeLabelCoords",()=>XSr(t)),e(" undoCoordinateSystem",()=>MEr(t)),e(" translateGraph",()=>YSr(t)),e(" assignNodeIntersects",()=>jSr(t)),e(" reversePoints",()=>KSr(t)),e(" acyclic.undo",()=>xEr(t))}function NSr(t,e){lt(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),lt(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var ISr=["nodesep","edgesep","ranksep","marginx","marginy"],kSr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},PSr=["acyclicer","ranker","rankdir","align"],BSr=["width","height"],HSr={width:0,height:0},FSr=["minlen","weight","width","height","labeloffset"],VSr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$Sr=["labelpos"];function USr(t){var e=new Oc({multigraph:!0,compound:!0}),r=oce(t.graph());return e.setGraph(TR({},kSr,ace(r,ISr),vR(r,PSr))),lt(t.nodes(),function(n){var i=oce(t.node(n));e.setNode(n,fR(ace(i,BSr),HSr)),e.setParent(n,t.parent(n))}),lt(t.edges(),function(n){var i=oce(t.edge(n));e.setEdge(n,TR({},VSr,ace(i,FSr),vR(i,$Sr)))}),e}function zSr(t){var e=t.graph();e.ranksep/=2,lt(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function GSr(t){lt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};d_(t,"edge-proxy",a,"_ep")}})}function qSr(t){var e=0;lt(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=_g(e,n.maxRank))}),t.graph().maxRank=e}function WSr(t){lt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function YSr(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),o=a.marginx||0,s=a.marginy||0;function l(u){var d=u.x,h=u.y,f=u.width,p=u.height;e=Math.min(e,d-f/2),r=Math.max(r,d+f/2),n=Math.min(n,h-p/2),i=Math.max(i,h+p/2)}lt(t.nodes(),function(u){l(t.node(u))}),lt(t.edges(),function(u){var d=t.edge(u);Object.prototype.hasOwnProperty.call(d,"x")&&l(d)}),e-=o,n-=s,lt(t.nodes(),function(u){var d=t.node(u);d.x-=e,d.y-=n}),lt(t.edges(),function(u){var d=t.edge(u);lt(d.points,function(h){h.x-=e,h.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=e),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),a.width=r-e+o,a.height=i-n+s}function jSr(t){lt(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(Jtt(n,a)),r.points.push(Jtt(i,o))})}function XSr(t){lt(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function KSr(t){lt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function ZSr(t){lt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(a3(r.borderLeft)),o=t.node(a3(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),lt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function JSr(t){lt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function eCr(t){var e=vF(t);lt(e,function(r){var n=0;lt(r,function(i,a){var o=t.node(i);o.order=a+n,lt(o.selfEdges,function(s){d_(t,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++n,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function tCr(t){lt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}function ace(t,e){return mR(vR(t,e),Number)}function oce(t){var e={};return lt(t,function(r,n){e[n.toLowerCase()]=r}),e}function lh(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:rCr(t),edges:nCr(t)};return Ni(t.graph())||(e.value=ss(t.graph())),e}function rCr(t){return or(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return Ni(r)||(i.value=r),Ni(n)||(i.parent=n),i})}function nCr(t){return or(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Ni(e.name)||(n.name=e.name),Ni(r)||(n.value=r),n})}var jn=new Map,B8=new Map,Qrt=new Map,iCr=N(()=>{B8.clear(),Qrt.clear(),jn.clear()},"clear"),yF=N((t,e)=>{const r=B8.get(e)||[];return Te.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),aCr=N((t,e)=>{const r=B8.get(e)||[];return Te.info("Descendants of ",e," is ",r),Te.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||yF(t.v,e)||yF(t.w,e)||r.includes(t.w):(Te.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),xrt=N((t,e,r,n)=>{Te.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),Te.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)xrt(a,e,r,n);else{const o=e.node(a);Te.info("cp ",a," to ",n," with parent ",t),r.setNode(a,o),n!==e.parent(a)&&(Te.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(Te.debug("Setting parent",a,t),r.setParent(a,t)):(Te.info("In copy ",t,"root",n,"data",e.node(t),n),Te.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));const s=e.edges(a);Te.debug("Copying Edges",s),s.forEach(l=>{Te.info("Edge",l);const u=e.edge(l.v,l.w,l.name);Te.info("Edge data",u,n);try{aCr(l,n)?(Te.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),Te.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):Te.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(d){Te.error(d)}})}Te.debug("Removing node",a),e.removeNode(a)})},"copy"),Ert=N((t,e)=>{const r=e.children(t);let n=[...r];for(const i of r)Qrt.set(i,t),n=[...n,...Ert(i,e)];return n},"extractDescendants"),oCr=N((t,e,r)=>{const n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),o=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),rA=N((t,e,r)=>{const n=e.children(t);if(Te.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(const a of n){const o=rA(a,e,r),s=oCr(e,r,o);if(o)if(s.length>0)i=o;else return o}return i},"findNonClusterChild"),Srt=N(t=>!jn.has(t)||!jn.get(t).externalConnections?t:jn.has(t)?jn.get(t).id:t,"getAnchorId"),sCr=N((t,e)=>{if(!t||e>10){Te.debug("Opting out, no graph ");return}else Te.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(Te.warn("Cluster identified",r," Replacement id in edges: ",rA(r,t,r)),B8.set(r,Ert(r,t)),jn.set(r,{id:rA(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){const n=t.children(r),i=t.edges();n.length>0?(Te.debug("Cluster identified",r,B8),i.forEach(a=>{const o=yF(a.v,r),s=yF(a.w,r);o^s&&(Te.warn("Edge: ",a," leaves cluster ",r),Te.warn("Descendants of XXX ",r,": ",B8.get(r)),jn.get(r).externalConnections=!0)})):Te.debug("Not a cluster ",r,B8)});for(let r of jn.keys()){const n=jn.get(r).id,i=t.parent(n);i!==r&&jn.has(i)&&!jn.get(i).externalConnections&&(jn.get(r).id=i)}t.edges().forEach(function(r){const n=t.edge(r);Te.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),Te.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(Te.warn("Fix XXX",jn,"ids:",r.v,r.w,"Translating: ",jn.get(r.v)," --- ",jn.get(r.w)),jn.get(r.v)||jn.get(r.w)){if(Te.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Srt(r.v),a=Srt(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){const o=t.parent(i);jn.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){const o=t.parent(a);jn.get(o).externalConnections=!0,n.toCluster=r.w}Te.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),Te.warn("Adjusted Graph",lh(t)),Crt(t,0),Te.trace(jn)},"adjustClustersAndEdges"),Crt=N((t,e)=>{var i,a;if(Te.warn("extractor - ",e,lh(t),t.children("D")),e>10){Te.error("Bailing out");return}let r=t.nodes(),n=!1;for(const o of r){const s=t.children(o);n=n||s.length>0}if(!n){Te.debug("Done, no node has children",t.nodes());return}Te.debug("Nodes = ",r,e);for(const o of r)if(Te.debug("Extracting node",o,jn,jn.has(o)&&!jn.get(o).externalConnections,!t.parent(o),t.node(o),t.children("D")," Depth ",e),!jn.has(o))Te.debug("Not a cluster",o,e);else if(!jn.get(o).externalConnections&&t.children(o)&&t.children(o).length>0){Te.warn("Cluster without external connections, without a parent and with children",o,e);let l=t.graph().rankdir==="TB"?"LR":"TB";(a=(i=jn.get(o))==null?void 0:i.clusterData)!=null&&a.dir&&(l=jn.get(o).clusterData.dir,Te.warn("Fixing dir",jn.get(o).clusterData.dir,l));const u=new Oc({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Te.warn("Old graph before copy",lh(t)),xrt(o,t,u,o),t.setNode(o,{clusterNode:!0,id:o,clusterData:jn.get(o).clusterData,label:jn.get(o).label,graph:u}),Te.warn("New graph after copy node: (",o,")",lh(u)),Te.debug("Old graph after copy",lh(t))}else Te.warn("Cluster ** ",o," **not meeting the criteria !externalConnections:",!jn.get(o).externalConnections," no parent: ",!t.parent(o)," children ",t.children(o)&&t.children(o).length>0,t.children("D"),e),Te.debug(jn);r=t.nodes(),Te.warn("New list of nodes",r);for(const o of r){const s=t.node(o);Te.warn(" Now next level",o,s),s!=null&&s.clusterNode&&Crt(s.graph,e+1)}},"extractor"),Lrt=N((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{const i=t.children(n),a=Lrt(t,i);r=[...r,...a]}),r},"sorter"),lCr=N(t=>Lrt(t,t.children()),"sortNodesByHierarchy"),wrt=N(async(t,e,r,n,i,a)=>{Te.warn("Graph in recursive render:XAX",lh(e),i);const o=e.graph().rankdir;Te.trace("Dir in recursive render - dir:",o);const s=t.insert("g").attr("class","root");e.nodes()?Te.info("Recursive render XXX",e.nodes()):Te.info("No nodes found for",e),e.edges().length>0&&Te.info("Recursive edges",e.edge(e.edges()[0]));const l=s.insert("g").attr("class","clusters"),u=s.insert("g").attr("class","edgePaths"),d=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(m){const v=e.node(m);if(i!==void 0){const T=JSON.parse(JSON.stringify(i.clusterData));Te.trace(`Setting data for parent cluster XXX
|
|
1064
1064
|
Node.id = `,m,`
|
|
1065
1065
|
data=`,T.height,`
|
|
1066
1066
|
Parent cluster`,i.height),e.setNode(i.id,T),e.parent(m)||(Te.trace("Setting parent",m,i.id),e.setParent(m,i.id,T))}if(Te.info("(Insert) Node XXX"+m+": "+JSON.stringify(e.node(m))),v!=null&&v.clusterNode){Te.info("Cluster identified XBX",m,v.width,e.node(m));const{ranksep:T,nodesep:y}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:T+25,nodesep:y});const _=await wrt(h,v.graph,r,n,e.node(m),a),Q=_.elem;zr(v,Q),v.diff=_.diff||0,Te.info("New compound node after recursive render XAX",m,"width",v.width,"height",v.height),EFt(Q,v)}else e.children(m).length>0?(Te.trace("Cluster - the non recursive path XBX",m,v.id,v,v.width,"Graph:",e),Te.trace(rA(v.id,e)),jn.set(v.id,{id:rA(v.id,e),node:v})):(Te.trace("Node - the non recursive path XAX",m,h,e.node(m),o),await aI(h,e.node(m),{config:a,dir:o}))})),await N(async()=>{const m=e.edges().map(async function(v){const T=e.edge(v.v,v.w,v.name);Te.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),Te.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),Te.info("Fix",jn,"ids:",v.v,v.w,"Translating: ",jn.get(v.v),jn.get(v.w)),await FCe(d,T)});await Promise.all(m)},"processEdges")(),Te.info("Graph before layout:",JSON.stringify(lh(e))),Te.info("############################################# XXX"),Te.info("### Layout ### XXX"),Te.info("############################################# XXX"),brt(e),Te.info("Graph after layout:",JSON.stringify(lh(e)));let p=0,{subGraphTitleTotalMargin:g}=Hx(a);return await Promise.all(lCr(e).map(async function(m){var T;const v=e.node(m);if(Te.info("Position XBX => "+m+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v!=null&&v.clusterNode)v.y+=g,Te.info("A tainted cluster node XBX1",m,v.id,v.width,v.height,v.x,v.y,e.parent(m)),jn.get(v.id).node=v,GJ(v);else if(e.children(m).length>0){Te.info("A pure cluster node XBX1",m,v.id,v.x,v.y,v.width,v.height,e.parent(m)),v.height+=g,e.node(v.parentId);const y=(v==null?void 0:v.padding)/2||0,_=((T=v==null?void 0:v.labelBBox)==null?void 0:T.height)||0,Q=_-y||0;Te.debug("OffsetY",Q,"labelHeight",_,"halfPadding",y),await VJ(l,v),jn.get(v.id).node=v}else{const y=e.node(v.parentId);v.y+=g/2,Te.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",y,y==null?void 0:y.offsetY,v),GJ(v)}})),e.edges().forEach(function(m){const v=e.edge(m);Te.info("Edge "+m.v+" -> "+m.w+": "+JSON.stringify(v),v),v.points.forEach(Q=>Q.y+=g/2);const T=e.node(m.v);var y=e.node(m.w);const _=GCe(u,v,jn,r,T,y,n);VCe(v,_)}),e.nodes().forEach(function(m){const v=e.node(m);Te.info(m,v.type,v.diff),v.isGroup&&(p=v.diff)}),Te.warn("Returning from recursive render XAX",s,p),{elem:s,diff:p}},"recursiveRender"),uCr=N(async(t,e)=>{var a,o,s,l,u,d;const r=new Oc({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:((a=t.config)==null?void 0:a.nodeSpacing)||((s=(o=t.config)==null?void 0:o.flowchart)==null?void 0:s.nodeSpacing)||t.nodeSpacing,ranksep:((l=t.config)==null?void 0:l.rankSpacing)||((d=(u=t.config)==null?void 0:u.flowchart)==null?void 0:d.rankSpacing)||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");qCe(n,t.markers,t.type,t.diagramId),SFt(),wFt(),aFt(),iCr(),t.nodes.forEach(h=>{r.setNode(h.id,{...h}),h.parentId&&r.setParent(h.id,h.parentId)}),Te.debug("Edges:",t.edges),t.edges.forEach(h=>{if(h.start===h.end){const f=h.start,p=f+"---"+f+"---1",g=f+"---"+f+"---2",m=r.node(f);r.setNode(p,{domId:p,id:p,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(p,m.parentId),r.setNode(g,{domId:g,id:g,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(g,m.parentId);const v=structuredClone(h),T=structuredClone(h),y=structuredClone(h);v.label="",v.arrowTypeEnd="none",v.id=f+"-cyclic-special-1",T.arrowTypeStart="none",T.arrowTypeEnd="none",T.id=f+"-cyclic-special-mid",y.label="",m.isGroup&&(v.fromCluster=f,y.toCluster=f),y.id=f+"-cyclic-special-2",y.arrowTypeStart="none",r.setEdge(f,p,v,f+"-cyclic-special-0"),r.setEdge(p,g,T,f+"-cyclic-special-1"),r.setEdge(g,f,y,f+"-cyc<lic-special-2")}else r.setEdge(h.start,h.end,{...h},h.id)}),Te.warn("Graph at first:",JSON.stringify(lh(r))),sCr(r),Te.warn("Graph after XAX:",JSON.stringify(lh(r)));const i=ze();await wrt(n,r,t.type,t.diagramId,void 0,i)},"render");const cCr=Object.freeze(Object.defineProperty({__proto__:null,render:uCr},Symbol.toStringTag,{value:"Module"}));var _F=N((t,e)=>{const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(const n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),Art=N((t,e)=>{const r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};_F(t,r).lower()},"drawBackgroundRect"),dCr=N((t,e)=>{const r=e.text.replace(Bv," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),hCr=N((t,e,r,n)=>{const i=t.append("image");i.attr("x",e),i.attr("y",r);const a=Bg.sanitizeUrl(n);i.attr("xlink:href",a)},"drawImage"),fCr=N((t,e,r,n)=>{const i=t.append("use");i.attr("x",e),i.attr("y",r);const a=Bg.sanitizeUrl(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),H8=N(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),sce=N(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),bF=function(){var t=N(function(at,qe,it,Qe){for(it=it||{},Qe=at.length;Qe--;it[at[Qe]]=qe);return it},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],o=[1,63],s=[1,64],l=[1,65],u=[1,66],d=[1,67],h=[1,68],f=[1,69],p=[1,29],g=[1,30],m=[1,31],v=[1,32],T=[1,33],y=[1,34],_=[1,35],Q=[1,36],b=[1,37],x=[1,38],E=[1,39],S=[1,40],C=[1,41],L=[1,42],w=[1,43],O=[1,44],R=[1,45],M=[1,46],D=[1,47],P=[1,48],B=[1,50],k=[1,51],V=[1,52],H=[1,53],$=[1,54],G=[1,55],U=[1,56],Y=[1,57],ne=[1,58],te=[1,59],ee=[1,60],ie=[14,42],j=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],X=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Z=[1,82],K=[1,83],ae=[1,84],le=[1,85],oe=[12,14,42],Ce=[12,14,33,42],fe=[12,14,33,42,76,77,79,80],ce=[12,33],ke=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ee={trace:N(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:N(function(qe,it,Qe,De,je,Se,Ke){var de=Se.length-1;switch(je){case 3:De.setDirection("TB");break;case 4:De.setDirection("BT");break;case 5:De.setDirection("RL");break;case 6:De.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:De.setC4Type(Se[de-3]);break;case 19:De.setTitle(Se[de].substring(6)),this.$=Se[de].substring(6);break;case 20:De.setAccDescription(Se[de].substring(15)),this.$=Se[de].substring(15);break;case 21:this.$=Se[de].trim(),De.setTitle(this.$);break;case 22:case 23:this.$=Se[de].trim(),De.setAccDescription(this.$);break;case 28:Se[de].splice(2,0,"ENTERPRISE"),De.addPersonOrSystemBoundary(...Se[de]),this.$=Se[de];break;case 29:Se[de].splice(2,0,"SYSTEM"),De.addPersonOrSystemBoundary(...Se[de]),this.$=Se[de];break;case 30:De.addPersonOrSystemBoundary(...Se[de]),this.$=Se[de];break;case 31:Se[de].splice(2,0,"CONTAINER"),De.addContainerBoundary(...Se[de]),this.$=Se[de];break;case 32:De.addDeploymentNode("node",...Se[de]),this.$=Se[de];break;case 33:De.addDeploymentNode("nodeL",...Se[de]),this.$=Se[de];break;case 34:De.addDeploymentNode("nodeR",...Se[de]),this.$=Se[de];break;case 35:De.popBoundaryParseStack();break;case 39:De.addPersonOrSystem("person",...Se[de]),this.$=Se[de];break;case 40:De.addPersonOrSystem("external_person",...Se[de]),this.$=Se[de];break;case 41:De.addPersonOrSystem("system",...Se[de]),this.$=Se[de];break;case 42:De.addPersonOrSystem("system_db",...Se[de]),this.$=Se[de];break;case 43:De.addPersonOrSystem("system_queue",...Se[de]),this.$=Se[de];break;case 44:De.addPersonOrSystem("external_system",...Se[de]),this.$=Se[de];break;case 45:De.addPersonOrSystem("external_system_db",...Se[de]),this.$=Se[de];break;case 46:De.addPersonOrSystem("external_system_queue",...Se[de]),this.$=Se[de];break;case 47:De.addContainer("container",...Se[de]),this.$=Se[de];break;case 48:De.addContainer("container_db",...Se[de]),this.$=Se[de];break;case 49:De.addContainer("container_queue",...Se[de]),this.$=Se[de];break;case 50:De.addContainer("external_container",...Se[de]),this.$=Se[de];break;case 51:De.addContainer("external_container_db",...Se[de]),this.$=Se[de];break;case 52:De.addContainer("external_container_queue",...Se[de]),this.$=Se[de];break;case 53:De.addComponent("component",...Se[de]),this.$=Se[de];break;case 54:De.addComponent("component_db",...Se[de]),this.$=Se[de];break;case 55:De.addComponent("component_queue",...Se[de]),this.$=Se[de];break;case 56:De.addComponent("external_component",...Se[de]),this.$=Se[de];break;case 57:De.addComponent("external_component_db",...Se[de]),this.$=Se[de];break;case 58:De.addComponent("external_component_queue",...Se[de]),this.$=Se[de];break;case 60:De.addRel("rel",...Se[de]),this.$=Se[de];break;case 61:De.addRel("birel",...Se[de]),this.$=Se[de];break;case 62:De.addRel("rel_u",...Se[de]),this.$=Se[de];break;case 63:De.addRel("rel_d",...Se[de]),this.$=Se[de];break;case 64:De.addRel("rel_l",...Se[de]),this.$=Se[de];break;case 65:De.addRel("rel_r",...Se[de]),this.$=Se[de];break;case 66:De.addRel("rel_b",...Se[de]),this.$=Se[de];break;case 67:Se[de].splice(0,1),De.addRel("rel",...Se[de]),this.$=Se[de];break;case 68:De.updateElStyle("update_el_style",...Se[de]),this.$=Se[de];break;case 69:De.updateRelStyle("update_rel_style",...Se[de]),this.$=Se[de];break;case 70:De.updateLayoutConfig("update_layout_config",...Se[de]),this.$=Se[de];break;case 71:this.$=[Se[de]];break;case 72:Se[de].unshift(Se[de-1]),this.$=Se[de];break;case 73:case 75:this.$=Se[de].trim();break;case 74:let be={};be[Se[de-1].trim()]=Se[de].trim(),this.$=be;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:h,41:f,43:23,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:h,41:f,43:23,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:h,41:f,43:23,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:h,41:f,43:23,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:h,41:f,43:23,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee},{14:[1,74]},t(ie,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:s,37:l,38:u,39:d,40:h,41:f,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee}),t(ie,[2,14]),t(j,[2,16],{12:[1,76]}),t(ie,[2,36],{12:[1,77]}),t(X,[2,19]),t(X,[2,20]),{25:[1,78]},{27:[1,79]},t(X,[2,23]),{35:80,75:81,76:Z,77:K,79:ae,80:le},{35:86,75:81,76:Z,77:K,79:ae,80:le},{35:87,75:81,76:Z,77:K,79:ae,80:le},{35:88,75:81,76:Z,77:K,79:ae,80:le},{35:89,75:81,76:Z,77:K,79:ae,80:le},{35:90,75:81,76:Z,77:K,79:ae,80:le},{35:91,75:81,76:Z,77:K,79:ae,80:le},{35:92,75:81,76:Z,77:K,79:ae,80:le},{35:93,75:81,76:Z,77:K,79:ae,80:le},{35:94,75:81,76:Z,77:K,79:ae,80:le},{35:95,75:81,76:Z,77:K,79:ae,80:le},{35:96,75:81,76:Z,77:K,79:ae,80:le},{35:97,75:81,76:Z,77:K,79:ae,80:le},{35:98,75:81,76:Z,77:K,79:ae,80:le},{35:99,75:81,76:Z,77:K,79:ae,80:le},{35:100,75:81,76:Z,77:K,79:ae,80:le},{35:101,75:81,76:Z,77:K,79:ae,80:le},{35:102,75:81,76:Z,77:K,79:ae,80:le},{35:103,75:81,76:Z,77:K,79:ae,80:le},{35:104,75:81,76:Z,77:K,79:ae,80:le},t(oe,[2,59]),{35:105,75:81,76:Z,77:K,79:ae,80:le},{35:106,75:81,76:Z,77:K,79:ae,80:le},{35:107,75:81,76:Z,77:K,79:ae,80:le},{35:108,75:81,76:Z,77:K,79:ae,80:le},{35:109,75:81,76:Z,77:K,79:ae,80:le},{35:110,75:81,76:Z,77:K,79:ae,80:le},{35:111,75:81,76:Z,77:K,79:ae,80:le},{35:112,75:81,76:Z,77:K,79:ae,80:le},{35:113,75:81,76:Z,77:K,79:ae,80:le},{35:114,75:81,76:Z,77:K,79:ae,80:le},{35:115,75:81,76:Z,77:K,79:ae,80:le},{20:116,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:h,41:f,43:23,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee},{12:[1,118],33:[1,117]},{35:119,75:81,76:Z,77:K,79:ae,80:le},{35:120,75:81,76:Z,77:K,79:ae,80:le},{35:121,75:81,76:Z,77:K,79:ae,80:le},{35:122,75:81,76:Z,77:K,79:ae,80:le},{35:123,75:81,76:Z,77:K,79:ae,80:le},{35:124,75:81,76:Z,77:K,79:ae,80:le},{35:125,75:81,76:Z,77:K,79:ae,80:le},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ie,[2,15]),t(j,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(ie,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:o,36:s,37:l,38:u,39:d,40:h,41:f,44:p,45:g,46:m,47:v,48:T,49:y,50:_,51:Q,52:b,53:x,54:E,55:S,56:C,57:L,58:w,59:O,60:R,61:M,62:D,63:P,64:B,65:k,66:V,67:H,68:$,69:G,70:U,71:Y,72:ne,73:te,74:ee}),t(X,[2,21]),t(X,[2,22]),t(oe,[2,39]),t(Ce,[2,71],{75:81,35:132,76:Z,77:K,79:ae,80:le}),t(fe,[2,73]),{78:[1,133]},t(fe,[2,75]),t(fe,[2,76]),t(oe,[2,40]),t(oe,[2,41]),t(oe,[2,42]),t(oe,[2,43]),t(oe,[2,44]),t(oe,[2,45]),t(oe,[2,46]),t(oe,[2,47]),t(oe,[2,48]),t(oe,[2,49]),t(oe,[2,50]),t(oe,[2,51]),t(oe,[2,52]),t(oe,[2,53]),t(oe,[2,54]),t(oe,[2,55]),t(oe,[2,56]),t(oe,[2,57]),t(oe,[2,58]),t(oe,[2,60]),t(oe,[2,61]),t(oe,[2,62]),t(oe,[2,63]),t(oe,[2,64]),t(oe,[2,65]),t(oe,[2,66]),t(oe,[2,67]),t(oe,[2,68]),t(oe,[2,69]),t(oe,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ce,[2,28]),t(ce,[2,29]),t(ce,[2,30]),t(ce,[2,31]),t(ce,[2,32]),t(ce,[2,33]),t(ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(j,[2,18]),t(ie,[2,38]),t(Ce,[2,72]),t(fe,[2,74]),t(oe,[2,24]),t(oe,[2,35]),t(ke,[2,25]),t(ke,[2,26],{12:[1,138]}),t(ke,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:N(function(qe,it){if(it.recoverable)this.trace(qe);else{var Qe=new Error(qe);throw Qe.hash=it,Qe}},"parseError"),parse:N(function(qe){var it=this,Qe=[0],De=[],je=[null],Se=[],Ke=this.table,de="",be=0,W=0,ve=2,me=1,Le=Se.slice.call(arguments,1),we=Object.create(this.lexer),Be={yy:{}};for(var Ue in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ue)&&(Be.yy[Ue]=this.yy[Ue]);we.setInput(qe,Be.yy),Be.yy.lexer=we,Be.yy.parser=this,typeof we.yylloc>"u"&&(we.yylloc={});var Ie=we.yylloc;Se.push(Ie);var mt=we.options&&we.options.ranges;typeof Be.yy.parseError=="function"?this.parseError=Be.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function At(Pt){Qe.length=Qe.length-2*Pt,je.length=je.length-Pt,Se.length=Se.length-Pt}N(At,"popStack");function Qt(){var Pt;return Pt=De.pop()||we.lex()||me,typeof Pt!="number"&&(Pt instanceof Array&&(De=Pt,Pt=De.pop()),Pt=it.symbols_[Pt]||Pt),Pt}N(Qt,"lex");for(var xe,Ge,Ve,ht,kt={},Mt,tt,vt,st;;){if(Ge=Qe[Qe.length-1],this.defaultActions[Ge]?Ve=this.defaultActions[Ge]:((xe===null||typeof xe>"u")&&(xe=Qt()),Ve=Ke[Ge]&&Ke[Ge][xe]),typeof Ve>"u"||!Ve.length||!Ve[0]){var St="";st=[];for(Mt in Ke[Ge])this.terminals_[Mt]&&Mt>ve&&st.push("'"+this.terminals_[Mt]+"'");we.showPosition?St="Parse error on line "+(be+1)+`:
|